prompt,target "le>jordan-curve-theorem: Not compatible
Coq bench
« Up

jordan-curve-theorem 8.7.0 Not compatible

(2021-04-06 20:47:58 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-threads        base
base-unix           base
conf-findutils      1           Virtual package relying on findutils
conf-gmp            3           Virtual package relying on a GMP lib system installation
coq                 dev         Formal proof management system
num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.10.1      The OCaml compiler (virtual package)
ocaml-base-compiler 4.10.1      Official release 4.10.1
ocaml-config        1           OCaml Switch Configuration
ocamlfind           1.9.1       A library manager for OCaml
zarith              1.12        Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/jordan-curve-theorem"
license: "Unknown"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/JordanCurveTheorem"]
depends: [
  "ocaml"
  "coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: combinatorial hypermaps" "keyword: genus" "keyword: planarity" "keyword: Euler formula" "keyword: Discrete Jordan Curve Theorem" "category: Mathematics/Geometry/General" "date: 2008" ]
authors: [ "Jean-François Dufourd <dufourd@lsiit.u-strasbg.fr> [http://dpt-info.u-strasbg.fr/~jfd/]" ]
bug-reports: "https://github.com/coq-contribs/jordan-curve-theorem/issues"
dev-repo: "git+https://github.com/coq-contribs/jordan-curve-theorem.git"
synopsis: "Hypermaps, planarity and discrete Jordan curve theorem"
description: """
http://dpt-info.u-strasbg.fr/~jfd/Downloads/JORDAN_Contrib_Coq.tar.gz
Constructive formalization of the combinatorial hypermaps, characterization of the planarity, genus theorem, Euler formula, ring of faces, discrete Jordan curve theorem"""
flags: light-uninstall
url {
  src:
    "https://github.com/coq-contribs/jordan-curve-theorem/archive/v8.7.0.tar.gz"
  checksum: "md5=0e9554497c2fbaa4bf3006c96b921d09"
}

Lint

Command
true
Return code
0

Dry install

Dry install with the current Coq version:

Command
opam install -y --show-action coq-jordan-curve-theorem.8.7.0 coq.dev
Return code
5120
Output
[NOTE] Package coq is already installed (current version is dev).
The following dependencies couldn't be met:
  - coq-jordan-curve-theorem -> coq < 8.8~ -> ocaml < 4.10
      base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
  - No available version of coq satisfies the constraints
No solution found, exiting

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command
opam remove -y coq; opam install -y --show-action --unlock-base coq-jordan-curve-theorem.8.7.0
Return code
0

Install dependencies

Command
true
Return code
0
Duration
0 s

Install

Command
true
Return code
0
Duration
0 s

Installation size

No files were installed.

Uninstall

Command
true
Return code
0
Missing removes
none
Wrong removes
none

Sources are on GitHub. © Guillaume Claret.

",0 "rg/1999/xhtml""> BlueViaAndroidSDK: XmlDirectoryPersonalInfoParser Class Reference
BlueViaAndroidSDK 1.6
Public Member Functions

XmlDirectoryPersonalInfoParser Class Reference

Inheritance diagram for XmlDirectoryPersonalInfoParser:

List of all members.

Public Member Functions

PersonalInfo parse (XmlPullParser parser) throws ParseException

Detailed Description

Xml parser for XmlDirectoryPersonalInfoParser entities.

Author:
Telefonica I+D

Member Function Documentation

PersonalInfo parse ( XmlPullParser  parser) throws ParseException

Parse the next entry on the parser

Parameters:
parseris the parser with the entity information
Returns:
the Entity object
Exceptions:
ParseExceptionwhen an error occurs converting the stream into an object
IOExceptionwhen an error reading the stream occurs

Implements DirectoryEntityParser.

 All Classes Functions Variables Enumerations
",0 "ing Exception. For full terms see the included COPYING file. */ #include ""common.h"" #include ""git2/credential_helpers.h"" int git_credential_userpass( git_credential **cred, const char *url, const char *user_from_url, unsigned int allowed_types, void *payload) { git_credential_userpass_payload *userpass = (git_credential_userpass_payload*)payload; const char *effective_username = NULL; GIT_UNUSED(url); if (!userpass || !userpass->password) return -1; /* Username resolution: a username can be passed with the URL, the * credentials payload, or both. Here's what we do. Note that if we get * this far, we know that any password the url may contain has already * failed at least once, so we ignore it. * * | Payload | URL | Used | * +-------------+----------+-----------+ * | yes | no | payload | * | yes | yes | payload | * | no | yes | url | * | no | no | FAIL | */ if (userpass->username) effective_username = userpass->username; else if (user_from_url) effective_username = user_from_url; else return -1; if (GIT_CREDENTIAL_USERNAME & allowed_types) return git_credential_username_new(cred, effective_username); if ((GIT_CREDENTIAL_USERPASS_PLAINTEXT & allowed_types) == 0 || git_credential_userpass_plaintext_new(cred, effective_username, userpass->password) < 0) return -1; return 0; } /* Deprecated credential functions */ #ifndef GIT_DEPRECATE_HARD int git_cred_userpass( git_credential **out, const char *url, const char *user_from_url, unsigned int allowed_types, void *payload) { return git_credential_userpass(out, url, user_from_url, allowed_types, payload); } #endif ",0 "Id$ */ #include ""db_config.h"" #include ""db_int.h"" /* * __os_id -- * Return the current process ID. * * PUBLIC: void __os_id __P((DB_ENV *, pid_t *, db_threadid_t*)); */ void __os_id(dbenv, pidp, tidp) DB_ENV *dbenv; pid_t *pidp; db_threadid_t *tidp; { /* * We can't depend on dbenv not being NULL, this routine is called * from places where there's no DB_ENV handle. * * We cache the pid in the ENV handle, getting the process ID is a * fairly slow call on lots of systems. */ if (pidp != NULL) { if (dbenv == NULL) { #if defined(HAVE_VXWORKS) *pidp = taskIdSelf(); #else *pidp = getpid(); #endif } else *pidp = dbenv->env->pid_cache; } if (tidp != NULL) { #if defined(DB_WIN32) *tidp = GetCurrentThreadId(); #elif defined(HAVE_MUTEX_UI_THREADS) *tidp = thr_self(); #elif defined(HAVE_PTHREAD_SELF) *tidp = pthread_self(); #else /* * Default to just getpid. */ *tidp = 0; #endif } } ",0 "tributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.manifoldcf.crawler.jobs; import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.crawler.interfaces.*; import java.util.*; /** This class manages the ""hopfilters"" table, which contains the hopcount filters for each job. * It's separated from the main jobs table because we will need multiple hop filters per job. * *

* jobhopfilters * * * * * * *
FieldTypeDescription        
owneridBIGINTReference:jobs.id
linktypeVARCHAR(255)
maxhopsBIGINT
*

* */ public class HopFilterManager extends org.apache.manifoldcf.core.database.BaseTable { public static final String _rcsid = ""@(#)$Id: HopFilterManager.java 988245 2010-08-23 18:39:35Z kwright $""; // Schema public final static String ownerIDField = ""ownerid""; public final static String linkTypeField = ""linktype""; public final static String maxHopsField = ""maxhops""; /** Constructor. *@param threadContext is the thread context. *@param database is the database instance. */ public HopFilterManager(IThreadContext threadContext, IDBInterface database) throws ManifoldCFException { super(database,""jobhopfilters""); } /** Install or upgrade. *@param ownerTable is the name of the table that owns this one. *@param owningTablePrimaryKey is the primary key of the owning table. */ public void install(String ownerTable, String owningTablePrimaryKey) throws ManifoldCFException { // Standard practice: outer loop while (true) { Map existing = getTableSchema(null,null); if (existing == null) { HashMap map = new HashMap(); map.put(ownerIDField,new ColumnDescription(""BIGINT"",false,false,ownerTable,owningTablePrimaryKey,false)); // Null link types are NOT allowed here. The restrictions can only be made on a real link type. map.put(linkTypeField,new ColumnDescription(""VARCHAR(255)"",false,false,null,null,false)); map.put(maxHopsField,new ColumnDescription(""BIGINT"",false,false,null,null,false)); performCreate(map,null); } else { // Upgrade code goes here, as needed } // Index management IndexDescription ownerIndex = new IndexDescription(true,new String[]{ownerIDField,linkTypeField}); // Get rid of indexes that shouldn't be there Map indexes = getTableIndexes(null,null); Iterator iter = indexes.keySet().iterator(); while (iter.hasNext()) { String indexName = (String)iter.next(); IndexDescription id = (IndexDescription)indexes.get(indexName); if (ownerIndex != null && id.equals(ownerIndex)) ownerIndex = null; else if (indexName.indexOf(""_pkey"") == -1) // This index shouldn't be here; drop it performRemoveIndex(indexName); } // Add the ones we didn't find if (ownerIndex != null) performAddIndex(null,ownerIndex); break; } } /** Uninstall. */ public void deinstall() throws ManifoldCFException { performDrop(null); } /** Read rows for a given owner id. *@param id is the owner id. *@return a map of link type to max hop count (as a Long). */ public Map readRows(Long id) throws ManifoldCFException { ArrayList list = new ArrayList(); list.add(id); IResultSet set = performQuery(""SELECT ""+linkTypeField+"",""+maxHopsField+"" FROM ""+getTableName()+"" WHERE ""+ownerIDField+""=?"",list, null,null); Map rval = new HashMap(); if (set.getRowCount() == 0) return rval; int i = 0; while (i < set.getRowCount()) { IResultRow row = set.getRow(i); String linkType = (String)row.getValue(linkTypeField); Long max = (Long)row.getValue(maxHopsField); rval.put(linkType,max); i++; } return rval; } /** Fill in a set of filters corresponding to a set of owner id's. *@param returnValues is a map keyed by ownerID, with value of JobDescription. *@param ownerIDList is the list of owner id's. *@param ownerIDParams is the corresponding set of owner id parameters. */ public void getRows(Map returnValues, String ownerIDList, ArrayList ownerIDParams) throws ManifoldCFException { IResultSet set = performQuery(""SELECT * FROM ""+getTableName()+"" WHERE ""+ownerIDField+"" IN (""+ownerIDList+"")"",ownerIDParams, null,null); int i = 0; while (i < set.getRowCount()) { IResultRow row = set.getRow(i); Long ownerID = (Long)row.getValue(ownerIDField); String linkType = (String)row.getValue(linkTypeField); Long maxHops = (Long)row.getValue(maxHopsField); returnValues.get(ownerID).addHopCountFilter(linkType,maxHops); i++; } } /** Compare a filter list against what's in a job description. *@param ownerID is the owning identifier. *@param list is the job description to write hopcount filters for. */ public boolean compareRows(Long ownerID, IJobDescription list) throws ManifoldCFException { // Compare hopcount filter criteria. Map filterRows = readRows(ownerID); Map newFilterRows = list.getHopCountFilters(); if (filterRows.size() != newFilterRows.size()) return false; for (String linkType : (Collection)filterRows.keySet()) { Long oldCount = (Long)filterRows.get(linkType); Long newCount = (Long)newFilterRows.get(linkType); if (oldCount == null || newCount == null) return false; if (oldCount.longValue() != newCount.longValue()) return false; } return true; } /** Write a filter list into the database. *@param ownerID is the owning identifier. *@param list is the job description to write hopcount filters for. */ public void writeRows(Long ownerID, IJobDescription list) throws ManifoldCFException { beginTransaction(); try { int i = 0; HashMap map = new HashMap(); Map filters = list.getHopCountFilters(); Iterator iter = filters.keySet().iterator(); while (iter.hasNext()) { String linkType = (String)iter.next(); Long maxHops = (Long)filters.get(linkType); map.clear(); map.put(linkTypeField,linkType); map.put(maxHopsField,maxHops); map.put(ownerIDField,ownerID); performInsert(map,null); } } catch (ManifoldCFException e) { signalRollback(); throw e; } catch (Error e) { signalRollback(); throw e; } finally { endTransaction(); } } /** Delete rows. *@param ownerID is the owner whose rows to delete. */ public void deleteRows(Long ownerID) throws ManifoldCFException { ArrayList list = new ArrayList(); list.add(ownerID); performDelete(""WHERE ""+ownerIDField+""=?"",list,null); } } ",0 "ense as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * @copyright 2005 Camptocamp SA * @package Tests * @version $Id$ */ /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// // This is currently not included in tests. Add to the tests once completed. /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// /////////////////////////////////////////////////////// /** * Abstract test case */ require_once 'PHPUnit/Framework/TestCase.php'; require_once(CARTOWEB_HOME . 'client/Internationalization.php'); require_once(CARTOWEB_HOME . 'client/Cartoclient.php'); /** * Unit tests for Internationalization * @package Tests * @author Sylvain Pasche */ class client_InternationalizationTest extends PHPUnit_Framework_TestCase { public function testGettextFr() { $cartoclient = new Cartoclient(); $config = new ClientConfig($cartoclient->getProjectHandler()); I18n::init($config); //var_dump(I18n::getLocales()); $translated = I18n::gt('Scalebar'); $this->assertEquals('Echelle', $translated); } } ",0 "ntent=""IE=edge,chrome=1""> web server - Coding is Poetry

Posts tagged with web server


© 2016. All Rights Reserved.

Proudly published with Ghost

",0 "reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?>getDefaultData(); $orderClass = hikashop_get('class.order'); $order = $orderClass->loadFullOrder((int)$data); if(empty($order->mail_status)) $order->mail_status = hikamarket::orderStatus(@$order->order_status); else $order->mail_status = hikamarket::orderStatus($order->mail_status); if(isset($order->hikamarket->vendor)) { $order->vendor = $order->hikamarket->vendor; } else { $vendorClass = hikamarket::get('class.vendor'); $vendor_id = max(1, (int)$order->order_vendor_id); $order->vendor = $vendorClass->get($vendor_id); } $mailClass = hikamarket::get('class.mail'); $mail = $mailClass->load('order_status_notification', $order); $mail->hikamarket = true; if(empty($mail->subject)) $mail->subject = 'MARKET_ORDER_STATUS_NOTIFICATION_SUBJECT'; $mail->dst_email = $order->vendor->vendor_email; $mail->dst_name = $order->vendor->vendor_name; return $mail; } public function getDefaultData() { } public function getSelector($data) { $nameboxType = hikashop_get('type.namebox'); $html = $nameboxType->display( 'data', (int)$data, hikashopNameboxType::NAMEBOX_SINGLE, 'order', array( 'delete' => false, 'default_text' => ''.JText::_('HIKA_NONE').'', 'returnOnEmpty' => false, ) ); if(!$html){ hikashop_display(JText::_('PLEASE_FIRST_CREATE_AN_ORDER'), 'info'); return; } if(empty($data)) { echo hikashop_display(Jtext::_('PLEASE_SELECT_AN_ORDER_FOR_THE_PREVIEW')); } ?>
Cassandra.describe_partitioner_result._Fields (apache-cassandra API)
org.apache.cassandra.thrift

Enum Cassandra.describe_partitioner_result._Fields

    • Method Detail

      • values

        public static Cassandra.describe_partitioner_result._Fields[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Cassandra.describe_partitioner_result._Fields c : Cassandra.describe_partitioner_result._Fields.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Cassandra.describe_partitioner_result._Fields valueOf(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getThriftFieldId

        public short getThriftFieldId()
        Specified by:
        getThriftFieldId in interface org.apache.thrift.TFieldIdEnum
      • getFieldName

        public java.lang.String getFieldName()
        Specified by:
        getFieldName in interface org.apache.thrift.TFieldIdEnum

Copyright © 2015 The Apache Software Foundation

",0 "p_common.h"" #include ""coap.h"" #include ""shell.h"" //#include //#define shell_printf rt_kshell_printf extern void endpoint_setup(void); extern const coap_endpoint_t endpoints[]; #ifdef MICROCOAP_DEBUG void ICACHE_FLASH_ATTR coap_dumpHeader(coap_header_t *hdr) { shell_printf(""Header:\n""); shell_printf("" ver 0x%02X\n"", hdr->ver); shell_printf("" t 0x%02X\n"", hdr->t); shell_printf("" tkl 0x%02X\n"", hdr->tkl); shell_printf("" code 0x%02X\n"", hdr->code); shell_printf("" id 0x%02X%02X\n"", hdr->id[0], hdr->id[1]); } #endif #ifdef MICROCOAP_DEBUG void ICACHE_FLASH_ATTR coap_dump(const uint8_t *buf, size_t buflen, bool bare) { if (bare) { while(buflen--) shell_printf(""%02X%s"", *buf++, (buflen > 0) ? "" "" : """"); } else { shell_printf(""Dump: ""); while(buflen--) shell_printf(""%02X%s"", *buf++, (buflen > 0) ? "" "" : """"); shell_printf(""\n""); } } #endif int ICACHE_FLASH_ATTR coap_parseHeader(coap_header_t *hdr, const uint8_t *buf, size_t buflen) { if (buflen < 4) return COAP_ERR_HEADER_TOO_SHORT; hdr->ver = (buf[0] & 0xC0) >> 6; if (hdr->ver != 1) return COAP_ERR_VERSION_NOT_1; hdr->t = (buf[0] & 0x30) >> 4; hdr->tkl = buf[0] & 0x0F; hdr->code = buf[1]; hdr->id[0] = buf[2]; hdr->id[1] = buf[3]; return 0; } int ICACHE_FLASH_ATTR coap_parseToken(coap_buffer_t *tokbuf, const coap_header_t *hdr, const uint8_t *buf, size_t buflen) { if (hdr->tkl == 0) { tokbuf->p = NULL; tokbuf->len = 0; return 0; } else if (hdr->tkl <= 8) { if (4U + hdr->tkl > buflen) return COAP_ERR_TOKEN_TOO_SHORT; // tok bigger than packet tokbuf->p = buf+4; // past header tokbuf->len = hdr->tkl; return 0; } else { // invalid size return COAP_ERR_TOKEN_TOO_SHORT; } } // advances p int ICACHE_FLASH_ATTR coap_parseOption(coap_option_t *option, uint16_t *running_delta, const uint8_t **buf, size_t buflen) { const uint8_t *p = *buf; uint8_t headlen = 1; uint16_t len, delta; if (buflen < headlen) // too small return COAP_ERR_OPTION_TOO_SHORT_FOR_HEADER; delta = (p[0] & 0xF0) >> 4; len = p[0] & 0x0F; // These are untested and may be buggy if (delta == 13) { headlen++; if (buflen < headlen) return COAP_ERR_OPTION_TOO_SHORT_FOR_HEADER; delta = p[1] + 13; p++; } else if (delta == 14) { headlen += 2; if (buflen < headlen) return COAP_ERR_OPTION_TOO_SHORT_FOR_HEADER; delta = ((p[1] << 8) | p[2]) + 269; p+=2; } else if (delta == 15) return COAP_ERR_OPTION_DELTA_INVALID; if (len == 13) { headlen++; if (buflen < headlen) return COAP_ERR_OPTION_TOO_SHORT_FOR_HEADER; len = p[1] + 13; p++; } else if (len == 14) { headlen += 2; if (buflen < headlen) return COAP_ERR_OPTION_TOO_SHORT_FOR_HEADER; len = ((p[1] << 8) | p[2]) + 269; p+=2; } else if (len == 15) return COAP_ERR_OPTION_LEN_INVALID; if ((p + 1 + len) > (*buf + buflen)) return COAP_ERR_OPTION_TOO_BIG; //shell_printf(""option num=%d\n"", delta + *running_delta); option->num = delta + *running_delta; option->buf.p = p+1; option->buf.len = len; //coap_dump(p+1, len, false); // advance buf *buf = p + 1 + len; *running_delta += delta; return 0; } // http://tools.ietf.org/html/rfc7252#section-3.1 int ICACHE_FLASH_ATTR coap_parseOptionsAndPayload(coap_option_t *options, uint8_t *numOptions, coap_buffer_t *payload, const coap_header_t *hdr, const uint8_t *buf, size_t buflen) { size_t optionIndex = 0; uint16_t delta = 0; const uint8_t *p = buf + 4 + hdr->tkl; const uint8_t *end = buf + buflen; int rc; if (p > end) return COAP_ERR_OPTION_OVERRUNS_PACKET; // out of bounds //coap_dump(p, end - p); // 0xFF is payload marker while((optionIndex < *numOptions) && (p < end) && (*p != 0xFF)) { if (0 != (rc = coap_parseOption(&options[optionIndex], &delta, &p, end-p))) return rc; optionIndex++; } *numOptions = optionIndex; if (p+1 < end && *p == 0xFF) // payload marker { payload->p = p+1; payload->len = end-(p+1); } else { payload->p = NULL; payload->len = 0; } return 0; } #ifdef MICROCOAP_DEBUG void ICACHE_FLASH_ATTR coap_dumpOptions(coap_option_t *opts, size_t numopt) { size_t i; shell_printf(""Options:\n""); for (i=0;ihdr); coap_dumpOptions(pkt->opts, pkt->numopts); shell_printf(""Payload: \n""); coap_dump(pkt->payload.p, pkt->payload.len, true); shell_printf(""\n""); } #endif int ICACHE_FLASH_ATTR coap_parse(coap_packet_t *pkt, const uint8_t *buf, size_t buflen) { int rc; // coap_dump(buf, buflen, false); if (0 != (rc = coap_parseHeader(&pkt->hdr, buf, buflen))) return rc; // coap_dumpHeader(&hdr); if (0 != (rc = coap_parseToken(&pkt->tok, &pkt->hdr, buf, buflen))) return rc; pkt->numopts = MAXOPT; if (0 != (rc = coap_parseOptionsAndPayload(pkt->opts, &(pkt->numopts), &(pkt->payload), &pkt->hdr, buf, buflen))) return rc; // coap_dumpOptions(opts, numopt); return 0; } // options are always stored consecutively, so can return a block with same option num const coap_option_t * ICACHE_FLASH_ATTR coap_findOptions(const coap_packet_t *pkt, uint8_t num, uint8_t *count) { // FIXME, options is always sorted, can find faster than this size_t i; const coap_option_t *first = NULL; *count = 0; for (i=0;inumopts;i++) { if (pkt->opts[i].num == num) { if (NULL == first) first = &pkt->opts[i]; (*count)++; } else { if (NULL != first) break; } } return first; } int ICACHE_FLASH_ATTR coap_buffer_to_string(char *strbuf, size_t strbuflen, const coap_buffer_t *buf) { if (buf->len+1 > strbuflen) return COAP_ERR_BUFFER_TOO_SMALL; memcpy(strbuf, buf->p, buf->len); strbuf[buf->len] = 0; return 0; } int ICACHE_FLASH_ATTR coap_build(uint8_t *buf, size_t *buflen, const coap_packet_t *pkt) { size_t opts_len = 0; size_t i; uint8_t *p; uint16_t running_delta = 0; // build header if (*buflen < (4U + pkt->hdr.tkl)) return COAP_ERR_BUFFER_TOO_SMALL; buf[0] = (pkt->hdr.ver & 0x03) << 6; buf[0] |= (pkt->hdr.t & 0x03) << 4; buf[0] |= (pkt->hdr.tkl & 0x0F); buf[1] = pkt->hdr.code; buf[2] = pkt->hdr.id[0]; buf[3] = pkt->hdr.id[1]; // inject token p = buf + 4; if ((pkt->hdr.tkl > 0) && (pkt->hdr.tkl != pkt->tok.len)) return COAP_ERR_UNSUPPORTED; if (pkt->hdr.tkl > 0) memcpy(p, pkt->tok.p, pkt->hdr.tkl); // // http://tools.ietf.org/html/rfc7252#section-3.1 // inject options p += pkt->hdr.tkl; for (i=0;inumopts;i++) { uint32_t optDelta; uint8_t len, delta = 0; if (((size_t)(p-buf)) > *buflen) return COAP_ERR_BUFFER_TOO_SMALL; optDelta = pkt->opts[i].num - running_delta; coap_option_nibble(optDelta, &delta); coap_option_nibble((uint32_t)pkt->opts[i].buf.len, &len); *p++ = (0xFF & (delta << 4 | len)); if (delta == 13) { *p++ = (optDelta - 13); } else if (delta == 14) { *p++ = ((optDelta-269) >> 8); *p++ = (0xFF & (optDelta-269)); } if (len == 13) { *p++ = (pkt->opts[i].buf.len - 13); } else if (len == 14) { *p++ = (pkt->opts[i].buf.len >> 8); *p++ = (0xFF & (pkt->opts[i].buf.len-269)); } memcpy(p, pkt->opts[i].buf.p, pkt->opts[i].buf.len); p += pkt->opts[i].buf.len; running_delta = pkt->opts[i].num; } opts_len = (p - buf) - 4; // number of bytes used by options if (pkt->payload.len > 0) { if (*buflen < 4 + 1 + pkt->payload.len + opts_len) return COAP_ERR_BUFFER_TOO_SMALL; buf[4 + opts_len] = 0xFF; // payload marker memcpy(buf+5 + opts_len, pkt->payload.p, pkt->payload.len); *buflen = opts_len + 5 + pkt->payload.len; } else *buflen = opts_len + 4; return 0; } void ICACHE_FLASH_ATTR coap_option_nibble(uint32_t value, uint8_t *nibble) { if (value<13) { *nibble = (0xFF & value); } else if (value<=0xFF+13) { *nibble = 13; } else if (value<=0xFFFF+269) { *nibble = 14; } } int ICACHE_FLASH_ATTR coap_make_response(coap_rw_buffer_t *scratch, coap_packet_t *pkt, const uint8_t *content, size_t content_len, uint8_t msgid_hi, uint8_t msgid_lo, const coap_buffer_t* tok, coap_responsecode_t rspcode, coap_content_type_t content_type) { pkt->hdr.ver = 0x01; pkt->hdr.t = COAP_TYPE_ACK; pkt->hdr.tkl = 0; pkt->hdr.code = rspcode; pkt->hdr.id[0] = msgid_hi; pkt->hdr.id[1] = msgid_lo; pkt->numopts = 1; // need token in response if (tok) { pkt->hdr.tkl = tok->len; pkt->tok = *tok; } // safe because 1 < MAXOPT pkt->opts[0].num = COAP_OPTION_CONTENT_FORMAT; pkt->opts[0].buf.p = scratch->p; if (scratch->len < 2) return COAP_ERR_BUFFER_TOO_SMALL; scratch->p[0] = ((uint16_t)content_type & 0xFF00) >> 8; scratch->p[1] = ((uint16_t)content_type & 0x00FF); pkt->opts[0].buf.len = 2; pkt->payload.p = content; pkt->payload.len = content_len; return 0; } // FIXME, if this looked in the table at the path before the method then // it could more easily return 405 errors int ICACHE_FLASH_ATTR coap_handle_req(coap_rw_buffer_t *scratch, const coap_packet_t *inpkt, coap_packet_t *outpkt) { const coap_option_t *opt; uint8_t count; int i; const coap_endpoint_t *ep = endpoints; while(NULL != ep->handler) { if (ep->method != inpkt->hdr.code) goto next; if (NULL != (opt = coap_findOptions(inpkt, COAP_OPTION_URI_PATH, &count))) { if (count != ep->path->count) goto next; for (i=0;ipath->elems[i])) goto next; if (0 != memcmp(ep->path->elems[i], opt[i].buf.p, opt[i].buf.len)) goto next; } // match! return ep->handler(scratch, inpkt, outpkt, inpkt->hdr.id[0], inpkt->hdr.id[1]); } next: ep++; } coap_make_response(scratch, outpkt, NULL, 0, inpkt->hdr.id[0], inpkt->hdr.id[1], &inpkt->tok, COAP_RSPCODE_NOT_FOUND, COAP_CONTENTTYPE_NONE); return 0; } void coap_setup(void) { } ",0 "is work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.activemq.artemis.jms.example; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; /** * A simple JMS Queue example that uses dual broker authentication mechanisms for SSL and non-SSL connections. */ public class SSLDualAuthenticationExample { public static void main(final String[] args) throws Exception { Connection producerConnection = null; Connection consumerConnection = null; InitialContext initialContext = null; try { // Step 1. Create an initial context to perform the JNDI lookup. initialContext = new InitialContext(); // Step 2. Perfom a lookup on the queue Queue queue = (Queue) initialContext.lookup(""queue/exampleQueue""); // Step 3. Perform a lookup on the producer's SSL Connection Factory ConnectionFactory producerConnectionFactory = (ConnectionFactory) initialContext.lookup(""SslConnectionFactory""); // Step 4. Perform a lookup on the consumer's Connection Factory ConnectionFactory consumerConnectionFactory = (ConnectionFactory) initialContext.lookup(""ConnectionFactory""); // Step 5.Create a JMS Connection for the producer producerConnection = producerConnectionFactory.createConnection(); // Step 6.Create a JMS Connection for the consumer consumerConnection = consumerConnectionFactory.createConnection(""consumer"", ""activemq""); // Step 7. Create a JMS Session for the producer Session producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); // Step 8. Create a JMS Session for the consumer Session consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); // Step 9. Create a JMS Message Producer MessageProducer producer = producerSession.createProducer(queue); // Step 10. Create a Text Message TextMessage message = producerSession.createTextMessage(""This is a text message""); System.out.println(""Sent message: "" + message.getText()); // Step 11. Send the Message producer.send(message); // Step 12. Create a JMS Message Consumer MessageConsumer messageConsumer = consumerSession.createConsumer(queue); // Step 13. Start the Connection consumerConnection.start(); // Step 14. Receive the message TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000); System.out.println(""Received message: "" + messageReceived.getText()); initialContext.close(); } finally { // Step 15. Be sure to close our JMS resources! if (initialContext != null) { initialContext.close(); } if (producerConnection != null) { producerConnection.close(); } if (consumerConnection != null) { consumerConnection.close(); } } } } ",0 "l.bind.annotation.XmlRootElement; @XmlRootElement(name = ""xml"") @XmlAccessorType(XmlAccessType.FIELD) public class MchBaseResult { protected String return_code; protected String return_msg; protected String appid; protected String mch_id; protected String nonce_str; protected String sign; protected String result_code; protected String err_code; protected String err_code_des; public String getReturn_code() { return return_code; } public void setReturn_code(String return_code) { this.return_code = return_code; } public String getReturn_msg() { return return_msg; } public void setReturn_msg(String return_msg) { this.return_msg = return_msg; } public String getAppid() { return appid; } public void setAppid(String appid) { this.appid = appid; } public String getMch_id() { return mch_id; } public void setMch_id(String mch_id) { this.mch_id = mch_id; } public String getNonce_str() { return nonce_str; } public void setNonce_str(String nonce_str) { this.nonce_str = nonce_str; } public String getSign() { return sign; } public void setSign(String sign) { this.sign = sign; } public String getResult_code() { return result_code; } public void setResult_code(String result_code) { this.result_code = result_code; } public String getErr_code() { return err_code; } public void setErr_code(String err_code) { this.err_code = err_code; } public String getErr_code_des() { return err_code_des; } public void setErr_code_des(String err_code_des) { this.err_code_des = err_code_des; } } ",0 "alData implements Callable{ private String para; public RealData(String para){ this.para=para; } @Override public String call() throws Exception { StringBuffer sb=new StringBuffer(); for (int i = 0; i < 10; i++) { sb.append(para); try { Thread.sleep(100); } catch (InterruptedException e) { } } return sb.toString(); } } ",0 "ight and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Monolog\Handler; use MongoDB\Driver\Manager; use Monolog\Test\TestCase; use Monolog\Formatter\NormalizerFormatter; class MongoDBHandlerTest extends TestCase { public function testConstructorShouldThrowExceptionForInvalidMongo() { $this->expectException(\InvalidArgumentException::class); new MongoDBHandler(new \stdClass, 'db', 'collection'); } public function testHandleWithLibraryClient() { if (!(class_exists('MongoDB\Client'))) { $this->markTestSkipped('mongodb/mongodb not installed'); } $mongodb = $this->getMockBuilder('MongoDB\Client') ->disableOriginalConstructor() ->getMock(); $collection = $this->getMockBuilder('MongoDB\Collection') ->disableOriginalConstructor() ->getMock(); $mongodb->expects($this->once()) ->method('selectCollection') ->with('db', 'collection') ->will($this->returnValue($collection)); $record = $this->getRecord(); $expected = $record; $expected['datetime'] = $record['datetime']->format(NormalizerFormatter::SIMPLE_DATE); $collection->expects($this->once()) ->method('insertOne') ->with($expected); $handler = new MongoDBHandler($mongodb, 'db', 'collection'); $handler->handle($record); } public function testHandleWithDriverManager() { if (!(class_exists('MongoDB\Driver\Manager'))) { $this->markTestSkipped('ext-mongodb not installed'); } /* This can become a unit test once ManagerInterface can be mocked. * See: https://jira.mongodb.org/browse/PHPC-378 */ $mongodb = new Manager('mongodb://localhost:27017'); $handler = new MongoDBHandler($mongodb, 'test', 'monolog'); $record = $this->getRecord(); try { $handler->handle($record); } catch (\RuntimeException $e) { $this->markTestSkipped('Could not connect to MongoDB server on mongodb://localhost:27017'); } } } ",0 "ts TensorFlowIf.DMAServer { public PcieDMAServer() { String parentDir = System.getenv(""GITDIR"") + ""/tfdma""; String ext = System.getProperty(""os.name"").equals(""Mac OS X"") ? "".dylib"" : "".so""; String libpath = String.format(""%s/%s%s"",parentDir,""src/main/cpp/dmaserver"",ext); Logger.info(""Loading DMA native library "" + libpath + "" ..""); try { System.load(libpath); } catch(Exception e) { Logger.error(""Unable to load native library %s: %s"".format( libpath, e.getMessage()),e); } } @Override public String setupChannel(String setupJson) { super.setupChannel(setupJson); return setupChannelN(setupJson); } @Override public String register(DMACallback callbackIf) { super.register(callbackIf); return registerN(callbackIf); } @Override public String prepareWrite(String configJson) { super.prepareWrite(configJson); return prepareWriteN(configJson); } @Override public DMAStructures.WriteResultStruct write(String configJson, byte[] dataPtr) { super.write(configJson, dataPtr); return writeN(configJson, dataPtr); } @Override public DMAStructures.WriteResultStruct completeWrite(String configJson) { super.completeWrite(configJson); return completeWriteN(configJson); } @Override public String prepareRead(String configJson) { super.prepareRead(configJson); return prepareReadN(configJson); } @Override public DMAStructures.ReadResultStruct read(String configJson) { super.read(configJson); return readN(configJson); } @Override public DMAStructures.ReadResultStruct completeRead(String configJson) { super.completeRead(configJson); return completeReadN(configJson); } @Override public String shutdownChannel(String shutdownJson) { super.shutdownChannel(shutdownJson); return shutdownChannelN(shutdownJson); } @Override public byte[] readLocal(byte[] dataPtr) { super.readLocal(dataPtr); return readLocalN(dataPtr); } native String setupChannelN(String setupJson); native String registerN(DMACallback callbackIf); native String prepareWriteN(String configJson); native DMAStructures.WriteResultStruct writeN(String configJson, byte[] dataPtr); native DMAStructures.WriteResultStruct completeWriteN(String configJson); native String prepareReadN(String configJson); native DMAStructures.ReadResultStruct readN(String configJson); native DMAStructures.ReadResultStruct completeReadN(String configJson); native String shutdownChannelN(String shutdownJson); native byte[] readLocalN(byte[] dataPtr); } ",0 "ses\MultisiteMigrationSystemAuthorization; if (! defined('ABSPATH')) { exit; } /** * This module allows a new site to be created in the network with a specified blog ID * * @class CreateBlogSpecificID * @version 1.0 * @package MULTISITE-Migration/Modules * @category Class * @author Emerson Maningo */ final class CreateBlogSpecificID { /** * Multisite migration property */ private $multisite_migration; /** * System authorization */ private $system_authorization; /** * Constructor * @param MultisiteMigration $MultisiteMigration */ public function __construct(MultisiteMigration $MultisiteMigration, MultisiteMigrationSystemAuthorization $system_authorization) { $this->multisite_migration = $MultisiteMigration; $this->system_authorization = $system_authorization; } /** * Get multisite migration * @return \MultisiteMigrationFramework\classes\MultisiteMigration * @compatible 5.6 */ public function getMultisiteMigration() { return $this->multisite_migration; } /** * Get system authorization * @return \MultisiteMigrationFramework\classes\MultisiteMigrationSystemAuthorization * @compatible 5.6 */ public function getSystemAuthorization() { return $this->system_authorization; } /** * Init hooks * @compatible 5.6 */ final public function initHooks() { if (! $this->getSystemAuthorization()->isUserAuthorized()) { return; } add_filter('query', array( $this, 'filterBlogIdToTargetBlogIdInQuery'), 0, 1); add_action('network_site_new_form', array( $this, 'addNewBlogIdForm')); } /** * Filter passed blog ID to target ID when conditions are meet * Hooked to `query` * @param string $query * @return void|string * @compatible 5.6 */ public function filterBlogIdToTargetBlogIdInQuery($query = '') { if (! $this->getSystemAuthorization()->isUserAuthorized()) { return $query; } if ($this->isInsertQueryForWpBlogs($query) && $this->validateChangeBlogIdRequest()) { $target_blogid = $this->validateChangeBlogIdRequest(); $dissected_query_array = $this->dissectQuery($query); if (! is_array($dissected_query_array) || empty($dissected_query_array)) { return $query; } $replaceables = array(); foreach ($dissected_query_array as $k => $v) { if (strpos($v, ""("") !== false) { $replaceables[] = $k; } } $count = count($replaceables); if (2 !== $count) { return $query; } foreach ($replaceables as $key_count => $key_to_update) { if (0 === $key_count && isset($dissected_query_array[ $key_to_update ])) { //Inject `blog_id` field $value_to_update = $dissected_query_array[ $key_to_update ]; $blogid_field_injected = str_replace(""("", ""(`blog_id`,"", $value_to_update); $dissected_query_array[ $key_to_update ] = $blogid_field_injected; } elseif (1 === $key_count && isset($dissected_query_array[ $key_to_update ])) { //Inject `blog_id` value $value_to_update = $dissected_query_array[ $key_to_update ]; $blogid_value_injected = str_replace(""("", ""($target_blogid,"", $value_to_update); $dissected_query_array[ $key_to_update ] = $blogid_value_injected; } } $query = implode("" "", $dissected_query_array); } return $query; } /** * Add new blog ID form in create site form * @compatible 5.6 */ public function addNewBlogIdForm() { ?>

getMultisiteMigration()->getSystemInitialization()->getTranslationDomain()), __('Optional', $this->getMultisiteMigration()->getSystemInitialization()->getTranslationDomain()) ); ?>

getMultisiteMigration()->getSystemInitialization()->getTranslationDomain()); ?>

getMultisiteMigration()->getSystemInitialization()->getTranslationDomain()); ?>

"" /> getPostedRequest(); if (! $post) { return $valid; } if (! isset($post['add-site'])) { return $valid; } if (! isset($post['multisite_migration_changeblogid_nonce']) || ! isset($post['multisite_migration_target_blog_id'])) { return $valid; } $nonce = $post['multisite_migration_changeblogid_nonce']; $blog_id = (int) $post['multisite_migration_target_blog_id']; /** * Validate nonce */ if (! wp_verify_nonce($nonce, 'multisite_migration_changeblogid_nonce') || ! $blog_id) { return $valid; } /** * Validate if blog is available */ $blogdetails = get_blog_details($blog_id); if (! $blogdetails) { //Blog is available $valid = $blog_id; } return $valid; } /** * Get posted request * @return mixed * @compatible 5.6 */ protected function getPostedRequest() { return filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING); } /** * Dissect query * @param string $query * @return array * @compatible 5.6 */ protected function dissectQuery($query = '') { $dissected_query_array = array(); if (! empty($query)) { $dissected_query_array = explode("" "", $query); } return $dissected_query_array; } /** * Analyze if the query is an INSERT statement to the `wp_blogs` table * @param string $query * @return boolean * @compatible 5.6 */ protected function isInsertQueryForWpBlogs($query = '') { $ret = false; $dissected_query_array = $this->dissectQuery($query); if (! isset($dissected_query_array[0])) { return $ret; } $test = strtolower($dissected_query_array[0]); if ('insert' !== $test) { return $ret; } $into_key = (int) array_search(strtolower('INTO'), array_map('strtolower', $dissected_query_array)); if (! $into_key) { return $ret; } global $wpdb; if (! isset($wpdb->blogs)) { return $ret; } $wpblog_table = $wpdb->blogs; $table_key = $into_key + 1; if (! isset($dissected_query_array[ $table_key ])) { return $ret; } $given = $dissected_query_array[ $table_key ]; $given = str_replace(array( '`', ""'"", '""' ), array( '','','' ), $given); if (strpos($wpblog_table, $given) !== false) { //Found $ret = true; } return $ret; } } ",0 "s CI_Model{ public function URT_SRC_errormsg_loginid($URT_SRC_source){ $URT_SRC_errorarray =array(); $USRC_arr_loginid =array(); $USRC_arr_uldid =array(); $URT_SRC_data_uld_tble=false; $URT_SRC_customrole_array=array(); $this->db->select(); $this->db->from('USER_LOGIN_DETAILS'); $row=$this->db->count_all_results(); if($row>0){ $URT_SRC_data_uld_tble=true; } $this->load->model('EILIB/Mdl_eilib_common_function'); $URT_SRC_errormsg_query = ""349,350,351,352,353,354,355,401,454,455,458,465""; $URT_SRC_errorarray=$this->Mdl_eilib_common_function->getErrorMessageList($URT_SRC_errormsg_query); if(($URT_SRC_source=='URT_SRC_radio_loginterminate')||($URT_SRC_source=='URT_SRC_radio_rejoin')){ if($URT_SRC_source=='URT_SRC_radio_loginterminate'){ $this->db->select(); $this->db->from('VW_ACCESS_RIGHTS_TERMINATE_LOGINID'); $this->db->where('URC_DATA!=""SUPER ADMIN""'); $this->db->order_by('ULD_LOGINID'); } else if($URT_SRC_source=='URT_SRC_radio_rejoin'){ $this->db->select(); $this->db->from('VW_ACCESS_RIGHTS_REJOIN_LOGINID'); $this->db->order_by('ULD_LOGINID'); } $URT_SRC_select_loginid=$this->db->get(); foreach($URT_SRC_select_loginid->result_array() as $row){ $USRC_arr_loginid[]=$row['ULD_LOGINID']; } } else if($URT_SRC_source=='URT_SRC_radio_optsrcupd'){ $this->db->select(); $this->db->from('VW_ACCESS_RIGHTS_REJOIN_LOGINID'); $this->db->order_by('ULD_LOGINID'); $URT_SRC_select_loginid=$this->db->get(); foreach($URT_SRC_select_loginid->result_array() as $row) { $USRC_arr_loginid[]=$row['ULD_LOGINID']; } } $this->db->select(); $this->db->from('ROLE_CREATION'); $this->db->order_by('RC_NAME'); $URT_SRC_select_customrole_menu=$this->db->get(); foreach($URT_SRC_select_customrole_menu->result_array() as $row){ $URT_SRC_customrole_array[]=$row[""RC_NAME""]; } $URT_SRC_result=(object)[""URT_SRC_obj_errmsg""=>$URT_SRC_errorarray,""URT_SRC_obj_loginid""=>$USRC_arr_loginid,""URT_SRC_obj_source""=>$URT_SRC_source,""URT_SRC_obj_flg_login""=>$URT_SRC_data_uld_tble,""URT_SRC_customerole""=>$URT_SRC_customrole_array]; return $URT_SRC_result; } public function URT_SRC_func_enddate($URT_SRC_lb_loginid,$URT_SRC_recdver,$URT_SRC_flag_srcupd,$URT_SRC_flg_reverlen){ if($URT_SRC_flag_srcupd=='URT_SRC_check_enddate'){ $this->db->select( 'UA_JOIN_DATE,UA_REASON,UA_END_DATE,UA_JOIN'); $this->db->from('USER_ACCESS UA'); $this->db->where(""UA.ULD_ID =(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_lb_loginid.""') AND UA.UA_REC_VER=(SELECT MAX(UA_REC_VER) FROM USER_ACCESS WHERE ULD_ID=UA.ULD_ID)""); } else if($URT_SRC_flag_srcupd=='URT_SRC_check_rejoindate'){ $this->db->select('UA_JOIN_DATE,UA_REASON,UA_END_DATE,UA_JOIN'); $this->db->from('USER_ACCESS UA'); $this->db->where(""UA.ULD_ID =(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_lb_loginid.""') AND UA.UA_REC_VER=(SELECT MAX(UA_REC_VER) FROM USER_ACCESS WHERE ULD_ID=UA.ULD_ID)""); } else if($URT_SRC_flag_srcupd=='URT_SRC_srcupd'){ $this->db->select( 'UA_JOIN_DATE,UA_REASON,UA_END_DATE,UA_JOIN'); $this->db->from('USER_ACCESS UA'); $this->db->where(""UA.ULD_ID =(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_lb_loginid.""') AND UA.UA_REC_VER="".$URT_SRC_recdver.""""); } $URT_SRC_select_enddate=$this->db->get(); foreach($URT_SRC_select_enddate->result_array() as $row){ $URT_SRC_joindate=$row[""UA_JOIN_DATE""]; $URT_SRC_reason=$row[""UA_REASON""]; $URT_SRC_enddate=$row[""UA_END_DATE""]; $URT_SRC_join=$row[""UA_JOIN""]; } if($URT_SRC_flg_reverlen=='URT_SRC_recvrsion_more'){ $URT_SRC_recdver=($URT_SRC_recdver)+1; $this->db->select( 'UA_JOIN_DATE'); $this->db->from('USER_ACCESS UA'); $this->db->where(""UA.ULD_ID =(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_lb_loginid.""') AND UA.UA_REC_VER="".$URT_SRC_recdver.""""); $URT_SRC_select_next_jdate=$this->db->get(); $row_count=$this->db->count_all_results(); if($row_count>0){ foreach($URT_SRC_select_next_jdate->result_array() as $row){ $URT_SRC_next_jdate=$row['UA_JOIN_DATE']; } } else $URT_SRC_next_jdate='URT_SRC_nomore_recver'; $URT_SRC_result=(object)[""URT_SRC_obj_next_jdate""=>$URT_SRC_next_jdate,""URT_SRC_obj_joindate""=>$URT_SRC_joindate,""URT_SRC_obj_endate""=>$URT_SRC_enddate,""URT_SRC_obj_reason""=>$URT_SRC_reason,""URT_SRC_obj_srcupd""=>$URT_SRC_flag_srcupd]; } else $URT_SRC_result=(object)[""URT_SRC_obj_joindate""=>$URT_SRC_joindate,""URT_SRC_obj_endate""=>$URT_SRC_enddate,""URT_SRC_obj_reason""=>$URT_SRC_reason,""URT_SRC_obj_srcupd""=>$URT_SRC_flag_srcupd]; return $URT_SRC_result; } /*-------------------------------------------FUNCTION TO GET LOGIN ID REC VER-----------------------------*/ function URT_SRC_func_recordversion($URT_SRC_lb_loginid_rec,$URT_SRC_flag_recver,$URT_SRC_recvrsion_one) { $this->db->select( 'UA_REC_VER'); $this->db->from('USER_ACCESS UA'); $this->db->where(""ULD_ID =(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_lb_loginid_rec.""') AND UA_TERMINATE='X'""); $URT_SRC_select_rec=$this->db->get(); $URT_SRC_recordversion=array(); foreach($URT_SRC_select_rec->result_array() as $row){ $URT_SRC_recordversion[]=$row['UA_REC_VER']; } if(count($URT_SRC_recordversion)==1){ $URT_SRC_upd_val=$this->URT_SRC_func_enddate($URT_SRC_lb_loginid_rec,$URT_SRC_recordversion[0],'URT_SRC_srcupd','URT_SRC_recvrsion_one'); $URT_SRC_upd_val=(object)[""URT_SRC_obj_endate""=>$URT_SRC_upd_val->URT_SRC_obj_endate,""URT_SRC_obj_reason""=>$URT_SRC_upd_val->URT_SRC_obj_reason,""URT_SRC_obj_srcupd""=>$URT_SRC_upd_val->URT_SRC_obj_srcupd,""URT_SRC_obj_recordversion""=>$URT_SRC_recordversion,""URT_SRC_obj_joindate""=>$URT_SRC_upd_val->URT_SRC_obj_joindate]; } else{ $URT_SRC_upd_val=(object)[""URT_SRC_obj_recordversion""=>$URT_SRC_recordversion,""URT_SRC_obj_srcupd""=>$URT_SRC_flag_recver]; } return $URT_SRC_upd_val; } /*-------------------------------------------FUNCTION TO TERMINATE LOGIN DETAILS-----------------------------*/ function URT_SRC_func_terminate($URT_SRC_emailid,$URT_SRC_enddate,$URT_SRC_reason,$URT_SRC_flg_terminate,$UserStamp,$service){ try{ $URSRC_sharedocflag=0;$URSRC_sharecalflag=0;$URSRC_sharesiteflag=0; $URT_SRC_enddate = date('Y-m-d',strtotime($URT_SRC_enddate)); // URT_SRC_conn.setAutoCommit(false); $this->db->select('UA_ID,UA_REASON'); $this->db->from('USER_ACCESS'); $this->db->where("" ULD_ID=(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_emailid.""') AND UA_REC_VER=(SELECT MAX(UA_REC_VER) FROM USER_ACCESS where ULD_ID=(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_emailid.""'))""); $URT_SRC_select_terminate=$this->db->get(); foreach($URT_SRC_select_terminate->result_array() as $row) { $URT_SRC_userpro_id=$row['UA_ID']; $URT_SRC_old_reason=$row['UA_REASON']; } $this->db->query('SET AUTOCOMMIT=0'); $this->db->query('START TRANSACTION'); $URT_SRC_insert_terminate =""CALL SP_LOGIN_TERMINATE_SAVE('"".$URT_SRC_emailid.""','"".$URT_SRC_enddate.""','"".$URT_SRC_reason.""','"".$UserStamp.""',@TERM_FLAG,@TEMPTBL_OUT_LOGINID,@SAVE_POINT)""; $URT_SRC_sucess_flag=0; $this->db->query($URT_SRC_insert_terminate); $URT_SRC_flag_lgnterminateselect=""SELECT @TERM_FLAG as TERM_FLAG ,@TEMPTBL_OUT_LOGINID as TEMPTBL_OUT_LOGINID ,@SAVE_POINT as SAVE_POINT""; $URT_SRC_flag_lgnterminaters=$this->db->query($URT_SRC_flag_lgnterminateselect); $URT_SRC_sucess_flag=$URT_SRC_flag_lgnterminaters->row()->TERM_FLAG; $URT_SRC_terminatetemplogidtbl=$URT_SRC_flag_lgnterminaters->row()->TEMPTBL_OUT_LOGINID; $save_point=$URT_SRC_flag_lgnterminaters->row()->SAVE_POINT; if($URT_SRC_sucess_flag==1) { $this->load->model('EILIB/Mdl_eilib_common_function'); /*---------------------------------UNSHARE THE FILE & FOLDER---------------------------------------------*/ $URSRC_sharedocflag=$this->Mdl_eilib_common_function->URSRC_unshareDocuments("""",$URT_SRC_emailid,$service); if($URSRC_sharedocflag==1){ //********************** UNSHARE CALENDAR $URSRC_sharecalflag=$this->Mdl_eilib_common_function->USRC_shareUnSharecalender($URT_SRC_emailid,'none',$service); if($URSRC_sharecalflag==0){ $this->db->trans_savepoint_rollback($save_point); // $this->db->trans_rollback(); $this->Mdl_eilib_common_function->URSRC_shareDocuments("""",$URT_SRC_emailid,$service); } } else{ $this->db->trans_savepoint_rollback($save_point); // $this->db->trans_rollback(); $this->Mdl_eilib_common_function->URSRC_shareDocuments("""",$URT_SRC_emailid,$service); } $this->db->trans_savepoint_release($save_point) ; } else{ $this->db->trans_savepoint_rollback($save_point); } $URT_SRC_success_flag=array(); $URT_SRC_success_flag=[$URT_SRC_flg_terminate,$URT_SRC_sucess_flag,$URSRC_sharedocflag,$URSRC_sharecalflag]; // $this->db->trans_commit(); if($URT_SRC_terminatetemplogidtbl!=null&&$URT_SRC_terminatetemplogidtbl!='undefined'){ $drop_query = ""DROP TABLE "".$URT_SRC_terminatetemplogidtbl; $this->db->query($drop_query); } return $URT_SRC_success_flag; }catch(Exception $e) { $this->db->trans_savepoint_rollback($save_point); // $this->db->trans_rollback(); // Logger.log(""SCRIPT EXCEPTION:""+err) // URT_SRC_conn.rollback(); // if(URT_SRC_terminatetemplogidtbl!=null&&URT_SRC_terminatetemplogidtbl!=undefined){ // eilib.DropTempTable(URT_SRC_conn,URT_SRC_terminatetemplogidtbl);} // //********************** RESHARE CALENDAR // if(URSRC_sharecalflag==1){ // USRC_shareUnSharecalender(URT_SRC_conn,URT_SRC_emailid,'writer'); // } // //********************** RESHARE SITE // if(sitermoveflag==1){ // URSRC_addViewer(URT_SRC_conn,URT_SRC_emailid);} // //************RESHARE DOCS // if(URSRC_sharedocflag==1){ // URSRC_shareDocuments(URT_SRC_conn,"""",URT_SRC_emailid)}; // URT_SRC_conn.commit(); // URT_SRC_conn.close(); // return Logger.getLog(); } } /*-------------------------------------------FUNCTION TO UPDATE LOGIN DETAILS-----------------------------*/ function URT_SRC_func_update($URT_SRC_upd_loginid,$URT_SRC_upd_recver,$URT_SRC_upd_edate,$URT_SRC_upd_reason,$URT_SRC_flg_updation,$UserStamp) { $URT_SRC_upd_enddate = date('Y-m-d',strtotime($URT_SRC_upd_edate)); $URT_SRC_sucess_flag=0; if ($URT_SRC_upd_recver==null||$URT_SRC_upd_recver==""SELECT"") { $URT_SRC_update_terminate ="" UPDATE USER_ACCESS SET UA_END_DATE='"".$URT_SRC_upd_enddate.""',UA_REASON='"".$URT_SRC_upd_reason.""',UA_USERSTAMP='"".$UserStamp.""' WHERE ULD_ID=(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_upd_loginid.""') AND UA_REC_VER=1""; } else { $URT_SRC_update_terminate ="" UPDATE USER_ACCESS SET UA_END_DATE='"".$URT_SRC_upd_enddate.""',UA_REASON='"".$URT_SRC_upd_reason.""',UA_USERSTAMP='"".$UserStamp.""' WHERE ULD_ID=(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_upd_loginid.""') AND UA_REC_VER="".$URT_SRC_upd_recver.""""; } $this->db->query($URT_SRC_update_terminate); if ($this->db->affected_rows() > 0) { $URT_SRC_sucess_flag=1; } else { $URT_SRC_sucess_flag=0; } $URT_SRC_success_flag=array(); $URT_SRC_success_flag=[$URT_SRC_flg_updation,$URT_SRC_sucess_flag]; return $URT_SRC_success_flag; } // /*-------------------------------------------FUNCTION TO REJOIN LOGIN DETAILS-----------------------------*/ function URT_SRC_func_rejoin($URT_SRC_upd_emailid,$URT_SRC_upd_rejoindate,$URT_SRC_upd_customrole,$URT_SRC_flg_rejoin,$UserStamp,$service) { try{ $URSRC_sharedocflag=0;$URSRC_sharecalflag=0;$URSRC_sharesiteflag=0; $URT_SRC_temptable=''; // URT_SRC_conn.setAutoCommit(false); $URT_SRC_upd_rejoindate = date('Y-m-d',strtotime($URT_SRC_upd_rejoindate)); $URT_SRC_upd_customrole=str_replace(""_"","" "",$URT_SRC_upd_customrole); $URT_SRC_select_rejoin_id=""SELECT UA_ID,RC_ID,MAX(UA.UA_REC_VER) as UA_REC_VER,ULD_ID FROM USER_ACCESS UA WHERE UA.ULD_ID =(SELECT ULD_ID FROM USER_LOGIN_DETAILS WHERE ULD_LOGINID='"".$URT_SRC_upd_emailid.""')""; $URT_SRC_rs_rejoin_id=$this->db->query($URT_SRC_select_rejoin_id); foreach($URT_SRC_rs_rejoin_id->result_array() as $row) { $URT_SRC_autoinc_id=$row['UA_ID']; $URT_SRC_userpro_maxrec=$row['UA_REC_VER']; $URT_SRC_userpro_uldid=$row['ULD_ID']; } $URT_SRC_select_rc_id=""SELECT RC_ID FROM ROLE_CREATION where RC_NAME='"".$URT_SRC_upd_customrole.""'""; $URT_SRC_rs_rc_id=$this->db->query($URT_SRC_select_rc_id); foreach($URT_SRC_rs_rc_id->result_array() as $row){ $URT_SRC_rc_id=$row['RC_ID']; } $this->db->query('SET AUTOCOMMIT=0'); $this->db->query('START TRANSACTION'); $URT_SRC_select_rejoin=""CALL SP_LOGIN_CREATION_INSERT('"".$URT_SRC_upd_emailid.""','"".$URT_SRC_upd_customrole.""','"".$URT_SRC_upd_rejoindate.""','"".$UserStamp.""',@TEMPTABLE,@LOGIN_CREATIONFLAG,@SAVE_POINT)""; $this->db->query($URT_SRC_select_rejoin); $URT_SRC_flag_rejoinselect=""SELECT @TEMPTABLE as TEMPTABLE,@LOGIN_CREATIONFLAG as REJOIN_FLAG,@SAVE_POINT as SAVE_POINT""; $URT_SRC_flag_rejoincrers=$this->db->query($URT_SRC_flag_rejoinselect); $URT_SRC_flag_lgncreinsert=$URT_SRC_flag_rejoincrers->row()->REJOIN_FLAG; $URT_SRC_temptable=$URT_SRC_flag_rejoincrers->row()->TEMPTABLE; $save_point=$URT_SRC_flag_rejoincrers->row()->SAVE_POINT; if($URT_SRC_flag_lgncreinsert==1){ $this->load->model('EILIB/Mdl_eilib_common_function'); $URSRC_sharedocflag= $this->Mdl_eilib_common_function->URSRC_shareDocuments($URT_SRC_upd_customrole,$URT_SRC_upd_emailid,$service); if($URSRC_sharedocflag==1){ //URSRC_sharesiteflag=URSRC_addViewer(URSRC_conn,URSRC_loginid) $URSRC_sharecalflag=$this->Mdl_eilib_common_function->USRC_shareUnSharecalender($URT_SRC_upd_emailid,'writer',$service); if($URSRC_sharecalflag==0){ $this->db->trans_savepoint_rollback($save_point); // $this->db->trans_rollback(); $this->Mdl_eilib_common_function->URSRC_unshareDocuments($URT_SRC_upd_customrole,$URT_SRC_upd_emailid,$service); } } else{ $this->db->trans_savepoint_rollback($save_point); // $this->db->trans_rollback(); $this->Mdl_eilib_common_function->URSRC_unshareDocuments($URT_SRC_upd_customrole,$URT_SRC_upd_emailid,$service); } $this->db->trans_savepoint_release($save_point) ; } else{ $this->db->trans_savepoint_rollback($save_point); } if($URT_SRC_temptable!='null'){ $drop_query = ""DROP TABLE "".$URT_SRC_temptable; $this->db->query($drop_query); } // $this->db->trans_commit(); $URT_SRC_success_flag=array(); $URT_SRC_success_flag=[$URT_SRC_flg_rejoin,$URT_SRC_flag_lgncreinsert,$URSRC_sharedocflag,$URSRC_sharecalflag]; return $URT_SRC_success_flag; }catch(Exception $e) { // Logger.log(""SCRIPT EXCEPTION:""+err) $this->db->trans_savepoint_rollback($save_point); // $this->db->trans_rollback(); // if(URT_SRC_temptable!='null'){ // eilib.DropTempTable(URT_SRC_conn,URT_SRC_temptable) // } // if(URSRC_sharedocflag==1) // { // URSRC_unshareDocuments(URT_SRC_conn,URT_SRC_upd_customrole,URT_SRC_upd_emailid) // } // if(URSRC_sharesiteflag==1) // { // URSRC_removeViewer(URT_SRC_conn,URT_SRC_upd_emailid) // } // if(URSRC_sharecalflag==1) // { // USRC_shareUnSharecalender(URT_SRC_conn,URT_SRC_upd_emailid,'none'); // } // URT_SRC_conn.commit(); // URT_SRC_conn.close(); // return Logger.getLog(); // } } } } ",0 "e used for academic purposes (teaching, scientific * research). Any redistribution or commercialization of the software program * and documentation (or any part thereof) requires prior written permission of * the JKU. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * This software program and documentation are copyrighted by Johannes Kepler * University Linz, Austria (the JKU). The software program and documentation * are supplied AS IS, without any accompanying services from the JKU. The JKU * does not warrant that the operation of the program will be uninterrupted or * error-free. The end-user understands that the program was developed for * research purposes and is advised not to rely exclusively on the program for * any reason. * * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE * AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHOR * SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * THE SOFTWARE PROVIDED HEREUNDER IS ON AN ""AS IS"" BASIS, AND THE AUTHOR HAS * NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, * OR MODIFICATIONS. */ /* * ArtifactIsNotACollectionException.java created on 13.03.2013 * * (c) alexander noehrer */ package at.jku.sea.cloud.exceptions; /** * @author alexander noehrer */ public class ArtifactIsNotACollectionException extends RuntimeException { private static final long serialVersionUID = 1L; public ArtifactIsNotACollectionException(final long version, final long id) { super(""artifact (id="" + id + "", version="" + version + "") is not a collection""); } } ",0 "enerated by javadoc (1.8.0_25) on Wed Dec 17 18:36:02 CST 2014 --> 程序包 org.kymjs.kjframe.database的使用
  • 上一个
  • 下一个

程序包的使用
org.kymjs.kjframe.database

  • 上一个
  • 下一个
",0 "javadoc (build 1.6.0_26) on Sun Dec 22 15:55:34 GMT 2013 --> NVDeepTexture3D (LWJGL API)
Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.lwjgl.opengl
Class NVDeepTexture3D

java.lang.Object
  org.lwjgl.opengl.NVDeepTexture3D

public final class NVDeepTexture3D
extends java.lang.Object


Field Summary
static int GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV
          Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv:
static int GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV
          Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv:
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV

public static final int GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV
Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv:

See Also:
Constant Field Values

GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV

public static final int GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV
Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv:

See Also:
Constant Field Values

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2009 lwjgl.org. All Rights Reserved. ",0 "liance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an ""AS * IS"" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is the Netscape security libraries. * * The Initial Developer of the Original Code is Netscape * Communications Corporation. Portions created by Netscape are * Copyright (C) 1994-2000 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License Version 2 or later (the * ""GPL""), in which case the provisions of the GPL are applicable * instead of those above. If you wish to allow use of your * version of this file only under the terms of the GPL and not to * allow others to use your version of this file under the MPL, * indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by * the GPL. If you do not delete the provisions above, a recipient * may use your version of this file under either the MPL or the * GPL. */ #ifndef NSSBASET_H #define NSSBASET_H #ifdef DEBUG static const char NSSBASET_CVS_ID[] = ""@(#) $RCSfile: nssbaset.h,v $ $Revision: 1.4 $ $Date: 2001/11/08 00:14:37 $ $Name: NSS_3_9_BRANCH $""; #endif /* DEBUG */ /* * nssbaset.h * * This file contains the most low-level, fundamental public types. */ #include ""nspr.h"" #include ""nssilock.h"" /* * NSS_EXTERN, NSS_IMPLEMENT, NSS_EXTERN_DATA, NSS_IMPLEMENT_DATA * * NSS has its own versions of these NSPR macros, in a form which * does not confuse ctags and other related utilities. NSPR * defines these macros to take the type as an argument, because * of a requirement to support win16 dlls. We do not have that * requirement, so we can drop that restriction. */ #define DUMMY /* dummy */ #define NSS_EXTERN PR_EXTERN(DUMMY) #define NSS_IMPLEMENT PR_IMPLEMENT(DUMMY) #define NSS_EXTERN_DATA PR_EXTERN_DATA(DUMMY) #define NSS_IMPLEMENT_DATA PR_IMPLEMENT_DATA(DUMMY) PR_BEGIN_EXTERN_C /* * NSSError * * Calls to NSS routines may result in one or more errors being placed * on the calling thread's ""error stack."" Every possible error that * may be returned from a function is declared where the function is * prototyped. All errors are of the following type. */ typedef PRInt32 NSSError; /* * NSSArena * * Arenas are logical sets of heap memory, from which memory may be * allocated. When an arena is destroyed, all memory allocated within * that arena is implicitly freed. These arenas are thread-safe: * an arena pointer may be used by multiple threads simultaneously. * However, as they are not backed by shared memory, they may only be * used within one process. */ struct NSSArenaStr; typedef struct NSSArenaStr NSSArena; /* * NSSItem * * This is the basic type used to refer to an unconstrained datum of * arbitrary size. */ struct NSSItemStr { void *data; PRUint32 size; }; typedef struct NSSItemStr NSSItem; /* * NSSBER * * Data packed according to the Basic Encoding Rules of ASN.1. */ typedef NSSItem NSSBER; /* * NSSDER * * Data packed according to the Distinguished Encoding Rules of ASN.1; * this form is also known as the Canonical Encoding Rules form (CER). */ typedef NSSBER NSSDER; /* * NSSBitString * * Some ASN.1 types use ""bit strings,"" which are passed around as * octet strings but whose length is counted in bits. We use this * typedef of NSSItem to point out the occasions when the length * is counted in bits, not octets. */ typedef NSSItem NSSBitString; /* * NSSUTF8 * * Character strings encoded in UTF-8, as defined by RFC 2279. */ typedef char NSSUTF8; /* * NSSASCII7 * * Character strings guaranteed to be 7-bit ASCII. */ typedef char NSSASCII7; PR_END_EXTERN_C #endif /* NSSBASET_H */ ",0 "enerated by javadoc (1.8.0_162) on Sat Apr 25 18:50:04 PDT 2020 --> Uses of Class com.fasterxml.jackson.datatype.jdk8.IntStreamSerializer (Jackson datatype: jdk8 2.11.0 API)
  • Prev
  • Next

Uses of Class
com.fasterxml.jackson.datatype.jdk8.IntStreamSerializer

  • Prev
  • Next

Copyright © 2020 FasterXML. All rights reserved.

",0 "ero * @copyright 2010 The PHPFrame Group * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @link http://github.com/PHPFrame/PHPFrame */ /** * Persistent Object Collection Class * * @category PHPFrame * @package Mapper * @author Lupo Montero * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @link http://github.com/PHPFrame/PHPFrame * @since 1.0 */ class PHPFrame_PersistentObjectCollection extends PHPFrame_Collection { /** * A domain factory object used to create objects in collection * * @var PHPFrame_PersistentObjectFactory */ private $_obj_fact; /** * Raw array used to generate persistent objects * * @var array */ private $_raw; /** * Limit of entries per page * * @var int */ private $_limit; /** * Position at which the current page starts * * @var int */ private $_limitstart; /** * The total number of elements in the collection (this will normally be a * subset determined by pagination parameters) * * @var int */ private $_total_subset; /** * The total number of elements in the storage media * * @var int */ private $_total_superset; /** * Internal array pointer * * @var int */ private $_pointer = 0; /** * Storage array used to manage the collection's objects * * @var array; */ private $_objects = array(); /** * Constructor * * @param array $raw [Optional] Array * containig the raw * collection data. * @param PHPFrame_PersistentObjectFactory $obj_factory [Optional] Instance * of persistence object * factory. * @param int $total [Optional] The total * number of records in * the superset. * @param int $limit [Optional] The number * of records the current * subset is lmited to. * Default value is '-1', * which means there is * no limit, so we will * get all the records. * @param int $limitstart [Optional] The entry * number from which to * start the subset. * If ommited default * value '0' will be * used, meaning that * we start from the * first page of results. * * @return void * @since 1.0 */ public function __construct( array $raw=null, PHPFrame_PersistentObjectFactory $obj_factory=null, $total=null, $limit=-1, $limitstart=0 ) { if (!is_null($raw) && !is_null($obj_factory)) { // If the raw array is only one level of depth we assume it is // only one element and we wrap it in an array to make is a // collection of a single entry $array_obj = new PHPFrame_Array($raw); if ($array_obj->depth() == 1) { $raw = array($raw); } $this->_raw = $raw; $this->_total_subset = count($raw); } $this->_obj_fact = $obj_factory; $this->_limit = (int) $limit; $this->_limitstart = (int) $limitstart; if (!is_null($total)) { $this->_total_superset = (int) $total; } else { $this->_total_superset = $this->_total_subset; } } /** * Get persistent object at given key * * @param string $key The key of the element to get. * * @return PHPFrame_PersistentObject * @since 1.0 */ public function getElement($key) { if ($key >= $this->count() || $key < 0) { return null; } if (isset($this->_objects[$key])) { return $this->_objects[$key]; } if (isset($this->_raw[$key])) { $this->_objects[$key] = $this->_obj_fact->createObject( $this->_raw[$key] ); return $this->_objects[$key]; } } /** * Add persistent object to the collection * * @param PHPFrame_PersistentObject $obj An instance of a persistent object * to add to the collection. * * @return void * @since 1.0 */ public function addElement(PHPFrame_PersistentObject $obj) { if (in_array($obj, $this->_objects)) { return; } $this->_objects[$this->_total_subset++] = $obj; } /** * Remove persistent object from the collection * * @param PHPFrame_PersistentObject $obj An instance of a persistent object * to remove from the collection. * * @return void * @since 1.0 */ public function removeElement(PHPFrame_PersistentObject $obj) { if (in_array($obj, $this->_objects)) { $keys = array_keys($this->_objects, $obj); unset($this->_objects[$keys[0]]); } $updated_raw = array(); foreach ($this->_raw as $raw_item) { if (isset($raw_item[""id""]) && $raw_item[""id""] == $obj->id()) { continue; } $updated_raw[] = $raw_item; } $this->_raw = $updated_raw; $this->_total_subset--; $this->_total_superset--; } /** * Get limit * * @return int * @see PHPFrame/Base/PHPFrame_Collection#getLimit() * @since 1.0 */ public function getLimit() { return $this->_limit; } /** * Get limitstart. * * @return int * @see PHPFrame/Base/PHPFrame_Collection#getLimitstart() * @since 1.0 */ public function getLimitstart() { return $this->_limitstart; } /** * Get total records in superset. * * @return int * @see PHPFrame/Base/PHPFrame_Collection#getTotal() * @since 1.0 */ public function getTotal() { return $this->_total_superset; } /** * Implementation of Iterator::current() * * @return PHPFrame_PersistentObject * @since 1.0 */ public function current() { return $this->getElement($this->key()); } /** * Implementation of Iterator::next() * * @return void * @since 1.0 */ public function next() { $this->_pointer++; } /** * Implementation of Iterator::key() * * @return int * @since 1.0 */ public function key() { return $this->_pointer; } /** * Implementation of Iterator::valid() * * @return bool * @since 1.0 */ public function valid() { return ($this->key() < $this->count()); } /** * Implementation of Iterator::rewind() * * @return void * @since 1.0 */ public function rewind() { $this->_pointer = 0; } /** * Implementation of the Countable interface. It returns the number of * objects in the current subset. * * @return int * @since 1.0 */ public function count() { return $this->_total_subset; } } ",0 " | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2002 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Authors: Richard Heyes | // +----------------------------------------------------------------------+ /** * * Raw mime encoding class * * What is it? * This class enables you to manipulate and build * a mime email from the ground up. * * Why use this instead of mime.php? * mime.php is a userfriendly api to this class for * people who aren't interested in the internals of * mime mail. This class however allows full control * over the email. * * Eg. * * // Since multipart/mixed has no real body, (the body is * // the subpart), we set the body argument to blank. * * $params['content_type'] = 'multipart/mixed'; * $email = new Mail_mimePart('', $params); * * // Here we add a text part to the multipart we have * // already. Assume $body contains plain text. * * $params['content_type'] = 'text/plain'; * $params['encoding'] = '7bit'; * $text = $email->addSubPart($body, $params); * * // Now add an attachment. Assume $attach is * the contents of the attachment * * $params['content_type'] = 'application/zip'; * $params['encoding'] = 'base64'; * $params['disposition'] = 'attachment'; * $params['dfilename'] = 'example.zip'; * $attach =& $email->addSubPart($body, $params); * * // Now build the email. Note that the encode * // function returns an associative array containing two * // elements, body and headers. You will need to add extra * // headers, (eg. Mime-Version) before sending. * * $email = $message->encode(); * $email['headers'][] = 'Mime-Version: 1.0'; * * * Further examples are available at http://www.phpguru.org * * TODO: * - Set encode() to return the $obj->encoded if encode() * has already been run. Unless a flag is passed to specifically * re-build the message. * * @author Richard Heyes * @version $Revision: 1.1 $ * @package Mail */ class Mail_mimePart { /** * The encoding type of this part * @var string */ public $_encoding; /** * An array of subparts * @var array */ public $_subparts; /** * The output of this part after being built * @var string */ public $_encoded; /** * Headers for this part * @var array */ public $_headers; /** * The body of this part (not encoded) * @var string */ public $_body; /** * Constructor. * * Sets up the object. * * @param $body - The body of the mime part if any. * @param $params - An associative array of parameters: * content_type - The content type for this part eg multipart/mixed * encoding - The encoding to use, 7bit, 8bit, base64, or quoted-printable * cid - Content ID to apply * disposition - Content disposition, inline or attachment * dfilename - Optional filename parameter for content disposition * description - Content description * charset - Character set to use * @access public */ public function Mail_mimePart($body = '', $params = array()) { if (!defined('MAIL_MIMEPART_CRLF')) { define('MAIL_MIMEPART_CRLF', defined('MAIL_MIME_CRLF') ? MAIL_MIME_CRLF : ""\r\n"", TRUE); } foreach ($params as $key => $value) { switch ($key) { case 'content_type': $headers['Content-Type'] = $value . (isset($charset) ? '; charset=""' . $charset . '""' : ''); break; case 'encoding': $this->_encoding = $value; $headers['Content-Transfer-Encoding'] = $value; break; case 'cid': $headers['Content-ID'] = '<' . $value . '>'; break; case 'disposition': $headers['Content-Disposition'] = $value . (isset($dfilename) ? '; filename=""' . $dfilename . '""' : ''); break; case 'dfilename': if (isset($headers['Content-Disposition'])) { $headers['Content-Disposition'] .= '; filename=""' . $value . '""'; } else { $dfilename = $value; } break; case 'description': $headers['Content-Description'] = $value; break; case 'charset': if (isset($headers['Content-Type'])) { $headers['Content-Type'] .= '; charset=""' . $value . '""'; } else { $charset = $value; } break; } } // Default content-type if (!isset($headers['Content-Type'])) { $headers['Content-Type'] = 'text/plain'; } //Default encoding if (!isset($this->_encoding)) { $this->_encoding = '7bit'; } // Assign stuff to member variables $this->_encoded = array(); $this->_headers = $headers; $this->_body = $body; } /** * encode() * * Encodes and returns the email. Also stores * it in the encoded member variable * * @return An associative array containing two elements, * body and headers. The headers element is itself * an indexed array. * @access public */ public function encode() { $encoded =& $this->_encoded; if (!empty($this->_subparts)) { srand((double)microtime()*1000000); $boundary = '=_' . md5(uniqid(rand()) . microtime()); $this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . ""\t"" . 'boundary=""' . $boundary . '""'; // Add body parts to $subparts for ($i = 0; $i < count($this->_subparts); $i++) { $headers = array(); $tmp = $this->_subparts[$i]->encode(); foreach ($tmp['headers'] as $key => $value) { $headers[] = $key . ': ' . $value; } $subparts[] = implode(MAIL_MIMEPART_CRLF, $headers) . MAIL_MIMEPART_CRLF . MAIL_MIMEPART_CRLF . $tmp['body']; } $encoded['body'] = '--' . $boundary . MAIL_MIMEPART_CRLF . implode('--' . $boundary . MAIL_MIMEPART_CRLF, $subparts) . '--' . $boundary.'--' . MAIL_MIMEPART_CRLF; } else { $encoded['body'] = $this->_getEncodedData($this->_body, $this->_encoding) . MAIL_MIMEPART_CRLF; } // Add headers to $encoded $encoded['headers'] =& $this->_headers; return $encoded; } /** * &addSubPart() * * Adds a subpart to current mime part and returns * a reference to it * * @param $body The body of the subpart, if any. * @param $params The parameters for the subpart, same * as the $params argument for constructor. * @return A reference to the part you just added. It is * crucial if using multipart/* in your subparts that * you use =& in your script when calling this function, * otherwise you will not be able to add further subparts. * @access public */ function &addSubPart($body, $params) { $this->_subparts[] = new Mail_mimePart($body, $params); return $this->_subparts[count($this->_subparts) - 1]; } /** * _getEncodedData() * * Returns encoded data based upon encoding passed to it * * @param $data The data to encode. * @param $encoding The encoding type to use, 7bit, base64, * or quoted-printable. * @access private */ public function _getEncodedData($data, $encoding) { switch ($encoding) { case '8bit': case '7bit': return $data; break; case 'quoted-printable': return $this->_quotedPrintableEncode($data); break; case 'base64': return rtrim(chunk_split(base64_encode($data), 76, MAIL_MIMEPART_CRLF)); break; default: return $data; } } /** * quoteadPrintableEncode() * * Encodes data to quoted-printable standard. * * @param $input The data to encode * @param $line_max Optional max line length. Should * not be more than 76 chars * * @access private */ public function _quotedPrintableEncode($input , $line_max = 76) { $lines = preg_split(""/\r?\n/"", $input); $eol = MAIL_MIMEPART_CRLF; $escape = '='; $output = ''; while(list(, $line) = each($lines)){ $linlen = strlen($line); $newline = ''; for ($i = 0; $i < $linlen; $i++) { $char = substr($line, $i, 1); $dec = ord($char); if (($dec == 32) AND ($i == ($linlen - 1))){ // convert space at eol only $char = '=20'; } elseif($dec == 9) { ; // Do nothing if a tab. } elseif(($dec == 61) OR ($dec < 32 ) OR ($dec > 126)) { $char = $escape . strtoupper(sprintf('%02s', dechex($dec))); } if ((strlen($newline) + strlen($char)) >= $line_max) { // MAIL_MIMEPART_CRLF is not counted $output .= $newline . $escape . $eol; // soft line break; "" =\r\n"" is okay $newline = ''; } $newline .= $char; } // end of for $output .= $newline . $eol; } $output = substr($output, 0, -1 * strlen($eol)); // Don't want last crlf return $output; } } // End of class ",0 "poses. * */ public final static int OFF = 0; public final static int ERROR = 1; public final static int INFO = 2; public final static int VERBOSE = 3; public final static int DEBUG = 4; private String _classname = """"; private boolean _verbose = false; private boolean _error = false; private boolean _info = false; private boolean _debug = false; public Log() { // TODO Auto-generated constructor stub setVerbose(); } public Log(int level) { set(level); } public Log(String classname) { _classname = classname; } public void debug(String msg){ if(_debug) { printLogMsg(""debug"", msg); } } public void log(String msg){ if (_verbose){ printLogMsg(""verbose"", msg); } } public void error(String msg){ if (_error){ printLogMsg(""error"", msg); } } public void info(String msg){ if (_info){ printLogMsg(""info"", msg); } } /** combine and print to console slave * * * @param kind * @param msg */ private void printLogMsg(String kind, String msg){ String fullmsg = """"; if (!_classname.equals("""")){ fullmsg = ""[""+kind+"" from ""+_classname+""] --- "" + msg; } else { fullmsg = ""[""+kind+""] --- "" + msg; } System.out.println(fullmsg); } public void enableAll() { _verbose = true; } public void dissableAll() { _verbose = false; } public void setVerbose(){ _verbose = true; _error = true; _info = true; _debug = true; } public void set(int level){ //0 off, 1 error, 2 info, 3 verbose, 4 Debug(all) switch(level){ case 0: _verbose = false; _error = false; _info = false; _debug = false; break; case 1: _error = true; _verbose = false; _info = false; _debug = false; break; case 2: _error = true; _info = true; _debug = false; _verbose = false; break; case 3: _verbose = true; _error = true; _info = true; _debug = false; break; case 4: setVerbose(); default: _verbose = true; _error = true; _info = true; _debug = true; break; } } } ",0 " 'type'=>'email', 'check_url'=>'http://inet.ua/index.php', 'requirement'=>'email', 'allowed_domains'=>array('/(inet.ua)/i','/(fm.com.ua)/i'), ); /** * Inet Plugin * * Imports user's contacts from Inet AddressBook * * @author OpenInviter * @version 1.0.0 */ class inet extends openinviter_base { private $login_ok=false; public $showContacts=true; public $internalError=false; protected $timeout=30; public $debug_array=array( 'initial_get'=>'login_username', 'login_post'=>'frame', 'url_redirect'=>'passport', 'url_export'=>'FORENAME', ); /** * Login function * * Makes all the necessary requests to authenticate * the current user to the server. * * @param string $user The current user. * @param string $pass The password for the current user. * @return bool TRUE if the current user was authenticated successfully, FALSE otherwise. */ public function login($user,$pass) { $this->resetDebugger(); $this->service='inet'; $this->service_user=$user; $this->service_password=$pass; if (!$this->init()) return false; $res=$this->get(""http://inet.ua/index.php""); if ($this->checkResponse(""initial_get"",$res)) $this->updateDebugBuffer('initial_get',""http://inet.ua/index.php"",'GET'); else { $this->updateDebugBuffer('initial_get',""http://inet.ua/index.php"",'GET',false); $this->debugRequest(); $this->stopPlugin(); return false; } $user_array=explode('@',$user);$username=$user_array[0]; $form_action=""http://newmail.inet.ua/login.php""; $post_elements=array('username'=>$username,'password'=>$pass,'server_id'=>0,'template'=>'v-webmail','language'=>'ru','login_username'=>$username,'servname'=>'inet.ua','login_password'=>$pass,'version'=>1,'x'=>rand(1,100),'y'=>rand(1,100)); $res=$this->post($form_action,$post_elements,true); if ($this->checkResponse('login_post',$res)) $this->updateDebugBuffer('login_post',$form_action,'POST',true,$post_elements); else { $this->updateDebugBuffer('login_post',$form_action,'POST',false,$post_elements); $this->debugRequest(); $this->stopPlugin(); return false; } $this->login_ok=""http://newmail.inet.ua/download.php?act=process_export&method=csv&addresses=all""; return true; } /** * Get the current user's contacts * * Makes all the necesarry requests to import * the current user's contacts * * @return mixed The array if contacts if importing was successful, FALSE otherwise. */ public function getMyContacts() { if (!$this->login_ok) { $this->debugRequest(); $this->stopPlugin(); return false; } else $url=$this->login_ok; $res=$this->get($url); if ($this->checkResponse(""url_export"",$res)) $this->updateDebugBuffer('url_export',$url,'GET'); else { $this->updateDebugBuffer('url_export',$url,'GET',false); $this->debugRequest(); $this->stopPlugin(); return false; } $tempFile=explode(PHP_EOL,$res);$contacts=array();unset($tempFile[0]); foreach ($tempFile as $valuesTemp) { $values=explode('~',$valuesTemp); if (!empty($values[3])) $contacts[$values[3]]=array('first_name'=>(!empty($values[1])?$values[1]:false), 'middle_name'=>(!empty($values[2])?$values[2]:false), 'last_name'=>false, 'nickname'=>false, 'email_1'=>(!empty($values[3])?$values[3]:false), 'email_2'=>(!empty($values[4])?$values[4]:false), 'email_3'=>(!empty($values[5])?$values[5]:false), 'organization'=>false, 'phone_mobile'=>(!empty($values[8])?$values[8]:false), 'phone_home'=>(!empty($values[6])?$values[6]:false), 'pager'=>false, 'address_home'=>false, 'address_city'=>(!empty($values[11])?$values[11]:false), 'address_state'=>(!empty($values[12])?$values[12]:false), 'address_country'=>(!empty($values[14])?$values[14]:false), 'postcode_home'=>(!empty($values[13])?$values[13]:false), 'company_work'=>false, 'address_work'=>false, 'address_work_city'=>false, 'address_work_country'=>false, 'address_work_state'=>false, 'address_work_postcode'=>false, 'fax_work'=>false, 'phone_work'=>(!empty($values[7])?$values[7]:false), 'website'=>false, 'isq_messenger'=>false, 'skype_essenger'=>false, 'yahoo_essenger'=>false, 'msn_messenger'=>false, 'aol_messenger'=>false, 'other_messenger'=>false, ); } foreach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]); return $this->returnContacts($contacts); } /** * Terminate session * * Terminates the current user's session, * debugs the request and reset's the internal * debudder. * * @return bool TRUE if the session was terminated successfully, FALSE otherwise. */ public function logout() { if (!$this->checkSession()) return false; $res=$this->get('http://newmail.inet.ua/logout.php?vwebmailsession=',true); $this->debugRequest(); $this->resetDebugger(); $this->stopPlugin(); return true; } } ?>",0 "on: 1.4 $ //Modified: $Date: 2013/01/10 23:05:58 $ // //Copyright (c) 2005-2014 Mentor Graphics Corporation. All rights reserved. // //======================================================================== // 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. //======================================================================== package org.xtuml.bp.ui.graphics.actions; import java.util.ArrayList; import java.util.List; import org.eclipse.gef.GraphicalEditPart; import org.eclipse.gef.GraphicalViewer; import org.eclipse.jface.action.Action; import org.xtuml.bp.core.CorePlugin; import org.xtuml.bp.core.common.ClassQueryInterface_c; import org.xtuml.bp.core.common.Transaction; import org.xtuml.bp.core.common.TransactionManager; import org.xtuml.bp.ui.canvas.Connector_c; import org.xtuml.bp.ui.canvas.GraphicalElement_c; import org.xtuml.bp.ui.canvas.Graphicalelementinlayer_c; import org.xtuml.bp.ui.canvas.Layer_c; import org.xtuml.bp.ui.canvas.Model_c; import org.xtuml.bp.ui.canvas.Ooaofgraphics; import org.xtuml.bp.ui.canvas.Shape_c; import org.xtuml.bp.ui.graphics.editor.GraphicalEditor; import org.xtuml.bp.ui.graphics.parts.ConnectorEditPart; import org.xtuml.bp.ui.graphics.parts.ShapeEditPart; public class AddToLayerAction extends Action { private String layerName; private Model_c model; public AddToLayerAction(String layerName, Model_c model) { this.layerName = layerName; this.model = model; } @Override public void run() { Layer_c layer = Layer_c.getOneGD_LAYOnR34(model, new ClassQueryInterface_c() { @Override public boolean evaluate(Object candidate) { return ((Layer_c) candidate).getLayer_name().equals( layerName); } }); if (layer != null) { Transaction transaction = null; TransactionManager manager = TransactionManager.getSingleton(); try { transaction = manager.startTransaction( ""Add element(s) to layer"", Ooaofgraphics .getDefaultInstance()); List selection = new ArrayList(); GraphicalViewer viewer = GraphicalEditor.getEditor(model) .getGraphicalViewer(); for (Object selected : viewer.getSelectedEditParts()) { selection.add((GraphicalEditPart) selected); } for (GraphicalEditPart part : selection) { if (part instanceof ShapeEditPart || part instanceof ConnectorEditPart) { GraphicalElement_c elem = null; Object partModel = part.getModel(); if (partModel instanceof Connector_c) { elem = GraphicalElement_c .getOneGD_GEOnR2((Connector_c) partModel); } else { elem = GraphicalElement_c .getOneGD_GEOnR2((Shape_c) partModel); } if (elem != null) { // if this element already exists in the layer // skip, the tool allows this when at least one // selected element is not part of the layer Layer_c[] participatingLayers = Layer_c .getManyGD_LAYsOnR35(Graphicalelementinlayer_c .getManyGD_GLAYsOnR35(elem)); for(int i = 0; i < participatingLayers.length; i++) { if(participatingLayers[i] == layer) { continue; } } if (part instanceof ShapeEditPart) { ShapeEditPart shapePart = (ShapeEditPart) part; participatingLayers = shapePart .getInheritedLayers(); for (int i = 0; i < participatingLayers.length; i++) { if (participatingLayers[i] == layer) { continue; } } } if (part instanceof ConnectorEditPart) { ConnectorEditPart conPart = (ConnectorEditPart) part; participatingLayers = conPart .getInheritedLayers(); for (int i = 0; i < participatingLayers.length; i++) { if (participatingLayers[i] == layer) { continue; } } } layer.Addelementtolayer(elem.getElementid()); } if(!layer.getVisible()) { // see if the part also belongs to any // visible layers, otherwise de-select Layer_c[] existingLayers = Layer_c .getManyGD_LAYsOnR35(Graphicalelementinlayer_c .getManyGD_GLAYsOnR35(elem)); boolean participatesInVisibleLayer = false; for(int i = 0; i < existingLayers.length; i++) { if(existingLayers[i].getVisible()) { participatesInVisibleLayer = true; break; } } if(!participatesInVisibleLayer) { viewer.deselect(part); } } } } manager.endTransaction(transaction); } catch (Exception e) { if (transaction != null) { manager.cancelTransaction(transaction, e); } CorePlugin.logError(""Unable to add element to layer."", e); } } } } ",0 " LICENSE file. #ifndef EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ #define EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ #include #include #include ""base/macros.h"" #include ""base/memory/linked_ptr.h"" namespace gfx { class Display; class Screen; } namespace extensions { namespace api { namespace system_display { struct DisplayProperties; struct DisplayUnitInfo; } } typedef std::vector> DisplayInfo; class DisplayInfoProvider { public: virtual ~DisplayInfoProvider(); // Returns a pointer to DisplayInfoProvider or NULL if Create() // or InitializeForTesting() or not called yet. static DisplayInfoProvider* Get(); // This is for tests that run in its own process (e.g. browser_tests). // Using this in other tests (e.g. unit_tests) will result in DCHECK failure. static void InitializeForTesting(DisplayInfoProvider* display_info_provider); // Updates the display with |display_id| according to |info|. Returns whether // the display was successfully updated. On failure, no display parameters // should be changed, and |error| should be set to the error string. virtual bool SetInfo(const std::string& display_id, const api::system_display::DisplayProperties& info, std::string* error) = 0; // Get the screen that is always active, which will be used for monitoring // display changes events. virtual gfx::Screen* GetActiveScreen() = 0; // Enable the unified desktop feature. virtual void EnableUnifiedDesktop(bool enable); DisplayInfo GetAllDisplaysInfo(); protected: DisplayInfoProvider(); private: static DisplayInfoProvider* Create(); // Update the content of the |unit| obtained for |display| using // platform specific method. virtual void UpdateDisplayUnitInfoForPlatform( const gfx::Display& display, api::system_display::DisplayUnitInfo* unit) = 0; DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); }; } // namespace extensions #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ ",0 "rg/1999/xhtml""> bit by bit: bbb::container_info::is_unordered_multiset< type > Struct Template Reference
bit by bit  0.0.1
bbb::container_info::is_unordered_multiset< type > Struct Template Reference

#include "container_traits.hpp"

Inherits false_type.


The documentation for this struct was generated from the following file:

Generated by   1.8.13
",0 "r modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ namespace Seat\Eveapi\Jobs\Corporation; use Seat\Eveapi\Jobs\AbstractAuthCorporationJob; use Seat\Eveapi\Models\Corporation\CorporationFacility; /** * Class Facilities. * * @package Seat\Eveapi\Jobs\Corporation */ class Facilities extends AbstractAuthCorporationJob { /** * @var string */ protected $method = 'get'; /** * @var string */ protected $endpoint = '/corporations/{corporation_id}/facilities/'; /** * @var int */ protected $version = 'v2'; /** * @var string */ protected $scope = 'esi-corporations.read_facilities.v1'; /** * @var array */ protected $roles = ['Factory_Manager']; /** * @var array */ protected $tags = ['corporation', 'industry']; /** * Execute the job. * * @return void * * @throws \Throwable */ public function handle() { $facilities = $this->retrieve([ 'corporation_id' => $this->getCorporationId(), ]); if ($facilities->isCachedLoad() && CorporationFacility::where('corporation_id', $this->getCorporationId())->count() > 0) return; collect($facilities)->each(function ($facility) { CorporationFacility::firstOrNew([ 'corporation_id' => $this->getCorporationId(), 'facility_id' => $facility->facility_id, ])->fill([ 'type_id' => $facility->type_id, 'system_id' => $facility->system_id, ])->save(); }); CorporationFacility::where('corporation_id', $this->getCorporationId()) ->whereNotIn('facility_id', collect($facilities)->pluck('facility_id')->all()) ->delete(); } } ",0 "=""stylesheet"" type=""text/css"" href=""../../static_/css/spc-bootstrap.css"">

numpy.chararray.clip

chararray.clip(min=None, max=None, out=None)

Return an array whose values are limited to [min, max]. One of max or min must be given.

Refer to numpy.clip for full documentation.

See also

numpy.clip
equivalent function
  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Oct 18, 2015.
  • Created using Sphinx 1.2.1.
",0 "be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef CALL_TEST_MOCK_BITRATE_ALLOCATOR_H_ #define CALL_TEST_MOCK_BITRATE_ALLOCATOR_H_ #include #include ""call/bitrate_allocator.h"" #include ""test/gmock.h"" namespace webrtc { class MockBitrateAllocator : public BitrateAllocatorInterface { public: MOCK_METHOD2(AddObserver, void(BitrateAllocatorObserver*, MediaStreamAllocationConfig)); MOCK_METHOD1(RemoveObserver, void(BitrateAllocatorObserver*)); MOCK_CONST_METHOD1(GetStartBitrate, int(BitrateAllocatorObserver*)); }; } // namespace webrtc #endif // CALL_TEST_MOCK_BITRATE_ALLOCATOR_H_ ",0 "rtificates and 1.0-RevA protocol * behaviour (requestToken-callbacks and verifiers) * * @author Andreas Åkre Solberg, , UNINETT AS. * @author Mark Dobrinic, , Cozmanova bv * @package SimpleSAMLphp */ class sspmod_oauth_OAuthStore extends OAuthDataStore { private $store; private $config; private $defaultversion = '1.0'; protected $_store_tables = array( 'consumers' => 'consumer = array with consumer attributes', 'nonce' => 'nonce+consumer_key = -boolean-', 'requesttorequest' => 'requestToken.key = array(version,callback,consumerKey,)', 'authorized' => 'requestToken.key, verifier = array(authenticated-user-attributes)', 'access' => 'accessToken.key+consumerKey = accestoken', 'request' => 'requestToken.key+consumerKey = requesttoken', ); function __construct() { $this->store = new sspmod_core_Storage_SQLPermanentStorage('oauth'); $this->config = SimpleSAML_Configuration::getOptionalConfig('module_oauth.php'); } /** * Attach the data to the token, and establish the Callback URL and verifier * @param $requestTokenKey RequestToken that was authorized * @param $data Data that is authorized and to be attached to the requestToken * @return array(string:url, string:verifier) ; empty verifier for 1.0-response */ public function authorize($requestTokenKey, $data) { $url = null; $verifier = ''; $version = $this->defaultversion; // See whether to remember values from the original requestToken request: $request_attributes = $this->store->get('requesttorequest', $requestTokenKey, ''); // must be there .. if ($request_attributes['value']) { // establish version to work with $v = $request_attributes['value']['version']; if ($v) $version = $v; // establish callback to use if ($request_attributes['value']['callback']) { $url = $request_attributes['value']['callback']; } } // Is there a callback registered? This is leading, even over a supplied oauth_callback-parameter $oConsumer = $this->lookup_consumer($request_attributes['value']['consumerKey']); if ($oConsumer && ($oConsumer->callback_url)) $url = $oConsumer->callback_url; $verifier = SimpleSAML\Utils\Random::generateID(); $url = \SimpleSAML\Utils\HTTP::addURLParameters($url, array(""oauth_verifier""=>$verifier)); $this->store->set('authorized', $requestTokenKey, $verifier, $data, $this->config->getValue('requestTokenDuration', 60*30) ); return array($url, $verifier); } /** * Perform lookup whether a given token exists in the list of authorized tokens; if a verifier is * passed as well, the verifier *must* match the verifier that was registered with the token
* Note that an accessToken should never be stored with a verifier * @param $requestToken * @param $verifier * @return unknown_type */ public function isAuthorized($requestToken, $verifier='') { SimpleSAML_Logger::info('OAuth isAuthorized(' . $requestToken . ')'); return $this->store->exists('authorized', $requestToken, $verifier); } public function getAuthorizedData($token, $verifier = '') { SimpleSAML_Logger::info('OAuth getAuthorizedData(' . $token . ')'); $data = $this->store->get('authorized', $token, $verifier); return $data['value']; } public function moveAuthorizedData($requestToken, $verifier, $accessTokenKey) { SimpleSAML_Logger::info('OAuth moveAuthorizedData(' . $requestToken . ', ' . $accessTokenKey . ')'); // Retrieve authorizedData from authorized.requestToken (with provider verifier) $authorizedData = $this->getAuthorizedData($requestToken, $verifier); // Remove the requesttoken+verifier from authorized store $this->store->remove('authorized', $requestToken, $verifier); // Add accesstoken with authorizedData to authorized store (with empty verifier) // accessTokenKey+consumer => accessToken is already registered in 'access'-table $this->store->set('authorized', $accessTokenKey, '', $authorizedData, $this->config->getValue('accessTokenDuration', 60*60*24)); } public function lookup_consumer($consumer_key) { SimpleSAML_Logger::info('OAuth lookup_consumer(' . $consumer_key . ')'); if (! $this->store->exists('consumers', $consumer_key, '')) return NULL; $consumer = $this->store->get('consumers', $consumer_key, ''); $callback = NULL; if ($consumer['value']['callback_url']) $callback = $consumer['value']['callback_url']; if ($consumer['value']['RSAcertificate']) { return new OAuthConsumer($consumer['value']['key'], $consumer['value']['RSAcertificate'], $callback); } else { return new OAuthConsumer($consumer['value']['key'], $consumer['value']['secret'], $callback); } } function lookup_token($consumer, $tokenType = 'default', $token) { SimpleSAML_Logger::info('OAuth lookup_token(' . $consumer->key . ', ' . $tokenType. ',' . $token . ')'); $data = $this->store->get($tokenType, $token, $consumer->key); if ($data == NULL) throw new Exception('Could not find token'); return $data['value']; } function lookup_nonce($consumer, $token, $nonce, $timestamp) { SimpleSAML_Logger::info('OAuth lookup_nonce(' . $consumer . ', ' . $token. ',' . $nonce . ')'); if ($this->store->exists('nonce', $nonce, $consumer->key)) return TRUE; $this->store->set('nonce', $nonce, $consumer->key, TRUE, $this->config->getValue('nonceCache', 60*60*24*14)); return FALSE; } function new_request_token($consumer, $callback = null, $version = null) { SimpleSAML_Logger::info('OAuth new_request_token(' . $consumer . ')'); $lifetime = $this->config->getValue('requestTokenDuration', 60*30); $token = new OAuthToken(SimpleSAML\Utils\Random::generateID(), SimpleSAML\Utils\Random::generateID()); $token->callback = $callback; // OAuth1.0-RevA $this->store->set('request', $token->key, $consumer->key, $token, $lifetime); // also store in requestToken->key => array('callback'=>CallbackURL, 'version'=>oauth_version $request_attributes = array( 'callback' => $callback, 'version' => ($version?$version:$this->defaultversion), 'consumerKey' => $consumer->key, ); $this->store->set('requesttorequest', $token->key, '', $request_attributes, $lifetime); // also store in requestToken->key => Consumer->key (enables consumer-lookup during reqToken-authorization stage) $this->store->set('requesttoconsumer', $token->key, '', $consumer->key, $lifetime); return $token; } function new_access_token($requestToken, $consumer, $verifier = null) { SimpleSAML_Logger::info('OAuth new_access_token(' . $requestToken . ',' . $consumer . ')'); $accestoken = new OAuthToken(SimpleSAML\Utils\Random::generateID(), SimpleSAML\Utils\Random::generateID()); $this->store->set('access', $accestoken->key, $consumer->key, $accestoken, $this->config->getValue('accessTokenDuration', 60*60*24) ); return $accestoken; } /** * Return OAuthConsumer-instance that a given requestToken was issued to * @param $requestTokenKey * @return unknown_type */ public function lookup_consumer_by_requestToken($requestTokenKey) { SimpleSAML_Logger::info('OAuth lookup_consumer_by_requestToken(' . $requestTokenKey . ')'); if (! $this->store->exists('requesttorequest', $requestTokenKey, '')) return NULL; $request = $this->store->get('requesttorequest', $requestTokenKey, ''); $consumerKey = $request['value']['consumerKey']; if (! $consumerKey) { return NULL; } $consumer = $this->store->get('consumers', $consumerKey['value'], ''); return $consumer['value']; } } ",0 "new IntStack(post.length()); char op; int op1=0 , op2=0; for(int i=0; i #include #include #include #include #define DRIVER_NAME ""tifm_core"" #define DRIVER_VERSION ""0.8"" static struct workqueue_struct *workqueue; static DEFINE_IDR(tifm_adapter_idr); static DEFINE_SPINLOCK(tifm_adapter_lock); static const char *tifm_media_type_name(unsigned char type, unsigned char nt) { const char *card_type_name[3][3] = { { ""SmartMedia/xD"", ""MemoryStick"", ""MMC/SD"" }, { ""XD"", ""MS"", ""SD""}, { ""xd"", ""ms"", ""sd""} }; if (nt > 2 || type < 1 || type > 3) return NULL; return card_type_name[nt][type - 1]; } static int tifm_dev_match(struct tifm_dev *sock, struct tifm_device_id *id) { if (sock->type == id->type) return 1; return 0; } static int tifm_bus_match(struct device *dev, struct device_driver *drv) { struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); struct tifm_driver *fm_drv = container_of(drv, struct tifm_driver, driver); struct tifm_device_id *ids = fm_drv->id_table; if (ids) { while (ids->type) { if (tifm_dev_match(sock, ids)) return 1; ++ids; } } return 0; } static int tifm_uevent(struct device *dev, struct kobj_uevent_env *env) { struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); if (add_uevent_var(env, ""TIFM_CARD_TYPE=%s"", tifm_media_type_name(sock->type, 1))) return -ENOMEM; return 0; } static int tifm_device_probe(struct device *dev) { struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, driver); int rc = -ENODEV; get_device(dev); if (dev->driver && drv->probe) { rc = drv->probe(sock); if (!rc) return 0; } put_device(dev); return rc; } static void tifm_dummy_event(struct tifm_dev *sock) { return; } static void tifm_device_remove(struct device *dev) { struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, driver); if (dev->driver && drv->remove) { sock->card_event = tifm_dummy_event; sock->data_event = tifm_dummy_event; drv->remove(sock); sock->dev.driver = NULL; } put_device(dev); } #ifdef CONFIG_PM static int tifm_device_suspend(struct device *dev, pm_message_t state) { struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, driver); if (dev->driver && drv->suspend) return drv->suspend(sock, state); return 0; } static int tifm_device_resume(struct device *dev) { struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, driver); if (dev->driver && drv->resume) return drv->resume(sock); return 0; } #else #define tifm_device_suspend NULL #define tifm_device_resume NULL #endif /* CONFIG_PM */ static ssize_t type_show(struct device *dev, struct device_attribute *attr, char *buf) { struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); return sprintf(buf, ""%x"", sock->type); } static DEVICE_ATTR_RO(type); static struct attribute *tifm_dev_attrs[] = { &dev_attr_type.attr, NULL, }; ATTRIBUTE_GROUPS(tifm_dev); static struct bus_type tifm_bus_type = { .name = ""tifm"", .dev_groups = tifm_dev_groups, .match = tifm_bus_match, .uevent = tifm_uevent, .probe = tifm_device_probe, .remove = tifm_device_remove, .suspend = tifm_device_suspend, .resume = tifm_device_resume }; static void tifm_free(struct device *dev) { struct tifm_adapter *fm = container_of(dev, struct tifm_adapter, dev); kfree(fm); } static struct class tifm_adapter_class = { .name = ""tifm_adapter"", .dev_release = tifm_free }; struct tifm_adapter *tifm_alloc_adapter(unsigned int num_sockets, struct device *dev) { struct tifm_adapter *fm; fm = kzalloc(sizeof(struct tifm_adapter) + sizeof(struct tifm_dev*) * num_sockets, GFP_KERNEL); if (fm) { fm->dev.class = &tifm_adapter_class; fm->dev.parent = dev; device_initialize(&fm->dev); spin_lock_init(&fm->lock); fm->num_sockets = num_sockets; } return fm; } EXPORT_SYMBOL(tifm_alloc_adapter); int tifm_add_adapter(struct tifm_adapter *fm) { int rc; idr_preload(GFP_KERNEL); spin_lock(&tifm_adapter_lock); rc = idr_alloc(&tifm_adapter_idr, fm, 0, 0, GFP_NOWAIT); if (rc >= 0) fm->id = rc; spin_unlock(&tifm_adapter_lock); idr_preload_end(); if (rc < 0) return rc; dev_set_name(&fm->dev, ""tifm%u"", fm->id); rc = device_add(&fm->dev); if (rc) { spin_lock(&tifm_adapter_lock); idr_remove(&tifm_adapter_idr, fm->id); spin_unlock(&tifm_adapter_lock); } return rc; } EXPORT_SYMBOL(tifm_add_adapter); void tifm_remove_adapter(struct tifm_adapter *fm) { unsigned int cnt; flush_workqueue(workqueue); for (cnt = 0; cnt < fm->num_sockets; ++cnt) { if (fm->sockets[cnt]) device_unregister(&fm->sockets[cnt]->dev); } spin_lock(&tifm_adapter_lock); idr_remove(&tifm_adapter_idr, fm->id); spin_unlock(&tifm_adapter_lock); device_del(&fm->dev); } EXPORT_SYMBOL(tifm_remove_adapter); void tifm_free_adapter(struct tifm_adapter *fm) { put_device(&fm->dev); } EXPORT_SYMBOL(tifm_free_adapter); void tifm_free_device(struct device *dev) { struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); kfree(sock); } EXPORT_SYMBOL(tifm_free_device); struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id, unsigned char type) { struct tifm_dev *sock = NULL; if (!tifm_media_type_name(type, 0)) return sock; sock = kzalloc(sizeof(struct tifm_dev), GFP_KERNEL); if (sock) { spin_lock_init(&sock->lock); sock->type = type; sock->socket_id = id; sock->card_event = tifm_dummy_event; sock->data_event = tifm_dummy_event; sock->dev.parent = fm->dev.parent; sock->dev.bus = &tifm_bus_type; sock->dev.dma_mask = fm->dev.parent->dma_mask; sock->dev.release = tifm_free_device; dev_set_name(&sock->dev, ""tifm_%s%u:%u"", tifm_media_type_name(type, 2), fm->id, id); printk(KERN_INFO DRIVER_NAME "": %s card detected in socket %u:%u\n"", tifm_media_type_name(type, 0), fm->id, id); } return sock; } EXPORT_SYMBOL(tifm_alloc_device); void tifm_eject(struct tifm_dev *sock) { struct tifm_adapter *fm = dev_get_drvdata(sock->dev.parent); fm->eject(fm, sock); } EXPORT_SYMBOL(tifm_eject); int tifm_has_ms_pif(struct tifm_dev *sock) { struct tifm_adapter *fm = dev_get_drvdata(sock->dev.parent); return fm->has_ms_pif(fm, sock); } EXPORT_SYMBOL(tifm_has_ms_pif); int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, int direction) { return pci_map_sg(to_pci_dev(sock->dev.parent), sg, nents, direction); } EXPORT_SYMBOL(tifm_map_sg); void tifm_unmap_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, int direction) { pci_unmap_sg(to_pci_dev(sock->dev.parent), sg, nents, direction); } EXPORT_SYMBOL(tifm_unmap_sg); void tifm_queue_work(struct work_struct *work) { queue_work(workqueue, work); } EXPORT_SYMBOL(tifm_queue_work); int tifm_register_driver(struct tifm_driver *drv) { drv->driver.bus = &tifm_bus_type; return driver_register(&drv->driver); } EXPORT_SYMBOL(tifm_register_driver); void tifm_unregister_driver(struct tifm_driver *drv) { driver_unregister(&drv->driver); } EXPORT_SYMBOL(tifm_unregister_driver); static int __init tifm_init(void) { int rc; workqueue = create_freezable_workqueue(""tifm""); if (!workqueue) return -ENOMEM; rc = bus_register(&tifm_bus_type); if (rc) goto err_out_wq; rc = class_register(&tifm_adapter_class); if (!rc) return 0; bus_unregister(&tifm_bus_type); err_out_wq: destroy_workqueue(workqueue); return rc; } static void __exit tifm_exit(void) { class_unregister(&tifm_adapter_class); bus_unregister(&tifm_bus_type); destroy_workqueue(workqueue); } subsys_initcall(tifm_init); module_exit(tifm_exit); MODULE_LICENSE(""GPL""); MODULE_AUTHOR(""Alex Dubov""); MODULE_DESCRIPTION(""TI FlashMedia core driver""); MODULE_LICENSE(""GPL""); MODULE_VERSION(DRIVER_VERSION); ",0 "rg/1999/xhtml""> KlusterKite: KlusterKite.NodeManager.Launcher.Utils.Exceptions.PackageNotFoundException Class Reference
KlusterKite  0.0.0
A framework to create scalable and redundant services based on awesome Akka.Net project.
KlusterKite.NodeManager.Launcher.Utils.Exceptions.PackageNotFoundException Class Reference

The exception of missing requested package in repository More...

Inheritance diagram for KlusterKite.NodeManager.Launcher.Utils.Exceptions.PackageNotFoundException:

Public Member Functions

 PackageNotFoundException (string message)
 

Detailed Description

The exception of missing requested package in repository

Definition at line 17 of file PackageNotFoundException.cs.

Constructor & Destructor Documentation

◆ PackageNotFoundException()

KlusterKite.NodeManager.Launcher.Utils.Exceptions.PackageNotFoundException.PackageNotFoundException ( string  message)

Definition at line 20 of file PackageNotFoundException.cs.


The documentation for this class was generated from the following file:
",0 "ify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. ALIZE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with ALIZE. If not, see . ALIZE is a development project initiated by the ELISA consortium [alize.univ-avignon.fr/] and funded by the French Research Ministry in the framework of the TECHNOLANGUE program [www.technolangue.net] The ALIZE project team wants to highlight the limits of voice authentication in a forensic context. The ""Person Authentification by Voice: A Need of Caution"" paper proposes a good overview of this point (cf. ""Person Authentification by Voice: A Need of Caution"", Bonastre J.F., Bimbot F., Boe L.J., Campbell J.P., Douglas D.A., Magrin- chagnolleau I., Eurospeech 2003, Genova]. The conclusion of the paper of the paper is proposed bellow: [Currently, it is not possible to completely determine whether the similarity between two recordings is due to the speaker or to other factors, especially when: (a) the speaker does not cooperate, (b) there is no control over recording equipment, (c) recording conditions are not known, (d) one does not know whether the voice was disguised and, to a lesser extent, (e) the linguistic content of the message is not controlled. Caution and judgment must be exercised when applying speaker recognition techniques, whether human or automatic, to account for these uncontrolled factors. Under more constrained or calibrated situations, or as an aid for investigative purposes, judicious application of these techniques may be suitable, provided they are not considered as infallible. At the present time, there is no scientific process that enables one to uniquely characterize a person=92s voice or to identify with absolute certainty an individual from his or her voice.] Contact Jean-Francois Bonastre for more information about the licence or the use of ALIZE Copyright (C) 2003-2010 Laboratoire d'informatique d'Avignon [lia.univ-avignon.fr] ALIZE admin [alize@univ-avignon.fr] Jean-Francois Bonastre [jean-francois.bonastre@univ-avignon.fr] */ #if !defined(ALIZE_MixtureFileWriter_h) #define ALIZE_MixtureFileWriter_h #if defined(_WIN32) #if defined(ALIZE_EXPORTS) #define ALIZE_API __declspec(dllexport) #else #define ALIZE_API __declspec(dllimport) #endif #else #define ALIZE_API #endif #include ""FileWriter.h"" namespace alize { class Mixture; class MixtureGD; class Config; class MixtureGF; /// Convenient class used to save 1 mixture in a raw or xml file /// /// @author Frederic Wils frederic.wils@lia.univ-avignon.fr /// @version 1.0 /// @date 2003 class ALIZE_API MixtureFileWriter : public FileWriter { public : /// Create a new MixtureFileWriter object to save a mixture /// in a file /// @param f the name of the file /// @param c the configuration to use /// explicit MixtureFileWriter(const FileName& f, const Config& c); virtual ~MixtureFileWriter(); /// Write a mixture to the file /// @param mixture the mixture to save /// @exception IOException if an I/O error occurs virtual void writeMixture(const Mixture& mixture); virtual String getClassName() const; private : const Config& _config; String getFullFileName(const Config&, const FileName&) const; void writeMixtureGD_XML(const MixtureGD&); void writeMixtureGD_RAW(const MixtureGD&); void writeMixtureGD_ETAT(const MixtureGD&); void writeMixtureGF_XML(const MixtureGF&); void writeMixtureGF_RAW(const MixtureGF&); MixtureFileWriter(const MixtureFileWriter&); /*!Not implemented*/ const MixtureFileWriter& operator=( const MixtureFileWriter&); /*!Not implemented*/ bool operator==(const MixtureFileWriter&) const; /*!Not implemented*/ bool operator!=(const MixtureFileWriter&) const; /*!Not implemented*/ }; } // end namespace alize #endif // !defined(ALIZE_MixtureFileWriter_h) ",0 "ormosa-ui-form"" target=""change_password_frame"" method=""post"" action=""/backend/plantation-city/users?action=update-password"">
""/>
",0 "e max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include #include #include #ifdef LIKWID_PERFMON #include #endif #include ""print_utils.h"" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ? a : b) /* Subtract the `struct timeval' values X and Y, * storing the result in RESULT. * * Return 1 if the difference is negative, otherwise 0. */ int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y) { /* Perform the carry for the later subtraction by updating y. */ if (x->tv_usec < y->tv_usec) { int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1; y->tv_usec -= 1000000 * nsec; y->tv_sec += nsec; } if (x->tv_usec - y->tv_usec > 1000000) { int nsec = (x->tv_usec - y->tv_usec) / 1000000; y->tv_usec += 1000000 * nsec; y->tv_sec -= nsec; } /* Compute the time remaining to wait. * tv_usec is certainly positive. */ result->tv_sec = x->tv_sec - y->tv_sec; result->tv_usec = x->tv_usec - y->tv_usec; /* Return 1 if result is negative. */ return x->tv_sec < y->tv_sec; } int main(int argc, char *argv[]) { int t, i, j, k, test; int Nx, Ny, Nz, Nt; if (argc > 3) { Nx = atoi(argv[1])+2; Ny = atoi(argv[2])+2; Nz = atoi(argv[3])+2; } if (argc > 4) Nt = atoi(argv[4]); double ****A = (double ****) malloc(sizeof(double***)*2); A[0] = (double ***) malloc(sizeof(double**)*Nz); A[1] = (double ***) malloc(sizeof(double**)*Nz); for(i=0; i. */ /* This header is separate from features.h so that the compiler can include it implicitly at the start of every compilation. It must not itself include or any other header that includes because the implicit include comes before any feature test macros that may be defined in a source file before it first explicitly includes a system header. GCC knows the name of this header in order to preinclude it. */ /* glibc's intent is to support the IEC 559 math functionality, real and complex. If the GCC (4.9 and later) predefined macros specifying compiler intent are available, use them to determine whether the overall intent is to support these features; otherwise, presume an older compiler has intent to support these features and define these macros by default. */ /* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) / Unicode 6.0. */ /* We do not support C11 . */ int t1, t2, t3, t4, t5, t6, t7, t8; int lb, ub, lbp, ubp, lb2, ub2; register int lbv, ubv; /* Start of CLooG code */ if ((Nt >= 2) && (Nx >= 3) && (Ny >= 3) && (Nz >= 3)) { for (t1=-1;t1<=floord(Nt-2,2);t1++) { lbp=max(ceild(t1,2),ceild(4*t1-Nt+3,4)); ubp=min(floord(Nt+Nz-4,4),floord(2*t1+Nz-1,4)); #pragma omp parallel for private(lbv,ubv,t3,t4,t5,t6,t7,t8) for (t2=lbp;t2<=ubp;t2++) { for (t3=max(max(0,ceild(t1-3,4)),ceild(4*t2-Nz-4,8));t3<=min(min(min(floord(4*t2+Ny,8),floord(Nt+Ny-4,8)),floord(2*t1+Ny+1,8)),floord(4*t1-4*t2+Nz+Ny-1,8));t3++) { for (t4=max(max(max(0,ceild(t1-31,32)),ceild(4*t2-Nz-60,64)),ceild(8*t3-Ny-60,64));t4<=min(min(min(min(floord(4*t2+Nx,64),floord(Nt+Nx-4,64)),floord(2*t1+Nx+1,64)),floord(8*t3+Nx+4,64)),floord(4*t1-4*t2+Nz+Nx-1,64));t4++) { for (t5=max(max(max(max(max(0,2*t1),4*t1-4*t2+1),4*t2-Nz+2),8*t3-Ny+2),64*t4-Nx+2);t5<=min(min(min(min(min(Nt-2,2*t1+3),4*t2+2),8*t3+6),64*t4+62),4*t1-4*t2+Nz+1);t5++) { for (t6=max(max(4*t2,t5+1),-4*t1+4*t2+2*t5-3);t6<=min(min(4*t2+3,-4*t1+4*t2+2*t5),t5+Nz-2);t6++) { for (t7=max(8*t3,t5+1);t7<=min(8*t3+7,t5+Ny-2);t7++) { lbv=max(64*t4,t5+1); ubv=min(64*t4+63,t5+Nx-2); #pragma ivdep #pragma vector always for (t8=lbv;t8<=ubv;t8++) { A[( t5 + 1) % 2][ (-t5+t6)][ (-t5+t7)][ (-t5+t8)] = ((alpha * A[ t5 % 2][ (-t5+t6)][ (-t5+t7)][ (-t5+t8)]) + (beta * (((((A[ t5 % 2][ (-t5+t6) - 1][ (-t5+t7)][ (-t5+t8)] + A[ t5 % 2][ (-t5+t6)][ (-t5+t7) - 1][ (-t5+t8)]) + A[ t5 % 2][ (-t5+t6)][ (-t5+t7)][ (-t5+t8) - 1]) + A[ t5 % 2][ (-t5+t6) + 1][ (-t5+t7)][ (-t5+t8)]) + A[ t5 % 2][ (-t5+t6)][ (-t5+t7) + 1][ (-t5+t8)]) + A[ t5 % 2][ (-t5+t6)][ (-t5+t7)][ (-t5+t8) + 1])));; } } } } } } } } } /* End of CLooG code */ gettimeofday(&end, 0); ts_return = timeval_subtract(&result, &end, &start); tdiff = (double) (result.tv_sec + result.tv_usec * 1.0e-6); min_tdiff = min(min_tdiff, tdiff); printf(""Rank 0 TEST# %d time: %f\n"", test, tdiff); } PRINT_RESULTS(1, ""constant"") #ifdef LIKWID_PERFMON #pragma omp parallel { LIKWID_MARKER_STOP(""calc""); } LIKWID_MARKER_CLOSE; #endif // Free allocated arrays (Causing performance degradation /* for(i=0; i read_text_file(std::string path); std::vector split_str(std::string src, char c); std::string join_str(std::vector strings, std::string connector); template std::vector map_get_keys(std::map map); template std::vector map_get_values(std::map map); int db_insert(sqlite3* con, std::string table, std::map values); template std::vector db_select(sqlite3* con, std::string table, std::string coloumn, std::string where_stmt); #endif",0 "- Generated by javadoc (1.8.0_60) on Sun Oct 25 17:08:11 MDT 2015 --> Generated Documentation (Untitled) <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <h2>Frame Alert</h2> <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href=""overview-summary.html"">Non-frame version</a>.</p> ",0 "testRsyncDeployWithNotExistingRsyncExcludeFile() { $server = new Server( 'localhost', 'julien', '/var/www/', 22 ); $deployer = new \Plumber\Deployer\NoRsyncDeployer(); $this->assertTrue( $deployer->deploy( $server, array() ), 'This deployer always returns true.' ); } public function testGetDeployerName() { $deployer = new \Plumber\Deployer\NoRsyncDeployer(); $this->assertEquals( 'no rsync', $deployer->getName(), 'The name must be no rsync' ); } }",0 "ut a player. */ public class Player extends TeamMember { private final Range shotRange; private final int goal; /** * Creates a new player with a name, shot range (how likely a shot will be attributed to the player) and a goal * rating (how likely they are to score a goal). * * @param name The name of the player * @param shotRange Shot range of player. Defines how likely a shot on goal will be attributed to this player (see * rule files for more information. Is the maximum value when lower and upper bounds given by the * rules. * @param goal How likely a shot from the player will go in. When shot is taken, a number from 1-10 is generated. * If the generated number is above or equal to goal rating, the player scores. */ public Player(String name, Range shotRange, int goal, int multiplier) { super(name, multiplier); this.shotRange = shotRange; this.goal = goal; } /** * Returns the shot range of player. * * @return the player's shot range. */ public Range getShotRange() { return shotRange; } /** * Returns the goal rating of the player. * * @return the player's goal range. */ public int getGoal() { return goal; } } ",0 "reby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the ""Software""), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ #ifndef CMSIS_PLUS_POSIX_IO_REDEFINITIONS_H_ #define CMSIS_PLUS_POSIX_IO_REDEFINITIONS_H_ // These definitions might be useful in some tests, to check // if both prefixed and not prefixed names are ok. #define __posix_accept accept #define __posix_bind bind #define __posix_chdir chdir #define __posix_chmod chmod #define __posix_chown chown #define __posix_clock clock #define __posix_close close #define __posix_closedir closedir #define __posix_connect connect #define __posix_execve execve #define __posix_fcntl fcntl #define __posix_fork fork #define __posix_fstat fstat #define __posix_ftruncate ftruncate #define __posix_fsync fsync #define __posix_getcwd getcwd #define __posix_getpeername getpeername #define __posix_getpid getpid #define __posix_getsockname getsockname #define __posix_getsockopt getsockopt #define __posix_gettimeofday gettimeofday #define __posix_ioctl ioctl #define __posix_isatty isatty #define __posix_kill kill #define __posix_link link #define __posix_listen listen #define __posix_lseek lseek #define __posix_mkdir mkdir #define __posix_open open #define __posix_opendir opendir #define __posix_raise raise #define __posix_read read #define __posix_readdir readdir #define __posix_readdir_r readdir_r #define __posix_readlink readlink #define __posix_recv recv #define __posix_recvfrom recvfrom #define __posix_recvmsg recvmsg #define __posix_rename rename #define __posix_rewinddir rewinddir #define __posix_rmdir rmdir #define __posix_select select #define __posix_send send #define __posix_sendmsg sendmsg #define __posix_sendto sendto #define __posix_setsockopt setsockopt #define __posix_shutdown shutdown #define __posix_sockatmark sockatmark #define __posix_socket socket #define __posix_socketpair socketpair #define __posix_stat stat #define __posix_symlink symlink #define __posix_sync sync #define __posix_system system #define __posix_times times #define __posix_truncate truncate #define __posix_unlink unlink #define __posix_utime utime #define __posix_wait wait #define __posix_write write #define __posix_writev writev #endif /* CMSIS_PLUS_POSIX_IO_REDEFINITIONS_H_ */ ",0 " * * Project: Cambusa/ryQuiver * * Version: 1.69 * * Description: Arrows-oriented Library * * Copyright (C): 2015 Rodolfo Calzetti * * License GNU LESSER GENERAL PUBLIC LICENSE Version 3 * * Contact: https://github.com/cambusa * * postmaster@rudyz.net * ****************************************************************************/ function qv_extension($maestro, $data, $prefix, $SYSID, $TYPOLOGYID, $oper){ global $babelcode, $babelparams, $global_cache; if($oper!=2){ // 0 insert, 1 update, 2 virtual delete, 3 delete $tabletypes=$prefix.""TYPES""; $tableviews=$prefix.""VIEWS""; if($t=_qv_cacheloader($maestro, $tabletypes, $TYPOLOGYID)){ $TABLENAME=$t[""TABLENAME""]; $DELETABLE=$t[""DELETABLE""]; unset($t); if($TABLENAME!=""""){ if($oper==3){ if($DELETABLE) $sql=""DELETE FROM $TABLENAME WHERE SYSID='$SYSID'""; else $sql=""UPDATE $TABLENAME SET SYSID=NULL WHERE SYSID='$SYSID'""; if(!maestro_execute($maestro, $sql, false)){ $babelcode=""QVERR_EXECUTE""; $trace=debug_backtrace(); $b_params=array(""FUNCTION"" => $trace[0][""function""] ); $b_pattern=$maestro->errdescr; throw new Exception( qv_babeltranslate($b_pattern, $b_params) ); } } elseif($DELETABLE || $oper==1){ if(isset($global_cache[""$tableviews-$TYPOLOGYID""])){ // REPERISCO LE INFO DALLA CACHE $infos=$global_cache[""$tableviews-$TYPOLOGYID""]; } else{ // REPERISCO LE INFO DAL DATABASE $infos=array(); maestro_query($maestro,""SELECT * FROM $tableviews WHERE TYPOLOGYID='$TYPOLOGYID'"",$r); for($i=0;$i0 || $oper==0){ // Ci sono campi estensione oppure solo il SYSID in inserimento if($oper==0){ $columns=""SYSID""; $values=""'$SYSID'""; $helpful=true; } else{ $sets=""""; $where=""SYSID='$SYSID'""; $helpful=false; } $clobs=false; for($i=0;$i $trace[0][""function""], ""ACTUALNAME"" => $ACTUALNAME ); $b_pattern=""Campo [{2}] obbligatorio""; throw new Exception( qv_babeltranslate($b_pattern, $b_params) ); } $value=""'$value'""; } elseif($FIELDTYPE==""TEXT""){ $value=ryqNormalize($data[$ACTUALNAME]); qv_setclob($maestro, $ACTUALNAME, $value, $value, $clobs); } elseif(substr($FIELDTYPE, 0, 4)==""JSON""){ $value=ryqNormalize($data[$ACTUALNAME]); if(substr($FIELDTYPE, 0, 5)==""JSON(""){ $len=intval(substr($FIELDTYPE, 5)); $value=substr($value, 0, $len); } if($value!=""""){ if(!json_decode($value)){ $babelcode=""QVERR_JSON""; $trace=debug_backtrace(); $b_params=array(""FUNCTION"" => $trace[0][""function""], ""ACTUALNAME"" => $ACTUALNAME ); $b_pattern=""Documento JSON [{2}] non corretto o troppo esteso""; throw new Exception( qv_babeltranslate($b_pattern, $b_params) ); } } qv_setclob($maestro, $ACTUALNAME, $value, $value, $clobs); } else{ $value=ryqEscapize($data[$ACTUALNAME]); $value=qv_sqlize($value, $FIELDTYPE); } if($oper==0){ qv_appendcomma($columns, $ACTUALNAME); qv_appendcomma($values, $value); } else{ qv_appendcomma($sets,""$ACTUALNAME=$value""); $helpful=true; } } else{ if($oper==0){ if($NOTEMPTY){ $babelcode=""QVERR_EMPTYSYSID""; $trace=debug_backtrace(); $b_params=array(""FUNCTION"" => $trace[0][""function""], ""ACTUALNAME"" => $ACTUALNAME ); $b_pattern=""Campo [{2}] obbligatorio""; throw new Exception( qv_babeltranslate($b_pattern, $b_params) ); } $value=qv_sqlize("""", $FIELDTYPE); qv_appendcomma($columns, $ACTUALNAME); qv_appendcomma($values, $value); } } } } unset($r); if($helpful){ if($oper==0) $sql=""INSERT INTO $TABLENAME ($columns) VALUES($values)""; else $sql=""UPDATE $TABLENAME SET $sets WHERE $where""; if(!maestro_execute($maestro, $sql, false, $clobs)){ $babelcode=""QVERR_EXECUTE""; $trace=debug_backtrace(); $b_params=array(""FUNCTION"" => $trace[0][""function""] ); $b_pattern=$maestro->errdescr; throw new Exception( qv_babeltranslate($b_pattern, $b_params) ); } } } } } } } } function qv_sqlize($value, $FIELDTYPE){ $FIELDTYPE=strtoupper($FIELDTYPE); switch($FIELDTYPE){ case ""INTEGER"": $value=strval(intval($value)); break; case ""RATIONAL"": $value=strval(round(floatval($value),7)); break; case ""DATE"": if(strlen($value)<8) $value=LOWEST_DATE; $value=""[:DATE($value)]""; break; case ""TIMESTAMP"": if(strlen($value)<8) $value=LOWEST_TIME; $value=""[:TIME($value)]""; break; case ""BOOLEAN"": if(intval($value)!=0) $value=""1""; else $value=""0""; break; default: if(substr($FIELDTYPE, 0, 9)==""RATIONAL(""){ $dec=intval(substr($FIELDTYPE, 9)); $value=strval(round(floatval($value), $dec)); } elseif(substr($FIELDTYPE, 0, 5)==""CHAR(""){ $len=intval(substr($FIELDTYPE, 5)); $value=""'"".substr(qv_inputUTF8($value), 0, $len).""'""; } elseif(substr($value, 0, 2)!=""[:"" || substr($value, -1, 1)!=""]""){ $value=""'$value'""; } break; } return $value; } function _qv_historicizing($maestro, $prefix, $SYSID, $TYPOLOGYID, $oper){ global $global_quiveruserid, $global_quiverroleid; global $babelcode, $babelparams; $tablebase=$prefix.""S""; $tabletypes=$prefix.""TYPES""; if($t=_qv_cacheloader($maestro, $tabletypes, $TYPOLOGYID)){ if( intval($t[""HISTORICIZING""]) ){ $TABLE=$t[""VIEWNAME""]; if($TABLE==""""){ $TABLE=$tablebase; } if($r=_qv_cacheloader($maestro, $TABLE, $SYSID)){ $clobs=false; $DATABAG=json_encode($r); qv_setclob($maestro, ""DATABAG"", $DATABAG, $DATABAG, $clobs); $HISTORYID=qv_createsysid($maestro); $DESCRIPTION=ryqEscapize($r[""DESCRIPTION""]); $TIMEINSERT=qv_strtime($r[""TIMEINSERT""]); $RECORDTIME=qv_strtime($r[""TIMEUPDATE""]); if($RECORDTIME<$TIMEINSERT){ $RECORDTIME=$TIMEINSERT; } $RECORDTIME=""[:TIME($RECORDTIME)]""; $EVENTTIME=""[:NOW()]""; // PREDISPONGO COLONNE E VALORI DA REGISTRARE $columns=""SYSID,RECORDID,DESCRIPTION,RECORDTIME,TABLEBASE,TYPOLOGYID,OPERTYPE,ROLEID,USERID,EVENTTIME,DATABAG""; $values=""'$HISTORYID','$SYSID','$DESCRIPTION',$RECORDTIME,'$tablebase','$TYPOLOGYID','$oper','$global_quiverroleid','$global_quiveruserid',$EVENTTIME,$DATABAG""; $sql=""INSERT INTO QVHISTORY($columns) VALUES($values)""; if(!maestro_execute($maestro, $sql, false, $clobs)){ $babelcode=""QVERR_EXECUTE""; $trace=debug_backtrace(); $b_params=array(""FUNCTION"" => $trace[0][""function""] ); $b_pattern=$maestro->errdescr; throw new Exception( qv_babeltranslate($b_pattern, $b_params) ); } } } } } ?>",0 "com>. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Kwaku Twumasi-Afriyie - initial API and implementation ******************************************************************************/ package com.quakearts.webapp.facelets.bootstrap.renderers; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import javax.faces.component.UIColumn; import javax.faces.component.UIComponent; import javax.faces.component.UIData; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import com.quakearts.webapp.facelets.bootstrap.components.BootTable; import com.quakearts.webapp.facelets.bootstrap.renderkit.Attribute; import com.quakearts.webapp.facelets.bootstrap.renderkit.AttributeManager; import com.quakearts.webapp.facelets.bootstrap.renderkit.html_basic.HtmlBasicRenderer; import com.quakearts.webapp.facelets.util.UtilityMethods; import static com.quakearts.webapp.facelets.bootstrap.renderkit.RenderKitUtils.*; public class BootTableRenderer extends HtmlBasicRenderer { private static final Attribute[] ATTRIBUTES = AttributeManager.getAttributes(AttributeManager.Key.DATATABLE); @Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { if (!shouldEncode(component)) { return; } BootTable data = (BootTable) component; data.setRowIndex(-1); ResponseWriter writer = context.getResponseWriter(); writer.startElement(""table"", component); writer.writeAttribute(""id"", component.getClientId(context), ""id""); String styleClass = data.get(""styleClass""); writer.writeAttribute(""class"",""table ""+(styleClass !=null?"" ""+styleClass:""""), ""styleClass""); renderHTML5DataAttributes(context, component); renderPassThruAttributes(context, writer, component, ATTRIBUTES); writer.writeText(""\n"", component, null); UIComponent caption = getFacet(component, ""caption""); if (caption != null) { String captionClass = data.get(""captionClass""); String captionStyle = data.get(""captionStyle""); writer.startElement(""caption"", component); if (captionClass != null) { writer.writeAttribute(""class"", captionClass, ""captionClass""); } if (captionStyle != null) { writer.writeAttribute(""style"", captionStyle, ""captionStyle""); } encodeRecursive(context, caption); writer.endElement(""caption""); } UIComponent colGroups = getFacet(component, ""colgroups""); if (colGroups != null) { encodeRecursive(context, colGroups); } BootMetaInfo info = getMetaInfo(context, component); UIComponent header = getFacet(component, ""header""); if (header != null || info.hasHeaderFacets) { String headerClass = data.get(""headerClass""); writer.startElement(""thead"", component); writer.writeText(""\n"", component, null); if (header != null) { writer.startElement(""tr"", header); writer.startElement(""th"", header); if (headerClass != null) { writer.writeAttribute(""class"", headerClass, ""headerClass""); } if (info.columns.size() > 1) { writer.writeAttribute(""colspan"", String.valueOf(info.columns.size()), null); } writer.writeAttribute(""scope"", ""colgroup"", null); encodeRecursive(context, header); writer.endElement(""th""); writer.endElement(""tr""); writer.write(""\n""); } if (info.hasHeaderFacets) { writer.startElement(""tr"", component); writer.writeText(""\n"", component, null); for (UIColumn column : info.columns) { String columnHeaderClass = info.getCurrentHeaderClass(); writer.startElement(""th"", column); if (columnHeaderClass != null) { writer.writeAttribute(""class"", columnHeaderClass, ""columnHeaderClass""); } else if (headerClass != null) { writer.writeAttribute(""class"", headerClass, ""headerClass""); } writer.writeAttribute(""scope"", ""col"", null); UIComponent facet = getFacet(column, ""header""); if (facet != null) { encodeRecursive(context, facet); } writer.endElement(""th""); writer.writeText(""\n"", component, null); } writer.endElement(""tr""); writer.write(""\n""); } writer.endElement(""thead""); writer.writeText(""\n"", component, null); } } @Override public void encodeChildren(FacesContext context, UIComponent component) throws IOException { if (!shouldEncodeChildren(component)) { return; } UIData data = (UIData) component; ResponseWriter writer = context.getResponseWriter(); BootMetaInfo info = getMetaInfo(context, data); if(info.columns.isEmpty()) { writer.startElement(""tbody"", component); renderEmptyTableRow(writer, component); writer.endElement(""tbody""); return; } int processed = 0; int rowIndex = data.getFirst() - 1; int rows = data.getRows(); List bodyRows = getBodyRows(context.getExternalContext().getApplicationMap(), data); boolean hasBodyRows = (bodyRows != null && !bodyRows.isEmpty()); boolean wroteTableBody = false; if (!hasBodyRows) { writer.startElement(""tbody"", component); writer.writeText(""\n"", component, null); } boolean renderedRow = false; while (true) { if ((rows > 0) && (++processed > rows)) { break; } data.setRowIndex(++rowIndex); if (!data.isRowAvailable()) { break; } if (hasBodyRows && bodyRows.contains(data.getRowIndex())) { if (wroteTableBody) { writer.endElement(""tbody""); } writer.startElement(""tbody"", data); wroteTableBody = true; } writer.startElement(""tr"", component); if (info.rowClasses.length > 0) { writer.writeAttribute(""class"", info.getCurrentRowClass(), ""rowClasses""); } writer.writeText(""\n"", component, null); info.newRow(); for (UIColumn column : info.columns) { boolean isRowHeader = Boolean.TRUE.equals(column.getAttributes() .get(""rowHeader"")); if (isRowHeader) { writer.startElement(""th"", column); writer.writeAttribute(""scope"", ""row"", null); } else { writer.startElement(""td"", column); } String columnClass = info.getCurrentColumnClass(); if (columnClass != null) { writer.writeAttribute(""class"", columnClass, ""columnClasses""); } for (Iterator gkids = getChildren(column); gkids .hasNext();) { encodeRecursive(context, gkids.next()); } if (isRowHeader) { writer.endElement(""th""); } else { writer.endElement(""td""); } writer.writeText(""\n"", component, null); } writer.endElement(""tr""); writer.write(""\n""); renderedRow = true; } if(!renderedRow) { renderEmptyTableRow(writer, data); } writer.endElement(""tbody""); writer.writeText(""\n"", component, null); data.setRowIndex(-1); } @Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); BootMetaInfo info = getMetaInfo(context, component); UIComponent footer = getFacet(component, ""footer""); if (footer != null || info.hasFooterFacets) { String footerClass = (String) component.getAttributes().get(""footerClass""); writer.startElement(""tfoot"", component); writer.writeText(""\n"", component, null); if (info.hasFooterFacets) { writer.startElement(""tr"", component); writer.writeText(""\n"", component, null); for (UIColumn column : info.columns) { String columnFooterClass = (String) column.getAttributes().get( ""footerClass""); writer.startElement(""td"", column); if (columnFooterClass != null) { writer.writeAttribute(""class"", columnFooterClass, ""columnFooterClass""); } else if (footerClass != null) { writer.writeAttribute(""class"", footerClass, ""footerClass""); } UIComponent facet = getFacet(column, ""footer""); if (facet != null) { encodeRecursive(context, facet); } writer.endElement(""td""); writer.writeText(""\n"", component, null); } writer.endElement(""tr""); writer.write(""\n""); } if (footer != null) { writer.startElement(""tr"", footer); writer.startElement(""td"", footer); if (footerClass != null) { writer.writeAttribute(""class"", footerClass, ""footerClass""); } if (info.columns.size() > 1) { writer.writeAttribute(""colspan"", String.valueOf(info.columns.size()), null); } encodeRecursive(context, footer); writer.endElement(""td""); writer.endElement(""tr""); writer.write(""\n""); } writer.endElement(""tfoot""); writer.writeText(""\n"", component, null); } clearMetaInfo(context, component); ((UIData) component).setRowIndex(-1); writer.endElement(""table""); writer.writeText(""\n"", component, null); } private List getBodyRows(Map appMap, UIData data) { List result = null; String bodyRows = (String) data.getAttributes().get(""bodyrows""); if (bodyRows != null) { String [] rows = UtilityMethods.split(appMap, bodyRows, "",""); if (rows != null) { result = new ArrayList(rows.length); for (String curRow : rows) { result.add(Integer.valueOf(curRow)); } } } return result; } private void renderEmptyTableRow(final ResponseWriter writer, final UIComponent component) throws IOException { writer.startElement(""tr"", component); writer.startElement(""td"", component); writer.endElement(""td""); writer.endElement(""tr""); } protected BootTableRenderer.BootMetaInfo getMetaInfo(FacesContext context, UIComponent table) { String key = createKey(table); Map attributes = context.getAttributes(); BootMetaInfo info = (BootMetaInfo) attributes .get(key); if (info == null) { info = new BootMetaInfo(table); attributes.put(key, info); } return info; } protected void clearMetaInfo(FacesContext context, UIComponent table) { context.getAttributes().remove(createKey(table)); } protected String createKey(UIComponent table) { return BootMetaInfo.KEY + '_' + table.hashCode(); } private static class BootMetaInfo { private static final UIColumn PLACE_HOLDER_COLUMN = new UIColumn(); private static final String[] EMPTY_STRING_ARRAY = new String[0]; public static final String KEY = BootMetaInfo.class.getName(); public final String[] rowClasses; public final String[] columnClasses; public final String[] headerClasses; public final List columns; public final boolean hasHeaderFacets; public final boolean hasFooterFacets; public final int columnCount; public int columnStyleCounter; public int headerStyleCounter; public int rowStyleCounter; public BootMetaInfo(UIComponent table) { rowClasses = getRowClasses(table); columnClasses = getColumnClasses(table); headerClasses = getHeaderClasses(table); columns = getColumns(table); columnCount = columns.size(); hasHeaderFacets = hasFacet(""header"", columns); hasFooterFacets = hasFacet(""footer"", columns); } public void newRow() { columnStyleCounter = 0; headerStyleCounter = 0; } public String getCurrentColumnClass() { String style = null; if (columnStyleCounter < columnClasses.length && columnStyleCounter <= columnCount) { style = columnClasses[columnStyleCounter++]; } return ((style != null && style.length() > 0) ? style : null); } public String getCurrentHeaderClass() { String style = null; if (headerStyleCounter < headerClasses.length && headerStyleCounter <= columnCount) { style = headerClasses[headerStyleCounter++]; } return ((style != null && style.length() > 0) ? style : null); } public String getCurrentRowClass() { String style = rowClasses[rowStyleCounter++]; if (rowStyleCounter >= rowClasses.length) { rowStyleCounter = 0; } return style; } private static String[] getColumnClasses(UIComponent table) { String values = ((BootTable) table).get(""columnClasses""); if (values == null) { return EMPTY_STRING_ARRAY; } Map appMap = FacesContext.getCurrentInstance() .getExternalContext().getApplicationMap(); return UtilityMethods.split(appMap, values.trim(), "",""); } private static String[] getHeaderClasses(UIComponent table) { String values = ((BootTable) table).get(""headerClasses""); if (values == null) { return EMPTY_STRING_ARRAY; } Map appMap = FacesContext.getCurrentInstance() .getExternalContext().getApplicationMap(); return UtilityMethods.split(appMap, values.trim(), "",""); } private static List getColumns(UIComponent table) { if (table instanceof UIData) { int childCount = table.getChildCount(); if (childCount > 0) { List results = new ArrayList(childCount); for (UIComponent kid : table.getChildren()) { if ((kid instanceof UIColumn) && kid.isRendered()) { results.add((UIColumn) kid); } } return results; } else { return Collections.emptyList(); } } else { int count; Object value = table.getAttributes().get(""columns""); if ((value != null) && (value instanceof Integer)) { count = ((Integer) value); } else { count = 2; } if (count < 1) { count = 1; } List result = new ArrayList(count); for (int i = 0; i < count; i++) { result.add(PLACE_HOLDER_COLUMN); } return result; } } private static boolean hasFacet(String name, List columns) { if (!columns.isEmpty()) { for (UIColumn column : columns) { if (column.getFacetCount() > 0) { if (column.getFacets().containsKey(name)) { return true; } } } } return false; } private static String[] getRowClasses(UIComponent table) { String values = ((BootTable) table).get(""rowClasses""); if (values == null) { return (EMPTY_STRING_ARRAY); } Map appMap = FacesContext.getCurrentInstance() .getExternalContext().getApplicationMap(); return UtilityMethods.split(appMap, values.trim(), "",""); } } } ",0 "g/css-backgrounds/#border-image"" />
This text should not have a border, just corner dots
",0 "class=""tableheader"">{LANG[TITLE_GALLERY_ADD]} {if SET_GALLERY_SUBGALS} {LANG[CREATEIN]}: {/if} {if SET_SECTIONS} {LANG[SECTION]}:
({LANG[CTRLMULTI]}) {/if} {LANG[TITLE]}: {LANG[DESCRIPTION]}: ({LANG[OPTIONAL]}) {LANG[PASSWORD]}: ({LANG[OPTIONAL]}) {LANG[TAGS]}:
({LANG[OPTIONAL]}, {LANG[TAGSINFO]})
{LANG[META_DESCRIPTION]}: ({LANG[OPTIONAL]}) {if MODULE_PRODUCTS} {LANG[LINKPRODUCT]}: ({LANG[OPTIONAL]}) {/if}
{LANG[OPTIONS]}
{if SET_GALLERY_SEARCHABLE}
{/if} {if SET_GALLERY_GALCOMS}
{/if}
{if RIGHT_GALLERY_ENABLE}{/if}
{if RIGHT_GALLERY_PADD} {/if}
{if !SET_GALLERY_SUBGALS}{/if} ",0 "n 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. */ package com.evolveum.midpoint.common.policy; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import org.apache.commons.lang.Validate; import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.schema.result.OperationResultStatus; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; import com.evolveum.midpoint.xml.ns._public.common.common_3.LimitationsType; import com.evolveum.midpoint.xml.ns._public.common.common_3.PasswordLifeTimeType; import com.evolveum.midpoint.xml.ns._public.common.common_3.StringLimitType; import com.evolveum.midpoint.xml.ns._public.common.common_3.StringPolicyType; import com.evolveum.midpoint.xml.ns._public.common.common_3.ValuePolicyType; import com.evolveum.prism.xml.ns._public.types_3.ProtectedStringType; /** * * @author mamut * */ public class PasswordPolicyUtils { private static final transient Trace LOGGER = TraceManager.getTrace(PasswordPolicyUtils.class); private static final String DOT_CLASS = PasswordPolicyUtils.class.getName() + "".""; private static final String OPERATION_PASSWORD_VALIDATION = DOT_CLASS + ""passwordValidation""; /** * add defined default values * * @param pp * @return */ public static void normalize(ValuePolicyType pp) { if (null == pp) { throw new IllegalArgumentException(""Password policy cannot be null""); } if (null == pp.getStringPolicy()) { StringPolicyType sp = new StringPolicyType(); pp.setStringPolicy(StringPolicyUtils.normalize(sp)); } else { pp.setStringPolicy(StringPolicyUtils.normalize(pp.getStringPolicy())); } if (null == pp.getLifetime()) { PasswordLifeTimeType lt = new PasswordLifeTimeType(); lt.setExpiration(-1); lt.setWarnBeforeExpiration(0); lt.setLockAfterExpiration(0); lt.setMinPasswordAge(0); lt.setPasswordHistoryLength(0); } return; } /** * Check provided password against provided policy * * @param password * - password to check * @param policies * - Password List of policies used to check * @param result * - Operation result of password validator. * @return true if password meet all criteria , false if any criteria is not * met */ public static boolean validatePassword(String password, List policies, OperationResult result) { boolean ret=true; //iterate through policies for (ValuePolicyType pp: policies) { OperationResult op = validatePassword(password, pp); result.addSubresult(op); //if one fail then result is failure if (ret == true && ! op.isSuccess()) { ret = false; } } return ret; } public static boolean validatePassword(String password, List> policies) { boolean ret=true; //iterate through policies for (PrismObject pp: policies) { OperationResult op = validatePassword(password, pp.asObjectable()); // result.addSubresult(op); //if one fail then result is failure if (ret == true && ! op.isSuccess()) { ret = false; } } return ret; } public static boolean validatePassword(ProtectedStringType password, List> policies) { boolean ret=true; //iterate through policies for (PrismObject pp: policies) { OperationResult op = validatePassword(password.getClearValue(), pp.asObjectable()); // result.addSubresult(op); //if one fail then result is failure if (ret == true && ! op.isSuccess()) { ret = false; } } return ret; } /** * Check provided password against provided policy * * @param password * - password to check * @param pp * - Password policy used to check * @param result * - Operation result of password validator. * @return true if password meet all criteria , false if any criteria is not * met */ public static boolean validatePassword(String password, ValuePolicyType pp, OperationResult result) { OperationResult op = validatePassword(password, pp); result.addSubresult(op); return op.isSuccess(); } /** * Check provided password against provided policy * * @param password * - password to check * @param pp * - Password policy used * @return - Operation result of this validation */ public static OperationResult validatePassword(String password, ValuePolicyType pp) { // check input params // if (null == pp) { // throw new IllegalArgumentException(""No policy provided: NULL""); // } // // if (null == password) { // throw new IllegalArgumentException(""Password for validaiton is null.""); // } Validate.notNull(pp, ""Password policy must not be null.""); Validate.notNull(password, ""Password to validate must not be null.""); OperationResult ret = new OperationResult(OPERATION_PASSWORD_VALIDATION); ret.addParam(""policyName"", pp.getName()); normalize(pp); LimitationsType lims = pp.getStringPolicy().getLimitations(); StringBuilder message = new StringBuilder(); // Test minimal length if (lims.getMinLength() == null){ lims.setMinLength(0); } if (lims.getMinLength() > password.length()) { String msg = ""Required minimal size ("" + lims.getMinLength() + "") of password is not met (password length: "" + password.length() + "")""; ret.addSubresult(new OperationResult(""Check global minimal length"", OperationResultStatus.FATAL_ERROR, msg)); message.append(msg); message.append(""\n""); } // else { // ret.addSubresult(new OperationResult(""Check global minimal length. Minimal length of password OK."", // OperationResultStatus.SUCCESS, ""PASSED"")); // } // Test maximal length if (lims.getMaxLength() != null) { if (lims.getMaxLength() < password.length()) { String msg = ""Required maximal size ("" + lims.getMaxLength() + "") of password was exceeded (password length: "" + password.length() + "").""; ret.addSubresult(new OperationResult(""Check global maximal length"", OperationResultStatus.FATAL_ERROR, msg)); message.append(msg); message.append(""\n""); } // else { // ret.addSubresult(new OperationResult(""Check global maximal length. Maximal length of password OK."", // OperationResultStatus.SUCCESS, ""PASSED"")); // } } // Test uniqueness criteria HashSet tmp = new HashSet(StringPolicyUtils.stringTokenizer(password)); if (lims.getMinUniqueChars() != null) { if (lims.getMinUniqueChars() > tmp.size()) { String msg = ""Required minimal count of unique characters ("" + lims.getMinUniqueChars() + "") in password are not met (unique characters in password "" + tmp.size() + "")""; ret.addSubresult(new OperationResult(""Check minimal count of unique chars"", OperationResultStatus.FATAL_ERROR, msg)); message.append(msg); message.append(""\n""); } // else { // ret.addSubresult(new OperationResult( // ""Check minimal count of unique chars. Password satisfies minimal required unique characters."", // OperationResultStatus.SUCCESS, ""PASSED"")); // } } // check limitation HashSet allValidChars = new HashSet(128); ArrayList validChars = null; ArrayList passwd = StringPolicyUtils.stringTokenizer(password); if (lims.getLimit() == null || lims.getLimit().isEmpty()){ if (message.toString() == null || message.toString().isEmpty()){ ret.computeStatus(); } else { ret.computeStatus(message.toString()); } return ret; } for (StringLimitType l : lims.getLimit()) { OperationResult limitResult = new OperationResult(""Tested limitation: "" + l.getDescription()); if (null != l.getCharacterClass().getValue()) { validChars = StringPolicyUtils.stringTokenizer(l.getCharacterClass().getValue()); } else { validChars = StringPolicyUtils.stringTokenizer(StringPolicyUtils.collectCharacterClass(pp .getStringPolicy().getCharacterClass(), l.getCharacterClass().getRef())); } // memorize validChars allValidChars.addAll(validChars); // Count how many character for this limitation are there int count = 0; for (String s : passwd) { if (validChars.contains(s)) { count++; } } // Test minimal occurrence if (l.getMinOccurs() == null){ l.setMinOccurs(0); } if (l.getMinOccurs() > count) { String msg = ""Required minimal occurrence ("" + l.getMinOccurs() + "") of characters (""+l.getDescription()+"") in password is not met (occurrence of characters in password "" + count + "").""; limitResult.addSubresult(new OperationResult(""Check minimal occurrence of characters"", OperationResultStatus.FATAL_ERROR, msg)); message.append(msg); message.append(""\n""); } // else { // limitResult.addSubresult(new OperationResult(""Check minimal occurrence of characters in password OK."", // OperationResultStatus.SUCCESS, ""PASSED"")); // } // Test maximal occurrence if (l.getMaxOccurs() != null) { if (l.getMaxOccurs() < count) { String msg = ""Required maximal occurrence ("" + l.getMaxOccurs() + "") of characters (""+l.getDescription()+"") in password was exceeded (occurrence of characters in password "" + count + "").""; limitResult.addSubresult(new OperationResult(""Check maximal occurrence of characters"", OperationResultStatus.FATAL_ERROR, msg)); message.append(msg); message.append(""\n""); } // else { // limitResult.addSubresult(new OperationResult( // ""Check maximal occurrence of characters in password OK."", OperationResultStatus.SUCCESS, // ""PASSED"")); // } } // test if first character is valid if (l.isMustBeFirst() == null){ l.setMustBeFirst(false); } if (l.isMustBeFirst() && !validChars.contains(password.substring(0, 1))) { String msg = ""First character is not from allowed set. Allowed set: "" + validChars.toString(); limitResult.addSubresult(new OperationResult(""Check valid first char"", OperationResultStatus.FATAL_ERROR, msg)); message.append(msg); message.append(""\n""); } // else { // limitResult.addSubresult(new OperationResult(""Check valid first char in password OK."", // OperationResultStatus.SUCCESS, ""PASSED"")); // } limitResult.computeStatus(); ret.addSubresult(limitResult); } // Check if there is no invalid character StringBuilder sb = new StringBuilder(); for (String s : passwd) { if (!allValidChars.contains(s)) { // memorize all invalid characters sb.append(s); } } if (sb.length() > 0) { String msg = ""Characters [ "" + sb + "" ] are not allowed to be use in password""; ret.addSubresult(new OperationResult(""Check if password does not contain invalid characters"", OperationResultStatus.FATAL_ERROR, msg)); message.append(msg); message.append(""\n""); } // else { // ret.addSubresult(new OperationResult(""Check if password does not contain invalid characters OK."", // OperationResultStatus.SUCCESS, ""PASSED"")); // } if (message.toString() == null || message.toString().isEmpty()){ ret.computeStatus(); } else { ret.computeStatus(message.toString()); } return ret; } } ",0 "ibf2c.lib; on Linux or Unix systems, link with .../path/to/libf2c.a -lm or, if you install libf2c.a in a standard place, with -lf2c -lm -- in that order, at the end of the command line, as in cc *.o -lf2c -lm Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., http://www.netlib.org/f2c/libf2c.zip */ #include ""f2c.h"" #include ""blaswrap.h"" /* Subroutine */ int dlar1v_(integer *n, integer *b1, integer *bn, doublereal *lambda, doublereal *d__, doublereal *l, doublereal *ld, doublereal * lld, doublereal *pivmin, doublereal *gaptol, doublereal *z__, logical *wantnc, integer *negcnt, doublereal *ztz, doublereal *mingma, integer *r__, integer *isuppz, doublereal *nrminv, doublereal *resid, doublereal *rqcorr, doublereal *work) { /* System generated locals */ integer i__1; doublereal d__1, d__2, d__3; /* Local variables */ integer i__; doublereal s; integer r1, r2; doublereal eps, tmp; integer neg1, neg2, indp, inds; doublereal dplus; integer indlpl, indumn; doublereal dminus; logical sawnan1, sawnan2; /* -- LAPACK auxiliary routine (version 3.2) -- */ /* November 2006 */ /* Purpose */ /* ======= */ /* DLAR1V computes the (scaled) r-th column of the inverse of */ /* the sumbmatrix in rows B1 through BN of the tridiagonal matrix */ /* L D L^T - sigma I. When sigma is close to an eigenvalue, the */ /* computed vector is an accurate eigenvector. Usually, r corresponds */ /* to the index where the eigenvector is largest in magnitude. */ /* The following steps accomplish this computation : */ /* (a) Stationary qd transform, L D L^T - sigma I = L(+) D(+) L(+)^T, */ /* (b) Progressive qd transform, L D L^T - sigma I = U(-) D(-) U(-)^T, */ /* (c) Computation of the diagonal elements of the inverse of */ /* L D L^T - sigma I by combining the above transforms, and choosing */ /* r as the index where the diagonal of the inverse is (one of the) */ /* largest in magnitude. */ /* (d) Computation of the (scaled) r-th column of the inverse using the */ /* twisted factorization obtained by combining the top part of the */ /* the stationary and the bottom part of the progressive transform. */ /* Arguments */ /* ========= */ /* N (input) INTEGER */ /* The order of the matrix L D L^T. */ /* B1 (input) INTEGER */ /* First index of the submatrix of L D L^T. */ /* BN (input) INTEGER */ /* Last index of the submatrix of L D L^T. */ /* LAMBDA (input) DOUBLE PRECISION */ /* The shift. In order to compute an accurate eigenvector, */ /* LAMBDA should be a good approximation to an eigenvalue */ /* of L D L^T. */ /* L (input) DOUBLE PRECISION array, dimension (N-1) */ /* The (n-1) subdiagonal elements of the unit bidiagonal matrix */ /* L, in elements 1 to N-1. */ /* D (input) DOUBLE PRECISION array, dimension (N) */ /* The n diagonal elements of the diagonal matrix D. */ /* LD (input) DOUBLE PRECISION array, dimension (N-1) */ /* The n-1 elements L(i)*D(i). */ /* LLD (input) DOUBLE PRECISION array, dimension (N-1) */ /* The n-1 elements L(i)*L(i)*D(i). */ /* PIVMIN (input) DOUBLE PRECISION */ /* The minimum pivot in the Sturm sequence. */ /* GAPTOL (input) DOUBLE PRECISION */ /* Tolerance that indicates when eigenvector entries are negligible */ /* w.r.t. their contribution to the residual. */ /* Z (input/output) DOUBLE PRECISION array, dimension (N) */ /* On input, all entries of Z must be set to 0. */ /* On output, Z contains the (scaled) r-th column of the */ /* inverse. The scaling is such that Z(R) equals 1. */ /* WANTNC (input) LOGICAL */ /* Specifies whether NEGCNT has to be computed. */ /* NEGCNT (output) INTEGER */ /* If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin */ /* in the matrix factorization L D L^T, and NEGCNT = -1 otherwise. */ /* ZTZ (output) DOUBLE PRECISION */ /* The square of the 2-norm of Z. */ /* MINGMA (output) DOUBLE PRECISION */ /* The reciprocal of the largest (in magnitude) diagonal */ /* element of the inverse of L D L^T - sigma I. */ /* R (input/output) INTEGER */ /* The twist index for the twisted factorization used to */ /* compute Z. */ /* On input, 0 <= R <= N. If R is input as 0, R is set to */ /* the index where (L D L^T - sigma I)^{-1} is largest */ /* in magnitude. If 1 <= R <= N, R is unchanged. */ /* On output, R contains the twist index used to compute Z. */ /* Ideally, R designates the position of the maximum entry in the */ /* eigenvector. */ /* ISUPPZ (output) INTEGER array, dimension (2) */ /* The support of the vector in Z, i.e., the vector Z is */ /* nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ). */ /* NRMINV (output) DOUBLE PRECISION */ /* NRMINV = 1/SQRT( ZTZ ) */ /* RESID (output) DOUBLE PRECISION */ /* The residual of the FP vector. */ /* RESID = ABS( MINGMA )/SQRT( ZTZ ) */ /* RQCORR (output) DOUBLE PRECISION */ /* The Rayleigh Quotient correction to LAMBDA. */ /* RQCORR = MINGMA*TMP */ /* WORK (workspace) DOUBLE PRECISION array, dimension (4*N) */ /* Further Details */ /* =============== */ /* Based on contributions by */ /* Beresford Parlett, University of California, Berkeley, USA */ /* Jim Demmel, University of California, Berkeley, USA */ /* Inderjit Dhillon, University of Texas, Austin, USA */ /* Osni Marques, LBNL/NERSC, USA */ /* Christof Voemel, University of California, Berkeley, USA */ /* ===================================================================== */ /* Parameter adjustments */ --work; --isuppz; --z__; --lld; --ld; --l; --d__; /* Function Body */ eps = dlamch_(""Precision""); if (*r__ == 0) { r1 = *b1; r2 = *bn; } else { r1 = *r__; r2 = *r__; } /* Storage for LPLUS */ indlpl = 0; /* Storage for UMINUS */ indumn = *n; inds = (*n << 1) + 1; indp = *n * 3 + 1; if (*b1 == 1) { work[inds] = 0.; } else { work[inds + *b1 - 1] = lld[*b1 - 1]; } /* Compute the stationary transform (using the differential form) */ /* until the index R2. */ sawnan1 = FALSE_; neg1 = 0; s = work[inds + *b1 - 1] - *lambda; i__1 = r1 - 1; for (i__ = *b1; i__ <= i__1; ++i__) { dplus = d__[i__] + s; work[indlpl + i__] = ld[i__] / dplus; if (dplus < 0.) { ++neg1; } work[inds + i__] = s * work[indlpl + i__] * l[i__]; s = work[inds + i__] - *lambda; } sawnan1 = disnan_(&s); if (sawnan1) { goto L60; } i__1 = r2 - 1; for (i__ = r1; i__ <= i__1; ++i__) { dplus = d__[i__] + s; work[indlpl + i__] = ld[i__] / dplus; work[inds + i__] = s * work[indlpl + i__] * l[i__]; s = work[inds + i__] - *lambda; } sawnan1 = disnan_(&s); L60: if (sawnan1) { /* Runs a slower version of the above loop if a NaN is detected */ neg1 = 0; s = work[inds + *b1 - 1] - *lambda; i__1 = r1 - 1; for (i__ = *b1; i__ <= i__1; ++i__) { dplus = d__[i__] + s; if (abs(dplus) < *pivmin) { dplus = -(*pivmin); } work[indlpl + i__] = ld[i__] / dplus; if (dplus < 0.) { ++neg1; } work[inds + i__] = s * work[indlpl + i__] * l[i__]; if (work[indlpl + i__] == 0.) { work[inds + i__] = lld[i__]; } s = work[inds + i__] - *lambda; } i__1 = r2 - 1; for (i__ = r1; i__ <= i__1; ++i__) { dplus = d__[i__] + s; if (abs(dplus) < *pivmin) { dplus = -(*pivmin); } work[indlpl + i__] = ld[i__] / dplus; work[inds + i__] = s * work[indlpl + i__] * l[i__]; if (work[indlpl + i__] == 0.) { work[inds + i__] = lld[i__]; } s = work[inds + i__] - *lambda; } } /* Compute the progressive transform (using the differential form) */ /* until the index R1 */ sawnan2 = FALSE_; neg2 = 0; work[indp + *bn - 1] = d__[*bn] - *lambda; i__1 = r1; for (i__ = *bn - 1; i__ >= i__1; --i__) { dminus = lld[i__] + work[indp + i__]; tmp = d__[i__] / dminus; if (dminus < 0.) { ++neg2; } work[indumn + i__] = l[i__] * tmp; work[indp + i__ - 1] = work[indp + i__] * tmp - *lambda; } tmp = work[indp + r1 - 1]; sawnan2 = disnan_(&tmp); if (sawnan2) { /* Runs a slower version of the above loop if a NaN is detected */ neg2 = 0; i__1 = r1; for (i__ = *bn - 1; i__ >= i__1; --i__) { dminus = lld[i__] + work[indp + i__]; if (abs(dminus) < *pivmin) { dminus = -(*pivmin); } tmp = d__[i__] / dminus; if (dminus < 0.) { ++neg2; } work[indumn + i__] = l[i__] * tmp; work[indp + i__ - 1] = work[indp + i__] * tmp - *lambda; if (tmp == 0.) { work[indp + i__ - 1] = d__[i__] - *lambda; } } } /* Find the index (from R1 to R2) of the largest (in magnitude) */ /* diagonal element of the inverse */ *mingma = work[inds + r1 - 1] + work[indp + r1 - 1]; if (*mingma < 0.) { ++neg1; } if (*wantnc) { *negcnt = neg1 + neg2; } else { *negcnt = -1; } if (abs(*mingma) == 0.) { *mingma = eps * work[inds + r1 - 1]; } *r__ = r1; i__1 = r2 - 1; for (i__ = r1; i__ <= i__1; ++i__) { tmp = work[inds + i__] + work[indp + i__]; if (tmp == 0.) { tmp = eps * work[inds + i__]; } if (abs(tmp) <= abs(*mingma)) { *mingma = tmp; *r__ = i__ + 1; } } /* Compute the FP vector: solve N^T v = e_r */ isuppz[1] = *b1; isuppz[2] = *bn; z__[*r__] = 1.; *ztz = 1.; /* Compute the FP vector upwards from R */ if (! sawnan1 && ! sawnan2) { i__1 = *b1; for (i__ = *r__ - 1; i__ >= i__1; --i__) { z__[i__] = -(work[indlpl + i__] * z__[i__ + 1]); if (((d__1 = z__[i__], abs(d__1)) + (d__2 = z__[i__ + 1], abs( d__2))) * (d__3 = ld[i__], abs(d__3)) < *gaptol) { z__[i__] = 0.; isuppz[1] = i__ + 1; goto L220; } *ztz += z__[i__] * z__[i__]; } L220: ; } else { /* Run slower loop if NaN occurred. */ i__1 = *b1; for (i__ = *r__ - 1; i__ >= i__1; --i__) { if (z__[i__ + 1] == 0.) { z__[i__] = -(ld[i__ + 1] / ld[i__]) * z__[i__ + 2]; } else { z__[i__] = -(work[indlpl + i__] * z__[i__ + 1]); } if (((d__1 = z__[i__], abs(d__1)) + (d__2 = z__[i__ + 1], abs( d__2))) * (d__3 = ld[i__], abs(d__3)) < *gaptol) { z__[i__] = 0.; isuppz[1] = i__ + 1; goto L240; } *ztz += z__[i__] * z__[i__]; } L240: ; } /* Compute the FP vector downwards from R in blocks of size BLKSIZ */ if (! sawnan1 && ! sawnan2) { i__1 = *bn - 1; for (i__ = *r__; i__ <= i__1; ++i__) { z__[i__ + 1] = -(work[indumn + i__] * z__[i__]); if (((d__1 = z__[i__], abs(d__1)) + (d__2 = z__[i__ + 1], abs( d__2))) * (d__3 = ld[i__], abs(d__3)) < *gaptol) { z__[i__ + 1] = 0.; isuppz[2] = i__; goto L260; } *ztz += z__[i__ + 1] * z__[i__ + 1]; } L260: ; } else { /* Run slower loop if NaN occurred. */ i__1 = *bn - 1; for (i__ = *r__; i__ <= i__1; ++i__) { if (z__[i__] == 0.) { z__[i__ + 1] = -(ld[i__ - 1] / ld[i__]) * z__[i__ - 1]; } else { z__[i__ + 1] = -(work[indumn + i__] * z__[i__]); } if (((d__1 = z__[i__], abs(d__1)) + (d__2 = z__[i__ + 1], abs( d__2))) * (d__3 = ld[i__], abs(d__3)) < *gaptol) { z__[i__ + 1] = 0.; isuppz[2] = i__; goto L280; } *ztz += z__[i__ + 1] * z__[i__ + 1]; } L280: ; } /* Compute quantities for convergence test */ tmp = 1. / *ztz; *nrminv = sqrt(tmp); *resid = abs(*mingma) * *nrminv; *rqcorr = *mingma * tmp; return 0; /* End of DLAR1V */ } /* dlar1v_ */ ",0 "lic class EventInSFImage extends EventIn { public EventInSFImage() { EventType = FieldTypes.SFIMAGE; } public void setValue(int width, int height, int components, byte[] pixels) throws IllegalArgumentException { int count; int pixcount; String val; BigInteger newval; byte xx[]; if (pixels.length != (width*height*components)) { throw new IllegalArgumentException(); } if ((components < 1) || (components > 4)) { throw new IllegalArgumentException(); } // use BigInt to ensure sign bit does not frick us up. xx = new byte[components+1]; xx[0] = (byte) 0; // no sign bit here! val = new String("""" + width + "" "" + height + "" "" + components); if (pixels== null) { pixcount = 0;} else {pixcount=pixels.length;} if (components == 1) { for (count = 0; count < pixcount; count++) { xx[1] = pixels[count]; newval = new BigInteger(xx); //System.out.println (""Big int "" + newval.toString(16)); val = val.concat("" 0x"" + newval.toString(16)); } } if (components == 2) { for (count = 0; count < pixcount; count+=2) { xx[1] = pixels[count]; xx[2] = pixels[count+1]; newval = new BigInteger(xx); //System.out.println (""Big int "" + newval.toString(16)); val = val.concat("" 0x"" + newval.toString(16)); } } if (components == 3) { for (count = 0; count < pixcount; count+=3) { xx[1] = pixels[count]; xx[2] = pixels[count+1]; xx[3]=pixels[count+2]; newval = new BigInteger(xx); //System.out.println (""Big int "" + newval.toString(16)); val = val.concat("" 0x"" + newval.toString(16)); } } if (components == 4) { for (count = 0; count < pixcount; count+=4) { xx[1] = pixels[count]; xx[2] = pixels[count+1]; xx[3]=pixels[count+2]; xx[4]=pixels[count+3]; newval = new BigInteger(xx); //System.out.println (""Big int "" + newval.toString(16)); val = val.concat("" 0x"" + newval.toString(16)); } } //System.out.println (""sending "" + val); Browser.newSendEvent (this, val.length() + "":"" + val + "" ""); return; } } ",0 " #include ""wx\listctrl.h"" #include ""wxPLplotwindow.h"" #include ""Core/Core.h"" #include ""Geometry_Implementation.h"" typedef void (*selection_callback_type)(const boost::container::list&,const boost::container::list&,const boost::container::list&,boost::container::vector>&); typedef void (*double_click_callback_type)(const boost::container::list&,boost::container::vector>&,boost::container::vector>&); typedef bool (*submission_callback_type)(const boost::container::list&,const boost::container::vector&,const boost::container::vector&); typedef float (*pixel_size_callback_type)(float); typedef void (*reschedule_callback_type)(void*, int); using namespace polaris; //#include ""io/Io.h"" //#include ""User_Space\User_Space.h"" //#include ""../User_Space/User_Space_with_odb.h"" //#include ""Geometry_Implementation.h"" //implementation class Antares_Implementation; ",0 "----+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ * || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ * * Crazyflie 2.0 NRF Firmware * Copyright (c) 2014, Bitcraze AB, All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. * * esb.c - Implementation of the Nordic ESB protocol in PRX mode for nRF51822 */ #include #include #include #include ""esb.h"" #include #ifdef BLE #include #include #endif #define RXQ_LEN 16 #define TXQ_LEN 16 static bool isInit = true; static int channel = 2; static int datarate = esbDatarate2M; static int txpower = RADIO_TXPOWER_TXPOWER_0dBm; static bool contwave = false; #ifdef CADDRESS static uint64_t address = CADDRESS; #else static uint64_t address = 0xE7E7E7E7E7ULL; #endif static enum {doTx, doRx} rs; //Radio state static EsbPacket rxPackets[TXQ_LEN]; static int rxq_head = 0; static int rxq_tail = 0; static EsbPacket txPackets[TXQ_LEN]; static int txq_head = 0; static int txq_tail = 0; // 1bit packet counters static int curr_down = 1; static int curr_up = 1; static bool has_safelink; static EsbPacket ackPacket; // Empty ack packet static EsbPacket servicePacket; // Packet sent to answer a low level request /* helper functions */ static uint32_t swap_bits(uint32_t inp) { uint32_t i; uint32_t retval = 0; inp = (inp & 0x000000FFUL); for(i = 0; i < 8; i++) { retval |= ((inp >> i) & 0x01) << (7 - i); } return retval; } static uint32_t bytewise_bitswap(uint32_t inp) { return (swap_bits(inp >> 24) << 24) | (swap_bits(inp >> 16) << 16) | (swap_bits(inp >> 8) << 8) | (swap_bits(inp)); } /* Radio protocol implementation */ static bool isRetry(EsbPacket *pk) { static int prevPid; static int prevCrc; bool retry = false; if ((prevPid == pk->pid) && (prevCrc == pk->crc)) { retry = true; } prevPid = pk->pid; prevCrc = pk->crc; return retry; } // Handles the queue static void setupTx(bool retry) { static EsbPacket * lastSentPacket; if (retry) { NRF_RADIO->PACKETPTR = (uint32_t)lastSentPacket; } else { if (lastSentPacket != &ackPacket) { //No retry, TX payload has been sent! if (txq_head != txq_tail) { txq_tail = ((txq_tail+1)%TXQ_LEN); } } if (lastSentPacket == &servicePacket) { servicePacket.size = 0; } if (servicePacket.size) { NRF_RADIO->PACKETPTR = (uint32_t)&servicePacket; lastSentPacket = &servicePacket; } else if (txq_tail != txq_head) { // Send next TX packet NRF_RADIO->PACKETPTR = (uint32_t)&txPackets[txq_tail]; if (has_safelink) { txPackets[txq_tail].data[0] = (txPackets[txq_tail].data[0]&0xf3) | curr_down<<2; } lastSentPacket = &txPackets[txq_tail]; } else { // Send empty ACK #ifdef RSSI_ACK_PACKET ackPacket.size = 3; ackPacket.data[0] = 0xf3 | curr_down<<2; ackPacket.data[1] = 0x01; ackPacket.data[2] = NRF_RADIO->RSSISAMPLE; #else ackPacket.size = 1; ackPacket.data[0] = 0xf3 | curr_down<<2; #endif NRF_RADIO->PACKETPTR = (uint32_t)&ackPacket; lastSentPacket = &ackPacket; } } //After being disabled the radio will automatically send the ACK NRF_RADIO->SHORTS &= ~RADIO_SHORTS_DISABLED_RXEN_Msk; NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_TXEN_Msk; rs = doTx; NRF_RADIO->TASKS_DISABLE = 1UL; } static void setupRx() { NRF_RADIO->PACKETPTR = (uint32_t)&rxPackets[rxq_head]; NRF_RADIO->SHORTS &= ~RADIO_SHORTS_DISABLED_TXEN_Msk; NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_RXEN_Msk; rs = doRx; NRF_RADIO->TASKS_DISABLE = 1UL; } void RADIO_IRQHandler() { esbInterruptHandler(); } void esbInterruptHandler() { EsbPacket *pk; if (NRF_RADIO->EVENTS_END) { NRF_RADIO->EVENTS_END = 0UL; switch (rs){ case doRx: //Wrong CRC packet are dropped if (!NRF_RADIO->CRCSTATUS) { NRF_RADIO->TASKS_START = 1UL; return; } pk = &rxPackets[rxq_head]; pk->rssi = (uint8_t) NRF_RADIO->RSSISAMPLE; pk->crc = NRF_RADIO->RXCRC; // If no more space available on RX queue, drop packet! if (((rxq_head+1)%RXQ_LEN) == rxq_tail) { NRF_RADIO->TASKS_START = 1UL; return; } // If this packet is a retry, send the same ACK again if (isRetry(pk)) { setupTx(true); return; } // Match safeLink packet and answer it #if 0 // Disabled until syslink is fixed in STM32, see bitcraze/crazyflie-firmware#69 if (pk->size == 3 && (pk->data[0]&0xf3) == 0xf3 && pk->data[1] == 0x05) { has_safelink = pk->data[2]; memcpy(servicePacket.data, pk->data, 3); servicePacket.size = 3; setupTx(false); // Reset packet counters curr_down = 1; curr_up = 1; return; } #endif // Good packet received, yea! if (!has_safelink || (pk->data[0] & 0x08) != curr_up<<3) { rxq_head = ((rxq_head+1)%RXQ_LEN); curr_up = 1-curr_up; } if (!has_safelink || (pk->data[0]&0x04) != curr_down<<2) { curr_down = 1-curr_down; setupTx(false); } else { setupTx(true); } break; case doTx: //Setup RX for next packet setupRx(); break; } } } /* Public API */ // S1 is used for compatibility with NRF24L0+. These three bits are used // to store the PID and NO_ACK. #define PACKET0_S1_SIZE (3UL) // S0 is not used #define PACKET0_S0_SIZE (0UL) // The size of the packet length field is 6 bits #define PACKET0_PAYLOAD_SIZE (6UL) // The size of the base address field is 4 bytes #define PACKET1_BASE_ADDRESS_LENGTH (4UL) // Don't use any extra added length besides the length field when sending #define PACKET1_STATIC_LENGTH (0UL) // Max payload allowed in a packet #define PACKET1_PAYLOAD_SIZE (32UL) void esbInit() { NRF_RADIO->POWER = 1; // Enable Radio interrupts #ifndef BLE NVIC_SetPriority(RADIO_IRQn, 3); NVIC_EnableIRQ(RADIO_IRQn); #else NVIC_EnableIRQ(RADIO_IRQn); #endif NRF_RADIO->TXPOWER = (txpower << RADIO_TXPOWER_TXPOWER_Pos); switch (datarate) { case esbDatarate250K: NRF_RADIO->MODE = (RADIO_MODE_MODE_Nrf_250Kbit << RADIO_MODE_MODE_Pos); break; case esbDatarate1M: NRF_RADIO->MODE = (RADIO_MODE_MODE_Nrf_1Mbit << RADIO_MODE_MODE_Pos); break; case esbDatarate2M: NRF_RADIO->MODE = (RADIO_MODE_MODE_Nrf_2Mbit << RADIO_MODE_MODE_Pos); break; } NRF_RADIO->FREQUENCY = channel; if (contwave) { NRF_RADIO->TEST = 3; NRF_RADIO->TASKS_RXEN = 1U; return; } // Radio address config // Using logical address 0 so only BASE0 and PREFIX0 & 0xFF are used NRF_RADIO->PREFIX0 = 0xC4C3C200UL | (bytewise_bitswap(address >> 32) & 0xFF); // Prefix byte of addresses 3 to 0 NRF_RADIO->PREFIX1 = 0xC5C6C7C8UL; // Prefix byte of addresses 7 to 4 NRF_RADIO->BASE0 = bytewise_bitswap((uint32_t)address); // Base address for prefix 0 NRF_RADIO->BASE1 = 0x00C2C2C2UL; // Base address for prefix 1-7 NRF_RADIO->TXADDRESS = 0x00UL; // Set device address 0 to use when transmitting NRF_RADIO->RXADDRESSES = 0x01UL; // Enable device address 0 to use which receiving // Packet configuration NRF_RADIO->PCNF0 = (PACKET0_S1_SIZE << RADIO_PCNF0_S1LEN_Pos) | (PACKET0_S0_SIZE << RADIO_PCNF0_S0LEN_Pos) | (PACKET0_PAYLOAD_SIZE << RADIO_PCNF0_LFLEN_Pos); // Packet configuration NRF_RADIO->PCNF1 = (RADIO_PCNF1_WHITEEN_Disabled << RADIO_PCNF1_WHITEEN_Pos) | (RADIO_PCNF1_ENDIAN_Big << RADIO_PCNF1_ENDIAN_Pos) | (PACKET1_BASE_ADDRESS_LENGTH << RADIO_PCNF1_BALEN_Pos) | (PACKET1_STATIC_LENGTH << RADIO_PCNF1_STATLEN_Pos) | (PACKET1_PAYLOAD_SIZE << RADIO_PCNF1_MAXLEN_Pos); // CRC Config NRF_RADIO->CRCCNF = (RADIO_CRCCNF_LEN_Two << RADIO_CRCCNF_LEN_Pos); // Number of checksum bits NRF_RADIO->CRCINIT = 0xFFFFUL; // Initial value NRF_RADIO->CRCPOLY = 0x11021UL; // CRC poly: x^16+x^12^x^5+1 // Enable interrupt for end event NRF_RADIO->INTENSET = RADIO_INTENSET_END_Msk; // Set all shorts so that RSSI is measured and only END is required interrupt NRF_RADIO->SHORTS = RADIO_SHORTS_READY_START_Msk; NRF_RADIO->SHORTS |= RADIO_SHORTS_ADDRESS_RSSISTART_Msk; NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_TXEN_Msk; NRF_RADIO->SHORTS |= RADIO_SHORTS_DISABLED_RSSISTOP_Enabled; // Set RX buffer and start RX rs = doRx; NRF_RADIO->PACKETPTR = (uint32_t)&rxPackets[rxq_head]; NRF_RADIO->TASKS_RXEN = 1U; isInit = true; } void esbReset() { if (!isInit) return; #ifndef BLE __disable_irq(); #endif NRF_RADIO->TASKS_DISABLE = 1; NRF_RADIO->POWER = 0; NVIC_GetPendingIRQ(RADIO_IRQn); __enable_irq(); #ifndef BLE esbInit(); #endif } void esbDeinit() { #ifndef BLE NVIC_DisableIRQ(RADIO_IRQn); #endif NRF_RADIO->INTENCLR = RADIO_INTENSET_END_Msk; NRF_RADIO->SHORTS = 0; NRF_RADIO->TASKS_DISABLE = 1; NRF_RADIO->POWER = 0; } bool esbIsRxPacket() { return (rxq_head != rxq_tail); } EsbPacket * esbGetRxPacket() { EsbPacket *pk = NULL; if (esbIsRxPacket()) { pk = &rxPackets[rxq_tail]; } return pk; } void esbReleaseRxPacket() { rxq_tail = (rxq_tail+1)%RXQ_LEN; } bool esbCanTxPacket() { return ((txq_head+1)%TXQ_LEN)!=txq_tail; } EsbPacket * esbGetTxPacket() { EsbPacket *pk = NULL; if (esbCanTxPacket()) { pk = &txPackets[txq_head]; } return pk; } void esbSendTxPacket() { txq_head = (txq_head+1)%TXQ_LEN; } void esbSetDatarate(EsbDatarate dr) { datarate = dr; esbReset(); } void ble_advertising_stop(void); void advertising_start(void); void esbSetContwave(bool enable) { contwave = enable; #ifdef BLE if (enable) ble_advertising_stop(); else advertising_start(); #endif esbReset(); } void esbSetChannel(unsigned int ch) { if (channel < 126) { channel = ch; } esbReset(); } void esbSetTxPower(int power) { txpower = power; esbReset(); } void esbSetAddress(uint64_t addr) { address = addr; esbReset(); } ",0 ">Uses of Class org.apache.poi.ss.formula.functions.LogicalFunction (POI API Documentation)
  • Prev
  • Next

Uses of Class
org.apache.poi.ss.formula.functions.LogicalFunction

No usage of org.apache.poi.ss.formula.functions.LogicalFunction
  • Prev
  • Next

Copyright 2016 The Apache Software Foundation or its licensors, as applicable.

",0 "e permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WorkerCrypto_h #define WorkerCrypto_h #include ""bindings/v8/ScriptWrappable.h"" #include ""wtf/Forward.h"" #include ""wtf/PassRefPtr.h"" #include ""wtf/RefCounted.h"" namespace WebCore { class WorkerCrypto : public ScriptWrappable, public RefCounted { public: static PassRefPtr create() { return adoptRef(new WorkerCrypto()); } private: WorkerCrypto(); }; } #endif ",0 "se""). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ package com.amazonaws.services.autoscaling.model; import java.io.Serializable; /** * */ public class DescribeTagsResult implements Serializable, Cloneable { /** *

* One or more tags. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* The token to use when requesting the next set of items. If there are no * additional items to return, the string is empty. *

*/ private String nextToken; /** *

* One or more tags. *

* * @return One or more tags. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* One or more tags. *

* * @param tags * One or more tags. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList( tags); } /** *

* One or more tags. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setTags(java.util.Collection)} or * {@link #withTags(java.util.Collection)} if you want to override the * existing values. *

* * @param tags * One or more tags. * @return Returns a reference to this object so that method calls can be * chained together. */ public DescribeTagsResult withTags(TagDescription... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList( tags.length)); } for (TagDescription ele : tags) { this.tags.add(ele); } return this; } /** *

* One or more tags. *

* * @param tags * One or more tags. * @return Returns a reference to this object so that method calls can be * chained together. */ public DescribeTagsResult withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* The token to use when requesting the next set of items. If there are no * additional items to return, the string is empty. *

* * @param nextToken * The token to use when requesting the next set of items. If there * are no additional items to return, the string is empty. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The token to use when requesting the next set of items. If there are no * additional items to return, the string is empty. *

* * @return The token to use when requesting the next set of items. If there * are no additional items to return, the string is empty. */ public String getNextToken() { return this.nextToken; } /** *

* The token to use when requesting the next set of items. If there are no * additional items to return, the string is empty. *

* * @param nextToken * The token to use when requesting the next set of items. If there * are no additional items to return, the string is empty. * @return Returns a reference to this object so that method calls can be * chained together. */ public DescribeTagsResult withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(""{""); if (getTags() != null) sb.append(""Tags: "" + getTags() + "",""); if (getNextToken() != null) sb.append(""NextToken: "" + getNextToken()); sb.append(""}""); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTagsResult == false) return false; DescribeTagsResult other = (DescribeTagsResult) obj; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public DescribeTagsResult clone() { try { return (DescribeTagsResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( ""Got a CloneNotSupportedException from Object.clone() "" + ""even though we're Cloneable!"", e); } } } ",0 "le = ''; public $separator = false; public $required; public function render_content() { ?> separator ) echo '
'; ?> required as $id => $value ) : if ( isset($id) && isset($value) && get_theme_mod($id,0)==$value ) { ?> null if no response was collected. */ Packet sendPacketAndGetReply(Packet packet); } ",0 "ecision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the ""Software""), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: * Rickard E. (Rik) Faith * Gareth Hughes */ #include #include ""drmP.h"" #include ""drm.h"" #include ""mga_drm.h"" #include ""mga_drv.h"" #include ""drm_pciids.h"" static int mga_driver_device_is_agp(drm_device_t * dev); static int postinit( struct drm_device *dev, unsigned long flags ) { drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private; dev_priv->mmio_base = pci_resource_start(dev->pdev, 1); dev_priv->mmio_size = pci_resource_len(dev->pdev, 1); dev->counters += 3; dev->types[6] = _DRM_STAT_IRQ; dev->types[7] = _DRM_STAT_PRIMARY; dev->types[8] = _DRM_STAT_SECONDARY; DRM_INFO( ""Initialized %s %d.%d.%d %s on minor %d: %s\n"", DRIVER_NAME, DRIVER_MAJOR, DRIVER_MINOR, DRIVER_PATCHLEVEL, DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev) ); return 0; } static int version( drm_version_t *version ) { int len; version->version_major = DRIVER_MAJOR; version->version_minor = DRIVER_MINOR; version->version_patchlevel = DRIVER_PATCHLEVEL; DRM_COPY( version->name, DRIVER_NAME ); DRM_COPY( version->date, DRIVER_DATE ); DRM_COPY( version->desc, DRIVER_DESC ); return 0; } static struct pci_device_id pciidlist[] = { mga_PCI_IDS }; extern drm_ioctl_desc_t mga_ioctls[]; extern int mga_max_ioctl; static struct drm_driver driver = { .driver_features = DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL, .preinit = mga_driver_preinit, .postcleanup = mga_driver_postcleanup, .pretakedown = mga_driver_pretakedown, .dma_quiescent = mga_driver_dma_quiescent, .device_is_agp = mga_driver_device_is_agp, .vblank_wait = mga_driver_vblank_wait, .irq_preinstall = mga_driver_irq_preinstall, .irq_postinstall = mga_driver_irq_postinstall, .irq_uninstall = mga_driver_irq_uninstall, .irq_handler = mga_driver_irq_handler, .reclaim_buffers = drm_core_reclaim_buffers, .get_map_ofs = drm_core_get_map_ofs, .get_reg_ofs = drm_core_get_reg_ofs, .postinit = postinit, .version = version, .ioctls = mga_ioctls, .dma_ioctl = mga_dma_buffers, .fops = { .owner = THIS_MODULE, .open = drm_open, .release = drm_release, .ioctl = drm_ioctl, .mmap = drm_mmap, .poll = drm_poll, .fasync = drm_fasync, #ifdef CONFIG_COMPAT .compat_ioctl = mga_compat_ioctl, #endif }, .pci_driver = { .name = DRIVER_NAME, .id_table = pciidlist, } }; static int __init mga_init(void) { driver.num_ioctls = mga_max_ioctl; return drm_init(&driver); } static void __exit mga_exit(void) { drm_exit(&driver); } module_init(mga_init); module_exit(mga_exit); MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE(""GPL and additional rights""); /** * Determine if the device really is AGP or not. * * In addition to the usual tests performed by \c drm_device_is_agp, this * function detects PCI G450 cards that appear to the system exactly like * AGP G450 cards. * * \param dev The device to be tested. * * \returns * If the device is a PCI G450, zero is returned. Otherwise 2 is returned. */ int mga_driver_device_is_agp(drm_device_t * dev) { const struct pci_dev * const pdev = dev->pdev; /* There are PCI versions of the G450. These cards have the * same PCI ID as the AGP G450, but have an additional PCI-to-PCI * bridge chip. We detect these cards, which are not currently * supported by this driver, by looking at the device ID of the * bus the ""card"" is on. If vendor is 0x3388 (Hint Corp) and the * device is 0x0021 (HB6 Universal PCI-PCI bridge), we reject the * device. */ if ( (pdev->device == 0x0525) && (pdev->bus->self->vendor == 0x3388) && (pdev->bus->self->device == 0x0021) ) { return 0; } return 2; } ",0 "CENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_View * @subpackage Helper * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: HtmlElement.php 24593 2012-01-05 20:35:02Z matthew $ */ /** * @see Zend_View_Helper_Abstract */ #require_once 'Zend/View/Helper/Abstract.php'; /** * @category Zend * @package Zend_View * @subpackage Helper * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_View_Helper_HtmlElement extends Zend_View_Helper_Abstract { /** * EOL character */ const EOL = ""\n""; /** * The tag closing bracket * * @var string */ protected $_closingBracket = null; /** * Get the tag closing bracket * * @return string */ public function getClosingBracket() { if (!$this->_closingBracket) { if ($this->_isXhtml()) { $this->_closingBracket = ' />'; } else { $this->_closingBracket = '>'; } } return $this->_closingBracket; } /** * Is doctype XHTML? * * @return boolean */ protected function _isXhtml() { $doctype = $this->view->doctype(); return $doctype->isXhtml(); } /** * Is doctype strict? * * @return boolean */ protected function _isStrictDoctype() { $doctype = $this->view->doctype(); return $doctype->isStrict(); } /** * Converts an associative array to a string of tag attributes. * * @access public * * @param array $attribs From this array, each key-value pair is * converted to an attribute name and value. * * @return string The XHTML for the attributes. */ protected function _htmlAttribs($attribs) { $xhtml = ''; foreach ((array) $attribs as $key => $val) { $key = $this->view->escape($key); if (('on' == substr($key, 0, 2)) || ('constraints' == $key)) { // Don't escape event attributes; _do_ substitute double quotes with singles if (!is_scalar($val)) { // non-scalar data should be cast to JSON first #require_once 'Zend/Json.php'; $val = Zend_Json::encode($val); } // Escape single quotes inside event attribute values. // This will create html, where the attribute value has // single quotes around it, and escaped single quotes or // non-escaped double quotes inside of it $val = str_replace('\'', ''', $val); } else { if (is_array($val)) { $val = implode(' ', $val); } $val = $this->view->escape($val); } if ('id' == $key) { $val = $this->_normalizeId($val); } if (strpos($val, '""') !== false) { $xhtml .= "" $key='$val'""; } else { $xhtml .= "" $key=\""$val\""""; } } return $xhtml; } /** * Normalize an ID * * @param string $value * @return string */ protected function _normalizeId($value) { if (strstr($value, '[')) { if ('[]' == substr($value, -2)) { $value = substr($value, 0, strlen($value) - 2); } $value = trim($value, ']'); $value = str_replace('][', '-', $value); $value = str_replace('[', '-', $value); } return $value; } } ",0 "a name=""generator"" content=""rustdoc""> net::fetch::request::Referer - Rust

net::fetch::request

Enum net::fetch::request::Referer [] [src]

pub enum Referer {
    RefererNone,
    Client,
    RefererUrl(Url),
}

Variants

RefererNone
Client
RefererUrl

Keyboard Shortcuts

?
Show this help dialog
S
Focus the search field
Move up in search results
Move down in search results
Go to active search result

Search Tricks

Prefix searches with a type followed by a colon (e.g. fn:) to restrict the search to a given type.

Accepted types are: fn, mod, struct, enum, trait, type, macro, and const.

Search functions by type signature (e.g. vec -> usize)

",0 "css'/> User Personas

Redesign Concept

REDESIGN. BRANDING. MINIMALISM.

We redesigned the University of Leicester's website using this new architecture/page structure. The fully fleshed out pages include the Home page, secondary level pages, and also the Facts page to show what a third level page looks like.

The layout is consistent for secondary level pages, and we plan on having it be consistent within the third level pages as well.

The brand that we are having the site convey is that Leicester is ""elite without being elitist."" We show that through the minimal design, while also highlighting the many awards the university has received.





© Andriana Romero, Dominic Fong, Helena Qin | 2014

",0 "ogram is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include #include #include ""omapfb.h"" #define TRUE 1 #define FALSE 0 static int progress_flag = FALSE; static int progress_pos; static struct timer_list progress_timer; #define PROGRESS_BAR_LEFT_POS 54 #define PROGRESS_BAR_RIGHT_POS 425 #define PROGRESS_BAR_START_Y 576 #define PROGRESS_BAR_WIDTH 4 #define PROGRESS_BAR_HEIGHT 8 static unsigned char anycall_progress_bar_left[] = { 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00 }; static unsigned char anycall_progress_bar_right[] = { 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00 }; static unsigned char anycall_progress_bar_center[] = { 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0xf3, 0xc5, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00 }; static unsigned char anycall_progress_bar[] = { 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x33, 0x00 }; static void progress_timer_handler(unsigned long data); static int show_progress = 1; module_param_named(progress, show_progress, bool, 0); static void omapfb_update_framebuffer( \ struct fb_info *fb, int x, int y, void *buffer, \ int src_width, int src_height) { struct omapfb_info *ofbi = FB2OFB(fb); struct omapfb2_device *fbdev = ofbi->fbdev; struct fb_fix_screeninfo *fix = &fb->fix; struct fb_var_screeninfo *var = &fb->var; int row; int bytes_per_pixel = (var->bits_per_pixel / 8); unsigned char *pSrc = buffer; unsigned char *pDst = fb->screen_base; if (x+src_width > var->xres || y+src_height > var->yres) { dev_err(fbdev->dev, ""invalid destination coordinate or"" \ "" source size (%d, %d) (%d %d)\n"", \ x, y, src_width, src_height); return; } pDst += y * fix->line_length + x * bytes_per_pixel; for (row = 0; row < src_height ; row++) { memcpy(pDst, pSrc, src_width * bytes_per_pixel); pSrc += src_width * bytes_per_pixel; pDst += fix->line_length; } } void omapfb_start_progress(struct fb_info *fb) { int x_pos; if (!show_progress) return; init_timer(&progress_timer); progress_timer.expires = (get_jiffies_64() + (HZ/20)); progress_timer.data = (long)fb; progress_timer.function = progress_timer_handler; progress_pos = PROGRESS_BAR_LEFT_POS; /* draw progress background. */ for (x_pos = PROGRESS_BAR_LEFT_POS; x_pos <= PROGRESS_BAR_RIGHT_POS; \ x_pos += PROGRESS_BAR_WIDTH){ omapfb_update_framebuffer(fb, x_pos, PROGRESS_BAR_START_Y, (void *)anycall_progress_bar, PROGRESS_BAR_WIDTH, PROGRESS_BAR_HEIGHT); } omapfb_update_framebuffer(fb, PROGRESS_BAR_LEFT_POS, PROGRESS_BAR_START_Y, (void *)anycall_progress_bar_left, PROGRESS_BAR_WIDTH, PROGRESS_BAR_HEIGHT); progress_pos += PROGRESS_BAR_WIDTH; omapfb_update_framebuffer(fb, progress_pos, PROGRESS_BAR_START_Y, (void *)anycall_progress_bar_right, PROGRESS_BAR_WIDTH, PROGRESS_BAR_HEIGHT); add_timer(&progress_timer); progress_flag = TRUE; } static void omapfb_stop_progress(void) { if (progress_flag == FALSE) return; del_timer(&progress_timer); progress_flag = 0; } static void progress_timer_handler(unsigned long data) { int i; for (i = 0; i < PROGRESS_BAR_WIDTH; i++) { omapfb_update_framebuffer((struct fb_info *)data, progress_pos++, PROGRESS_BAR_START_Y, (void *)anycall_progress_bar_center, 1, PROGRESS_BAR_HEIGHT); } omapfb_update_framebuffer((struct fb_info *)data, progress_pos, PROGRESS_BAR_START_Y, (void *)anycall_progress_bar_right, PROGRESS_BAR_WIDTH, PROGRESS_BAR_HEIGHT); if (progress_pos + PROGRESS_BAR_WIDTH >= PROGRESS_BAR_RIGHT_POS ) { omapfb_stop_progress(); } else { progress_timer.expires = (get_jiffies_64() + (HZ/20)); progress_timer.function = progress_timer_handler; add_timer(&progress_timer); } } ",0 "can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_TONE_GENERATOR_H_ #define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_TONE_GENERATOR_H_ #include ""modules/audio_coding/neteq/dtmf_tone_generator.h"" #include ""test/gmock.h"" namespace webrtc { class MockDtmfToneGenerator : public DtmfToneGenerator { public: virtual ~MockDtmfToneGenerator() { Die(); } MOCK_METHOD0(Die, void()); MOCK_METHOD3(Init, int(int fs, int event, int attenuation)); MOCK_METHOD0(Reset, void()); MOCK_METHOD2(Generate, int(size_t num_samples, AudioMultiVector* output)); MOCK_CONST_METHOD0(initialized, bool()); }; } // namespace webrtc #endif // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_DTMF_TONE_GENERATOR_H_ ",0 "am and the accompanying materials are dual-licensed under * either the terms of the Eclipse Public License v1.0 as published by * the Eclipse Foundation * * or (per the licensee's choosing) * * under the terms of the GNU Lesser General Public License version 2.1 * as published by the Free Software Foundation. */ package ch.qos.logback.audit.client.joran.action; import org.xml.sax.Attributes; import ch.qos.logback.core.joran.action.Action; import ch.qos.logback.core.joran.spi.ActionException; import ch.qos.logback.core.joran.spi.InterpretationContext; import ch.qos.logback.core.util.StatusPrinter; public class AuditorAction extends Action { static final String INTERNAL_DEBUG_ATTR = ""debug""; boolean debugMode = false; public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { String debugAttrib = attributes.getValue(INTERNAL_DEBUG_ATTR); if ((debugAttrib == null) || debugAttrib.equals("""") || debugAttrib.equals(""false"") || debugAttrib.equals(""null"")) { addInfo(""Ignoring "" + INTERNAL_DEBUG_ATTR + "" attribute.""); } else { debugMode = true; } // if ((nameAttrib == null) || nameAttrib.equals("""")) { // String errMsg = ""Empty "" + NAME_ATTRIBUTE + "" attribute.""; // addError(errMsg); // throw new ActionException(ActionException.SKIP_CHILDREN); // } // the context is appender attachable, so it is pushed on top of the stack ec.pushObject(getContext()); } public void end(InterpretationContext ec, String name) { if (debugMode) { addInfo(""End of configuration.""); StatusPrinter.print(context); } ec.popObject(); } } ",0 " the License at * https://github.com/azure/azure-storage-php/LICENSE * * 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. * * PHP version 5 * * @category Microsoft * @package MicrosoftAzure\Storage\Table\Models * @author Azure Storage PHP SDK * @copyright 2016 Microsoft Corporation * @license https://github.com/azure/azure-storage-php/LICENSE * @link https://github.com/azure/azure-storage-php */ namespace MicrosoftAzure\Storage\Table\Models; use MicrosoftAzure\Storage\Common\Internal\Validate; use MicrosoftAzure\Storage\Common\Internal\Resources; use MicrosoftAzure\Storage\Common\Internal\Utilities; /** * Represents one batch operation * * @category Microsoft * @package MicrosoftAzure\Storage\Table\Models * @author Azure Storage PHP SDK * @copyright 2016 Microsoft Corporation * @license https://github.com/azure/azure-storage-php/LICENSE * @version Release: 0.10.1 * @link https://github.com/azure/azure-storage-php */ class BatchOperation { /** * @var string */ private $_type; /** * @var array */ private $_params; /** * Sets operation type. * * @param string $type The operation type. Must be valid type. * * @return none */ public function setType($type) { Validate::isTrue( BatchOperationType::isValid($type), Resources::INVALID_BO_TYPE_MSG ); $this->_type = $type; } /** * Gets operation type. * * @return string */ public function getType() { return $this->_type; } /** * Adds or sets parameter for the operation. * * @param string $name The param name. Must be valid name. * @param mix $value The param value. * * @return none */ public function addParameter($name, $value) { Validate::isTrue( BatchOperationParameterName::isValid($name), Resources::INVALID_BO_PN_MSG ); $this->_params[$name] = $value; } /** * Gets parameter value and if the name doesn't exist, return null. * * @param string $name The parameter name. * * @return mix */ public function getParameter($name) { return Utilities::tryGetValue($this->_params, $name); } } ",0 "ds moodleform { function definition() { $mform =& $this->_form; $mform->addElement('header', 'general', get_string('general', 'form')); $mform->addElement('hidden', 'id', $this->_customdata['id']); $mform->addElement('text', 'name', get_string('name'), 'maxlength=""255"" size=""50""'); $mform->addRule('name', null, 'required', null, 'client'); $mform->setType('name', PARAM_MULTILANG); $mform->addElement('htmleditor', 'text', get_string('noticetext', 'facetoface'), array('rows' => 10, 'cols' => 64)); $mform->setType('text', PARAM_RAW); $mform->addRule('text', null, 'required', null, 'client'); $mform->addElement('header', 'conditions', get_string('conditions', 'facetoface')); $mform->addElement('html', get_string('conditionsexplanation', 'facetoface')); // Show all custom fields $customfields = $this->_customdata['customfields']; facetoface_add_customfields_to_form($mform, $customfields, true); $this->add_action_buttons(); } } ",0 ", 2005, 2007, 2008, 2010 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ /* This file is the lexical analyzer for GNU C++. */ #include ""config.h"" #include ""system.h"" #include ""coretypes.h"" #include ""tm.h"" #include ""input.h"" #include ""tree.h"" #include ""cp-tree.h"" #include ""cpplib.h"" #include ""flags.h"" #include ""c-family/c-pragma.h"" #include ""c-family/c-objc.h"" #include ""tm_p.h"" #include ""timevar.h"" static int interface_strcmp (const char *); static void init_cp_pragma (void); static tree parse_strconst_pragma (const char *, int); static void handle_pragma_vtable (cpp_reader *); static void handle_pragma_unit (cpp_reader *); static void handle_pragma_interface (cpp_reader *); static void handle_pragma_implementation (cpp_reader *); static void handle_pragma_java_exceptions (cpp_reader *); static void init_operators (void); static void copy_lang_type (tree); /* A constraint that can be tested at compile time. */ #define CONSTRAINT(name, expr) extern int constraint_##name [(expr) ? 1 : -1] /* Functions and data structures for #pragma interface. `#pragma implementation' means that the main file being compiled is considered to implement (provide) the classes that appear in its main body. I.e., if this is file ""foo.cc"", and class `bar' is defined in ""foo.cc"", then we say that ""foo.cc implements bar"". All main input files ""implement"" themselves automagically. `#pragma interface' means that unless this file (of the form ""foo.h"" is not presently being included by file ""foo.cc"", the CLASSTYPE_INTERFACE_ONLY bit gets set. The effect is that none of the vtables nor any of the inline functions defined in foo.h will ever be output. There are cases when we want to link files such as ""defs.h"" and ""main.cc"". In this case, we give ""defs.h"" a `#pragma interface', and ""main.cc"" has `#pragma implementation ""defs.h""'. */ struct impl_files { const char *filename; struct impl_files *next; }; static struct impl_files *impl_file_chain; /* True if we saw ""#pragma GCC java_exceptions"". */ bool pragma_java_exceptions; void cxx_finish (void) { c_common_finish (); } /* A mapping from tree codes to operator name information. */ operator_name_info_t operator_name_info[(int) MAX_TREE_CODES]; /* Similar, but for assignment operators. */ operator_name_info_t assignment_operator_name_info[(int) MAX_TREE_CODES]; /* Initialize data structures that keep track of operator names. */ #define DEF_OPERATOR(NAME, C, M, AR, AP) \ CONSTRAINT (C, sizeof ""operator "" + sizeof NAME <= 256); #include ""operators.def"" #undef DEF_OPERATOR static void init_operators (void) { tree identifier; char buffer[256]; struct operator_name_info_t *oni; #define DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, ASSN_P) \ sprintf (buffer, ISALPHA (NAME[0]) ? ""operator %s"" : ""operator%s"", NAME); \ identifier = get_identifier (buffer); \ IDENTIFIER_OPNAME_P (identifier) = 1; \ \ oni = (ASSN_P \ ? &assignment_operator_name_info[(int) CODE] \ : &operator_name_info[(int) CODE]); \ oni->identifier = identifier; \ oni->name = NAME; \ oni->mangled_name = MANGLING; \ oni->arity = ARITY; #include ""operators.def"" #undef DEF_OPERATOR operator_name_info[(int) ERROR_MARK].identifier = get_identifier (""""); /* Handle some special cases. These operators are not defined in the language, but can be produced internally. We may need them for error-reporting. (Eventually, we should ensure that this does not happen. Error messages involving these operators will be confusing to users.) */ operator_name_info [(int) INIT_EXPR].name = operator_name_info [(int) MODIFY_EXPR].name; operator_name_info [(int) EXACT_DIV_EXPR].name = ""(ceiling /)""; operator_name_info [(int) CEIL_DIV_EXPR].name = ""(ceiling /)""; operator_name_info [(int) FLOOR_DIV_EXPR].name = ""(floor /)""; operator_name_info [(int) ROUND_DIV_EXPR].name = ""(round /)""; operator_name_info [(int) CEIL_MOD_EXPR].name = ""(ceiling %)""; operator_name_info [(int) FLOOR_MOD_EXPR].name = ""(floor %)""; operator_name_info [(int) ROUND_MOD_EXPR].name = ""(round %)""; operator_name_info [(int) ABS_EXPR].name = ""abs""; operator_name_info [(int) TRUTH_AND_EXPR].name = ""strict &&""; operator_name_info [(int) TRUTH_OR_EXPR].name = ""strict ||""; operator_name_info [(int) RANGE_EXPR].name = ""...""; operator_name_info [(int) UNARY_PLUS_EXPR].name = ""+""; assignment_operator_name_info [(int) EXACT_DIV_EXPR].name = ""(exact /=)""; assignment_operator_name_info [(int) CEIL_DIV_EXPR].name = ""(ceiling /=)""; assignment_operator_name_info [(int) FLOOR_DIV_EXPR].name = ""(floor /=)""; assignment_operator_name_info [(int) ROUND_DIV_EXPR].name = ""(round /=)""; assignment_operator_name_info [(int) CEIL_MOD_EXPR].name = ""(ceiling %=)""; assignment_operator_name_info [(int) FLOOR_MOD_EXPR].name = ""(floor %=)""; assignment_operator_name_info [(int) ROUND_MOD_EXPR].name = ""(round %=)""; } /* Initialize the reserved words. */ void init_reswords (void) { unsigned int i; tree id; int mask = 0; if (cxx_dialect < cxx0x) mask |= D_CXX0X; if (flag_no_asm) mask |= D_ASM | D_EXT; if (flag_no_gnu_keywords) mask |= D_EXT; /* The Objective-C keywords are all context-dependent. */ mask |= D_OBJC; ridpointers = ggc_alloc_cleared_vec_tree ((int) RID_MAX); for (i = 0; i < num_c_common_reswords; i++) { if (c_common_reswords[i].disable & D_CONLY) continue; id = get_identifier (c_common_reswords[i].word); C_SET_RID_CODE (id, c_common_reswords[i].rid); ridpointers [(int) c_common_reswords[i].rid] = id; if (! (c_common_reswords[i].disable & mask)) C_IS_RESERVED_WORD (id) = 1; } } static void init_cp_pragma (void) { c_register_pragma (0, ""vtable"", handle_pragma_vtable); c_register_pragma (0, ""unit"", handle_pragma_unit); c_register_pragma (0, ""interface"", handle_pragma_interface); c_register_pragma (0, ""implementation"", handle_pragma_implementation); c_register_pragma (""GCC"", ""interface"", handle_pragma_interface); c_register_pragma (""GCC"", ""implementation"", handle_pragma_implementation); c_register_pragma (""GCC"", ""java_exceptions"", handle_pragma_java_exceptions); } /* TRUE if a code represents a statement. */ bool statement_code_p[MAX_TREE_CODES]; /* Initialize the C++ front end. This function is very sensitive to the exact order that things are done here. It would be nice if the initialization done by this routine were moved to its subroutines, and the ordering dependencies clarified and reduced. */ bool cxx_init (void) { location_t saved_loc; unsigned int i; static const enum tree_code stmt_codes[] = { CTOR_INITIALIZER, TRY_BLOCK, HANDLER, EH_SPEC_BLOCK, USING_STMT, TAG_DEFN, IF_STMT, CLEANUP_STMT, FOR_STMT, RANGE_FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT, CONTINUE_STMT, SWITCH_STMT, EXPR_STMT }; memset (&statement_code_p, 0, sizeof (statement_code_p)); for (i = 0; i < ARRAY_SIZE (stmt_codes); i++) statement_code_p[stmt_codes[i]] = true; saved_loc = input_location; input_location = BUILTINS_LOCATION; init_reswords (); init_tree (); init_cp_semantics (); init_operators (); init_method (); init_error (); current_function_decl = NULL; class_type_node = ridpointers[(int) RID_CLASS]; cxx_init_decl_processing (); if (c_common_init () == false) { input_location = saved_loc; return false; } init_cp_pragma (); init_repo (); input_location = saved_loc; return true; } /* Return nonzero if S is not considered part of an INTERFACE/IMPLEMENTATION pair. Otherwise, return 0. */ static int interface_strcmp (const char* s) { /* Set the interface/implementation bits for this scope. */ struct impl_files *ifiles; const char *s1; for (ifiles = impl_file_chain; ifiles; ifiles = ifiles->next) { const char *t1 = ifiles->filename; s1 = s; if (*s1 == 0 || filename_ncmp (s1, t1, 1) != 0) continue; while (*s1 != 0 && filename_ncmp (s1, t1, 1) == 0) s1++, t1++; /* A match. */ if (*s1 == *t1) return 0; /* Don't get faked out by xxx.yyy.cc vs xxx.zzz.cc. */ if (strchr (s1, '.') || strchr (t1, '.')) continue; if (*s1 == '\0' || s1[-1] != '.' || t1[-1] != '.') continue; /* A match. */ return 0; } /* No matches. */ return 1; } /* Parse a #pragma whose sole argument is a string constant. If OPT is true, the argument is optional. */ static tree parse_strconst_pragma (const char* name, int opt) { tree result, x; enum cpp_ttype t; t = pragma_lex (&result); if (t == CPP_STRING) { if (pragma_lex (&x) != CPP_EOF) warning (0, ""junk at end of #pragma %s"", name); return result; } if (t == CPP_EOF && opt) return NULL_TREE; error (""invalid #pragma %s"", name); return error_mark_node; } static void handle_pragma_vtable (cpp_reader* /*dfile*/) { parse_strconst_pragma (""vtable"", 0); sorry (""#pragma vtable no longer supported""); } static void handle_pragma_unit (cpp_reader* /*dfile*/) { /* Validate syntax, but don't do anything. */ parse_strconst_pragma (""unit"", 0); } static void handle_pragma_interface (cpp_reader* /*dfile*/) { tree fname = parse_strconst_pragma (""interface"", 1); struct c_fileinfo *finfo; const char *filename; if (fname == error_mark_node) return; else if (fname == 0) filename = lbasename (input_filename); else filename = TREE_STRING_POINTER (fname); finfo = get_fileinfo (input_filename); if (impl_file_chain == 0) { /* If this is zero at this point, then we are auto-implementing. */ if (main_input_filename == 0) main_input_filename = input_filename; } finfo->interface_only = interface_strcmp (filename); /* If MULTIPLE_SYMBOL_SPACES is set, we cannot assume that we can see a definition in another file. */ if (!MULTIPLE_SYMBOL_SPACES || !finfo->interface_only) finfo->interface_unknown = 0; } /* Note that we have seen a #pragma implementation for the key MAIN_FILENAME. We used to only allow this at toplevel, but that restriction was buggy in older compilers and it seems reasonable to allow it in the headers themselves, too. It only needs to precede the matching #p interface. We don't touch finfo->interface_only or finfo->interface_unknown; the user must specify a matching #p interface for this to have any effect. */ static void handle_pragma_implementation (cpp_reader* /*dfile*/) { tree fname = parse_strconst_pragma (""implementation"", 1); const char *filename; struct impl_files *ifiles = impl_file_chain; if (fname == error_mark_node) return; if (fname == 0) { if (main_input_filename) filename = main_input_filename; else filename = input_filename; filename = lbasename (filename); } else { filename = TREE_STRING_POINTER (fname); if (cpp_included_before (parse_in, filename, input_location)) warning (0, ""#pragma implementation for %qs appears after "" ""file is included"", filename); } for (; ifiles; ifiles = ifiles->next) { if (! filename_cmp (ifiles->filename, filename)) break; } if (ifiles == 0) { ifiles = XNEW (struct impl_files); ifiles->filename = xstrdup (filename); ifiles->next = impl_file_chain; impl_file_chain = ifiles; } } /* Indicate that this file uses Java-personality exception handling. */ static void handle_pragma_java_exceptions (cpp_reader* /*dfile*/) { tree x; if (pragma_lex (&x) != CPP_EOF) warning (0, ""junk at end of #pragma GCC java_exceptions""); choose_personality_routine (lang_java); pragma_java_exceptions = true; } /* Issue an error message indicating that the lookup of NAME (an IDENTIFIER_NODE) failed. Returns the ERROR_MARK_NODE. */ tree unqualified_name_lookup_error (tree name) { if (IDENTIFIER_OPNAME_P (name)) { if (name != ansi_opname (ERROR_MARK)) error (""%qD not defined"", name); } else { if (!objc_diagnose_private_ivar (name)) { error (""%qD was not declared in this scope"", name); suggest_alternatives_for (location_of (name), name); } /* Prevent repeated error messages by creating a VAR_DECL with this NAME in the innermost block scope. */ if (local_bindings_p ()) { tree decl; decl = build_decl (input_location, VAR_DECL, name, error_mark_node); DECL_CONTEXT (decl) = current_function_decl; push_local_binding (name, decl, 0); /* Mark the variable as used so that we do not get warnings about it being unused later. */ TREE_USED (decl) = 1; } } return error_mark_node; } /* Like unqualified_name_lookup_error, but NAME is an unqualified-id used as a function. Returns an appropriate expression for NAME. */ tree unqualified_fn_lookup_error (tree name) { if (processing_template_decl) { /* In a template, it is invalid to write ""f()"" or ""f(3)"" if no declaration of ""f"" is available. Historically, G++ and most other compilers accepted that usage since they deferred all name lookup until instantiation time rather than doing unqualified name lookup at template definition time; explain to the user what is going wrong. Note that we have the exact wording of the following message in the manual (trouble.texi, node ""Name lookup""), so they need to be kept in synch. */ permerror (input_location, ""there are no arguments to %qD that depend on a template "" ""parameter, so a declaration of %qD must be available"", name, name); if (!flag_permissive) { static bool hint; if (!hint) { inform (input_location, ""(if you use %<-fpermissive%>, G++ will accept your "" ""code, but allowing the use of an undeclared name is "" ""deprecated)""); hint = true; } } return name; } return unqualified_name_lookup_error (name); } /* Wrapper around build_lang_decl_loc(). Should gradually move to build_lang_decl_loc() and then rename build_lang_decl_loc() back to build_lang_decl(). */ tree build_lang_decl (enum tree_code code, tree name, tree type) { return build_lang_decl_loc (input_location, code, name, type); } /* Build a decl from CODE, NAME, TYPE declared at LOC, and then add DECL_LANG_SPECIFIC info to the result. */ tree build_lang_decl_loc (location_t loc, enum tree_code code, tree name, tree type) { tree t; t = build_decl (loc, code, name, type); retrofit_lang_decl (t); return t; } /* Add DECL_LANG_SPECIFIC info to T. Called from build_lang_decl and pushdecl (for functions generated by the back end). */ void retrofit_lang_decl (tree t) { struct lang_decl *ld; size_t size; int sel; if (TREE_CODE (t) == FUNCTION_DECL) sel = 1, size = sizeof (struct lang_decl_fn); else if (TREE_CODE (t) == NAMESPACE_DECL) sel = 2, size = sizeof (struct lang_decl_ns); else if (TREE_CODE (t) == PARM_DECL) sel = 3, size = sizeof (struct lang_decl_parm); else if (LANG_DECL_HAS_MIN (t)) sel = 0, size = sizeof (struct lang_decl_min); else gcc_unreachable (); ld = ggc_alloc_cleared_lang_decl (size); ld->u.base.selector = sel; DECL_LANG_SPECIFIC (t) = ld; if (current_lang_name == lang_name_cplusplus || decl_linkage (t) == lk_none) SET_DECL_LANGUAGE (t, lang_cplusplus); else if (current_lang_name == lang_name_c) SET_DECL_LANGUAGE (t, lang_c); else if (current_lang_name == lang_name_java) SET_DECL_LANGUAGE (t, lang_java); else gcc_unreachable (); if (GATHER_STATISTICS) { tree_node_counts[(int)lang_decl] += 1; tree_node_sizes[(int)lang_decl] += size; } } void cxx_dup_lang_specific_decl (tree node) { int size; struct lang_decl *ld; if (! DECL_LANG_SPECIFIC (node)) return; if (TREE_CODE (node) == FUNCTION_DECL) size = sizeof (struct lang_decl_fn); else if (TREE_CODE (node) == NAMESPACE_DECL) size = sizeof (struct lang_decl_ns); else if (TREE_CODE (node) == PARM_DECL) size = sizeof (struct lang_decl_parm); else if (LANG_DECL_HAS_MIN (node)) size = sizeof (struct lang_decl_min); else gcc_unreachable (); ld = ggc_alloc_lang_decl (size); memcpy (ld, DECL_LANG_SPECIFIC (node), size); DECL_LANG_SPECIFIC (node) = ld; if (GATHER_STATISTICS) { tree_node_counts[(int)lang_decl] += 1; tree_node_sizes[(int)lang_decl] += size; } } /* Copy DECL, including any language-specific parts. */ tree copy_decl (tree decl) { tree copy; copy = copy_node (decl); cxx_dup_lang_specific_decl (copy); return copy; } /* Replace the shared language-specific parts of NODE with a new copy. */ static void copy_lang_type (tree node) { int size; struct lang_type *lt; if (! TYPE_LANG_SPECIFIC (node)) return; if (TYPE_LANG_SPECIFIC (node)->u.h.is_lang_type_class) size = sizeof (struct lang_type); else size = sizeof (struct lang_type_ptrmem); lt = ggc_alloc_lang_type (size); memcpy (lt, TYPE_LANG_SPECIFIC (node), size); TYPE_LANG_SPECIFIC (node) = lt; if (GATHER_STATISTICS) { tree_node_counts[(int)lang_type] += 1; tree_node_sizes[(int)lang_type] += size; } } /* Copy TYPE, including any language-specific parts. */ tree copy_type (tree type) { tree copy; copy = copy_node (type); copy_lang_type (copy); return copy; } tree cxx_make_type (enum tree_code code) { tree t = make_node (code); /* Create lang_type structure. */ if (RECORD_OR_UNION_CODE_P (code) || code == BOUND_TEMPLATE_TEMPLATE_PARM) { struct lang_type *pi = ggc_alloc_cleared_lang_type (sizeof (struct lang_type)); TYPE_LANG_SPECIFIC (t) = pi; pi->u.c.h.is_lang_type_class = 1; if (GATHER_STATISTICS) { tree_node_counts[(int)lang_type] += 1; tree_node_sizes[(int)lang_type] += sizeof (struct lang_type); } } /* Set up some flags that give proper default behavior. */ if (RECORD_OR_UNION_CODE_P (code)) { struct c_fileinfo *finfo = get_fileinfo (input_filename); SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, finfo->interface_unknown); CLASSTYPE_INTERFACE_ONLY (t) = finfo->interface_only; } return t; } tree make_class_type (enum tree_code code) { tree t = cxx_make_type (code); SET_CLASS_TYPE_P (t, 1); return t; } /* Returns true if we are currently in the main source file, or in a template instantiation started from the main source file. */ bool in_main_input_context (void) { struct tinst_level *tl = outermost_tinst_level(); if (tl) return filename_cmp (main_input_filename, LOCATION_FILE (tl->locus)) == 0; else return filename_cmp (main_input_filename, input_filename) == 0; } ",0 "

What is the Drop Box tool?

The Drop Box tool creates a folder for each student in the course.  Students are only able to access their own folder. Students and instructors can both place files in the Drop Box folders.  

The Drop Box mirrors the file management features and functionality of the Resources tool. See What is the Resources tool? for more information on how to add, upload, edit, and delete files and folders within Drop Box. (As with Resources, multiple files can also be uploaded using Drag and Drop.)

To access this tool, select Drop Box from the Tool Menu in your site.

Example: Folders for each student

Folders with the plus sign contain files.

",0 " it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenXcom is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenXcom. If not, see . */ #include #include #include #include #include #include ""GameTime.h"" #include ""../Mod/RuleAlienMission.h"" #include ""../Savegame/Craft.h"" namespace OpenXcom { class Mod; class GameTime; class Country; class Base; class Region; class Ufo; class Waypoint; class SavedBattleGame; class TextList; class Language; class RuleResearch; class ResearchProject; class Soldier; class RuleManufacture; class MissionSite; class AlienBase; class AlienStrategy; class AlienMission; class Target; class Soldier; class Craft; struct MissionStatistics; struct BattleUnitKills; /** * Enumerator containing all the possible game difficulties. */ enum GameDifficulty { DIFF_BEGINNER = 0, DIFF_EXPERIENCED, DIFF_VETERAN, DIFF_GENIUS, DIFF_SUPERHUMAN }; /** * Enumerator for the various save types. */ enum SaveType { SAVE_DEFAULT, SAVE_QUICK, SAVE_AUTO_GEOSCAPE, SAVE_AUTO_BATTLESCAPE, SAVE_IRONMAN, SAVE_IRONMAN_END }; /** * Enumerator for the current game ending. */ enum GameEnding { END_NONE, END_WIN, END_LOSE }; /** * Container for savegame info displayed on listings. */ struct SaveInfo { std::string fileName; std::wstring displayName; time_t timestamp; std::wstring isoDate, isoTime; std::wstring details; std::vector mods; bool reserved; }; struct PromotionInfo { int totalCommanders; int totalColonels; int totalCaptains; int totalSergeants; PromotionInfo(): totalCommanders(0), totalColonels(0), totalCaptains(0), totalSergeants(0){} }; /** *The game data that gets written to disk when the game is saved. *A saved game holds all the variable info in a game like funds, *game time, current bases and contents, world activities, score, etc. */ class SavedGame { private: std::wstring _name; GameDifficulty _difficulty; GameEnding _end; bool _ironman; GameTime *_time; std::vector _researchScores; std::vector _funds, _maintenance, _incomes, _expenditures; double _globeLon, _globeLat; int _globeZoom; std::map _ids; std::vector _countries; std::vector _regions; std::vector _bases; std::vector _ufos; std::vector _waypoints; std::vector _missionSites; std::vector _alienBases; AlienStrategy *_alienStrategy; SavedBattleGame *_battleGame; std::vector _discovered; std::vector _activeMissions; bool _debug, _warned; int _monthsPassed; std::string _graphRegionToggles; std::string _graphCountryToggles; std::string _graphFinanceToggles; std::vector _poppedResearch; std::vector _deadSoldiers; size_t _selectedBase; std::string _lastselectedArmor; //contains the last selected armour std::vector _missionStatistics; static SaveInfo getSaveInfo(const std::string &file, Language *lang); public: static const std::string AUTOSAVE_GEOSCAPE, AUTOSAVE_BATTLESCAPE, QUICKSAVE; /// Creates a new saved game. SavedGame(); /// Cleans up the saved game. ~SavedGame(); /// Gets list of saves in the user directory. static std::vector getList(Language *lang, bool autoquick); /// Loads a saved game from YAML. void load(const std::string &filename, Mod *mod); /// Saves a saved game to YAML. void save(const std::string &filename) const; /// Gets the game name. std::wstring getName() const; /// Sets the game name. void setName(const std::wstring &name); /// Gets the game difficulty. GameDifficulty getDifficulty() const; /// Sets the game difficulty. void setDifficulty(GameDifficulty difficulty); /// Gets the game difficulty coefficient. int getDifficultyCoefficient() const; /// Gets the game ending. GameEnding getEnding() const; /// Sets the game ending. void setEnding(GameEnding end); /// Gets if the game is in ironman mode. bool isIronman() const; /// Sets if the game is in ironman mode. void setIronman(bool ironman); /// Gets the current funds. int64_t getFunds() const; /// Gets the list of funds from previous months. std::vector &getFundsList(); /// Sets new funds. void setFunds(int64_t funds); /// Gets the current globe longitude. double getGlobeLongitude() const; /// Sets the new globe longitude. void setGlobeLongitude(double lon); /// Gets the current globe latitude. double getGlobeLatitude() const; /// Sets the new globe latitude. void setGlobeLatitude(double lat); /// Gets the current globe zoom. int getGlobeZoom() const; /// Sets the new globe zoom. void setGlobeZoom(int zoom); /// Handles monthly funding. void monthlyFunding(); /// Gets the current game time. GameTime *getTime() const; /// Sets the current game time. void setTime(const GameTime& time); /// Gets the current ID for an object. int getId(const std::string &name); /// Resets the list of object IDs. const std::map &getAllIds() const; /// Resets the list of object IDs. void setAllIds(const std::map &ids); /// Gets the list of countries. std::vector *getCountries(); /// Gets the total country funding. int getCountryFunding() const; /// Gets the list of regions. std::vector *getRegions(); /// Gets the list of bases. std::vector *getBases(); /// Gets the list of bases. const std::vector *getBases() const; /// Gets the total base maintenance. int getBaseMaintenance() const; /// Gets the list of UFOs. std::vector *getUfos(); /// Gets the list of waypoints. std::vector *getWaypoints(); /// Gets the list of mission sites. std::vector *getMissionSites(); /// Gets the current battle game. SavedBattleGame *getSavedBattle(); /// Sets the current battle game. void setBattleGame(SavedBattleGame *battleGame); /// Add a finished ResearchProject void addFinishedResearchSimple(const RuleResearch *research); /// Add a finished ResearchProject void addFinishedResearch(const RuleResearch *research, const Mod *mod, Base *base, bool score = true); /// Get the list of already discovered research projects const std::vector & getDiscoveredResearch() const; /// Get the list of ResearchProject which can be researched in a Base void getAvailableResearchProjects(std::vector & projects, const Mod *mod, Base *base, bool considerDebugMode = false) const; /// Get the list of newly available research projects once a research has been completed. void getNewlyAvailableResearchProjects(std::vector & before, std::vector & after, std::vector & diff) const; /// Get the list of Productions which can be manufactured in a Base void getAvailableProductions(std::vector & productions, const Mod *mod, Base *base) const; /// Get the list of newly available manufacture projects once a research has been completed. void getDependableManufacture(std::vector & dependables, const RuleResearch *research, const Mod *mod, Base *base) const; /// Gets if a research still has undiscovered ""protected unlocks"". bool hasUndiscoveredProtectedUnlock(const RuleResearch * r, const Mod * mod) const; /// Gets if a certain research has been completed. bool isResearched(const std::string &research, bool considerDebugMode = true) const; /// Gets if a certain list of research topics has been completed. bool isResearched(const std::vector &research, bool considerDebugMode = true) const; /// Gets the soldier matching this ID. Soldier *getSoldier(int id) const; /// Handles the higher promotions. bool handlePromotions(std::vector &participants); /// Processes a soldier's promotion. void processSoldier(Soldier *soldier, PromotionInfo &soldierData); /// Checks how many soldiers of a rank exist and which one has the highest score. Soldier *inspectSoldiers(std::vector &soldiers, std::vector &participants, int rank); /// Returns the list of alien bases. std::vector *getAlienBases(); /// Sets debug mode. void setDebugMode(); /// Gets debug mode. bool getDebugMode() const; /// return a list of maintenance costs std::vector &getMaintenances(); /// sets the research score for the month void addResearchScore(int score); /// gets the list of research scores std::vector &getResearchScores(); /// gets the list of incomes. std::vector &getIncomes(); /// gets the list of expenditures. std::vector &getExpenditures(); /// gets whether or not the player has been warned bool getWarned() const; /// sets whether or not the player has been warned void setWarned(bool warned); /// Full access to the alien strategy data. AlienStrategy &getAlienStrategy() { return *_alienStrategy; } /// Read-only access to the alien strategy data. const AlienStrategy &getAlienStrategy() const { return *_alienStrategy; } /// Full access to the current alien missions. std::vector &getAlienMissions() { return _activeMissions; } /// Read-only access to the current alien missions. const std::vector &getAlienMissions() const { return _activeMissions; } /// Finds a mission by region and objective. AlienMission *findAlienMission(const std::string ®ion, MissionObjective objective) const; /// Locate a region containing a position. Region *locateRegion(double lon, double lat) const; /// Locate a region containing a Target. Region *locateRegion(const Target &target) const; /// Return the month counter. int getMonthsPassed() const; /// Return the GraphRegionToggles. const std::string &getGraphRegionToggles() const; /// Return the GraphCountryToggles. const std::string &getGraphCountryToggles() const; /// Return the GraphFinanceToggles. const std::string &getGraphFinanceToggles() const; /// Sets the GraphRegionToggles. void setGraphRegionToggles(const std::string &value); /// Sets the GraphCountryToggles. void setGraphCountryToggles(const std::string &value); /// Sets the GraphFinanceToggles. void setGraphFinanceToggles(const std::string &value); /// Increment the month counter. void addMonth(); /// add a research to the ""popped up"" array void addPoppedResearch(const RuleResearch* research); /// check if a research is on the ""popped up"" array bool wasResearchPopped(const RuleResearch* research); /// remove a research from the ""popped up"" array void removePoppedResearch(const RuleResearch* research); /// Gets the list of dead soldiers. std::vector *getDeadSoldiers(); /// Gets the last selected player base. Base *getSelectedBase(); /// Set the last selected player base. void setSelectedBase(size_t base); /// Evaluate the score of a soldier based on all of his stats, missions and kills. int getSoldierScore(Soldier *soldier); /// Sets the last selected armour void setLastSelectedArmor(const std::string &value); /// Gets the last selected armour std::string getLastSelectedArmor() const; /// Returns the craft corresponding to the specified unique id. Craft *findCraftByUniqueId(const CraftId& craftId) const; /// Gets the list of missions statistics std::vector *getMissionStatistics(); /// Handles a soldier's death. std::vector::iterator killSoldier(Soldier *soldier, BattleUnitKills *cause = 0); }; } ",0 " * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, see . */ #include ""hw.h"" #include ""qemu-timer.h"" #include ""omap.h"" struct omap_synctimer_s { MemoryRegion iomem; uint32_t val; uint16_t readh; }; /* 32-kHz Sync Timer of the OMAP2 */ static uint32_t omap_synctimer_read(struct omap_synctimer_s *s) { return muldiv64(qemu_get_clock_ns(vm_clock), 0x8000, get_ticks_per_sec()); } void omap_synctimer_reset(struct omap_synctimer_s *s) { s->val = omap_synctimer_read(s); } static uint32_t omap_synctimer_readw(void *opaque, target_phys_addr_t addr) { struct omap_synctimer_s *s = (struct omap_synctimer_s *) opaque; switch (addr) { case 0x00: /* 32KSYNCNT_REV */ return 0x21; case 0x10: /* CR */ return omap_synctimer_read(s) - s->val; } OMAP_BAD_REG(addr); return 0; } static uint32_t omap_synctimer_readh(void *opaque, target_phys_addr_t addr) { struct omap_synctimer_s *s = (struct omap_synctimer_s *) opaque; uint32_t ret; if (addr & 2) return s->readh; else { ret = omap_synctimer_readw(opaque, addr); s->readh = ret >> 16; return ret & 0xffff; } } static void omap_synctimer_write(void *opaque, target_phys_addr_t addr, uint32_t value) { OMAP_BAD_REG(addr); } static const MemoryRegionOps omap_synctimer_ops = { .old_mmio = { .read = { omap_badwidth_read32, omap_synctimer_readh, omap_synctimer_readw, }, .write = { omap_badwidth_write32, omap_synctimer_write, omap_synctimer_write, }, }, .endianness = DEVICE_NATIVE_ENDIAN, }; struct omap_synctimer_s *omap_synctimer_init(struct omap_target_agent_s *ta, struct omap_mpu_state_s *mpu, omap_clk fclk, omap_clk iclk) { struct omap_synctimer_s *s = g_malloc0(sizeof(*s)); omap_synctimer_reset(s); memory_region_init_io(&s->iomem, &omap_synctimer_ops, s, ""omap.synctimer"", omap_l4_region_size(ta, 0)); omap_l4_attach(ta, 0, &s->iomem); return s; } ",0 "on, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of GROUPON nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS * IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.groupon.lex.metrics; import org.hamcrest.Matchers; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; import org.junit.Test; /** * * @author ariane */ public class SimpleMetricTest { @Test public void constructor_number() { Metric m = new SimpleMetric(MetricName.valueOf(""foobar""), (short)7); assertEquals(MetricName.valueOf(""foobar""), m.getName()); assertNotNull(m.getValue()); MetricValueTest.validateNumber(true, 7, m.getValue()); } @Test public void constructor_string() { Metric m = new SimpleMetric(MetricName.valueOf(""foobar""), ""chocoladevla""); assertEquals(MetricName.valueOf(""foobar""), m.getName()); assertNotNull(m.getValue()); MetricValueTest.validateString(""chocoladevla"", m.getValue()); } @Test public void constructor_bool() { Metric m = new SimpleMetric(MetricName.valueOf(""foobar""), true); assertEquals(MetricName.valueOf(""foobar""), m.getName()); assertNotNull(m.getValue()); MetricValueTest.validateBoolean(true, m.getValue()); } @Test public void constructor_metric() { Metric m = new SimpleMetric(MetricName.valueOf(""foobar""), MetricValue.fromNumberValue(9000)); assertEquals(MetricName.valueOf(""foobar""), m.getName()); assertNotNull(m.getValue()); MetricValueTest.validateNumber(true, 9000, m.getValue()); } @Test public void constructor_empty() { Metric m = new SimpleMetric(MetricName.valueOf(""foobar""), MetricValue.EMPTY); assertEquals(MetricName.valueOf(""foobar""), m.getName()); assertNotNull(m.getValue()); MetricValueTest.validateEmpty(m.getValue()); } @Test public void to_string() { Metric m = new SimpleMetric(MetricName.valueOf(""foobar""), MetricValue.fromIntValue(19)); assertThat(m.toString(), Matchers.allOf(containsString(""foobar""), containsString(""19""))); } @Test public void equality() { Metric m0 = new SimpleMetric(MetricName.valueOf(""foobar""), MetricValue.fromIntValue(19)); Metric m1 = new SimpleMetric(MetricName.valueOf(""foobar""), MetricValue.fromIntValue(19)); assertEquals(m0, m1); assertEquals(m0.hashCode(), m1.hashCode()); } @Test public void inequality() { Metric m0 = new SimpleMetric(MetricName.valueOf(""foobar""), MetricValue.fromIntValue(17)); Metric m1 = new SimpleMetric(MetricName.valueOf(""foobar""), MetricValue.fromIntValue(19)); Metric m2 = new SimpleMetric(MetricName.valueOf(""fizzbuzz""), MetricValue.fromIntValue(19)); assertNotEquals(m0, m1); assertNotEquals(m0, m2); assertNotEquals(m1, m0); assertNotEquals(m1, m2); assertNotEquals(m2, m0); assertNotEquals(m2, m1); } @Test public void equal_across_types() { Metric m = new SimpleMetric(MetricName.valueOf(""foobar""), MetricValue.fromIntValue(19)); assertFalse(m.equals(null)); assertFalse(m.equals(new Object())); } } ",0 "-Type"" />

一款移动互联网时代的

开放式物流管理平台

即刻登录,享受零成本投入的超高服务回报,开启您的全新物流运输管理模式:

什么是柱柱签收

柱柱签收网是新一代的物流管理云平台,基于网页以及司机手机的简单操作,对货物单据, 运输轨迹,收发货时间,货物条码信息等实现实时、真实等管理,同时可以方便地将物流信息分享给上下游客户。

为什么选择柱柱

节点追踪 全程定位

柱柱签收通过APP要求司机在指定时间、指定地点按指定步骤拍摄货物信息,生成时间轴方便管理者查看,不允许从相册上传图片,保证纪录的真实性。

微信推送 异常报警

柱柱签收微信分享和图片语音实时传输技术把信息的顺序传递变成了同时传递。

电子围栏 安全交付

柱柱签收利用电子围栏技术,如果不在指定地点交货,系统会立即报警。

车牌对比 提送一致

柱柱签收采用图片识别技术,自动识别提、送货车牌号,与数据库资料进行对比,确保货运车辆的一致性。

扫码交货 无单签收

柱柱签收支持按货物明细签收,通过扫码交接,帮您轻松实现电子签收,甚至能通过支付平台帮你代收货款。

在线保险 保障全程

我们与多家保险公司合作基于真实的业务背景,为每票货物提供保险服务,保障货物安全。

信用评估 运力推荐

柱柱为甲方输出客观的评估报告,包括服务评价、运输公司的KPI、保险状况、银行授信等数据,向甲方企业推荐运力。

网上金融 轻松融资

基于真实数据和良好的发展前景,我们与平安银行合作,推出“回单贷”业务,依据柱柱签收的送达照片,触发贷款业务。

部分合作客户

目前柱柱签收网注册用户已达数万人,为数百家公司提供物流运输可视化服务

APP下载

注册

",0 "tity.EntityCreature; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvent; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.EnumDifficulty; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; public abstract class EntityMob extends EntityCreature implements IMob { public EntityMob(World worldIn) { super(worldIn); this.experienceValue = 5; } public SoundCategory getSoundCategory() { return SoundCategory.HOSTILE; } /** * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons * use this to react to sunlight and start to burn. */ public void onLivingUpdate() { this.updateArmSwingProgress(); float f = this.getBrightness(1.0F); if (f > 0.5F) { this.entityAge += 2; } super.onLivingUpdate(); } /** * Called to update the entity's position/logic. */ public void onUpdate() { super.onUpdate(); if (!this.worldObj.isRemote && this.worldObj.getDifficulty() == EnumDifficulty.PEACEFUL) { this.setDead(); } } protected SoundEvent getSwimSound() { return SoundEvents.entity_hostile_swim; } protected SoundEvent getSplashSound() { return SoundEvents.entity_hostile_splash; } /** * Called when the entity is attacked. */ public boolean attackEntityFrom(DamageSource source, float amount) { return this.isEntityInvulnerable(source) ? false : super.attackEntityFrom(source, amount); } protected SoundEvent getHurtSound() { return SoundEvents.entity_hostile_hurt; } protected SoundEvent getDeathSound() { return SoundEvents.entity_hostile_death; } protected SoundEvent getFallSound(int heightIn) { return heightIn > 4 ? SoundEvents.entity_hostile_big_fall : SoundEvents.entity_hostile_small_fall; } public boolean attackEntityAsMob(Entity entityIn) { float f = (float)this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getAttributeValue(); int i = 0; if (entityIn instanceof EntityLivingBase) { f += EnchantmentHelper.getModifierForCreature(this.getHeldItemMainhand(), ((EntityLivingBase)entityIn).getCreatureAttribute()); i += EnchantmentHelper.getKnockbackModifier(this); } boolean flag = entityIn.attackEntityFrom(DamageSource.causeMobDamage(this), f); if (flag) { if (i > 0 && entityIn instanceof EntityLivingBase) { ((EntityLivingBase)entityIn).knockBack(this, (float)i * 0.5F, (double)MathHelper.sin(this.rotationYaw * 0.017453292F), (double)(-MathHelper.cos(this.rotationYaw * 0.017453292F))); this.motionX *= 0.6D; this.motionZ *= 0.6D; } int j = EnchantmentHelper.getFireAspectModifier(this); if (j > 0) { entityIn.setFire(j * 4); } if (entityIn instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer)entityIn; ItemStack itemstack = this.getHeldItemMainhand(); ItemStack itemstack1 = entityplayer.isHandActive() ? entityplayer.getActiveItemStack() : null; if (itemstack != null && itemstack1 != null && itemstack.getItem() instanceof ItemAxe && itemstack1.getItem() == Items.shield) { float f1 = 0.25F + (float)EnchantmentHelper.getEfficiencyModifier(this) * 0.05F; if (this.rand.nextFloat() < f1) { entityplayer.getCooldownTracker().setCooldown(Items.shield, 100); this.worldObj.setEntityState(entityplayer, (byte)30); } } } this.applyEnchantments(this, entityIn); } return flag; } public float getBlockPathWeight(BlockPos pos) { return 0.5F - this.worldObj.getLightBrightness(pos); } /** * Checks to make sure the light is not too bright where the mob is spawning */ protected boolean isValidLightLevel() { BlockPos blockpos = new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ); if (this.worldObj.getLightFor(EnumSkyBlock.SKY, blockpos) > this.rand.nextInt(32)) { return false; } else { int i = this.worldObj.getLightFromNeighbors(blockpos); if (this.worldObj.isThundering()) { int j = this.worldObj.getSkylightSubtracted(); this.worldObj.setSkylightSubtracted(10); i = this.worldObj.getLightFromNeighbors(blockpos); this.worldObj.setSkylightSubtracted(j); } return i <= this.rand.nextInt(8); } } /** * Checks if the entity's current position is a valid location to spawn this entity. */ public boolean getCanSpawnHere() { return this.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL && this.isValidLightLevel() && super.getCanSpawnHere(); } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getAttributeMap().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE); } /** * Entity won't drop items or experience points if this returns false */ protected boolean canDropLoot() { return true; } }",0 "C interface header file ** ** Author(s): ** laj ** ** Distributed by: ** Silicon Laboratories, Inc ** ** This file contains proprietary information. ** No dissemination allowed without prior written permission from ** Silicon Laboratories, Inc. ** ** File Description: ** This is the header file for the ProSLIC driver. ** ** Dependancies: ** proslic_datatypes.h, Si3226x_registers.h, ProSLIC.h ** */ #ifndef SI3226X_INTF_H #define SI3226X_INTF_H /* ** ** Si3226x General Constants ** */ #define SI3226X_REVA 0 #define SI3226X_REVB 1 #define SI3226X_REVC 3 /* This is revC bug - shows revD revision code */ #define DEVICE_KEY_MIN 0x64 #define DEVICE_KEY_MAX 0x6D /* ** Calibration Constants */ #define SI3226X_CAL_STD_CALR1 0xC0 /* FF */ #define SI3226X_CAL_STD_CALR2 0x18 /* F8 */ /* Timeouts in 10s of ms */ #define SI3226X_TIMEOUT_DCDC_UP 200 #define SI3226X_TIMEOUT_DCDC_DOWN 200 /* ** ** PROSLIC INITIALIZATION FUNCTIONS ** */ /* ** Function: PROSLIC_Reset ** ** Description: ** Resets the ProSLIC ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** ** Return: ** none */ int Si3226x_Reset (proslicChanType_ptr hProslic); /* ** Function: PROSLIC_ShutdownChannel ** ** Description: ** Safely shutdown channel w/o interruption to ** other active channels ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** ** Return: ** none */ int Si3226x_ShutdownChannel (proslicChanType_ptr hProslic); /* ** Function: PROSLIC_Init_MultiBOM ** ** Description: ** Initializes the ProSLIC w/ selected general parameters ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** size: number of channels ** preset: general configuration preset ** ** Return: ** none */ int Si3226x_Init_MultiBOM (proslicChanType_ptr *hProslic,int size,int preset); /* ** Function: PROSLIC_Init ** ** Description: ** Initializes the ProSLIC ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** ** Return: ** none */ int Si3226x_Init (proslicChanType_ptr *hProslic,int size); /* ** Function: PROSLIC_Reinit ** ** Description: ** Soft reset and initialization ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** ** Return: ** none */ int Si3226x_Reinit (proslicChanType_ptr hProslic,int size); /* ** Function: PROSLIC_VerifyControlInterface ** ** Description: ** Verify SPI port read capabilities ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** ** Return: ** none */ int Si3226x_VerifyControlInterface (proslicChanType_ptr hProslic); uInt8 Si3226x_ReadReg (proslicChanType_ptr hProslic,uInt8 addr); int Si3226x_WriteReg (proslicChanType_ptr hProslic,uInt8 addr,uInt8 data); ramData Si3226x_ReadRAM (proslicChanType_ptr hProslic,uInt16 addr); int Si3226x_WriteRAM (proslicChanType_ptr hProslic,uInt16 addr, ramData data); /* ** Function: ProSLIC_PrintDebugData ** ** Description: ** Register and RAM dump utility ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** ** Return: ** none */ int Si3226x_PrintDebugData (proslicChanType_ptr hProslic); /* ** Function: ProSLIC_PrintDebugReg ** ** Description: ** Register dump utility ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** ** Return: ** none */ int Si3226x_PrintDebugReg (proslicChanType_ptr hProslic); /* ** Function: ProSLIC_PrintDebugRAM ** ** Description: ** RAM dump utility ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** ** Return: ** none */ int Si3226x_PrintDebugRAM (proslicChanType_ptr hProslic); /* ** Function: Si3226x_PowerUpConverter ** ** Description: ** Powers all DC/DC converters sequentially with delay to minimize ** peak power draw on VDC. ** ** Returns: ** int (error) ** */ int Si3226x_PowerUpConverter(proslicChanType_ptr hProslic); /* ** Function: Si3226x_PowerDownConverter ** ** Description: ** Power down DCDC converter (selected channel only) ** ** Returns: ** int (error) ** */ int Si3226x_PowerDownConverter(proslicChanType_ptr hProslic); /* ** Function: Si3226x_Calibrate ** ** Description: ** Generic calibration function for Si3226x ** ** Input Parameters: ** pProslic: pointer to PROSLIC object, ** size: maximum number of channels ** calr: array of CALRx register values ** maxTime: cal timeout (in ms) ** ** Return: ** int */ int Si3226x_Calibrate (proslicChanType_ptr *hProslic, int size, uInt8 *calr, int maxTime); /* ** Function: PROSLIC_Cal ** ** Description: ** Calibrates the ProSLIC ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** ** Return: ** none */ int Si3226x_Cal (proslicChanType_ptr *hProslic, int size); /* ** Function: PROSLIC_LoadRegTables ** ** Description: ** Loads registers and ram in the ProSLIC ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** pRamTable: pointer to ram values to load ** pRegTable: pointer to register values to load ** ** ** Return: ** none */ int Si3226x_LoadRegTables (proslicChanType_ptr *hProslic, ProslicRAMInit *pRamTable, ProslicRegInit *pRegTable,int size); /* ** Function: PROSLIC_LoadPatch ** ** Description: ** Loads patch to the ProSLIC ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** pPatch: pointer to patch data ** ** Return: ** none */ int Si3226x_LoadPatch (proslicChanType_ptr hProslic, const proslicPatch *pPatch); /* ** Function: PROSLIC_VerifyPatch ** ** Description: ** Verifies patch to the ProSLIC ** ** Input Parameters: ** pProslic: pointer to PROSLIC object ** pPatch: pointer to patch data ** ** Return: ** none */ int Si3226x_VerifyPatch (proslicChanType_ptr hProslic, const proslicPatch *pPatch); /* ** Function: PROSLIC_EnableInterrupts ** ** Description: ** Enables interrupts ** ** Input Parameters: ** hProslic: pointer to Proslic object ** ** Return: ** */ int Si3226x_EnableInterrupts (proslicChanType_ptr hProslic); int Si3226x_DisableInterrupts (proslicChanType_ptr hProslic); /* ** Function: PROSLIC_SetLoopbackMode ** ** Description: ** Set loopback test mode ** ** Input Parameters: ** hProslic: pointer to Proslic object ** ** Return: ** */ int Si3226x_SetLoopbackMode (proslicChanType_ptr hProslic, ProslicLoopbackModes newMode); /* ** Function: PROSLIC_SetMuteStatus ** ** Description: ** Set mute(s) ** ** Input Parameters: ** hProslic: pointer to Proslic object ** ** Return: ** */ int Si3226x_SetMuteStatus (proslicChanType_ptr hProslic, ProslicMuteModes muteEn); /* ** ** PROSLIC CONFIGURATION FUNCTIONS ** */ /* ** Function: PROSLIC_RingSetup ** ** Description: ** configure ringing ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pRingSetup: pointer to ringing config structure ** ** Return: ** none */ int Si3226x_RingSetup (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_ToneGenSetup ** ** Description: ** configure tone generators ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pTone: pointer to tones config structure ** ** Return: ** none */ int Si3226x_ToneGenSetup (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_FSKSetup ** ** Description: ** configure fsk ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pFsk: pointer to fsk config structure ** ** Return: ** none */ int Si3226x_FSKSetup (proslicChanType *pProslic, int preset); /* * Function: Si3226x_ModifyStartBits * * Description: To change the FSK start/stop bits field. * Returns RC_NONE if OK. */ int Si3226x_ModifyCIDStartBits(proslicChanType_ptr pProslic, uInt8 enable_startStop); /* ** Function: PROSLIC_DTMFDecodeSetup ** ** Description: ** configure dtmf decode ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pDTMFDec: pointer to dtmf decoder config structure ** ** Return: ** none */ int Si3226x_DTMFDecodeSetup (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_SetProfile ** ** Description: ** set country profile of the proslic ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pCountryData: pointer to country config structure ** ** Return: ** none */ int Si3226x_SetProfile (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_ZsynthSetup ** ** Description: ** configure impedence synthesis ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pZynth: pointer to zsynth config structure ** ** Return: ** none */ int Si3226x_ZsynthSetup (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_GciCISetup ** ** Description: ** configure CI bits (GCI mode) ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pCI: pointer to ringing config structure ** ** Return: ** none */ int Si3226x_GciCISetup (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_ModemDetSetup ** ** Description: ** configure modem detector ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pModemDet: pointer to modem det config structure ** ** Return: ** none */ int Si3226x_ModemDetSetup (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_AudioGainSetup ** ** Description: ** configure audio gains ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pAudio: pointer to audio gains config structure ** ** Return: ** none */ int Si3226x_TXAudioGainSetup (proslicChanType *pProslic, int preset); int Si3226x_RXAudioGainSetup (proslicChanType *pProslic, int preset); #define Si3226x_AudioGainSetup ProSLIC_AudioGainSetup int Si3226x_TXAudioGainScale (proslicChanType *pProslic, int preset, uInt32 pga_scale, uInt32 eq_scale); int Si3226x_RXAudioGainScale (proslicChanType *pProslic, int preset, uInt32 pga_scale, uInt32 eq_scale); /* ** Function: PROSLIC_HybridSetup ** ** Description: ** configure Proslic hybrid ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pHybridCfg: pointer to ringing config structure ** ** Return: ** none */ int Si3226x_HybridSetup (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_AudioEQSetup ** ** Description: ** configure audio equalizers ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pAudioEQ: pointer to ringing config structure ** ** Return: ** none */ int Si3226x_AudioEQSetup (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_DCFeedSetup ** ** Description: ** configure dc feed ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pDcFeed: pointer to dc feed config structure ** ** Return: ** none */ int Si3226x_DCFeedSetup (proslicChanType *pProslic,int preset); int Si3226x_DCFeedSetupCfg (proslicChanType *pProslic,ProSLIC_DCfeed_Cfg *cfg,int preset); /* ** Function: PROSLIC_GPIOSetup ** ** Description: ** configure gpio ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pGpio: pointer to gpio config structure ** ** Return: ** none */ int Si3226x_GPIOSetup (proslicChanType *pProslic); /* ** Function: PROSLIC_PCMSetup ** ** Description: ** configure pcm ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pPcm: pointer to pcm config structure ** ** Return: ** none */ int Si3226x_PCMSetup (proslicChanType *pProslic, int preset); int Si3226x_PCMTimeSlotSetup (proslicChanType *pProslic, uInt16 rxcount, uInt16 txcount); /* ** ** PROSLIC CONTROL FUNCTIONS ** */ /* ** Function: PROSLIC_GetInterrupts ** ** Description: ** Enables interrupts ** ** Input Parameters: ** hProslic: pointer to Proslic object ** pIntData: pointer to interrupt info retrieved ** ** Return: ** */ int Si3226x_GetInterrupts (proslicChanType_ptr hProslic, proslicIntType *pIntData); /* ** Function: PROSLIC_ReadHookStatus ** ** Description: ** Determine hook status ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pHookStat: current hook status ** ** Return: ** none */ int Si3226x_ReadHookStatus (proslicChanType *pProslic,uInt8 *pHookStat); /* ** Function: PROSLIC_WriteLinefeed ** ** Description: ** Sets linefeed state ** ** Input Parameters: ** pProslic: pointer to Proslic object ** newLinefeed: new linefeed state ** ** Return: ** none */ int Si3226x_SetLinefeedStatus (proslicChanType *pProslic,uInt8 newLinefeed); /* ** Function: PROSLIC_SetLinefeedBroadcast ** ** Description: ** Sets linefeed state ** ** Input Parameters: ** pProslic: pointer to Proslic object ** newLinefeed: new linefeed state ** ** Return: ** none */ int Si3226x_SetLinefeedStatusBroadcast (proslicChanType *pProslic, uInt8 newLinefeed); /* ** Function: PROSLIC_PolRev ** ** Description: ** Sets polarity reversal state ** ** Input Parameters: ** pProslic: pointer to Proslic object ** abrupt: set this to 1 for abrupt pol rev ** newPolRevState: new pol rev state ** ** Return: ** none */ int Si3226x_PolRev (proslicChanType *pProslic,uInt8 abrupt, uInt8 newPolRevState); /* ** Function: PROSLIC_GPIOControl ** ** Description: ** Sets gpio of the proslic ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pGpioData: pointer to gpio status ** read: set to 1 to read status, 0 to write ** ** Return: ** none */ int Si3226x_GPIOControl (proslicChanType *pProslic,uInt8 *pGpioData, uInt8 read); /* ** Function: ProSLIC_MWISetup ** ** Description: ** Modify default MWI amplitude and switch debounce parameters ** ** Input Parameters: ** pProslic: pointer to Proslic object ** vpk_mag: peak flash voltgage (vpk) - passing a 0 results ** in no change to VBATH_NEON ** lcmrmask_mwi: LCR mask time (ms) after MWI state switch - passing ** a 0 results in no change to LCRMASK_MWI ** ** Return: ** none */ int Si3226x_MWISetup (proslicChanType *pProslic,uInt16 vpk_mag,uInt16 lcrmask_mwi); /* ** Function: ProSLIC_MWIEnable ** ** Description: ** Enable MWI feature ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_MWIEnable (proslicChanType *pProslic); /* ** Function: ProSLIC_MWIDisable ** ** Description: ** Disable MWI feature ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_MWIDisable (proslicChanType *pProslic); /* ** Function: ProSLIC_SetMWIState ** ** Description: ** Set MWI state ** ** Input Parameters: ** pProslic: pointer to Proslic object ** flash_on: 0 = low, 1 = high (VBATH_NEON) ** ** Return: ** none */ int Si3226x_SetMWIState (proslicChanType *pProslic,uInt8 flash_on); /* ** Function: ProSLIC_GetMWIState ** ** Description: ** Read MWI state ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** 0 - Flash OFF, 1 - Flash ON, RC_MWI_NOT_ENABLED */ int Si3226x_GetMWIState (proslicChanType *pProslic); /* ** Function: ProSLIC_MWI ** ** Description: ** implements message waiting indicator ** ** Input Parameters: ** pProslic: pointer to Proslic object ** lampOn: 0 = turn lamp off, 1 = turn lamp on ** ** Return: ** none ** ** Use Deprecated. */ int Si3226x_MWI (proslicChanType *pProslic,uInt8 lampOn); /* ** Function: PROSLIC_StartGenericTone ** ** Description: ** Initializes and start tone generators ** ** Input Parameters: ** pProslic: pointer to Proslic object ** timerEn: specifies whether to enable the tone generator timers ** ** Return: ** none */ int Si3226x_ToneGenStart (proslicChanType *pProslic, uInt8 timerEn); /* ** Function: PROSLIC_StopTone ** ** Description: ** Stops tone generators ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_ToneGenStop (proslicChanType *pProslic); /* ** Function: PROSLIC_StartRing ** ** Description: ** Initializes and start ring generator ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_RingStart (proslicChanType *pProslic); /* ** Function: PROSLIC_StopRing ** ** Description: ** Stops ring generator ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_RingStop (proslicChanType *pProslic); /* ** Function: PROSLIC_EnableCID ** ** Description: ** enable fsk ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_EnableCID (proslicChanType *pProslic); /* ** Function: PROSLIC_DisableCID ** ** Description: ** disable fsk ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_DisableCID (proslicChanType *pProslic); /* ** Function: PROSLIC_SendCID ** ** Description: ** send fsk data ** ** Input Parameters: ** pProslic: pointer to Proslic object ** buffer: buffer to send ** numBytes: num of bytes in the buffer ** ** Return: ** none */ int Si3226x_SendCID (proslicChanType *pProslic, uInt8 *buffer, uInt8 numBytes); int Si3226x_CheckCIDBuffer (proslicChanType *pProslic, uInt8 *fsk_buf_avail); /* ** Function: PROSLIC_StartPCM ** ** Description: ** Starts PCM ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_PCMStart (proslicChanType *pProslic); /* ** Function: PROSLIC_StopPCM ** ** Description: ** Disables PCM ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_PCMStop (proslicChanType *pProslic); /* ** Function: PROSLIC_ReadDTMFDigit ** ** Description: ** Read DTMF digit (would be called after DTMF interrupt to collect digit) ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pDigit: digit read ** ** Return: ** none */ int Si3226x_DTMFReadDigit (proslicChanType *pProslic,uInt8 *pDigit); /* ** Function: PROSLIC_PLLFreeRunStart ** ** Description: ** initiates pll free run mode ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_PLLFreeRunStart (proslicChanType *pProslic); /* ** Function: PROSLIC_PLLFreeRunStop ** ** Description: ** exit pll free run mode ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_PLLFreeRunStop (proslicChanType *pProslic); /* ** Function: PROSLIC_PulseMeterSetup ** ** Description: ** configure pulse metering ** ** Input Parameters: ** pProslic: pointer to Proslic object ** pPulseCfg: pointer to pulse metering config structure ** ** Return: ** none */ int Si3226x_PulseMeterSetup (proslicChanType *pProslic, int preset); /* ** Function: PROSLIC_PulseMeterEnable ** ** Description: ** enable pulse meter generation ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_PulseMeterEnable (proslicChanType *pProslic); /* ** Function: PROSLIC_PulseMeterDisable ** ** Description: ** disable pulse meter generation ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_PulseMeterDisable (proslicChanType *pProslic); /* ** Function: PROSLIC_PulseMeterStart ** ** Description: ** start pulse meter tone ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_PulseMeterStart (proslicChanType *pProslic); /* ** Function: PROSLIC_PulseMeterStop ** ** Description: ** stop pulse meter tone ** ** Input Parameters: ** pProslic: pointer to Proslic object ** ** Return: ** none */ int Si3226x_PulseMeterStop (proslicChanType *pProslic); /* ** Function: PROSLIC_LBCal ** ** Description: ** Execute longitudinal balance calibration ** ** Input Parameters: ** hProslic: pointer to array of Proslic objects ** ** Return: ** */ int Si3226x_LBCal (proslicChanType_ptr *pProslic, int size); int Si3226x_GetLBCalResult (proslicChanType *pProslic,int32 *result1,int32 *result2,int32 *result3,int32 *result4); int Si3226x_GetLBCalResultPacked (proslicChanType *pProslic,int32 *result); int Si3226x_LoadPreviousLBCal (proslicChanType *pProslic,int32 result1,int32 result2,int32 result3,int32 result4); int Si3226x_LoadPreviousLBCalPacked (proslicChanType *pProslic,int32 *result); /* ** Function: PROSLIC_dbgSetDCFeed ** ** Description: ** provisionary function for setting up ** dcfeed given desired open circuit voltage ** and loop current. */ int Si3226x_dbgSetDCFeed (proslicChanType *pProslic, uInt32 v_vlim_val, uInt32 i_ilim_val, int32 preset); /* ** Function: PROSLIC_dbgSetDCFeedVopen ** ** Description: ** provisionary function for setting up ** dcfeed given desired open circuit voltage ** and loop current. */ int Si3226x_dbgSetDCFeedVopen (proslicChanType *pProslic, uInt32 v_vlim_val, int32 preset); /* ** Function: PROSLIC_dbgSetDCFeedIloop ** ** Description: ** provisionary function for setting up ** dcfeed given desired open circuit voltage ** and loop current. */ int Si3226x_dbgSetDCFeedIloop (proslicChanType *pProslic, uInt32 i_ilim_val, int32 preset); /* ** Function: PROSLIC_dbgRingingSetup ** ** Description: ** Provisionary function for setting up ** Ring type, frequency, amplitude and dc offset. ** Main use will be by peek/poke applications. */ int Si3226x_dbgSetRinging (proslicChanType *pProslic, ProSLIC_dbgRingCfg *ringCfg, int preset); /* ** Function: PROSLIC_dbgSetRXGain ** ** Description: ** Provisionary function for setting up ** RX path gain. */ int Si3226x_dbgSetRXGain (proslicChanType *pProslic, int32 gain, int impedance_preset, int audio_gain_preset); /* ** Function: PROSLIC_dbgSetTXGain ** ** Description: ** Provisionary function for setting up ** TX path gain. */ int Si3226x_dbgSetTXGain (proslicChanType *pProslic, int32 gain, int impedance_preset, int audio_gain_preset); /* ** Function: PROSLIC_LineMonitor ** ** Description: ** Monitor line voltages and currents */ int Si3226x_LineMonitor(proslicChanType *pProslic, proslicMonitorType *monitor); /* ** Function: PROSLIC_PSTNCheck ** ** Description: ** Continuous monitor of ilong to detect hot pstn line */ int Si3226x_PSTNCheck(proslicChanType *pProslic, proslicPSTNCheckObjType *pstnCheckObj); /* ** Function: PROSLIC_DiffPSTNCheck ** ** Description: ** Detection of foreign PSTN */ int Si3226x_DiffPSTNCheck (proslicChanType *pProslic, proslicDiffPSTNCheckObjType *pPSTNCheck); /* ** Function: PROSLIC_SetPowersaveMode ** ** Description: ** Enable or Disable powersave mode */ int Si3226x_SetPowersaveMode(proslicChanType *pProslic, int pwrsave); /* ** Function: PROSLIC_ReadMADCScaled ** ** Description: ** ReadMADC (or other sensed voltage/currents) and ** return scaled value in int32 format */ int32 Si3226x_ReadMADCScaled(proslicChanType *pProslic, uInt16 addr, int32 scale); #endif ",0 "/UIKit.h> #import ""SKWebImageCompat.h"" #import ""SKWebImageManager.h"" NS_ASSUME_NONNULL_BEGIN @interface UIView (WebCacheOperation) /** Set the image load operation (storage in a view based dictionary) @param operation <#operation description#> */ - (void)sk_setImageloadOperation:(nullable id)operation forKey:(nullable NSString *)key; /** Cancel all operation for the current UiView and key @param key <#key description#> */ - (void)sk_cancelImageLoadOperationWithKey:(nullable NSString *)key; /** Just remove the operation corresponding to the UIView and key without cancelling them @param key <#key description#> */ - (void)sk_removeImageLoadOperationWithKey:(nullable NSString *)key; @end NS_ASSUME_NONNULL_END ",0 "le>paramcoq: Not compatible 👼
« Up

paramcoq 1.1.3+coq8.14 Not compatible 👼

📅 (2022-01-23 14:46:44 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-threads        base
base-unix           base
conf-findutils      1           Virtual package relying on findutils
conf-gmp            3           Virtual package relying on a GMP lib system installation
coq                 dev         Formal proof management system
dune                2.9.1       Fast, portable, and opinionated build system
ocaml               4.09.1      The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.1      Official release 4.09.1
ocaml-config        1           OCaml Switch Configuration
ocamlfind           1.9.1       A library manager for OCaml
zarith              1.12        Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Pierre Roux <pierre.roux@onera.fr>"
homepage: "https://github.com/coq-community/paramcoq"
dev-repo: "git+https://github.com/coq-community/paramcoq.git"
bug-reports: "https://github.com/coq-community/paramcoq/issues"
license: "MIT"
build: [make "-j%{jobs}%"]
install: [make "install"]
depends: [
  "coq" {>= "8.14" & < "8.15~"}
]
tags: [
  "keyword:paramcoq"
  "keyword:parametricity"
  "keyword:OCaml modules"
  "category:Miscellaneous/Coq Extensions"
  "logpath:Param"
  "date:2021-09-24"
]
authors: [
  "Chantal Keller (Inria, École polytechnique)"
  "Marc Lasson (ÉNS de Lyon)"
  "Abhishek Anand"
  "Pierre Roux"
  "Emilio Jesús Gallego Arias"
  "Cyril Cohen"
  "Matthieu Sozeau"
]
synopsis: "Plugin for generating parametricity statements to perform refinement proofs"
description: """
A Coq plugin providing commands for generating parametricity statements.
Typical applications of such statements are in data refinement proofs.
Note that the plugin is still in an experimental state - it is not very user
friendly (lack of good error messages) and still contains bugs. But it
is usable enough to "translate" a large chunk of the standard library."""
url {
  src: "https://github.com/coq-community/paramcoq/archive/v1.1.3+coq8.14.tar.gz"
  checksum: "sha512=bcf73041cbbac2b85c31ddfcec04882eb18a0a481981b52a3f727f8d1abb31815ba6b3815bbdec63fcf1f14e25fbf958e39acca043e3a00a1967a814becb6101"
}

Lint

Command
true
Return code
0

Dry install 🏜️

Dry install with the current Coq version:

Command
opam install -y --show-action coq-paramcoq.1.1.3+coq8.14 coq.dev
Return code
5120
Output
[NOTE] Package coq is already installed (current version is dev).
The following dependencies couldn't be met:
  - coq-paramcoq -> coq < 8.15~ -> ocaml < 4.09~
      base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
  - No available version of coq satisfies the constraints
No solution found, exiting

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command
opam remove -y coq; opam install -y --show-action --unlock-base coq-paramcoq.1.1.3+coq8.14
Return code
0

Install dependencies

Command
true
Return code
0
Duration
0 s

Install 🚀

Command
true
Return code
0
Duration
0 s

Installation size

No files were installed.

Uninstall 🧹

Command
true
Return code
0
Missing removes
none
Wrong removes
none

Sources are on GitHub © Guillaume Claret 🐣

",0 " reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 * which accompanies this distribution. * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html * and the Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Oracle - initial API and implementation from Oracle TopLink ******************************************************************************/ package org.eclipse.persistence.tools.workbench.utility.events; import java.awt.EventQueue; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.io.Serializable; /** * AWT-aware implementation of ChangeNotifier interface: * If we are executing on the AWT event-dispatch thread, * simply forward the change notification directly to the listener. * If we are executing on some other thread, queue up the * notification on the AWT event queue so it can be executed * on the event-dispatch thread (after the pending events have * been dispatched). */ public final class AWTChangeNotifier implements ChangeNotifier, Serializable { // singleton private static ChangeNotifier INSTANCE; private static final long serialVersionUID = 1L; /** * Return the singleton. */ public synchronized static ChangeNotifier instance() { if (INSTANCE == null) { INSTANCE = new AWTChangeNotifier(); } return INSTANCE; } /** * Ensure non-instantiability. */ private AWTChangeNotifier() { super(); } /** * @see ChangeNotifier#stateChanged(StateChangeListener, StateChangeEvent) */ public void stateChanged(final StateChangeListener listener, final StateChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.stateChanged(event); } else { this.invoke( new Runnable() { public void run() { listener.stateChanged(event); } public String toString() { return ""stateChanged""; } } ); } } /** * @see ChangeSupport.Notifier#propertyChange(java.beans.PropertyChangeListener, java.beans.PropertyChangeEvent) */ public void propertyChange(final PropertyChangeListener listener, final PropertyChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.propertyChange(event); } else { this.invoke( new Runnable() { public void run() { listener.propertyChange(event); } public String toString() { return ""propertyChange""; } } ); } } /** * @see ChangeSupport.Notifier#itemsAdded(CollectionChangeListener, CollectionChangeEvent) */ public void itemsAdded(final CollectionChangeListener listener, final CollectionChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.itemsAdded(event); } else { this.invoke( new Runnable() { public void run() { listener.itemsAdded(event); } public String toString() { return ""itemsAdded (Collection)""; } } ); } } /** * @see ChangeSupport.Notifier#itemsRemoved(CollectionChangeListener, CollectionChangeEvent) */ public void itemsRemoved(final CollectionChangeListener listener, final CollectionChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.itemsRemoved(event); } else { this.invoke( new Runnable() { public void run() { listener.itemsRemoved(event); } public String toString() { return ""itemsRemoved (Collection)""; } } ); } } /** * @see ChangeSupport.Notifier#collectionChanged(CollectionChangeListener, CollectionChangeEvent) */ public void collectionChanged(final CollectionChangeListener listener, final CollectionChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.collectionChanged(event); } else { this.invoke( new Runnable() { public void run() { listener.collectionChanged(event); } public String toString() { return ""collectionChanged""; } } ); } } /** * @see ChangeSupport.Notifier#itemsAdded(ListChangeListener, ListChangeEvent) */ public void itemsAdded(final ListChangeListener listener, final ListChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.itemsAdded(event); } else { this.invoke( new Runnable() { public void run() { listener.itemsAdded(event); } public String toString() { return ""itemsAdded (List)""; } } ); } } /** * @see ChangeSupport.Notifier#itemsRemoved(ListChangeListener, ListChangeEvent) */ public void itemsRemoved(final ListChangeListener listener, final ListChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.itemsRemoved(event); } else { this.invoke( new Runnable() { public void run() { listener.itemsRemoved(event); } public String toString() { return ""itemsRemoved (List)""; } } ); } } /** * @see ChangeSupport.Notifier#itemsReplaced(ListChangeListener, ListChangeEvent) */ public void itemsReplaced(final ListChangeListener listener, final ListChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.itemsReplaced(event); } else { this.invoke( new Runnable() { public void run() { listener.itemsReplaced(event); } public String toString() { return ""itemsReplaced (List)""; } } ); } } /** * @see ChangeSupport.Notifier#listChanged(ListChangeListener, ListChangeEvent) */ public void listChanged(final ListChangeListener listener, final ListChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.listChanged(event); } else { this.invoke( new Runnable() { public void run() { listener.listChanged(event); } public String toString() { return ""listChanged""; } } ); } } /** * @see ChangeSupport.Notifier#nodeAdded(TreeChangeListener, TreeChangeEvent) */ public void nodeAdded(final TreeChangeListener listener, final TreeChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.nodeAdded(event); } else { this.invoke( new Runnable() { public void run() { listener.nodeAdded(event); } public String toString() { return ""nodeAdded""; } } ); } } /** * @see ChangeSupport.Notifier#nodeRemoved(TreeChangeListener, TreeChangeEvent) */ public void nodeRemoved(final TreeChangeListener listener, final TreeChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.nodeRemoved(event); } else { this.invoke( new Runnable() { public void run() { listener.nodeRemoved(event); } public String toString() { return ""nodeRemoved""; } } ); } } /** * @see ChangeSupport.Notifier#treeChanged(TreeChangeListener, TreeChangeEvent) */ public void treeChanged(final TreeChangeListener listener, final TreeChangeEvent event) { if (EventQueue.isDispatchThread()) { listener.treeChanged(event); } else { this.invoke( new Runnable() { public void run() { listener.treeChanged(event); } public String toString() { return ""treeChanged""; } } ); } } /** * EventQueue.invokeLater(Runnable) seems to work OK; * but using #invokeAndWait() can somtimes make things * more predictable when debugging. */ private void invoke(Runnable r) { EventQueue.invokeLater(r); // try { // EventQueue.invokeAndWait(r); // } catch (InterruptedException ex) { // throw new RuntimeException(ex); // } catch (java.lang.reflect.InvocationTargetException ex) { // throw new RuntimeException(ex); // } } /** * Serializable singleton support */ private Object readResolve() { return instance(); } } ",0 "const TAX_LABEL = 'Tax'; public function init() { $this->add([ 'name' => 'amount', 'type' => 'text', 'options' => [ 'label' => self::AMOUNT_LABEL, ] ]); $this->add([ 'name' => 'tax', 'type' => 'text', 'options' => [ 'label' => self::TAX_LABEL, ] ]); } } ",0 "#L482' class='improve-docs btn btn-primary'> Improve this Doc  View Source

ngMessagesInclude

  1. - directive in module ngMessages

ngMessagesInclude is a directive with the purpose to import existing ngMessage template code from a remote template and place the downloaded template code into the exact spot that the ngMessagesInclude directive is placed within the ngMessages container. This allows for a series of pre-defined messages to be reused and also allows for the developer to determine what messages are overridden due to the placement of the ngMessagesInclude directive.

Directive Info

  • This directive creates new scope.
  • This directive executes at priority level 0.

Usage

<!-- using attribute directives -->
<ANY ng-messages="expression" role="alert">
  <ANY ng-messages-include="remoteTplString">...</ANY>
</ANY>

<!-- or by using element directives -->
<ng-messages for="expression" role="alert">
  <ng-messages-include src="expressionValue1">...</ng-messages-include>
</ng-messages>

Click here to learn more about ngMessages and ngMessage.

Arguments

Param Type Details
ngMessagesInclude | src string

a string value corresponding to the remote template.

",0 ". * * * * * * * * * * * * * * * * * * * * */ package java.security.spec; /** * This immutable class specifies the set of parameters used for * generating elliptic curve (EC) domain parameters. * * @see AlgorithmParameterSpec * * @author Valerie Peng * * @since 1.5 */ public class ECGenParameterSpec implements AlgorithmParameterSpec { private String name; /** * Creates a parameter specification for EC parameter * generation using a standard (or predefined) name * {@code stdName} in order to generate the corresponding * (precomputed) elliptic curve domain parameters. For the * list of supported names, please consult the documentation * of provider whose implementation will be used. * @param stdName the standard name of the to-be-generated EC * domain parameters. * @exception NullPointerException if {@code stdName} * is null. */ public ECGenParameterSpec(String stdName) { if (stdName == null) { throw new NullPointerException(""stdName is null""); } this.name = stdName; } /** * Returns the standard or predefined name of the * to-be-generated EC domain parameters. * @return the standard or predefined name. */ public String getName() { return name; } } ",0 "ics.BitmapFactory; import android.os.AsyncTask; import android.support.annotation.UiThread; import android.util.Log; import android.util.Pair; import android.util.LruCache; import android.widget.RelativeLayout; import android.content.res.AssetManager; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.WritableMap; import com.facebook.react.uimanager.events.RCTEventEmitter; import com.google.vr.sdk.widgets.pano.VrPanoramaEventListener; import com.google.vr.sdk.widgets.pano.VrPanoramaView; import com.google.vr.sdk.widgets.pano.VrPanoramaView.Options; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.File; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; import java.lang.Runtime; import javax.annotation.Nullable; import org.apache.commons.io.IOUtils; public class RNGoogleVRPanoramaView extends RelativeLayout { private static final String TAG = RNGoogleVRPanoramaView.class.getSimpleName(); // public static Bitmap bitmap = null; // public Bitmap bitmap = null; private android.os.Handler _handler; private RNGoogleVRPanoramaViewManager _manager; private Activity _activity; private VrPanoramaView panoWidgetView; private ImageLoaderTask imageLoaderTask; private Options panoOptions = new Options(); private LruCache mMemoryCache; private URL imageUrl = null; private String url; private int imageWidth; private int imageHeight; private boolean showFullScreen = false; private boolean showStereo = false; private boolean showInfo = false; private boolean isLocalUrl = false; // Get max available VM memory, exceeding this amount will throw an // OutOfMemory exception. Stored in kilobytes as LruCache takes an // int in its constructor. final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); // Use 1/8th of the available memory for this memory cache. final int cacheSize = maxMemory / 8; @UiThread public RNGoogleVRPanoramaView(Context context, RNGoogleVRPanoramaViewManager manager, Activity activity) { super(context); _handler = new android.os.Handler(); _manager = manager; _activity = activity; mMemoryCache = new LruCache(cacheSize) { @Override protected int sizeOf(String key, Bitmap bitmap) { // The cache size will be measured in kilobytes rather than // number of items. return bitmap.getByteCount() / 1024; } }; } public void setStereo(boolean showStereo) { this.showStereo = showStereo; } public void setInfo(boolean showInfo) { this.showInfo = showInfo; } public void setFullScreen(boolean showFullScreen) { this.showFullScreen = showFullScreen; } public void clear() { /* Log.d(""Surya"", ""Clearing bitmap""); this.bitmap.recycle(); */ } public void addBitmapToMemoryCache(String key, Bitmap bitmap) { if (getBitmapFromMemCache(key) == null) { mMemoryCache.put(key, bitmap); } } public Bitmap getBitmapFromMemCache(String key) { return mMemoryCache.get(key); } public void onAfterUpdateTransaction(Context context) { panoWidgetView = new VrPanoramaView(_activity); panoWidgetView.setEventListener(new ActivityEventListener()); panoWidgetView.setStereoModeButtonEnabled(showStereo); panoWidgetView.setInfoButtonEnabled(showInfo); panoWidgetView.setFullscreenButtonEnabled(showFullScreen); this.addView(panoWidgetView); if (imageLoaderTask != null) { imageLoaderTask.cancel(true); } imageLoaderTask = new ImageLoaderTask(context); imageLoaderTask.execute(Pair.create(imageUrl, panoOptions)); } public void setImageUrl(String value) { if (imageUrl != null && imageUrl.toString().equals(value)) { return; } url = value; isLocalUrl = true; } public void setDimensions(int width, int height) { this.imageWidth = width; this.imageHeight = height; } public void setInputType(int value) { if (panoOptions.inputType == value) { return; } panoOptions.inputType = value; } class ImageLoaderTask extends AsyncTask, Void, Boolean> { private Context mContext; public ImageLoaderTask (Context context){ mContext = context; } protected Boolean doInBackground(Pair... fileInformation) { /* if (RNGoogleVRPanoramaView.bitmap != null) { RNGoogleVRPanoramaView.bitmap.recycle(); RNGoogleVRPanoramaView.bitmap = null; } */ final URL imageUrl = fileInformation[0].first; Options panoOptions = fileInformation[0].second; InputStream istr = null; Log.d(TAG, ""Image loader task is called: "" + url); Bitmap image = getBitmapFromMemCache(url); if (image == null) { if (!isLocalUrl) { try { HttpURLConnection connection = (HttpURLConnection) fileInformation[0].first.openConnection(); connection.connect(); istr = connection.getInputStream(); image = decodeSampledBitmap(istr); } catch (IOException e) { Log.e(TAG, ""Could not load file: "" + e); return false; } finally { try { if (istr!=null) { istr.close(); } } catch (IOException e) { Log.e(TAG, ""Could not close input stream: "" + e); } } } else { AssetManager assetManager = mContext.getAssets(); try { istr = assetManager.open(url); image = BitmapFactory.decodeStream(istr); } catch (IOException e) { Log.e(TAG, ""Could not decode default bitmap: "" + e); return false; } } } if (image != null) { //bitmap = image; Log.d(TAG, ""Image does exist, so we're adding it to the pano: "" + url); //Bitmap temp = getBitmapFromMemCache(url); //RNGoogleVRPanoramaView.bitmap = temp; panoWidgetView.loadImageFromBitmap(image, panoOptions); try { istr.close(); } catch (IOException e) { Log.e(TAG, ""Could not close input stream: "" + e); } } return true; } private Bitmap decodeSampledBitmap(InputStream inputStream) throws IOException { final byte[] bytes = getBytesFromInputStream(inputStream); BitmapFactory.Options options = new BitmapFactory.Options(); if(imageWidth != 0 && imageHeight != 0) { options.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); options.inSampleSize = calculateInSampleSize(options, imageWidth, imageHeight); options.inJustDecodeBounds = false; } return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options); } private byte[] getBytesFromInputStream(InputStream inputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); IOUtils.copy(inputStream, baos); return baos.toByteArray(); } private int calculateInSampleSize( BitmapFactory.Options options, int reqWidth, int reqHeight) { // Raw height and width of image final int height = options.outHeight; final int width = options.outWidth; int inSampleSize = 1; if (height > reqHeight || width > reqWidth) { final int halfHeight = height / 2; final int halfWidth = width / 2; // Calculate the largest inSampleSize value that is a power of 2 and keeps both // height and width larger than the requested height and width. while ((halfHeight / inSampleSize) > reqHeight && (halfWidth / inSampleSize) > reqWidth) { inSampleSize *= 2; } } return inSampleSize; } } private class ActivityEventListener extends VrPanoramaEventListener { @Override public void onLoadSuccess() { emitEvent(""onImageLoaded"", null); } @Override public void onLoadError(String errorMessage) { Log.e(TAG, ""Error loading pano: "" + errorMessage); emitEvent(""onImageLoadingFailed"", null); } } void emitEvent(String name, @Nullable WritableMap event) { if (event == null) { event = Arguments.createMap(); } ((ReactContext)getContext()) .getJSModule(RCTEventEmitter.class) .receiveEvent(getId(), name, event); } } ",0 "mespace Input { class GLUL_API MouseButtonEvent : public Event { public: MouseButtonEvent(); MouseButtonEvent(MouseButton button, Action action, float x, float y); MouseButtonEvent(MouseButton button, Action action, const glm::vec2& position); float getX() const; float getY() const; const glm::vec2& getPosition() const; MouseButton getMouseButton() const; Action getAction() const; void setX(float x); void setY(float y); void setPosition(const glm::vec2& position); void setMouseButton(MouseButton button); void setAction(Action action); public: MouseButtonEvent* asMouseButtonEvent(); const MouseButtonEvent* asMouseButtonEvent() const; private: void _abstract() { } MouseButton _button; Action _action; glm::vec2 _position; }; } } ",0 "olvemento Tecnolóxico de Galicia * Copyright (C) 2010-2011 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ package org.libreplan.business.resources.entities; import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.apache.commons.lang3.StringUtils; import org.hibernate.validator.constraints.NotEmpty; import javax.validation.Valid; /** * Represents entity. It is another type of work resource. * * @author Javier Moran Rua * @author Fernando Bellas Permuy */ public class Machine extends Resource { private final static ResourceEnum type = ResourceEnum.MACHINE; private String name; private String description; private Set configurationUnits = new HashSet<>(); @Valid public Set getConfigurationUnits() { return Collections.unmodifiableSet(configurationUnits); } public void addMachineWorkersConfigurationUnit(MachineWorkersConfigurationUnit unit) { configurationUnits.add(unit); } public void removeMachineWorkersConfigurationUnit(MachineWorkersConfigurationUnit unit) { configurationUnits.remove(unit); } public static Machine createUnvalidated(String code, String name, String description) { Machine machine = create(new Machine(), code); machine.name = name; machine.description = description; return machine; } public void updateUnvalidated(String name, String description) { if (!StringUtils.isBlank(name)) { this.name = name; } if (!StringUtils.isBlank(description)) { this.description = description; } } /** * Used by Hibernate. Do not use! */ protected Machine() {} public static Machine create() { return create(new Machine()); } public static Machine create(String code) { return create(new Machine(), code); } @NotEmpty(message = ""machine name not specified"") public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public String getShortDescription() { return name + "" ("" + getCode() + "")""; } public void setDescription(String description) { this.description = description; } @Override protected boolean isCriterionSatisfactionOfCorrectType(CriterionSatisfaction c) { return c.getResourceType().equals(ResourceEnum.MACHINE); } @Override public ResourceEnum getType() { return type; } @Override public String toString() { return String.format(""MACHINE: %s"", name); } @Override public String getHumanId() { return name; } } ",0 ", with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * The name of Jice or Mingos may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include ""libtcod.h"" #define MAX_JAVADOC_COMMENT_SIZE 16384 /* damn ANSI C does not know strdup, strcasecmp, strncasecmp */ char *TCOD_strdup(const char *s) { uint32 l=strlen(s)+1; char *ret=malloc(sizeof(char)*l); memcpy(ret,s,sizeof(char)*l); return ret; } int TCOD_strcasecmp(const char *s1, const char *s2) { unsigned char c1,c2; do { c1 = *s1++; c2 = *s2++; c1 = (unsigned char) tolower( (unsigned char) c1); c2 = (unsigned char) tolower( (unsigned char) c2); } while((c1 == c2) && (c1 != '\0')); return (int) c1-c2; } int TCOD_strncasecmp(const char *s1, const char *s2, size_t n) { unsigned char c1,c2; do { c1 = *s1++; c2 = *s2++; c1 = (unsigned char) tolower( (unsigned char) c1); c2 = (unsigned char) tolower( (unsigned char) c2); n--; } while((c1 == c2) && (c1 != '\0') && n > 0); return (int) c1-c2; } static const char * TCOD_LEX_names[] = { ""unknown token"", ""symbol"", ""keyword"", ""identifier"", ""string"", ""integer"", ""float"", ""char"", ""eof"" }; static char *TCOD_last_error=NULL; const char *TCOD_lex_get_token_name(int token_type) { return TCOD_LEX_names[token_type]; } static void allocate_tok(TCOD_lex_t *lex, int len) { if ( lex->toklen > len ) return; while ( lex->toklen <= len ) lex->toklen *= 2; lex->tok = (char *)realloc(lex->tok,lex->toklen); } char *TCOD_lex_get_last_error() { return TCOD_last_error; } TCOD_lex_t *TCOD_lex_new_intern() { return (TCOD_lex_t *)calloc(1,sizeof(TCOD_lex_t)); } TCOD_lex_t * TCOD_lex_new( const char **_symbols, const char **_keywords, const char *simpleComment, const char *commentStart, const char *commentStop, const char *javadocCommentStart, const char *_stringDelim, int _flags) { TCOD_lex_t *lex=(TCOD_lex_t *)TCOD_lex_new_intern(); lex->flags = _flags; lex->last_javadoc_comment = (char *)calloc(sizeof(char),MAX_JAVADOC_COMMENT_SIZE ); if ( _symbols ) { while ( _symbols[ lex->nb_symbols ] ) { if ( strlen( _symbols[ lex->nb_symbols ] ) >= TCOD_LEX_SYMBOL_SIZE ) { static char msg[255]; sprintf (msg, ""symbol '%s' too long (max size %d)"", _symbols[ lex->nb_symbols ], TCOD_LEX_SYMBOL_SIZE ); TCOD_last_error=TCOD_strdup(msg); return NULL; } strcpy(lex->symbols[ lex->nb_symbols ], _symbols[ lex->nb_symbols ] ); lex->nb_symbols++; } } if ( _keywords ) { while ( _keywords[ lex->nb_keywords ] ) { if ( strlen( _keywords[ lex->nb_keywords ] ) >= TCOD_LEX_KEYWORD_SIZE ) { static char msg[255]; sprintf(msg,""keyword '%s' too long (max size %d)"", _keywords[ lex->nb_keywords ], TCOD_LEX_KEYWORD_SIZE); TCOD_last_error=TCOD_strdup(msg); return NULL; } if ( lex->flags & TCOD_LEX_FLAG_NOCASE ) { char *ptr = (char *)_keywords[ lex->nb_keywords ]; while ( *ptr ) { *ptr = (char)toupper( *ptr); ptr++; } } strcpy(lex->keywords[ lex->nb_keywords ], _keywords[ lex->nb_keywords ] ); lex->nb_keywords++; } } lex->simpleCmt = simpleComment; lex->cmtStart = commentStart; lex->cmtStop = commentStop; lex->javadocCmtStart = javadocCommentStart; lex->stringDelim = _stringDelim; lex->lastStringDelim='\0'; lex->tok = (char *)calloc(sizeof(char),256); lex->toklen=256; return (TCOD_lex_t *)lex; } char *TCOD_lex_get_last_javadoc(TCOD_lex_t *lex) { if ( ! lex->javadoc_read && lex->last_javadoc_comment[0] != '\0' ) { lex->javadoc_read=true; return lex->last_javadoc_comment; } lex->javadoc_read=false; lex->last_javadoc_comment[0]='\0'; return NULL; } void TCOD_lex_delete(TCOD_lex_t *lex) { if ( ! lex->savept ) { if ( lex->filename ) free( lex->filename ); if ( lex->buf && lex->allocBuf ) free(lex->buf); if ( lex->last_javadoc_comment ) free(lex->last_javadoc_comment); } lex->filename=NULL; lex->buf = NULL; lex->allocBuf=false; if ( lex->tok ) free(lex->tok); free(lex); } void TCOD_lex_set_data_buffer_internal(TCOD_lex_t *lex) { lex->file_line = 1; lex->pos = lex->buf; lex->token_type = TCOD_LEX_UNKNOWN; lex->token_int_val = 0; lex->token_float_val = 0.0; lex->token_idx = -1; lex->tok[0] = '\0'; } void TCOD_lex_set_data_buffer(TCOD_lex_t *lex,char *dat) { lex->buf = dat; lex->allocBuf = false; TCOD_lex_set_data_buffer_internal(lex); } bool TCOD_lex_set_data_file(TCOD_lex_t *lex, const char *_filename) { FILE *f; char *ptr; long size; if ( ! _filename ) { TCOD_last_error = (char *)""Lex.setDatafile(NULL) called""; return false; } f = fopen( _filename, ""rb"" ); if ( f == NULL ) { static char msg[255]; sprintf(msg, ""Cannot open '%s'"", _filename); TCOD_last_error=TCOD_strdup(msg); return false; } fseek(f, 0, SEEK_END); size = ftell(f); fclose(f); f = fopen( _filename, ""r"" ); lex->buf = (char*)calloc(sizeof(char),(size + 1)); lex->filename = TCOD_strdup( _filename ); if ( lex->buf == NULL || lex->filename == NULL ) { fclose(f); if ( lex->buf ) free(lex->buf); if ( lex->filename ) { free( lex->filename ); } TCOD_last_error=(char *)""Out of memory""; return false; } ptr=lex->buf; /* can't rely on size to read because of MS/DOS dumb CR/LF handling */ while ( fgets(ptr, size,f ) ) { ptr += strlen(ptr); } fclose(f); TCOD_lex_set_data_buffer_internal(lex); lex->allocBuf=true; return true; } void TCOD_lex_get_new_line(TCOD_lex_t *lex) { if ( *(lex->pos) == '\n' ) { lex->file_line ++; lex->pos++; } } #ifdef TCOD_VISUAL_STUDIO #pragma warning(disable:4127) /* conditional expression is constant */ #endif int TCOD_lex_get_space(TCOD_lex_t *lex) { char c; char *startPos=NULL; while ( 1 ) { while ( (c = *lex->pos) <= ' ') { if (c=='\n') TCOD_lex_get_new_line(lex); else if (c == 0) return TCOD_LEX_EOF; /* end of file */ else lex->pos++; } if ( lex->simpleCmt && strncmp(lex->pos, lex->simpleCmt, strlen(lex->simpleCmt)) == 0 ) { if ( ! startPos ) startPos = lex->pos; while ( *lex->pos != '\0' && *lex->pos != '\n' ) lex->pos++; TCOD_lex_get_new_line(lex); continue; } if ( lex->cmtStart && lex->cmtStop && strncmp(lex->pos, lex->cmtStart, strlen(lex->cmtStart)) == 0 ) { int isJavadoc=( lex->javadocCmtStart && strncmp(lex->pos, lex->javadocCmtStart, strlen(lex->javadocCmtStart)) == 0 ); int cmtLevel=1; char *javadocStart = NULL; if ( ! startPos ) startPos = lex->pos; if ( isJavadoc ) { javadocStart=lex->pos+strlen(lex->javadocCmtStart); while ( isspace(*javadocStart) ) javadocStart++; } lex->pos++; do { if ( *lex->pos == '\n' ) { TCOD_lex_get_new_line(lex); } else lex->pos++; if ( *lex->pos == '\0' ) return TCOD_LEX_EOF; if ( (lex->flags & TCOD_LEX_FLAG_NESTING_COMMENT) && strncmp(lex->pos-1, lex->cmtStart, strlen(lex->cmtStart)) == 0) cmtLevel++; if ( strncmp(lex->pos-1, lex->cmtStop, strlen(lex->cmtStop)) == 0) cmtLevel--; } while ( cmtLevel > 0 ); lex->pos++; if ( isJavadoc ) { char *src, *dst; char *end = lex->pos - strlen(lex->cmtStop); while ( isspace(*end) && end > javadocStart ) end --; src = javadocStart; dst = lex->last_javadoc_comment; while ( src < end ) { /* skip heading spaces */ while ( src < end && isspace(*src) && *src != '\n') src ++; /* copy comment line */ while ( src < end && *src != '\n' ) *dst++ = *src++; if ( *src == '\n' ) *dst++ = *src++; } /* remove trailing spaces */ while ( dst > lex->last_javadoc_comment && isspace (*(dst-1)) ) dst --; *dst = '\0'; lex->javadoc_read=false; } continue; } break; } if ( (lex->flags & TCOD_LEX_FLAG_TOKENIZE_COMMENTS) && startPos && lex->pos > startPos ) { int len = lex->pos - startPos; allocate_tok(lex, len+1); strncpy(lex->tok,startPos,len); lex->tok[len]=0; lex->token_type = TCOD_LEX_COMMENT; lex->token_idx = -1; return TCOD_LEX_COMMENT; } return TCOD_LEX_UNKNOWN; } int TCOD_lex_hextoint(char c) { int v=toupper(c); if ( v >= '0' && v <= '9' ) return v-'0'; return 10 + (v-'A'); } static bool TCOD_lex_get_special_char(TCOD_lex_t *lex, char *c) { *c = *(++(lex->pos) ); switch ( *c ) { case 'n' : *c='\n'; break; case 't' : *c='\t'; break; case 'r' : *c='\r'; break; case '\\' : case '\""' : case '\'' : break; case 'x' : { /* hexadecimal value ""\x80"" */ int value=0; bool hasHex=false; *c = *(++(lex->pos) ); while (( *c >= '0' && *c <= '9' ) || (*c >= 'a' && *c <= 'f') || (*c >= 'A' && *c <= 'F') ) { hasHex=true; value <<= 4; value += TCOD_lex_hextoint(*c); *c = *(++(lex->pos) ); } if (! hasHex ) { TCOD_last_error=(char *)""\\x must be followed by an hexadecimal value""; return false; } *c = value; lex->pos--; } break; case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : { /* octal value ""\200"" */ int value=0; while ( *c >= '0' && *c <= '7' ) { value <<= 3; value += (*c - '0'); *c = *(++(lex->pos) ); } *c = value; lex->pos--; } break; default : TCOD_last_error=(char *)""bad escape sequence inside quote""; return false; } return true; } int TCOD_lex_get_string(TCOD_lex_t *lex) { char c; int len = 0; do { c= *(++(lex->pos)); if ( c == '\0' ) { TCOD_last_error=(char *)""EOF inside quote""; return TCOD_LEX_ERROR; } if ( c == '\n' ) { TCOD_last_error=(char *)""newline inside quote""; return TCOD_LEX_ERROR; } if ( c== '\\' ) { if ( ! TCOD_lex_get_special_char(lex,&c) ) return TCOD_LEX_ERROR; } else if ( c == lex->lastStringDelim ) { allocate_tok(lex, len); lex->tok[ len ] = '\0'; lex->token_type = TCOD_LEX_STRING; lex->token_idx = -1; lex->pos++; return TCOD_LEX_STRING; } allocate_tok(lex, len); lex->tok[ len++ ] = c; } while ( 1 ); } #ifdef TCOD_VISUAL_STUDIO #pragma warning(default:4127) /* conditional expression is constant */ #endif int TCOD_lex_get_number(TCOD_lex_t *lex) { int c; int len; char *ptr; int bhex = 0, bfloat = 0; len = 0; if ( *lex->pos == '-' ) { allocate_tok(lex, len); lex->tok[ len ++ ] = '-'; lex->pos++; } c = toupper(*lex->pos); if ( c == '0' && ( lex->pos[1] == 'x' || lex->pos[1]=='X') ) { bhex = 1; allocate_tok(lex, len); lex->tok[ len ++ ] = '0'; lex->pos++; c = toupper( * (lex->pos)); } do { allocate_tok(lex, len); lex->tok[ len++ ] = (char)c; lex->pos++; if ( c == '.' ) { if ( bhex ) { TCOD_last_error=(char *)""bad constant format""; return TCOD_LEX_ERROR; } bfloat = 1; } c = toupper(*lex->pos); } while ((c >= '0' && c<= '9') || ( bhex && c >= 'A' && c <= 'F' ) || c == '.' ); allocate_tok(lex, len); lex->tok[len] = 0; if ( !bfloat ) { lex->token_int_val = strtol( lex->tok, &ptr, 0 ); lex->token_float_val = (float)lex->token_int_val; lex->token_type = TCOD_LEX_INTEGER; lex->token_idx = -1; return TCOD_LEX_INTEGER; } else { lex->token_float_val = (float)atof( lex->tok ); lex->token_type = TCOD_LEX_FLOAT; lex->token_idx = -1; return TCOD_LEX_FLOAT; } } int TCOD_lex_get_char(TCOD_lex_t *lex) { char c; c= *(++(lex->pos)); if ( c == '\0' ) { TCOD_last_error=(char *)""EOF inside simple quote""; return TCOD_LEX_ERROR; } if ( c == '\n' ) { TCOD_last_error=(char *)""newline inside simple quote""; return TCOD_LEX_ERROR; } if ( c== '\\' ) { if ( ! TCOD_lex_get_special_char(lex,&c) ) return TCOD_LEX_ERROR; lex->pos++; } else lex->pos++; if ( *lex->pos != '\'' ) { TCOD_last_error= (char *)""bad character inside simple quote"" ; return TCOD_LEX_ERROR; } lex->pos ++; lex->tok[ 0 ] = c; lex->tok[ 1 ] = '\0'; lex->token_type = TCOD_LEX_CHAR; lex->token_int_val = (int)c; lex->token_idx = -1; return TCOD_LEX_CHAR; } int TCOD_lex_get_symbol(TCOD_lex_t *lex) { int symb = 0; static char msg[255]; while ( symb < lex->nb_symbols ) { if ( ( ( lex->flags & TCOD_LEX_FLAG_NOCASE ) && TCOD_strncasecmp( lex->symbols[ symb ], lex->pos, strlen( lex->symbols[ symb ] ) ) == 0 ) || ( strncmp( lex->symbols[ symb ], lex->pos, strlen( lex->symbols[ symb ] ) ) == 0 ) ) { strcpy( lex->tok, lex->symbols[ symb ] ); lex->pos += strlen( lex->symbols[ symb ] ); lex->token_idx = symb; lex->token_type = TCOD_LEX_SYMBOL; return TCOD_LEX_SYMBOL; } symb ++; } lex->pos++; sprintf(msg, ""unknown symbol %.10s"", lex->pos-1 ); TCOD_last_error=TCOD_strdup(msg); return TCOD_LEX_ERROR; } int TCOD_lex_get_iden(TCOD_lex_t *lex) { char c = *lex->pos; int len = 0, key = 0; do { allocate_tok(lex, len); lex->tok[ len++ ] = c; c = *( ++ (lex->pos) ); } while ( ( c >= 'a' && c <= 'z' ) || ( c >= 'A' && c <= 'Z' ) || ( c >= '0' && c <= '9' ) || c == '_' ); allocate_tok(lex, len); lex->tok[len ] = 0; while ( key < lex->nb_keywords ) { if ( strcmp( lex->tok, lex->keywords[ key ] ) == 0 || ( lex->flags & TCOD_LEX_FLAG_NOCASE && TCOD_strcasecmp( lex->tok, lex->keywords[ key ] ) == 0 )) { lex->token_type = TCOD_LEX_KEYWORD; lex->token_idx = key; return TCOD_LEX_KEYWORD; } key ++; } lex->token_type = TCOD_LEX_IDEN; lex->token_idx = -1; return TCOD_LEX_IDEN; } int TCOD_lex_parse(TCOD_lex_t *lex) { char *ptr; int token; token = TCOD_lex_get_space(lex); if ( token == TCOD_LEX_ERROR ) return token; ptr = lex->pos; if ( token != TCOD_LEX_UNKNOWN ) { lex->token_type = token; return token; } if ( strchr(lex->stringDelim, *ptr) ) { lex->lastStringDelim=*ptr; return TCOD_lex_get_string(lex); } if ( *ptr == '\'' ) { return TCOD_lex_get_char(lex); } if ( isdigit( (int)(*ptr) ) || ( *ptr == '-' && isdigit( (int)(ptr[1]) ) ) ) { return TCOD_lex_get_number(lex); } if ( ( *ptr >= 'a' && *ptr <= 'z' ) || ( *ptr >= 'A' && *ptr <= 'Z' ) || *ptr == '_' ) { return TCOD_lex_get_iden(lex); } return TCOD_lex_get_symbol(lex); } int TCOD_lex_parse_until_token_type(TCOD_lex_t *lex,int tokenType) { int token; token = TCOD_lex_parse(lex); if ( token == TCOD_LEX_ERROR ) return token; while ( token != TCOD_LEX_EOF ) { if ( token == tokenType ) return token; token = TCOD_lex_parse(lex); if ( token == TCOD_LEX_ERROR ) return token; } return token; } int TCOD_lex_parse_until_token_value(TCOD_lex_t *lex, const char *tokenValue) { int token; token = TCOD_lex_parse(lex); if ( token == TCOD_LEX_ERROR ) return token; { while ( token != TCOD_LEX_EOF ) if ( strcmp( lex->tok, tokenValue ) == 0 || ( ( lex->flags & TCOD_LEX_FLAG_NOCASE ) && TCOD_strcasecmp(lex->tok, tokenValue ) == 0 ) ) return token; token = TCOD_lex_parse(lex); if ( token == TCOD_LEX_ERROR ) return token; } return token; } void TCOD_lex_savepoint(TCOD_lex_t *lex,TCOD_lex_t *_savept) { TCOD_lex_t *savept=(TCOD_lex_t *)_savept; *savept = *lex; savept->tok = (char *)calloc(sizeof(char),lex->toklen); strcpy(savept->tok,lex->tok); savept->savept=true; } void TCOD_lex_restore(TCOD_lex_t *lex,TCOD_lex_t *_savept) { TCOD_lex_t *savept=(TCOD_lex_t *)_savept; *lex = *savept; lex->savept=false; } bool TCOD_lex_expect_token_type(TCOD_lex_t *lex,int token_type) { return (TCOD_lex_parse(lex) == token_type); } bool TCOD_lex_expect_token_value(TCOD_lex_t *lex,int token_type, const char *token_value) { TCOD_lex_parse(lex); return (token_type == lex->token_type && strcmp(lex->tok, token_value) == 0 ); } ",0 " * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ package org.jbox2d.testbed; public class TestSettings { public int hz; public int iterationCount; public boolean enableWarmStarting; public boolean enablePositionCorrection; public boolean enableTOI; public boolean pause; public boolean singleStep; public boolean drawShapes; public boolean drawJoints; public boolean drawCoreShapes; public boolean drawOBBs; public boolean drawCOMs; public boolean drawStats; public boolean drawImpulses; public boolean drawAABBs; public boolean drawPairs; public boolean drawContactPoints; public boolean drawContactNormals; public boolean drawContactForces; public boolean drawFrictionForces; public TestSettings() { hz = 60; iterationCount = 10; drawStats = true; drawAABBs = false; drawPairs = false; drawShapes = true; drawJoints = true; drawCoreShapes = false; drawContactPoints = false; drawContactNormals = false; drawContactForces = false; drawFrictionForces = false; drawOBBs = false; drawCOMs = false; enableWarmStarting = true; enablePositionCorrection = true; enableTOI = true; pause = false; singleStep = false; } } ",0 "javadoc (build 1.6.0_23) on Fri Nov 23 14:03:50 GMT 2012 --> Uses of Class org.apache.nutch.crawl.CrawlDbMerger (apache-nutch 1.6 API)
Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
 PREV   NEXT FRAMES    NO FRAMES    

Uses of Class
org.apache.nutch.crawl.CrawlDbMerger

No usage of org.apache.nutch.crawl.CrawlDbMerger


Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
 PREV   NEXT FRAMES    NO FRAMES    

Copyright © 2012 The Apache Software Foundation ",0 " * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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 Evgeniya G. Maenkova */ package org.apache.harmony.awt.text; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.security.AccessController; import java.security.PrivilegedAction; import javax.swing.text.Element; import javax.swing.text.View; public abstract class TextFactory { private static final String FACTORY_IMPL_CLS_NAME = ""javax.swing.text.TextFactoryImpl""; //$NON-NLS-1$ private static final TextFactory viewFactory = createTextFactory(); public static TextFactory getTextFactory() { return viewFactory; } private static TextFactory createTextFactory() { PrivilegedAction createAction = new PrivilegedAction() { public TextFactory run() { try { Class factoryImplClass = Class .forName(FACTORY_IMPL_CLS_NAME); Constructor defConstr = factoryImplClass.getDeclaredConstructor(new Class[0]); defConstr.setAccessible(true); return (TextFactory)defConstr.newInstance(new Object[0]); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } return null; } }; return AccessController.doPrivileged(createAction); } public abstract RootViewContext createRootView(final Element element); public abstract View createPlainView(final Element e); public abstract View createWrappedPlainView(final Element e); public abstract View createFieldView(final Element e); public abstract View createPasswordView(Element e); public abstract TextCaret createCaret(); } ",0 """en-GB"" xmlns=""http://www.w3.org/1999/xhtml""> Dependencies

This page pertains to UD version 2.

Dependencies

Nominals
Clauses
Modifier words
Function Words
Core arguments
nsubj
nsubj:pass
obj
iobj
csubj
csubj:pass
ccomp
xcomp
Non-core dependents
obl
obl:agent
obl:patient
obl:tmod
vocative
expl
dislocated
dislocated:vo
advcl
advcl:coverb
advmod*
advmod:df
discourse
discourse:sp
aux
aux:pass
cop
mark
mark:adv
mark:rel
Nominal dependents
nmod
appos
nummod
acl
amod
det
clf
case
case:loc
Coordination
MWE
Loose
Special
Other
conj
cc
fixed
flat
compound
compound:dir
compound:ext
compound:quant
compound:vo
compound:vv
list
parataxis
orphan
goeswith
reparandum
punct
root
dep

* The advmod relation is used for modifiers not only of predicates but also of other modifier words.

© 2014–2021 Universal Dependencies contributors. Site powered by Annodoc and brat

.
",0 "-------------------------------------------------- * Copyright Maiora Labs Srl (c) 2012 * ---------------------------------------------------------------------------- * * This file is part of Decoro Urbano. * * Decoro Urbano is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Decoro Urbano is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Decoro Urbano. If not, see . */ /** * Chiamata AJAX per eliminare un commento dalla lista dei commenti * * @param int id id del commento da cancellare */ session_start(); require_once(""../include/config.php""); require_once(""../include/db_open.php""); require_once(""../include/db_open_funzioni.php""); require_once(""../include/funzioni.php""); require_once(""../include/controlli.php""); require_once('../include/decorourbano.php'); // verifico la presenza dei parametri if (!$_GET['id']) { echo '0'; exit; } // recupera i dati dell'utente loggato Auth::init(); $user = Auth::user_get(); // se l'utente non è loggato esci if (!$user) { echo ""0""; exit; } $id_utente = (int) $user['id_utente']; $id = (int) cleanField($_GET['id']); // effettua la cancellazione if (!checkNumericField($id) || !commento_delete($id, $id_utente)) { echo ""0""; } else { echo ""1""; } ?> ",0 "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. */ package com.asakusafw.compiler.batch; import com.asakusafw.compiler.batch.batch.JobFlow1; import com.asakusafw.vocabulary.batch.Batch; import com.asakusafw.vocabulary.batch.BatchDescription; /** * A batch class which is not public. */ @Batch(name = ""testing"") class NotPublic extends BatchDescription { @Override protected void describe() { run(JobFlow1.class).soon(); } } ",0 "/EKS_EXPORTS.h> #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace EKS { namespace Model { class AWS_EKS_API RegisterClusterResult { public: RegisterClusterResult(); RegisterClusterResult(const Aws::AmazonWebServiceResult& result); RegisterClusterResult& operator=(const Aws::AmazonWebServiceResult& result); inline const Cluster& GetCluster() const{ return m_cluster; } inline void SetCluster(const Cluster& value) { m_cluster = value; } inline void SetCluster(Cluster&& value) { m_cluster = std::move(value); } inline RegisterClusterResult& WithCluster(const Cluster& value) { SetCluster(value); return *this;} inline RegisterClusterResult& WithCluster(Cluster&& value) { SetCluster(std::move(value)); return *this;} private: Cluster m_cluster; }; } // namespace Model } // namespace EKS } // namespace Aws ",0 "port org.jboss.jandex.Type; import io.quarkus.arc.processor.BeanInfo; import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.runtime.annotations.RegisterForReflection; public class ReflectiveBeanClassesProcessor { @BuildStep void implicitReflectiveBeanClasses(BuildProducer reflectiveBeanClasses, BeanDiscoveryFinishedBuildItem beanDiscoveryFinished) { DotName registerForReflection = DotName.createSimple(RegisterForReflection.class.getName()); for (BeanInfo classBean : beanDiscoveryFinished.beanStream().classBeans()) { ClassInfo beanClass = classBean.getTarget().get().asClass(); AnnotationInstance annotation = beanClass.classAnnotation(registerForReflection); if (annotation != null) { Type[] targets = annotation.value(""targets"") != null ? annotation.value(""targets"").asClassArray() : new Type[] {}; String[] classNames = annotation.value(""classNames"") != null ? annotation.value(""classNames"").asStringArray() : new String[] {}; if (targets.length == 0 && classNames.length == 0) { reflectiveBeanClasses.produce(new ReflectiveBeanClassBuildItem(beanClass)); } } } } } ",0 "ER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the ""Classpath"" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.nio; /** * A read/write HeapLongBuffer. */ class HeapLongBuffer extends LongBuffer { // For speed these fields are actually declared in X-Buffer; // these declarations are here as documentation /* protected final long[] hb; protected final int offset; */ HeapLongBuffer(int cap, int lim) { // package-private this(cap, lim, false); } HeapLongBuffer(int cap, int lim, boolean isReadOnly) { // package-private super(-1, 0, lim, cap, new long[cap], 0); this.isReadOnly = isReadOnly; } HeapLongBuffer(long[] buf, int off, int len) { // package-private this(buf, off, len, false); } HeapLongBuffer(long[] buf, int off, int len, boolean isReadOnly) { // package-private super(-1, off, off + len, buf.length, buf, 0); this.isReadOnly = isReadOnly; } protected HeapLongBuffer(long[] buf, int mark, int pos, int lim, int cap, int off) { this(buf, mark, pos, lim, cap, off, false); } protected HeapLongBuffer(long[] buf, int mark, int pos, int lim, int cap, int off, boolean isReadOnly) { super(mark, pos, lim, cap, buf, off); this.isReadOnly = isReadOnly; } public LongBuffer slice() { return new HeapLongBuffer(hb, -1, 0, this.remaining(), this.remaining(), this.position() + offset, isReadOnly); } public LongBuffer duplicate() { return new HeapLongBuffer(hb, this.markValue(), this.position(), this.limit(), this.capacity(), offset, isReadOnly); } public LongBuffer asReadOnlyBuffer() { return new HeapLongBuffer(hb, this.markValue(), this.position(), this.limit(), this.capacity(), offset, true); } protected int ix(int i) { return i + offset; } public long get() { return hb[ix(nextGetIndex())]; } public long get(int i) { return hb[ix(checkIndex(i))]; } public LongBuffer get(long[] dst, int offset, int length) { checkBounds(offset, length, dst.length); if (length > remaining()) throw new BufferUnderflowException(); System.arraycopy(hb, ix(position()), dst, offset, length); position(position() + length); return this; } public boolean isDirect() { return false; } public boolean isReadOnly() { return isReadOnly; } public LongBuffer put(long x) { if (isReadOnly) { throw new ReadOnlyBufferException(); } hb[ix(nextPutIndex())] = x; return this; } public LongBuffer put(int i, long x) { if (isReadOnly) { throw new ReadOnlyBufferException(); } hb[ix(checkIndex(i))] = x; return this; } public LongBuffer put(long[] src, int offset, int length) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkBounds(offset, length, src.length); if (length > remaining()) throw new BufferOverflowException(); System.arraycopy(src, offset, hb, ix(position()), length); position(position() + length); return this; } public LongBuffer put(LongBuffer src) { if (isReadOnly) { throw new ReadOnlyBufferException(); } if (src instanceof HeapLongBuffer) { if (src == this) throw new IllegalArgumentException(); HeapLongBuffer sb = (HeapLongBuffer) src; int n = sb.remaining(); if (n > remaining()) throw new BufferOverflowException(); System.arraycopy(sb.hb, sb.ix(sb.position()), hb, ix(position()), n); sb.position(sb.position() + n); position(position() + n); } else if (src.isDirect()) { int n = src.remaining(); if (n > remaining()) throw new BufferOverflowException(); src.get(hb, ix(position()), n); position(position() + n); } else { super.put(src); } return this; } public LongBuffer compact() { if (isReadOnly) { throw new ReadOnlyBufferException(); } System.arraycopy(hb, ix(position()), hb, ix(0), remaining()); position(remaining()); limit(capacity()); discardMark(); return this; } public ByteOrder order() { return ByteOrder.nativeOrder(); } } ",0 "/=========================================================================== // ####ECOSGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 2012 Free Software Foundation, Inc. // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free // Software Foundation; either version 2 or (at your option) any later // version. // // eCos is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with eCos; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // As a special exception, if other files instantiate templates or use // macros or inline functions from this file, or you compile this file // and link it with other works to produce a work based on this file, // this file does not by itself cause the resulting work to be covered by // the GNU General Public License. However the source code for this file // must still be made available in accordance with section (3) of the GNU // General Public License v2. // // This exception does not invalidate any other reasons why a work based // on this file might be covered by the GNU General Public License. // ------------------------------------------- // ####ECOSGPLCOPYRIGHTEND#### //=========================================================================== //#####DESCRIPTIONBEGIN#### // // Author(s): // Contributors: visar, ilijak // Date: 1998-02-13 // Purpose: // Description: // Usage: // //####DESCRIPTIONEND#### // //=========================================================================== // Declarations for test system: // // TESTCASE_TYPE=CYG_TEST_MODULE // CONFIGURATION #include // Configuration header // INCLUDES #include // Common type definitions and support #include // Test infrastructure #include // Header for this package #include // Cyg_libm_ieee_float_shape_type #include ""vectors/vector_support_float.h""// extra support for math tests #include ""vectors/modff.h"" // FUNCTIONS static void test( CYG_ADDRWORD data ) { cyg_ucount32 vec_size; cyg_bool ret; vec_size = sizeof(modff_vec) / sizeof(Cyg_libm_test_float_vec_t); ret = doTestVecFloat( (CYG_ADDRWORD) &modff, CYG_LIBM_TEST_VEC_FLOAT, CYG_LIBM_TEST_VEC_FLOAT_P, CYG_LIBM_TEST_VEC_FLOAT, &modff_vec[0], vec_size ); if (ret==true) { CYG_TEST_PASS(""modff() is stable""); } // if else { CYG_TEST_FAIL(""modff() failed tests""); } // else CYG_TEST_FINISH(""Finished tests from testcase "" __FILE__ "" for Math "" ""library modff() function""); } // test() int main(int argc, char *argv[]) { CYG_TEST_INIT(); CYG_TEST_INFO(""Starting tests from testcase "" __FILE__ "" for Math library "" ""modff() function""); START_TEST( test ); CYG_TEST_PASS_FINISH(""Testing is not applicable to this configuration""); } // main() // EOF modff.c ",0 "ync src=""https://cdnjs.loli.net/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML""> {% endif %}",0 "ic class TrackSubscriber1 { @SuppressWarnings(""unchecked"") public static void main(String[] args) throws Exception { RxJavaHooks.setOnObservableStart((observable, onSubscribe) -> { if (!onSubscribe.getClass().getName().toLowerCase().contains(""map"")) { return onSubscribe; } System.out.println(""Started""); return (Observable.OnSubscribe)observer -> { class SignalTracker extends Subscriber { @Override public void onNext(Object o) { // handle onNext before or aftern notifying the downstream observer.onNext(o); } @Override public void onError(Throwable t) { // handle onError observer.onError(t); } @Override public void onCompleted() { // handle onComplete System.out.println(""Completed""); observer.onCompleted(); } } SignalTracker t = new SignalTracker(); onSubscribe.call(t); }; }); Observable observable = Observable.range(1, 5) .subscribeOn(Schedulers.io()) .observeOn(Schedulers.computation()) .map(integer -> { try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException e) { e.printStackTrace(); } return integer * 3; }); observable.subscribe(System.out::println); Thread.sleep(6000L); } } ",0 " * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ #pragma once #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace AlexaForBusiness { namespace Model { class AWS_ALEXAFORBUSINESS_API CreateAddressBookResult { public: CreateAddressBookResult(); CreateAddressBookResult(const Aws::AmazonWebServiceResult& result); CreateAddressBookResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The ARN of the newly created address book.

*/ inline const Aws::String& GetAddressBookArn() const{ return m_addressBookArn; } /** *

The ARN of the newly created address book.

*/ inline void SetAddressBookArn(const Aws::String& value) { m_addressBookArn = value; } /** *

The ARN of the newly created address book.

*/ inline void SetAddressBookArn(Aws::String&& value) { m_addressBookArn = std::move(value); } /** *

The ARN of the newly created address book.

*/ inline void SetAddressBookArn(const char* value) { m_addressBookArn.assign(value); } /** *

The ARN of the newly created address book.

*/ inline CreateAddressBookResult& WithAddressBookArn(const Aws::String& value) { SetAddressBookArn(value); return *this;} /** *

The ARN of the newly created address book.

*/ inline CreateAddressBookResult& WithAddressBookArn(Aws::String&& value) { SetAddressBookArn(std::move(value)); return *this;} /** *

The ARN of the newly created address book.

*/ inline CreateAddressBookResult& WithAddressBookArn(const char* value) { SetAddressBookArn(value); return *this;} private: Aws::String m_addressBookArn; }; } // namespace Model } // namespace AlexaForBusiness } // namespace Aws ",0 "rt org.junit.Before; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; @Ignore @SuppressWarnings(""javadoc"") public class ThreadingLongrunningTest { /** * The number of threads to use in this test. */ private static final int NUM_THREADS = 12; /** * Flag to indicate the concurrent test has failed. */ private boolean failed; @Test public void testConcurrently() { final ParserHardeningLongrunningTest pt = new ParserHardeningLongrunningTest(); final String msg = ""F0F1F0F0723C440188E18008F1F9F5F4F0F5F6F2F0F0F0F0F0F0F0F0F0F0F0F1F4F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F5F0F5F0F1F2F0F1F3F0F3F0F9F5F8F9F2F7F8F1F3F0F3F0F9F0F1F2F0F1F5F1F1F5F4F1F1F8F1F2F0F6F0F1F3F4F0F1F0F6F2F0F0F3F5F0F0F1F2F0F1F4F5F4F9F3F5F482F0F0F0F0F0F0F1D9C5E3D382F0F0F0F0F0F0F1404040C3C3C240E3F140E28899A340D581948540404040404040C3C3C240E3F140E28899A340D340D7C1D5F0F6F0E3F6F1F0F5F0F0F0F0F1F9F2F0F35C5C5CF4F2F0F7F0F1F0F3F2F1F2F4F3F2F891C982A884F6E38581889492C1C2C5C1C1C1C699D894A8E7A694F07EF9F7F8F0F2F1F1F0F2F5F1F0F0F0F0F6F0F0F0F5F9F1D7C1D5F1F2""; Runnable runnable = new Runnable() { public void run() { try { pt.testParserHardeningJCB(); pt.testParserHardeningMC(); String fieldValue = MsgAccessoryImpl.readFieldValue(msg, ""MASTERCARD"", ""2""); assertEquals(""PAN (Field 2) was not read correctly."", ""5405620000000000014"", fieldValue); String mti = MsgAccessoryImpl.readFieldValue(msg, ""MASTERCARD"", ""0""); assertEquals(""mti was not read correctly."", ""0100"", mti); pt.testParserHardeningVisa(); } catch (Exception e) { failed = true; } } }; Thread[] threads = new Thread[NUM_THREADS]; for (int i = 0; i < NUM_THREADS; i++) { threads[i] = new Thread(runnable); } for (int i = 0; i < NUM_THREADS; i++) { threads[i].start(); } for (int i = 0; i < NUM_THREADS; i++) { try { threads[i].join(); } catch (InterruptedException e) { failed = true; } } assertFalse(failed); } // @Test obsolet but temp // public void testGetFieldValueMixedgetFieldMethods() // throws IllegalArgumentException, ISOException, // IllegalStateException, UnsupportedEncodingException { // // // UtilityMethodAccess after construktor // String msg = // ""F0F1F0F0723C440188E18008F1F9F5F4F0F5F6F2F0F0F0F0F0F0F0F0F0F0F0F1F4F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F5F0F5F0F1F2F0F1F3F0F3F0F9F5F8F9F2F7F8F1F3F0F3F0F9F0F1F2F0F1F5F1F1F5F4F1F1F8F1F2F0F6F0F1F3F4F0F1F0F6F2F0F0F3F5F0F0F1F2F0F1F4F5F4F9F3F5F482F0F0F0F0F0F0F1D9C5E3D382F0F0F0F0F0F0F1404040C3C3C240E3F140E28899A340D581948540404040404040C3C3C240E3F140E28899A340D340D7C1D5F0F6F0E3F6F1F0F5F0F0F0F0F1F9F2F0F35C5C5CF4F2F0F7F0F1F0F3F2F1F2F4F3F2F891C982A884F6E38581889492C1C2C5C1C1C1C699D894A8E7A694F07EF9F7F8F0F2F1F1F0F2F5F1F0F0F0F0F6F0F0F0F5F9F1D7C1D5F1F2""; // assertEquals(""PAN (Field 2) was not read correctly."", // ""5405620000000000014"", // msgAccessoryInitial.getFieldValue(msg, ""MASTERCARD"", ""2"")); // // assertEquals(""PAN (Field 2) was not equal."", // ""5400041234567898"", // msgAccessoryInitial.getFieldValue(""2"")); // // // UtilityMethodAccess after construktor // assertEquals(""PAN (Field 2) was not read correctly."", // ""5405620000000000014"", // msgAccessoryInitial.getFieldValue(msg, ""MASTERCARD"", ""2"")); // // } } ",0 " _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * @author PocketMine Team * @link http://www.pocketmine.net/ * * */ namespace pocketmine; use pocketmine\network\protocol\Info; use pocketmine\plugin\PluginBase; use pocketmine\plugin\PluginLoadOrder; use pocketmine\utils\Utils; use pocketmine\utils\VersionString; use raklib\RakLib; /* * Called when a critical exception occurs that the server can't continue past. * Saved to a file or optionally sent to a server (see pocketmine.yml configuration options) */ class CrashDump{ /** @var Server */ private $server; private $fp; private $time; private $data = []; private $encodedData = null; private $path; public function __construct(Server $server){ $this->time = time(); $this->server = $server; if(!is_dir($this->server->getDataPath()) . ""CrashDumps"") mkdir($this->server->getDataPath() . ""CrashDumps""); $this->path = $this->server->getDataPath() . ""CrashDumps/"" . date(""D_M_j-H.i.s-T_Y"", $this->time) . "".log""; $this->fp = @fopen($this->path, ""wb""); if(!is_resource($this->fp)){ throw new \RuntimeException(""Could not create Crash Dump""); } $this->data[""time""] = $this->time; $this->addLine($this->server->getName() . "" Crash Dump "" . date(""D M j H:i:s T Y"", $this->time)); $this->addLine(); $this->baseCrash(); $this->generalData(); $this->pluginsData(); $this->extraData(); $this->encodeData(); } public function getPath(){ return $this->path; } public function getEncodedData(){ return $this->encodedData; } public function getData(){ return $this->data; } private function encodeData(){ $this->addLine(); $this->addLine(""----------------------REPORT THE DATA BELOW THIS LINE-----------------------""); $this->addLine(); $this->addLine(""===BEGIN CRASH DUMP===""); $this->encodedData = zlib_encode(json_encode($this->data, JSON_UNESCAPED_SLASHES), ZLIB_ENCODING_DEFLATE, 9); foreach(str_split(base64_encode($this->encodedData), 76) as $line){ $this->addLine($line); } $this->addLine(""===END CRASH DUMP===""); } private function pluginsData(){ if(class_exists(""pocketmine\\plugin\\PluginManager"", false)){ $this->addLine(); $this->addLine(""Loaded plugins:""); $this->data[""plugins""] = []; foreach($this->server->getPluginManager()->getPlugins() as $p){ $d = $p->getDescription(); $this->data[""plugins""][$d->getName()] = [ ""name"" => $d->getName(), ""version"" => $d->getVersion(), ""authors"" => $d->getAuthors(), ""api"" => $d->getCompatibleApis(), ""enabled"" => $p->isEnabled(), ""depends"" => $d->getDepend(), ""softDepends"" => $d->getSoftDepend(), ""main"" => $d->getMain(), ""load"" => $d->getOrder() === PluginLoadOrder::POSTWORLD ? ""POSTWORLD"" : ""STARTUP"", ""website"" => $d->getWebsite() ]; $this->addLine($d->getName() . "" "" . $d->getVersion() . "" by "" . implode("", "", $d->getAuthors()) . "" for API(s) "" . implode("", "", $d->getCompatibleApis())); } } } private function extraData(){ global $arguments; if($this->server->getProperty(""auto-report.send-settings"", true) !== false){ $this->data[""parameters""] = (array) $arguments; $this->data[""server.properties""] = @file_get_contents($this->server->getDataPath() . ""server.properties""); $this->data[""server.properties""] = preg_replace(""#^rcon\\.password=(.*)$#m"", ""rcon.password=******"", $this->data[""server.properties""]); $this->data[""pocketmine.yml""] = @file_get_contents($this->server->getDataPath() . ""pocketmine.yml""); $this->data[""katana.yml""] = @file_get_contents($this->server->getDataPath() . ""katana.yml""); }else{ $this->data[""pocketmine.yml""] = """"; $this->data[""katana.yml""] = """"; $this->data[""server.properties""] = """"; $this->data[""parameters""] = []; } $extensions = []; foreach(get_loaded_extensions() as $ext){ $extensions[$ext] = phpversion($ext); } $this->data[""extensions""] = $extensions; if($this->server->getProperty(""auto-report.send-phpinfo"", true) !== false){ ob_start(); phpinfo(); $this->data[""phpinfo""] = ob_get_contents(); ob_end_clean(); } } private function baseCrash(){ global $lastExceptionError, $lastError; if(isset($lastExceptionError)){ $error = $lastExceptionError; }else{ $error = (array) error_get_last(); $error[""trace""] = @getTrace(3); $errorConversion = [ E_ERROR => ""E_ERROR"", E_WARNING => ""E_WARNING"", E_PARSE => ""E_PARSE"", E_NOTICE => ""E_NOTICE"", E_CORE_ERROR => ""E_CORE_ERROR"", E_CORE_WARNING => ""E_CORE_WARNING"", E_COMPILE_ERROR => ""E_COMPILE_ERROR"", E_COMPILE_WARNING => ""E_COMPILE_WARNING"", E_USER_ERROR => ""E_USER_ERROR"", E_USER_WARNING => ""E_USER_WARNING"", E_USER_NOTICE => ""E_USER_NOTICE"", E_STRICT => ""E_STRICT"", E_RECOVERABLE_ERROR => ""E_RECOVERABLE_ERROR"", E_DEPRECATED => ""E_DEPRECATED"", E_USER_DEPRECATED => ""E_USER_DEPRECATED"", ]; $error[""fullFile""] = $error[""file""]; $error[""file""] = cleanPath($error[""file""]); $error[""type""] = isset($errorConversion[$error[""type""]]) ? $errorConversion[$error[""type""]] : $error[""type""]; if(($pos = strpos($error[""message""], ""\n"")) !== false){ $error[""message""] = substr($error[""message""], 0, $pos); } } if(isset($lastError)){ $this->data[""lastError""] = $lastError; } $this->data[""error""] = $error; unset($this->data[""error""][""fullFile""]); unset($this->data[""error""][""trace""]); $this->addLine(""Error: "" . $error[""message""]); $this->addLine(""File: "" . $error[""file""]); $this->addLine(""Line: "" . $error[""line""]); $this->addLine(""Type: "" . $error[""type""]); if(strpos($error[""file""], ""src/pocketmine/"") === false and strpos($error[""file""], ""src/raklib/"") === false and file_exists($error[""fullFile""])){ $this->addLine(); $this->addLine(""THIS CRASH WAS CAUSED BY A PLUGIN""); $this->data[""plugin""] = true; $reflection = new \ReflectionClass(PluginBase::class); $file = $reflection->getProperty(""file""); $file->setAccessible(true); foreach($this->server->getPluginManager()->getPlugins() as $plugin){ $filePath = \pocketmine\cleanPath($file->getValue($plugin)); if(strpos($error[""file""], $filePath) === 0){ $this->data[""plugin""] = $plugin->getName(); $this->addLine(""BAD PLUGIN: "" . $plugin->getDescription()->getFullName()); break; } } }else{ $this->data[""plugin""] = false; } $this->addLine(); $this->addLine(""Code:""); $this->data[""code""] = []; if($this->server->getProperty(""auto-report.send-code"", true) !== false){ $file = @file($error[""fullFile""], FILE_IGNORE_NEW_LINES); for($l = max(0, $error[""line""] - 10); $l < $error[""line""] + 10; ++$l){ $this->addLine(""["" . ($l + 1) . ""] "" . @$file[$l]); $this->data[""code""][$l + 1] = @$file[$l]; } } $this->addLine(); $this->addLine(""Backtrace:""); foreach(($this->data[""trace""] = $error[""trace""]) as $line){ $this->addLine($line); } $this->addLine(); } private function generalData(){ $version = new VersionString(); $this->data[""general""] = []; $this->data[""general""][""version""] = $version->get(false); $this->data[""general""][""build""] = $version->getBuild(); $this->data[""general""][""protocol""] = Info::CURRENT_PROTOCOL; $this->data[""general""][""api""] = \pocketmine\API_VERSION; $this->data[""general""][""git""] = \pocketmine\GIT_COMMIT; $this->data[""general""][""raklib""] = RakLib::VERSION; $this->data[""general""][""uname""] = php_uname(""a""); $this->data[""general""][""php""] = phpversion(); $this->data[""general""][""zend""] = zend_version(); $this->data[""general""][""php_os""] = PHP_OS; $this->data[""general""][""os""] = Utils::getOS(); $this->addLine(""Katana version: "" . $version->get(false) . "" #"" . $version->getBuild() . "" [Protocol "" . Info::CURRENT_PROTOCOL . ""; API "" . API_VERSION . ""]""); $this->addLine(""Git commit: "" . GIT_COMMIT); $this->addLine(""uname -a: "" . php_uname(""a"")); $this->addLine(""PHP Version: "" . phpversion()); $this->addLine(""Zend version: "" . zend_version()); $this->addLine(""OS : "" . PHP_OS . "", "" . Utils::getOS()); } public function addLine($line = """"){ fwrite($this->fp, $line . PHP_EOL); } public function add($str){ fwrite($this->fp, $str); } }",0 " #include #include class Control; class MetaGear; class GearControl; class ControlPanel : public QWidget { public: ControlPanel(QWidget *panelContainerWidget, MetaGear *parentMetagear); ~ControlPanel(); Control *addControl(GearControl* gear); void addControlPanel(ControlPanel* controlPanel); QWidget *mainWidget(){return _mainFrame;} private: std::list _controls; std::list _controlPanels; MetaGear *_parentMetaGear; Q3Frame *_mainFrame; Q3GridLayout *_mainLayout; QLabel *_labelName; }; #endif ",0 "nder the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include #include #include #include #include #include #include #include #include #include #include ""msm_gemini_sync.h"" #include ""msm_gemini_common.h"" #define MSM_GEMINI_NAME ""gemini"" static int msm_gemini_open(struct inode *inode, struct file *filp) { int rc; struct msm_gemini_device *pgmn_dev = container_of(inode->i_cdev, struct msm_gemini_device, cdev); filp->private_data = pgmn_dev; GMN_DBG(""%s:%d]\n"", __func__, __LINE__); rc = __msm_gemini_open(pgmn_dev); GMN_DBG(KERN_INFO ""%s:%d] %s open_count = %d\n"", __func__, __LINE__, filp->f_path.dentry->d_name.name, pgmn_dev->open_count); return rc; } static int msm_gemini_release(struct inode *inode, struct file *filp) { int rc; struct msm_gemini_device *pgmn_dev = filp->private_data; GMN_DBG(KERN_INFO ""%s:%d]\n"", __func__, __LINE__); rc = __msm_gemini_release(pgmn_dev); GMN_DBG(KERN_INFO ""%s:%d] %s open_count = %d\n"", __func__, __LINE__, filp->f_path.dentry->d_name.name, pgmn_dev->open_count); return rc; } static long msm_gemini_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { int rc; struct msm_gemini_device *pgmn_dev = filp->private_data; GMN_DBG(KERN_INFO ""%s:%d] cmd = %d\n"", __func__, __LINE__, _IOC_NR(cmd)); rc = __msm_gemini_ioctl(pgmn_dev, cmd, arg); GMN_DBG(""%s:%d]\n"", __func__, __LINE__); return rc; } static const struct file_operations msm_gemini_fops = { .owner = THIS_MODULE, .open = msm_gemini_open, .release = msm_gemini_release, .unlocked_ioctl = msm_gemini_ioctl, }; static struct class *msm_gemini_class; static dev_t msm_gemini_devno; static struct msm_gemini_device *msm_gemini_device_p; static int msm_gemini_init(struct platform_device *pdev) { int rc = -1; struct device *dev; GMN_DBG(""%s:%d]\n"", __func__, __LINE__); msm_gemini_device_p = __msm_gemini_init(pdev); if (msm_gemini_device_p == NULL) { GMN_PR_ERR(""%s: initialization failed\n"", __func__); goto fail; } rc = alloc_chrdev_region(&msm_gemini_devno, 0, 1, MSM_GEMINI_NAME); if (rc < 0) { GMN_PR_ERR(""%s: failed to allocate chrdev\n"", __func__); goto fail_1; } if (!msm_gemini_class) { msm_gemini_class = class_create(THIS_MODULE, MSM_GEMINI_NAME); if (IS_ERR(msm_gemini_class)) { rc = PTR_ERR(msm_gemini_class); GMN_PR_ERR(""%s: create device class failed\n"", __func__); goto fail_2; } } dev = device_create(msm_gemini_class, NULL, MKDEV(MAJOR(msm_gemini_devno), MINOR(msm_gemini_devno)), NULL, ""%s%d"", MSM_GEMINI_NAME, 0); if (IS_ERR(dev)) { GMN_PR_ERR(""%s: error creating device\n"", __func__); rc = -ENODEV; goto fail_3; } cdev_init(&msm_gemini_device_p->cdev, &msm_gemini_fops); msm_gemini_device_p->cdev.owner = THIS_MODULE; msm_gemini_device_p->cdev.ops = (const struct file_operations *) &msm_gemini_fops; rc = cdev_add(&msm_gemini_device_p->cdev, msm_gemini_devno, 1); if (rc < 0) { GMN_PR_ERR(""%s: error adding cdev\n"", __func__); rc = -ENODEV; goto fail_4; } GMN_DBG(""%s %s: success\n"", __func__, MSM_GEMINI_NAME); return rc; fail_4: device_destroy(msm_gemini_class, msm_gemini_devno); fail_3: class_destroy(msm_gemini_class); fail_2: unregister_chrdev_region(msm_gemini_devno, 1); fail_1: __msm_gemini_exit(msm_gemini_device_p); fail: return rc; } static void msm_gemini_exit(void) { cdev_del(&msm_gemini_device_p->cdev); device_destroy(msm_gemini_class, msm_gemini_devno); class_destroy(msm_gemini_class); unregister_chrdev_region(msm_gemini_devno, 1); __msm_gemini_exit(msm_gemini_device_p); } static int __msm_gemini_probe(struct platform_device *pdev) { int rc; rc = msm_gemini_init(pdev); return rc; } static int __msm_gemini_remove(struct platform_device *pdev) { msm_gemini_exit(); return 0; } static struct platform_driver msm_gemini_driver = { .probe = __msm_gemini_probe, .remove = __msm_gemini_remove, .driver = { .name = ""msm_gemini"", .owner = THIS_MODULE, }, }; static int __init msm_gemini_driver_init(void) { int rc; rc = platform_driver_register(&msm_gemini_driver); return rc; } static void __exit msm_gemini_driver_exit(void) { platform_driver_unregister(&msm_gemini_driver); } MODULE_DESCRIPTION(""msm gemini jpeg driver""); MODULE_VERSION(""msm gemini 0.1""); module_init(msm_gemini_driver_init); module_exit(msm_gemini_driver_exit); ",0 " by javadoc (build 1.6.0_29) on Sat Mar 17 18:04:43 MSK 2012 --> Count (POI API Documentation)
Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.poi.ss.formula.functions
Class Count

java.lang.Object
  org.apache.poi.ss.formula.functions.Count
All Implemented Interfaces:
Function

public final class Count
extends java.lang.Object
implements Function

Counts the number of cells that contain numeric data within the list of arguments. Excel Syntax COUNT(value1,value2,...) Value1, value2, ... are 1 to 30 arguments representing the values or ranges to be counted. TODO: Check this properly matches excel on edge cases like formula cells, error cells etc


Constructor Summary
Count()
           
 
Method Summary
 ValueEval evaluate(ValueEval[] args, int srcCellRow, int srcCellCol)
           
static Count subtotalInstance()
          Create an instance of Count to use in Subtotal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Count

public Count()
Method Detail

evaluate

public ValueEval evaluate(ValueEval[] args,
                          int srcCellRow,
                          int srcCellCol)
Specified by:
evaluate in interface Function
Parameters:
args - the evaluated function arguments. Empty values are represented with BlankEval or MissingArgEval, never null.
srcCellRow - row index of the cell containing the formula under evaluation
srcCellCol - column index of the cell containing the formula under evaluation
Returns:
The evaluated result, possibly an ErrorEval, never null. Note - Excel uses the error code #NUM! instead of IEEE NaN, so when numeric functions evaluate to Double.NaN be sure to translate the result to ErrorEval.NUM_ERROR.

subtotalInstance

public static Count subtotalInstance()
Create an instance of Count to use in Subtotal

If there are other subtotals within argument refs (or nested subtotals), these nested subtotals are ignored to avoid double counting.

See Also:
Subtotal

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright 2012 The Apache Software Foundation or its licensors, as applicable. ",0 " server.MaplePortal; import tools.data.LittleEndianAccessor; public class UseInnerPortalHandler { @PacketHandler(opcode = RecvPacketOpcode.USE_INNER_PORTAL) public static void handle(MapleClient c, LittleEndianAccessor lea) { lea.skip(1); if (c.getPlayer() == null || c.getPlayer().getMap() == null) { return; } String portalName = lea.readMapleAsciiString(); MaplePortal portal = c.getPlayer().getMap().getPortal(portalName); if (portal == null) { return; } //That ""22500"" should not be hard coded in this manner if (portal.getPosition().distanceSq(c.getPlayer().getTruePosition()) > 22500.0D && !c.getPlayer().isGM()) { return; } int toX = lea.readShort(); int toY = lea.readShort(); //Are there not suppose to be checks here? Can players not just PE any x and y value they want? c.getPlayer().getMap().movePlayer(c.getPlayer(), new Point(toX, toY)); c.getPlayer().checkFollow(); } } ",0 "lio * @author Neuman Vong * @license http://creativecommons.org/licenses/MIT/ MIT * @link http://pear.php.net/package/Services_Twilio */ abstract class Services_Twilio_InstanceResource extends Services_Twilio_Resource { /** * @param mixed $params An array of updates, or a property name * @param mixed $value A value with which to update the resource * * @return null */ public function update($params, $value = null) { if (!is_array($params)) { $params = array($params => $value); } $this->proxy->updateData($params); } /** * Set this resource's proxy. * * @param Services_Twilio_DataProxy $proxy An instance of DataProxy * * @return null */ public function setProxy($proxy) { $this->proxy = $proxy; } /** * Get the value of a property on this resource. * * @param string $key The property name * * @return mixed Could be anything. */ public function __get($key) { if ($subresource = $this->getSubresources($key)) { return $subresource; } return $this->proxy->$key; } } ",0 "('vendor/ZF2/library')) { $zf2Path = 'vendor/ZF2/library'; } elseif (getenv('ZF2_PATH')) { // Support for ZF2_PATH environment variable or git submodule $zf2Path = getenv('ZF2_PATH'); } elseif (get_cfg_var('zf2_path')) { // Support for zf2_path directive value $zf2Path = get_cfg_var('zf2_path'); } if ($zf2Path) { if (isset($loader)) { $loader->add('Zend', $zf2Path); } else { include $zf2Path . '/Zend/Loader/AutoloaderFactory.php'; Zend\Loader\AutoloaderFactory::factory(array( 'Zend\Loader\StandardAutoloader' => array( 'autoregister_zf' => true ) )); } } if (!class_exists('Zend\Loader\AutoloaderFactory')) { throw new RuntimeException('Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.'); } ",0 "ubtheme_preprocess_maintenance_page(&$variables) { backdrop_add_css(backdrop_get_path('theme', 'bartik') . '/css/maintenance-page.css'); } /** * Implements hook_preprocess_layout(). */ function teamwork_15_subtheme_preprocess_layout(&$variables) { if ($variables['content']['header']) { $variables['content']['header'] = '
' . $variables['content']['header'] . '
'; } if (theme_get_setting('teamwork_15_subtheme_cdn') > 0) { backdrop_add_css('http://cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/pure-min.css', array('type' => 'external', 'every_page' => TRUE, 'group' => CSS_DEFAULT)); } $var1 = theme_get_setting('teamwork_15_subtheme_juiced_main_background'); $var2 = theme_get_setting('teamwork_15_subtheme_juiced_big_statement_background'); $var3 = theme_get_setting('teamwork_15_subtheme_juiced_main_background_blurred'); $var4 = theme_get_setting('teamwork_15_subtheme_juiced_big_statement_background_blurred'); if ($var1 && $var3 > 0) { backdrop_add_css(""@media screen and (min-width: 769px) { .juiced-main::before { content: ' '; width: 100%; height: 100%; display: block; position: absolute; z-index: -100; -webkit-filter: blur(20px); -moz-filter: blur(20px); -o-filter: blur(20px); -ms-filter: blur(20px); filter: blur(20px); opacity: 0.4; background: url($var1) no-repeat; background-size: cover; background-position: center; } }"", array('type' => 'inline')); } if ($var1 && $var3 == 0) { backdrop_add_css(""@media screen and (min-width: 769px) { .juiced-main { background: url($var1) no-repeat; background-size: cover; background-position: center; } }"", array('type' => 'inline')); } if ($var2 && $var4 > 0) { backdrop_add_css(""@media screen and (min-width: 769px) { .l-big-statement::before { content: ' '; width: 100%; height: 100%; display: block; position: absolute; z-index: -100; -webkit-filter: blur(20px); -moz-filter: blur(20px); -o-filter: blur(20px); -ms-filter: blur(20px); filter: blur(20px); opacity: 0.4; background: url($var2) no-repeat fixed; background-size: cover; background-position: center; } }"", array('type' => 'inline')); } if ($var2 && $var4 == 0) { backdrop_add_css(""@media screen and (min-width: 769px) { .l-big-statement { background: url($var2) no-repeat fixed; background-size: cover; background-position: center; } }"", array('type' => 'inline')); } $var5 = theme_get_setting('teamwork_15_subtheme_body_main_background'); $var6 = theme_get_setting('teamwork_15_subtheme_footer_main_background'); $var7 = theme_get_setting('teamwork_15_subtheme_body_main_background_blurred'); $var8 = theme_get_setting('teamwork_15_subtheme_footer_main_background_blurred'); if ($var5 && $var7 > 0) { backdrop_add_css(""@media screen and (min-width: 769px) { .layout::before { content: ' '; width: 100%; height: 100%; display: block; position: absolute; z-index: -100; -webkit-filter: blur(20px); -moz-filter: blur(20px); -o-filter: blur(20px); -ms-filter: blur(20px); filter: blur(20px); opacity: 0.4; background: url($var5) no-repeat; background-size: cover; background-position: center; } }"", array('type' => 'inline')); } if ($var5 && $var7 == 0) { backdrop_add_css(""@media screen and (min-width: 769px) { .layout { background: url($var5) no-repeat; background-size: cover; background-position: center; } }"", array('type' => 'inline')); } if ($var6 && $var8 > 0) { backdrop_add_css(""@media screen and (min-width: 769px) { footer.l-footer::before { content: ' '; width: 100%; height: 100%; display: block; position: absolute; z-index: -100; -webkit-filter: blur(20px); -moz-filter: blur(20px); -o-filter: blur(20px); -ms-filter: blur(20px); filter: blur(20px); opacity: 0.4; background: url($var6) no-repeat fixed; background-size: cover; background-position: center; } footer.l-footer { background: transparent; } }"", array('type' => 'inline')); } if ($var6 && $var8 == 0) { backdrop_add_css(""@media screen and (min-width: 769px) { footer.l-footer { background: url($var6) no-repeat fixed; background-size: cover; background-position: center; } }"", array('type' => 'inline')); } if (theme_get_setting('teamwork_15_subtheme_script1') > 0) { backdrop_add_js(""https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"", array('type' => 'external', 'scope' => 'footer', 'every_page' => TRUE, 'preprocess' => TRUE)); } if (theme_get_setting('teamwork_15_subtheme_script2') > 0) { backdrop_add_js(""https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.14.0/jquery.validate.min.js"", array('type' => 'external', 'scope' => 'footer', 'every_page' => TRUE, 'preprocess' => TRUE)); } if (theme_get_setting('teamwork_15_subtheme_script3') > 0) { backdrop_add_js(""https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"", array('type' => 'external', 'scope' => 'footer', 'every_page' => TRUE, 'preprocess' => TRUE)); } if (theme_get_setting('teamwork_15_subtheme_script4') > 0) { backdrop_add_js(""https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.4/hammer.min.js"", array('type' => 'external', 'scope' => 'footer', 'every_page' => TRUE, 'preprocess' => TRUE)); } backdrop_add_js(""themes/teamwork_15_subtheme/js/scripts.js"", array('type' => 'file', 'scope' => 'footer', 'every_page' => TRUE, 'preprocess' => TRUE)); backdrop_add_js(""document.write(' ",0 "ray = array(); $parser = xml_parser_create('utf-8'); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parse_into_struct($parser, $xml, $values, $index); xml_parser_free($parser); $i = 0; $name = $values[$i]['tag']; $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : ''; $array[$name] = self::_struct_to_array($values, $i); return $array; } private static function _struct_to_array($values, &$i) { $child = array(); if (isset($values[$i]['value'])) array_push($child, $values[$i]['value']); while ($i++ < count($values)) { switch ($values[$i]['type']) { case 'cdata': array_push($child, $values[$i]['value']); break; case 'complete': $name = $values[$i]['tag']; if(!empty($name)) { $child[$name]= ($values[$i]['value'])?($values[$i]['value']):''; if(isset($values[$i]['attributes'])) { $child[$name] = $values[$i]['attributes']; } } break; case 'open': $name = $values[$i]['tag']; $size = isset($child[$name]) ? sizeof($child[$name]) : 0; $child[$name][$size] = self::_struct_to_array($values, $i); break; case 'close': return $child; break; } } return $child; } }",0 "le>qarith: Not compatible 👼
« Up

qarith 8.9.0 Not compatible 👼

📅 (2022-01-13 20:16:59 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-num            base        Num library distributed with the OCaml compiler
base-threads        base
base-unix           base
camlp5              7.14        Preprocessor-pretty-printer of OCaml
conf-findutils      1           Virtual package relying on findutils
conf-perl           1           Virtual package relying on perl
coq                 8.5.0       Formal proof management system
num                 0           The Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.03.0      The OCaml compiler (virtual package)
ocaml-base-compiler 4.03.0      Official 4.03.0 release
ocaml-config        1           OCaml Switch Configuration
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/qarith"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/QArith"]
depends: [
  "ocaml"
  "coq" {>= "8.9" & < "8.10~"}
]
tags: [
  "keyword: Q"
  "keyword: arithmetic"
  "keyword: rational numbers"
  "keyword: setoid"
  "keyword: ring"
  "category: Mathematics/Arithmetic and Number Theory/Rational numbers"
  "category: Miscellaneous/Extracted Programs/Arithmetic"
]
authors: [
  "Pierre Letouzey"
]
bug-reports: "https://github.com/coq-contribs/qarith/issues"
dev-repo: "git+https://github.com/coq-contribs/qarith.git"
synopsis: "A Library for Rational Numbers (QArith)"
description: """
This contribution is a proposition of a library formalizing
rational number in Coq."""
flags: light-uninstall
url {
  src: "https://github.com/coq-contribs/qarith/archive/v8.9.0.tar.gz"
  checksum: "md5=dbb5eb51a29032589cd351ea9eaf49a0"
}

Lint

Command
true
Return code
0

Dry install 🏜️

Dry install with the current Coq version:

Command
opam install -y --show-action coq-qarith.8.9.0 coq.8.5.0
Return code
5120
Output
[NOTE] Package coq is already installed (current version is 8.5.0).
The following dependencies couldn't be met:
  - coq-qarith -> coq >= 8.9 -> ocaml >= 4.05.0
      base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
  - No available version of coq satisfies the constraints
No solution found, exiting

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command
opam remove -y coq; opam install -y --show-action --unlock-base coq-qarith.8.9.0
Return code
0

Install dependencies

Command
true
Return code
0
Duration
0 s

Install 🚀

Command
true
Return code
0
Duration
0 s

Installation size

No files were installed.

Uninstall 🧹

Command
true
Return code
0
Missing removes
none
Wrong removes
none

Sources are on GitHub © Guillaume Claret 🐣

",0 " file for VirtueMart * * @package VirtueMart * @subpackage core * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details. * * http://virtuemart.net */ global $mosConfig_absolute_path,$mosConfig_live_site; if( !class_exists( 'jconfig' )) { $global_lang = $GLOBALS['mosConfig_lang']; @include( dirname( __FILE__ ).'/../../../configuration.php' ); $GLOBALS['mosConfig_lang'] = $mosConfig_lang = $global_lang; } // Check for trailing slash if( $mosConfig_live_site[strlen( $mosConfig_live_site)-1] == '/' ) { $app = ''; } else { $app = '/'; } // these path and url definitions here are based on the Joomla! Configuration define( 'URL', 'http://www.franar.com.ve/' ); define( 'SECUREURL', 'http://www.franar.com.ve/' ); if ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == '443' ) { define( 'IMAGEURL', SECUREURL .'components/com_virtuemart/shop_image/' ); define( 'VM_THEMEURL', SECUREURL.'components/com_virtuemart/themes/ja_larix/' ); } else { define( 'IMAGEURL', URL .'components/com_virtuemart/shop_image/' ); define( 'VM_THEMEURL', URL.'components/com_virtuemart/themes/ja_larix/' ); } define( 'VM_THEMEPATH', $mosConfig_absolute_path.'/components/com_virtuemart/themes/ja_larix/' ); define( 'COMPONENTURL', URL .'administrator/components/com_virtuemart/' ); define( 'ADMINPATH', $mosConfig_absolute_path.'/administrator/components/com_virtuemart/' ); define( 'CLASSPATH', ADMINPATH.'classes/' ); define( 'PAGEPATH', ADMINPATH.'html/' ); define( 'IMAGEPATH', $mosConfig_absolute_path.'/components/com_virtuemart/shop_image/' ); define('PSHOP_IS_OFFLINE', ''); define('PSHOP_OFFLINE_MESSAGE', 'La tienda está actualmente en mantenimiento. Por favor vuelva pronto.'); define('USE_AS_CATALOGUE', '1'); define('VM_TABLEPREFIX', 'vm'); define('VM_PRICE_SHOW_PACKAGING_PRICELABEL', ''); define('VM_PRICE_SHOW_INCLUDINGTAX', ''); define('VM_PRICE_ACCESS_LEVEL', 'Public Frontend'); define('VM_REGISTRATION_TYPE', 'NORMAL_REGISTRATION'); define('VM_BROWSE_ORDERBY_FIELD', 'product_sku'); define('VM_GENERALLY_PREVENT_HTTPS', '1'); define('VM_ALLOW_EXTENDED_CLASSES', ''); define('VM_SHOW_REMEMBER_ME_BOX', ''); define('VM_REVIEWS_MINIMUM_COMMENT_LENGTH', '100'); define('VM_REVIEWS_MAXIMUM_COMMENT_LENGTH', '2000'); define('VM_SHOW_PRINTICON', ''); define('VM_SHOW_EMAILFRIEND', '1'); define('PSHOP_PDF_BUTTON_ENABLE', ''); define('VM_REVIEWS_AUTOPUBLISH', ''); define('VM_PROXY_URL', ''); define('VM_PROXY_PORT', ''); define('VM_PROXY_USER', ''); define('VM_PROXY_PASS', ''); define('VM_ONCHECKOUT_SHOW_LEGALINFO', ''); define('VM_ONCHECKOUT_LEGALINFO_SHORTTEXT', 'Returns Policy You can cancel this order within two weeks after we have received it. You can return new, unopened items from a cancelled order within 2 weeks after they have been delivered to you. Items should be returned in their original packaging. For more information on cancelling orders and returning items, see the Our Returns Policy page.'); define('VM_ONCHECKOUT_LEGALINFO_LINK', ''); define('ENABLE_DOWNLOADS', '1'); define('DOWNLOAD_MAX', '3'); define('DOWNLOAD_EXPIRE', '432000'); define('ENABLE_DOWNLOAD_STATUS', 'C'); define('DISABLE_DOWNLOAD_STATUS', 'X'); define('DOWNLOADROOT', '/home/franarc1/public_html/media/'); define('VM_DOWNLOADABLE_PRODUCTS_KEEP_STOCKLEVEL', ''); define('_SHOW_PRICES', ''); define('ORDER_MAIL_HTML', '1'); define('HOMEPAGE', 'shop.index'); define('CATEGORY_TEMPLATE', 'ja_vm_cat_browse'); define('FLYPAGE', 'flypage_images.tpl'); define('PRODUCTS_PER_ROW', '1'); define('ERRORPAGE', 'shop.error'); define('NO_IMAGE', 'noimage_franar.gif'); define('DEBUG', ''); define('SHOWVERSION', ''); define('TAX_VIRTUAL', ''); define('TAX_MODE', '1'); define('MULTIPLE_TAXRATES_ENABLE', ''); define('PAYMENT_DISCOUNT_BEFORE', ''); define('PAYMENT_DISCOUNT_VAT_ID', ''); define('PSHOP_ALLOW_REVIEWS', ''); define('PSHOP_AGREE_TO_TOS_ONORDER', ''); define('SHOW_CHECKOUT_BAR', '1'); define('CHECK_STOCK', ''); define('ENCODE_KEY', '6eaafec014956e95b28182d1d40120a8'); define('NO_SHIPPING', ''); define('NO_SHIPTO', ''); define('AFFILIATE_ENABLE', ''); define('PSHOP_ALLOW_FRONTENDADMIN_FOR_NOBACKENDERS', ''); define('PSHOP_IMG_RESIZE_ENABLE', ''); define('PSHOP_IMG_WIDTH', '90'); define('PSHOP_IMG_HEIGHT', '90'); define('PSHOP_COUPONS_ENABLE', ''); define('PSHOP_SHOW_PRODUCTS_IN_CATEGORY', '1'); define('PSHOP_SHOW_TOP_PAGENAV', '1'); define('PSHOP_SHOW_OUT_OF_STOCK_PRODUCTS', '1'); define('VM_CURRENCY_CONVERTER_MODULE', 'convertECB'); define('VM_CONTENT_PLUGINS_ENABLE', ''); define('VM_ENABLE_COOKIE_CHECK', '1'); define('VM_FEED_ENABLED', '1'); define('VM_FEED_CACHE', '1'); define('VM_FEED_CACHETIME', '3600'); define('VM_FEED_TITLE', 'Latest Products from {storename}'); define('VM_FEED_TITLE_CATEGORIES', '{storename} - Latest Products from Category: {catname}'); define('VM_FEED_SHOW_IMAGES', '1'); define('VM_FEED_SHOW_PRICES', '1'); define('VM_FEED_SHOW_DESCRIPTION', '1'); define('VM_FEED_DESCRIPTION_TYPE', 'product_s_desc'); define('VM_FEED_LIMITTEXT', '1'); define('VM_FEED_MAX_TEXT_LENGTH', '250'); define('VM_STORE_CREDITCARD_DATA', '1'); define('VM_ENCRYPT_FUNCTION', 'AES_ENCRYPT'); define('VM_COMPONENT_NAME', 'com_virtuemart'); define('VM_LOGFILE_ENABLED', ''); define('VM_LOGFILE_NAME', ''); define('VM_LOGFILE_LEVEL', 'PEAR_LOG_WARNING'); define('VM_DEBUG_IP_ENABLED', ''); define('VM_DEBUG_IP_ADDRESS', ''); define('VM_LOGFILE_FORMAT', '%{timestamp} %{ident} [%{priority}] [%{remoteip}] [%{username}] %{message}'); /* OrderByFields */ global $VM_BROWSE_ORDERBY_FIELDS; $VM_BROWSE_ORDERBY_FIELDS = array( 'product_name','product_cdate','product_sku' ); /* Shop Modules that run with https only*/ global $VM_MODULES_FORCE_HTTPS; $VM_MODULES_FORCE_HTTPS = array( 'account','checkout' ); // Checkout Steps and their order global $VM_CHECKOUT_MODULES; $VM_CHECKOUT_MODULES = array( 'CHECK_OUT_GET_SHIPPING_ADDR'=>array('order'=>1,'enabled'=>1), 'CHECK_OUT_GET_SHIPPING_METHOD'=>array('order'=>2,'enabled'=>1), 'CHECK_OUT_GET_PAYMENT_METHOD'=>array('order'=>3,'enabled'=>1), 'CHECK_OUT_GET_FINAL_CONFIRMATION'=>array('order'=>4,'enabled'=>1) ); /* Shipping Methods Definition */ global $PSHOP_SHIPPING_MODULES; $PSHOP_SHIPPING_MODULES[0] = ""flex""; $PSHOP_SHIPPING_MODULES[1] = ""standard_shipping""; ?>",0 "* ELABORAZIONE SERVER EGIPSY ** importo:175,20 divisa:EUR esito:307033 ordine nymero:000000000000f7fd0398 transazione:00305B0EA8EC294665749024 negoziante:398752500002 mac ricevuto :B0383EF92717C76B9A26A57C64CFF27A mac calcolato :B0383EF92717C76B9A26A57C64CFF27A esito passato :1 Risultato: OK; Esito: 307033 Numero ordine: f7fd0398 17/02/2013 10:03:22 - ** ELABORAZIONE REDIRECT EGIPSY ** importo:175,20 divisa:EUR esito:307033 ordine numero:000000000000f7fd0398 transazione:00305B0EA8EC294665749024 negoziante:398752500002 mac ricevuto :B0383EF92717C76B9A26A57C64CFF27A mac calcolato :B0383EF92717C76B9A26A57C64CFF27A esito passato :1 codice autorizazione307033 Risultato: OK; Esito: 307033 Numero ordine: f7fd0398 ",0 "rmation regarding copyright ownership. * Jasig licenses this file to you 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. */ package org.jasig.schedassist.web.security; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import org.jasig.schedassist.impl.owner.NotRegisteredException; import org.jasig.schedassist.model.ICalendarAccount; import org.jasig.schedassist.model.IDelegateCalendarAccount; import org.jasig.schedassist.model.IScheduleOwner; import org.springframework.security.core.GrantedAuthority; /** * {@link CalendarAccountUserDetails} implementation for {@link IDelegateCalendarAccount}s. * * @author Nicholas Blair, nblair@doit.wisc.edu * @version $Id: DelegateCalendarAccountUserDetailsImpl.java 2306 2010-07-28 17:20:12Z npblair $ */ public class DelegateCalendarAccountUserDetailsImpl implements CalendarAccountUserDetails { /** * */ private static final long serialVersionUID = 53706L; private static final String EMPTY = """"; private final IDelegateCalendarAccount delegateCalendarAccount; private IScheduleOwner scheduleOwner; /** * * @param delegateCalendarAccount */ public DelegateCalendarAccountUserDetailsImpl(IDelegateCalendarAccount delegateCalendarAccount) { this(delegateCalendarAccount, null); } /** * @param delegateCalendarAccount * @param delegateScheduleOwner */ public DelegateCalendarAccountUserDetailsImpl( IDelegateCalendarAccount delegateCalendarAccount, IScheduleOwner delegateScheduleOwner) { this.delegateCalendarAccount = delegateCalendarAccount; this.scheduleOwner = delegateScheduleOwner; } /* (non-Javadoc) * @see org.springframework.security.userdetails.UserDetails#getAuthorities() */ public Collection getAuthorities() { List authorities = new ArrayList(); if(null != this.delegateCalendarAccount && this.delegateCalendarAccount.isEligible()) { authorities.add(SecurityConstants.DELEGATE_REGISTER); } if(null != this.scheduleOwner) { authorities.add(SecurityConstants.DELEGATE_OWNER); authorities.remove(SecurityConstants.DELEGATE_REGISTER); } return Collections.unmodifiableList(authorities); } /* (non-Javadoc) * @see org.springframework.security.userdetails.UserDetails#getPassword() */ public String getPassword() { return EMPTY; } /* (non-Javadoc) * @see org.springframework.security.userdetails.UserDetails#getUsername() */ public String getUsername() { return this.delegateCalendarAccount.getUsername(); } /* (non-Javadoc) * @see org.springframework.security.userdetails.UserDetails#isAccountNonExpired() */ public boolean isAccountNonExpired() { return true; } /* (non-Javadoc) * @see org.springframework.security.userdetails.UserDetails#isAccountNonLocked() */ public boolean isAccountNonLocked() { return true; } /* (non-Javadoc) * @see org.springframework.security.userdetails.UserDetails#isCredentialsNonExpired() */ public boolean isCredentialsNonExpired() { return true; } /* (non-Javadoc) * @see org.springframework.security.userdetails.UserDetails#isEnabled() */ public boolean isEnabled() { return null != this.delegateCalendarAccount ? this.delegateCalendarAccount.isEligible() : false; } /* * (non-Javadoc) * @see org.jasig.schedassist.web.security.CalendarAccountUserDetails#getActiveDisplayName() */ public String getActiveDisplayName() { StringBuilder display = new StringBuilder(); display.append(this.delegateCalendarAccount.getDisplayName()); display.append("" (managed by ""); display.append(this.delegateCalendarAccount.getAccountOwner().getUsername()); display.append("")""); return display.toString(); } /* * (non-Javadoc) * @see org.jasig.schedassist.web.security.CalendarAccountUserDetails#getCalendarAccount() */ @Override public ICalendarAccount getCalendarAccount() { return getDelegateCalendarAccount(); } /** * * @return the {@link IDelegateCalendarAccount} */ public IDelegateCalendarAccount getDelegateCalendarAccount() { return this.delegateCalendarAccount; } /* * (non-Javadoc) * @see org.jasig.schedassist.web.security.CalendarAccountUserDetails#getScheduleOwner() */ @Override public IScheduleOwner getScheduleOwner() throws NotRegisteredException { if(null == this.scheduleOwner) { throw new NotRegisteredException(this.delegateCalendarAccount + "" is not registered""); } else { return this.scheduleOwner; } } /* * (non-Javadoc) * @see org.jasig.schedassist.web.security.CalendarAccountUserDetails#isDelegate() */ @Override public final boolean isDelegate() { return true; } /* * (non-Javadoc) * @see org.jasig.schedassist.web.security.CalendarAccountUserDetails#updateScheduleOwner(org.jasig.schedassist.model.IScheduleOwner) */ @Override public void updateScheduleOwner(IScheduleOwner owner) { this.scheduleOwner = owner; } } ",0 "ry"" data-ng-click=""remove();"">

Edit Investment

",0 "ukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerInteractEntityEvent; /** * Handle events for all Player related events * @author redsgreens */ public class PigasusPlayerListener implements Listener { private final Pigasus plugin; public PigasusPlayerListener(Pigasus instance) { plugin = instance; } @EventHandler(priority = EventPriority.MONITOR) public void onPlayerInteractEntity(PlayerInteractEntityEvent event) // catch player+entity events, looking for wand usage on an entity { Entity entity = event.getRightClicked(); // return if something not allowed was clicked if(plugin.Config.getHoveringChance(entity) == -1) return; Player player = event.getPlayer(); // return if the click was with something other than the wand if(player.getItemInHand().getType() != plugin.Config.WandItem) return; // check for permission if(!plugin.isAuthorized(player, ""wand"") && !plugin.isAuthorized(player, ""wand."" + PigasusFlyingEntity.getType(entity).name().toLowerCase())) { if(plugin.Config.ShowErrorsInClient) player.sendMessage(""§cErr: "" + plugin.Name + "": you don't have permission.""); return; } // checks passed, make this pig fly! plugin.Manager.addEntity(entity); } } ",0 "y it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . * **/ package lucee.runtime.type.comparator; import java.util.Comparator; import lucee.commons.lang.ComparatorUtil; import lucee.runtime.PageContext; import lucee.runtime.engine.ThreadLocalPageContext; import lucee.runtime.exp.PageException; import lucee.runtime.op.Caster; /** * Implementation of a Comparator, compares to Softregister Objects */ public final class SortRegisterComparator implements ExceptionComparator { private boolean isAsc; private PageException pageException=null; private boolean ignoreCase; private final Comparator comparator; /** * constructor of the class * @param isAsc is ascending or descending * @param ignoreCase do ignore case */ public SortRegisterComparator(PageContext pc,boolean isAsc, boolean ignoreCase, boolean localeSensitive) { this.isAsc=isAsc; this.ignoreCase=ignoreCase; comparator = ComparatorUtil.toComparator( ignoreCase?ComparatorUtil.SORT_TYPE_TEXT_NO_CASE:ComparatorUtil.SORT_TYPE_TEXT , isAsc, localeSensitive?ThreadLocalPageContext.getLocale(pc):null, null); } /** * @return Returns the expressionException. */ public PageException getPageException() { return pageException; } @Override public int compare(Object oLeft, Object oRight) { try { if(pageException!=null) return 0; else if(isAsc) return compareObjects(oLeft, oRight); else return compareObjects(oRight, oLeft); } catch (PageException e) { pageException=e; return 0; } } private int compareObjects(Object oLeft, Object oRight) throws PageException { String strLeft=Caster.toString(((SortRegister)oLeft).getValue()); String strRight=Caster.toString(((SortRegister)oRight).getValue()); return comparator.compare(strLeft, strRight); } }",0 "at\DefaultContext; class BrowserContext extends DefaultContext { /** * @Given estoy autenticado como :username con :password */ public function iAmAuthenticated($username, $password) { $this->getSession()->visit($this->generateUrl('fos_user_security_login', [], true)); $this->fillField('_username', $username); $this->fillField('_password', $password); $this->pressButton('_submit'); } /** * @Then /^presiono ""([^""]*)"" con clase ""([^""]*)""$/ * * @param string $text * @param string $class */ public function iFollowLinkWithClass($text, $class) { $link = $this->getSession()->getPage()->find( 'xpath', sprintf(""//*[@class='%s' and contains(., '%s')]"", $class, $text) ); if (!$link) { throw new ExpectationException(sprintf('Unable to follow the link with class: %s and text: %s', $class, $text), $this->getSession()); } $link->click(); } }",0 "5 Intel Corporation. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include #include #include #include #include #include #include #include ""ec.h"" #include ""gpio.h"" static const char *oem_id_maxim = ""INTEL""; static const char *oem_table_id_maxim = ""SCRDMAX""; static void mainboard_init(device_t dev) { mainboard_ec_init(); } static uint8_t select_audio_codec(void) { int audio_db_sel = gpio_get(AUDIO_DB_ID); return audio_db_sel; } static unsigned long mainboard_write_acpi_tables( device_t device, unsigned long current, acpi_rsdp_t *rsdp) { uintptr_t start_addr; uintptr_t end_addr; struct nhlt *nhlt; const char *oem_id = NULL; const char *oem_table_id = NULL; start_addr = current; nhlt = nhlt_init(); if (nhlt == NULL) return start_addr; /* 2 Channel DMIC array. */ if (nhlt_soc_add_dmic_array(nhlt, 2)) printk(BIOS_ERR, ""Couldn't add 2CH DMIC array.\n""); /* 4 Channel DMIC array. */ if (nhlt_soc_add_dmic_array(nhlt, 4)) printk(BIOS_ERR, ""Couldn't add 4CH DMIC arrays.\n""); if (select_audio_codec()) { /* ADI Smart Amps for left and right. */ if (nhlt_soc_add_ssm4567(nhlt, AUDIO_LINK_SSP0)) printk(BIOS_ERR, ""Couldn't add ssm4567.\n""); } else { /* MAXIM Smart Amps for left and right. */ if (nhlt_soc_add_max98357(nhlt, AUDIO_LINK_SSP0)) printk(BIOS_ERR, ""Couldn't add max98357.\n""); oem_id = oem_id_maxim; oem_table_id = oem_table_id_maxim; } /* NAU88l25 Headset codec. */ if (nhlt_soc_add_nau88l25(nhlt, AUDIO_LINK_SSP1)) printk(BIOS_ERR, ""Couldn't add headset codec.\n""); end_addr = nhlt_soc_serialize_oem_overrides(nhlt, start_addr, oem_id, oem_table_id); if (end_addr != start_addr) acpi_add_table(rsdp, (void *)start_addr); return end_addr; } /* * mainboard_enable is executed as first thing after * enumerate_buses(). */ static void mainboard_enable(device_t dev) { dev->ops->init = mainboard_init; dev->ops->write_acpi_tables = mainboard_write_acpi_tables; } struct chip_operations mainboard_ops = { .enable_dev = mainboard_enable, }; ",0 "tent=""noindex""/>
",0 " http://yendifplayer.com/ * @copyright 2014 Yendif Technologies Pvt Ltd. */ class Yendif_Player_Settings_View { /** * Instance of the model object. * * @since 1.0.0 * * @var object */ private $model = null; /** * Constructor of this class. * * @since 1.0.0 */ public function __construct( $model ) { $this->model = $model; } /** * Load the default layout * * @since 1.0.0 */ public function default_layout() { $item = $this->model->item(); include_once( 'tmpl/default.php' ); } }",0 ".os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ImageView; import android.widget.ListView; import android.widget.Toast; import com.hackathon.hackathon2014.R; import com.hackathon.hackathon2014.webservice.PostRequestHandler; import com.hackathon.hackathon2014.webservice.RestProvider; import com.hackathon.hackathon2014.adapter.QuestionListAdapter; import com.hackathon.hackathon2014.model.Question; import java.util.List; public class QuestionActivity extends Activity { public static String EXTRA_QUESTION = ""question""; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_question); if (savedInstanceState == null) { getFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()) .commit(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.question, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View rootView = inflater.inflate(R.layout.fragment_question, container, false); Toast.makeText(rootView.getContext(),""Loading..."",Toast.LENGTH_LONG).show(); RestProvider.getQuestions(new PostRequestHandler>() { @Override public void handle(List questions) { QuestionListAdapter questionListAdapter = new QuestionListAdapter(getActivity(), questions); ListView listView = (ListView) rootView.findViewById(R.id.questionListView); listView.setAdapter(questionListAdapter); listView.setOnItemClickListener(new OpenAnswerEvent(getActivity(), questions)); } }); return rootView; } private class OpenAnswerEvent implements android.widget.AdapterView.OnItemClickListener { private List questions; private Activity activity; private OpenAnswerEvent(Activity activity, List questions) { this.activity = activity; this.questions = questions; } @Override public void onItemClick(AdapterView adapterView, View view, int i, long l) { Question question = questions.get(i); question.setSelected(true); Intent intent = new Intent(activity,CategoryActivity.class); intent.putExtra(EXTRA_QUESTION, question); activity.startActivity(intent); final ImageView questionIcon = (ImageView) view.findViewById(R.id.questionIcon); QuestionListAdapter.renderChecked(question.isSelected(), questionIcon, R.drawable.ok_enable, R.drawable.ok_disable); } } } } ",0 "ons/AccessImageAction' ); /** * This class provides utility functions for formatting URLs for this application. * @author craigb */ class UrlFormatter { private static $baseUrl = NULL; /** * This method formats a URL for the specified routing item class name, incorporating * the get parameters specified in the get parameter map. * @param String $routingItemClassPath The class path of the target routing item. * @param array $getParamMap A map of get parameters to be included in the URL (optional). * @return String The formatted URL. */ public static function formatRoutingItemUrl( $routingItemClassPath, array $getParamMap = NULL ) { ClassLoader::requireClassOnce( $routingItemClassPath ); $routingClassName = ClassLoader::parseClassName( $routingItemClassPath ); $url = UrlFormatter::getBaseUrl( ) . '?' . IndexRoutingItem::INDEX_ROUTING_ITEM_GET_PARAM . '='; $url .= $routingClassName::getRoutingKey( ); if ( $getParamMap != NULL ) { foreach( $getParamMap as $key => $value ) $url .= ""&$key=$value""; } return $url; } /** * Formats a URL for the specified image path. * @param String $imagePath The image path to be formatted. * @return String The formatted url. */ public static function formatImageUrl( $imagePath ) { $getParamMap = array( AccessImageAction::RELATIVE_IMAGE_PATH_GET_PARAM => $imagePath ); $url = UrlFormatter::formatRoutingItemUrl( 'actions/AccessImageAction', $getParamMap ); return $url; } /** * Formats and returns the base URL for the application. * @return String The base URL for the application. */ public static function getBaseUrl( ) { if ( UrlFormatter::$baseUrl == NULL ) UrlFormatter::$baseUrl = Settings::getSetting( 'APPLICATION_URL' ) . 'index.php'; return UrlFormatter::$baseUrl; } } ?>",0 "e=""provider"" content=""www.cnepub.com""/> 第三十九章

第三十九章

1岩间野羊生羔、尔知其时乎、麀鹿产子、尔悉其期乎、

2岂能计其月数、知其孳生之时乎、

3卷曲生子、劬劳诞育、

4其子渐壮、长于原野、去而不返、

5谁令野驴任意游行、谁为迅驴解其絷维、

6我使旷野为其室家、卤地为其居所、

7彼轻忽邑中之喧哗、不听驱者之叱咤、

8诸山为其牧场、遍觅青草、

9野牛岂役于尔、抑安处尔槽乎、

10尔能在陇亩中、系之以索乎、彼岂从尔耙于谷乎、

11尔岂因其力大、而恃之乎、抑以尔劳委之乎、

12尔岂赖其运谷于家、积禾于场乎、

13鸵鸟昂然展翼、惟其毛羽不慈、

14盖遗其卵于地、暖之于沙、

15不念人足或践之、野兽或躏之、

16忍心待雏、若非己有、虽则徒劳、亦无惧也、

17盖上帝去其慧心、不赋以灵明、

18及其高展、则轻视马与乘者、

19马力尔赐之乎、其项奋扬之鬣、尔被之乎、

20其跃如蝗、尔令之乎、咆哮之威、甚可畏也、

21跑地于谷、自喜有力、出迓兵械、

22遇有可畏、轻视而不惧、不因锋刃而却退、

23其上箭弢、与光明之戈矛、震震有声、

24彼乃猛烈忿怒、气吞土地、一闻角声、则不耐立、

25角响则嘶、远嗅战气、乐闻将帅之雷霆、士卒之鼓噪、

26鹰隼飞翔、振翮南往、岂由尔智乎、

27雕鹗腾空、营巢高岭、岂因尔命乎、

28巢于巉岩、峰巅巩固之处、

29自彼窥食、其目远观、

30其雏吮血、尸之所在、彼亦在焉、

",0 " /* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $searchModel izyue\admin\models\searchs\BizRule */ $this->title = Yii::t('rbac-admin', 'Rules'); $this->params['breadcrumbs'][] = $this->title; ?>
title?>
$dataProvider, 'filterModel' => $searchModel, 'tableOptions' => [ 'class' => 'table table-striped table-hover table-bordered', 'id' => 'editable-sample', ], 'pager' => [ 'prevPageLabel' => Yii::t('rbac-admin', 'Prev'), 'nextPageLabel' => Yii::t('rbac-admin', 'Next'), ], 'layout'=> '{items}
{summary}
{pager}
', 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'route', 'url', [ 'attribute' => 'admin.username', 'filter' => Html::activeTextInput($searchModel, 'admin', [ 'class' => 'form-control', 'id' => null ]), ], 'admin_email', 'ip', [ 'class' => 'yii\grid\ActionColumn', 'template' => '{view}' ], ], ]); ?>
",0 "DED #include ""base_types.h"" class MD5 { public: MD5(); ~MD5() { } void Init(); void Update(const void *data, UINT32 len); void Final(char digest[33]); /* internal function */ static void Transform(UINT32 buf[4], UINT32 in_data[16]); static void Calc(const void *data, UINT32 length, char digest[33]); private: UINT32 m_buf[4]; UINT32 m_bits[2]; UINT8 m_in[64]; bool m_need_byteswap; bool m_big_endian; void reverse_u32(UINT8 *buf, int n_u32); }; #endif /* MD5_H_INCLUDED */ ",0 " */ /* afangles.c */ /* */ /* Routines used to compute vector angles with limited accuracy */ /* and very high speed. It also contains sorting routines (body). */ /* */ /* Copyright 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #include ""aftypes.h"" #if 0 FT_LOCAL_DEF( FT_Int ) af_corner_is_flat( FT_Pos x_in, FT_Pos y_in, FT_Pos x_out, FT_Pos y_out ) { FT_Pos ax = x_in; FT_Pos ay = y_in; FT_Pos d_in, d_out, d_corner; if ( ax < 0 ) ax = -ax; if ( ay < 0 ) ay = -ay; d_in = ax + ay; ax = x_out; if ( ax < 0 ) ax = -ax; ay = y_out; if ( ay < 0 ) ay = -ay; d_out = ax + ay; ax = x_out + x_in; if ( ax < 0 ) ax = -ax; ay = y_out + y_in; if ( ay < 0 ) ay = -ay; d_corner = ax + ay; return ( d_in + d_out - d_corner ) < ( d_corner >> 4 ); } FT_LOCAL_DEF( FT_Int ) af_corner_orientation( FT_Pos x_in, FT_Pos y_in, FT_Pos x_out, FT_Pos y_out ) { FT_Pos delta; delta = x_in * y_out - y_in * x_out; if ( delta == 0 ) return 0; else return 1 - 2 * ( delta < 0 ); } #endif /* * We are not using `af_angle_atan' anymore, but we keep the source * code below just in case... */ #if 0 /* * The trick here is to realize that we don't need a very accurate angle * approximation. We are going to use the result of `af_angle_atan' to * only compare the sign of angle differences, or check whether its * magnitude is very small. * * The approximation * * dy * PI / (|dx|+|dy|) * * should be enough, and much faster to compute. */ FT_LOCAL_DEF( AF_Angle ) af_angle_atan( FT_Fixed dx, FT_Fixed dy ) { AF_Angle angle; FT_Fixed ax = dx; FT_Fixed ay = dy; if ( ax < 0 ) ax = -ax; if ( ay < 0 ) ay = -ay; ax += ay; if ( ax == 0 ) angle = 0; else { angle = ( AF_ANGLE_PI2 * dy ) / ( ax + ay ); if ( dx < 0 ) { if ( angle >= 0 ) angle = AF_ANGLE_PI - angle; else angle = -AF_ANGLE_PI - angle; } } return angle; } #elif 0 /* the following table has been automatically generated with */ /* the `mather.py' Python script */ #define AF_ATAN_BITS 8 static const FT_Byte af_arctan[1L << AF_ATAN_BITS] = { 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 42, 43, 43, 43, 43, 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 46, 47, 47, 47, 47, 48, 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 64, 64, 64 }; FT_LOCAL_DEF( AF_Angle ) af_angle_atan( FT_Fixed dx, FT_Fixed dy ) { AF_Angle angle; /* check trivial cases */ if ( dy == 0 ) { angle = 0; if ( dx < 0 ) angle = AF_ANGLE_PI; return angle; } else if ( dx == 0 ) { angle = AF_ANGLE_PI2; if ( dy < 0 ) angle = -AF_ANGLE_PI2; return angle; } angle = 0; if ( dx < 0 ) { dx = -dx; dy = -dy; angle = AF_ANGLE_PI; } if ( dy < 0 ) { FT_Pos tmp; tmp = dx; dx = -dy; dy = tmp; angle -= AF_ANGLE_PI2; } if ( dx == 0 && dy == 0 ) return 0; if ( dx == dy ) angle += AF_ANGLE_PI4; else if ( dx > dy ) angle += af_arctan[FT_DivFix( dy, dx ) >> ( 16 - AF_ATAN_BITS )]; else angle += AF_ANGLE_PI2 - af_arctan[FT_DivFix( dx, dy ) >> ( 16 - AF_ATAN_BITS )]; if ( angle > AF_ANGLE_PI ) angle -= AF_ANGLE_2PI; return angle; } #endif /* 0 */ FT_LOCAL_DEF( void ) af_sort_pos( FT_UInt count, FT_Pos* table ) { FT_UInt i, j; FT_Pos swap; for ( i = 1; i < count; i++ ) { for ( j = i; j > 0; j-- ) { if ( table[j] > table[j - 1] ) break; swap = table[j]; table[j] = table[j - 1]; table[j - 1] = swap; } } } FT_LOCAL_DEF( void ) af_sort_widths( FT_UInt count, AF_Width table ) { FT_UInt i, j; AF_WidthRec swap; for ( i = 1; i < count; i++ ) { for ( j = i; j > 0; j-- ) { if ( table[j].org > table[j - 1].org ) break; swap = table[j]; table[j] = table[j - 1]; table[j - 1] = swap; } } } /* END */ ",0 "the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * [Insert appropriate license here when releasing outside of Cisco] * $Id: fnic_fip.h 79980 2011-06-17 00:43:59Z vbhamidi $ */ #ifndef _FNIC_FIP_H_ #define _FNIC_FIP_H_ #define FCOE_CTLR_START_DELAY 2000 /* ms after first adv. to choose FCF */ #define FCOE_CTLR_FIPVLAN_TOV 2000 /* ms after FIP VLAN disc */ #define FCOE_CTLR_MAX_SOL 8 #define FINC_MAX_FLOGI_REJECTS 8 /* * FIP_DT_VLAN descriptor. */ struct fip_vlan_desc { struct fip_desc fd_desc; __be16 fd_vlan; } __attribute__((packed)); struct vlan { __be16 vid; __be16 type; }; /* * VLAN entry. */ struct fcoe_vlan { struct list_head list; u16 vid; /* vlan ID */ u16 sol_count; /* no. of sols sent */ u16 state; /* state */ }; enum fip_vlan_state { FIP_VLAN_AVAIL = 0, /* don't do anything */ FIP_VLAN_SENT = 1, /* sent */ FIP_VLAN_USED = 2, /* succeed */ FIP_VLAN_FAILED = 3, /* failed to response */ }; struct fip_vlan { struct ethhdr eth; struct fip_header fip; struct { struct fip_mac_desc mac; struct fip_wwn_desc wwnn; } desc; }; #endif /* __FINC_FIP_H_ */ ",0 " * Copyright 1998 Gerald Combs * * SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef RANGE_SYNTAX_LINEEDIT_H #define RANGE_SYNTAX_LINEEDIT_H #include #include class RangeSyntaxLineEdit : public SyntaxLineEdit { Q_OBJECT public: explicit RangeSyntaxLineEdit(QWidget *parent = 0); void setMaxRange(unsigned int max); public slots: void checkRange(QString range); private: unsigned int maxRange_; }; #endif // RANGE_SYNTAX_LINEEDIT_H /* * Editor modelines * * Local Variables: * c-basic-offset: 4 * tab-width: 8 * indent-tabs-mode: nil * End: * * ex: set shiftwidth=4 tabstop=8 expandtab: * :indentSize=4:tabSize=8:noTabs=true: */ ",0 "p://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt --> ",0 "le>ltl: Not compatible 👼
« Up

ltl 8.10.0 Not compatible 👼

📅 (2022-02-10 19:42:23 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-threads        base
base-unix           base
camlp5              7.14        Preprocessor-pretty-printer of OCaml
conf-findutils      1           Virtual package relying on findutils
conf-perl           2           Virtual package relying on perl
coq                 8.7.2       Formal proof management system
num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.06.1      The OCaml compiler (virtual package)
ocaml-base-compiler 4.06.1      Official 4.06.1 release
ocaml-config        1           OCaml Switch Configuration
ocamlfind           1.9.3       A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/ltl"
license: "Unknown"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/LTL"]
depends: [
  "ocaml"
  "coq" {>= "8.10" & < "8.11~"}
]
tags: [
  "keyword: temporal logic"
  "keyword: infinite transition systems"
  "keyword: co-induction"
  "category: Mathematics/Logic/Modal logic"
  "date: 2002-07"
]
authors: [
  "Solange Coupet-Grimal"
]
bug-reports: "https://github.com/coq-contribs/ltl/issues"
dev-repo: "git+https://github.com/coq-contribs/ltl.git"
synopsis: "Linear Temporal Logic"
description: """
This contribution contains a shallow embedding of Linear
Temporal Logic (LTL) based on a co-inductive representation of program
executions. Temporal operators are implemented as inductive
(respectively co-inductive) types when they are least (respectively
greatest) fixpoints. Several general lemmas,
that correspond to LTL rules, are proved."""
flags: light-uninstall
url {
  src: "https://github.com/coq-contribs/ltl/archive/v8.10.0.tar.gz"
  checksum: "md5=8a4b130957215e97768d37fb747f2c18"
}

Lint

Command
true
Return code
0

Dry install 🏜️

Dry install with the current Coq version:

Command
opam install -y --show-action coq-ltl.8.10.0 coq.8.7.2
Return code
5120
Output
[NOTE] Package coq is already installed (current version is 8.7.2).
The following dependencies couldn't be met:
  - coq-ltl -> coq >= 8.10
Your request can't be satisfied:
  - No available version of coq satisfies the constraints
No solution found, exiting

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command
opam remove -y coq; opam install -y --show-action --unlock-base coq-ltl.8.10.0
Return code
0

Install dependencies

Command
true
Return code
0
Duration
0 s

Install 🚀

Command
true
Return code
0
Duration
0 s

Installation size

No files were installed.

Uninstall 🧹

Command
true
Return code
0
Missing removes
none
Wrong removes
none

Sources are on GitHub © Guillaume Claret 🐣

",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.shardingsphere.elasticjob.lite.spring.namespace.job; import lombok.RequiredArgsConstructor; import org.apache.shardingsphere.elasticjob.infra.concurrent.BlockUtils; import org.apache.shardingsphere.elasticjob.lite.api.bootstrap.impl.OneOffJobBootstrap; import org.apache.shardingsphere.elasticjob.lite.internal.schedule.JobRegistry; import org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.DataflowElasticJob; import org.apache.shardingsphere.elasticjob.lite.spring.namespace.fixture.job.FooSimpleElasticJob; import org.apache.shardingsphere.elasticjob.lite.spring.namespace.test.AbstractZookeeperJUnit4SpringContextTests; import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter; import org.junit.After; import org.junit.Before; import org.junit.Test; import javax.annotation.Resource; import static org.junit.Assert.assertTrue; @RequiredArgsConstructor public abstract class AbstractOneOffJobSpringIntegrateTest extends AbstractZookeeperJUnit4SpringContextTests { private final String simpleJobName; private final String throughputDataflowJobName; @Resource private CoordinatorRegistryCenter regCenter; @Before @After public void reset() { FooSimpleElasticJob.reset(); DataflowElasticJob.reset(); } @After public void tearDown() { JobRegistry.getInstance().shutdown(simpleJobName); JobRegistry.getInstance().shutdown(throughputDataflowJobName); } @Test public void assertSpringJobBean() { assertSimpleElasticJobBean(); assertThroughputDataflowElasticJobBean(); } private void assertSimpleElasticJobBean() { OneOffJobBootstrap bootstrap = applicationContext.getBean(simpleJobName, OneOffJobBootstrap.class); bootstrap.execute(); while (!FooSimpleElasticJob.isCompleted()) { BlockUtils.waitingShortTime(); } assertTrue(FooSimpleElasticJob.isCompleted()); assertTrue(regCenter.isExisted(""/"" + simpleJobName + ""/sharding"")); } private void assertThroughputDataflowElasticJobBean() { OneOffJobBootstrap bootstrap = applicationContext.getBean(throughputDataflowJobName, OneOffJobBootstrap.class); bootstrap.execute(); while (!DataflowElasticJob.isCompleted()) { BlockUtils.waitingShortTime(); } assertTrue(DataflowElasticJob.isCompleted()); assertTrue(regCenter.isExisted(""/"" + throughputDataflowJobName + ""/sharding"")); } } ",0 "99/xhtml""> ClickCloud | Rapid deployment
Welcome to use ClickCloud Deployment Service, the rapid deployment plan
",0 "rg/1999/xhtml""> Crap Engine 2: Member List
Crap Engine 2
crap::linear_allocator Member List

This is the complete list of members for crap::linear_allocator, including all inherited members.

allocate(uint32_t size, uint32_t alignment, uint32_t offset)crap::linear_allocator
allocation_size(pointer_void address)crap::linear_allocator
deallocate(pointer_void pointer)crap::linear_allocator
linear_allocator(pointer_void start, pointer_void end)crap::linear_allocator
pointer_void typedefcrap::linear_allocator

Generated on Wed Jan 7 2015 21:59:11 for Crap Engine 2 by   1.8.9.1
",0 "SSet; import apple.foundation.protocol.NSCopying; import org.moe.natj.c.ann.FunctionPtr; import org.moe.natj.general.NatJ; import org.moe.natj.general.Pointer; import org.moe.natj.general.ann.Generated; import org.moe.natj.general.ann.Library; import org.moe.natj.general.ann.Mapped; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.general.ann.NInt; import org.moe.natj.general.ann.NUInt; import org.moe.natj.general.ann.Owned; import org.moe.natj.general.ann.Runtime; import org.moe.natj.general.ptr.VoidPtr; import org.moe.natj.objc.Class; import org.moe.natj.objc.ObjCRuntime; import org.moe.natj.objc.SEL; import org.moe.natj.objc.ann.ObjCClassBinding; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper; /** * MLCRMSPropOptimizer *

* The MLCRMSPropOptimizer specifies the RMSProp optimizer. */ @Generated @Library(""MLCompute"") @Runtime(ObjCRuntime.class) @ObjCClassBinding public class MLCRMSPropOptimizer extends MLCOptimizer implements NSCopying { static { NatJ.register(); } @Generated protected MLCRMSPropOptimizer(Pointer peer) { super(peer); } @Generated @Selector(""accessInstanceVariablesDirectly"") public static native boolean accessInstanceVariablesDirectly(); @Generated @Owned @Selector(""alloc"") public static native MLCRMSPropOptimizer alloc(); @Owned @Generated @Selector(""allocWithZone:"") public static native MLCRMSPropOptimizer allocWithZone(VoidPtr zone); /** * [@property] alpha *

* The smoothing constant. *

* The default is 0.99. */ @Generated @Selector(""alpha"") public native float alpha(); @Generated @Selector(""automaticallyNotifiesObserversForKey:"") public static native boolean automaticallyNotifiesObserversForKey(String key); @Generated @Selector(""cancelPreviousPerformRequestsWithTarget:"") public static native void cancelPreviousPerformRequestsWithTarget(@Mapped(ObjCObjectMapper.class) Object aTarget); @Generated @Selector(""cancelPreviousPerformRequestsWithTarget:selector:object:"") public static native void cancelPreviousPerformRequestsWithTargetSelectorObject( @Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector, @Mapped(ObjCObjectMapper.class) Object anArgument); @Generated @Selector(""classFallbacksForKeyedArchiver"") public static native NSArray classFallbacksForKeyedArchiver(); @Generated @Selector(""classForKeyedUnarchiver"") public static native Class classForKeyedUnarchiver(); @Generated @Owned @Selector(""copyWithZone:"") @MappedReturn(ObjCObjectMapper.class) public native Object copyWithZone(VoidPtr zone); @Generated @Selector(""debugDescription"") public static native String debugDescription_static(); @Generated @Selector(""description"") public static native String description_static(); /** * [@property] epsilon *

* A term added to improve numerical stability. *

* The default is 1e-8. */ @Generated @Selector(""epsilon"") public native float epsilon(); @Generated @Selector(""hash"") @NUInt public static native long hash_static(); @Generated @Selector(""init"") public native MLCRMSPropOptimizer init(); @Generated @Selector(""instanceMethodForSelector:"") @FunctionPtr(name = ""call_instanceMethodForSelector_ret"") public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(SEL aSelector); @Generated @Selector(""instanceMethodSignatureForSelector:"") public static native NSMethodSignature instanceMethodSignatureForSelector(SEL aSelector); @Generated @Selector(""instancesRespondToSelector:"") public static native boolean instancesRespondToSelector(SEL aSelector); /** * [@property] isCentered *

* If True, compute the centered RMSProp, the gradient is normalized by an estimation of its variance. *

* The default is false. */ @Generated @Selector(""isCentered"") public native boolean isCentered(); @Generated @Selector(""isSubclassOfClass:"") public static native boolean isSubclassOfClass(Class aClass); @Generated @Selector(""keyPathsForValuesAffectingValueForKey:"") public static native NSSet keyPathsForValuesAffectingValueForKey(String key); /** * [@property] momentumScale *

* The momentum factor. A hyper-parameter. *

* The default is 0.0. */ @Generated @Selector(""momentumScale"") public native float momentumScale(); @Generated @Owned @Selector(""new"") public static native MLCRMSPropOptimizer new_objc(); /** * Create a MLCRMSPropOptimizer object with defaults * * @return A new MLCRMSPropOptimizer object. */ @Generated @Selector(""optimizerWithDescriptor:"") public static native MLCRMSPropOptimizer optimizerWithDescriptor(MLCOptimizerDescriptor optimizerDescriptor); /** * Create a MLCRMSPropOptimizer object * * @param optimizerDescriptor The optimizer descriptor object * @param momentumScale The momentum scale * @param alpha The smoothing constant value * @param epsilon The epsilon value to use to improve numerical stability * @param isCentered A boolean to specify whether to compute the centered RMSProp or not * @return A new MLCRMSPropOptimizer object. */ @Generated @Selector(""optimizerWithDescriptor:momentumScale:alpha:epsilon:isCentered:"") public static native MLCRMSPropOptimizer optimizerWithDescriptorMomentumScaleAlphaEpsilonIsCentered( MLCOptimizerDescriptor optimizerDescriptor, float momentumScale, float alpha, float epsilon, boolean isCentered); @Generated @Selector(""resolveClassMethod:"") public static native boolean resolveClassMethod(SEL sel); @Generated @Selector(""resolveInstanceMethod:"") public static native boolean resolveInstanceMethod(SEL sel); @Generated @Selector(""setVersion:"") public static native void setVersion_static(@NInt long aVersion); @Generated @Selector(""superclass"") public static native Class superclass_static(); @Generated @Selector(""version"") @NInt public static native long version_static(); } ",0 "thenticationBuilder; import org.apereo.cas.authentication.BasicCredentialMetaData; import org.apereo.cas.authentication.DefaultAuthenticationBuilder; import org.apereo.cas.authentication.DefaultAuthenticationHandlerExecutionResult; import org.apereo.cas.authentication.UsernamePasswordCredential; import org.apereo.cas.authentication.principal.DefaultPrincipalFactory; import org.apereo.cas.mock.MockServiceTicket; import org.apereo.cas.mock.MockTicketGrantingTicket; import org.apereo.cas.services.RegisteredServiceTestUtils; import org.apereo.cas.ticket.TicketGrantingTicket; import org.apereo.cas.ticket.TicketGrantingTicketImpl; import org.apereo.cas.ticket.support.MultiTimeUseOrTimeoutExpirationPolicy; import org.apereo.cas.ticket.support.NeverExpiresExpirationPolicy; import com.esotericsoftware.kryo.KryoException; import lombok.extern.slf4j.Slf4j; import lombok.val; import org.junit.Test; import javax.security.auth.login.AccountNotFoundException; import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; import static org.junit.Assert.*; /** * Unit test for {@link CasKryoTranscoder} class. * * @author Marvin S. Addison * @since 3.0.0 */ @Slf4j public class CasKryoTranscoderTests { private static final String ST_ID = ""ST-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ABCDEFGHIJK""; private static final String TGT_ID = ""TGT-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890ABCDEFGHIJK-cas1""; private static final String USERNAME = ""handymanbob""; private static final String PASSWORD = ""foo""; private static final String NICKNAME_KEY = ""nickname""; private static final String NICKNAME_VALUE = ""bob""; private final CasKryoTranscoder transcoder; private final Map principalAttributes; public CasKryoTranscoderTests() { val classesToRegister = new ArrayList(); classesToRegister.add(MockServiceTicket.class); classesToRegister.add(MockTicketGrantingTicket.class); this.transcoder = new CasKryoTranscoder(new CasKryoPool(classesToRegister)); this.principalAttributes = new HashMap<>(); this.principalAttributes.put(NICKNAME_KEY, NICKNAME_VALUE); } @Test public void verifyEncodeDecodeTGTImpl() { val userPassCredential = new UsernamePasswordCredential(USERNAME, PASSWORD); final AuthenticationBuilder bldr = new DefaultAuthenticationBuilder(new DefaultPrincipalFactory() .createPrincipal(""user"", new HashMap<>(this.principalAttributes))); bldr.setAttributes(new HashMap<>(this.principalAttributes)); bldr.setAuthenticationDate(ZonedDateTime.now()); bldr.addCredential(new BasicCredentialMetaData(userPassCredential)); bldr.addFailure(""error"", new AccountNotFoundException()); bldr.addSuccess(""authn"", new DefaultAuthenticationHandlerExecutionResult( new AcceptUsersAuthenticationHandler(""""), new BasicCredentialMetaData(userPassCredential))); final TicketGrantingTicket expectedTGT = new TicketGrantingTicketImpl(TGT_ID, RegisteredServiceTestUtils.getService(), null, bldr.build(), new NeverExpiresExpirationPolicy()); val ticket = expectedTGT.grantServiceTicket(ST_ID, RegisteredServiceTestUtils.getService(), new NeverExpiresExpirationPolicy(), false, true); val result1 = transcoder.encode(expectedTGT); val resultTicket = transcoder.decode(result1); assertEquals(expectedTGT, resultTicket); val result2 = transcoder.encode(ticket); val resultStTicket1 = transcoder.decode(result2); assertEquals(ticket, resultStTicket1); val resultStTicket2 = transcoder.decode(result2); assertEquals(ticket, resultStTicket2); } @Test public void verifyEncodeDecode() { val tgt = new MockTicketGrantingTicket(USERNAME); val expectedST = new MockServiceTicket(ST_ID, RegisteredServiceTestUtils.getService(), tgt); assertEquals(expectedST, transcoder.decode(transcoder.encode(expectedST))); val expectedTGT = new MockTicketGrantingTicket(USERNAME); expectedTGT.grantServiceTicket(ST_ID, null, null, false, true); val result = transcoder.encode(expectedTGT); assertEquals(expectedTGT, transcoder.decode(result)); assertEquals(expectedTGT, transcoder.decode(result)); internalProxyTest(); } private void internalProxyTest() { val expectedTGT = new MockTicketGrantingTicket(USERNAME); expectedTGT.grantServiceTicket(ST_ID, null, null, false, true); val result = transcoder.encode(expectedTGT); assertEquals(expectedTGT, transcoder.decode(result)); assertEquals(expectedTGT, transcoder.decode(result)); } @Test public void verifyEncodeDecodeTGTWithUnmodifiableMap() { val userPassCredential = new UsernamePasswordCredential(USERNAME, PASSWORD); final TicketGrantingTicket expectedTGT = new MockTicketGrantingTicket(TGT_ID, userPassCredential, new HashMap<>(this.principalAttributes)); expectedTGT.grantServiceTicket(ST_ID, null, null, false, true); val result = transcoder.encode(expectedTGT); assertEquals(expectedTGT, transcoder.decode(result)); assertEquals(expectedTGT, transcoder.decode(result)); } @Test public void verifyEncodeDecodeTGTWithUnmodifiableList() { val userPassCredential = new UsernamePasswordCredential(USERNAME, PASSWORD); val values = new ArrayList(); values.add(NICKNAME_VALUE); val newAttributes = new HashMap(); newAttributes.put(NICKNAME_KEY, new ArrayList<>(values)); val expectedTGT = new MockTicketGrantingTicket(TGT_ID, userPassCredential, newAttributes); expectedTGT.grantServiceTicket(ST_ID, null, null, false, true); val result = transcoder.encode(expectedTGT); assertEquals(expectedTGT, transcoder.decode(result)); assertEquals(expectedTGT, transcoder.decode(result)); } @Test public void verifyEncodeDecodeTGTWithLinkedHashMap() { val userPassCredential = new UsernamePasswordCredential(USERNAME, PASSWORD); final TicketGrantingTicket expectedTGT = new MockTicketGrantingTicket(TGT_ID, userPassCredential, new LinkedHashMap<>(this.principalAttributes)); expectedTGT.grantServiceTicket(ST_ID, null, null, false, true); val result = transcoder.encode(expectedTGT); assertEquals(expectedTGT, transcoder.decode(result)); assertEquals(expectedTGT, transcoder.decode(result)); } @Test public void verifyEncodeDecodeTGTWithListOrderedMap() { val userPassCredential = new UsernamePasswordCredential(USERNAME, PASSWORD); final TicketGrantingTicket expectedTGT = new MockTicketGrantingTicket(TGT_ID, userPassCredential, this.principalAttributes); expectedTGT.grantServiceTicket(ST_ID, null, null, false, true); val result = transcoder.encode(expectedTGT); assertEquals(expectedTGT, transcoder.decode(result)); assertEquals(expectedTGT, transcoder.decode(result)); } @Test public void verifyEncodeDecodeTGTWithUnmodifiableSet() { val newAttributes = new HashMap(); val values = new HashSet(); values.add(NICKNAME_VALUE); //CHECKSTYLE:OFF newAttributes.put(NICKNAME_KEY, Collections.unmodifiableSet(values)); //CHECKSTYLE:ON val userPassCredential = new UsernamePasswordCredential(USERNAME, PASSWORD); val expectedTGT = new MockTicketGrantingTicket(TGT_ID, userPassCredential, newAttributes); expectedTGT.grantServiceTicket(ST_ID, null, null, false, true); val result = transcoder.encode(expectedTGT); assertEquals(expectedTGT, transcoder.decode(result)); assertEquals(expectedTGT, transcoder.decode(result)); } @Test public void verifyEncodeDecodeTGTWithSingleton() { val newAttributes = new HashMap(); newAttributes.put(NICKNAME_KEY, Collections.singleton(NICKNAME_VALUE)); val userPassCredential = new UsernamePasswordCredential(USERNAME, PASSWORD); val expectedTGT = new MockTicketGrantingTicket(TGT_ID, userPassCredential, newAttributes); expectedTGT.grantServiceTicket(ST_ID, null, null, false, true); val result = transcoder.encode(expectedTGT); assertEquals(expectedTGT, transcoder.decode(result)); assertEquals(expectedTGT, transcoder.decode(result)); } @Test public void verifyEncodeDecodeTGTWithSingletonMap() { val newAttributes = Collections.singletonMap(NICKNAME_KEY, NICKNAME_VALUE); val userPassCredential = new UsernamePasswordCredential(USERNAME, PASSWORD); val expectedTGT = new MockTicketGrantingTicket(TGT_ID, userPassCredential, newAttributes); expectedTGT.grantServiceTicket(ST_ID, null, null, false, true); val result = transcoder.encode(expectedTGT); assertEquals(expectedTGT, transcoder.decode(result)); assertEquals(expectedTGT, transcoder.decode(result)); } @Test public void verifyEncodeDecodeRegisteredService() { val service = RegisteredServiceTestUtils.getRegisteredService(""helloworld""); val result = transcoder.encode(service); assertEquals(service, transcoder.decode(result)); assertEquals(service, transcoder.decode(result)); } @Test public void verifySTWithServiceTicketExpirationPolicy() { // ServiceTicketExpirationPolicy is not registered with Kryo... transcoder.getKryo().getClassResolver().reset(); val tgt = new MockTicketGrantingTicket(USERNAME); val expectedST = new MockServiceTicket(ST_ID, RegisteredServiceTestUtils.getService(), tgt); val step = new MultiTimeUseOrTimeoutExpirationPolicy.ServiceTicketExpirationPolicy(1, 600); expectedST.setExpiration(step); val result = transcoder.encode(expectedST); assertEquals(expectedST, transcoder.decode(result)); // Test it a second time - Ensure there's no problem with subsequent de-serializations. assertEquals(expectedST, transcoder.decode(result)); } @Test public void verifyEncodeDecodeNonRegisteredClass() { val tgt = new MockTicketGrantingTicket(USERNAME); val expectedST = new MockServiceTicket(ST_ID, RegisteredServiceTestUtils.getService(), tgt); // This class is not registered with Kryo val step = new UnregisteredServiceTicketExpirationPolicy(1, 600); expectedST.setExpiration(step); try { transcoder.encode(expectedST); throw new AssertionError(""Unregistered class is not allowed by Kryo""); } catch (final KryoException e) { LOGGER.trace(e.getMessage(), e); } catch (final Exception e) { throw new AssertionError(""Unexpected exception due to not resetting Kryo between de-serializations with unregistered class.""); } } /** * Class for testing Kryo unregistered class handling. */ private static class UnregisteredServiceTicketExpirationPolicy extends MultiTimeUseOrTimeoutExpirationPolicy { private static final long serialVersionUID = -1704993954986738308L; /** * Instantiates a new Service ticket expiration policy. * * @param numberOfUses the number of uses * @param timeToKillInSeconds the time to kill in seconds */ UnregisteredServiceTicketExpirationPolicy(final int numberOfUses, final long timeToKillInSeconds) { super(numberOfUses, timeToKillInSeconds); } } } ",0 """> {% trans 'X-lists' %} {% trans 'Open' %} {% if perms.economy.add_socisession %} {% trans 'Closed' %} {% endif %} ",0 "rride public void v(String tag, String message, Throwable t, boolean keepLonger) { printlnFormatted('v', tag, message, t); } @Override public void d(String tag, String message, Throwable t, boolean keepLonger) { printlnFormatted('d', tag, message, t); } @Override public void i(String tag, String message, Throwable t, boolean keepLonger) { printlnFormatted('i', tag, message, t); } @Override public void w(String tag, String message, Throwable t, boolean keepLonger) { printlnFormatted('w', tag, message, t); } @Override public void e(String tag, String message, Throwable t, boolean keepLonger) { printlnFormatted('e', tag, message, t); } @Override public void flush() { } private void printlnFormatted(char level, String tag, String message, Throwable t) { System.out.println(format(level, tag, message, t)); } private String format(char level, String tag, String message, Throwable t) { if (t != null) { return String.format(""%c[%s] %s %s:%s"", level, tag, message, t.getClass().getSimpleName(), t.getMessage()); } else { return String.format(""%c[%s] %s"", level, tag, message); } } } ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.ignite.stream.jms11; import java.io.Serializable; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import javax.jms.JMSException; import javax.jms.ObjectMessage; import javax.jms.TextMessage; /** * Test transformers for JmsStreamer tests. * * @author Raul Kripalani */ public class TestTransformers { /** * Returns a transformer for JMS {@link TextMessage}s, capable of extracting many tuples from a single message, * if pipe characters are encountered. * * @return */ public static MessageTransformer forTextMessage() { return new MessageTransformer() { @Override public Map apply(TextMessage message) { final Map answer = new HashMap<>(); String text; try { text = message.getText(); } catch (JMSException e) { e.printStackTrace(); return Collections.emptyMap(); } for (String s : text.split(""\\|"")) { String[] tokens = s.split("",""); answer.put(tokens[0], tokens[1]); } return answer; } }; } /** * Returns a transformer for JMS {@link ObjectMessage}s, capable of extracting many tuples from a single message, * if the payload is a {@link Collection}. * * @return */ public static MessageTransformer forObjectMessage() { return new MessageTransformer() { @Override @SuppressWarnings(""unchecked"") public Map apply(ObjectMessage message) { Object object; try { object = message.getObject(); } catch (JMSException e) { e.printStackTrace(); return Collections.emptyMap(); } final Map answer = new HashMap<>(); if (object instanceof Collection) { for (TestObject to : (Collection)object) answer.put(to.getKey(), to.getValue()); } else if (object instanceof TestObject) { TestObject to = (TestObject)object; answer.put(to.getKey(), to.getValue()); } return answer; } }; } public static MessageTransformer generateNoEntries() { return new MessageTransformer() { @Override public Map apply(TextMessage message) { return null; } }; } public static class TestObject implements Serializable { private static final long serialVersionUID = -7332027566186690945L; private String key; private String value; public TestObject(String key, String value) { this.key = key; this.value = value; } public String getKey() { return key; } public String getValue() { return value; } } } ",0 " * * 1. first scan to find the max height index * 2. then scan from left up to max index and find all the water units up to the max height * 3. then scan from right down to max index and find all the water units down to the max height * 4. return the sum of those above two * * reference: https://discuss.leetcode.com/topic/22976/my-accepted-java-solution */ public int trap(int[] height) { if (height == null || height.length <= 2) { return 0; } int max = height[0]; int maxIndex = 0; for (int i = 0; i < height.length; i++) { if (height[i] > max) { max = height[i]; maxIndex = i; } } int water = 0; int leftMax = height[0]; for (int i = 0; i < maxIndex; i++) { if (height[i] > leftMax) { leftMax = height[i]; } else { water += leftMax - height[i]; } } int rightMax = height[height.length - 1]; for (int i = height.length - 1; i > maxIndex; i--) { if (height[i] > rightMax) { rightMax = height[i]; } else { water += rightMax - height[i]; } } return water; } } }",0 "port org.joml.Matrix4f; import org.joml.Vector3f; import org.joml.Vector4f; import net.seabears.game.entities.Entity; import net.seabears.game.entities.Light; import net.seabears.game.shadows.ShadowShader; import net.seabears.game.textures.ModelTexture; import net.seabears.game.util.TransformationMatrix; public class NormalMappingShader extends ShadowShader { public static final int TEXTURE_SHADOW = 2; private final int lights; private int locationClippingPlane; private int locationModelTexture; private int locationNormalMap; private int[] locationLightAttenuation; private int[] locationLightColor; private int[] locationLightPosition; private int locationProjectionMatrix; private int locationReflectivity; private int locationShineDamper; private int locationSkyColor; private int locationTextureRows; private int locationTextureOffset; private int locationTransformationMatrix; private int locationViewMatrix; public NormalMappingShader(int lights) throws IOException { super(SHADER_ROOT + ""normalmap/"", TEXTURE_SHADOW); this.lights = lights; } @Override protected void bindAttributes() { super.bindAttribute(ATTR_POSITION, ""position""); super.bindAttribute(ATTR_TEXTURE, ""textureCoords""); super.bindAttribute(ATTR_NORMAL, ""normal""); super.bindAttribute(ATTR_TANGENT, ""tangent""); } @Override protected void getAllUniformLocations() { super.getAllUniformLocations(); locationClippingPlane = super.getUniformLocation(""clippingPlane""); locationModelTexture = super.getUniformLocation(""modelTexture""); locationNormalMap = super.getUniformLocation(""normalMap""); locationLightAttenuation = super.getUniformLocations(""attenuation"", lights); locationLightColor = super.getUniformLocations(""lightColor"", lights); locationLightPosition = super.getUniformLocations(""lightPosition"", lights); locationProjectionMatrix = super.getUniformLocation(""projectionMatrix""); locationReflectivity = super.getUniformLocation(""reflectivity""); locationShineDamper = super.getUniformLocation(""shineDamper""); locationSkyColor = super.getUniformLocation(""skyColor""); locationTextureRows = super.getUniformLocation(""textureRows""); locationTextureOffset = super.getUniformLocation(""textureOffset""); locationTransformationMatrix = super.getUniformLocation(""transformationMatrix""); locationViewMatrix = super.getUniformLocation(""viewMatrix""); } public void loadClippingPlane(Vector4f plane) { this.loadFloat(locationClippingPlane, plane); } public void loadLights(final List lights, Matrix4f viewMatrix) { range(0, this.lights) .forEach(i -> loadLight(i < lights.size() ? lights.get(i) : OFF_LIGHT, i, viewMatrix)); } private void loadLight(Light light, int index, Matrix4f viewMatrix) { super.loadFloat(locationLightAttenuation[index], light.getAttenuation()); super.loadFloat(locationLightColor[index], light.getColor()); super.loadFloat(locationLightPosition[index], getEyeSpacePosition(light.getPosition(), viewMatrix)); } public void loadProjectionMatrix(Matrix4f matrix) { super.loadMatrix(locationProjectionMatrix, matrix); } public void loadSky(Vector3f color) { super.loadFloat(locationSkyColor, color); } public void loadNormalMap() { // refers to texture units // TEXTURE_SHADOW occupies one unit super.loadInt(locationModelTexture, 0); super.loadInt(locationNormalMap, 1); } public void loadTexture(ModelTexture texture) { super.loadFloat(locationReflectivity, texture.getReflectivity()); super.loadFloat(locationShineDamper, texture.getShineDamper()); super.loadFloat(locationTextureRows, texture.getRows()); } public void loadEntity(Entity entity) { loadTransformationMatrix( new TransformationMatrix(entity.getPosition(), entity.getRotation(), entity.getScale()) .toMatrix()); super.loadFloat(locationTextureOffset, entity.getTextureOffset()); } public void loadTransformationMatrix(Matrix4f matrix) { super.loadMatrix(locationTransformationMatrix, matrix); } public void loadViewMatrix(Matrix4f matrix) { super.loadMatrix(locationViewMatrix, matrix); } private static Vector3f getEyeSpacePosition(Vector3f position, Matrix4f viewMatrix) { final Vector4f eyeSpacePos = new Vector4f(position.x, position.y, position.z, 1.0f); viewMatrix.transform(eyeSpacePos); return new Vector3f(eyeSpacePos.x, eyeSpacePos.y, eyeSpacePos.z); } } ",0 "ct: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QNEARFIELDTAGTYPE3SYMBIAN_H #define QNEARFIELDTAGTYPE3SYMBIAN_H #include #include ""symbian/nearfieldtagimpl_symbian.h"" #include ""symbian/nearfieldndeftarget_symbian.h"" QT_BEGIN_HEADER QTM_BEGIN_NAMESPACE class QNearFieldTagType3Symbian : public QNearFieldTagType3, private QNearFieldTagImpl { Q_OBJECT public: explicit QNearFieldTagType3Symbian(CNearFieldNdefTarget *tag, QObject *parent = 0); ~QNearFieldTagType3Symbian(); virtual QByteArray uid() const; void setAccessMethods(const QNearFieldTarget::AccessMethods& accessMethods) { _setAccessMethods(accessMethods); } QNearFieldTarget::AccessMethods accessMethods() const { return _accessMethods(); } bool hasNdefMessage(); RequestId readNdefMessages(); RequestId writeNdefMessages(const QList &messages); #if 0 quint16 systemCode(); QList services(); int serviceMemorySize(quint16 serviceCode); RequestId serviceData(quint16 serviceCode); RequestId writeServiceData(quint16 serviceCode, const QByteArray &data); #endif RequestId check(const QMap > &serviceBlockList); RequestId update(const QMap > &serviceBlockList, const QByteArray &data); bool isProcessingCommand() const { return _isProcessingRequest(); } RequestId sendCommand(const QByteArray &command); RequestId sendCommands(const QList &commands); bool waitForRequestCompleted(const RequestId &id, int msecs = 5000); private: const QByteArray& getIDm(); QByteArray serviceBlockList2CmdParam(const QMap > &serviceBlockList, quint8& numberOfBlocks, bool isCheckCommand); QMap > cmd2ServiceBlockList(const QByteArray& cmd); QMap checkResponse2ServiceBlockList(const QMap > &serviceBlockList, const QByteArray& response); void handleTagOperationResponse(const RequestId &id, const QByteArray &command, const QByteArray &response, bool emitRequestCompleted); QVariant decodeResponse(const QByteArray & command, const QByteArray &response); private: QByteArray mIDm; friend class QNearFieldTagImpl; }; QTM_END_NAMESPACE typedef QMap checkResponseType; Q_DECLARE_METATYPE(checkResponseType) QT_END_HEADER #endif // QNEARFIELDTAGTYPE3SYMBIAN_H ",0 " 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. *@ @import iht.utils.tnrb.TnrbHelperFixture @import iht.models.application.ApplicationDetails @import iht.config.AppConfig @import iht.utils._ @this( implicit val appConfig: AppConfig, ihtMainTemplateApplication: iht_main_template_application, form: FormWithCSRF ) @( kickoutReason: String, applicationDetails: ApplicationDetails, applicationLastSection: Option[String], applicationLastID: Option[String], summaryParameter1:String, deceasedName: String)(implicit request:Request[_], messages: Messages) @ihtMainTemplateApplication(title = Messages(""iht.notPossibleToUseService""), browserTitle = Some(Messages(""iht.notPossibleToUseService""))) {

@ApplicationKickOutSummaryHelper.summary.find( _._1 == kickoutReason).map{summary =>

@TnrbHelperFixture().mutateContent(Messages(summary._2, summaryParameter1, deceasedName), messages.lang.code)

} @if(ApplicationKickOutSummaryHelper.summaryBullets(kickoutReason).nonEmpty) {
    @ApplicationKickOutSummaryHelper.summaryBullets(kickoutReason).map{txt=>
  • @txt
  • }
}
@if(ApplicationKickOutHelper.shoulddisplayEstateValueAndThreshold(kickoutReason)){
@Messages(""page.iht.application.overview.value"")
@if(applicationDetails.allAssets.isDefined || applicationDetails.allGifts.isDefined || applicationDetails.allLiabilities.isDefined || applicationDetails.propertyList.nonEmpty) { @if(applicationDetails.allExemptions.isDefined && applicationDetails.totalExemptionsValue > 0) { £@CommonHelper.numberWithCommas(if(applicationDetails.totalNetValue<0) 0 else applicationDetails.totalNetValue) } else { £@CommonHelper.numberWithCommas(applicationDetails.totalValue) } }
@Messages(""iht.estateReport.ihtThreshold"")
@Messages(""site.threshold.value.display"")
}

@Messages(""iht.nextSteps"")

@AppKickoutFixture().nextSteps1.find( _._1 == kickoutReason).map{nextSteps1=>

@nextSteps1._2

} @AppKickoutFixture().nextSteps2.find( _._1 == kickoutReason).map{nextSteps2=>

@nextSteps2._2@Messages(""iht.comma"") @ApplicationKickOutHelper.returnLinkUrl( kickoutReason, applicationDetails.ihtRef.fold("""")(identity), applicationLastSection, applicationLastID ).map{ url=> @AppKickoutFixture().nextSteps2ReturnLinkText.find( _._1 == kickoutReason).map{linkText => @linkText._2}. }

}
@form(action = iht.controllers.application.routes.KickoutAppController.onSubmit) {

}
} ",0 " 2015 Kanstantsin Shautsou * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package hudson.triggers; import antlr.ANTLRException; import com.google.common.base.Preconditions; import hudson.Extension; import hudson.Util; import hudson.console.AnnotatedLargeText; import hudson.model.AbstractBuild; import hudson.model.AbstractProject; import hudson.model.Action; import hudson.model.AdministrativeMonitor; import hudson.model.Cause; import hudson.model.CauseAction; import hudson.model.Item; import hudson.model.Run; import hudson.scm.SCM; import hudson.scm.SCMDescriptor; import hudson.util.FlushProofOutputStream; import hudson.util.FormValidation; import hudson.util.IOUtils; import hudson.util.NamingThreadFactory; import hudson.util.SequentialExecutionQueue; import hudson.util.StreamTaskListener; import hudson.util.TimeUnit2; import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.nio.charset.Charset; import java.text.DateFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.logging.Level; import java.util.logging.Logger; import jenkins.model.Jenkins; import jenkins.model.RunAction2; import jenkins.scm.SCMDecisionHandler; import jenkins.triggers.SCMTriggerItem; import jenkins.util.SystemProperties; import net.sf.json.JSONObject; import org.apache.commons.io.FileUtils; import org.apache.commons.jelly.XMLOutput; import org.jenkinsci.Symbol; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.DoNotUse; import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import static java.util.logging.Level.WARNING; /** * {@link Trigger} that checks for SCM updates periodically. * * You can add UI elements under the SCM section by creating a * config.jelly or config.groovy in the resources area for * your class that inherits from SCMTrigger and has the * @{@link hudson.model.Extension} annotation. The UI should * be wrapped in an f:section element to denote it. * * @author Kohsuke Kawaguchi */ public class SCMTrigger extends Trigger { private boolean ignorePostCommitHooks; public SCMTrigger(String scmpoll_spec) throws ANTLRException { this(scmpoll_spec, false); } @DataBoundConstructor public SCMTrigger(String scmpoll_spec, boolean ignorePostCommitHooks) throws ANTLRException { super(scmpoll_spec); this.ignorePostCommitHooks = ignorePostCommitHooks; } /** * This trigger wants to ignore post-commit hooks. *

* SCM plugins must respect this and not run this trigger for post-commit notifications. * * @since 1.493 */ public boolean isIgnorePostCommitHooks() { return this.ignorePostCommitHooks; } @Override public void run() { if (job == null) { return; } run(null); } /** * Run the SCM trigger with additional build actions. Used by SubversionRepositoryStatus * to trigger a build at a specific revisionn number. * * @param additionalActions * @since 1.375 */ public void run(Action[] additionalActions) { if (job == null) { return; } DescriptorImpl d = getDescriptor(); LOGGER.fine(""Scheduling a polling for ""+job); if (d.synchronousPolling) { LOGGER.fine(""Running the trigger directly without threading, "" + ""as it's already taken care of by Trigger.Cron""); new Runner(additionalActions).run(); } else { // schedule the polling. // even if we end up submitting this too many times, that's OK. // the real exclusion control happens inside Runner. LOGGER.fine(""scheduling the trigger to (asynchronously) run""); d.queue.execute(new Runner(additionalActions)); d.clogCheck(); } } @Override public DescriptorImpl getDescriptor() { return (DescriptorImpl)super.getDescriptor(); } @Override public Collection getProjectActions() { if (job == null) { return Collections.emptyList(); } return Collections.singleton(new SCMAction()); } /** * Returns the file that records the last/current polling activity. */ public File getLogFile() { return new File(job.getRootDir(),""scm-polling.log""); } @Extension @Symbol(""scm"") public static class DescriptorImpl extends TriggerDescriptor { private static ThreadFactory threadFactory() { return new NamingThreadFactory(Executors.defaultThreadFactory(), ""SCMTrigger""); } /** * Used to control the execution of the polling tasks. *

* This executor implementation has a semantics suitable for polling. Namely, no two threads will try to poll the same project * at once, and multiple polling requests to the same job will be combined into one. Note that because executor isn't aware * of a potential workspace lock between a build and a polling, we may end up using executor threads unwisely --- they * may block. */ private transient final SequentialExecutionQueue queue = new SequentialExecutionQueue(Executors.newSingleThreadExecutor(threadFactory())); /** * Whether the projects should be polled all in one go in the order of dependencies. The default behavior is * that each project polls for changes independently. */ public boolean synchronousPolling = false; /** * Max number of threads for SCM polling. * 0 for unbounded. */ private int maximumThreads; public DescriptorImpl() { load(); resizeThreadPool(); } public boolean isApplicable(Item item) { return SCMTriggerItem.SCMTriggerItems.asSCMTriggerItem(item) != null; } public ExecutorService getExecutor() { return queue.getExecutors(); } /** * Returns true if the SCM polling thread queue has too many jobs * than it can handle. */ public boolean isClogged() { return queue.isStarving(STARVATION_THRESHOLD); } /** * Checks if the queue is clogged, and if so, * activate {@link AdministrativeMonitorImpl}. */ public void clogCheck() { AdministrativeMonitor.all().get(AdministrativeMonitorImpl.class).on = isClogged(); } /** * Gets the snapshot of {@link Runner}s that are performing polling. */ public List getRunners() { return Util.filter(queue.getInProgress(),Runner.class); } // originally List but known to be used only for logging, in which case the instances are not actually cast to SCMedItem anyway public List getItemsBeingPolled() { List r = new ArrayList(); for (Runner i : getRunners()) r.add(i.getTarget()); return r; } public String getDisplayName() { return Messages.SCMTrigger_DisplayName(); } /** * Gets the number of concurrent threads used for polling. * * @return * 0 if unlimited. */ public int getPollingThreadCount() { return maximumThreads; } /** * Sets the number of concurrent threads used for SCM polling and resizes the thread pool accordingly * @param n number of concurrent threads, zero or less means unlimited, maximum is 100 */ public void setPollingThreadCount(int n) { // fool proof if(n<0) n=0; if(n>100) n=100; maximumThreads = n; resizeThreadPool(); } @Restricted(NoExternalUse.class) public boolean isPollingThreadCountOptionVisible() { // unless you have a fair number of projects, this option is likely pointless. // so let's hide this option for new users to avoid confusing them // unless it was already changed // TODO switch to check for SCMTriggerItem return Jenkins.getInstance().getAllItems(AbstractProject.class).size() > 10 || getPollingThreadCount() != 0; } /** * Update the {@link ExecutorService} instance. */ /*package*/ synchronized void resizeThreadPool() { queue.setExecutors( (maximumThreads==0 ? Executors.newCachedThreadPool(threadFactory()) : Executors.newFixedThreadPool(maximumThreads, threadFactory()))); } @Override public boolean configure(StaplerRequest req, JSONObject json) throws FormException { String t = json.optString(""pollingThreadCount"",null); if(t==null || t.length()==0) setPollingThreadCount(0); else setPollingThreadCount(Integer.parseInt(t)); // Save configuration save(); return true; } public FormValidation doCheckPollingThreadCount(@QueryParameter String value) { if (value != null && """".equals(value.trim())) return FormValidation.ok(); return FormValidation.validateNonNegativeInteger(value); } } @Extension public static final class AdministrativeMonitorImpl extends AdministrativeMonitor { private boolean on; public boolean isActivated() { return on; } } /** * Associated with {@link Run} to show the polling log * that triggered that build. * * @since 1.376 */ public static class BuildAction implements RunAction2 { private transient /*final*/ Run run; @Deprecated public transient /*final*/ AbstractBuild build; /** * @since 1.568 */ public BuildAction(Run run) { this.run = run; build = run instanceof AbstractBuild ? (AbstractBuild) run : null; } @Deprecated public BuildAction(AbstractBuild build) { this((Run) build); } /** * @since 1.568 */ public Run getRun() { return run; } /** * Polling log that triggered the build. */ public File getPollingLogFile() { return new File(run.getRootDir(),""polling.log""); } public String getIconFileName() { return ""clipboard.png""; } public String getDisplayName() { return Messages.SCMTrigger_BuildAction_DisplayName(); } public String getUrlName() { return ""pollingLog""; } /** * Sends out the raw polling log output. */ public void doPollingLog(StaplerRequest req, StaplerResponse rsp) throws IOException { rsp.setContentType(""text/plain;charset=UTF-8""); // Prevent jelly from flushing stream so Content-Length header can be added afterwards FlushProofOutputStream out = new FlushProofOutputStream(rsp.getCompressedOutputStream(req)); try { getPollingLogText().writeLogTo(0, out); } finally { IOUtils.closeQuietly(out); } } public AnnotatedLargeText getPollingLogText() { return new AnnotatedLargeText(getPollingLogFile(), Charset.defaultCharset(), true, this); } /** * Used from polling.jelly to write annotated polling log to the given output. */ public void writePollingLogTo(long offset, XMLOutput out) throws IOException { // TODO: resurrect compressed log file support getPollingLogText().writeHtmlTo(offset, out.asWriter()); } @Override public void onAttached(Run r) { // unnecessary, existing constructor does this } @Override public void onLoad(Run r) { run = r; build = run instanceof AbstractBuild ? (AbstractBuild) run : null; } } /** * Action object for job. Used to display the last polling log. */ public final class SCMAction implements Action { public AbstractProject getOwner() { Item item = getItem(); return item instanceof AbstractProject ? ((AbstractProject) item) : null; } /** * @since 1.568 */ public Item getItem() { return job().asItem(); } public String getIconFileName() { return ""clipboard.png""; } public String getDisplayName() { Set> descriptors = new HashSet>(); for (SCM scm : job().getSCMs()) { descriptors.add(scm.getDescriptor()); } return descriptors.size() == 1 ? Messages.SCMTrigger_getDisplayName(descriptors.iterator().next().getDisplayName()) : Messages.SCMTrigger_BuildAction_DisplayName(); } public String getUrlName() { return ""scmPollLog""; } public String getLog() throws IOException { return Util.loadFile(getLogFile()); } /** * Writes the annotated log to the given output. * @since 1.350 */ public void writeLogTo(XMLOutput out) throws IOException { new AnnotatedLargeText(getLogFile(),Charset.defaultCharset(),true,this).writeHtmlTo(0,out.asWriter()); } } private static final Logger LOGGER = Logger.getLogger(SCMTrigger.class.getName()); /** * {@link Runnable} that actually performs polling. */ public class Runner implements Runnable { /** * When did the polling start? */ private volatile long startTime; private Action[] additionalActions; public Runner() { this(null); } public Runner(Action[] actions) { Preconditions.checkNotNull(job, ""Runner can't be instantiated when job is null""); if (actions == null) { additionalActions = new Action[0]; } else { additionalActions = actions; } } /** * Where the log file is written. */ public File getLogFile() { return SCMTrigger.this.getLogFile(); } /** * For which {@link Item} are we polling? * @since 1.568 */ public SCMTriggerItem getTarget() { return job(); } /** * When was this polling started? */ public long getStartTime() { return startTime; } /** * Human readable string of when this polling is started. */ public String getDuration() { return Util.getTimeSpanString(System.currentTimeMillis()-startTime); } private boolean runPolling() { try { // to make sure that the log file contains up-to-date text, // don't do buffering. StreamTaskListener listener = new StreamTaskListener(getLogFile()); try { PrintStream logger = listener.getLogger(); long start = System.currentTimeMillis(); logger.println(""Started on ""+ DateFormat.getDateTimeInstance().format(new Date())); boolean result = job().poll(listener).hasChanges(); logger.println(""Done. Took ""+ Util.getTimeSpanString(System.currentTimeMillis()-start)); if(result) logger.println(""Changes found""); else logger.println(""No changes""); return result; } catch (Error | RuntimeException e) { e.printStackTrace(listener.error(""Failed to record SCM polling for ""+job)); LOGGER.log(Level.SEVERE,""Failed to record SCM polling for ""+job,e); throw e; } finally { listener.close(); } } catch (IOException e) { LOGGER.log(Level.SEVERE,""Failed to record SCM polling for ""+job,e); return false; } } public void run() { if (job == null) { return; } // we can pre-emtively check the SCMDecisionHandler instances here // note that job().poll(listener) should also check this SCMDecisionHandler veto = SCMDecisionHandler.firstShouldPollVeto(job); if (veto != null) { try (StreamTaskListener listener = new StreamTaskListener(getLogFile())) { listener.getLogger().println( ""Skipping polling on "" + DateFormat.getDateTimeInstance().format(new Date()) + "" due to veto from "" + veto); } catch (IOException e) { LOGGER.log(Level.SEVERE, ""Failed to record SCM polling for "" + job, e); } LOGGER.log(Level.FINE, ""Skipping polling for {0} due to veto from {1}"", new Object[]{job.getFullDisplayName(), veto} ); return; } String threadName = Thread.currentThread().getName(); Thread.currentThread().setName(""SCM polling for ""+job); try { startTime = System.currentTimeMillis(); if(runPolling()) { SCMTriggerItem p = job(); String name = "" #""+p.getNextBuildNumber(); SCMTriggerCause cause; try { cause = new SCMTriggerCause(getLogFile()); } catch (IOException e) { LOGGER.log(WARNING, ""Failed to parse the polling log"",e); cause = new SCMTriggerCause(); } Action[] queueActions = new Action[additionalActions.length + 1]; queueActions[0] = new CauseAction(cause); System.arraycopy(additionalActions, 0, queueActions, 1, additionalActions.length); if (p.scheduleBuild2(p.getQuietPeriod(), queueActions) != null) { LOGGER.info(""SCM changes detected in ""+ job.getFullDisplayName()+"". Triggering ""+name); } else { LOGGER.info(""SCM changes detected in ""+ job.getFullDisplayName()+"". Job is already in the queue""); } } } finally { Thread.currentThread().setName(threadName); } } // as per the requirement of SequentialExecutionQueue, value equality is necessary @Override public boolean equals(Object that) { return that instanceof Runner && job == ((Runner) that)._job(); } private Item _job() {return job;} @Override public int hashCode() { return job.hashCode(); } } @SuppressWarnings(""deprecation"") private SCMTriggerItem job() { return SCMTriggerItem.SCMTriggerItems.asSCMTriggerItem(job); } public static class SCMTriggerCause extends Cause { /** * Only used while ths cause is in the queue. * Once attached to the build, we'll move this into a file to reduce the memory footprint. */ private String pollingLog; private transient Run run; public SCMTriggerCause(File logFile) throws IOException { // TODO: charset of this log file? this(FileUtils.readFileToString(logFile)); } public SCMTriggerCause(String pollingLog) { this.pollingLog = pollingLog; } /** * @deprecated * Use {@link SCMTrigger.SCMTriggerCause#SCMTriggerCause(String)}. */ @Deprecated public SCMTriggerCause() { this(""""); } @Override public void onLoad(Run run) { this.run = run; } @Override public void onAddedTo(Run build) { this.run = build; try { BuildAction a = new BuildAction(build); FileUtils.writeStringToFile(a.getPollingLogFile(),pollingLog); build.replaceAction(a); } catch (IOException e) { LOGGER.log(WARNING,""Failed to persist the polling log"",e); } pollingLog = null; } @Override public String getShortDescription() { return Messages.SCMTrigger_SCMTriggerCause_ShortDescription(); } @Restricted(DoNotUse.class) public Run getRun() { return this.run; } @Override public boolean equals(Object o) { return o instanceof SCMTriggerCause; } @Override public int hashCode() { return 3; } } /** * How long is too long for a polling activity to be in the queue? */ public static long STARVATION_THRESHOLD = SystemProperties.getLong(SCMTrigger.class.getName()+"".starvationThreshold"", TimeUnit2.HOURS.toMillis(1)); } ",0 "enerated by javadoc (version 1.7.0_21) on Sat May 11 22:08:47 BST 2013 --> Uses of Class com.hp.hpl.jena.sparql.lang.sparql_10.TokenMgrError (Apache Jena ARQ)

JavaScript is disabled on your browser.
  • Prev
  • Next

Uses of Class
com.hp.hpl.jena.sparql.lang.sparql_10.TokenMgrError

No usage of com.hp.hpl.jena.sparql.lang.sparql_10.TokenMgrError
  • Prev
  • Next

Licenced under the Apache License, Version 2.0

",0 "========================================== * * Copyright (C) 2006-2011 Serotonin Software Technologies Inc. http://serotoninsoftware.com * @author Matthew Lohbihler * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * When signing a commercial license with Serotonin Software Technologies Inc., * the following extension to GPL is made. A special exception to the GPL is * included to allow you to distribute a combined work that includes BAcnet4J * without being obliged to provide the source code for any proprietary components. */ package com.serotonin.bacnet4j.type.notificationParameters; import com.serotonin.bacnet4j.exception.BACnetException; import com.serotonin.bacnet4j.type.AmbiguousValue; import com.serotonin.bacnet4j.type.Encodable; import com.serotonin.bacnet4j.type.constructed.StatusFlags; import org.free.bacnet4j.util.ByteQueue; public class CommandFailure extends NotificationParameters { private static final long serialVersionUID = 5727410398456093753L; public static final byte TYPE_ID = 3; private final Encodable commandValue; private final StatusFlags statusFlags; private final Encodable feedbackValue; public CommandFailure(Encodable commandValue, StatusFlags statusFlags, Encodable feedbackValue) { this.commandValue = commandValue; this.statusFlags = statusFlags; this.feedbackValue = feedbackValue; } @Override protected void writeImpl(ByteQueue queue) { writeEncodable(queue, commandValue, 0); write(queue, statusFlags, 1); writeEncodable(queue, feedbackValue, 2); } public CommandFailure(ByteQueue queue) throws BACnetException { commandValue = new AmbiguousValue(queue, 0); statusFlags = read(queue, StatusFlags.class, 1); feedbackValue = new AmbiguousValue(queue, 2); } @Override protected int getTypeId() { return TYPE_ID; } public Encodable getCommandValue() { return commandValue; } public StatusFlags getStatusFlags() { return statusFlags; } public Encodable getFeedbackValue() { return feedbackValue; } @Override public int hashCode() { final int PRIME = 31; int result = 1; result = PRIME * result + ((commandValue == null) ? 0 : commandValue.hashCode()); result = PRIME * result + ((feedbackValue == null) ? 0 : feedbackValue.hashCode()); result = PRIME * result + ((statusFlags == null) ? 0 : statusFlags.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final CommandFailure other = (CommandFailure) obj; if (commandValue == null) { if (other.commandValue != null) return false; } else if (!commandValue.equals(other.commandValue)) return false; if (feedbackValue == null) { if (other.feedbackValue != null) return false; } else if (!feedbackValue.equals(other.feedbackValue)) return false; if (statusFlags == null) { if (other.statusFlags != null) return false; } else if (!statusFlags.equals(other.statusFlags)) return false; return true; } } ",0 "). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ #import ""../AmazonServiceRequest.h"" #import ""ElasticLoadBalancingRequest.h"" #import ""ElasticLoadBalancingDescribeInstanceHealthRequest.h"" #import ""ElasticLoadBalancingInstance.h"" /** * Describe Instance Health Request Marshaller */ @interface ElasticLoadBalancingDescribeInstanceHealthRequestMarshaller:NSObject { } +(AmazonServiceRequest *)createRequest:(ElasticLoadBalancingDescribeInstanceHealthRequest *)describeInstanceHealthRequest; @end ",0 "/Foundation.h> #import #define kDeviceErrorDomain @""com.contexthub.device.error"" /** ContextHub Device error codes. */ typedef NS_ENUM(NSInteger, CCHDeviceErrorCode) { /** Device id cannot be nil */ CCHInvalidDeviceIdParameter, /** Alias cannot be nil */ CCHInvalidDeviceAliasParameter, /** Tags cannot be nil */ CCHInvalidDeviceTagsParameter }; /** The CCHDevice class is used work with devices. Structure of device NSDictionary | key | value | | --------- | --------- | | additional_info | NSDictionary of device specific information (not always present) | | alias | alias that is set for the device (not always present) | | device_type | describes the device, often pulled for the user agent | | id | database id for the device | | last_profile | NSDictionary of contextual information from the last time the device was seen by the server | | push_token | push token assigned to the device (not always present) | | tag_string | a comma separated string of the tags associated with the device | | tags | NSArray of tags associated with the device | */ @interface CCHDevice : NSObject /** @return The singleton instance of CCHDevice. */ + (instancetype)sharedInstance; /** @return The vendor device id as UUIDString. */ - (NSString *)deviceId; /** Gets a device from ContextHub using the device Id. @param deviceId The id of the device stored in ContextHub. @param completionHandler Called when the request completes. The block is passed an NSDictionary object that represents the device. If an error occurs, the NSError will be passed to the block. */ - (void)getDeviceWithId:(NSString *)deviceId completionHandler:(void(^)(NSDictionary *device, NSError *error))completionHandler; /** Gets devices from ContextHub using the device alias. @param alias The alias associated with the devices that you are interested in. @param completionHandler Called when the request completes. The block is passed an NSArray of NSDictionary objects that represent the devices. If an error occurs, the NSError will be passed to the block. */ - (void)getDevicesWithAlias:(NSString *)alias completionHandler:(void(^)(NSArray *devices, NSError *error))completionHandler; /** Gets devices from ContextHub using tags. @param tags Tags of the devices that you are interested in. @param completionHandler Called when the request completes. The block is passed an NSArray of NSDictionary objects that represent the devices. If an error occurs, the NSError will be passed to the block. */ - (void)getDevicesWithTags:(NSArray *)tags completionHandler:(void(^)(NSArray *devices, NSError *error))completionHandler; /** Updates the device record on contexthub. @param alias (optional) The alias associated with the device. @param tags (optional) The tags to be applied to the device. @param completionHandler Called when the request completes. The block is passed an NSDictionary object that represents the device. If an error occurs, the NSError will be passed to the block. @note This method updates the data for the current device. The tags and alias that are set here can be used with CCHPush. The tags can also be used with the CCHSubscriptionService. This method gathers meta-data about the device and sends it to ContextHub along with the alias and tags. You can call this method multiple times. */ - (void)setDeviceAlias:(NSString *)alias tags:(NSArray *)tags completionHandler:(void(^)(NSDictionary *device, NSError *error))completionHandler; @end ",0 " content=""width=device-width, initial-scale=1""> Ghana / Health performance (2013) | Global Open Data Index by Open Knowledge
  1. Home
  2. Ghana / Health performance (2013)

Ghana / Health performance (2013)

Sorry

There is no data available for Ghana / Health performance (2013) in the Index.

",0 "taho : http://www.pentaho.com * ******************************************************************************* * * 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. * ******************************************************************************/ package org.pentaho.di.job.entries.deletefolders; import org.pentaho.di.job.entry.validator.AbstractFileValidator; import org.pentaho.di.job.entry.validator.AndValidator; import org.pentaho.di.job.entry.validator.JobEntryValidatorUtils; import java.io.IOException; import java.util.List; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSelectInfo; import org.apache.commons.vfs2.FileSelector; import org.apache.commons.vfs2.FileType; import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.core.CheckResultInterface; import org.pentaho.di.core.Const; import org.pentaho.di.core.util.Utils; import org.pentaho.di.core.Result; import org.pentaho.di.core.RowMetaAndData; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.exception.KettleXMLException; import org.pentaho.di.core.variables.VariableSpace; import org.pentaho.di.core.vfs.KettleVFS; import org.pentaho.di.core.xml.XMLHandler; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job.JobMeta; import org.pentaho.di.job.entry.JobEntryBase; import org.pentaho.di.job.entry.JobEntryInterface; import org.pentaho.di.job.entry.validator.ValidatorContext; import org.pentaho.di.repository.ObjectId; import org.pentaho.di.repository.Repository; import org.pentaho.di.resource.ResourceEntry; import org.pentaho.di.resource.ResourceEntry.ResourceType; import org.pentaho.di.resource.ResourceReference; import org.pentaho.metastore.api.IMetaStore; import org.w3c.dom.Node; /** * This defines a 'delete folders' job entry. * * @author Samatar Hassan * @since 13-05-2008 */ public class JobEntryDeleteFolders extends JobEntryBase implements Cloneable, JobEntryInterface { private static Class PKG = JobEntryDeleteFolders.class; // for i18n purposes, needed by Translator2!! public boolean argFromPrevious; public String[] arguments; private String success_condition; public String SUCCESS_IF_AT_LEAST_X_FOLDERS_DELETED = ""success_when_at_least""; public String SUCCESS_IF_ERRORS_LESS = ""success_if_errors_less""; public String SUCCESS_IF_NO_ERRORS = ""success_if_no_errors""; private String limit_folders; int NrErrors = 0; int NrSuccess = 0; boolean successConditionBroken = false; boolean successConditionBrokenExit = false; int limitFolders = 0; public JobEntryDeleteFolders( String n ) { super( n, """" ); argFromPrevious = false; arguments = null; success_condition = SUCCESS_IF_NO_ERRORS; limit_folders = ""10""; } public JobEntryDeleteFolders() { this( """" ); } public void allocate( int nrFields ) { arguments = new String[nrFields]; } public Object clone() { JobEntryDeleteFolders je = (JobEntryDeleteFolders) super.clone(); if ( arguments != null ) { int nrFields = arguments.length; je.allocate( nrFields ); System.arraycopy( arguments, 0, je.arguments, 0, nrFields ); } return je; } public String getXML() { StringBuilder retval = new StringBuilder( 300 ); retval.append( super.getXML() ); retval.append( "" "" ).append( XMLHandler.addTagValue( ""arg_from_previous"", argFromPrevious ) ); retval.append( "" "" ).append( XMLHandler.addTagValue( ""success_condition"", success_condition ) ); retval.append( "" "" ).append( XMLHandler.addTagValue( ""limit_folders"", limit_folders ) ); retval.append( "" "" ).append( Const.CR ); if ( arguments != null ) { for ( int i = 0; i < arguments.length; i++ ) { retval.append( "" "" ).append( Const.CR ); retval.append( "" "" ).append( XMLHandler.addTagValue( ""name"", arguments[i] ) ); retval.append( "" "" ).append( Const.CR ); if ( parentJobMeta != null ) { parentJobMeta.getNamedClusterEmbedManager().registerUrl( arguments[i] ); } } } retval.append( "" "" ).append( Const.CR ); return retval.toString(); } public void loadXML( Node entrynode, List databases, List slaveServers, Repository rep, IMetaStore metaStore ) throws KettleXMLException { try { super.loadXML( entrynode, databases, slaveServers ); argFromPrevious = ""Y"".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, ""arg_from_previous"" ) ); success_condition = XMLHandler.getTagValue( entrynode, ""success_condition"" ); limit_folders = XMLHandler.getTagValue( entrynode, ""limit_folders"" ); Node fields = XMLHandler.getSubNode( entrynode, ""fields"" ); // How many field arguments? int nrFields = XMLHandler.countNodes( fields, ""field"" ); allocate( nrFields ); // Read them all... for ( int i = 0; i < nrFields; i++ ) { Node fnode = XMLHandler.getSubNodeByNr( fields, ""field"", i ); arguments[i] = XMLHandler.getTagValue( fnode, ""name"" ); } } catch ( KettleXMLException xe ) { throw new KettleXMLException( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.UnableToLoadFromXml"" ), xe ); } } public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List databases, List slaveServers ) throws KettleException { try { argFromPrevious = rep.getJobEntryAttributeBoolean( id_jobentry, ""arg_from_previous"" ); limit_folders = rep.getJobEntryAttributeString( id_jobentry, ""limit_folders"" ); success_condition = rep.getJobEntryAttributeString( id_jobentry, ""success_condition"" ); // How many arguments? int argnr = rep.countNrJobEntryAttributes( id_jobentry, ""name"" ); allocate( argnr ); // Read them all... for ( int a = 0; a < argnr; a++ ) { arguments[a] = rep.getJobEntryAttributeString( id_jobentry, a, ""name"" ); } } catch ( KettleException dbe ) { throw new KettleException( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.UnableToLoadFromRepo"", String .valueOf( id_jobentry ) ), dbe ); } } public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException { try { rep.saveJobEntryAttribute( id_job, getObjectId(), ""arg_from_previous"", argFromPrevious ); rep.saveJobEntryAttribute( id_job, getObjectId(), ""limit_folders"", limit_folders ); rep.saveJobEntryAttribute( id_job, getObjectId(), ""success_condition"", success_condition ); // save the arguments... if ( arguments != null ) { for ( int i = 0; i < arguments.length; i++ ) { rep.saveJobEntryAttribute( id_job, getObjectId(), i, ""name"", arguments[i] ); } } } catch ( KettleDatabaseException dbe ) { throw new KettleException( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.UnableToSaveToRepo"", String .valueOf( id_job ) ), dbe ); } } public Result execute( Result result, int nr ) throws KettleException { List rows = result.getRows(); result.setNrErrors( 1 ); result.setResult( false ); NrErrors = 0; NrSuccess = 0; successConditionBroken = false; successConditionBrokenExit = false; limitFolders = Const.toInt( environmentSubstitute( getLimitFolders() ), 10 ); //Set Embedded NamedCluter MetatStore Provider Key so that it can be passed to VFS if ( parentJobMeta.getNamedClusterEmbedManager() != null ) { parentJobMeta.getNamedClusterEmbedManager() .passEmbeddedMetastoreKey( this, parentJobMeta.getEmbeddedMetastoreProviderKey() ); } if ( argFromPrevious ) { if ( log.isDetailed() ) { logDetailed( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.FoundPreviousRows"", String .valueOf( ( rows != null ? rows.size() : 0 ) ) ) ); } } if ( argFromPrevious && rows != null ) { for ( int iteration = 0; iteration < rows.size() && !parentJob.isStopped(); iteration++ ) { if ( successConditionBroken ) { logError( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.Error.SuccessConditionbroken"", """" + NrErrors ) ); result.setNrErrors( NrErrors ); result.setNrLinesDeleted( NrSuccess ); return result; } RowMetaAndData resultRow = rows.get( iteration ); String args_previous = resultRow.getString( 0, null ); if ( !Utils.isEmpty( args_previous ) ) { if ( deleteFolder( args_previous ) ) { updateSuccess(); } else { updateErrors(); } } else { // empty filename ! logError( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.Error.EmptyLine"" ) ); } } } else if ( arguments != null ) { for ( int i = 0; i < arguments.length && !parentJob.isStopped(); i++ ) { if ( successConditionBroken ) { logError( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.Error.SuccessConditionbroken"", """" + NrErrors ) ); result.setNrErrors( NrErrors ); result.setNrLinesDeleted( NrSuccess ); return result; } String realfilename = environmentSubstitute( arguments[i] ); if ( !Utils.isEmpty( realfilename ) ) { if ( deleteFolder( realfilename ) ) { updateSuccess(); } else { updateErrors(); } } else { // empty filename ! logError( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.Error.EmptyLine"" ) ); } } } if ( log.isDetailed() ) { logDetailed( ""======================================="" ); logDetailed( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.Log.Info.NrError"", """" + NrErrors ) ); logDetailed( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.Log.Info.NrDeletedFolders"", """" + NrSuccess ) ); logDetailed( ""======================================="" ); } result.setNrErrors( NrErrors ); result.setNrLinesDeleted( NrSuccess ); if ( getSuccessStatus() ) { result.setResult( true ); } return result; } private void updateErrors() { NrErrors++; if ( checkIfSuccessConditionBroken() ) { // Success condition was broken successConditionBroken = true; } } private boolean checkIfSuccessConditionBroken() { boolean retval = false; if ( ( NrErrors > 0 && getSuccessCondition().equals( SUCCESS_IF_NO_ERRORS ) ) || ( NrErrors >= limitFolders && getSuccessCondition().equals( SUCCESS_IF_ERRORS_LESS ) ) ) { retval = true; } return retval; } private void updateSuccess() { NrSuccess++; } private boolean getSuccessStatus() { boolean retval = false; if ( ( NrErrors == 0 && getSuccessCondition().equals( SUCCESS_IF_NO_ERRORS ) ) || ( NrSuccess >= limitFolders && getSuccessCondition().equals( SUCCESS_IF_AT_LEAST_X_FOLDERS_DELETED ) ) || ( NrErrors <= limitFolders && getSuccessCondition().equals( SUCCESS_IF_ERRORS_LESS ) ) ) { retval = true; } return retval; } private boolean deleteFolder( String foldername ) { boolean rcode = false; FileObject filefolder = null; try { filefolder = KettleVFS.getFileObject( foldername, this ); if ( filefolder.exists() ) { // the file or folder exists if ( filefolder.getType() == FileType.FOLDER ) { // It's a folder if ( log.isDetailed() ) { logDetailed( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.ProcessingFolder"", foldername ) ); } // Delete Files int Nr = filefolder.delete( new TextFileSelector() ); if ( log.isDetailed() ) { logDetailed( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.TotalDeleted"", foldername, String .valueOf( Nr ) ) ); } rcode = true; } else { // Error...This file is not a folder! logError( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.Error.NotFolder"" ) ); } } else { // File already deleted, no reason to try to delete it if ( log.isBasic() ) { logBasic( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.FolderAlreadyDeleted"", foldername ) ); } rcode = true; } } catch ( Exception e ) { logError( BaseMessages.getString( PKG, ""JobEntryDeleteFolders.CouldNotDelete"", foldername, e.getMessage() ), e ); } finally { if ( filefolder != null ) { try { filefolder.close(); } catch ( IOException ex ) { // Ignore } } } return rcode; } private class TextFileSelector implements FileSelector { public boolean includeFile( FileSelectInfo info ) { return true; } public boolean traverseDescendents( FileSelectInfo info ) { return true; } } public void setPrevious( boolean argFromPrevious ) { this.argFromPrevious = argFromPrevious; } public boolean evaluates() { return true; } public void check( List remarks, JobMeta jobMeta, VariableSpace space, Repository repository, IMetaStore metaStore ) { boolean res = JobEntryValidatorUtils.andValidator().validate( this, ""arguments"", remarks, AndValidator.putValidators( JobEntryValidatorUtils.notNullValidator() ) ); if ( !res ) { return; } ValidatorContext ctx = new ValidatorContext(); AbstractFileValidator.putVariableSpace( ctx, getVariables() ); AndValidator.putValidators( ctx, JobEntryValidatorUtils.notNullValidator(), JobEntryValidatorUtils.fileExistsValidator() ); for ( int i = 0; i < arguments.length; i++ ) { JobEntryValidatorUtils.andValidator().validate( this, ""arguments["" + i + ""]"", remarks, ctx ); } } public List getResourceDependencies( JobMeta jobMeta ) { List references = super.getResourceDependencies( jobMeta ); if ( arguments != null ) { ResourceReference reference = null; for ( int i = 0; i < arguments.length; i++ ) { String filename = jobMeta.environmentSubstitute( arguments[i] ); if ( reference == null ) { reference = new ResourceReference( this ); references.add( reference ); } reference.getEntries().add( new ResourceEntry( filename, ResourceType.FILE ) ); } } return references; } public boolean isArgFromPrevious() { return argFromPrevious; } public String[] getArguments() { return arguments; } public void setSuccessCondition( String success_condition ) { this.success_condition = success_condition; } public String getSuccessCondition() { return success_condition; } public void setLimitFolders( String limit_folders ) { this.limit_folders = limit_folders; } public String getLimitFolders() { return limit_folders; } } ",0 "Backend\App\Action { /** @var \Magento\Framework\App\Request\DataPersistorInterface */ protected $dataPersistor; /** @var \PandaGroup\StoreLocator\Model\RegionsData */ protected $regionsData; /** @var \PandaGroup\StoreLocator\Model\States */ protected $states; /** @var \PandaGroup\StoreLocator\Model\StatesFactory */ protected $statesFactory; /** @var \PandaGroup\StoreLocator\Logger\Logger */ protected $logger; public function __construct( \Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\App\Request\DataPersistorInterface $dataPersistor, \PandaGroup\StoreLocator\Model\RegionsData $regionsData, \PandaGroup\StoreLocator\Model\States $states, \PandaGroup\StoreLocator\Model\StatesFactory $statesFactory, \PandaGroup\StoreLocator\Logger\Logger $logger ) { $this->dataPersistor = $dataPersistor; $this->regionsData = $regionsData; $this->states = $states; $this->statesFactory = $statesFactory; $this->logger = $logger; parent::__construct($context); } public function execute() { /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultRedirectFactory->create(); $data = $this->getRequest()->getPostValue(); if ($data) { $this->logger->info('Start saving new store/edit exist store.'); $id = (int) $this->getRequest()->getParam('id'); $stateIdFromStatesDataSource = $this->getRequest()->getPostValue('state_source_id'); $nameFromStatesDataSource = $this->regionsData->load($stateIdFromStatesDataSource)->getData('name'); if (true === empty($nameFromStatesDataSource)) { // Empty names of countries states which aren't any states $nameFromStatesDataSource = $data['country']; } $newStateIdFromStoreLocatorStates = $this->states->addNewRegion( $stateIdFromStatesDataSource, $nameFromStatesDataSource, '', $data['country'] ); $data['state_id'] = $newStateIdFromStoreLocatorStates; /** @var \PandaGroup\StoreLocator\Model\StoreLocator $model */ $model = $this->_objectManager->create('PandaGroup\StoreLocator\Model\StoreLocator')->load($id); if (!$model->getId() && $id) { $this->messageManager->addErrorMessage(__('This store no longer exists.')); return $resultRedirect->setPath('*/*/'); } if ($data['storelocator_id'] === '') { $data['storelocator_id'] = null; // Bug with saving new store } $data['rewrite_request_path'] = $this->toSafeUrl($data['name']); $data['state'] = null; $data['link'] = null; if (true === empty($data['fax'])) { $data['fax'] = null; } if (true === empty($data['image_icon'])) { $data['image_icon'] = null; } $data['monday_open_break'] = $data['monday_open']; $data['monday_close_break'] = $data['monday_open']; $data['tuesday_open_break'] = $data['tuesday_open']; $data['tuesday_close_break'] = $data['tuesday_open']; $data['wednesday_open_break'] = $data['wednesday_open']; $data['wednesday_close_break'] = $data['wednesday_open']; $data['thursday_open_break'] = $data['thursday_open']; $data['thursday_close_break'] = $data['thursday_open']; $data['friday_open_break'] = $data['friday_open']; $data['friday_close_break'] = $data['friday_open']; $data['saturday_open_break'] = $data['saturday_open']; $data['saturday_close_break'] = $data['saturday_open']; $data['sunday_open_break'] = $data['sunday_open']; $data['sunday_close_break'] = $data['sunday_open']; $model->setData($data); try { $model->getResource()->save($model); $this->messageManager->addSuccessMessage(__('You saved the store.')); $this->logger->info(' Saving new store/edit exist store was successful.'); $this->dataPersistor->clear('storelocator'); if ($this->getRequest()->getParam('back')) { $this->logger->info('Finish saving new store/edit exist store.'); return $resultRedirect->setPath('*/*/edit', ['id' => $model->getId()]); } $this->logger->info('Finish saving new store/edit exist store.'); return $resultRedirect->setPath('*/*/'); } catch (LocalizedException $e) { $this->messageManager->addErrorMessage($e->getMessage()); $this->logger->error(' Error while saving new store/edit exist store.', $e->getMessage()); } catch (\Exception $e) { $this->messageManager->addExceptionMessage($e, __('Something went wrong while saving the store.')); $this->logger->error(' Error while saving new store/edit exist store.', $e->getMessage()); } $this->dataPersistor->set('storelocator', $data); $this->logger->info('Finish saving new store/edit exist store.'); return $resultRedirect->setPath('*/*/edit', ['storelocator_id' => $this->getRequest()->getParam('storelocator_id')]); } return $resultRedirect->setPath('*/*/'); } /** * @param $str * @param array $replace * @param string $delimiter * @return mixed|string */ protected function toSafeUrl($str, $replace=array(), $delimiter='-') { $baseStr = $str; if( !empty($replace) ) { $str = str_replace((array)$replace, ' ', $str); } $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str); $clean = preg_replace(""/[^a-zA-Z0-9\/_|+ -]/"", '', $clean); $clean = strtolower(trim($clean, '-')); $clean = preg_replace(""/[\/_|+ -]+/"", $delimiter, $clean); $this->logger->info(' Store Name was replaced by safe url link: '.$baseStr.'->'.$clean); return $clean; } } ",0 "a in CSS -->

Hello World!

",0 "equestPacket extends PEPacket { const NETWORK_ID = Info120::COMMAND_REQUEST_PACKET; const PACKET_NAME = ""COMMAND_REQUEST_PACKET""; const TYPE_PLAYER = 0; const TYPE_COMMAND_BLOCK = 1; const TYPE_MINECART_COMMAND_BLOCK = 2; const TYPE_DEV_CONSOLE = 3; const TYPE_AUTOMATION_PLAYER = 4; const TYPE_CLIENT_AUTOMATION = 5; const TYPE_DEDICATED_SERVER = 6; const TYPE_ENTITY = 7; const TYPE_VIRTUAL = 8; const TYPE_GAME_ARGUMENT = 9; const TYPE_INTERNAL = 10; /** @var string */ public $command = ''; /** @var unsigned integer */ public $commandType = self::TYPE_PLAYER; /** @var string */ public $requestId = ''; /** @var integer */ public $playerId = ''; public function decode($playerProtocol) { $this->getHeader($playerProtocol); $this->command = $this->getString(); $this->commandType = $this->getVarInt(); $this->requestId = $this->getString(); if ($this->commandType == self::TYPE_DEV_CONSOLE) { $this->playerId = $this->getSignedVarInt(); } } public function encode($playerProtocol) { } } ",0 "ition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} */ class Configuration implements ConfigurationInterface { /** * {@inheritdoc} */ public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('acme_twig'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for // more information on that topic. return $treeBuilder; } } ",0 "ds Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); // line 1 try { $this->parent = $this->env->loadTemplate(""FOSUserBundle::layout.html.twig""); } catch (Twig_Error_Loader $e) { $e->setTemplateFile($this->getTemplateName()); $e->setTemplateLine(1); throw $e; } $this->blocks = array( 'fos_user_content' => array($this, 'block_fos_user_content'), ); } protected function doGetParent(array $context) { return ""FOSUserBundle::layout.html.twig""; } protected function doDisplay(array $context, array $blocks = array()) { $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 3 public function block_fos_user_content($context, array $blocks = array()) { // line 4 $this->env->loadTemplate(""FOSUserBundle:Registration:register_content.html.twig"")->display($context); } public function getTemplateName() { return ""FOSUserBundle:Registration:register.html.twig""; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 39 => 4, 36 => 3, 11 => 1,); } } ",0 "erms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. obdgpslogger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with obdgpslogger. If not, see . */ /** \file \brief OBD service commands */ #include ""obdservicecommands.h"" #include #include #include struct obdservicecmd *obdGetCmdForColumn(const char *db_column) { int i; int numrows = sizeof(obdcmds_mode1)/sizeof(obdcmds_mode1[0]); for(i=0;idb_column) { continue; } if(0 == strcmp(db_column,o->db_column)) { return o; } } return NULL; } /// O(log(n)) PID finder /** Profiling, it usually ends up slower than the linear one, which is because we're normally in the lower end of the PID scale and the linear one is much simpler */ static struct obdservicecmd *obdGetCmdForPID_recursive(const unsigned int pid, const int first_idx, const int last_idx) { // printf(""%i %i\n"", first_idx, last_idx); // const unsigned int first_pid = obdcmds_mode1[first_idx].cmdid; const unsigned int last_pid = obdcmds_mode1[last_idx].cmdid; // if(pid == first_pid) return &obdcmds_mode1[first_idx]; if(pid == last_pid) return &obdcmds_mode1[last_idx]; if(first_idx >= last_idx) { return NULL; } int middle_idx = (last_idx + first_idx)/2; const unsigned int middle_pid = obdcmds_mode1[middle_idx].cmdid; if(pid == middle_pid) return &obdcmds_mode1[middle_idx]; if(middle_pid < pid) { return obdGetCmdForPID_recursive(pid, middle_idx+1, last_idx-1); } else { return obdGetCmdForPID_recursive(pid, first_idx, middle_idx-1); } } struct obdservicecmd *obdGetCmdForPID(const unsigned int pid) { int i; int numrows = sizeof(obdcmds_mode1)/sizeof(obdcmds_mode1[0]); for(i=0;icmdid) { return o; } } return NULL; // return obdGetCmdForPID_recursive(pid, 0, sizeof(obdcmds_mode1)/sizeof(obdcmds_mode1[0])); } int obderrconvert_r(char *buf, int n, unsigned int A, unsigned int B) { unsigned int partcode = (A>>4)&0x0F; unsigned int numbercode = 0; char strpartcode; switch(partcode) { // Powertrain codes case 0x00: case 0x01: case 0x02: case 0x03: strpartcode = 'P'; numbercode = partcode; break; // Chassis codes case 0x04: case 0x05: case 0x06: case 0x07: strpartcode = 'C'; numbercode = partcode-4; break; // Body codes case 0x08: case 0x09: case 0x0A: case 0x0B: strpartcode = 'B'; numbercode = partcode-8; break; // Network codes case 0x0C: case 0x0D: case 0x0E: case 0x0F: strpartcode = 'U'; numbercode = partcode-12; break; default: fprintf(stderr, ""Could not decode error code.\n""); return 0; break; } return snprintf(buf, n, ""%c%u%01X%02X"", strpartcode, numbercode, A&0x0F, B); } const char *obderrconvert(unsigned int A, unsigned int B) { static char strerr[6]; // Letter, four digits, \0 strerr[0] = '\0'; obderrconvert_r(strerr, sizeof(strerr), A, B); return strerr; } ",0 "tylesheet"" type=""text/css"" href=""../css/style.css"">

Monroe puts in 24, Knicks defeat the Pistons 121 to 115


by NBANLP Recap Generator



Greg Monroe recorded 24 points for the Pistons. Andrea Bargnani contributed well to the Knicks total, recording 23 points. The Pistons largest lead was by 18 with 3 minutes remaining in the 2nd.

Greg put up 24 points for the Pistons in a good scoring contribution. Monroe contributed 2 assists and 13 rebounds.

Andrea made contributions in scoring with 23 points for the Knicks. Bargnani got 4 assists and 12 rebounds for the Knicks.

The Pistons were up by as much as 18 points in the 2nd with a 51-33 lead.

Drummond fouled out with 6:03 remaining in double overtime.

Galloway recorded his last foul with 6:00 left in double overtime.

Smith recorded his last foul with 6:00 remaining in double overtime.

This result puts Pistons at 23-35 for the season, while the Knicks are 11-45. The Pistons have lost their last 2 games.

Andre Drummond, Reggie Jackson, and Kentavious Caldwell-Pope combined for 46 points. Each scoring 15, 14, and 17 points respectively. Drummond recorded 1 assists and 15 rebounds for the Pistons. Jackson got 5 assists and 5 rebounds for the Pistons. Caldwell-Pope got 3 assists and 6 rebounds for the Pistons. Greg led the Pistons putting up 24 points, 2 assists, and 13 rebounds. Andrea led the Knicks putting up a total 23 points, 4 assists, and 12 rebounds.

",0 " 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. */ package org.optaplanner.benchmark.impl.statistic.bestscore; import java.util.List; import org.optaplanner.benchmark.config.statistic.ProblemStatisticType; import org.optaplanner.benchmark.impl.result.SubSingleBenchmarkResult; import org.optaplanner.benchmark.impl.statistic.ProblemBasedSubSingleStatistic; import org.optaplanner.core.api.domain.solution.Solution; import org.optaplanner.core.api.solver.Solver; import org.optaplanner.core.api.solver.event.BestSolutionChangedEvent; import org.optaplanner.core.api.solver.event.SolverEventListener; import org.optaplanner.core.impl.score.definition.ScoreDefinition; public class BestScoreSubSingleStatistic extends ProblemBasedSubSingleStatistic { private final BestScoreSubSingleStatisticListener listener; public BestScoreSubSingleStatistic(SubSingleBenchmarkResult subSingleBenchmarkResult) { super(subSingleBenchmarkResult, ProblemStatisticType.BEST_SCORE); listener = new BestScoreSubSingleStatisticListener(); } // ************************************************************************ // Lifecycle methods // ************************************************************************ public void open(Solver solver) { solver.addEventListener(listener); } public void close(Solver solver) { solver.removeEventListener(listener); } private class BestScoreSubSingleStatisticListener implements SolverEventListener { public void bestSolutionChanged(BestSolutionChangedEvent event) { pointList.add(new BestScoreStatisticPoint( event.getTimeMillisSpent(), event.getNewBestSolution().getScore())); } } // ************************************************************************ // CSV methods // ************************************************************************ @Override protected String getCsvHeader() { return BestScoreStatisticPoint.buildCsvLine(""timeMillisSpent"", ""score""); } @Override protected BestScoreStatisticPoint createPointFromCsvLine(ScoreDefinition scoreDefinition, List csvLine) { return new BestScoreStatisticPoint(Long.valueOf(csvLine.get(0)), scoreDefinition.parseScore(csvLine.get(1))); } } ",0 "at is available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you are unable to obtain it through the world-wide-web, please * send an email to license@magento.com and you will be sent a copy. * * @package Campaignmonitor_Createsend * @copyright Copyright (c) 2015 Campaign Monitor (https://www.campaignmonitor.com/) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Campaignmonitor_Createsend_Model_Config_ExampleSegments { /** * Returns Example Segments to be created in Campaign Monitor * * The keys of the return array correspond to the custom field(s) that are required for * creating the example segment. * * The array keys should be in the format: [ :] [, [...]] * The Rule name along with the colon (:) can be omitted if the required fields combination is unique. * * The required fields will be displayed to the user along with the error message * when the segment creation results in a CODE_INVALID_SEGMENT_RULES error * (happens when custom fields are non-existent) to let the user know * which fields are missing. * * See Campaign Monitor API for segment definition format: * * @link https://www.campaignmonitor.com/api/segments/ * * @return array */ public function getExampleSegments() { /** @var Campaignmonitor_Createsend_Model_Api $api */ $api = Mage::getModel('createsend/api'); /** @var Campaignmonitor_Createsend_Model_Config_CustomerAttributes $customerAttributes */ $customerAttributes = Mage::getSingleton('createsend/config_customerAttributes'); $cmHasCustomerAccount = $api->formatCustomFieldName( $customerAttributes->getCustomFieldName('FONTIS-has-account', true) ); $cmAverageOrderValue = $api->formatCustomFieldName( $customerAttributes->getCustomFieldName('FONTIS-sales-average-order-value', true) ); $cmTotalNumberOfOrders = $api->formatCustomFieldName( $customerAttributes->getCustomFieldName('FONTIS-sales-total-number-of-orders', true) ); $cmTotalOrderValue = $api->formatCustomFieldName( $customerAttributes->getCustomFieldName('FONTIS-sales-total-order-value', true) ); $cmCustomerGender = $api->formatCustomFieldName( $customerAttributes->getCustomFieldName('gender', true) ); $cmWishlistItemCount = $api->formatCustomFieldName( $customerAttributes->getCustomFieldName('FONTIS-number-of-wishlist-items', true) ); $sampleSegments = array( ""All subscribers: $cmHasCustomerAccount"" => array( 'Title' => 'All subscribers', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmHasCustomerAccount, 'Clause' => 'EQUALS Yes' ) ) ) ) ), ""Big spenders: $cmAverageOrderValue"" => array( 'Title' => 'Big spenders', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmAverageOrderValue, 'Clause' => 'GREATER_THAN_OR_EQUAL 500' ) ) ) ) ), ""Frequent Buyers: $cmTotalNumberOfOrders"" => array( 'Title' => 'Frequent Buyers', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmTotalNumberOfOrders, 'Clause' => 'GREATER_THAN_OR_EQUAL 5' ) ) ) ) ), ""VIPs: $cmTotalNumberOfOrders, $cmTotalOrderValue"" => array( 'Title' => 'VIPs', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmTotalNumberOfOrders, 'Clause' => 'GREATER_THAN_OR_EQUAL 5' ) ) ), array( 'Rules' => array( array( 'RuleType' => $cmTotalOrderValue, 'Clause' => 'GREATER_THAN_OR_EQUAL 500' ) ) ) ) ), ""Subscribers that haven’t purchased: $cmHasCustomerAccount, $cmTotalNumberOfOrders"" => array( 'Title' => 'Subscribers that haven’t purchased', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmHasCustomerAccount, 'Clause' => 'EQUALS Yes' ) ) ), array( 'Rules' => array( array( 'RuleType' => $cmTotalNumberOfOrders, 'Clause' => 'EQUALS 0' ) ) ) ) ), ""First time customers: $cmTotalNumberOfOrders"" => array( 'Title' => 'First time customers', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmTotalNumberOfOrders, 'Clause' => 'EQUALS 1' ) ) ) ) ), ""All customers: $cmTotalNumberOfOrders"" => array( 'Title' => 'All customers', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmTotalNumberOfOrders, 'Clause' => 'GREATER_THAN_OR_EQUAL 1' ) ) ) ) ), ""Customers with a wishlist: $cmWishlistItemCount"" => array( 'Title' => 'Customers with a wishlist', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmWishlistItemCount, 'Clause' => 'GREATER_THAN_OR_EQUAL 1' ) ) ) ) ), ""Males: $cmCustomerGender"" => array( 'Title' => 'Males', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmCustomerGender, 'Clause' => 'EQUALS Male' ) ) ) ) ), ""Females: $cmCustomerGender"" => array( 'Title' => 'Females', 'RuleGroups' => array( array( 'Rules' => array( array( 'RuleType' => $cmCustomerGender, 'Clause' => 'EQUALS Female' ) ) ) ) ), ); return $sampleSegments; } } ",0 "le>concat: Not compatible 👼
« Up

concat 8.9.0 Not compatible 👼

📅 (2021-12-26 20:28:19 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-threads        base
base-unix           base
camlp5              7.14        Preprocessor-pretty-printer of OCaml
conf-findutils      1           Virtual package relying on findutils
conf-perl           1           Virtual package relying on perl
coq                 8.7.0       Formal proof management system
num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.08.1      The OCaml compiler (virtual package)
ocaml-base-compiler 4.08.1      Official release 4.08.1
ocaml-config        1           OCaml Switch Configuration
ocamlfind           1.9.1       A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "http://logical.inria.fr/~saibi/docCatV6.ps"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ConCaT"]
depends: [
  "ocaml"
  "coq" {>= "8.9" & < "8.10~"}
]
tags: [
  "keyword: category theory"
  "category: Mathematics/Category Theory"
]
authors: [
  "Amokrane Saïbi"
]
bug-reports: "https://github.com/coq-contribs/concat/issues"
dev-repo: "git+https://github.com/coq-contribs/concat.git"
synopsis: "Constructive Category Theory"
flags: light-uninstall
url {
  src: "https://github.com/coq-contribs/concat/archive/v8.9.0.tar.gz"
  checksum: "md5=90a2b7512161f3de52ad77dd8c3052dd"
}

Lint

Command
true
Return code
0

Dry install 🏜️

Dry install with the current Coq version:

Command
opam install -y --show-action coq-concat.8.9.0 coq.8.7.0
Return code
5120
Output
[NOTE] Package coq is already installed (current version is 8.7.0).
The following dependencies couldn't be met:
  - coq-concat -> coq >= 8.9
Your request can't be satisfied:
  - No available version of coq satisfies the constraints
No solution found, exiting

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command
opam remove -y coq; opam install -y --show-action --unlock-base coq-concat.8.9.0
Return code
0

Install dependencies

Command
true
Return code
0
Duration
0 s

Install 🚀

Command
true
Return code
0
Duration
0 s

Installation size

No files were installed.

Uninstall 🧹

Command
true
Return code
0
Missing removes
none
Wrong removes
none

Sources are on GitHub © Guillaume Claret 🐣

",0 "ent\Console\Helper\Table; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class VariableGetCommand extends PlatformCommand { /** * {@inheritdoc} */ protected function configure() { $this ->setName('variable:get') ->setAliases(array('variables', 'vget')) ->addArgument('name', InputArgument::OPTIONAL, 'The name of the variable') ->addOption('pipe', null, InputOption::VALUE_NONE, 'Output the full variable value only') ->addOption('ssh', null, InputOption::VALUE_NONE, 'Use SSH to get the currently active variables') ->setDescription('Get a variable for an environment'); $this->addProjectOption() ->addEnvironmentOption(); $this->addExample('Get the variable ""example""', 'example'); } protected function execute(InputInterface $input, OutputInterface $output) { $this->validateInput($input); // @todo This --ssh option is only here as a temporary workaround. if ($input->getOption('ssh')) { $shellHelper = $this->getHelper('shell'); $platformVariables = $shellHelper->execute( array( 'ssh', $this->getSelectedEnvironment() ->getSshUrl(), 'echo $PLATFORM_VARIABLES', ), true ); $results = json_decode(base64_decode($platformVariables), true); foreach ($results as $id => $value) { if (!is_scalar($value)) { $value = json_encode($value); } $output->writeln(""$id\t$value""); } return 0; } $name = $input->getArgument('name'); if ($name) { $variable = $this->getSelectedEnvironment() ->getVariable($name); if (!$variable) { $this->stdErr->writeln(""Variable not found: $name""); return 1; } $results = array($variable); } else { $results = $this->getSelectedEnvironment() ->getVariables(); if (!$results) { $this->stdErr->writeln('No variables found'); return 1; } } if ($input->getOption('pipe')) { foreach ($results as $variable) { $output->writeln($variable['id'] . ""\t"" . $variable['value']); } } else { $table = $this->buildVariablesTable($results, $output); $table->render(); } return 0; } /** * @param Variable[] $variables * @param OutputInterface $output * * @return Table */ protected function buildVariablesTable(array $variables, OutputInterface $output) { $table = new Table($output); $table->setHeaders(array(""ID"", ""Value"", ""Inherited"", ""JSON"")); foreach ($variables as $variable) { $value = $variable['value']; // Truncate long values. if (strlen($value) > 60) { $value = substr($value, 0, 57) . '...'; } // Wrap long values. $value = wordwrap($value, 30, ""\n"", true); $table->addRow( array( $variable['id'], $value, $variable['inherited'] ? 'Yes' : 'No', $variable['is_json'] ? 'Yes' : 'No', ) ); } return $table; } } ",0 "cation: src/include/index/skiplist.h // // Copyright (c) 2015-17, Carnegie Mellon University Database Group // //===----------------------------------------------------------------------===// #pragma once namespace peloton { namespace index { /* * SKIPLIST_TEMPLATE_ARGUMENTS - Save some key strokes */ #define SKIPLIST_TEMPLATE_ARGUMENTS \ template template class SkipList { // TODO: Add your declarations here }; } // namespace index } // namespace peloton ",0 " public function generateForm($class, $columns, $model) { $lcm = $model->getConfigs(); $errors = Session::get('errors', new MessageBag()); $isDebug = (request()->input('debug') == true); if ($model[$model->getKeyName()]) { echo Form::model($model, ['url' => url('lcm/gen/'.$class.'/1'), 'method' => 'post', 'files' => true]); } else { echo Form::model('', ['url' => url('lcm/gen/'.$class), 'method' => 'post', 'files' => true]); } foreach ($columns as $column) { if (strpos($column->Extra, 'auto_increment') === false && !in_array($column->Field, $lcm['hides'])) { $readOnly = (in_array($column->Field, $lcm['readOnly'])) ? 'readonly' : ''; if (!$model[$column->Field] && $column->Default != '') { if ($column->Default == 'CURRENT_TIMESTAMP') { $mytime = Carbon::now(); $model->{$column->Field} = $mytime->toDateTimeString(); } else { $model->{$column->Field} = $column->Default; } } echo '
has($column->Field) ? 'has-error' : '').'"">'; if (in_array($column->Field, $lcm['files'])) { echo Form::label($column->Field, str_replace('_', ' ', $column->Field)); echo Form::file($column->Field, [$readOnly]); } elseif (strpos($column->Key, 'MUL') !== false) { $reference = $model->getReference($column->Field); $referencedClass = '\\App\\Models\\'.studly_case(str_singular($reference->REFERENCED_TABLE_NAME)); $referencedClass = new $referencedClass(); $referencedClassLcm = $referencedClass->getConfigs(); $labelName = str_replace('_', ' ', $column->Field); $labelName = str_replace('id', ':'.$referencedClassLcm['columnLabel'], $labelName); echo Form::label($column->Field, $labelName); echo Form::select($column->Field, ['' => '---'] + $referencedClass::lists($referencedClassLcm['columnLabel'], 'id')->all(), null, ['id' => $column->Field, 'class' => 'form-control', $readOnly]); } elseif (strpos($column->Type, 'char') !== false) { echo Form::label($column->Field, str_replace('_', ' ', $column->Field)); echo Form::text($column->Field, $model[$column->Field], ['class' => 'form-control', $readOnly]); } elseif (strpos($column->Type, 'text') !== false) { echo Form::label($column->Field, str_replace('_', ' ', $column->Field)); echo Form::textarea($column->Field, $model[$column->Field], ['class' => 'form-control', $readOnly]); } elseif (strpos($column->Type, 'int') !== false) { echo Form::label($column->Field, str_replace('_', ' ', $column->Field)); echo Form::number($column->Field, $model[$column->Field], ['class' => 'form-control', $readOnly]); } elseif (strpos($column->Type, 'timestamp') !== false || strpos($column->Type, 'date') !== false) { echo Form::label($column->Field, str_replace('_', ' ', $column->Field)); echo Form::text($column->Field, $model[$column->Field], ['class' => 'form-control has-datepicker', $readOnly]); } else { echo Form::label($column->Field, str_replace('_', ' ', $column->Field.' [undetect]')); echo Form::text($column->Field, $model[$column->Field], ['class' => 'form-control', $readOnly]); } echo $errors->first($column->Field, '

:message

'); echo '
'; if ($isDebug) { echo '
', var_dump($column), '
'; } } } foreach ($lcm['checkboxes'] as $key => $value) { echo Form::checkbox('name', 'value'); } echo ''; Form::close(); if ($isDebug) { echo '
', var_dump($errors), '
'; } } } ",0 "0 int rc = h[s]; for(int j = 2*s; j <= m; j *= 2) {// 遍历一棵完全二叉树,j指向二叉树的左树 if((j < m) && (h[j] < h[j+1])) j++; //若右子树大于左子树,取右子树 if(rc > h[j]) break; //若根比子树大,不需要交换根与子树的值 h[s] = h[j]; //交换根与子树的值 s = j; //取子树根再向下遍历知道树叶 } h[s] = rc; //原树根就位 } void heapSort(int h[], int length) {// 对序列h进行堆排序 int temp; for(int i = length/2; i > 0; i--) //构建序列h为一个根大于子树的堆(完全二叉树) heapAdjust(h, i, length); //i指向子树的根 for(int i = length; i > 1; i--) {// 在已建成堆的情况下,提取最大值,重组堆,直到整个序列有序 temp = h[i]; h[i] = h[1]; h[1] = temp; //互换1与i的值 heapAdjust(h, 1, i-1); } } Status main(void) { int h[] = {0, 49, 38, 65, 97, 76, 13, 27, 49, 0}; printf(""==============未排序之前==================\n""); for(int i = 1; i <= 8; i++) printf(""%d "", h[i]); printf(""\n==============排序之后==================\n""); heapSort(h, 8); for(int i = 1; i <=8; i++) printf(""%d "", h[i]); printf(""\n""); return OK; } ",0 "; import java.util.Arrays; import zoara.sfs2x.extension.simulation.World; import zoara.sfs2x.extension.utils.RoomHelper; import com.smartfoxserver.bitswarm.sessions.ISession; import com.smartfoxserver.v2.core.ISFSEvent; import com.smartfoxserver.v2.core.SFSEventParam; import com.smartfoxserver.v2.db.IDBManager; import com.smartfoxserver.v2.exceptions.SFSErrorCode; import com.smartfoxserver.v2.exceptions.SFSErrorData; import com.smartfoxserver.v2.exceptions.SFSException; import com.smartfoxserver.v2.exceptions.SFSLoginException; import com.smartfoxserver.v2.extensions.BaseServerEventHandler; import com.smartfoxserver.v2.security.DefaultPermissionProfile; public class LoginEventHandler extends BaseServerEventHandler { @Override public void handleServerEvent(ISFSEvent event) throws SFSException { // Grab parameters from client request String userName = (String) event.getParameter(SFSEventParam.LOGIN_NAME); String cryptedPass = (String) event.getParameter(SFSEventParam.LOGIN_PASSWORD); ISession session = (ISession) event.getParameter(SFSEventParam.SESSION); // Get password from DB IDBManager dbManager = getParentExtension().getParentZone().getDBManager(); Connection connection; try { // Grab a connection from the DBManager connection pool connection = dbManager.getConnection(); // Build a prepared statement PreparedStatement stmt = connection.prepareStatement( ""SELECT Password, ID, ClanID, Zone FROM player_info WHERE Username = ?"" ); stmt.setString(1, userName); // Execute query ResultSet res = stmt.executeQuery(); // Verify that one record was found if (!res.first()) { // This is the part that goes to the client SFSErrorData errData = new SFSErrorData(SFSErrorCode.LOGIN_BAD_USERNAME); errData.addParameter(userName); // This is logged on the server side throw new SFSLoginException(""Bad username: "" + userName, errData); } String dbpassword = res.getString(""Password""); int dbId = res.getInt(""ID""); //String zone = res.getString(""Zone""); int clanId = res.getInt(""ClanID""); String zone = res.getString(""Zone""); // Return connection to the DBManager connection pool connection.close(); String thisZone = getParentExtension().getParentZone().getName(); if ((zone.equals(""Adult"") && !zone.equals(thisZone)) || (!zone.equals(""Adult"") && thisZone.equals(""Adult""))) { SFSErrorData data = new SFSErrorData(SFSErrorCode.JOIN_GAME_ACCESS_DENIED); data.addParameter(thisZone); throw new SFSLoginException(""Login failed. User "" + userName + "" is not a member of Server "" + thisZone, data); } World world = RoomHelper.getWorld(this); if (world.hasPlayer(userName)) { SFSErrorData data = new SFSErrorData(SFSErrorCode.LOGIN_ALREADY_LOGGED); String[] params = { userName, thisZone }; data.setParams(Arrays.asList(params)); throw new SFSLoginException(""Login failed: "" + userName + "" is already logged in!"", data); } // Verify the secure password if (!getApi().checkSecurePassword(session, dbpassword, cryptedPass)) { if (dbId < 10) { trace(""Passwords did not match, but logging in anyway.""); } else { SFSErrorData data = new SFSErrorData(SFSErrorCode.LOGIN_BAD_PASSWORD); data.addParameter(userName); throw new SFSLoginException(""Login failed for user: "" + userName, data); } } // Store the client dbId in the session session.setProperty(ZoaraExtension.DATABASE_ID, dbId); if (clanId != 0) { session.setProperty(ZoaraExtension.CLAN_ID, clanId); } session.setProperty(""$permission"", DefaultPermissionProfile.STANDARD); } catch (SQLException e) // User name was not found { SFSErrorData errData = new SFSErrorData(SFSErrorCode.GENERIC_ERROR); errData.addParameter(""SQL Error: "" + e.getMessage()); throw new SFSLoginException(""A SQL Error occurred: "" + e.getMessage(), errData); } } } ",0 "** * 额外服务-是否可以加床,1:不可以,2:可以 **/ private $addBed; /** * 额外服务-加床价格 **/ private $addBedPrice; /** * 币种(仅支持CNY) **/ private $currencyCode; /** * gid酒店商品id **/ private $gid; /** * 价格和库存信息。 A:use_room_inventory:是否使用room级别共享库存,可选值 true false 1、true时:使用room级别共享库存(即使用gid对应的XRoom中的inventory),rate_quota_map 的json 数据中不需要录入库存信息,录入的库存信息会忽略 2、false时:使用rate级别私有库存,此时要求价格和库存必填。 B:date 日期必须为 T---T+90 日内的日期(T为当天),且不能重复 C:price 价格 int类型 取值范围1-99999999 单位为分 D:quota 库存 int 类型 取值范围 0-999(数量库存) 60000(状态库存关) 61000(状态库存开) **/ private $inventoryPrice; /** * 名称 **/ private $name; /** * 酒店RPID **/ private $rpid; /** * 实价有房标签(RP支付类型为全额支付) **/ private $shijiaTag; private $apiParas = array(); public function setAddBed($addBed) { $this->addBed = $addBed; $this->apiParas[""add_bed""] = $addBed; } public function getAddBed() { return $this->addBed; } public function setAddBedPrice($addBedPrice) { $this->addBedPrice = $addBedPrice; $this->apiParas[""add_bed_price""] = $addBedPrice; } public function getAddBedPrice() { return $this->addBedPrice; } public function setCurrencyCode($currencyCode) { $this->currencyCode = $currencyCode; $this->apiParas[""currency_code""] = $currencyCode; } public function getCurrencyCode() { return $this->currencyCode; } public function setGid($gid) { $this->gid = $gid; $this->apiParas[""gid""] = $gid; } public function getGid() { return $this->gid; } public function setInventoryPrice($inventoryPrice) { $this->inventoryPrice = $inventoryPrice; $this->apiParas[""inventory_price""] = $inventoryPrice; } public function getInventoryPrice() { return $this->inventoryPrice; } public function setName($name) { $this->name = $name; $this->apiParas[""name""] = $name; } public function getName() { return $this->name; } public function setRpid($rpid) { $this->rpid = $rpid; $this->apiParas[""rpid""] = $rpid; } public function getRpid() { return $this->rpid; } public function setShijiaTag($shijiaTag) { $this->shijiaTag = $shijiaTag; $this->apiParas[""shijia_tag""] = $shijiaTag; } public function getShijiaTag() { return $this->shijiaTag; } public function getApiMethodName() { return ""taobao.xhotel.rate.add""; } public function getApiParas() { return $this->apiParas; } public function check() { RequestCheckUtil::checkMaxValue($this->addBed,2,""addBed""); RequestCheckUtil::checkMinValue($this->addBed,1,""addBed""); RequestCheckUtil::checkNotNull($this->gid,""gid""); RequestCheckUtil::checkNotNull($this->inventoryPrice,""inventoryPrice""); RequestCheckUtil::checkMaxLength($this->name,60,""name""); RequestCheckUtil::checkNotNull($this->rpid,""rpid""); } public function putOtherTextParam($key, $value) { $this->apiParas[$key] = $value; $this->$key = $value; } } ",0 "melContainer; import org.ofbiz.service.DispatchContext; import org.ofbiz.service.ServiceUtil; import java.util.Collections; import java.util.Map; public class CamelServices { private static String module = CamelServices.class.getName(); public static Map sendCamelMessage(DispatchContext ctx, Map context) { Object body = context.get(""body""); String endpoint = (String) context.get(""endpoint""); Map headers = getHeaders(context); try { CamelContainer.getProducerTemplate().sendBodyAndHeaders(endpoint, body, headers); } catch (CamelExecutionException cee) { Debug.logError(cee, module); return ServiceUtil.returnError(cee.getMessage()); } return ServiceUtil.returnSuccess(); } private static Map getHeaders(Map context) { Map headers = (Map) context.get(""headers""); return headers != null ? headers : Collections.emptyMap(); } } ",0 " the LICENSE file. #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_FACTORY_CHROMEOS_H_ #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_FACTORY_CHROMEOS_H_ #include #include ""base/basictypes.h"" #include ""base/memory/ref_counted.h"" #include ""base/memory/singleton.h"" #include ""components/keyed_service/content/browser_context_keyed_base_factory.h"" class Profile; namespace base { class SequencedTaskRunner; } namespace content { class BrowserContext; } namespace policy { class UserCloudPolicyManagerChromeOS; // BrowserContextKeyedBaseFactory implementation // for UserCloudPolicyManagerChromeOS instances that initialize per-profile // cloud policy settings on ChromeOS. // // UserCloudPolicyManagerChromeOS is handled different than other // KeyedServices because it is a dependency of PrefService. // Therefore, lifetime of instances is managed by Profile, Profile startup code // invokes CreateForProfile() explicitly, takes ownership, and the instance // is only deleted after PrefService destruction. // // TODO(mnissler): Remove the special lifetime management in favor of // PrefService directly depending on UserCloudPolicyManagerChromeOS once the // former has been converted to a KeyedService. // See also http://crbug.com/131843 and http://crbug.com/131844. class UserCloudPolicyManagerFactoryChromeOS : public BrowserContextKeyedBaseFactory { public: // Returns an instance of the UserCloudPolicyManagerFactoryChromeOS singleton. static UserCloudPolicyManagerFactoryChromeOS* GetInstance(); // Returns the UserCloudPolicyManagerChromeOS instance associated with // |profile|. static UserCloudPolicyManagerChromeOS* GetForProfile(Profile* profile); // Creates an instance for |profile|. Note that the caller is responsible for // managing the lifetime of the instance. Subsequent calls to GetForProfile() // will return the created instance as long as it lives. // // If |force_immediate_load| is true, policy is loaded synchronously from // UserCloudPolicyStore at startup. static scoped_ptr CreateForProfile( Profile* profile, bool force_immediate_load, scoped_refptr background_task_runner); private: friend struct DefaultSingletonTraits; UserCloudPolicyManagerFactoryChromeOS(); virtual ~UserCloudPolicyManagerFactoryChromeOS(); // See comments for the static versions above. UserCloudPolicyManagerChromeOS* GetManagerForProfile(Profile* profile); scoped_ptr CreateManagerForProfile( Profile* profile, bool force_immediate_load, scoped_refptr background_task_runner); // BrowserContextKeyedBaseFactory: virtual void BrowserContextShutdown( content::BrowserContext* context) OVERRIDE; virtual void BrowserContextDestroyed( content::BrowserContext* context) OVERRIDE; virtual void SetEmptyTestingFactory( content::BrowserContext* context) OVERRIDE; virtual void CreateServiceNow(content::BrowserContext* context) OVERRIDE; typedef std::map ManagerMap; ManagerMap managers_; DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerFactoryChromeOS); }; } // namespace policy #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_FACTORY_CHROMEOS_H_ ",0 "11/ if you want to use SVN (don't use trunk, earth will explode) :: Have a question? Just ask it, and wait patiently, because patience is the key to happiness :: We're looking for documentation contributors and developers :: http://trac.agavi.org/milestone/0.11 :: irc logs http://users.tkk.fi/~tjorri/agavi/logs
RossC0 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed eget nulla in lacus suscipit mattis. Vivamus non metus. Pellentesque eu urna sed pede dictum vulputate. Quisque enim nibh, vehicula ac, accumsan nec, sagittis aliquam, enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla vitae nulla quis est mollis vulputate. Sed lacinia volutpat eros. Mauris cursus dui et nibh. Vestibulum erat nisi, ornare et, adipiscing nec, interdum ut, turpis. Nulla facilisi. Quisque tincidunt est. Etiam gravida pede vestibulum tellus. Vivamus sit amet leo. Integer hendrerit. Fusce et nisl nec ante aliquam vehicula. Etiam pretium tincidunt velit. 00:16
kaos|work oh, and it would be cool if there was an easy way injecting my own code in every receive 00:28
or something which gets called in a regular timeframe 00:29
impl timers 00:29
got it 00:29
Wombert is that so? 00:32
v-dogg Wombert Zombert :) 00:33
RossC0 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed eget nulla in lacus suscipit mattis. Vivamus non metus. Pellentesque eu urna sed pede dictum vulputate. Quisque enim nibh, vehicula ac, accumsan nec, sagittis aliquam, enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla vitae nulla quis est mollis vulputate. Sed lacinia volutpat eros. Mauris cursus dui et nibh. Vestibulum erat nisi, ornare et, adipiscing nec, interdum ut, turpis. Nulla facilisi. Quisque tincidunt est. Etiam gravida pede vestibulum tellus. Vivamus sit amet leo. Integer hendrerit. Fusce et nisl nec ante aliquam vehicula. Etiam pretium tincidunt velit. 00:16
kaos|work has joined the channel 00:23
kaos|work oh, and it would be cool if there was an easy way injecting my own code in every receive 00:28
or something which gets called in a regular timeframe 00:29
impl timers 00:29
got it 00:29
Wombert is that so? 00:32
v-dogg Wombert Zombert :) 00:33
RossC0 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed eget nulla in lacus suscipit mattis. Vivamus non metus. Pellentesque eu urna sed pede dictum vulputate. Quisque enim nibh, vehicula ac, accumsan nec, sagittis aliquam, enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla vitae nulla quis est mollis vulputate. Sed lacinia volutpat eros. Mauris cursus dui et nibh. Vestibulum erat nisi, ornare et, adipiscing nec, interdum ut, turpis. Nulla facilisi. Quisque tincidunt est. Etiam gravida pede vestibulum tellus. Vivamus sit amet leo. Integer hendrerit. Fusce et nisl nec ante aliquam vehicula. Etiam pretium tincidunt velit. 00:16
kaos|work oh, and it would be cool if there was an easy way injecting my own code in every receive 00:28
or something which gets called in a regular timeframe 00:29
impl timers 00:29
got it 00:29
Wombert is that so? 00:32
v-dogg Wombert Zombert :) 00:33
RossC0 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed eget nulla in lacus suscipit mattis. Vivamus non metus. Pellentesque eu urna sed pede dictum vulputate. Quisque enim nibh, vehicula ac, accumsan nec, sagittis aliquam, enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla vitae nulla quis est mollis vulputate. Sed lacinia volutpat eros. Mauris cursus dui et nibh. Vestibulum erat nisi, ornare et, adipiscing nec, interdum ut, turpis. Nulla facilisi. Quisque tincidunt est. Etiam gravida pede vestibulum tellus. Vivamus sit amet leo. Integer hendrerit. Fusce et nisl nec ante aliquam vehicula. Etiam pretium tincidunt velit. 00:16
kaos|work oh, and it would be cool if there was an easy way injecting my own code in every receive 00:28
or something which gets called in a regular timeframe 00:29
impl timers 00:29
got it 00:29
Wombert is that so? 00:32
v-dogg Wombert Zombert :) 00:33
",0 " (c) 2013-2014, Nazar Mokrynskyi * @license MIT License, see license.txt */ namespace cs; use h; $Config = Config::instance(); $db = DB::instance(); $Index = Index::instance(); $module_object = $Config->module('Update'); if (!$module_object->version) { $module_object->version = 0; } if (isset($Config->route[0]) && $Config->route[0] == 'process') { $version = (int)$module_object->version; for ($i = 1; file_exists(MFOLDER.""/sql/$i.sql"") || file_exists(MFOLDER.""/php/$i.php""); ++$i) { if ($version < $i) { if (file_exists(MFOLDER.""/sql/$i.sql"")) { foreach (explode(';', file_get_contents(MFOLDER.""/sql/$i.sql"")) as $s) { if ($s) { $db->{'0'}()->q($s); } } } if (file_exists(MFOLDER.""/php/$i.php"")) { include MFOLDER.""/php/$i.php""; } $module_object->version = $i; } } $Index->save(true); } $Index->buttons = false; $Index->content( h::{'p.cs-center'}(""Current revision: $module_object->version""). h::{'a.cs-button.cs-center'}( 'Update System structure', [ 'href' => 'admin/Update/process' ] ) ); ",0 "rsite Pierre et Marie Curie (Paris VI) */ #include #include #include #include #include #include #include #include #include ""ext4_jbd2.h"" #include ""ext4.h"" #define MAX_32_NUM ((((unsigned long long) 1) << 32) - 1) /** * Swap memory between @a and @b for @len bytes. * * @a: pointer to first memory area * @b: pointer to second memory area * @len: number of bytes to swap * */ static void memswap(void *a, void *b, size_t len) { unsigned char *ap, *bp; unsigned char tmp; ap = (unsigned char *)a; bp = (unsigned char *)b; while (len-- > 0) { tmp = *ap; *ap = *bp; *bp = tmp; ap++; bp++; } } /** * Swap i_data and associated attributes between @inode1 and @inode2. * This function is used for the primary swap between inode1 and inode2 * and also to revert this primary swap in case of errors. * * Therefore you have to make sure, that calling this method twice * will revert all changes. * * @inode1: pointer to first inode * @inode2: pointer to second inode */ static void swap_inode_data(struct inode *inode1, struct inode *inode2) { loff_t isize; struct ext4_inode_info *ei1; struct ext4_inode_info *ei2; ei1 = EXT4_I(inode1); ei2 = EXT4_I(inode2); memswap(&inode1->i_flags, &inode2->i_flags, sizeof(inode1->i_flags)); memswap(&inode1->i_version, &inode2->i_version, sizeof(inode1->i_version)); memswap(&inode1->i_blocks, &inode2->i_blocks, sizeof(inode1->i_blocks)); memswap(&inode1->i_bytes, &inode2->i_bytes, sizeof(inode1->i_bytes)); memswap(&inode1->i_atime, &inode2->i_atime, sizeof(inode1->i_atime)); memswap(&inode1->i_mtime, &inode2->i_mtime, sizeof(inode1->i_mtime)); memswap(ei1->i_data, ei2->i_data, sizeof(ei1->i_data)); memswap(&ei1->i_flags, &ei2->i_flags, sizeof(ei1->i_flags)); memswap(&ei1->i_disksize, &ei2->i_disksize, sizeof(ei1->i_disksize)); ext4_es_remove_extent(inode1, 0, EXT_MAX_BLOCKS); ext4_es_remove_extent(inode2, 0, EXT_MAX_BLOCKS); ext4_es_lru_del(inode1); ext4_es_lru_del(inode2); isize = i_size_read(inode1); i_size_write(inode1, i_size_read(inode2)); i_size_write(inode2, isize); } /** * Swap the information from the given @inode and the inode * EXT4_BOOT_LOADER_INO. It will basically swap i_data and all other * important fields of the inodes. * * @sb: the super block of the filesystem * @inode: the inode to swap with EXT4_BOOT_LOADER_INO * */ static long swap_inode_boot_loader(struct super_block *sb, struct inode *inode) { handle_t *handle; int err; struct inode *inode_bl; struct ext4_inode_info *ei_bl; struct ext4_sb_info *sbi = EXT4_SB(sb); if (inode->i_nlink != 1 || !S_ISREG(inode->i_mode)) return -EINVAL; if (!inode_owner_or_capable(inode) || !capable(CAP_SYS_ADMIN)) return -EPERM; inode_bl = ext4_iget(sb, EXT4_BOOT_LOADER_INO); if (IS_ERR(inode_bl)) return PTR_ERR(inode_bl); ei_bl = EXT4_I(inode_bl); filemap_flush(inode->i_mapping); filemap_flush(inode_bl->i_mapping); /* Protect orig inodes against a truncate and make sure, * that only 1 swap_inode_boot_loader is running. */ lock_two_nondirectories(inode, inode_bl); truncate_inode_pages(&inode->i_data, 0); truncate_inode_pages(&inode_bl->i_data, 0); /* Wait for all existing dio workers */ ext4_inode_block_unlocked_dio(inode); ext4_inode_block_unlocked_dio(inode_bl); inode_dio_wait(inode); inode_dio_wait(inode_bl); handle = ext4_journal_start(inode_bl, EXT4_HT_MOVE_EXTENTS, 2); if (IS_ERR(handle)) { err = -EINVAL; goto journal_err_out; } /* Protect extent tree against block allocations via delalloc */ ext4_double_down_write_data_sem(inode, inode_bl); if (inode_bl->i_nlink == 0) { /* this inode has never been used as a BOOT_LOADER */ set_nlink(inode_bl, 1); i_uid_write(inode_bl, 0); i_gid_write(inode_bl, 0); inode_bl->i_flags = 0; ei_bl->i_flags = 0; inode_bl->i_version = 1; i_size_write(inode_bl, 0); inode_bl->i_mode = S_IFREG; if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) { ext4_set_inode_flag(inode_bl, EXT4_INODE_EXTENTS); ext4_ext_tree_init(handle, inode_bl); } else memset(ei_bl->i_data, 0, sizeof(ei_bl->i_data)); } swap_inode_data(inode, inode_bl); inode->i_ctime = inode_bl->i_ctime = ext4_current_time(inode); spin_lock(&sbi->s_next_gen_lock); inode->i_generation = sbi->s_next_generation++; inode_bl->i_generation = sbi->s_next_generation++; spin_unlock(&sbi->s_next_gen_lock); ext4_discard_preallocations(inode); err = ext4_mark_inode_dirty(handle, inode); if (err < 0) { ext4_warning(inode->i_sb, ""couldn't mark inode #%lu dirty (err %d)"", inode->i_ino, err); /* Revert all changes: */ swap_inode_data(inode, inode_bl); } else { err = ext4_mark_inode_dirty(handle, inode_bl); if (err < 0) { ext4_warning(inode_bl->i_sb, ""couldn't mark inode #%lu dirty (err %d)"", inode_bl->i_ino, err); /* Revert all changes: */ swap_inode_data(inode, inode_bl); ext4_mark_inode_dirty(handle, inode); } } ext4_journal_stop(handle); ext4_double_up_write_data_sem(inode, inode_bl); journal_err_out: ext4_inode_resume_unlocked_dio(inode); ext4_inode_resume_unlocked_dio(inode_bl); unlock_two_nondirectories(inode, inode_bl); iput(inode_bl); return err; } long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { struct inode *inode = file_inode(filp); struct super_block *sb = inode->i_sb; struct ext4_inode_info *ei = EXT4_I(inode); unsigned int flags; ext4_debug(""cmd = %u, arg = %lu\n"", cmd, arg); switch (cmd) { case EXT4_IOC_GETFLAGS: ext4_get_inode_flags(ei); flags = ei->i_flags & EXT4_FL_USER_VISIBLE; return put_user(flags, (int __user *) arg); case EXT4_IOC_SETFLAGS: { handle_t *handle = NULL; int err, migrate = 0; struct ext4_iloc iloc; unsigned int oldflags, mask, i; unsigned int jflag; if (!inode_owner_or_capable(inode)) return -EACCES; if (get_user(flags, (int __user *) arg)) return -EFAULT; err = mnt_want_write_file(filp); if (err) return err; flags = ext4_mask_flags(inode->i_mode, flags); err = -EPERM; mutex_lock(&inode->i_mutex); /* Is it quota file? Do not allow user to mess with it */ if (IS_NOQUOTA(inode)) goto flags_out; oldflags = ei->i_flags; /* The JOURNAL_DATA flag is modifiable only by root */ jflag = flags & EXT4_JOURNAL_DATA_FL; /* * The IMMUTABLE and APPEND_ONLY flags can only be changed by * the relevant capability. * * This test looks nicer. Thanks to Pauline Middelink */ if ((flags ^ oldflags) & (EXT4_APPEND_FL | EXT4_IMMUTABLE_FL)) { if (!capable(CAP_LINUX_IMMUTABLE)) goto flags_out; } /* * The JOURNAL_DATA flag can only be changed by * the relevant capability. */ if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL)) { if (!capable(CAP_SYS_RESOURCE)) goto flags_out; } if ((flags ^ oldflags) & EXT4_EXTENTS_FL) migrate = 1; if (flags & EXT4_EOFBLOCKS_FL) { /* we don't support adding EOFBLOCKS flag */ if (!(oldflags & EXT4_EOFBLOCKS_FL)) { err = -EOPNOTSUPP; goto flags_out; } } else if (oldflags & EXT4_EOFBLOCKS_FL) ext4_truncate(inode); handle = ext4_journal_start(inode, EXT4_HT_INODE, 1); if (IS_ERR(handle)) { err = PTR_ERR(handle); goto flags_out; } if (IS_SYNC(inode)) ext4_handle_sync(handle); err = ext4_reserve_inode_write(handle, inode, &iloc); if (err) goto flags_err; for (i = 0, mask = 1; i < 32; i++, mask <<= 1) { if (!(mask & EXT4_FL_USER_MODIFIABLE)) continue; if (mask & flags) ext4_set_inode_flag(inode, i); else ext4_clear_inode_flag(inode, i); } ext4_set_inode_flags(inode); inode->i_ctime = ext4_current_time(inode); err = ext4_mark_iloc_dirty(handle, inode, &iloc); flags_err: ext4_journal_stop(handle); if (err) goto flags_out; if ((jflag ^ oldflags) & (EXT4_JOURNAL_DATA_FL)) err = ext4_change_inode_journal_flag(inode, jflag); if (err) goto flags_out; if (migrate) { if (flags & EXT4_EXTENTS_FL) err = ext4_ext_migrate(inode); else err = ext4_ind_migrate(inode); } flags_out: mutex_unlock(&inode->i_mutex); mnt_drop_write_file(filp); return err; } case EXT4_IOC_GETVERSION: case EXT4_IOC_GETVERSION_OLD: return put_user(inode->i_generation, (int __user *) arg); case EXT4_IOC_SETVERSION: case EXT4_IOC_SETVERSION_OLD: { handle_t *handle; struct ext4_iloc iloc; __u32 generation; int err; if (!inode_owner_or_capable(inode)) return -EPERM; if (ext4_has_metadata_csum(inode->i_sb)) { ext4_warning(sb, ""Setting inode version is not "" ""supported with metadata_csum enabled.""); return -ENOTTY; } err = mnt_want_write_file(filp); if (err) return err; if (get_user(generation, (int __user *) arg)) { err = -EFAULT; goto setversion_out; } mutex_lock(&inode->i_mutex); handle = ext4_journal_start(inode, EXT4_HT_INODE, 1); if (IS_ERR(handle)) { err = PTR_ERR(handle); goto unlock_out; } err = ext4_reserve_inode_write(handle, inode, &iloc); if (err == 0) { inode->i_ctime = ext4_current_time(inode); inode->i_generation = generation; err = ext4_mark_iloc_dirty(handle, inode, &iloc); } ext4_journal_stop(handle); unlock_out: mutex_unlock(&inode->i_mutex); setversion_out: mnt_drop_write_file(filp); return err; } case EXT4_IOC_GROUP_EXTEND: { ext4_fsblk_t n_blocks_count; int err, err2=0; err = ext4_resize_begin(sb); if (err) return err; if (get_user(n_blocks_count, (__u32 __user *)arg)) { err = -EFAULT; goto group_extend_out; } if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { ext4_msg(sb, KERN_ERR, ""Online resizing not supported with bigalloc""); err = -EOPNOTSUPP; goto group_extend_out; } err = mnt_want_write_file(filp); if (err) goto group_extend_out; err = ext4_group_extend(sb, EXT4_SB(sb)->s_es, n_blocks_count); if (EXT4_SB(sb)->s_journal) { jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal); err2 = jbd2_journal_flush(EXT4_SB(sb)->s_journal); jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal); } if (err == 0) err = err2; mnt_drop_write_file(filp); group_extend_out: ext4_resize_end(sb); return err; } case EXT4_IOC_MOVE_EXT: { struct move_extent me; struct fd donor; int err; if (!(filp->f_mode & FMODE_READ) || !(filp->f_mode & FMODE_WRITE)) return -EBADF; if (copy_from_user(&me, (struct move_extent __user *)arg, sizeof(me))) return -EFAULT; me.moved_len = 0; donor = fdget(me.donor_fd); if (!donor.file) return -EBADF; if (!(donor.file->f_mode & FMODE_WRITE)) { err = -EBADF; goto mext_out; } if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { ext4_msg(sb, KERN_ERR, ""Online defrag not supported with bigalloc""); err = -EOPNOTSUPP; goto mext_out; } err = mnt_want_write_file(filp); if (err) goto mext_out; err = ext4_move_extents(filp, donor.file, me.orig_start, me.donor_start, me.len, &me.moved_len); mnt_drop_write_file(filp); if (copy_to_user((struct move_extent __user *)arg, &me, sizeof(me))) err = -EFAULT; mext_out: fdput(donor); return err; } case EXT4_IOC_GROUP_ADD: { struct ext4_new_group_data input; int err, err2=0; err = ext4_resize_begin(sb); if (err) return err; if (copy_from_user(&input, (struct ext4_new_group_input __user *)arg, sizeof(input))) { err = -EFAULT; goto group_add_out; } if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { ext4_msg(sb, KERN_ERR, ""Online resizing not supported with bigalloc""); err = -EOPNOTSUPP; goto group_add_out; } err = mnt_want_write_file(filp); if (err) goto group_add_out; err = ext4_group_add(sb, &input); if (EXT4_SB(sb)->s_journal) { jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal); err2 = jbd2_journal_flush(EXT4_SB(sb)->s_journal); jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal); } if (err == 0) err = err2; mnt_drop_write_file(filp); if (!err && ext4_has_group_desc_csum(sb) && test_opt(sb, INIT_INODE_TABLE)) err = ext4_register_li_request(sb, input.group); group_add_out: ext4_resize_end(sb); return err; } case EXT4_IOC_MIGRATE: { int err; if (!inode_owner_or_capable(inode)) return -EACCES; err = mnt_want_write_file(filp); if (err) return err; /* * inode_mutex prevent write and truncate on the file. * Read still goes through. We take i_data_sem in * ext4_ext_swap_inode_data before we switch the * inode format to prevent read. */ mutex_lock(&(inode->i_mutex)); err = ext4_ext_migrate(inode); mutex_unlock(&(inode->i_mutex)); mnt_drop_write_file(filp); return err; } case EXT4_IOC_ALLOC_DA_BLKS: { int err; if (!inode_owner_or_capable(inode)) return -EACCES; err = mnt_want_write_file(filp); if (err) return err; err = ext4_alloc_da_blocks(inode); mnt_drop_write_file(filp); return err; } case EXT4_IOC_SWAP_BOOT: { int err; if (!(filp->f_mode & FMODE_WRITE)) return -EBADF; err = mnt_want_write_file(filp); if (err) return err; err = swap_inode_boot_loader(sb, inode); mnt_drop_write_file(filp); return err; } case EXT4_IOC_RESIZE_FS: { ext4_fsblk_t n_blocks_count; int err = 0, err2 = 0; ext4_group_t o_group = EXT4_SB(sb)->s_groups_count; if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { ext4_msg(sb, KERN_ERR, ""Online resizing not (yet) supported with bigalloc""); return -EOPNOTSUPP; } if (copy_from_user(&n_blocks_count, (__u64 __user *)arg, sizeof(__u64))) { return -EFAULT; } err = ext4_resize_begin(sb); if (err) return err; err = mnt_want_write_file(filp); if (err) goto resizefs_out; err = ext4_resize_fs(sb, n_blocks_count); if (EXT4_SB(sb)->s_journal) { jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal); err2 = jbd2_journal_flush(EXT4_SB(sb)->s_journal); jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal); } if (err == 0) err = err2; mnt_drop_write_file(filp); if (!err && (o_group > EXT4_SB(sb)->s_groups_count) && ext4_has_group_desc_csum(sb) && test_opt(sb, INIT_INODE_TABLE)) err = ext4_register_li_request(sb, o_group); resizefs_out: ext4_resize_end(sb); return err; } case FITRIM: { struct request_queue *q = bdev_get_queue(sb->s_bdev); struct fstrim_range range; int ret = 0; if (!capable(CAP_SYS_ADMIN)) return -EPERM; if (!blk_queue_discard(q)) return -EOPNOTSUPP; if (copy_from_user(&range, (struct fstrim_range __user *)arg, sizeof(range))) return -EFAULT; range.minlen = max((unsigned int)range.minlen, q->limits.discard_granularity); ret = ext4_trim_fs(sb, &range); if (ret < 0) return ret; if (copy_to_user((struct fstrim_range __user *)arg, &range, sizeof(range))) return -EFAULT; return 0; } case EXT4_IOC_PRECACHE_EXTENTS: return ext4_ext_precache(inode); default: return -ENOTTY; } } #ifdef CONFIG_COMPAT long ext4_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { /* These are just misnamed, they actually get/put from/to user an int */ switch (cmd) { case EXT4_IOC32_GETFLAGS: cmd = EXT4_IOC_GETFLAGS; break; case EXT4_IOC32_SETFLAGS: cmd = EXT4_IOC_SETFLAGS; break; case EXT4_IOC32_GETVERSION: cmd = EXT4_IOC_GETVERSION; break; case EXT4_IOC32_SETVERSION: cmd = EXT4_IOC_SETVERSION; break; case EXT4_IOC32_GROUP_EXTEND: cmd = EXT4_IOC_GROUP_EXTEND; break; case EXT4_IOC32_GETVERSION_OLD: cmd = EXT4_IOC_GETVERSION_OLD; break; case EXT4_IOC32_SETVERSION_OLD: cmd = EXT4_IOC_SETVERSION_OLD; break; case EXT4_IOC32_GETRSVSZ: cmd = EXT4_IOC_GETRSVSZ; break; case EXT4_IOC32_SETRSVSZ: cmd = EXT4_IOC_SETRSVSZ; break; case EXT4_IOC32_GROUP_ADD: { struct compat_ext4_new_group_input __user *uinput; struct ext4_new_group_input input; mm_segment_t old_fs; int err; uinput = compat_ptr(arg); err = get_user(input.group, &uinput->group); err |= get_user(input.block_bitmap, &uinput->block_bitmap); err |= get_user(input.inode_bitmap, &uinput->inode_bitmap); err |= get_user(input.inode_table, &uinput->inode_table); err |= get_user(input.blocks_count, &uinput->blocks_count); err |= get_user(input.reserved_blocks, &uinput->reserved_blocks); if (err) return -EFAULT; old_fs = get_fs(); set_fs(KERNEL_DS); err = ext4_ioctl(file, EXT4_IOC_GROUP_ADD, (unsigned long) &input); set_fs(old_fs); return err; } case EXT4_IOC_MOVE_EXT: case FITRIM: case EXT4_IOC_RESIZE_FS: case EXT4_IOC_PRECACHE_EXTENTS: break; default: return -ENOIOCTLCMD; } return ext4_ioctl(file, cmd, (unsigned long) compat_ptr(arg)); } #endif ",0 "------ * ALPS_Software * * Description: * ------------ * This file implements the interface between BMT and ADC scheduler. * * Author: * ------- * Oscar Liu * *============================================================================ * $Revision: 1.0 $ * $Modtime: 11 Aug 2005 10:28:16 $ * $Log: //mtkvs01/vmdata/Maui_sw/archives/mcu/hal/peripheral/inc/bmt_chr_setting.h-arc $ * HISTORY * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! *------------------------------------------------------------------------------ *------------------------------------------------------------------------------ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! *============================================================================ ****************************************************************************/ #include #include ""bq24158.h"" #include #include #include #include #include #include #include #include #include #include #include #include // ============================================================ // //define // ============================================================ // #define STATUS_OK 0 #define STATUS_UNSUPPORTED -1 #define GETARRAYNUM(array) (sizeof(array)/sizeof(array[0])) // ============================================================ // //global variable // ============================================================ // static CHARGER_TYPE g_charger_type = CHARGER_UNKNOWN; #if defined(MTK_WIRELESS_CHARGER_SUPPORT) #define WIRELESS_CHARGER_EXIST_STATE 0 int wireless_charger_gpio_number = (168 | 0x80000000); #endif #if 1 #include int gpio_number = GPIO_SWCHARGER_EN_PIN; int gpio_off_mode = GPIO_SWCHARGER_EN_PIN_M_GPIO; int gpio_on_mode = GPIO_SWCHARGER_EN_PIN_M_GPIO; #else int gpio_number = (19 | 0x80000000); int gpio_off_mode = 0; int gpio_on_mode = 0; #endif int gpio_off_dir = GPIO_DIR_OUT; int gpio_off_out = GPIO_OUT_ONE; int gpio_on_dir = GPIO_DIR_OUT; int gpio_on_out = GPIO_OUT_ZERO; kal_bool charging_type_det_done = KAL_TRUE; const kal_uint32 VBAT_CV_VTH[]= { BATTERY_VOLT_03_500000_V, BATTERY_VOLT_03_520000_V, BATTERY_VOLT_03_540000_V, BATTERY_VOLT_03_560000_V, BATTERY_VOLT_03_580000_V, BATTERY_VOLT_03_600000_V, BATTERY_VOLT_03_620000_V, BATTERY_VOLT_03_640000_V, BATTERY_VOLT_03_660000_V, BATTERY_VOLT_03_680000_V, BATTERY_VOLT_03_700000_V, BATTERY_VOLT_03_720000_V, BATTERY_VOLT_03_740000_V, BATTERY_VOLT_03_760000_V, BATTERY_VOLT_03_780000_V, BATTERY_VOLT_03_800000_V, BATTERY_VOLT_03_820000_V, BATTERY_VOLT_03_840000_V, BATTERY_VOLT_03_860000_V, BATTERY_VOLT_03_880000_V, BATTERY_VOLT_03_900000_V, BATTERY_VOLT_03_920000_V, BATTERY_VOLT_03_940000_V, BATTERY_VOLT_03_960000_V, BATTERY_VOLT_03_980000_V, BATTERY_VOLT_04_000000_V, BATTERY_VOLT_04_020000_V, BATTERY_VOLT_04_040000_V, BATTERY_VOLT_04_060000_V, BATTERY_VOLT_04_080000_V, BATTERY_VOLT_04_100000_V, BATTERY_VOLT_04_120000_V, BATTERY_VOLT_04_140000_V, BATTERY_VOLT_04_160000_V, BATTERY_VOLT_04_180000_V, BATTERY_VOLT_04_200000_V, BATTERY_VOLT_04_220000_V, BATTERY_VOLT_04_240000_V, BATTERY_VOLT_04_260000_V, BATTERY_VOLT_04_280000_V, BATTERY_VOLT_04_300000_V, BATTERY_VOLT_04_320000_V, BATTERY_VOLT_04_340000_V, BATTERY_VOLT_04_360000_V, BATTERY_VOLT_04_380000_V, BATTERY_VOLT_04_400000_V, BATTERY_VOLT_04_420000_V, BATTERY_VOLT_04_440000_V }; #ifdef MEIZU_M79 const kal_uint32 CS_VTH[]= { 67000, 79000, 91000, 100000, 115000, 125000, 140000, 151500 }; #else const kal_uint32 CS_VTH[]= { CHARGE_CURRENT_550_00_MA, CHARGE_CURRENT_650_00_MA, CHARGE_CURRENT_750_00_MA, CHARGE_CURRENT_850_00_MA, CHARGE_CURRENT_950_00_MA, CHARGE_CURRENT_1050_00_MA, CHARGE_CURRENT_1150_00_MA, CHARGE_CURRENT_1250_00_MA }; #endif const kal_uint32 INPUT_CS_VTH[]= { CHARGE_CURRENT_100_00_MA, CHARGE_CURRENT_500_00_MA, CHARGE_CURRENT_800_00_MA, CHARGE_CURRENT_MAX }; const kal_uint32 VCDT_HV_VTH[]= { BATTERY_VOLT_04_200000_V, BATTERY_VOLT_04_250000_V, BATTERY_VOLT_04_300000_V, BATTERY_VOLT_04_350000_V, BATTERY_VOLT_04_400000_V, BATTERY_VOLT_04_450000_V, BATTERY_VOLT_04_500000_V, BATTERY_VOLT_04_550000_V, BATTERY_VOLT_04_600000_V, BATTERY_VOLT_06_000000_V, BATTERY_VOLT_06_500000_V, BATTERY_VOLT_07_000000_V, BATTERY_VOLT_07_500000_V, BATTERY_VOLT_08_500000_V, BATTERY_VOLT_09_500000_V, BATTERY_VOLT_10_500000_V }; // ============================================================ // // function prototype // ============================================================ // // ============================================================ // //extern variable // ============================================================ // // ============================================================ // //extern function // ============================================================ // extern kal_uint32 upmu_get_reg_value(kal_uint32 reg); extern bool mt_usb_is_device(void); extern void Charger_Detect_Init(void); extern void Charger_Detect_Release(void); extern int hw_charging_get_charger_type(void); extern void mt_power_off(void); extern kal_uint32 mt6311_get_chip_id(void); extern int is_mt6311_exist(void); extern int is_mt6311_sw_ready(void); // ============================================================ // kal_uint32 charging_value_to_parameter(const kal_uint32 *parameter, const kal_uint32 array_size, const kal_uint32 val) { if (val < array_size) { return parameter[val]; } else { battery_xlog_printk(BAT_LOG_CRTI, ""Can't find the parameter \r\n""); return parameter[0]; } } kal_uint32 charging_parameter_to_value(const kal_uint32 *parameter, const kal_uint32 array_size, const kal_uint32 val) { kal_uint32 i; for(i=0;i CHARGE_CURRENT_500_00_MA) { register_value = 0x3; } else { array_size = GETARRAYNUM(INPUT_CS_VTH); set_chr_current = bmt_find_closest_level(INPUT_CS_VTH, array_size, *(kal_uint32 *)data); register_value = charging_parameter_to_value(INPUT_CS_VTH, array_size ,set_chr_current); } bq24158_set_input_charging_current(register_value); return status; } static kal_uint32 charging_get_charging_status(void *data) { kal_uint32 status = STATUS_OK; kal_uint32 ret_val; ret_val = bq24158_get_chip_status(); if(ret_val == 0x2) *(kal_uint32 *)data = KAL_TRUE; else *(kal_uint32 *)data = KAL_FALSE; return status; } static kal_uint32 charging_reset_watch_dog_timer(void *data) { kal_uint32 status = STATUS_OK; bq24158_set_tmr_rst(1); return status; } static kal_uint32 charging_set_hv_threshold(void *data) { kal_uint32 status = STATUS_OK; kal_uint32 set_hv_voltage; kal_uint32 array_size; kal_uint16 register_value; kal_uint32 voltage = *(kal_uint32*)(data); array_size = GETARRAYNUM(VCDT_HV_VTH); set_hv_voltage = bmt_find_closest_level(VCDT_HV_VTH, array_size, voltage); register_value = charging_parameter_to_value(VCDT_HV_VTH, array_size ,set_hv_voltage); mt6325_upmu_set_rg_vcdt_hv_vth(register_value); return status; } static kal_uint32 charging_get_hv_status(void *data) { kal_uint32 status = STATUS_OK; #if defined(CONFIG_POWER_EXT) || defined(CONFIG_MTK_FPGA) *(kal_bool*)(data) = 0; battery_xlog_printk(BAT_LOG_CRTI,""[charging_get_hv_status] charger ok for bring up.\n""); #else *(kal_bool*)(data) = mt6325_upmu_get_rgs_vcdt_hv_det(); #endif return status; } static kal_uint32 charging_get_battery_status(void *data) { kal_uint32 status = STATUS_OK; #if defined(CONFIG_POWER_EXT) || defined(CONFIG_MTK_FPGA) *(kal_bool*)(data) = 0; // battery exist battery_xlog_printk(BAT_LOG_CRTI,""[charging_get_battery_status] battery exist for bring up.\n""); #else mt6325_upmu_set_baton_tdet_en(1); mt6325_upmu_set_rg_baton_en(1); *(kal_bool*)(data) = mt6325_upmu_get_rgs_baton_undet(); #endif return status; } static kal_uint32 charging_get_charger_det_status(void *data) { kal_uint32 status = STATUS_OK; kal_uint32 val = 0; #if defined(CONFIG_POWER_EXT) || defined(CONFIG_MTK_FPGA) val = 1; battery_xlog_printk(BAT_LOG_CRTI,""[charging_get_charger_det_status] charger exist for bring up.\n""); #else val = mt6325_upmu_get_rgs_chrdet(); #endif *(kal_bool*)(data) = val; if(val == 0) g_charger_type = CHARGER_UNKNOWN; return status; } kal_bool charging_type_detection_done(void) { return charging_type_det_done; } #ifdef MEIZU_M79 extern void tsu6721_charger_type(void *data); extern unsigned int mz_has_muic(void); #endif static kal_uint32 charging_get_charger_type(void *data) { #ifdef MEIZU_M79 if(mz_has_muic()) // 1: Has tsu6721; 0 : No tsu6721 {//use tsu6721 detect charer type kal_uint32 status = STATUS_OK; #if defined(CONFIG_POWER_EXT) *(CHARGER_TYPE*)(data) = STANDARD_HOST; #else msleep(200); tsu6721_charger_type(&g_charger_type); *(CHARGER_TYPE*)(data) = g_charger_type; printk(""%s:*********charger_type %d,%d\n"", __func__, g_charger_type, *(CHARGER_TYPE*)(data)); charging_type_det_done = KAL_TRUE; #endif return status; } else #endif {//use mt6325 bc1.1 detect charer type kal_uint32 status = STATUS_OK; #if defined(CONFIG_POWER_EXT) || defined(CONFIG_MTK_FPGA) *(CHARGER_TYPE*)(data) = STANDARD_HOST; #else if(is_chr_det()==0){ g_charger_type = CHARGER_UNKNOWN; *(CHARGER_TYPE*)(data) = CHARGER_UNKNOWN; battery_xlog_printk(BAT_LOG_CRTI, ""[charging_get_charger_type] return CHARGER_UNKNOWN\n""); return status; } charging_type_det_done = KAL_FALSE; *(CHARGER_TYPE*)(data) = hw_charging_get_charger_type(); //*(CHARGER_TYPE*)(data) = STANDARD_HOST; //*(CHARGER_TYPE*)(data) = STANDARD_CHARGER; charging_type_det_done = KAL_TRUE; g_charger_type = *(CHARGER_TYPE*)(data); battery_xlog_printk(BAT_LOG_CRTI, ""[charging_get_charger_type] return g_charger_type =%d\n"",g_charger_type); #endif return status; } } static kal_uint32 charging_get_is_pcm_timer_trigger(void *data) { kal_uint32 status = STATUS_OK; #if defined(CONFIG_POWER_EXT) || defined(CONFIG_MTK_FPGA) *(kal_bool*)(data) = KAL_FALSE; #else if(slp_get_wake_reason() == WR_PCM_TIMER) *(kal_bool*)(data) = KAL_TRUE; else *(kal_bool*)(data) = KAL_FALSE; battery_xlog_printk(BAT_LOG_CRTI, ""slp_get_wake_reason=%d\n"", slp_get_wake_reason()); #endif return status; } static kal_uint32 charging_set_platform_reset(void *data) { kal_uint32 status = STATUS_OK; #if defined(CONFIG_POWER_EXT) || defined(CONFIG_MTK_FPGA) #else battery_xlog_printk(BAT_LOG_CRTI, ""charging_set_platform_reset\n""); arch_reset(0,NULL); #endif return status; } static kal_uint32 charging_get_platfrom_boot_mode(void *data) { kal_uint32 status = STATUS_OK; #if defined(CONFIG_POWER_EXT) || defined(CONFIG_MTK_FPGA) #else *(kal_uint32*)(data) = get_boot_mode(); battery_xlog_printk(BAT_LOG_CRTI, ""get_boot_mode=%d\n"", get_boot_mode()); #endif return status; } static kal_uint32 charging_set_power_off(void *data) { kal_uint32 status = STATUS_OK; #if defined(CONFIG_POWER_EXT) || defined(CONFIG_MTK_FPGA) #else battery_xlog_printk(BAT_LOG_CRTI, ""charging_set_power_off=%d\n""); mt_power_off(); #endif return status; } static kal_uint32 charging_get_power_source(void *data) { return STATUS_UNSUPPORTED; } static kal_uint32 charging_get_csdac_full_flag(void *data) { return STATUS_UNSUPPORTED; } static kal_uint32 charging_set_ta_current_pattern(void *data) { return STATUS_UNSUPPORTED; } static kal_uint32 (* const charging_func[CHARGING_CMD_NUMBER])(void *data)= { charging_hw_init ,charging_dump_register ,charging_enable ,charging_set_cv_voltage ,charging_get_current ,charging_set_current ,charging_set_input_current ,charging_get_charging_status ,charging_reset_watch_dog_timer ,charging_set_hv_threshold ,charging_get_hv_status ,charging_get_battery_status ,charging_get_charger_det_status ,charging_get_charger_type ,charging_get_is_pcm_timer_trigger ,charging_set_platform_reset ,charging_get_platfrom_boot_mode ,charging_set_power_off ,charging_get_power_source ,charging_get_csdac_full_flag ,charging_set_ta_current_pattern }; /* * FUNCTION * Internal_chr_control_handler * * DESCRIPTION * This function is called to set the charger hw * * CALLS * * PARAMETERS * None * * RETURNS * * * GLOBALS AFFECTED * None */ kal_int32 chr_control_interface(CHARGING_CTRL_CMD cmd, void *data) { kal_int32 status; if(cmd < CHARGING_CMD_NUMBER) status = charging_func[cmd](data); else return STATUS_UNSUPPORTED; return status; } ",0 " * * @param \User\Model\User $userModel * @param array $options */ public function __construct(\User\Model\User $userModel, array $options = []) { $defaults = [ 'method' => 'post' ]; $this->userModel = $userModel; $formOptions = array_replace_recursive($defaults, $options); parent::__construct('user-form', $formOptions); } /** * */ protected function createBaseForm() { $inputFilter = $this->userModel->getInputFilter(); $fieldsDefinitions = $this->userModel->getFieldsDefinitions(); $this->setInputFilter($this->userModel->getInputFilter()); $this->bind($this->userModel); foreach ($this->getInputFilter()->getInputs() as $input) { $fieldName = $input->getName(); $fieldDefinition = $fieldsDefinitions[$fieldName]; //var_dump($fieldsDefinitions[$fieldName]); $element = null; switch (strtolower($fieldDefinition['type'])) { case 'text': $element = new \Zend\Form\Element\Text($fieldName); break; case 'select': $element = new \Zend\Form\Element\Select($fieldName); break; case 'hidden': default: $element = new \Zend\Form\Element\Hidden($fieldName); break; // ... } $fieldId = isset($fieldDefinition['options']['id']) ? $fieldDefinition['options']['id'] : 'field-' . $fieldName; $fieldClass = isset($fieldDefinition['options']['class']) ? $fieldDefinition['options']['class'] : 'formularz'; $fieldOptions = array_replace_recursive([ 'column-size' => 'xs-9' ], $fieldDefinition['options']); // walidacja $validators = $input->getValidatorChain()->getValidators(); $data = isset($fieldDefinition['options']['data']) ? $fieldDefinition['options']['data'] : []; foreach ($validators as $validator) { $validatorObject = $validator['instance']; switch (get_class($validatorObject)) { case 'Zend\Validator\StringLength': $messages = $validatorObject->getMessageTemplates(); $data['data-strlen-min'] = $validatorObject->getMin(); $data['data-strlen-max'] = $validatorObject->getMax(); $data['data-strlen-message-invalid'] = $messages['stringLengthInvalid']; $data['data-strlen-message-too-short'] = $messages['stringLengthTooShort']; $data['data-strlen-message-too-long'] = $messages['stringLengthTooLong']; if (0 < $validatorObject->getMax()) { $element->setAttributes([ 'maxlength' => $validatorObject->getMax() ]); } break; case 'Zend\Validator\Regex': $messages = $validatorObject->getMessageTemplates(); $pattern = trim($validatorObject->getPattern(), '/'); $element->setAttributes([ 'pattern' => $pattern ]); $data['data-regex-pattern'] = $pattern; $data['data-regex-message'] = $messages['regexNotMatch']; break; } } $element ->setAttributes(array_merge([ 'class' => $fieldClass, 'id' => $fieldId, ], $data)) ->setLabel($fieldDefinition['label']) ->setLabelAttributes([ 'class' => 'col-xs-3', 'for' => $fieldId, ]) ->setOptions($fieldOptions); $this->add($element); } // uzupełniamy select opcjami - tablica klucz => wartość $this->get('userStatus')->setValueOptions([ 'active' => 'Aktywny', 'inactive' => 'Nieaktywny', 'deleted' => 'Usunięty', 'suspended' => 'Zawieszony', ]); $saveButton = new \Zend\Form\Element\Submit('save'); $saveButton ->setLabel('Akcje') ->setValue('Zapisz') ->setAttributes([ 'class' => 'btn btn-primary' ]) ->setLabelAttributes([ 'class' => 'col-xs-3', 'for' => 'field-userName', ]) ->setOptions([ 'column-size' => 'xs-9' ]); $this->add($saveButton); /* można ""ręcznie"", każde pole osobno: $userNameField = new \Zend\Form\Element\Text('userName'); $userNameField ->setAttributes([ 'class' => '', 'id' => 'field-userName' ]) ->setLabel('Imię użytkownika') ->setLabelAttributes([ 'class' => 'col-xs-3', 'for' => 'field-userName', ]) ->setOptions([ 'column-size' => 'xs-9' ]); $userSurnameField = new \Zend\Form\Element\Text('userSurname'); $userSurnameField ->setAttributes([ 'class' => '', 'id' => 'field-userSurname' ]) ->setLabel('Nazwisko użytkownika') ->setLabelAttributes([ 'class' => 'col-xs-3', 'for' => 'field-userSurname', ]) ->setOptions([ 'column-size' => 'xs-9' ]); */ return $this; } /** * formularz do tworzenia użytkownika */ public function asCreateForm() { $this ->createBaseForm(); $this->get('save') ->setValue('Dodaj użytkownika'); return $this; } /** * formularz do edycji użytkownika */ public function asEditForm() { $this ->createBaseForm() ->populateValues($this->userModel); return $this; } }",0 """). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ package com.amazonaws.services.redshift.model.transform; import org.w3c.dom.Node; import javax.annotation.Generated; import com.amazonaws.AmazonServiceException; import com.amazonaws.transform.StandardErrorUnmarshaller; import com.amazonaws.services.redshift.model.AuthenticationProfileNotFoundException; @Generated(""com.amazonaws:aws-java-sdk-code-generator"") public class AuthenticationProfileNotFoundExceptionUnmarshaller extends StandardErrorUnmarshaller { public AuthenticationProfileNotFoundExceptionUnmarshaller() { super(AuthenticationProfileNotFoundException.class); } @Override public AmazonServiceException unmarshall(Node node) throws Exception { // Bail out if this isn't the right error code that this // marshaller understands String errorCode = parseErrorCode(node); if (errorCode == null || !errorCode.equals(""AuthenticationProfileNotFoundFault"")) return null; AuthenticationProfileNotFoundException e = (AuthenticationProfileNotFoundException) super.unmarshall(node); return e; } } ",0 " LICENSE file. #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_PRIVACY_BUDGET_IDENTIFIABILITY_STUDY_SETTINGS_H_ #define THIRD_PARTY_BLINK_PUBLIC_COMMON_PRIVACY_BUDGET_IDENTIFIABILITY_STUDY_SETTINGS_H_ #include #include ""third_party/blink/public/common/common_export.h"" #include ""third_party/blink/public/common/privacy_budget/identifiability_study_settings_provider.h"" #include ""third_party/blink/public/common/privacy_budget/identifiable_surface.h"" #include ""third_party/blink/public/mojom/web_feature/web_feature.mojom-forward.h"" namespace blink { // Determines whether the identifiability study is active and if so whether a // given surface or surface type should be sampled. // // This class can used from multiple threads and does not require // synchronization. // // See documentation on individual methods for notes on thread safety. // // Guidelines for when and how to use it can be found in: // // //docs/privacy_budget/privacy_budget_instrumentation.md#gating // class BLINK_COMMON_EXPORT IdentifiabilityStudySettings { public: // Constructs a default IdentifiabilityStudySettings instance. By default the // settings instance acts as if the study is disabled, and implicitly as if // all surfaces and types are blocked. IdentifiabilityStudySettings(); // Constructs a IdentifiabilityStudySettings instance which reflects the state // specified by |provider|. explicit IdentifiabilityStudySettings( std::unique_ptr provider); ~IdentifiabilityStudySettings(); // Get a pointer to an instance of IdentifiabilityStudySettings for the // process. // // This method and the returned object is safe to use from any thread and is // never destroyed. // // On the browser process, the returned instance is authoritative. On all // other processes the returned instance should be considered advisory. It's // only meant as an optimization to avoid calculating things unnecessarily. static const IdentifiabilityStudySettings* Get(); // Initialize the process-wide settings instance with the specified settings // provider. Should only be called once per process and only from the main // thread. // // For testing, you can use ResetStateForTesting(). static void SetGlobalProvider( std::unique_ptr provider); // Returns true if the study is active for this client. Once if it returns // true, it doesn't return false at any point after. The converse is not true. bool IsActive() const; // Returns true if |surface| is allowed. // // Will always return false if IsActive() is false. I.e. If the study is // inactive, all surfaces are considered to be blocked. Hence it is sufficient // to call this function directly instead of calling IsActive() before it. bool IsSurfaceAllowed(IdentifiableSurface surface) const; // Returns true if |type| is allowed. // // Will always return false if IsActive() is false. I.e. If the study is // inactive, all surface types are considered to be blocked. Hence it is // sufficient to call this function directly instead of calling IsActive() // before it. bool IsTypeAllowed(IdentifiableSurface::Type type) const; // Returns true if |surface| should be sampled. // // Will always return false if IsActive() is false or if IsSurfaceAllowed() is // false. I.e. If the study is inactive, all surfaces are considered to be // blocked. Hence it is sufficient to call this function directly instead of // calling IsActive() before it. bool ShouldSample(IdentifiableSurface surface) const; // Returns true if |type| should be sampled. // // Will always return false if IsActive() is false or if IsTypeAllowed() is // false. I.e. If the study is inactive, all surface types are considered to // be blocked. Hence it is sufficient to call this function directly instead // of calling IsActive() before it. bool ShouldSample(IdentifiableSurface::Type type) const; // Convenience method for determining whether the surface constructable from // the type (|kWebFeature|) and the |feature| is allowed. See IsSurfaceAllowed // for more detail. bool IsWebFeatureAllowed(mojom::WebFeature feature) const; // Only used for testing. Resets internal state and violates API contracts // made above about the lifetime of IdentifiabilityStudySettings*. static void ResetStateForTesting(); IdentifiabilityStudySettings(IdentifiabilityStudySettings&&) = delete; IdentifiabilityStudySettings(const IdentifiabilityStudySettings&) = delete; IdentifiabilityStudySettings& operator=(const IdentifiabilityStudySettings&) = delete; private: const std::unique_ptr provider_; const bool is_enabled_ = false; const bool is_any_surface_or_type_blocked_ = false; }; } // namespace blink #endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_PRIVACY_BUDGET_IDENTIFIABILITY_STUDY_SETTINGS_H_ ",0 "e Ballen\Dodns\CredentialManager; use Ballen\Dodns\Dodns; /** * Example of deleting a domain */ // We now create an instance of the DigitalOcean DNS client passing in our API credentials. $dns = new Dodns(new CredentialManager(file_get_contents('token.txt'))); // Set the domain entity that we wish to delete from our account... $domain = new \Ballen\Dodns\Entities\Domain(); $domain->setName('mytestdodmain.uk'); // Now we carry out the deletion and check if it was successful... if (!$dns->deleteDomain($domain)) { echo ""An error occured and the domain could not be deleted!""; } else { echo sprintf(""Congratulations, the domain %s has been deleted successfully!"", $domain->getName()); }",0 "General Public License v2 * Swedish translation by/ * Svensk översättning av: Tage Strandell, Webmaster vulcanriders-sweden.org * */ if (!defined('IN_PHPBB')) { exit; } if (empty($lang) || !is_array($lang)) { $lang = array(); } $lang = array_merge($lang, array( 'ACP_POST_LINKS' => 'Post links', 'PL_ENABLE' => 'Tillåt inläggslänkar', 'PL_ENABLE_EXPLAIN' => 'Om tillåtna, varje länk kommer att innehålla kopierbara av de typer som tillåts nedan.', 'PL_LINK_ENABLE' => 'Tillåt normallänk', 'PL_BBCODE_ENABLE' => 'Tillåt BB-kodlänk', 'PL_HTML_ENABLE' => 'Tillåt HTML-länk', )); ",0 "it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #undef DEBUG #include #include #include #include #include #include #include #include #include #include #include #include #include #include ""powernv.h"" /* /sys/firmware/opal */ struct kobject *opal_kobj; struct opal { u64 base; u64 entry; u64 size; } opal; struct mcheck_recoverable_range { u64 start_addr; u64 end_addr; u64 recover_addr; }; static struct mcheck_recoverable_range *mc_recoverable_range; static int mc_recoverable_range_len; static struct device_node *opal_node; static DEFINE_SPINLOCK(opal_write_lock); extern u64 opal_mc_secondary_handler[]; static unsigned int *opal_irqs; static unsigned int opal_irq_count; static ATOMIC_NOTIFIER_HEAD(opal_notifier_head); static DEFINE_SPINLOCK(opal_notifier_lock); static uint64_t last_notified_mask = 0x0ul; static atomic_t opal_notifier_hold = ATOMIC_INIT(0); static void opal_reinit_cores(void) { /* Do the actual re-init, This will clobber all FPRs, VRs, etc... * * It will preserve non volatile GPRs and HSPRG0/1. It will * also restore HIDs and other SPRs to their original value * but it might clobber a bunch. */ #ifdef __BIG_ENDIAN__ opal_reinit_cpus(OPAL_REINIT_CPUS_HILE_BE); #else opal_reinit_cpus(OPAL_REINIT_CPUS_HILE_LE); #endif } int __init early_init_dt_scan_opal(unsigned long node, const char *uname, int depth, void *data) { const void *basep, *entryp, *sizep; unsigned long basesz, entrysz, runtimesz; if (depth != 1 || strcmp(uname, ""ibm,opal"") != 0) return 0; basep = of_get_flat_dt_prop(node, ""opal-base-address"", &basesz); entryp = of_get_flat_dt_prop(node, ""opal-entry-address"", &entrysz); sizep = of_get_flat_dt_prop(node, ""opal-runtime-size"", &runtimesz); if (!basep || !entryp || !sizep) return 1; opal.base = of_read_number(basep, basesz/4); opal.entry = of_read_number(entryp, entrysz/4); opal.size = of_read_number(sizep, runtimesz/4); pr_debug(""OPAL Base = 0x%llx (basep=%p basesz=%ld)\n"", opal.base, basep, basesz); pr_debug(""OPAL Entry = 0x%llx (entryp=%p basesz=%ld)\n"", opal.entry, entryp, entrysz); pr_debug(""OPAL Entry = 0x%llx (sizep=%p runtimesz=%ld)\n"", opal.size, sizep, runtimesz); powerpc_firmware_features |= FW_FEATURE_OPAL; if (of_flat_dt_is_compatible(node, ""ibm,opal-v3"")) { powerpc_firmware_features |= FW_FEATURE_OPALv2; powerpc_firmware_features |= FW_FEATURE_OPALv3; printk(""OPAL V3 detected !\n""); } else if (of_flat_dt_is_compatible(node, ""ibm,opal-v2"")) { powerpc_firmware_features |= FW_FEATURE_OPALv2; printk(""OPAL V2 detected !\n""); } else { printk(""OPAL V1 detected !\n""); } /* Reinit all cores with the right endian */ opal_reinit_cores(); /* Restore some bits */ if (cur_cpu_spec->cpu_restore) cur_cpu_spec->cpu_restore(); return 1; } int __init early_init_dt_scan_recoverable_ranges(unsigned long node, const char *uname, int depth, void *data) { unsigned long i, psize, size; const __be32 *prop; if (depth != 1 || strcmp(uname, ""ibm,opal"") != 0) return 0; prop = of_get_flat_dt_prop(node, ""mcheck-recoverable-ranges"", &psize); if (!prop) return 1; pr_debug(""Found machine check recoverable ranges.\n""); /* * Calculate number of available entries. * * Each recoverable address range entry is (start address, len, * recovery address), 2 cells each for start and recovery address, * 1 cell for len, totalling 5 cells per entry. */ mc_recoverable_range_len = psize / (sizeof(*prop) * 5); /* Sanity check */ if (!mc_recoverable_range_len) return 1; /* Size required to hold all the entries. */ size = mc_recoverable_range_len * sizeof(struct mcheck_recoverable_range); /* * Allocate a buffer to hold the MC recoverable ranges. We would be * accessing them in real mode, hence it needs to be within * RMO region. */ mc_recoverable_range =__va(memblock_alloc_base(size, __alignof__(u64), ppc64_rma_size)); memset(mc_recoverable_range, 0, size); for (i = 0; i < mc_recoverable_range_len; i++) { mc_recoverable_range[i].start_addr = of_read_number(prop + (i * 5) + 0, 2); mc_recoverable_range[i].end_addr = mc_recoverable_range[i].start_addr + of_read_number(prop + (i * 5) + 2, 1); mc_recoverable_range[i].recover_addr = of_read_number(prop + (i * 5) + 3, 2); pr_debug(""Machine check recoverable range: %llx..%llx: %llx\n"", mc_recoverable_range[i].start_addr, mc_recoverable_range[i].end_addr, mc_recoverable_range[i].recover_addr); } return 1; } static int __init opal_register_exception_handlers(void) { #ifdef __BIG_ENDIAN__ u64 glue; if (!(powerpc_firmware_features & FW_FEATURE_OPAL)) return -ENODEV; /* Hookup some exception handlers except machine check. We use the * fwnmi area at 0x7000 to provide the glue space to OPAL */ glue = 0x7000; opal_register_exception_handler(OPAL_HYPERVISOR_MAINTENANCE_HANDLER, 0, glue); glue += 128; opal_register_exception_handler(OPAL_SOFTPATCH_HANDLER, 0, glue); #endif return 0; } early_initcall(opal_register_exception_handlers); int opal_notifier_register(struct notifier_block *nb) { if (!nb) { pr_warning(""%s: Invalid argument (%p)\n"", __func__, nb); return -EINVAL; } atomic_notifier_chain_register(&opal_notifier_head, nb); return 0; } static void opal_do_notifier(uint64_t events) { unsigned long flags; uint64_t changed_mask; if (atomic_read(&opal_notifier_hold)) return; spin_lock_irqsave(&opal_notifier_lock, flags); changed_mask = last_notified_mask ^ events; last_notified_mask = events; spin_unlock_irqrestore(&opal_notifier_lock, flags); /* * We feed with the event bits and changed bits for * enough information to the callback. */ atomic_notifier_call_chain(&opal_notifier_head, events, (void *)changed_mask); } void opal_notifier_update_evt(uint64_t evt_mask, uint64_t evt_val) { unsigned long flags; spin_lock_irqsave(&opal_notifier_lock, flags); last_notified_mask &= ~evt_mask; last_notified_mask |= evt_val; spin_unlock_irqrestore(&opal_notifier_lock, flags); } void opal_notifier_enable(void) { int64_t rc; uint64_t evt = 0; atomic_set(&opal_notifier_hold, 0); /* Process pending events */ rc = opal_poll_events(&evt); if (rc == OPAL_SUCCESS && evt) opal_do_notifier(evt); } void opal_notifier_disable(void) { atomic_set(&opal_notifier_hold, 1); } int opal_get_chars(uint32_t vtermno, char *buf, int count) { s64 rc; __be64 evt, len; if (!opal.entry) return -ENODEV; opal_poll_events(&evt); if ((be64_to_cpu(evt) & OPAL_EVENT_CONSOLE_INPUT) == 0) return 0; len = cpu_to_be64(count); rc = opal_console_read(vtermno, &len, buf); if (rc == OPAL_SUCCESS) return be64_to_cpu(len); return 0; } int opal_put_chars(uint32_t vtermno, const char *data, int total_len) { int written = 0; __be64 olen; s64 len, rc; unsigned long flags; __be64 evt; if (!opal.entry) return -ENODEV; /* We want put_chars to be atomic to avoid mangling of hvsi * packets. To do that, we first test for room and return * -EAGAIN if there isn't enough. * * Unfortunately, opal_console_write_buffer_space() doesn't * appear to work on opal v1, so we just assume there is * enough room and be done with it */ spin_lock_irqsave(&opal_write_lock, flags); if (firmware_has_feature(FW_FEATURE_OPALv2)) { rc = opal_console_write_buffer_space(vtermno, &olen); len = be64_to_cpu(olen); if (rc || len < total_len) { spin_unlock_irqrestore(&opal_write_lock, flags); /* Closed -> drop characters */ if (rc) return total_len; opal_poll_events(NULL); return -EAGAIN; } } /* We still try to handle partial completions, though they * should no longer happen. */ rc = OPAL_BUSY; while(total_len > 0 && (rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT || rc == OPAL_SUCCESS)) { olen = cpu_to_be64(total_len); rc = opal_console_write(vtermno, &olen, data); len = be64_to_cpu(olen); /* Closed or other error drop */ if (rc != OPAL_SUCCESS && rc != OPAL_BUSY && rc != OPAL_BUSY_EVENT) { written = total_len; break; } if (rc == OPAL_SUCCESS) { total_len -= len; data += len; written += len; } /* This is a bit nasty but we need that for the console to * flush when there aren't any interrupts. We will clean * things a bit later to limit that to synchronous path * such as the kernel console and xmon/udbg */ do opal_poll_events(&evt); while(rc == OPAL_SUCCESS && (be64_to_cpu(evt) & OPAL_EVENT_CONSOLE_OUTPUT)); } spin_unlock_irqrestore(&opal_write_lock, flags); return written; } static int opal_recover_mce(struct pt_regs *regs, struct machine_check_event *evt) { int recovered = 0; uint64_t ea = get_mce_fault_addr(evt); if (!(regs->msr & MSR_RI)) { /* If MSR_RI isn't set, we cannot recover */ recovered = 0; } else if (evt->disposition == MCE_DISPOSITION_RECOVERED) { /* Platform corrected itself */ recovered = 1; } else if (ea && !is_kernel_addr(ea)) { /* * Faulting address is not in kernel text. We should be fine. * We need to find which process uses this address. * For now, kill the task if we have received exception when * in userspace. * * TODO: Queue up this address for hwpoisioning later. */ if (user_mode(regs) && !is_global_init(current)) { _exception(SIGBUS, regs, BUS_MCEERR_AR, regs->nip); recovered = 1; } else recovered = 0; } else if (user_mode(regs) && !is_global_init(current) && evt->severity == MCE_SEV_ERROR_SYNC) { /* * If we have received a synchronous error when in userspace * kill the task. */ _exception(SIGBUS, regs, BUS_MCEERR_AR, regs->nip); recovered = 1; } return recovered; } int opal_machine_check(struct pt_regs *regs) { struct machine_check_event evt; if (!get_mce_event(&evt, MCE_EVENT_RELEASE)) return 0; /* Print things out */ if (evt.version != MCE_V1) { pr_err(""Machine Check Exception, Unknown event version %d !\n"", evt.version); return 0; } machine_check_print_event_info(&evt); if (opal_recover_mce(regs, &evt)) return 1; return 0; } static uint64_t find_recovery_address(uint64_t nip) { int i; for (i = 0; i < mc_recoverable_range_len; i++) if ((nip >= mc_recoverable_range[i].start_addr) && (nip < mc_recoverable_range[i].end_addr)) return mc_recoverable_range[i].recover_addr; return 0; } bool opal_mce_check_early_recovery(struct pt_regs *regs) { uint64_t recover_addr = 0; if (!opal.base || !opal.size) goto out; if ((regs->nip >= opal.base) && (regs->nip <= (opal.base + opal.size))) recover_addr = find_recovery_address(regs->nip); /* * Setup regs->nip to rfi into fixup address. */ if (recover_addr) regs->nip = recover_addr; out: return !!recover_addr; } static irqreturn_t opal_interrupt(int irq, void *data) { __be64 events; opal_handle_interrupt(virq_to_hw(irq), &events); opal_do_notifier(events); return IRQ_HANDLED; } static int opal_sysfs_init(void) { opal_kobj = kobject_create_and_add(""opal"", firmware_kobj); if (!opal_kobj) { pr_warn(""kobject_create_and_add opal failed\n""); return -ENOMEM; } return 0; } static int __init opal_init(void) { struct device_node *np, *consoles; const __be32 *irqs; int rc, i, irqlen; opal_node = of_find_node_by_path(""/ibm,opal""); if (!opal_node) { pr_warn(""opal: Node not found\n""); return -ENODEV; } /* Register OPAL consoles if any ports */ if (firmware_has_feature(FW_FEATURE_OPALv2)) consoles = of_find_node_by_path(""/ibm,opal/consoles""); else consoles = of_node_get(opal_node); if (consoles) { for_each_child_of_node(consoles, np) { if (strcmp(np->name, ""serial"")) continue; of_platform_device_create(np, NULL, NULL); } of_node_put(consoles); } /* Find all OPAL interrupts and request them */ irqs = of_get_property(opal_node, ""opal-interrupts"", &irqlen); pr_debug(""opal: Found %d interrupts reserved for OPAL\n"", irqs ? (irqlen / 4) : 0); opal_irq_count = irqlen / 4; opal_irqs = kzalloc(opal_irq_count * sizeof(unsigned int), GFP_KERNEL); for (i = 0; irqs && i < (irqlen / 4); i++, irqs++) { unsigned int hwirq = be32_to_cpup(irqs); unsigned int irq = irq_create_mapping(NULL, hwirq); if (irq == NO_IRQ) { pr_warning(""opal: Failed to map irq 0x%x\n"", hwirq); continue; } rc = request_irq(irq, opal_interrupt, 0, ""opal"", NULL); if (rc) pr_warning(""opal: Error %d requesting irq %d"" "" (0x%x)\n"", rc, irq, hwirq); opal_irqs[i] = irq; } /* Create ""opal"" kobject under /sys/firmware */ rc = opal_sysfs_init(); if (rc == 0) { /* Setup code update interface */ opal_flash_init(); } return 0; } subsys_initcall(opal_init); void opal_shutdown(void) { unsigned int i; for (i = 0; i < opal_irq_count; i++) { if (opal_irqs[i]) free_irq(opal_irqs[i], NULL); opal_irqs[i] = 0; } } ",0 "
{% for class_val in class_values %} {% endfor %}
",0 ". ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the Qt Mobility Components. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial Usage ** Licensees holding valid Qt Commercial licenses may use this file in ** accordance with the Qt Commercial License Agreement provided with ** the Software or, alternatively, in accordance with the terms ** contained in a written agreement between you and Nokia. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef S60CCAMERAENGINE_H #define S60CCAMERAENGINE_H // INCLUDES #include #include // for MCameraObserver(2) #ifdef S60_CAM_AUTOFOCUS_SUPPORT #include // for CCamAutoFocus, MCamAutoFocusObserver #endif // FORWARD DECLARATIONS class MCameraEngineObserver; class MCameraEngineImageCaptureObserver; class MAdvancedSettingsObserver; class MCameraViewfinderObserver; /* * CameraEngine handling ECam operations needed. */ NONSHARABLE_CLASS( CCameraEngine ) : public CBase, public MCameraObserver, public MCameraObserver2 #ifdef S60_CAM_AUTOFOCUS_SUPPORT ,public MCamAutoFocusObserver #endif { public: // Enums enum TCameraEngineState { EEngineNotReady = 0, // 0 - No resources reserved EEngineInitializing, // 1 - Reserving and Powering On EEngineIdle, // 2 - Reseved and Powered On EEngineCapturing, // 3 - Capturing Still Image EEngineFocusing // 4 - Focusing }; public: // Constructor & Destructor static CCameraEngine* NewL( TInt aCameraHandle, TInt aPriority, MCameraEngineObserver* aObserver ); ~CCameraEngine(); public: /** * External Advanced Settings callback observer. */ void SetAdvancedObserver(MAdvancedSettingsObserver *aAdvancedSettingsObserver); /** * External Image Capture callback observer. */ void SetImageCaptureObserver(MCameraEngineImageCaptureObserver *aImageCaptureObserver); /** * External Viewfinder callback observer. */ void SetViewfinderObserver(MCameraViewfinderObserver *aViewfinderObserver); /** * Static function that returns the number of cameras on the device. */ static TInt CamerasAvailable(); /** * Returns the index of the currently active camera device */ TInt currentCameraIndex() const { return iCameraIndex; } /** * Returns the current state (TCameraEngineState) * of the camera engine. */ TCameraEngineState State() const { return iEngineState; } /** * Returns true if the camera has been reserved and * powered on, and not recording or capturing image */ TBool IsCameraReady() const; /** * Returns whether DirectScreen ViewFinder is supported by the platform */ TBool IsDirectViewFinderSupported() const; /** * Returns true if the camera supports AutoFocus. */ TBool IsAutoFocusSupported() const; /** * Returns camera info */ TCameraInfo *cameraInfo(); /** * Captures an image. When complete, observer will receive * MceoCapturedDataReady() or MceoCapturedBitmapReady() callback, * depending on which image format was used in PrepareL(). * @leave May leave with KErrNotReady if camera is not * reserved or prepared for capture. */ void CaptureL(); /** * Cancels ongoing image capture */ void cancelCapture(); /** * Reserves and powers on the camera. When complete, * observer will receive MceoCameraReady() callback * */ void ReserveAndPowerOn(); /** * Releases and powers off the camera * */ void ReleaseAndPowerOff(); /** * Prepares for image capture. * @param aCaptureSize requested capture size. On return, * contains the selected size (closest match) * @param aFormat Image format to use. Default is JPEG with * EXIF information as provided by the camera module * @leave KErrNotSupported, KErrNoMemory, KErrNotReady */ void PrepareL( TSize& aCaptureSize, CCamera::TFormat aFormat = CCamera::EFormatExif ); /** * Starts the viewfinder. Observer will receive * MceoViewFinderFrameReady() callbacks periodically. * @param aSize requested viewfinder size. On return, * contains the selected size. * * @leave KErrNotSupported is viewfinding with bitmaps is not * supported, KErrNotReady */ void StartViewFinderL( TSize& aSize ); /** * Stops the viewfinder if active. */ void StopViewFinder(); void StartDirectViewFinderL(RWsSession& aSession, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aSize); /** * Releases memory for the last received viewfinder frame. * Client must call this in response to MceoViewFinderFrameReady() * callback, after drawing the viewfinder frame is complete. */ void ReleaseViewFinderBuffer(); /** * Releases memory for the last captured image. * Client must call this in response to MceoCapturedDataReady() * or MceoCapturedBitmapReady()callback, after processing the * data/bitmap is complete. */ void ReleaseImageBuffer(); /** * Starts focusing. Does nothing if AutoFocus is not supported. * When complete, observer will receive MceoFocusComplete() * callback. * @leave KErrInUse, KErrNotReady */ void StartFocusL(); /** * Cancels the ongoing focusing operation. */ void FocusCancel(); /** * Gets a bitfield of supported focus ranges. * @param aSupportedRanges a bitfield of either TAutoFocusRange * (S60 3.0/3.1 devices) or TFocusRange (S60 3.2 and onwards) values */ void SupportedFocusRanges( TInt& aSupportedRanges ) const; /** * Sets the focus range * @param aFocusRange one of the values returned by * SupportedFocusRanges(). */ void SetFocusRange( TInt aFocusRange ); /** * Returns a pointer to CCamera object used by the engine. * Allows getting access to additional functionality * from CCamera - do not use for functionality already provided * by CCameraEngine methods. */ CCamera* Camera() { return iCamera; } protected: // Protected constructors CCameraEngine(); CCameraEngine( TInt aCameraHandle, TInt aPriority, MCameraEngineObserver* aObserver ); void ConstructL(); protected: // MCameraObserver /** * From MCameraObserver * Gets called when CCamera::Reserve() is completed. * (V2: Called internally from HandleEvent) */ virtual void ReserveComplete(TInt aError); /** * From MCameraObserver. * Gets called when CCamera::PowerOn() is completed. * (V2: Called internally from HandleEvent) */ virtual void PowerOnComplete(TInt aError); /** * From MCameraObserver. * Gets called when CCamera::StartViewFinderBitmapsL() is completed. * (V2: Called internally from ViewFinderReady) */ virtual void ViewFinderFrameReady( CFbsBitmap& aFrame ); /** * From MCameraObserver. * Gets called when CCamera::CaptureImage() is completed. */ virtual void ImageReady( CFbsBitmap* aBitmap, HBufC8* aData, TInt aError ); /** * From MCameraObserver. * Video capture not implemented. */ virtual void FrameBufferReady( MFrameBuffer* /*aFrameBuffer*/, TInt /*aError*/ ) {} protected: // MCameraObserver2 /** * From MCameraObserver2 * Camera event handler */ virtual void HandleEvent(const TECAMEvent &aEvent); /** * From MCameraObserver2 * Notifies the client of new viewfinder data */ virtual void ViewFinderReady(MCameraBuffer &aCameraBuffer, TInt aError); /** * From MCameraObserver2 * Notifies the client of a new captured image */ virtual void ImageBufferReady(MCameraBuffer &aCameraBuffer, TInt aError); /** * From MCameraObserver2 * Video capture not implemented. */ virtual void VideoBufferReady(MCameraBuffer& /*aCameraBuffer*/, TInt /*aError*/) {} protected: // MCamAutoFocusObserver /** * From MCamAutoFocusObserver. * Delivers notification of completion of auto focus initialisation to * an interested party. * @param aError Reason for completion of focus request. */ virtual void InitComplete( TInt aError ); /** * From MCamAutoFocusObserver. * Gets called when CCamAutoFocus::AttemptOptimisedFocusL() is * completed. * (V2: Called internally from HandleEvent) */ virtual void OptimisedFocusComplete( TInt aError ); private: // Internal functions /** * Internal function to handle ImageReady callbacks from * both observer (V1 & V2) interfaces */ void HandleImageReady(const TInt aError, const bool isBitmap); private: // Data CCamera *iCamera; MCameraEngineObserver *iObserver; MCameraEngineImageCaptureObserver *iImageCaptureObserver; MAdvancedSettingsObserver *iAdvancedSettingsObserver; MCameraViewfinderObserver *iViewfinderObserver; MCameraBuffer *iViewFinderBuffer; /* * Following pointers are for the image buffers: * * Makes buffering of 2 concurrent image buffers possible */ MCameraBuffer *iImageBuffer1; MCameraBuffer *iImageBuffer2; TDesC8 *iImageData1; TDesC8 *iImageData2; CFbsBitmap *iImageBitmap1; CFbsBitmap *iImageBitmap2; TInt iCameraIndex; TInt iPriority; TCameraEngineState iEngineState; TCameraInfo iCameraInfo; CCamera::TFormat iImageCaptureFormat; bool iNew2LImplementation; int iLatestImageBufferIndex; // 0 = Buffer1, 1 = Buffer2 #ifdef S60_CAM_AUTOFOCUS_SUPPORT CCamAutoFocus* iAutoFocus; CCamAutoFocus::TAutoFocusRange iAFRange; #endif // S60_CAM_AUTOFOCUS_SUPPORT }; #endif // S60CCAMERAENGINE_H ",0 "to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED ""AS IS"" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* * MD ptrace definitions */ #define PT_STEP (PT_FIRSTMACH + 0) #define PT_GETREGS (PT_FIRSTMACH + 1) #define PT_SETREGS (PT_FIRSTMACH + 2) #define PT_GETFPREGS (PT_FIRSTMACH + 3) #define PT_SETFPREGS (PT_FIRSTMACH + 4) ",0 "copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Validator */ namespace ZendTest\Validator\File; use Zend\Validator\File\ExcludeMimeType; /** * ExcludeMimeType testbed * * @category Zend * @package Zend_Validator_File * @subpackage UnitTests * @group Zend_Validator */ class ExcludeMimeTypeTest extends \PHPUnit_Framework_TestCase { /** * @return array */ public function basicBehaviorDataProvider() { $testFile = __DIR__ . '/_files/picture.jpg'; $fileUpload = array( 'tmp_name' => $testFile, 'name' => basename($testFile), 'size' => 200, 'error' => 0, 'type' => 'image/jpeg' ); return array( // Options, isValid Param, Expected value array('image/gif', $fileUpload, true), array('image', $fileUpload, false), array('test/notype', $fileUpload, true), array('image/gif, image/jpeg', $fileUpload, false), array(array('image/vasa', 'image/gif'), $fileUpload, true), array(array('image/gif', 'jpeg'), $fileUpload, false), array(array('image/gif', 'gif'), $fileUpload, true), ); } /** * Ensures that the validator follows expected behavior * * @dataProvider basicBehaviorDataProvider * @return void */ public function testBasic($options, $isValidParam, $expected) { $validator = new ExcludeMimeType($options); $validator->enableHeaderCheck(); $this->assertEquals($expected, $validator->isValid($isValidParam)); } /** * Ensures that the validator follows expected behavior for legacy Zend\Transfer API * * @dataProvider basicBehaviorDataProvider * @return void */ public function testLegacy($options, $isValidParam, $expected) { if (is_array($isValidParam)) { $validator = new ExcludeMimeType($options); $validator->enableHeaderCheck(); $this->assertEquals($expected, $validator->isValid($isValidParam['tmp_name'], $isValidParam)); } } /** * Ensures that getMimeType() returns expected value * * @return void */ public function testGetMimeType() { $validator = new ExcludeMimeType('image/gif'); $this->assertEquals('image/gif', $validator->getMimeType()); $validator = new ExcludeMimeType(array('image/gif', 'video', 'text/test')); $this->assertEquals('image/gif,video,text/test', $validator->getMimeType()); $validator = new ExcludeMimeType(array('image/gif', 'video', 'text/test')); $this->assertEquals(array('image/gif', 'video', 'text/test'), $validator->getMimeType(true)); } /** * Ensures that setMimeType() returns expected value * * @return void */ public function testSetMimeType() { $validator = new ExcludeMimeType('image/gif'); $validator->setMimeType('image/jpeg'); $this->assertEquals('image/jpeg', $validator->getMimeType()); $this->assertEquals(array('image/jpeg'), $validator->getMimeType(true)); $validator->setMimeType('image/gif, text/test'); $this->assertEquals('image/gif,text/test', $validator->getMimeType()); $this->assertEquals(array('image/gif', 'text/test'), $validator->getMimeType(true)); $validator->setMimeType(array('video/mpeg', 'gif')); $this->assertEquals('video/mpeg,gif', $validator->getMimeType()); $this->assertEquals(array('video/mpeg', 'gif'), $validator->getMimeType(true)); } /** * Ensures that addMimeType() returns expected value * * @return void */ public function testAddMimeType() { $validator = new ExcludeMimeType('image/gif'); $validator->addMimeType('text'); $this->assertEquals('image/gif,text', $validator->getMimeType()); $this->assertEquals(array('image/gif', 'text'), $validator->getMimeType(true)); $validator->addMimeType('jpg, to'); $this->assertEquals('image/gif,text,jpg,to', $validator->getMimeType()); $this->assertEquals(array('image/gif', 'text', 'jpg', 'to'), $validator->getMimeType(true)); $validator->addMimeType(array('zip', 'ti')); $this->assertEquals('image/gif,text,jpg,to,zip,ti', $validator->getMimeType()); $this->assertEquals(array('image/gif', 'text', 'jpg', 'to', 'zip', 'ti'), $validator->getMimeType(true)); $validator->addMimeType(''); $this->assertEquals('image/gif,text,jpg,to,zip,ti', $validator->getMimeType()); $this->assertEquals(array('image/gif', 'text', 'jpg', 'to', 'zip', 'ti'), $validator->getMimeType(true)); } } ",0 " 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. */ package com.android.inputmethod.latin; import android.content.Context; import com.android.inputmethod.keyboard.ProximityInfo; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.makedict.DictEncoder; import com.android.inputmethod.latin.makedict.FormatSpec; import com.android.inputmethod.latin.makedict.FusionDictionary; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray; import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; import com.android.inputmethod.latin.makedict.UnsupportedFormatException; import com.android.inputmethod.latin.utils.CollectionUtils; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; /** * An in memory dictionary for memorizing entries and writing a binary dictionary. */ public class DictionaryWriter extends AbstractDictionaryWriter { private static final int BINARY_DICT_VERSION = 3; private static final FormatSpec.FormatOptions FORMAT_OPTIONS = new FormatSpec.FormatOptions(BINARY_DICT_VERSION, true /* supportsDynamicUpdate */); private FusionDictionary mFusionDictionary; public DictionaryWriter(final Context context, final String dictType) { super(context, dictType); clear(); } @Override public void clear() { final HashMap attributes = CollectionUtils.newHashMap(); mFusionDictionary = new FusionDictionary(new PtNodeArray(), new FusionDictionary.DictionaryOptions(attributes, false, false)); } /** * Adds a word unigram to the fusion dictionary. */ // TODO: Create ""cache dictionary"" to cache fresh words for frequently updated dictionaries, // considering performance regression. @Override public void addUnigramWord(final String word, final String shortcutTarget, final int frequency, final int shortcutFreq, final boolean isNotAWord) { if (shortcutTarget == null) { mFusionDictionary.add(word, frequency, null, isNotAWord); } else { // TODO: Do this in the subclass, with this class taking an arraylist. final ArrayList shortcutTargets = CollectionUtils.newArrayList(); shortcutTargets.add(new WeightedString(shortcutTarget, shortcutFreq)); mFusionDictionary.add(word, frequency, shortcutTargets, isNotAWord); } } @Override public void addBigramWords(final String word0, final String word1, final int frequency, final boolean isValid, final long lastModifiedTime) { mFusionDictionary.setBigram(word0, word1, frequency); } @Override public void removeBigramWords(final String word0, final String word1) { // This class don't support removing bigram words. } @Override protected void writeDictionary(final DictEncoder dictEncoder, final Map attributeMap) throws IOException, UnsupportedFormatException { for (final Map.Entry entry : attributeMap.entrySet()) { mFusionDictionary.addOptionAttribute(entry.getKey(), entry.getValue()); } dictEncoder.writeDictionary(mFusionDictionary, FORMAT_OPTIONS); } @Override public ArrayList getSuggestions(final WordComposer composer, final String prevWord, final ProximityInfo proximityInfo, boolean blockOffensiveWords, final int[] additionalFeaturesOptions) { // This class doesn't support suggestion. return null; } @Override public boolean isValidWord(String word) { // This class doesn't support dictionary retrieval. return false; } } ",0 "censed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN ""AS IS"" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: EfiShell.c Abstract: FFS Filename for EFI Shell --*/ #include ""Tiano.h"" #include EFI_GUID_DEFINITION (EfiShell) EFI_GUID gEfiShellFileGuid = EFI_SHELL_FILE_GUID; EFI_GUID gEfiMiniShellFileGuid = EFI_MINI_SHELL_FILE_GUID; EFI_GUID_STRING (&gEfiShellFileGuid, ""EfiShell"", ""Efi Shell FFS file name GUID"") EFI_GUID_STRING (&gEfiMiniShellFileGuid, ""EfiMiniShell"", ""Efi Mini-Shell FFS file name GUID"") ",0 " width: auto; display: inline; } .map_canvas img { max-width: none; } .olImageLoadError { /* when OL encounters a 404, don't display the pink image */ display: none !important; } #loading{ position:absolute; z-index: 10000; width: 100%; height: 100%; margin-top: 0px; margin-left: 0px; background-color: rgba(255,255,255,1); } #facts { position: relative; margin-top:200px; } .layersDiv label { color: white; }
Loading task...

Add a mark for every house you see, then click Submit task. Submit without marks if there are no houses, or if there is no satellite image available.

Maps by Bing from Microsoft

You are working on task: Tutorial


× Well done! Your answer has been saved
× Loading next task...
The task has been completed! Thanks a lot!
Congratulations! You have participated in all available tasks!
× Error! Something went wrong, please contact the site administrators

Your progress

",0 "DTD/xhtml1-transitional.dtd""> Class: Gem::Package::TarReader::UnexpectedEOF
Class Gem::Package::TarReader::UnexpectedEOF
In: lib/rubygems/package/tar_reader.rb
Parent: StandardError

Raised if the tar IO is not seekable

",0 "aksim Kotlyar */ class fpErrorNotifierDecoratorHtml extends fpBaseErrorNotifierDecorator { /** * * @return string */ public function format() { return 'text/html'; } /** * * @return string */ public function render() { return ''.parent::render().''; } /** * * @param array $data * * @return string */ protected function _renderSection(array $data) { $body = ''; foreach ($data as $name => $value) { $body .= $this->_renderRow($name, $value); } $body .= '
'; return $body; } /** * * @param string $th * @param string $td * * @return string */ protected function _renderRow($th, $td = '') { return "" \n {$this->notifier()->helper()->formatTitle($th)}: \n {$this->_prepareValue($td)} \n ""; } /** * * @param string $title * * @return string */ protected function _renderTitle($title) { return ""

{$this->notifier()->helper()->formatTitle($title)}

""; } /** * * @param string $value * * @return string */ protected function _prepareValue($value) { $return = ""
"";
    $return .= $this->notifier()->helper()->formatValue($value);
    $return .= '
'; return $return; } } ",0 "ation, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Routing\Generator\Dumper; /** * PhpGeneratorDumper creates a PHP class able to generate URLs for a given set of routes. * * @author Fabien Potencier * @author Tobias Schultze * * @api */ class PhpGeneratorDumper extends GeneratorDumper { /** * Dumps a set of routes to a PHP class. * * Available options: * * * class: The class name * * base_class: The base class name * * @param array $options An array of options * * @return string A PHP class representing the generator class * * @api */ public function dump(array $options = array()) { $options = array_merge(array( 'class' => 'ProjectUrlGenerator', 'base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', ), $options); return <<generateDeclaredRoutes()}; /** * Constructor. */ public function __construct(RequestContext \$context, LoggerInterface \$logger = null) { \$this->context = \$context; \$this->logger = \$logger; } {$this->generateGenerateMethod()} } EOF; } /** * Generates PHP code representing an array of defined routes * together with the routes properties (e.g. requirements). * * @return string PHP code */ private function generateDeclaredRoutes() { $routes = ""array(\n""; foreach ($this->getRoutes()->all() as $name => $route) { $compiledRoute = $route->compile(); $properties = array(); $properties[] = $compiledRoute->getVariables(); $properties[] = $route->getDefaults(); $properties[] = $route->getRequirements(); $properties[] = $compiledRoute->getTokens(); $properties[] = $compiledRoute->getHostTokens(); $routes .= sprintf("" '%s' => %s,\n"", $name, str_replace(""\n"", '', var_export($properties, true))); } $routes .= ' )'; return $routes; } /** * Generates PHP code representing the `generate` method that implements the UrlGeneratorInterface. * * @return string PHP code */ private function generateGenerateMethod() { return <<doGenerate(\$variables, \$defaults, \$requirements, \$tokens, \$parameters, \$name, \$referenceType, \$hostTokens); } EOF; } } ",0 "ffero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ package org.openjst.server.commons.maven; import org.apache.commons.io.FileUtils; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.testng.annotations.Test; import java.io.File; import java.io.IOException; /** * @author Sergey Grachev */ public final class CompileMojoTest extends AbstractMojoTest { @Test(groups = ""manual"") public void test() throws IOException, MojoFailureException, MojoExecutionException { final File resourcesPath = makeTempResourcesDirectory(); try { final CompileMojo mojo = new CompileMojo(new File(resourcesPath, ""manifest.xml"")); mojo.execute(); } catch (Exception e) { e.printStackTrace(); } finally { FileUtils.deleteDirectory(resourcesPath); } } } ",0 " Vladimir Shebordaev * *************************************************************************** * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, * USA. * *************************************************************************** * * Gemtek Corp still silently refuses to release any specifications * of their multimedia devices, so the protocol still has to be * reverse engineered. * * The v4l code was inspired by Jonas Munsin's Gemtek serial line * radio device driver. * * Please, let me know if this piece of code was useful :) * * TODO: multiple device support and portability were not tested * * Converted to V4L2 API by Mauro Carvalho Chehab * *************************************************************************** */ #include #include #include #include #include #include #include #include #include /* for KERNEL_VERSION MACRO */ #define RADIO_VERSION KERNEL_VERSION(0,0,2) static struct v4l2_queryctrl radio_qctrl[] = { { .id = V4L2_CID_AUDIO_MUTE, .name = ""Mute"", .minimum = 0, .maximum = 1, .default_value = 1, .type = V4L2_CTRL_TYPE_BOOLEAN, },{ .id = V4L2_CID_AUDIO_VOLUME, .name = ""Volume"", .minimum = 0, .maximum = 65535, .step = 65535, .default_value = 0xff, .type = V4L2_CTRL_TYPE_INTEGER, } }; #include #include #ifndef PCI_VENDOR_ID_GEMTEK #define PCI_VENDOR_ID_GEMTEK 0x5046 #endif #ifndef PCI_DEVICE_ID_GEMTEK_PR103 #define PCI_DEVICE_ID_GEMTEK_PR103 0x1001 #endif #ifndef GEMTEK_PCI_RANGE_LOW #define GEMTEK_PCI_RANGE_LOW (87*16000) #endif #ifndef GEMTEK_PCI_RANGE_HIGH #define GEMTEK_PCI_RANGE_HIGH (108*16000) #endif struct gemtek_pci_card { struct video_device *videodev; u32 iobase; u32 length; u8 chiprev; u16 model; u32 current_frequency; u8 mute; }; static const char rcsid[] = ""$Id: radio-gemtek-pci.c,v 1.1.1.1 2007/06/12 07:27:09 eyryu Exp $""; static int nr_radio = -1; static inline u8 gemtek_pci_out( u16 value, u32 port ) { outw( value, port ); return (u8)value; } #define _b0( v ) *((u8 *)&v) static void __gemtek_pci_cmd( u16 value, u32 port, u8 *last_byte, int keep ) { register u8 byte = *last_byte; if ( !value ) { if ( !keep ) value = (u16)port; byte &= 0xfd; } else byte |= 2; _b0( value ) = byte; outw( value, port ); byte |= 1; _b0( value ) = byte; outw( value, port ); byte &= 0xfe; _b0( value ) = byte; outw( value, port ); *last_byte = byte; } static inline void gemtek_pci_nil( u32 port, u8 *last_byte ) { __gemtek_pci_cmd( 0x00, port, last_byte, false ); } static inline void gemtek_pci_cmd( u16 cmd, u32 port, u8 *last_byte ) { __gemtek_pci_cmd( cmd, port, last_byte, true ); } static void gemtek_pci_setfrequency( struct gemtek_pci_card *card, unsigned long frequency ) { register int i; register u32 value = frequency / 200 + 856; register u16 mask = 0x8000; u8 last_byte; u32 port = card->iobase; last_byte = gemtek_pci_out( 0x06, port ); i = 0; do { gemtek_pci_nil( port, &last_byte ); i++; } while ( i < 9 ); i = 0; do { gemtek_pci_cmd( value & mask, port, &last_byte ); mask >>= 1; i++; } while ( i < 16 ); outw( 0x10, port ); } static inline void gemtek_pci_mute( struct gemtek_pci_card *card ) { outb( 0x1f, card->iobase ); card->mute = true; } static inline void gemtek_pci_unmute( struct gemtek_pci_card *card ) { if ( card->mute ) { gemtek_pci_setfrequency( card, card->current_frequency ); card->mute = false; } } static inline unsigned int gemtek_pci_getsignal( struct gemtek_pci_card *card ) { return ( inb( card->iobase ) & 0x08 ) ? 0 : 1; } static int gemtek_pci_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg) { struct video_device *dev = video_devdata(file); struct gemtek_pci_card *card = dev->priv; switch ( cmd ) { case VIDIOC_QUERYCAP: { struct v4l2_capability *v = arg; memset(v,0,sizeof(*v)); strlcpy(v->driver, ""radio-gemtek-pci"", sizeof (v->driver)); strlcpy(v->card, ""GemTek PCI Radio"", sizeof (v->card)); sprintf(v->bus_info,""ISA""); v->version = RADIO_VERSION; v->capabilities = V4L2_CAP_TUNER; return 0; } case VIDIOC_G_TUNER: { struct v4l2_tuner *v = arg; if (v->index > 0) return -EINVAL; memset(v,0,sizeof(*v)); strcpy(v->name, ""FM""); v->type = V4L2_TUNER_RADIO; v->rangelow = GEMTEK_PCI_RANGE_LOW; v->rangehigh = GEMTEK_PCI_RANGE_HIGH; v->rxsubchans =V4L2_TUNER_SUB_MONO; v->capability=V4L2_TUNER_CAP_LOW; v->audmode = V4L2_TUNER_MODE_MONO; v->signal=0xFFFF*gemtek_pci_getsignal( card ); return 0; } case VIDIOC_S_TUNER: { struct v4l2_tuner *v = arg; if (v->index > 0) return -EINVAL; return 0; } case VIDIOC_S_FREQUENCY: { struct v4l2_frequency *f = arg; if ( (f->frequency < GEMTEK_PCI_RANGE_LOW) || (f->frequency > GEMTEK_PCI_RANGE_HIGH) ) return -EINVAL; gemtek_pci_setfrequency( card, f->frequency ); card->current_frequency = f->frequency; card->mute = false; return 0; } case VIDIOC_QUERYCTRL: { struct v4l2_queryctrl *qc = arg; int i; for (i = 0; i < ARRAY_SIZE(radio_qctrl); i++) { if (qc->id && qc->id == radio_qctrl[i].id) { memcpy(qc, &(radio_qctrl[i]), sizeof(*qc)); return (0); } } return -EINVAL; } case VIDIOC_G_CTRL: { struct v4l2_control *ctrl= arg; switch (ctrl->id) { case V4L2_CID_AUDIO_MUTE: ctrl->value=card->mute; return (0); case V4L2_CID_AUDIO_VOLUME: if (card->mute) ctrl->value=0; else ctrl->value=65535; return (0); } return -EINVAL; } case VIDIOC_S_CTRL: { struct v4l2_control *ctrl= arg; switch (ctrl->id) { case V4L2_CID_AUDIO_MUTE: if (ctrl->value) { gemtek_pci_mute(card); } else { gemtek_pci_unmute(card); } return (0); case V4L2_CID_AUDIO_VOLUME: if (ctrl->value) { gemtek_pci_unmute(card); } else { gemtek_pci_mute(card); } return (0); } return -EINVAL; } default: return v4l_compat_translate_ioctl(inode,file,cmd,arg, gemtek_pci_do_ioctl); } } static int gemtek_pci_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { return video_usercopy(inode, file, cmd, arg, gemtek_pci_do_ioctl); } enum { GEMTEK_PR103 }; static char *card_names[] __devinitdata = { ""GEMTEK_PR103"" }; static struct pci_device_id gemtek_pci_id[] = { { PCI_VENDOR_ID_GEMTEK, PCI_DEVICE_ID_GEMTEK_PR103, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GEMTEK_PR103 }, { 0 } }; MODULE_DEVICE_TABLE( pci, gemtek_pci_id ); static int mx = 1; static const struct file_operations gemtek_pci_fops = { .owner = THIS_MODULE, .open = video_exclusive_open, .release = video_exclusive_release, .ioctl = gemtek_pci_ioctl, .compat_ioctl = v4l_compat_ioctl32, .llseek = no_llseek, }; static struct video_device vdev_template = { .owner = THIS_MODULE, .name = ""Gemtek PCI Radio"", .type = VID_TYPE_TUNER, .hardware = 0, .fops = &gemtek_pci_fops, }; static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci_device_id *pci_id ) { struct gemtek_pci_card *card; struct video_device *devradio; if ( (card = kzalloc( sizeof( struct gemtek_pci_card ), GFP_KERNEL )) == NULL ) { printk( KERN_ERR ""gemtek_pci: out of memory\n"" ); return -ENOMEM; } if ( pci_enable_device( pci_dev ) ) goto err_pci; card->iobase = pci_resource_start( pci_dev, 0 ); card->length = pci_resource_len( pci_dev, 0 ); if ( request_region( card->iobase, card->length, card_names[pci_id->driver_data] ) == NULL ) { printk( KERN_ERR ""gemtek_pci: i/o port already in use\n"" ); goto err_pci; } pci_read_config_byte( pci_dev, PCI_REVISION_ID, &card->chiprev ); pci_read_config_word( pci_dev, PCI_SUBSYSTEM_ID, &card->model ); pci_set_drvdata( pci_dev, card ); if ( (devradio = kmalloc( sizeof( struct video_device ), GFP_KERNEL )) == NULL ) { printk( KERN_ERR ""gemtek_pci: out of memory\n"" ); goto err_video; } *devradio = vdev_template; if ( video_register_device( devradio, VFL_TYPE_RADIO , nr_radio) == -1 ) { kfree( devradio ); goto err_video; } card->videodev = devradio; devradio->priv = card; gemtek_pci_mute( card ); printk( KERN_INFO ""Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n"", card->chiprev, card->iobase, card->iobase + card->length - 1 ); return 0; err_video: release_region( card->iobase, card->length ); err_pci: kfree( card ); return -ENODEV; } static void __devexit gemtek_pci_remove( struct pci_dev *pci_dev ) { struct gemtek_pci_card *card = pci_get_drvdata( pci_dev ); video_unregister_device( card->videodev ); kfree( card->videodev ); release_region( card->iobase, card->length ); if ( mx ) gemtek_pci_mute( card ); kfree( card ); pci_set_drvdata( pci_dev, NULL ); } static struct pci_driver gemtek_pci_driver = { .name = ""gemtek_pci"", .id_table = gemtek_pci_id, .probe = gemtek_pci_probe, .remove = __devexit_p(gemtek_pci_remove), }; static int __init gemtek_pci_init_module( void ) { return pci_register_driver( &gemtek_pci_driver ); } static void __exit gemtek_pci_cleanup_module( void ) { pci_unregister_driver(&gemtek_pci_driver); } MODULE_AUTHOR( ""Vladimir Shebordaev "" ); MODULE_DESCRIPTION( ""The video4linux driver for the Gemtek PCI Radio Card"" ); MODULE_LICENSE(""GPL""); module_param(mx, bool, 0); MODULE_PARM_DESC( mx, ""single digit: 1 - turn off the turner upon module exit (default), 0 - do not"" ); module_param(nr_radio, int, 0); MODULE_PARM_DESC( nr_radio, ""video4linux device number to use""); module_init( gemtek_pci_init_module ); module_exit( gemtek_pci_cleanup_module ); ",0 "crumb 'Associate a new login' %} {% endblock %} {% block content %}

Associate a new login

{% include ""common/messages.html"" %}

Here are the logins you have associated with your account.

{% for rpxdata in rpxdatas %}
{{ rpxdata.provider }}:
{# Logically, checking != is bad. Should be > 1. But we don't have that tag #} {% ifnotequal rpxdatas|length 1 %} (delete) {% endifnotequal %}
{% endfor %}

{% rpx_link ""Click here to add another login to your account."" extra rpx_response_path %}

{% rpx_script extra rpx_response_path 'show_provider_list' %} {% endblock %} ",0 "t @interface CFTAccount : NSObject @property (nonatomic, strong) NSString *apiToken; @property (nonatomic, strong) NSString *accountToken; /** * Create the account object with the api token and account token * @param apiToken The API Token associated with this developer account * @param accountToken The Merchant Account Token associated with this developer account */ -(id) initWithApiToken:(NSString *)apiToken andAccountToken:(NSString *)accountToken; @end ",0 "on, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the mini2Dx nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.mini2Dx.core.di.exception; /** * A base class for bean exceptions */ public class BeanException extends Exception { private static final long serialVersionUID = 4487528732406582847L; public BeanException(String message) { super(message); } } ",0 "ww.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CONSENSUS_TX_VERIFY_H #define BITCOIN_CONSENSUS_TX_VERIFY_H #include ""amount.h"" #include #include class CBlockIndex; class CCoinsViewCache; class CTransaction; class CValidationState; /** Transaction validation functions */ /** Context-independent validity checks */ bool CheckTransaction(const CTransaction& tx, CValidationState& state); namespace Consensus { /** * Check whether all inputs of this transaction are valid (no double spends and amounts) * This does not modify the UTXO set. This does not check scripts and sigs. * @param[out] txfee Set to the transaction fee if successful. * Preconditions: tx.IsCoinBase() is false. */ bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmount& txfee); } // namespace Consensus /** Auxiliary functions for transaction validation (ideally should not be exposed) */ /** * Count ECDSA signature operations the old-fashioned (pre-0.6) way * @return number of sigops this transaction's outputs will produce when spent * @see CTransaction::FetchInputs */ unsigned int GetLegacySigOpCount(const CTransaction& tx); /** * Count ECDSA signature operations in pay-to-script-hash inputs. * * @param[in] mapInputs Map of previous transactions that have outputs we're spending * @return maximum number of sigops required to validate this transaction's inputs * @see CTransaction::FetchInputs */ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& mapInputs); /** * Count total signature operations for a transaction. * @param[in] tx Transaction for which we are counting sigops * @param[in] inputs Map of previous transactions that have outputs we're spending * @param[out] flags Script verification flags * @return Total signature operation count for a tx */ unsigned int GetTransactionSigOpCount(const CTransaction& tx, const CCoinsViewCache& inputs, int flags); /** * Check if transaction is final and can be included in a block with the * specified height and time. Consensus critical. */ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime); /** * Calculates the block height and previous block's median time past at * which the transaction will be considered final in the context of BIP 68. * Also removes from the vector of input heights any entries which did not * correspond to sequence locked inputs as they do not affect the calculation. */ std::pair CalculateSequenceLocks(const CTransaction &tx, int flags, std::vector* prevHeights, const CBlockIndex& block); bool EvaluateSequenceLocks(const CBlockIndex& block, std::pair lockPair); /** * Check if transaction is final per BIP 68 sequence numbers and can be included in a block. * Consensus critical. Takes as input a list of heights at which tx's inputs (in order) confirmed. */ bool SequenceLocks(const CTransaction &tx, int flags, std::vector* prevHeights, const CBlockIndex& block); #endif // BITCOIN_CONSENSUS_TX_VERIFY_H ",0 "nnotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; import com.lichkin.framework.bases.LKDatas; import com.lichkin.framework.bases.annotations.WithOutLogin; import com.lichkin.framework.springboot.controllers.LKController; /** * 页面跳转逻辑 * @author SuZhou LichKin Information Technology Co., Ltd. */ @Controller @RequestMapping(value = ""/demo"") public class LKDemoController extends LKController { /** * 页面跳转 * @param requestDatas 请求参数,由框架自动解析请求的参数并注入。 * @param subUrl 子路径 * @return 页面路径,附带了请求参数及请求路径的相关信息。 */ @WithOutLogin @RequestMapping(value = ""/{subUrl}.html"", method = RequestMethod.GET) public ModelAndView toGo(final LKDatas requestDatas, @PathVariable(value = ""subUrl"") final String subUrl) { return getModelAndView(requestDatas); } } ",0 "rg/1999/xhtml""> AADC: Member List
AADC
IRO Member List

This is the complete list of members for IRO, including all inherited members.

Contour typedef (defined in IRO)IRO
GetMinRadius(const Contour &contour)=0 (defined in IRO)IROpure virtual
Point2D typedef (defined in IRO)IRO
  • Generated on Tue Sep 16 2014 14:13:26 for AADC by 1.8.8
",0 "f the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** * Unit tests for the question bank view class. * * @package core_question * @category test * @copyright 2018 the Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/question/editlib.php'); /** * Unit tests for the question bank view class. * * @copyright 2018 the Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class core_question_bank_view_testcase extends advanced_testcase { public function test_viewing_question_bank_should_not_load_individual_questions() { $this->resetAfterTest(); $this->setAdminUser(); $generator = $this->getDataGenerator(); /** @var core_question_generator $questiongenerator */ $questiongenerator = $generator->get_plugin_generator('core_question'); // Create a course. $course = $generator->create_course(); $context = context_course::instance($course->id); // Create a question in the default category. $contexts = new question_edit_contexts($context); $cat = question_make_default_categories($contexts->all()); $questiondata = $questiongenerator->create_question('numerical', null, ['name' => 'Example question', 'category' => $cat->id]); // Ensure the question is not in the cache. $cache = cache::make('core', 'questiondata'); $cache->delete($questiondata->id); // Generate the view. $view = new core_question\local\bank\view($contexts, new moodle_url('/'), $course); ob_start(); $pagevars = [ 'qpage' => 0, 'qperpage' => 20, 'cat' => $cat->id . ',' . $context->id, 'recurse' => false, 'showhidden' => false, 'qbshowtext' => false ]; $view->display($pagevars, 'editq'); $html = ob_get_clean(); // Verify the output includes the expected question. $this->assertStringContainsString('Example question', $html); // Verify the question has not been loaded into the cache. $this->assertFalse($cache->has($questiondata->id)); } public function test_unknown_qtype_does_not_break_view() { global $DB; $this->resetAfterTest(); $this->setAdminUser(); $generator = $this->getDataGenerator(); /** @var core_question_generator $questiongenerator */ $questiongenerator = $generator->get_plugin_generator('core_question'); // Create a course. $course = $generator->create_course(); $context = context_course::instance($course->id); // Create a question in the default category. $contexts = new question_edit_contexts($context); $cat = question_make_default_categories($contexts->all()); $questiondata = $questiongenerator->create_question('numerical', null, ['name' => 'Example question', 'category' => $cat->id]); $DB->set_field('question', 'qtype', 'unknownqtype', ['id' => $questiondata->id]); // Generate the view. $view = new core_question\local\bank\view($contexts, new moodle_url('/'), $course); ob_start(); $pagevars = [ 'qpage' => 0, 'qperpage' => 20, 'cat' => $cat->id . ',' . $context->id, 'recurse' => false, 'showhidden' => false, 'qbshowtext' => false ]; $view->display($pagevars, 'editq'); $html = ob_get_clean(); // Mainly we are verifying that there was no fatal error. // Verify the output includes the expected question. $this->assertStringContainsString('Example question', $html); } } ",0 "projectName"" class=""col-sm-2 control-label"">选择项目

项目列表


 
{{message}}

",0 " /** * Class for building help text with preset format */ public class HelptextBuilder implements Builder { /** * Data structure that contains command's argument and its corresponding description. */ private final Map commandWithArgs = new LinkedHashMap<>(); /** * List that provides information about executing the command without arguments. */ private final List commandWithoutArgs = new ArrayList<>(); /** * List containing additional information about the command. */ private final List descriptions = new ArrayList<>(); public HelptextBuilder addWithArgs(String command, String description) { commandWithArgs.put(command, description); return this; } public HelptextBuilder addWithoutArgs(String description) { commandWithoutArgs.add(description); return this; } public HelptextBuilder addDescription(String description) { descriptions.add(description); return this; } /** * Create a StringBuilder object to create a formatted help text. * * @return formatted help text */ @Override public String create() { StringBuilder helptext = new StringBuilder(); if (!commandWithArgs.isEmpty()) { helptext.append(""Usage with arguments:\n""); for (Map.Entry entry : commandWithArgs.entrySet()) { helptext.append(""\t"").append(entry.getKey()).append(""\n""); helptext.append(""\t\t- "").append(entry.getValue()).append(""\n""); } helptext.append(""\n""); } if (!commandWithoutArgs.isEmpty()) { helptext.append(""Usage without arguments:\n""); for (String commandWithoutArg : commandWithoutArgs) { helptext.append(""\t"").append(commandWithoutArg).append(""\n""); } helptext.append(""\n""); } if (!descriptions.isEmpty()) { helptext.append(""Description:\n""); for (String description : descriptions) { helptext.append(""\t"").append(description).append(""\n""); } helptext.append(""\n""); } return helptext.toString(); } } ",0 "enerated by javadoc (version 1.7.0_51) on Tue May 19 11:04:42 CEST 2015 --> Uses of Interface com.mxgraph.util.svg.ShapeProducer (JGraph X 3.3.0.1 API Specification)
  • Prev
  • Next

Uses of Interface
com.mxgraph.util.svg.ShapeProducer

  • Prev
  • Next

Copyright (c) 2010 Gaudenz Alder. All rights reserved.

",0 "enerated by javadoc (version 1.7.0_55) on Tue Aug 12 22:12:20 PDT 2014 --> Uses of Interface org.apache.nutch.indexer.IndexingFilter (apache-nutch 1.9 API)
  • Prev
  • Next

Uses of Interface
org.apache.nutch.indexer.IndexingFilter

  • Prev
  • Next

Copyright © 2014 The Apache Software Foundation

",0 " #include #include ""patNBParameters.h"" #include ""patDisplay.h"" #include ""patError.h"" #include ""patRandomNumber.h"" #include class MyTestRandomNumberGenrator: public CxxTest::TestSuite{ public: void testRNG(void){ patError* err(NULL); patNBParameters::the()->readFile(""/Users/jchen/Documents/Project/newbioroute/src/params/config.xml"", err); patNBParameters::the()->init(err); TS_ASSERT_EQUALS(err,(void*)0); int count= 100000; double sum=0.0; patRandomNumber rng(patNBParameters::the()->randomSeed); for (int i=0;i probas; int count_probas = 5; for(int i=0;i #include #include ""f2fs.h"" #include ""node.h"" #include ""segment.h"" /* * Roll forward recovery scenarios. * * [Term] F: fsync_mark, D: dentry_mark * * 1. inode(x) | CP | inode(x) | dnode(F) * -> Update the latest inode(x). * * 2. inode(x) | CP | inode(F) | dnode(F) * -> No problem. * * 3. inode(x) | CP | dnode(F) | inode(x) * -> Recover to the latest dnode(F), and drop the last inode(x) * * 4. inode(x) | CP | dnode(F) | inode(F) * -> No problem. * * 5. CP | inode(x) | dnode(F) * -> The inode(DF) was missing. Should drop this dnode(F). * * 6. CP | inode(DF) | dnode(F) * -> No problem. * * 7. CP | dnode(F) | inode(DF) * -> If f2fs_iget fails, then goto next to find inode(DF). * * 8. CP | dnode(F) | inode(x) * -> If f2fs_iget fails, then goto next to find inode(DF). * But it will fail due to no inode(DF). */ static struct kmem_cache *fsync_entry_slab; bool space_for_roll_forward(struct f2fs_sb_info *sbi) { s64 nalloc = percpu_counter_sum_positive(&sbi->alloc_valid_block_count); if (sbi->last_valid_block_count + nalloc > sbi->user_block_count) return false; return true; } static struct fsync_inode_entry *get_fsync_inode(struct list_head *head, nid_t ino) { struct fsync_inode_entry *entry; list_for_each_entry(entry, head, list) if (entry->inode->i_ino == ino) return entry; return NULL; } static struct fsync_inode_entry *add_fsync_inode(struct list_head *head, struct inode *inode) { struct fsync_inode_entry *entry; entry = kmem_cache_alloc(fsync_entry_slab, GFP_F2FS_ZERO); if (!entry) return NULL; entry->inode = inode; list_add_tail(&entry->list, head); return entry; } static void del_fsync_inode(struct fsync_inode_entry *entry) { iput(entry->inode); list_del(&entry->list); kmem_cache_free(fsync_entry_slab, entry); } static int recover_dentry(struct inode *inode, struct page *ipage, struct list_head *dir_list) { struct f2fs_inode *raw_inode = F2FS_INODE(ipage); nid_t pino = le32_to_cpu(raw_inode->i_pino); struct f2fs_dir_entry *de; struct fscrypt_name fname; struct page *page; struct inode *dir, *einode; struct fsync_inode_entry *entry; int err = 0; char *name; entry = get_fsync_inode(dir_list, pino); if (!entry) { dir = f2fs_iget(inode->i_sb, pino); if (IS_ERR(dir)) { err = PTR_ERR(dir); goto out; } entry = add_fsync_inode(dir_list, dir); if (!entry) { err = -ENOMEM; iput(dir); goto out; } } dir = entry->inode; memset(&fname, 0, sizeof(struct fscrypt_name)); fname.disk_name.len = le32_to_cpu(raw_inode->i_namelen); fname.disk_name.name = raw_inode->i_name; if (unlikely(fname.disk_name.len > F2FS_NAME_LEN)) { WARN_ON(1); err = -ENAMETOOLONG; goto out; } retry: de = __f2fs_find_entry(dir, &fname, &page); if (de && inode->i_ino == le32_to_cpu(de->ino)) goto out_unmap_put; if (de) { einode = f2fs_iget(inode->i_sb, le32_to_cpu(de->ino)); if (IS_ERR(einode)) { WARN_ON(1); err = PTR_ERR(einode); if (err == -ENOENT) err = -EEXIST; goto out_unmap_put; } err = acquire_orphan_inode(F2FS_I_SB(inode)); if (err) { iput(einode); goto out_unmap_put; } f2fs_delete_entry(de, page, dir, einode); iput(einode); goto retry; } else if (IS_ERR(page)) { err = PTR_ERR(page); } else { err = __f2fs_do_add_link(dir, &fname, inode, inode->i_ino, inode->i_mode); } goto out; out_unmap_put: f2fs_dentry_kunmap(dir, page); f2fs_put_page(page, 0); out: if (file_enc_name(inode)) name = """"; else name = raw_inode->i_name; f2fs_msg(inode->i_sb, KERN_NOTICE, ""%s: ino = %x, name = %s, dir = %lx, err = %d"", __func__, ino_of_node(ipage), name, IS_ERR(dir) ? 0 : dir->i_ino, err); return err; } static void recover_inode(struct inode *inode, struct page *page) { struct f2fs_inode *raw = F2FS_INODE(page); char *name; inode->i_mode = le16_to_cpu(raw->i_mode); f2fs_i_size_write(inode, le64_to_cpu(raw->i_size)); inode->i_atime.tv_sec = le64_to_cpu(raw->i_mtime); inode->i_ctime.tv_sec = le64_to_cpu(raw->i_ctime); inode->i_mtime.tv_sec = le64_to_cpu(raw->i_mtime); inode->i_atime.tv_nsec = le32_to_cpu(raw->i_mtime_nsec); inode->i_ctime.tv_nsec = le32_to_cpu(raw->i_ctime_nsec); inode->i_mtime.tv_nsec = le32_to_cpu(raw->i_mtime_nsec); if (file_enc_name(inode)) name = """"; else name = F2FS_INODE(page)->i_name; f2fs_msg(inode->i_sb, KERN_NOTICE, ""recover_inode: ino = %x, name = %s"", ino_of_node(page), name); } static bool is_same_inode(struct inode *inode, struct page *ipage) { struct f2fs_inode *ri = F2FS_INODE(ipage); struct timespec disk; if (!IS_INODE(ipage)) return true; disk.tv_sec = le64_to_cpu(ri->i_ctime); disk.tv_nsec = le32_to_cpu(ri->i_ctime_nsec); if (timespec_compare(&inode->i_ctime, &disk) > 0) return false; disk.tv_sec = le64_to_cpu(ri->i_atime); disk.tv_nsec = le32_to_cpu(ri->i_atime_nsec); if (timespec_compare(&inode->i_atime, &disk) > 0) return false; disk.tv_sec = le64_to_cpu(ri->i_mtime); disk.tv_nsec = le32_to_cpu(ri->i_mtime_nsec); if (timespec_compare(&inode->i_mtime, &disk) > 0) return false; return true; } static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head) { unsigned long long cp_ver = cur_cp_version(F2FS_CKPT(sbi)); struct curseg_info *curseg; struct inode *inode; struct page *page = NULL; block_t blkaddr; int err = 0; /* get node pages in the current segment */ curseg = CURSEG_I(sbi, CURSEG_WARM_NODE); blkaddr = NEXT_FREE_BLKADDR(sbi, curseg); while (1) { struct fsync_inode_entry *entry; if (!is_valid_blkaddr(sbi, blkaddr, META_POR)) return 0; page = get_tmp_page(sbi, blkaddr); if (cp_ver != cpver_of_node(page)) break; if (!is_fsync_dnode(page)) goto next; entry = get_fsync_inode(head, ino_of_node(page)); if (entry) { if (!is_same_inode(entry->inode, page)) goto next; } else { if (IS_INODE(page) && is_dent_dnode(page)) { err = recover_inode_page(sbi, page); if (err) break; } /* * CP | dnode(F) | inode(DF) * For this case, we should not give up now. */ inode = f2fs_iget(sbi->sb, ino_of_node(page)); if (IS_ERR(inode)) { err = PTR_ERR(inode); if (err == -ENOENT) { err = 0; goto next; } break; } /* add this fsync inode to the list */ entry = add_fsync_inode(head, inode); if (!entry) { err = -ENOMEM; iput(inode); break; } } entry->blkaddr = blkaddr; if (IS_INODE(page) && is_dent_dnode(page)) entry->last_dentry = blkaddr; next: /* check next segment */ blkaddr = next_blkaddr_of_node(page); f2fs_put_page(page, 1); ra_meta_pages_cond(sbi, blkaddr); } f2fs_put_page(page, 1); return err; } static void destroy_fsync_dnodes(struct list_head *head) { struct fsync_inode_entry *entry, *tmp; list_for_each_entry_safe(entry, tmp, head, list) del_fsync_inode(entry); } static int check_index_in_prev_nodes(struct f2fs_sb_info *sbi, block_t blkaddr, struct dnode_of_data *dn) { struct seg_entry *sentry; unsigned int segno = GET_SEGNO(sbi, blkaddr); unsigned short blkoff = GET_BLKOFF_FROM_SEG0(sbi, blkaddr); struct f2fs_summary_block *sum_node; struct f2fs_summary sum; struct page *sum_page, *node_page; struct dnode_of_data tdn = *dn; nid_t ino, nid; struct inode *inode; unsigned int offset; block_t bidx; int i; sentry = get_seg_entry(sbi, segno); if (!f2fs_test_bit(blkoff, sentry->cur_valid_map)) return 0; /* Get the previous summary */ for (i = CURSEG_WARM_DATA; i <= CURSEG_COLD_DATA; i++) { struct curseg_info *curseg = CURSEG_I(sbi, i); if (curseg->segno == segno) { sum = curseg->sum_blk->entries[blkoff]; goto got_it; } } sum_page = get_sum_page(sbi, segno); sum_node = (struct f2fs_summary_block *)page_address(sum_page); sum = sum_node->entries[blkoff]; f2fs_put_page(sum_page, 1); got_it: /* Use the locked dnode page and inode */ nid = le32_to_cpu(sum.nid); if (dn->inode->i_ino == nid) { tdn.nid = nid; if (!dn->inode_page_locked) lock_page(dn->inode_page); tdn.node_page = dn->inode_page; tdn.ofs_in_node = le16_to_cpu(sum.ofs_in_node); goto truncate_out; } else if (dn->nid == nid) { tdn.ofs_in_node = le16_to_cpu(sum.ofs_in_node); goto truncate_out; } /* Get the node page */ node_page = get_node_page(sbi, nid); if (IS_ERR(node_page)) return PTR_ERR(node_page); offset = ofs_of_node(node_page); ino = ino_of_node(node_page); f2fs_put_page(node_page, 1); if (ino != dn->inode->i_ino) { /* Deallocate previous index in the node page */ inode = f2fs_iget(sbi->sb, ino); if (IS_ERR(inode)) return PTR_ERR(inode); } else { inode = dn->inode; } bidx = start_bidx_of_node(offset, inode) + le16_to_cpu(sum.ofs_in_node); /* * if inode page is locked, unlock temporarily, but its reference * count keeps alive. */ if (ino == dn->inode->i_ino && dn->inode_page_locked) unlock_page(dn->inode_page); set_new_dnode(&tdn, inode, NULL, NULL, 0); if (get_dnode_of_data(&tdn, bidx, LOOKUP_NODE)) goto out; if (tdn.data_blkaddr == blkaddr) truncate_data_blocks_range(&tdn, 1); f2fs_put_dnode(&tdn); out: if (ino != dn->inode->i_ino) iput(inode); else if (dn->inode_page_locked) lock_page(dn->inode_page); return 0; truncate_out: if (datablock_addr(tdn.node_page, tdn.ofs_in_node) == blkaddr) truncate_data_blocks_range(&tdn, 1); if (dn->inode->i_ino == nid && !dn->inode_page_locked) unlock_page(dn->inode_page); return 0; } static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode, struct page *page, block_t blkaddr) { struct dnode_of_data dn; struct node_info ni; unsigned int start, end; int err = 0, recovered = 0; /* step 1: recover xattr */ if (IS_INODE(page)) { recover_inline_xattr(inode, page); } else if (f2fs_has_xattr_block(ofs_of_node(page))) { /* * Deprecated; xattr blocks should be found from cold log. * But, we should remain this for backward compatibility. */ recover_xattr_data(inode, page, blkaddr); goto out; } /* step 2: recover inline data */ if (recover_inline_data(inode, page)) goto out; /* step 3: recover data indices */ start = start_bidx_of_node(ofs_of_node(page), inode); end = start + ADDRS_PER_PAGE(page, inode); set_new_dnode(&dn, inode, NULL, NULL, 0); err = get_dnode_of_data(&dn, start, ALLOC_NODE); if (err) goto out; f2fs_wait_on_page_writeback(dn.node_page, NODE, true); get_node_info(sbi, dn.nid, &ni); f2fs_bug_on(sbi, ni.ino != ino_of_node(page)); f2fs_bug_on(sbi, ofs_of_node(dn.node_page) != ofs_of_node(page)); for (; start < end; start++, dn.ofs_in_node++) { block_t src, dest; src = datablock_addr(dn.node_page, dn.ofs_in_node); dest = datablock_addr(page, dn.ofs_in_node); /* skip recovering if dest is the same as src */ if (src == dest) continue; /* dest is invalid, just invalidate src block */ if (dest == NULL_ADDR) { truncate_data_blocks_range(&dn, 1); continue; } if ((start + 1) << PAGE_SHIFT > i_size_read(inode)) f2fs_i_size_write(inode, (start + 1) << PAGE_SHIFT); /* * dest is reserved block, invalidate src block * and then reserve one new block in dnode page. */ if (dest == NEW_ADDR) { truncate_data_blocks_range(&dn, 1); reserve_new_block(&dn); continue; } /* dest is valid block, try to recover from src to dest */ if (is_valid_blkaddr(sbi, dest, META_POR)) { if (src == NULL_ADDR) { err = reserve_new_block(&dn); #ifdef CONFIG_F2FS_FAULT_INJECTION while (err) err = reserve_new_block(&dn); #endif /* We should not get -ENOSPC */ f2fs_bug_on(sbi, err); if (err) goto err; } /* Check the previous node page having this index */ err = check_index_in_prev_nodes(sbi, dest, &dn); if (err) goto err; /* write dummy data page */ f2fs_replace_block(sbi, &dn, src, dest, ni.version, false, false); recovered++; } } copy_node_footer(dn.node_page, page); fill_node_footer(dn.node_page, dn.nid, ni.ino, ofs_of_node(page), false); set_page_dirty(dn.node_page); err: f2fs_put_dnode(&dn); out: f2fs_msg(sbi->sb, KERN_NOTICE, ""recover_data: ino = %lx, recovered = %d blocks, err = %d"", inode->i_ino, recovered, err); return err; } static int recover_data(struct f2fs_sb_info *sbi, struct list_head *inode_list, struct list_head *dir_list) { unsigned long long cp_ver = cur_cp_version(F2FS_CKPT(sbi)); struct curseg_info *curseg; struct page *page = NULL; int err = 0; block_t blkaddr; /* get node pages in the current segment */ curseg = CURSEG_I(sbi, CURSEG_WARM_NODE); blkaddr = NEXT_FREE_BLKADDR(sbi, curseg); while (1) { struct fsync_inode_entry *entry; if (!is_valid_blkaddr(sbi, blkaddr, META_POR)) break; ra_meta_pages_cond(sbi, blkaddr); page = get_tmp_page(sbi, blkaddr); if (cp_ver != cpver_of_node(page)) { f2fs_put_page(page, 1); break; } entry = get_fsync_inode(inode_list, ino_of_node(page)); if (!entry) goto next; /* * inode(x) | CP | inode(x) | dnode(F) * In this case, we can lose the latest inode(x). * So, call recover_inode for the inode update. */ if (IS_INODE(page)) recover_inode(entry->inode, page); if (entry->last_dentry == blkaddr) { err = recover_dentry(entry->inode, page, dir_list); if (err) { f2fs_put_page(page, 1); break; } } err = do_recover_data(sbi, entry->inode, page, blkaddr); if (err) { f2fs_put_page(page, 1); break; } if (entry->blkaddr == blkaddr) del_fsync_inode(entry); next: /* check next segment */ blkaddr = next_blkaddr_of_node(page); f2fs_put_page(page, 1); } if (!err) allocate_new_segments(sbi); return err; } int recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only) { struct curseg_info *curseg = CURSEG_I(sbi, CURSEG_WARM_NODE); struct list_head inode_list; struct list_head dir_list; block_t blkaddr; int err; int ret = 0; bool need_writecp = false; fsync_entry_slab = f2fs_kmem_cache_create(""f2fs_fsync_inode_entry"", sizeof(struct fsync_inode_entry)); if (!fsync_entry_slab) return -ENOMEM; INIT_LIST_HEAD(&inode_list); INIT_LIST_HEAD(&dir_list); /* prevent checkpoint */ mutex_lock(&sbi->cp_mutex); blkaddr = NEXT_FREE_BLKADDR(sbi, curseg); /* step #1: find fsynced inode numbers */ err = find_fsync_dnodes(sbi, &inode_list); if (err || list_empty(&inode_list)) goto out; if (check_only) { ret = 1; goto out; } need_writecp = true; /* step #2: recover data */ err = recover_data(sbi, &inode_list, &dir_list); if (!err) f2fs_bug_on(sbi, !list_empty(&inode_list)); out: destroy_fsync_dnodes(&inode_list); /* truncate meta pages to be used by the recovery */ truncate_inode_pages_range(META_MAPPING(sbi), (loff_t)MAIN_BLKADDR(sbi) << PAGE_SHIFT, -1); if (err) { truncate_inode_pages_final(NODE_MAPPING(sbi)); truncate_inode_pages_final(META_MAPPING(sbi)); } clear_sbi_flag(sbi, SBI_POR_DOING); if (err) { bool invalidate = false; if (test_opt(sbi, LFS)) { update_meta_page(sbi, NULL, blkaddr); invalidate = true; } else if (discard_next_dnode(sbi, blkaddr)) { invalidate = true; } f2fs_wait_all_discard_bio(sbi); /* Flush all the NAT/SIT pages */ while (get_pages(sbi, F2FS_DIRTY_META)) sync_meta_pages(sbi, META, LONG_MAX); /* invalidate temporary meta page */ if (invalidate) invalidate_mapping_pages(META_MAPPING(sbi), blkaddr, blkaddr); set_ckpt_flags(sbi->ckpt, CP_ERROR_FLAG); mutex_unlock(&sbi->cp_mutex); } else if (need_writecp) { struct cp_control cpc = { .reason = CP_RECOVERY, }; mutex_unlock(&sbi->cp_mutex); err = write_checkpoint(sbi, &cpc); } else { mutex_unlock(&sbi->cp_mutex); } destroy_fsync_dnodes(&dir_list); kmem_cache_destroy(fsync_entry_slab); return ret ? ret: err; } ",0 ".util.Arrays; import java.util.HashSet; import java.util.Set; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.CmdLineParser; import org.kohsuke.args4j.Option; import org.kohsuke.args4j.spi.StringOptionHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class LaserArgument { private static final Logger LOG = LoggerFactory .getLogger(LaserArgument.class); public static final Set VALID_ARGUMENTS = new HashSet( Arrays.asList(""-configure"")); @Option(name = ""-configure"", required = true, handler = StringOptionHandler.class) private String configure; public String getConfigure() { return configure; } public static void parseArgs(String[] args) throws CmdLineException, IOException { ArrayList argsList = new ArrayList(Arrays.asList(args)); for (int i = 0; i < args.length; i++) { if (i % 2 == 0 && !LaserArgument.VALID_ARGUMENTS.contains(args[i])) { argsList.remove(args[i]); argsList.remove(args[i + 1]); } } final LaserArgument laserArgument = new LaserArgument(); new CmdLineParser(laserArgument).parseArgument(argsList .toArray(new String[argsList.size()])); Configuration conf = Configuration.getInstance(); LOG.info(""Load configure, {}"", laserArgument.getConfigure()); Path path = new Path(laserArgument.getConfigure()); FileSystem fs = FileSystem .get(new org.apache.hadoop.conf.Configuration()); conf.load(path, fs); } } ",0 "hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED ""AS IS"" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* kernel/include/dennix/clock.h * System clocks. */ #ifndef _DENNIX_CLOCK_H #define _DENNIX_CLOCK_H #define CLOCK_MONOTONIC 0 #define CLOCK_REALTIME 1 #define CLOCK_PROCESS_CPUTIME_ID 2 #define CLOCK_THREAD_CPUTIME_ID 3 #define TIMER_ABSTIME 1 #endif ",0 "type=""image/x-icon"" href=""https://91ee07a61ca29df61569-b2dba7dce06e8a9c0977ad3a8844e9c8.ssl.cf2.rackcdn.com/v3/ui/default/assets/images/favicon.ico"" />

Zen

This is a playground where you can test new CSS against live CASH Music elements. What can you do with it?

Change embed style Customize CSS

Join our email list

Support CASH Music

Upcoming dates

Customize

Add any CSS (inline or URL) to customize the element embeds.

",0 " LICENSE file. #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_ #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_ #include #include ""content/public/browser/navigation_controller.h"" #include ""content/public/browser/navigation_details.h"" namespace content { struct LoadCommittedDetails; struct LoadNotificationDetails; struct NativeWebKeyboardEvent; class InterstitialPage; class InterstitialPageImpl; class RenderViewHost; class SiteInstance; class WebContents; class WebContentsDelegate; class NavigationControllerDelegate { public: virtual ~NavigationControllerDelegate() {} virtual RenderViewHost* GetRenderViewHost() const = 0; virtual InterstitialPage* GetInterstitialPage() const = 0; virtual const std::string& GetContentsMimeType() const = 0; virtual void NotifyNavigationStateChanged(unsigned changed_flags) = 0; virtual void Stop() = 0; virtual SiteInstance* GetSiteInstance() const = 0; virtual SiteInstance* GetPendingSiteInstance() const = 0; virtual int32 GetMaxPageID() = 0; virtual int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) = 0; virtual bool IsLoading() const = 0; virtual void NotifyBeforeFormRepostWarningShow() = 0; virtual void NotifyNavigationEntryCommitted( const LoadCommittedDetails& load_details) = 0; virtual bool NavigateToPendingEntry( NavigationController::ReloadType reload_type) = 0; virtual void SetHistoryLengthAndPrune( const SiteInstance* site_instance, int merge_history_length, int32 minimum_page_id) = 0; virtual void CopyMaxPageIDsFrom(WebContents* web_contents) = 0; virtual void UpdateMaxPageID(int32 page_id) = 0; virtual void UpdateMaxPageIDForSiteInstance(SiteInstance* site_instance, int32 page_id) = 0; virtual void ActivateAndShowRepostFormWarningDialog() = 0; virtual WebContents* GetWebContents() = 0; virtual bool IsHidden() = 0; virtual void RenderViewForInterstitialPageCreated( RenderViewHost* render_view_host) = 0; virtual void AttachInterstitialPage( InterstitialPageImpl* interstitial_page) = 0; virtual void DetachInterstitialPage() = 0; virtual void SetIsLoading(RenderViewHost* render_view_host, bool is_loading, LoadNotificationDetails* details) = 0; }; } #endif ",0 "lic class QLearningAgent implements Agent { public QLearningAgent() { this.rand = new Random(); } public void initialize(int numOfStates, int numOfActions) { this.q = new double[numOfStates][numOfActions]; this.numOfStates = numOfStates; this.numOfActions = numOfActions; } //Returns best possible action (or random action of multiple best actions) private int bestUtility(int state) { double max = q[state][0]; //Array list that holds best actions ArrayList bestActions = new ArrayList(); bestActions.add(0); for(int i = 1; i max) { max = q[state][i]; bestActions.clear(); bestActions.add(i); } //If equal, add on to the list else if(q[state][i] == max) { bestActions.add(i); } } //Choose random action from list of best actions int action = rand.nextInt(bestActions.size()); return bestActions.get(action); } //Returns best possible action or random action depending on epsilon public int chooseAction(int state) { //Random double for epsilon-greedy double greedy = rand.nextDouble(); int action = 0; //if smaller, choose (one of the possible) best option(s) if(greedy < (1.0-epsilon)) action = bestUtility(state); //If equal or larger choose random action else action = rand.nextInt(numOfActions); return action; } //update the policy of oldState+action public void updatePolicy(double reward, int action, int oldState, int newState) { q[oldState][action] = q[oldState][action] + rate*(reward+discount*(q[newState][chooseAction(newState)]-q[oldState][action])); } //Returns best policy for every state public Policy getPolicy() { int[] actions = new int[numOfStates]; //run through all states for(int i = 0; i

If you cannot complete the password reset form, please bring University-issued photo identification to the Bruin OnLine Help Desk located in Suite 124, Kerckhoff Hall. If you are not able to visit the Help Desk, please fax in a completed copy of the UCLA Logon Service Request Form, with all required supporting documentation.

",0 "client-logos"">

YOU’D FEEL A DEEP KINSHIP
WITH OUR CUSTOMERS.

We know why. Because they’re all doing great work. Just like you.

Chargebee has given us greater control over our member management and product diversification as well as deep insight into our revenue cycles and member cash flow.
Matt Fiedler,
Founder, Vinyl Me, Please
For more stories, product announcements, events, and walkthroughs, subscribe to our newsletter
What's your email?
©2015 Chargebee Inc. All rights reserved.
",0 "nel Host Bus Adapter. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License (GPL) Version 2 as * published by the Free Software Foundation * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. */ #include #include void bfa_hwcb_reginit(struct bfa_s *bfa) { struct bfa_iocfc_regs_s *bfa_regs = &bfa->iocfc.bfa_regs; bfa_os_addr_t kva = bfa_ioc_bar0(&bfa->ioc); int i, q, fn = bfa_ioc_pcifn(&bfa->ioc); if (fn == 0) { bfa_regs->intr_status = (kva + HOSTFN0_INT_STATUS); bfa_regs->intr_mask = (kva + HOSTFN0_INT_MSK); } else { bfa_regs->intr_status = (kva + HOSTFN1_INT_STATUS); bfa_regs->intr_mask = (kva + HOSTFN1_INT_MSK); } for (i = 0; i < BFI_IOC_MAX_CQS; i++) { /* * CPE registers */ q = CPE_Q_NUM(fn, i); bfa_regs->cpe_q_pi[i] = (kva + CPE_Q_PI(q)); bfa_regs->cpe_q_ci[i] = (kva + CPE_Q_CI(q)); bfa_regs->cpe_q_depth[i] = (kva + CPE_Q_DEPTH(q)); /* * RME registers */ q = CPE_Q_NUM(fn, i); bfa_regs->rme_q_pi[i] = (kva + RME_Q_PI(q)); bfa_regs->rme_q_ci[i] = (kva + RME_Q_CI(q)); bfa_regs->rme_q_depth[i] = (kva + RME_Q_DEPTH(q)); } } void bfa_hwcb_reqq_ack(struct bfa_s *bfa, int reqq) { } static void bfa_hwcb_reqq_ack_msix(struct bfa_s *bfa, int reqq) { bfa_reg_write(bfa->iocfc.bfa_regs.intr_status, __HFN_INT_CPE_Q0 << CPE_Q_NUM(bfa_ioc_pcifn(&bfa->ioc), reqq)); } void bfa_hwcb_rspq_ack(struct bfa_s *bfa, int rspq) { } static void bfa_hwcb_rspq_ack_msix(struct bfa_s *bfa, int rspq) { bfa_reg_write(bfa->iocfc.bfa_regs.intr_status, __HFN_INT_RME_Q0 << RME_Q_NUM(bfa_ioc_pcifn(&bfa->ioc), rspq)); } void bfa_hwcb_msix_getvecs(struct bfa_s *bfa, u32 *msix_vecs_bmap, u32 *num_vecs, u32 *max_vec_bit) { #define __HFN_NUMINTS 13 if (bfa_ioc_pcifn(&bfa->ioc) == 0) { *msix_vecs_bmap = (__HFN_INT_CPE_Q0 | __HFN_INT_CPE_Q1 | __HFN_INT_CPE_Q2 | __HFN_INT_CPE_Q3 | __HFN_INT_RME_Q0 | __HFN_INT_RME_Q1 | __HFN_INT_RME_Q2 | __HFN_INT_RME_Q3 | __HFN_INT_MBOX_LPU0); *max_vec_bit = __HFN_INT_MBOX_LPU0; } else { *msix_vecs_bmap = (__HFN_INT_CPE_Q4 | __HFN_INT_CPE_Q5 | __HFN_INT_CPE_Q6 | __HFN_INT_CPE_Q7 | __HFN_INT_RME_Q4 | __HFN_INT_RME_Q5 | __HFN_INT_RME_Q6 | __HFN_INT_RME_Q7 | __HFN_INT_MBOX_LPU1); *max_vec_bit = __HFN_INT_MBOX_LPU1; } *msix_vecs_bmap |= (__HFN_INT_ERR_EMC | __HFN_INT_ERR_LPU0 | __HFN_INT_ERR_LPU1 | __HFN_INT_ERR_PSS); *num_vecs = __HFN_NUMINTS; } /** * No special setup required for crossbow -- vector assignments are implicit. */ void bfa_hwcb_msix_init(struct bfa_s *bfa, int nvecs) { int i; bfa_assert((nvecs == 1) || (nvecs == __HFN_NUMINTS)); bfa->msix.nvecs = nvecs; if (nvecs == 1) { for (i = 0; i < BFA_MSIX_CB_MAX; i++) bfa->msix.handler[i] = bfa_msix_all; return; } for (i = BFA_MSIX_CPE_Q0; i <= BFA_MSIX_CPE_Q7; i++) bfa->msix.handler[i] = bfa_msix_reqq; for (i = BFA_MSIX_RME_Q0; i <= BFA_MSIX_RME_Q7; i++) bfa->msix.handler[i] = bfa_msix_rspq; for (; i < BFA_MSIX_CB_MAX; i++) bfa->msix.handler[i] = bfa_msix_lpu_err; } /** * Crossbow -- dummy, interrupts are masked */ void bfa_hwcb_msix_install(struct bfa_s *bfa) { } void bfa_hwcb_msix_uninstall(struct bfa_s *bfa) { } /** * No special enable/disable -- vector assignments are implicit. */ void bfa_hwcb_isr_mode_set(struct bfa_s *bfa, bfa_boolean_t msix) { bfa->iocfc.hwif.hw_reqq_ack = bfa_hwcb_reqq_ack_msix; bfa->iocfc.hwif.hw_rspq_ack = bfa_hwcb_rspq_ack_msix; } ",0 "enerated by javadoc (version 1.7.0-google-v5) on Thu Dec 19 17:42:37 EST 2013 --> ReservationDetailsError
com.google.api.ads.dfp.v201306

Class ReservationDetailsError

  • All Implemented Interfaces:
    java.io.Serializable


    public class ReservationDetailsError
    extends ApiError
    implements java.io.Serializable
    Lists all errors associated with LineItem's reservation details.
    See Also:
    Serialized Form
    • Constructor Detail

      • ReservationDetailsError

        public ReservationDetailsError()
      • ReservationDetailsError

        public ReservationDetailsError(java.lang.String fieldPath,
                               java.lang.String trigger,
                               java.lang.String errorString,
                               java.lang.String apiErrorType,
                               ReservationDetailsErrorReason reason)
    • Method Detail

      • getReason

        public ReservationDetailsErrorReason getReason()
        Gets the reason value for this ReservationDetailsError.
        Returns:
        reason * The error reason represented by an enum.
      • setReason

        public void setReason(ReservationDetailsErrorReason reason)
        Sets the reason value for this ReservationDetailsError.
        Parameters:
        reason - * The error reason represented by an enum.
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class ApiError
      • getTypeDesc

        public static org.apache.axis.description.TypeDesc getTypeDesc()
        Return type metadata object
      • getSerializer

        public static org.apache.axis.encoding.Serializer getSerializer(java.lang.String mechType,
                                                        java.lang.Class _javaType,
                                                        javax.xml.namespace.QName _xmlType)
        Get Custom Serializer
      • getDeserializer

        public static org.apache.axis.encoding.Deserializer getDeserializer(java.lang.String mechType,
                                                            java.lang.Class _javaType,
                                                            javax.xml.namespace.QName _xmlType)
        Get Custom Deserializer
",0 "ments -->
{% if site.data.comments[page.slug] %}

{{ site.data.ui-text[site.locale].comments_title | default: ""Comments"" }}

{% assign comments = site.data.comments[page.slug] | sort %} {% for comment in comments %} {% assign email = comment[1].email %} {% assign name = comment[1].name %} {% assign url = comment[1].url %} {% assign date = comment[1].date %} {% assign message = comment[1].message %} {% include staticman-comment.html index=forloop.index email=email name=name url=url date=date message=message %} {% endfor %} {% endif %}

{{ site.data.ui-text[site.locale].comments_label | default: ""Leave a Comment"" }}

{{ site.data.ui-text[site.locale].comment_form_info | default: ""Your email address will not be published. Required fields are marked"" }} *


{% if site.staticman.reCaptcha.siteKey %}{% endif %} {% if site.staticman.reCaptcha.secret %}{% endif %}
{% if site.staticman.reCaptcha.siteKey %}
{% endif %}
{% if site.staticman.reCaptcha.siteKey %} {% endif %} {% endif %} ",0 "h this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. * */ package org.apache.directory.server.kerberos.shared.replay; import java.io.Serializable; import javax.security.auth.kerberos.KerberosPrincipal; import net.sf.ehcache.Cache; import net.sf.ehcache.Element; import net.sf.ehcache.store.AbstractPolicy; import org.apache.directory.shared.kerberos.KerberosTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * ""The replay cache will store at least the server name, along with the client name, * time, and microsecond fields from the recently-seen authenticators, and if a * matching tuple is found, the KRB_AP_ERR_REPEAT error is returned."" * * We will store the entries in Ehacache instance * * @author Apache Directory Project */ public class ReplayCacheImpl implements ReplayCache { private static final Logger LOG = LoggerFactory.getLogger( ReplayCacheImpl.class ); /** ehcache based storage to store the entries */ private Cache cache; /** default clock skew */ private static final long DEFAULT_CLOCK_SKEW = 5 * KerberosTime.MINUTE; /** The clock skew */ private long clockSkew = DEFAULT_CLOCK_SKEW; /** * A structure to hold an entry */ public class ReplayCacheEntry implements Serializable { private static final long serialVersionUID = 1L; /** The server principal */ private KerberosPrincipal serverPrincipal; /** The client principal */ private KerberosPrincipal clientPrincipal; /** The client time */ private KerberosTime clientTime; /** The client micro seconds */ private int clientMicroSeconds; /** * Creates a new instance of ReplayCacheEntry. * * @param serverPrincipal * @param clientPrincipal * @param clientTime * @param clientMicroSeconds */ public ReplayCacheEntry( KerberosPrincipal serverPrincipal, KerberosPrincipal clientPrincipal, KerberosTime clientTime, int clientMicroSeconds ) { this.serverPrincipal = serverPrincipal; this.clientPrincipal = clientPrincipal; this.clientTime = clientTime; this.clientMicroSeconds = clientMicroSeconds; } /** * Returns whether this {@link ReplayCacheEntry} is equal to another {@link ReplayCacheEntry}. * {@link ReplayCacheEntry}'s are equal when the server name, client name, client time, and * the client microseconds are equal. * * @param that * @return true if the ReplayCacheEntry's are equal. */ public boolean equals( ReplayCacheEntry that ) { return serverPrincipal.equals( that.serverPrincipal ) && clientPrincipal.equals( that.clientPrincipal ) && clientTime.equals( that.clientTime ) && clientMicroSeconds == that.clientMicroSeconds; } /** * Returns whether this {@link ReplayCacheEntry} is older than a given time. * * @param clockSkew * @return true if the {@link ReplayCacheEntry}'s client time is outside the clock skew time. */ public boolean isOutsideClockSkew( long clockSkew ) { return !clientTime.isInClockSkew( clockSkew ); } /** * @return create a key to be used while storing in the cache */ private String createKey() { StringBuilder sb = new StringBuilder(); sb.append( ( clientPrincipal == null ) ? ""null"" : clientPrincipal.getName() ); sb.append( '#' ); sb.append( ( serverPrincipal == null ) ? ""null"" : serverPrincipal.getName() ); sb.append( '#' ); sb.append( ( clientTime == null ) ? ""null"" : clientTime.getDate() ); sb.append( '#' ); sb.append( clientMicroSeconds ); return sb.toString(); } } /** * an expiration policy based on the clockskew */ private class ClockskewExpirationPolicy extends AbstractPolicy { /** * {@inheritDoc} */ public String getName() { return ""CLOCK-SKEW""; } /** * {@inheritDoc} */ public boolean compare( Element element1, Element element2 ) { ReplayCacheEntry entry = ( ReplayCacheEntry ) element2.getValue(); if ( entry.isOutsideClockSkew( clockSkew ) ) { return true; } return false; } } /** * Creates a new instance of InMemoryReplayCache. Sets the * delay between each cleaning run to 5 seconds. */ public ReplayCacheImpl( Cache cache ) { this.cache = cache; this.cache.setMemoryStoreEvictionPolicy( new ClockskewExpirationPolicy() ); } /** * Creates a new instance of InMemoryReplayCache. Sets the * delay between each cleaning run to 5 seconds. Sets the * clockSkew to the given value * * @param clockSkew the allowed skew (milliseconds) */ public ReplayCacheImpl( Cache cache, long clockSkew ) { this.cache = cache; this.clockSkew = clockSkew; this.cache.setMemoryStoreEvictionPolicy( new ClockskewExpirationPolicy() ); } /** * Sets the clock skew. * * @param clockSkew */ public void setClockSkew( long clockSkew ) { this.clockSkew = clockSkew; } /** * Check if an entry is a replay or not. */ public synchronized boolean isReplay( KerberosPrincipal serverPrincipal, KerberosPrincipal clientPrincipal, KerberosTime clientTime, int clientMicroSeconds ) { ReplayCacheEntry entry = new ReplayCacheEntry( serverPrincipal, clientPrincipal, clientTime, clientMicroSeconds ); Element element = cache.get( entry.createKey() ); if ( element == null ) { return false; } entry = ( ReplayCacheEntry ) element.getValue(); if ( serverPrincipal.equals( entry.serverPrincipal ) && clientTime.equals( entry.clientTime ) && ( clientMicroSeconds == entry.clientMicroSeconds ) ) { return true; } return false; } /** * Add a new entry into the cache. A thread will clean all the timed out * entries. */ public synchronized void save( KerberosPrincipal serverPrincipal, KerberosPrincipal clientPrincipal, KerberosTime clientTime, int clientMicroSeconds ) { ReplayCacheEntry entry = new ReplayCacheEntry( serverPrincipal, clientPrincipal, clientTime, clientMicroSeconds ); Element element = new Element( entry.createKey(), entry ); cache.put( element ); } /** * {@inheritDoc} */ public void clear() { LOG.debug( ""removing all the elements from cache"" ); cache.removeAll(); } } ",0 "tps://gitlab.onelab.info/gmsh/gmsh/issues. #ifndef GMSH_FACE_H #define GMSH_FACE_H #include ""GFace.h"" class Surface; class gmshFace : public GFace { protected: Surface *s; bool buildSTLTriangulation(bool force); public: gmshFace(GModel *m, Surface *face); virtual ~gmshFace() {} Range parBounds(int i) const; void setModelEdges(std::list &); using GFace::point; virtual GPoint point(double par1, double par2) const; virtual GPoint closestPoint(const SPoint3 &queryPoint, const double initialGuess[2]) const; virtual bool containsPoint(const SPoint3 &pt) const; virtual double getMetricEigenvalue(const SPoint2 &); virtual SVector3 normal(const SPoint2 ¶m) const; virtual Pair firstDer(const SPoint2 ¶m) const; virtual void secondDer(const SPoint2 &, SVector3 &, SVector3 &, SVector3 &) const; virtual GEntity::GeomType geomType() const; ModelType getNativeType() const { return GmshModel; } void *getNativePtr() const { return s; } virtual SPoint2 parFromPoint(const SPoint3 &, bool onSurface = true) const; virtual void resetMeshAttributes(); void resetNativePtr(Surface *_s); bool degenerate(int dim) const; }; #endif ",0 "eral Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. */ #include #include ""vec3.h"" #include ""common.h"" #include ""solid_vary.h"" #include ""solid_sim.h"" #include ""solid_all.h"" #include ""solid_cmd.h"" #define LARGE 1.0e+5f #define SMALL 1.0e-3f /*---------------------------------------------------------------------------*/ /* Solves (p + v * t) . (p + v * t) == r * r for smallest t. */ /* * Given vectors A = P, B = V * t, C = A + B, |C| = r, solve for * smallest t. * * Some useful dot product properties: * * 1) A . A = |A| * |A| * 2) A . (B + C) = A . B + A . C * 3) (r * A) . B = r * (A . B) * * Deriving a quadratic equation: * * C . C = r * r (1) * (A + B) . (A + B) = r * r * A . (A + B) + B . (A + B) = r * r (2) * A . A + A . B + B . A + B . B = r * r (2) * A . A + 2 * (A . B) + B . B = r * r * P . P + 2 * (P . V * t) + (V * t . V * t) = r * r * P . P + 2 * (P . V) * t + (V . V) * t * t = r * r (3) * (V . V) * t * t + 2 * (P . V) * t + P . P - r * r = 0 * * This equation is solved using the quadratic formula. */ static float v_sol(const float p[3], const float v[3], float r) { float a = v_dot(v, v); float b = v_dot(v, p) * 2.0f; float c = v_dot(p, p) - r * r; float d = b * b - 4.0f * a * c; /* HACK: This seems to cause failures to detect low-velocity collision Yet, the potential division by zero below seems fine. if (fabsf(a) < SMALL) return LARGE; */ if (d < 0.0f) return LARGE; else if (d > 0.0f) { float t0 = 0.5f * (-b - fsqrtf(d)) / a; float t1 = 0.5f * (-b + fsqrtf(d)) / a; float t = (t0 < t1) ? t0 : t1; return (t < 0.0f) ? LARGE : t; } else return -b * 0.5f / a; } /*---------------------------------------------------------------------------*/ /* * Compute the earliest time and position of the intersection of a * sphere and a vertex. * * The sphere has radius R and moves along vector V from point P. The * vertex moves along vector W from point Q in a coordinate system * based at O. */ static float v_vert(float Q[3], const float o[3], const float q[3], const float w[3], const float p[3], const float v[3], float r) { float O[3], P[3], V[3]; float t = LARGE; v_add(O, o, q); v_sub(P, p, O); v_sub(V, v, w); if (v_dot(P, V) < 0.0f) { t = v_sol(P, V, r); if (t < LARGE) v_mad(Q, O, w, t); } return t; } /* * Compute the earliest time and position of the intersection of a * sphere and an edge. * * The sphere has radius R and moves along vector V from point P. The * edge moves along vector W from point Q in a coordinate system based * at O. The edge extends along the length of vector U. */ static float v_edge(float Q[3], const float o[3], const float q[3], const float u[3], const float w[3], const float p[3], const float v[3], float r) { float d[3], e[3]; float P[3], V[3]; float du, eu, uu, s, t; v_sub(d, p, o); v_sub(d, d, q); v_sub(e, v, w); /* * Think projections. Vectors D, extending from the edge vertex Q * to the sphere, and E, the relative velocity of sphere wrt the * edge, are made orthogonal to the edge vector U. Division of * the dot products is required to obtain the true projection * ratios since U does not have unit length. */ du = v_dot(d, u); eu = v_dot(e, u); uu = v_dot(u, u); v_mad(P, d, u, -du / uu); /* First, test for intersection. */ if (v_dot(P, P) < r * r) { /* The sphere already intersects the line of the edge. */ if (du < 0 || du > uu) { /* * The sphere is behind the endpoints of the edge, and * can't hit the edge without hitting the vertices first. */ return LARGE; } /* The sphere already intersects the edge. */ if (v_dot(P, e) >= 0) { /* Moving apart. */ return LARGE; } v_nrm(P, P); v_mad(Q, p, P, -r); return 0; } v_mad(V, e, u, -eu / uu); t = v_sol(P, V, r); s = (du + eu * t) / uu; /* Projection of D + E * t on U. */ if (0.0f <= t && t < LARGE && 0.0f < s && s < 1.0f) { v_mad(d, o, w, t); v_mad(e, q, u, s); v_add(Q, e, d); } else t = LARGE; return t; } /* * Compute the earliest time and position of the intersection of a * sphere and a plane. * * The sphere has radius R and moves along vector V from point P. The * plane moves along vector W. The plane has normal N and is * positioned at distance D from the origin O along that normal. */ static float v_side(float Q[3], const float o[3], const float w[3], const float n[3], float d, const float p[3], const float v[3], float r) { float vn = v_dot(v, n); float wn = v_dot(w, n); float t = LARGE; if (vn - wn <= 0.0f) { float on = v_dot(o, n); float pn = v_dot(p, n); float u = (r + d + on - pn) / (vn - wn); float a = ( d + on - pn) / (vn - wn); if (0.0f <= u) { t = u; v_mad(Q, p, v, +t); v_mad(Q, Q, n, -r); } else if (0.0f <= a) { t = 0; v_mad(Q, p, v, +t); v_mad(Q, Q, n, -r); } } return t; } /*---------------------------------------------------------------------------*/ /* * Compute the new linear and angular velocities of a bouncing ball. * Q gives the position of the point of impact and W gives the * velocity of the object being impacted. */ static float sol_bounce(struct v_ball *up, const float q[3], const float w[3], float dt) { float n[3], r[3], d[3], vn, wn; float *p = up->p; float *v = up->v; /* Find the normal of the impact. */ v_sub(r, p, q); v_sub(d, v, w); v_nrm(n, r); /* Find the new angular velocity. */ v_crs(up->w, d, r); v_scl(up->w, up->w, -1.0f / (up->r * up->r)); /* Find the new linear velocity. */ vn = v_dot(v, n); wn = v_dot(w, n); v_mad(v, v, n, 1.7 * (wn - vn)); v_mad(p, q, n, up->r); /* Return the ""energy"" of the impact, to determine the sound amplitude. */ return fabsf(v_dot(n, d)); } /*---------------------------------------------------------------------------*/ static float sol_test_vert(float dt, float T[3], const struct v_ball *up, const struct b_vert *vp, const float o[3], const float w[3]) { return v_vert(T, o, vp->p, w, up->p, up->v, up->r); } static float sol_test_edge(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_edge *ep, const float o[3], const float w[3]) { float q[3]; float u[3]; v_cpy(q, base->vv[ep->vi].p); v_sub(u, base->vv[ep->vj].p, base->vv[ep->vi].p); return v_edge(T, o, q, u, w, up->p, up->v, up->r); } static float sol_test_side(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_lump *lp, const struct b_side *sp, const float o[3], const float w[3]) { float t = v_side(T, o, w, sp->n, sp->d, up->p, up->v, up->r); int i; if (t < dt) for (i = 0; i < lp->sc; i++) { const struct b_side *sq = base->sv + base->iv[lp->s0 + i]; if (sp != sq && v_dot(T, sq->n) - v_dot(o, sq->n) - v_dot(w, sq->n) * t > sq->d) return LARGE; } return t; } /*---------------------------------------------------------------------------*/ static int sol_test_fore(float dt, const struct v_ball *up, const struct b_side *sp, const float o[3], const float w[3]) { float q[3], d; /* If the ball is not behind the plane, the test passes. */ v_sub(q, up->p, o); d = sp->d; if (v_dot(q, sp->n) - d + up->r >= 0) return 1; /* If it's not behind the plane after DT seconds, the test passes. */ v_mad(q, q, up->v, dt); d += v_dot(w, sp->n) * dt; if (v_dot(q, sp->n) - d + up->r >= 0) return 1; /* Else, test fails. */ return 0; } static int sol_test_back(float dt, const struct v_ball *up, const struct b_side *sp, const float o[3], const float w[3]) { float q[3], d; /* If the ball is not in front of the plane, the test passes. */ v_sub(q, up->p, o); d = sp->d; if (v_dot(q, sp->n) - d - up->r <= 0) return 1; /* If it's not in front of the plane after DT seconds, the test passes. */ v_mad(q, q, up->v, dt); d += v_dot(w, sp->n) * dt; if (v_dot(q, sp->n) - d - up->r <= 0) return 1; /* Else, test fails. */ return 0; } /*---------------------------------------------------------------------------*/ static float sol_test_lump(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_lump *lp, const float o[3], const float w[3]) { float U[3] = { 0.0f, 0.0f, 0.0f }; float u, t = dt; int i; /* Short circuit a non-solid lump. */ if (lp->fl & L_DETAIL) return t; /* Test all verts */ if (up->r > 0.0f) for (i = 0; i < lp->vc; i++) { const struct b_vert *vp = base->vv + base->iv[lp->v0 + i]; if ((u = sol_test_vert(t, U, up, vp, o, w)) < t) { v_cpy(T, U); t = u; } } /* Test all edges */ if (up->r > 0.0f) for (i = 0; i < lp->ec; i++) { const struct b_edge *ep = base->ev + base->iv[lp->e0 + i]; if ((u = sol_test_edge(t, U, up, base, ep, o, w)) < t) { v_cpy(T, U); t = u; } } /* Test all sides */ for (i = 0; i < lp->sc; i++) { const struct b_side *sp = base->sv + base->iv[lp->s0 + i]; if ((u = sol_test_side(t, U, up, base, lp, sp, o, w)) < t) { v_cpy(T, U); t = u; } } return t; } static float sol_test_node(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_node *np, const float o[3], const float w[3]) { float U[3], u, t = dt; int i; /* Test all lumps */ for (i = 0; i < np->lc; i++) { const struct b_lump *lp = base->lv + np->l0 + i; if ((u = sol_test_lump(t, U, up, base, lp, o, w)) < t) { v_cpy(T, U); t = u; } } /* Test in front of this node */ if (np->ni >= 0 && sol_test_fore(t, up, base->sv + np->si, o, w)) { const struct b_node *nq = base->nv + np->ni; if ((u = sol_test_node(t, U, up, base, nq, o, w)) < t) { v_cpy(T, U); t = u; } } /* Test behind this node */ if (np->nj >= 0 && sol_test_back(t, up, base->sv + np->si, o, w)) { const struct b_node *nq = base->nv + np->nj; if ((u = sol_test_node(t, U, up, base, nq, o, w)) < t) { v_cpy(T, U); t = u; } } return t; } static float sol_test_body(float dt, float T[3], float V[3], const struct v_ball *up, const struct s_vary *vary, const struct v_body *bp) { float U[3], O[3], E[4], W[3], u; const struct b_node *np = vary->base->nv + bp->base->ni; sol_body_p(O, vary, bp, 0.0f); sol_body_v(W, vary, bp, dt); sol_body_e(E, vary, bp, 0.0f); /* * For rotating bodies, rather than rotate every normal and vertex * of the body, we temporarily pretend the ball is rotating and * moving about a static body. */ /* * Linear velocity of a point rotating about the origin: * v = w x p */ if (E[0] != 1.0f || sol_body_w(vary, bp)) { /* The body has a non-identity orientation or it is rotating. */ struct v_ball ball; float e[4], p0[3], p1[3]; const float z[3] = { 0 }; /* First, calculate position at start and end of time interval. */ v_sub(p0, up->p, O); v_cpy(p1, p0); q_conj(e, E); q_rot(p0, e, p0); v_mad(p1, p1, up->v, dt); v_mad(p1, p1, W, -dt); sol_body_e(e, vary, bp, dt); q_conj(e, e); q_rot(p1, e, p1); /* Set up ball struct with values relative to body. */ ball = *up; v_cpy(ball.p, p0); /* Calculate velocity from start/end positions and time. */ v_sub(ball.v, p1, p0); v_scl(ball.v, ball.v, 1.0f / dt); if ((u = sol_test_node(dt, U, &ball, vary->base, np, z, z)) < dt) { /* Compute the final orientation. */ sol_body_e(e, vary, bp, u); /* Return world space coordinates. */ q_rot(T, e, U); v_add(T, O, T); /* Move forward. */ v_mad(T, T, W, u); /* Express ""non-ball"" velocity. */ q_rot(V, e, ball.v); v_sub(V, up->v, V); dt = u; } } else { if ((u = sol_test_node(dt, U, up, vary->base, np, O, W)) < dt) { v_cpy(T, U); v_cpy(V, W); dt = u; } } return dt; } static float sol_test_file(float dt, float T[3], float V[3], const struct v_ball *up, const struct s_vary *vary) { float U[3], W[3], u, t = dt; int i; for (i = 0; i < vary->bc; i++) { const struct v_body *bp = vary->bv + i; if ((u = sol_test_body(t, U, W, up, vary, bp)) < t) { v_cpy(T, U); v_cpy(V, W); t = u; } } return t; } /*---------------------------------------------------------------------------*/ /* * Track simulation steps in integer milliseconds. */ static float ms_accum; static void ms_init(void) { ms_accum = 0.0f; } static int ms_step(float dt) { int ms = 0; ms_accum += dt; while (ms_accum >= 0.001f) { ms_accum -= 0.001f; ms += 1; } return ms; } static int ms_peek(float dt) { int ms = 0; float at; at = ms_accum + dt; while (at >= 0.001f) { at -= 0.001f; ms += 1; } return ms; } /*---------------------------------------------------------------------------*/ /* * Step the physics forward DT seconds under the influence of gravity * vector G. If the ball gets pinched between two moving solids, this * loop might not terminate. It is better to do something physically * impossible than to lock up the game. So, if we make more than C * iterations, punt it. */ float sol_step(struct s_vary *vary, const float *g, float dt, int ui, int *m) { float P[3], V[3], v[3], r[3], a[3], d, e, nt, b = 0.0f, tt = dt; int c; union cmd cmd; if (ui < vary->uc) { struct v_ball *up = vary->uv + ui; /* If the ball is in contact with a surface, apply friction. */ v_cpy(a, up->v); v_cpy(v, up->v); v_cpy(up->v, g); if (m && sol_test_file(tt, P, V, up, vary) < 0.0005f) { v_cpy(up->v, v); v_sub(r, P, up->p); if ((d = v_dot(r, g) / (v_len(r) * v_len(g))) > 0.999f) { if ((e = (v_len(up->v) - dt)) > 0.0f) { /* Scale the linear velocity. */ v_nrm(up->v, up->v); v_scl(up->v, up->v, e); /* Scale the angular velocity. */ v_sub(v, V, up->v); v_crs(up->w, v, r); v_scl(up->w, up->w, -1.0f / (up->r * up->r)); } else { /* Friction has brought the ball to a stop. */ up->v[0] = 0.0f; up->v[1] = 0.0f; up->v[2] = 0.0f; (*m)++; } } else v_mad(up->v, v, g, tt); } else v_mad(up->v, v, g, tt); /* Test for collision. */ for (c = 16; c > 0 && tt > 0; c--) { float st; int mi, ms; /* HACK: avoid stepping across path changes. */ st = tt; for (mi = 0; mi < vary->mc; mi++) { struct v_move *mp = vary->mv + mi; struct v_path *pp = vary->pv + mp->pi; if (!pp->f) continue; if (mp->tm + ms_peek(st) > pp->base->tm) st = MS_TO_TIME(pp->base->tm - mp->tm); } /* Miss collisions if we reach the iteration limit. */ if (c > 1) nt = sol_test_file(st, P, V, up, vary); else nt = tt; cmd.type = CMD_STEP_SIMULATION; cmd.stepsim.dt = nt; sol_cmd_enq(&cmd); ms = ms_step(nt); sol_move_step(vary, nt, ms); sol_swch_step(vary, nt, ms); sol_ball_step(vary, nt); if (nt < st) if (b < (d = sol_bounce(up, P, V, nt))) b = d; tt -= nt; } v_sub(a, up->v, a); sol_pendulum(up, a, g, dt); } return b; } /*---------------------------------------------------------------------------*/ void sol_init_sim(struct s_vary *vary) { ms_init(); } void sol_quit_sim(void) { return; } /*---------------------------------------------------------------------------*/ ",0 "bute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author: Mathieu Lacage */ #ifndef IPV4_END_POINT_DEMUX_H #define IPV4_END_POINT_DEMUX_H #include #include #include ""ns3/ipv4-address.h"" #include ""ipv4-interface.h"" namespace ns3 { class Ipv4EndPoint; /** * \brief Demultiplexes packets to various transport layer endpoints * * This class serves as a lookup table to match partial or full information * about a four-tuple to an ns3::Ipv4EndPoint. It internally contains a list * of endpoints, and has APIs to add and find endpoints in this demux. This * code is shared in common to TCP and UDP protocols in ns3. This demux * sits between ns3's layer four and the socket layer */ class Ipv4EndPointDemux { public: typedef std::list EndPoints; typedef std::list::iterator EndPointsI; Ipv4EndPointDemux (); ~Ipv4EndPointDemux (); EndPoints GetAllEndPoints (void); bool LookupPortLocal (uint16_t port); bool LookupLocal (Ipv4Address addr, uint16_t port); EndPoints Lookup (Ipv4Address daddr, uint16_t dport, Ipv4Address saddr, uint16_t sport, Ptr incomingInterface); Ipv4EndPoint *SimpleLookup (Ipv4Address daddr, uint16_t dport, Ipv4Address saddr, uint16_t sport); Ipv4EndPoint *Allocate (void); Ipv4EndPoint *Allocate (Ipv4Address address); Ipv4EndPoint *Allocate (uint16_t port); Ipv4EndPoint *Allocate (Ipv4Address address, uint16_t port); Ipv4EndPoint *Allocate (Ipv4Address localAddress, uint16_t localPort, Ipv4Address peerAddress, uint16_t peerPort); void DeAllocate (Ipv4EndPoint *endPoint); private: uint16_t AllocateEphemeralPort (void); uint16_t m_ephemeral; uint16_t m_portLast; uint16_t m_portFirst; EndPoints m_endPoints; }; } // namespace ns3 #endif /* IPV4_END_POINTS_H */ ",0 " you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see */ #ifndef SUDOKU_INTERNAL_STATE_H #define SUDOKU_INTERNAL_STATE_H #include ""sudoku_types.h"" #include ""cell_listener_if.h"" namespace sudoku_systemc { template class sudoku_internal_state { public: sudoku_internal_state(const unsigned int & p_sub_x,const unsigned int & p_sub_y,const unsigned int & p_initial_value, cell_listener_if & p_listener); sudoku_internal_state(const sudoku_internal_state & p_initial_state,const unsigned int & p_hypothesis_level); unsigned int get_real_value(const typename sudoku_types::t_data_type & p_value)const; void remove_vertical_candidate(const typename sudoku_types::t_data_type & p_value); void remove_horizontal_candidate(const typename sudoku_types::t_data_type & p_value); void remove_square_candidate(const typename sudoku_types::t_data_type & p_value); void remove_available_value(const typename sudoku_types::t_data_type & p_value); const typename sudoku_types::t_nb_available_values & get_nb_available_values(void)const; const typename sudoku_types::t_data_type make_hypothesis(void); const typename sudoku_types::t_available_values & get_values_to_release(void)const; const typename sudoku_types::t_data_type get_remaining_value(void); // Value management inline const typename sudoku_types::t_data_type & get_value(void)const; inline const bool is_value_set(void)const; void set_value(const typename sudoku_types::t_data_type & p_value); const unsigned int & get_hypothesis_level(void)const; bool is_modified(void)const ; void notify_listener(void); private: void set_horizontal_candidate(const unsigned int & p_index, const typename sudoku_types::t_group_candidate & p_value); void set_vertical_candidate(const unsigned int & p_index, const typename sudoku_types::t_group_candidate & p_value); void set_square_candidate(const unsigned int & p_index, const typename sudoku_types::t_group_candidate & p_value); void set_available_value(const unsigned int & p_index, bool p_value); void set_release_value(const unsigned int & p_index, bool p_value); cell_listener_if & m_listener; typename sudoku_types::t_group_candidate m_vertical_candidates[sudoku_configuration::m_nb_value]; typename sudoku_types::t_group_candidate m_horizontal_candidates[sudoku_configuration::m_nb_value]; typename sudoku_types::t_group_candidate m_square_candidates[sudoku_configuration::m_nb_value]; typename sudoku_types::t_available_values m_available_values; typename sudoku_types::t_nb_available_values m_nb_available_values; typename sudoku_types::t_available_values m_values_to_release; typename sudoku_types::t_data_type m_value; bool m_value_set; unsigned int m_hypothesis_level; bool m_modified; }; } #include ""sudoku_internal_state.hpp"" #endif // SUDOKU_INTERNAL_STATE_H //EOF ",0 "le>cfgv: Not compatible 👼
« Up

cfgv 8.6.0 Not compatible 👼

📅 (2021-11-28 06:52:07 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-num            base        Num library distributed with the OCaml compiler
base-threads        base
base-unix           base
camlp5              7.14        Preprocessor-pretty-printer of OCaml
conf-findutils      1           Virtual package relying on findutils
conf-perl           1           Virtual package relying on perl
coq                 8.5.0       Formal proof management system
num                 0           The Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.05.0      The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0      Official 4.05.0 release
ocaml-config        1           OCaml Switch Configuration
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/cfgv"
license: "LGPL"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/CFGV"]
depends: [
  "ocaml"
  "coq" {>= "8.6" & < "8.7~"}
]
tags: [ "keyword: generic programming" "keyword: variable bindings" "keyword: context free grammars" "keyword: substitution" "keyword: alpha equality" "keyword: equivariance" "category: Computer Science/Lambda Calculi" ]
authors: [ "Abhishek <abhishek.anand.iitg@gmail.com> [http://www.cs.cornell.edu/~aa755/]" "Vincent Rahli <vincent.rahli@gmail.com> [http://www.cs.cornell.edu/~rahli/]" ]
bug-reports: "https://github.com/coq-contribs/cfgv/issues"
dev-repo: "git+https://github.com/coq-contribs/cfgv.git"
synopsis: "Generic Proofs about Alpha Equality and Substitution"
description: """
http://www.nuprl.org/html/CFGVLFMTP2014/
Please read the following paper"""
flags: light-uninstall
url {
  src: "https://github.com/coq-contribs/cfgv/archive/v8.6.0.tar.gz"
  checksum: "md5=0d5ec3f56865a223df15ac4b5ed9f235"
}

Lint

Command
true
Return code
0

Dry install 🏜️

Dry install with the current Coq version:

Command
opam install -y --show-action coq-cfgv.8.6.0 coq.8.5.0
Return code
5120
Output
[NOTE] Package coq is already installed (current version is 8.5.0).
The following dependencies couldn't be met:
  - coq-cfgv -> coq >= 8.6
Your request can't be satisfied:
  - No available version of coq satisfies the constraints
No solution found, exiting

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command
opam remove -y coq; opam install -y --show-action --unlock-base coq-cfgv.8.6.0
Return code
0

Install dependencies

Command
true
Return code
0
Duration
0 s

Install 🚀

Command
true
Return code
0
Duration
0 s

Installation size

No files were installed.

Uninstall 🧹

Command
true
Return code
0
Missing removes
none
Wrong removes
none

Sources are on GitHub © Guillaume Claret 🐣

",0 ", bool smoothTexture); private: static bool readBMP(unsigned char * rawData, int rawDataSize, unsigned char ** buffer, Size * size); static bool getRawData(unsigned char ** rawData, int * size, char * name); static int getRawSize(FILE * imgFile); static void error(char * name, char * where); static void copyColorBytesBGR(unsigned char * rgbaBuffer, unsigned char * rgbBuffer, int count); static void copyColorBytesABGR(unsigned char * rgbaBuffer, unsigned char * rgbBuffer, int count); static int addPaddingFor4Bytes(int size); static int ucharToInt(unsigned char * buffer, int offset); static unsigned short ucharToUShort(unsigned char * buffer, int offset); }; #endif // _BMP_LOADER_H_ ",0 "ed_Buffer_Overflow__c_CWE805.string.label.xml Template File: sources-sink-65a.tmpl.c */ /* * @description * CWE: 122 Heap Based Buffer Overflow * BadSource: Allocate using malloc() and set data pointer to a small buffer * GoodSource: Allocate using malloc() and set data pointer to a large buffer * Sinks: snprintf * BadSink : Copy string to data using snprintf * Flow Variant: 65 Data/control flow: data passed as an argument from one function to a function in a different source file called via a function pointer * * */ #include ""std_testcase.h"" #include #ifdef _WIN32 #define SNPRINTF _snprintf #else #define SNPRINTF snprintf #endif #ifndef OMITBAD /* bad function declaration */ void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_snprintf_65b_badSink(char * data); void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_snprintf_65_bad() { char * data; /* define a function pointer */ void (*funcPtr) (char *) = CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_snprintf_65b_badSink; data = NULL; /* FLAW: Allocate and point data to a small buffer that is smaller than the large buffer used in the sinks */ data = (char *)malloc(50*sizeof(char)); if (data == NULL) {exit(-1);} data[0] = '\0'; /* null terminate */ /* use the function pointer */ funcPtr(data); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_snprintf_65b_goodG2BSink(char * data); static void goodG2B() { char * data; void (*funcPtr) (char *) = CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_snprintf_65b_goodG2BSink; data = NULL; /* FIX: Allocate and point data to a large buffer that is at least as large as the large buffer used in the sink */ data = (char *)malloc(100*sizeof(char)); if (data == NULL) {exit(-1);} data[0] = '\0'; /* null terminate */ funcPtr(data); } void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_snprintf_65_good() { goodG2B(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine(""Calling good()...""); CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_snprintf_65_good(); printLine(""Finished good()""); #endif /* OMITGOOD */ #ifndef OMITBAD printLine(""Calling bad()...""); CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_snprintf_65_bad(); printLine(""Finished bad()""); #endif /* OMITBAD */ return 0; } #endif ",0 "t-col-1"">
Blog

    {% for post in site.posts %}
    {{ post.date | date: ""%-d %b %Y"" }}
    {% endfor %}

{{ site.description }}.

",0 "* * A common interface for non-anchored blocks of time (periods and durations). */ interface TimeSpanInterface { /** * @return bool True if the time span is zero seconds in length; otherwise, false. */ public function isEmpty(); /** * @return TimeSpanInterface */ public function inverse(); /** * Resolve the time span to a total number of seconds, using the given time point as the start of the span. * * @param TimePointInterface $timePoint The start of the time span. * * @return int The total number of seconds. */ public function resolveToSeconds(TimePointInterface $timePoint); /** * Resolve the time span to a {@see Duration}, using the given time point as the start of the span. * * @param TimePointInterface $timePoint The start of the time span. * * @return Duration */ public function resolveToDuration(TimePointInterface $timePoint); /** * Resolve the time span to a {@see Period}, using the given time point as the start of the span. * * @param TimePointInterface $timePoint The start of the time span. * * @return Period */ public function resolveToPeriod(TimePointInterface $timePoint); /** * Resolve the time span an an {@see IntervalInterface} starting at the given time point, with a length equal to this time span. * * @param TimePointInterface $timePoint The start of the interval. * * @return IntervalInterface The end of the time span. */ public function resolveToInterval(TimePointInterface $timePoint); /** * Resolve the time span to a time point after the given time point by the length of this span. * * @param TimePointInterface $timePoint The start of the time span. * * @return TimePointInterface */ public function resolveToTimePoint(TimePointInterface $timePoint); /** * @return DateInterval A native PHP DateInterval instance representing this span. */ public function nativeDateInterval(); /** * @return string */ public function string(); /** * @return string */ public function __toString(); } ",0 " ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an ""AS IS"" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ***************************************************************************/ #include ""curl_setup.h"" #if defined(USE_NTLM) /* * NTLM details: * * http://davenport.sourceforge.net/ntlm.html * https://www.innovation.ch/java/ntlm.html */ #if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) #ifdef USE_OPENSSL # ifdef USE_OPENSSL # include # ifndef OPENSSL_NO_MD4 # include # endif # include # include # include # else # include # ifndef OPENSSL_NO_MD4 # include # endif # include # include # include # endif # if (OPENSSL_VERSION_NUMBER < 0x00907001L) # define DES_key_schedule des_key_schedule # define DES_cblock des_cblock # define DES_set_odd_parity des_set_odd_parity # define DES_set_key des_set_key # define DES_ecb_encrypt des_ecb_encrypt # define DESKEY(x) x # define DESKEYARG(x) x # else # define DESKEYARG(x) *x # define DESKEY(x) &x # endif #elif defined(USE_GNUTLS_NETTLE) # include # include #elif defined(USE_GNUTLS) # include # define MD5_DIGEST_LENGTH 16 # define MD4_DIGEST_LENGTH 16 #elif defined(USE_MBEDTLS) # include # include #elif defined(USE_NSS) # include # include # include # include ""curl_md4.h"" # define MD5_DIGEST_LENGTH MD5_LENGTH #elif defined(USE_DARWINSSL) # include # include #elif defined(USE_OS400CRYPTO) # include ""cipher.mih"" /* mih/cipher */ # include ""curl_md4.h"" #elif defined(USE_WIN32_CRYPTO) # include #else # error ""Can't compile NTLM support without a crypto library."" #endif #include ""urldata.h"" #include ""non-ascii.h"" #include ""rawstr.h"" #include ""curl_ntlm_core.h"" #include ""curl_md5.h"" #include ""curl_hmac.h"" #include ""warnless.h"" #include ""curl_endian.h"" #include ""curl_des.h"" /* The last 3 #include files should be in this order */ #include ""curl_printf.h"" #include ""curl_memory.h"" #include ""memdebug.h"" #define NTLM_HMAC_MD5_LEN (16) #define NTLMv2_BLOB_SIGNATURE ""\x01\x01\x00\x00"" #define NTLMv2_BLOB_LEN (44 -16 + ntlm->target_info_len + 4) /* * Turns a 56-bit key into being 64-bit wide. */ static void extend_key_56_to_64(const unsigned char *key_56, char *key) { key[0] = key_56[0]; key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1)); key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2)); key[3] = (unsigned char)(((key_56[2] << 5) & 0xFF) | (key_56[3] >> 3)); key[4] = (unsigned char)(((key_56[3] << 4) & 0xFF) | (key_56[4] >> 4)); key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5)); key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6)); key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF); } #ifdef USE_OPENSSL /* * Turns a 56 bit key into the 64 bit, odd parity key and sets the key. The * key schedule ks is also set. */ static void setup_des_key(const unsigned char *key_56, DES_key_schedule DESKEYARG(ks)) { DES_cblock key; /* Expand the 56-bit key to 64-bits */ extend_key_56_to_64(key_56, (char *) &key); /* Set the key parity to odd */ DES_set_odd_parity(&key); /* Set the key */ DES_set_key(&key, ks); } #elif defined(USE_GNUTLS_NETTLE) static void setup_des_key(const unsigned char *key_56, struct des_ctx *des) { char key[8]; /* Expand the 56-bit key to 64-bits */ extend_key_56_to_64(key_56, key); /* Set the key parity to odd */ Curl_des_set_odd_parity((unsigned char *) key, sizeof(key)); /* Set the key */ des_set_key(des, (const uint8_t *) key); } #elif defined(USE_GNUTLS) /* * Turns a 56 bit key into the 64 bit, odd parity key and sets the key. */ static void setup_des_key(const unsigned char *key_56, gcry_cipher_hd_t *des) { char key[8]; /* Expand the 56-bit key to 64-bits */ extend_key_56_to_64(key_56, key); /* Set the key parity to odd */ Curl_des_set_odd_parity((unsigned char *) key, sizeof(key)); /* Set the key */ gcry_cipher_setkey(*des, key, sizeof(key)); } #elif defined(USE_MBEDTLS) static bool encrypt_des(const unsigned char *in, unsigned char *out, const unsigned char *key_56) { mbedtls_des_context ctx; char key[8]; /* Expand the 56-bit key to 64-bits */ extend_key_56_to_64(key_56, key); /* Set the key parity to odd */ mbedtls_des_key_set_parity((unsigned char *) key); /* Perform the encryption */ mbedtls_des_init(&ctx); mbedtls_des_setkey_enc(&ctx, (unsigned char *) key); return mbedtls_des_crypt_ecb(&ctx, in, out) == 0; } #elif defined(USE_NSS) /* * Expands a 56 bit key KEY_56 to 64 bit and encrypts 64 bit of data, using * the expanded key. The caller is responsible for giving 64 bit of valid * data is IN and (at least) 64 bit large buffer as OUT. */ static bool encrypt_des(const unsigned char *in, unsigned char *out, const unsigned char *key_56) { const CK_MECHANISM_TYPE mech = CKM_DES_ECB; /* DES cipher in ECB mode */ PK11SlotInfo *slot = NULL; char key[8]; /* expanded 64 bit key */ SECItem key_item; PK11SymKey *symkey = NULL; SECItem *param = NULL; PK11Context *ctx = NULL; int out_len; /* not used, required by NSS */ bool rv = FALSE; /* use internal slot for DES encryption (requires NSS to be initialized) */ slot = PK11_GetInternalKeySlot(); if(!slot) return FALSE; /* Expand the 56-bit key to 64-bits */ extend_key_56_to_64(key_56, key); /* Set the key parity to odd */ Curl_des_set_odd_parity((unsigned char *) key, sizeof(key)); /* Import the key */ key_item.data = (unsigned char *)key; key_item.len = sizeof(key); symkey = PK11_ImportSymKey(slot, mech, PK11_OriginUnwrap, CKA_ENCRYPT, &key_item, NULL); if(!symkey) goto fail; /* Create the DES encryption context */ param = PK11_ParamFromIV(mech, /* no IV in ECB mode */ NULL); if(!param) goto fail; ctx = PK11_CreateContextBySymKey(mech, CKA_ENCRYPT, symkey, param); if(!ctx) goto fail; /* Perform the encryption */ if(SECSuccess == PK11_CipherOp(ctx, out, &out_len, /* outbuflen */ 8, (unsigned char *)in, /* inbuflen */ 8) && SECSuccess == PK11_Finalize(ctx)) rv = /* all OK */ TRUE; fail: /* cleanup */ if(ctx) PK11_DestroyContext(ctx, PR_TRUE); if(symkey) PK11_FreeSymKey(symkey); if(param) SECITEM_FreeItem(param, PR_TRUE); PK11_FreeSlot(slot); return rv; } #elif defined(USE_DARWINSSL) static bool encrypt_des(const unsigned char *in, unsigned char *out, const unsigned char *key_56) { char key[8]; size_t out_len; CCCryptorStatus err; /* Expand the 56-bit key to 64-bits */ extend_key_56_to_64(key_56, key); /* Set the key parity to odd */ Curl_des_set_odd_parity((unsigned char *) key, sizeof(key)); /* Perform the encryption */ err = CCCrypt(kCCEncrypt, kCCAlgorithmDES, kCCOptionECBMode, key, kCCKeySizeDES, NULL, in, 8 /* inbuflen */, out, 8 /* outbuflen */, &out_len); return err == kCCSuccess; } #elif defined(USE_OS400CRYPTO) static bool encrypt_des(const unsigned char *in, unsigned char *out, const unsigned char *key_56) { char key[8]; _CIPHER_Control_T ctl; /* Setup the cipher control structure */ ctl.Func_ID = ENCRYPT_ONLY; ctl.Data_Len = sizeof(key); /* Expand the 56-bit key to 64-bits */ extend_key_56_to_64(key_56, ctl.Crypto_Key); /* Set the key parity to odd */ Curl_des_set_odd_parity((unsigned char *) ctl.Crypto_Key, ctl.Data_Len); /* Perform the encryption */ _CIPHER((_SPCPTR *) &out, &ctl, (_SPCPTR *) &in); return TRUE; } #elif defined(USE_WIN32_CRYPTO) static bool encrypt_des(const unsigned char *in, unsigned char *out, const unsigned char *key_56) { HCRYPTPROV hprov; HCRYPTKEY hkey; struct { BLOBHEADER hdr; unsigned int len; char key[8]; } blob; DWORD len = 8; /* Acquire the crypto provider */ if(!CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) return FALSE; /* Setup the key blob structure */ memset(&blob, 0, sizeof(blob)); blob.hdr.bType = PLAINTEXTKEYBLOB; blob.hdr.bVersion = 2; blob.hdr.aiKeyAlg = CALG_DES; blob.len = sizeof(blob.key); /* Expand the 56-bit key to 64-bits */ extend_key_56_to_64(key_56, blob.key); /* Set the key parity to odd */ Curl_des_set_odd_parity((unsigned char *) blob.key, sizeof(blob.key)); /* Import the key */ if(!CryptImportKey(hprov, (BYTE *) &blob, sizeof(blob), 0, 0, &hkey)) { CryptReleaseContext(hprov, 0); return FALSE; } memcpy(out, in, 8); /* Perform the encryption */ CryptEncrypt(hkey, 0, FALSE, 0, out, &len, len); CryptDestroyKey(hkey); CryptReleaseContext(hprov, 0); return TRUE; } #endif /* defined(USE_WIN32_CRYPTO) */ /* * takes a 21 byte array and treats it as 3 56-bit DES keys. The * 8 byte plaintext is encrypted with each key and the resulting 24 * bytes are stored in the results array. */ void Curl_ntlm_core_lm_resp(const unsigned char *keys, const unsigned char *plaintext, unsigned char *results) { #ifdef USE_OPENSSL DES_key_schedule ks; setup_des_key(keys, DESKEY(ks)); DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) results, DESKEY(ks), DES_ENCRYPT); setup_des_key(keys + 7, DESKEY(ks)); DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 8), DESKEY(ks), DES_ENCRYPT); setup_des_key(keys + 14, DESKEY(ks)); DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 16), DESKEY(ks), DES_ENCRYPT); #elif defined(USE_GNUTLS_NETTLE) struct des_ctx des; setup_des_key(keys, &des); des_encrypt(&des, 8, results, plaintext); setup_des_key(keys + 7, &des); des_encrypt(&des, 8, results + 8, plaintext); setup_des_key(keys + 14, &des); des_encrypt(&des, 8, results + 16, plaintext); #elif defined(USE_GNUTLS) gcry_cipher_hd_t des; gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); setup_des_key(keys, &des); gcry_cipher_encrypt(des, results, 8, plaintext, 8); gcry_cipher_close(des); gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); setup_des_key(keys + 7, &des); gcry_cipher_encrypt(des, results + 8, 8, plaintext, 8); gcry_cipher_close(des); gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); setup_des_key(keys + 14, &des); gcry_cipher_encrypt(des, results + 16, 8, plaintext, 8); gcry_cipher_close(des); #elif defined(USE_MBEDTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) \ || defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) encrypt_des(plaintext, results, keys); encrypt_des(plaintext, results + 8, keys + 7); encrypt_des(plaintext, results + 16, keys + 14); #endif } /* * Set up lanmanager hashed password */ CURLcode Curl_ntlm_core_mk_lm_hash(struct Curl_easy *data, const char *password, unsigned char *lmbuffer /* 21 bytes */) { CURLcode result; unsigned char pw[14]; static const unsigned char magic[] = { 0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 /* i.e. KGS!@#$% */ }; size_t len = CURLMIN(strlen(password), 14); Curl_strntoupper((char *)pw, password, len); memset(&pw[len], 0, 14 - len); /* * The LanManager hashed password needs to be created using the * password in the network encoding not the host encoding. */ result = Curl_convert_to_network(data, (char *)pw, 14); if(result) return result; { /* Create LanManager hashed password. */ #ifdef USE_OPENSSL DES_key_schedule ks; setup_des_key(pw, DESKEY(ks)); DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)lmbuffer, DESKEY(ks), DES_ENCRYPT); setup_des_key(pw + 7, DESKEY(ks)); DES_ecb_encrypt((DES_cblock *)magic, (DES_cblock *)(lmbuffer + 8), DESKEY(ks), DES_ENCRYPT); #elif defined(USE_GNUTLS_NETTLE) struct des_ctx des; setup_des_key(pw, &des); des_encrypt(&des, 8, lmbuffer, magic); setup_des_key(pw + 7, &des); des_encrypt(&des, 8, lmbuffer + 8, magic); #elif defined(USE_GNUTLS) gcry_cipher_hd_t des; gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); setup_des_key(pw, &des); gcry_cipher_encrypt(des, lmbuffer, 8, magic, 8); gcry_cipher_close(des); gcry_cipher_open(&des, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0); setup_des_key(pw + 7, &des); gcry_cipher_encrypt(des, lmbuffer + 8, 8, magic, 8); gcry_cipher_close(des); #elif defined(USE_MBEDTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) \ || defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) encrypt_des(magic, lmbuffer, pw); encrypt_des(magic, lmbuffer + 8, pw + 7); #endif memset(lmbuffer + 16, 0, 21 - 16); } return CURLE_OK; } #if USE_NTRESPONSES static void ascii_to_unicode_le(unsigned char *dest, const char *src, size_t srclen) { size_t i; for(i = 0; i < srclen; i++) { dest[2 * i] = (unsigned char)src[i]; dest[2 * i + 1] = '\0'; } } #if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) static void ascii_uppercase_to_unicode_le(unsigned char *dest, const char *src, size_t srclen) { size_t i; for(i = 0; i < srclen; i++) { dest[2 * i] = (unsigned char)(toupper(src[i])); dest[2 * i + 1] = '\0'; } } #endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */ /* * Set up nt hashed passwords * @unittest: 1600 */ CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, const char *password, unsigned char *ntbuffer /* 21 bytes */) { size_t len = strlen(password); unsigned char *pw = malloc(len * 2); CURLcode result; if(!pw) return CURLE_OUT_OF_MEMORY; ascii_to_unicode_le(pw, password, len); /* * The NT hashed password needs to be created using the password in the * network encoding not the host encoding. */ result = Curl_convert_to_network(data, (char *)pw, len * 2); if(result) return result; { /* Create NT hashed password. */ #ifdef USE_OPENSSL MD4_CTX MD4pw; MD4_Init(&MD4pw); MD4_Update(&MD4pw, pw, 2 * len); MD4_Final(ntbuffer, &MD4pw); #elif defined(USE_GNUTLS_NETTLE) struct md4_ctx MD4pw; md4_init(&MD4pw); md4_update(&MD4pw, (unsigned int)(2 * len), pw); md4_digest(&MD4pw, MD4_DIGEST_SIZE, ntbuffer); #elif defined(USE_GNUTLS) gcry_md_hd_t MD4pw; gcry_md_open(&MD4pw, GCRY_MD_MD4, 0); gcry_md_write(MD4pw, pw, 2 * len); memcpy (ntbuffer, gcry_md_read (MD4pw, 0), MD4_DIGEST_LENGTH); gcry_md_close(MD4pw); #elif defined(USE_MBEDTLS) mbedtls_md4(pw, 2 * len, ntbuffer); #elif defined(USE_NSS) || defined(USE_OS400CRYPTO) Curl_md4it(ntbuffer, pw, 2 * len); #elif defined(USE_DARWINSSL) (void)CC_MD4(pw, (CC_LONG)(2 * len), ntbuffer); #elif defined(USE_WIN32_CRYPTO) HCRYPTPROV hprov; if(CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { HCRYPTHASH hhash; if(CryptCreateHash(hprov, CALG_MD4, 0, 0, &hhash)) { DWORD length = 16; CryptHashData(hhash, pw, (unsigned int)len * 2, 0); CryptGetHashParam(hhash, HP_HASHVAL, ntbuffer, &length, 0); CryptDestroyHash(hhash); } CryptReleaseContext(hprov, 0); } #endif memset(ntbuffer + 16, 0, 21 - 16); } free(pw); return CURLE_OK; } #if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI) /* This returns the HMAC MD5 digest */ CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen, const unsigned char *data, unsigned int datalen, unsigned char *output) { HMAC_context *ctxt = Curl_HMAC_init(Curl_HMAC_MD5, key, keylen); if(!ctxt) return CURLE_OUT_OF_MEMORY; /* Update the digest with the given challenge */ Curl_HMAC_update(ctxt, data, datalen); /* Finalise the digest */ Curl_HMAC_final(ctxt, output); return CURLE_OK; } /* This creates the NTLMv2 hash by using NTLM hash as the key and Unicode * (uppercase UserName + Domain) as the data */ CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen, const char *domain, size_t domlen, unsigned char *ntlmhash, unsigned char *ntlmv2hash) { /* Unicode representation */ size_t identity_len = (userlen + domlen) * 2; unsigned char *identity = malloc(identity_len); CURLcode result = CURLE_OK; if(!identity) return CURLE_OUT_OF_MEMORY; ascii_uppercase_to_unicode_le(identity, user, userlen); ascii_to_unicode_le(identity + (userlen << 1), domain, domlen); result = Curl_hmac_md5(ntlmhash, 16, identity, curlx_uztoui(identity_len), ntlmv2hash); free(identity); return result; } /* * Curl_ntlm_core_mk_ntlmv2_resp() * * This creates the NTLMv2 response as set in the ntlm type-3 message. * * Parameters: * * ntlmv2hash [in] - The ntlmv2 hash (16 bytes) * challenge_client [in] - The client nonce (8 bytes) * ntlm [in] - The ntlm data struct being used to read TargetInfo and Server challenge received in the type-2 message * ntresp [out] - The address where a pointer to newly allocated * memory holding the NTLMv2 response. * ntresp_len [out] - The length of the output message. * * Returns CURLE_OK on success. */ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, unsigned char *challenge_client, struct ntlmdata *ntlm, unsigned char **ntresp, unsigned int *ntresp_len) { /* NTLMv2 response structure : ------------------------------------------------------------------------------ 0 HMAC MD5 16 bytes ------BLOB-------------------------------------------------------------------- 16 Signature 0x01010000 20 Reserved long (0x00000000) 24 Timestamp LE, 64-bit signed value representing the number of tenths of a microsecond since January 1, 1601. 32 Client Nonce 8 bytes 40 Unknown 4 bytes 44 Target Info N bytes (from the type-2 message) 44+N Unknown 4 bytes ------------------------------------------------------------------------------ */ unsigned int len = 0; unsigned char *ptr = NULL; unsigned char hmac_output[NTLM_HMAC_MD5_LEN]; curl_off_t tw; CURLcode result = CURLE_OK; #if CURL_SIZEOF_CURL_OFF_T < 8 #error ""this section needs 64bit support to work"" #endif /* Calculate the timestamp */ #ifdef DEBUGBUILD char *force_timestamp = getenv(""CURL_FORCETIME""); if(force_timestamp) tw = CURL_OFF_T_C(11644473600) * 10000000; else #endif tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; /* Calculate the response len */ len = NTLM_HMAC_MD5_LEN + NTLMv2_BLOB_LEN; /* Allocate the response */ ptr = malloc(len); if(!ptr) return CURLE_OUT_OF_MEMORY; memset(ptr, 0, len); /* Create the BLOB structure */ snprintf((char *)ptr + NTLM_HMAC_MD5_LEN, NTLMv2_BLOB_LEN, NTLMv2_BLOB_SIGNATURE ""%c%c%c%c"", /* Reserved = 0 */ 0, 0, 0, 0); Curl_write64_le(tw, ptr + 24); memcpy(ptr + 32, challenge_client, 8); memcpy(ptr + 44, ntlm->target_info, ntlm->target_info_len); /* Concatenate the Type 2 challenge with the BLOB and do HMAC MD5 */ memcpy(ptr + 8, &ntlm->nonce[0], 8); result = Curl_hmac_md5(ntlmv2hash, NTLM_HMAC_MD5_LEN, ptr + 8, NTLMv2_BLOB_LEN + 8, hmac_output); if(result) { free(ptr); return result; } /* Concatenate the HMAC MD5 output with the BLOB */ memcpy(ptr, hmac_output, NTLM_HMAC_MD5_LEN); /* Return the response */ *ntresp = ptr; *ntresp_len = len; return result; } /* * Curl_ntlm_core_mk_lmv2_resp() * * This creates the LMv2 response as used in the ntlm type-3 message. * * Parameters: * * ntlmv2hash [in] - The ntlmv2 hash (16 bytes) * challenge_client [in] - The client nonce (8 bytes) * challenge_client [in] - The server challenge (8 bytes) * lmresp [out] - The LMv2 response (24 bytes) * * Returns CURLE_OK on success. */ CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash, unsigned char *challenge_client, unsigned char *challenge_server, unsigned char *lmresp) { unsigned char data[16]; unsigned char hmac_output[16]; CURLcode result = CURLE_OK; memcpy(&data[0], challenge_server, 8); memcpy(&data[8], challenge_client, 8); result = Curl_hmac_md5(ntlmv2hash, 16, &data[0], 16, hmac_output); if(result) return result; /* Concatenate the HMAC MD5 output with the client nonce */ memcpy(lmresp, hmac_output, 16); memcpy(lmresp+16, challenge_client, 8); return result; } #endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */ #endif /* USE_NTRESPONSES */ #endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */ #endif /* USE_NTLM */ ",0 "License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include ""cx25840-core.h"" static int set_audclk_freq(struct i2c_client *client, u32 freq) { struct cx25840_state *state = i2c_get_clientdata(client); if (freq != 32000 && freq != 44100 && freq != 48000) return -EINVAL; /* assert soft reset */ cx25840_and_or(client, 0x810, ~0x1, 0x01); /* common for all inputs and rates */ /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x10 */ cx25840_write(client, 0x127, 0x50); if (state->aud_input != CX25840_AUDIO_SERIAL) { switch (freq) { case 32000: /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x0f040610); /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xee39bb01); /* src3/4/6_ctl = 0x0801f77f */ cx25840_write4(client, 0x900, 0x7ff70108); cx25840_write4(client, 0x904, 0x7ff70108); cx25840_write4(client, 0x90c, 0x7ff70108); break; case 44100: /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x0f040910); /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xd66bec00); /* src3/4/6_ctl = 0x08016d59 */ cx25840_write4(client, 0x900, 0x596d0108); cx25840_write4(client, 0x904, 0x596d0108); cx25840_write4(client, 0x90c, 0x596d0108); break; case 48000: /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x0f040a10); /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xe5d69800); /* src3/4/6_ctl = 0x08014faa */ cx25840_write4(client, 0x900, 0xaa4f0108); cx25840_write4(client, 0x904, 0xaa4f0108); cx25840_write4(client, 0x90c, 0xaa4f0108); break; } } else { switch (freq) { case 32000: /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x0f04081e); /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0x69082a01); /* src1_ctl = 0x08010000 */ cx25840_write4(client, 0x8f8, 0x00000108); /* src3/4/6_ctl = 0x08020000 */ cx25840_write4(client, 0x900, 0x00000208); cx25840_write4(client, 0x904, 0x00000208); cx25840_write4(client, 0x90c, 0x00000208); /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x14 */ cx25840_write(client, 0x127, 0x54); break; case 44100: /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x0f040918); /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xd66bec00); /* src1_ctl = 0x08010000 */ cx25840_write4(client, 0x8f8, 0xcd600108); /* src3/4/6_ctl = 0x08020000 */ cx25840_write4(client, 0x900, 0x85730108); cx25840_write4(client, 0x904, 0x85730108); cx25840_write4(client, 0x90c, 0x85730108); break; case 48000: /* VID_PLL and AUX_PLL */ cx25840_write4(client, 0x108, 0x0f040a18); /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xe5d69800); /* src1_ctl = 0x08010000 */ cx25840_write4(client, 0x8f8, 0x00800108); /* src3/4/6_ctl = 0x08020000 */ cx25840_write4(client, 0x900, 0x55550108); cx25840_write4(client, 0x904, 0x55550108); cx25840_write4(client, 0x90c, 0x55550108); break; } } /* deassert soft reset */ cx25840_and_or(client, 0x810, ~0x1, 0x00); state->audclk_freq = freq; return 0; } void cx25840_audio_set_path(struct i2c_client *client) { struct cx25840_state *state = i2c_get_clientdata(client); /* stop microcontroller */ cx25840_and_or(client, 0x803, ~0x10, 0); /* Mute everything to prevent the PFFT! */ cx25840_write(client, 0x8d3, 0x1f); if (state->aud_input == CX25840_AUDIO_SERIAL) { /* Set Path1 to Serial Audio Input */ cx25840_write4(client, 0x8d0, 0x12100101); /* The microcontroller should not be started for the * non-tuner inputs: autodetection is specific for * TV audio. */ } else { /* Set Path1 to Analog Demod Main Channel */ cx25840_write4(client, 0x8d0, 0x7038061f); /* When the microcontroller detects the * audio format, it will unmute the lines */ cx25840_and_or(client, 0x803, ~0x10, 0x10); } set_audclk_freq(client, state->audclk_freq); } static int get_volume(struct i2c_client *client) { /* Volume runs +18dB to -96dB in 1/2dB steps * change to fit the msp3400 -114dB to +12dB range */ /* check PATH1_VOLUME */ int vol = 228 - cx25840_read(client, 0x8d4); vol = (vol / 2) + 23; return vol << 9; } static void set_volume(struct i2c_client *client, int volume) { /* First convert the volume to msp3400 values (0-127) */ int vol = volume >> 9; /* now scale it up to cx25840 values * -114dB to -96dB maps to 0 * this should be 19, but in my testing that was 4dB too loud */ if (vol <= 23) { vol = 0; } else { vol -= 23; } /* PATH1_VOLUME */ cx25840_write(client, 0x8d4, 228 - (vol * 2)); } static int get_bass(struct i2c_client *client) { /* bass is 49 steps +12dB to -12dB */ /* check PATH1_EQ_BASS_VOL */ int bass = cx25840_read(client, 0x8d9) & 0x3f; bass = (((48 - bass) * 0xffff) + 47) / 48; return bass; } static void set_bass(struct i2c_client *client, int bass) { /* PATH1_EQ_BASS_VOL */ cx25840_and_or(client, 0x8d9, ~0x3f, 48 - (bass * 48 / 0xffff)); } static int get_treble(struct i2c_client *client) { /* treble is 49 steps +12dB to -12dB */ /* check PATH1_EQ_TREBLE_VOL */ int treble = cx25840_read(client, 0x8db) & 0x3f; treble = (((48 - treble) * 0xffff) + 47) / 48; return treble; } static void set_treble(struct i2c_client *client, int treble) { /* PATH1_EQ_TREBLE_VOL */ cx25840_and_or(client, 0x8db, ~0x3f, 48 - (treble * 48 / 0xffff)); } static int get_balance(struct i2c_client *client) { /* balance is 7 bit, 0 to -96dB */ /* check PATH1_BAL_LEVEL */ int balance = cx25840_read(client, 0x8d5) & 0x7f; /* check PATH1_BAL_LEFT */ if ((cx25840_read(client, 0x8d5) & 0x80) == 0) balance = 0x80 - balance; else balance = 0x80 + balance; return balance << 8; } static void set_balance(struct i2c_client *client, int balance) { int bal = balance >> 8; if (bal > 0x80) { /* PATH1_BAL_LEFT */ cx25840_and_or(client, 0x8d5, 0x7f, 0x80); /* PATH1_BAL_LEVEL */ cx25840_and_or(client, 0x8d5, ~0x7f, bal & 0x7f); } else { /* PATH1_BAL_LEFT */ cx25840_and_or(client, 0x8d5, 0x7f, 0x00); /* PATH1_BAL_LEVEL */ cx25840_and_or(client, 0x8d5, ~0x7f, 0x80 - bal); } } static int get_mute(struct i2c_client *client) { /* check SRC1_MUTE_EN */ return cx25840_read(client, 0x8d3) & 0x2 ? 1 : 0; } static void set_mute(struct i2c_client *client, int mute) { struct cx25840_state *state = i2c_get_clientdata(client); if (state->aud_input != CX25840_AUDIO_SERIAL) { /* Must turn off microcontroller in order to mute sound. * Not sure if this is the best method, but it does work. * If the microcontroller is running, then it will undo any * changes to the mute register. */ if (mute) { /* disable microcontroller */ cx25840_and_or(client, 0x803, ~0x10, 0x00); cx25840_write(client, 0x8d3, 0x1f); } else { /* enable microcontroller */ cx25840_and_or(client, 0x803, ~0x10, 0x10); } } else { /* SRC1_MUTE_EN */ cx25840_and_or(client, 0x8d3, ~0x2, mute ? 0x02 : 0x00); } } int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg) { struct v4l2_control *ctrl = arg; switch (cmd) { case VIDIOC_INT_AUDIO_CLOCK_FREQ: return set_audclk_freq(client, *(u32 *)arg); case VIDIOC_G_CTRL: switch (ctrl->id) { case V4L2_CID_AUDIO_VOLUME: ctrl->value = get_volume(client); break; case V4L2_CID_AUDIO_BASS: ctrl->value = get_bass(client); break; case V4L2_CID_AUDIO_TREBLE: ctrl->value = get_treble(client); break; case V4L2_CID_AUDIO_BALANCE: ctrl->value = get_balance(client); break; case V4L2_CID_AUDIO_MUTE: ctrl->value = get_mute(client); break; default: return -EINVAL; } break; case VIDIOC_S_CTRL: switch (ctrl->id) { case V4L2_CID_AUDIO_VOLUME: set_volume(client, ctrl->value); break; case V4L2_CID_AUDIO_BASS: set_bass(client, ctrl->value); break; case V4L2_CID_AUDIO_TREBLE: set_treble(client, ctrl->value); break; case V4L2_CID_AUDIO_BALANCE: set_balance(client, ctrl->value); break; case V4L2_CID_AUDIO_MUTE: set_mute(client, ctrl->value); break; default: return -EINVAL; } break; default: return -EINVAL; } return 0; } ",0 "ents. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to you 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. */ package org.apache.hadoop.hbase.io.hfile.bucket; import org.apache.hadoop.hbase.testclassification.IOTests; import org.apache.hadoop.hbase.testclassification.SmallTests; import org.apache.hadoop.hbase.io.hfile.BlockCacheKey; import org.apache.hadoop.hbase.io.hfile.Cacheable; import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.BucketEntry; import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.RAMQueueEntry; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; import org.mockito.Mockito; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.atomic.AtomicLong; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; @Category({IOTests.class, SmallTests.class}) public class TestBucketWriterThread { private BucketCache bc; private BucketCache.WriterThread wt; private BlockingQueue q; private Cacheable plainCacheable; private BlockCacheKey plainKey; /** A BucketCache that does not start its writer threads. */ private static class MockBucketCache extends BucketCache { public MockBucketCache(String ioEngineName, long capacity, int blockSize, int[] bucketSizes, int writerThreadNum, int writerQLen, String persistencePath, int ioErrorsTolerationDuration) throws FileNotFoundException, IOException { super(ioEngineName, capacity, blockSize, bucketSizes, writerThreadNum, writerQLen, persistencePath, ioErrorsTolerationDuration); } @Override protected void startWriterThreads() { // intentional noop } } /** * Set up variables and get BucketCache and WriterThread into state where tests can manually * control the running of WriterThread and BucketCache is empty. * @throws Exception */ @Before public void setUp() throws Exception { // Arbitrary capacity. final int capacity = 16; // Run with one writer thread only. Means there will be one writer queue only too. We depend // on this in below. final int writerThreadsCount = 1; this.bc = new MockBucketCache(""heap"", capacity, 1, new int [] {1}, writerThreadsCount, capacity, null, 100/*Tolerate ioerrors for 100ms*/); assertEquals(writerThreadsCount, bc.writerThreads.length); assertEquals(writerThreadsCount, bc.writerQueues.size()); // Get reference to our single WriterThread instance. this.wt = bc.writerThreads[0]; this.q = bc.writerQueues.get(0); wt.disableWriter(); this.plainKey = new BlockCacheKey(""f"", 0); this.plainCacheable = Mockito.mock(Cacheable.class); assertThat(bc.ramCache.isEmpty(), is(true)); assertTrue(q.isEmpty()); } @After public void tearDown() throws Exception { if (this.bc != null) this.bc.shutdown(); } /** * Test non-error case just works. * @throws FileNotFoundException * @throws IOException * @throws InterruptedException */ @Test (timeout=30000) public void testNonErrorCase() throws IOException, InterruptedException { bc.cacheBlock(this.plainKey, this.plainCacheable); doDrainOfOneEntry(this.bc, this.wt, this.q); } /** * Pass through a too big entry and ensure it is cleared from queues and ramCache. * Manually run the WriterThread. * @throws InterruptedException */ @Test public void testTooBigEntry() throws InterruptedException { Cacheable tooBigCacheable = Mockito.mock(Cacheable.class); Mockito.when(tooBigCacheable.getSerializedLength()).thenReturn(Integer.MAX_VALUE); this.bc.cacheBlock(this.plainKey, tooBigCacheable); doDrainOfOneEntry(this.bc, this.wt, this.q); } /** * Do IOE. Take the RAMQueueEntry that was on the queue, doctor it to throw exception, then * put it back and process it. * @throws IOException * @throws InterruptedException */ @SuppressWarnings(""unchecked"") @Test (timeout=30000) public void testIOE() throws IOException, InterruptedException { this.bc.cacheBlock(this.plainKey, plainCacheable); RAMQueueEntry rqe = q.remove(); RAMQueueEntry spiedRqe = Mockito.spy(rqe); Mockito.doThrow(new IOException(""Mocked!"")).when(spiedRqe). writeToCache((IOEngine)Mockito.any(), (BucketAllocator)Mockito.any(), (UniqueIndexMap)Mockito.any(), (AtomicLong)Mockito.any()); this.q.add(spiedRqe); doDrainOfOneEntry(bc, wt, q); // Cache disabled when ioes w/o ever healing. assertTrue(!bc.isCacheEnabled()); } /** * Do Cache full exception * @throws IOException * @throws InterruptedException */ @Test (timeout=30000) public void testCacheFullException() throws IOException, InterruptedException { this.bc.cacheBlock(this.plainKey, plainCacheable); RAMQueueEntry rqe = q.remove(); RAMQueueEntry spiedRqe = Mockito.spy(rqe); final CacheFullException cfe = new CacheFullException(0, 0); BucketEntry mockedBucketEntry = Mockito.mock(BucketEntry.class); Mockito.doThrow(cfe). doReturn(mockedBucketEntry). when(spiedRqe).writeToCache((IOEngine)Mockito.any(), (BucketAllocator)Mockito.any(), (UniqueIndexMap)Mockito.any(), (AtomicLong)Mockito.any()); this.q.add(spiedRqe); doDrainOfOneEntry(bc, wt, q); } private static void doDrainOfOneEntry(final BucketCache bc, final BucketCache.WriterThread wt, final BlockingQueue q) throws InterruptedException { List rqes = BucketCache.getRAMQueueEntries(q, new ArrayList(1)); wt.doDrain(rqes); assertTrue(q.isEmpty()); assertTrue(bc.ramCache.isEmpty()); assertEquals(0, bc.heapSize()); } } ",0 "and registers * the global l() method to translate strings in NagVis * * Copyright (c) 2004-2011 NagVis Project (Contact: info@nagvis.org) * * License: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * *****************************************************************************/ /* * l() needs to be available in MainCfg initialization and config parsing, * but GlobalLanguage initialization relies on the main configuration in * some parts. * The cleanest way to solve this problem is to skip the i18n in the main * configuration init code until all needed values are initialized and then * initialize the i18n code. */ // ---------------------------------------------------------------------------- $_MAINCFG = new GlobalMainCfg(); $_MAINCFG->init(); /** * This is mainly a short access to config options. In the past the whole * language object method call was used all arround NagVis. This has been * introduced to keep the code shorter */ function cfg($sec, $key, $ignoreDefaults = false) { global $_MAINCFG; return $_MAINCFG->getValue($sec, $key, $ignoreDefaults); } function path($type, $loc, $var, $relfile = '') { global $_MAINCFG; return $_MAINCFG->getPath($type, $loc, $var, $relfile); } // ---------------------------------------------------------------------------- $_LANG = new GlobalLanguage(); /** * This is mainly a short access to localized strings. In the past the whole * language object method call was used all arround NagVis. This has been * introduced to keep the code shorter */ function l($txt, $vars = null) { global $_LANG; if(isset($_LANG)) return $_LANG->getText($txt, $vars); elseif($vars !== null) return GlobalLanguage::getReplacedString($txt, $vars); else return $txt; } function curLang() { global $_LANG; return $_LANG->getCurrentLanguage(); } // ---------------------------------------------------------------------------- /** * Initialize the backend management for all pages. But don't open backend * connections. This is only done when the pages request data from any backend */ $_BACKEND = new CoreBackendMgmt(); ?> ",0 "gement program developed by * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the * Free Software Foundation with the addition of the following permission added * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the ""Powered by * SugarCRM"" logo. If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * ""Powered by SugarCRM"". ********************************************************************************/ require_once('data/SugarBean.php'); require_once('modules/Contacts/Contact.php'); require_once('include/SubPanel/SubPanelDefinitions.php'); class Bug41738Test extends Sugar_PHPUnit_Framework_TestCase { protected $bean; public function setUp() { global $moduleList, $beanList, $beanFiles; require('include/modules.php'); $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(); $GLOBALS['modListHeader'] = query_module_access_list($GLOBALS['current_user']); $GLOBALS['modules_exempt_from_availability_check']['Calls']='Calls'; $GLOBALS['modules_exempt_from_availability_check']['Meetings']='Meetings'; $this->bean = new Opportunity(); } public function tearDown() { SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); unset($GLOBALS['current_user']); } public function testSubpanelCollectionWithSpecificQuery() { $subpanel = array( 'order' => 20, 'sort_order' => 'desc', 'sort_by' => 'date_entered', 'type' => 'collection', 'subpanel_name' => 'history', //this values is not associated with a physical file. 'top_buttons' => array(), 'collection_list' => array( 'meetings' => array( 'module' => 'Meetings', 'subpanel_name' => 'ForHistory', 'get_subpanel_data' => 'function:subpanelCollectionWithSpecificQueryMeetings', 'generate_select'=>false, 'function_parameters' => array( 'bean_id'=>$this->bean->id, 'import_function_file' => __FILE__ ), ), 'tasks' => array( 'module' => 'Tasks', 'subpanel_name' => 'ForHistory', 'get_subpanel_data' => 'function:subpanelCollectionWithSpecificQueryTasks', 'generate_select'=>false, 'function_parameters' => array( 'bean_id'=>$this->bean->id, 'import_function_file' => __FILE__ ), ), ) ); $subpanel_def = new aSubPanel(""testpanel"", $subpanel, $this->bean); $query = $this->bean->get_union_related_list($this->bean, """", '', """", 0, 5, -1, 0, $subpanel_def); $result = $this->bean->db->query($query[""query""]); $this->assertTrue($result != false, ""Bad query: {$query['query']}""); } } function subpanelCollectionWithSpecificQueryMeetings($params) { $query = ""SELECT meetings.id , meetings.name , meetings.status , 0 reply_to_status , ' ' contact_name , ' ' contact_id , ' ' contact_name_owner , ' ' contact_name_mod , meetings.parent_id , meetings.parent_type , meetings.date_modified , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , 'Users' assigned_user_name_mod, ' ' filename , meetings.assigned_user_id , 'meetings' panel_name FROM meetings LEFT JOIN users jt1 ON jt1.id= meetings.assigned_user_id AND jt1.deleted=0 AND jt1.deleted=0 WHERE ( meetings.parent_type = 'Opportunities' AND meetings.deleted=0 AND (meetings.status='Held' OR meetings.status='Not Held') AND meetings.parent_id IN( SELECT o.id FROM opportunities o INNER JOIN opportunities_contacts oc on o.id = oc.opportunity_id AND oc.contact_id = '"".$params['bean_id'].""') )""; return $query ; } function subpanelCollectionWithSpecificQueryTasks($params) { $query = ""SELECT tasks.id , tasks.name , tasks.status , 0 reply_to_status , ' ' contact_name , ' ' contact_id , ' ' contact_name_owner , ' ' contact_name_mod , tasks.parent_id , tasks.parent_type , tasks.date_modified , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , 'Users' assigned_user_name_mod, ' ' filename , tasks.assigned_user_id , 'tasks' panel_name FROM tasks LEFT JOIN users jt1 ON jt1.id= tasks.assigned_user_id AND jt1.deleted=0 AND jt1.deleted=0 WHERE ( tasks.parent_type = 'Opportunities' AND tasks.deleted=0 AND (tasks.status='Completed' OR tasks.status='Deferred') AND tasks.parent_id IN( SELECT o.id FROM opportunities o INNER JOIN opportunities_contacts oc on o.id = oc.opportunity_id AND oc.contact_id = '"".$params['bean_id'].""') )""; return $query ; } ",0 "ation, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Loader; use Symfony\Component\Config\Resource\FileResource; /** * PhpFileLoader loads service definitions from a PHP file. * * The PHP file is required and the $container variable can be * used within the file to change the container. * * @author Fabien Potencier */ class PhpFileLoader extends FileLoader { /** * Loads a PHP file. * * @param mixed $file The resource * @param string $type The resource type */ public function load($file, $type = null) { // the container and loader variables are exposed to the included file below $container = $this->container; $loader = $this; $path = $this->locator->locate($file); $this->setCurrentDir(dirname($path)); $this->container->addResource(new FileResource($path)); include $path; } /** * Returns true if this class supports the given resource. * * @param mixed $resource A resource * @param string $type The resource type * * @return bool true if this class supports the given resource, false otherwise */ public function supports($resource, $type = null) { return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION); } } ",0 "itle>... --> googleFonts()): ?> ",0 "n.edu> * Portions of this file Copyright (C) 2014,2017,2020 Jeremy D Monin * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * The maintainer of this program can be reached at jsettlers@nand.net **/ package soc.message; /** * This reply from server means this client currently isn't allowed to connect. * * @author Robert S Thomas */ public class SOCRejectConnection extends SOCMessage { private static final long serialVersionUID = 100L; // last structural change v1.0.0 or earlier /** * Text message */ private String text; /** * Create a RejectConnection message. * * @param message the text message */ public SOCRejectConnection(String message) { messageType = REJECTCONNECTION; text = message; } /** * @return the text message */ public String getText() { return text; } /** * REJECTCONNECTION sep text * * @return the command String */ public String toCmd() { return toCmd(text); } /** * REJECTCONNECTION sep text * * @param tm the text message * @return the command string */ public static String toCmd(String tm) { return REJECTCONNECTION + sep + tm; } /** * Parse the command String into a RejectConnection message * * @param s the String to parse; will be directly used as {@link #getText()} without any parsing * @return a RejectConnection message */ public static SOCRejectConnection parseDataStr(String s) { return new SOCRejectConnection(s); } /** * @return a human readable form of the message */ public String toString() { return ""SOCRejectConnection:"" + text; } } ",0 "l cooperation with the United States to avoid a human capital flight

Scientific and cultural cooperation with the United States to avoid a human capital flight

In order to reverse brain drain of Spanish scientist to the United States, we will strengthen scientific, cultural and educational cooperation with this country. To do this, we will increase the budget for grants for further studies and professional internships and scientific research related to projects by Spaniards, and we will promote incentives to encourage the return of Spanish researchers having expanded their training in the United States.

In addition, we will develop a United Plan, an initiative to establish greater cultural, educational and economic ties with the Hispanic community in the US, almost a third of the population of that country. The network of Instituto Cervantes centres will help to reinforce its Latin American connection to organize and promote cultural activities that involve the richness of Spanish language and culture in Spain and America.

We will also create a network of business incubators and accelerators in the United States and Spain to contribute to the creation of viable and innovative business projects in both countries, especially in the field of social and solidarity economy, to facilitate the entry of Spanish SMEs in the US market and the subsequent profit.

",0 "lang.StringUtils; import com.karniyarik.common.KarniyarikRepository; import com.karniyarik.common.config.system.DeploymentConfig; import com.karniyarik.common.config.system.WebConfig; public class IndexMergeUtil { public static final String SITE_NAME_PARAMETER = ""s""; public static final void callMergeSiteIndex(String siteName) throws Throwable { callMergeSiteIndex(siteName, false); } public static final void callMergeSiteIndex(String siteName, boolean reduceBoost) throws Throwable { WebConfig webConfig = KarniyarikRepository.getInstance().getConfig().getConfigurationBundle().getWebConfig(); DeploymentConfig config = KarniyarikRepository.getInstance().getConfig().getConfigurationBundle().getDeploymentConfig(); //String url = ""http://www.karniyarik.com""; String url = config.getMasterWebUrl(); URL servletURL = null; URLConnection connection = null; InputStream is = null; String tail = webConfig.getMergeIndexServlet() + ""?"" + SITE_NAME_PARAMETER + ""="" + siteName; if (StringUtils.isNotBlank(url)) { if(!tail.startsWith(""/"") && !url.endsWith(""/"")) { url += ""/""; } url += tail; if(reduceBoost) { url += ""&rb=true""; } servletURL = new URL(url); connection = servletURL.openConnection(); connection.connect(); is = connection.getInputStream(); is.close(); } servletURL = null; connection = null; is = null; tail = null; } public static void callReduceSiteIndex(String siteName) throws Throwable{ callMergeSiteIndex(siteName, true); } public static void main(String[] args) throws Throwable{ String[] sites = new String[]{ ""hataystore"", ""damakzevki"", ""robertopirlanta"", ""bebekken"", ""elektrikmalzemem"", ""starsexshop"", ""altinsarrafi"", ""budatoys"", ""taffybaby"", ""medikalcim"", ""beyazdepo"", ""tasarimbookshop"", ""boviza"", ""evdepo"", ""bonnyfood"", ""beyazkutu"", ""koctas"", ""bizimmarket"", ""narbebe"", ""gonayakkabi"", ""tgrtpazarlama"", ""pasabahce"", ""vatanbilgisayar"", ""egerate-store"", ""dr"", ""hipernex"", ""ensarshop"", ""yesil"", ""dealextreme"", ""petsrus"", ""otoyedekparcaburada"", ""elektrikdeposu"", ""alisveris"", ""radikalteknoloji"", ""ekopasaj"", ""strawberrynet"", ""yenisayfa"", ""adresimegelsin"", ""juenpetmarket"", ""nadirkitap""}; for(String site: sites) { System.out.println(site); callMergeSiteIndex(site); Thread.sleep(10000); } } } ",0 "information regarding copyright * ownership. Elasticsearch licenses this file to you 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. */ package org.elasticsearch.search.aggregations.bucket.significant; import org.apache.lucene.util.BytesRef; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.Version; import org.elasticsearch.common.io.stream.InputStreamStreamInput; import org.elasticsearch.common.io.stream.OutputStreamStreamOutput; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.search.SearchShardTarget; import org.elasticsearch.search.aggregations.InternalAggregations; import org.elasticsearch.search.aggregations.bucket.significant.heuristics.ChiSquare; import org.elasticsearch.search.aggregations.bucket.significant.heuristics.GND; import org.elasticsearch.search.aggregations.bucket.significant.heuristics.JLHScore; import org.elasticsearch.search.aggregations.bucket.significant.heuristics.MutualInformation; import org.elasticsearch.search.aggregations.bucket.significant.heuristics.PercentageScore; import org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristic; import org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristicBuilder; import org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristicParser; import org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristicParserMapper; import org.elasticsearch.search.internal.SearchContext; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.TestSearchContext; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import static org.elasticsearch.test.VersionUtils.randomVersion; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.lessThanOrEqualTo; /** * */ public class SignificanceHeuristicTests extends ESTestCase { static class SignificantTermsTestSearchContext extends TestSearchContext { @Override public int numberOfShards() { return 1; } @Override public SearchShardTarget shardTarget() { return new SearchShardTarget(""no node, this is a unit test"", ""no index, this is a unit test"", 0); } } // test that stream output can actually be read - does not replace bwc test public void testStreamResponse() throws Exception { Version version = randomVersion(random()); InternalSignificantTerms[] sigTerms = getRandomSignificantTerms(getRandomSignificanceheuristic()); // write ByteArrayOutputStream outBuffer = new ByteArrayOutputStream(); OutputStreamStreamOutput out = new OutputStreamStreamOutput(outBuffer); out.setVersion(version); sigTerms[0].writeTo(out); // read ByteArrayInputStream inBuffer = new ByteArrayInputStream(outBuffer.toByteArray()); InputStreamStreamInput in = new InputStreamStreamInput(inBuffer); in.setVersion(version); sigTerms[1].readFrom(in); assertTrue(sigTerms[1].significanceHeuristic.equals(sigTerms[0].significanceHeuristic)); } InternalSignificantTerms[] getRandomSignificantTerms(SignificanceHeuristic heuristic) { InternalSignificantTerms[] sTerms = new InternalSignificantTerms[2]; ArrayList buckets = new ArrayList<>(); if (randomBoolean()) { BytesRef term = new BytesRef(""123.0""); buckets.add(new SignificantLongTerms.Bucket(1, 2, 3, 4, 123, InternalAggregations.EMPTY, null)); sTerms[0] = new SignificantLongTerms(10, 20, ""some_name"", null, 1, 1, heuristic, buckets, Collections.EMPTY_LIST, null); sTerms[1] = new SignificantLongTerms(); } else { BytesRef term = new BytesRef(""someterm""); buckets.add(new SignificantStringTerms.Bucket(term, 1, 2, 3, 4, InternalAggregations.EMPTY)); sTerms[0] = new SignificantStringTerms(10, 20, ""some_name"", 1, 1, heuristic, buckets, Collections.EMPTY_LIST, null); sTerms[1] = new SignificantStringTerms(); } return sTerms; } SignificanceHeuristic getRandomSignificanceheuristic() { List heuristics = new ArrayList<>(); heuristics.add(JLHScore.INSTANCE); heuristics.add(new MutualInformation(randomBoolean(), randomBoolean())); heuristics.add(new GND(randomBoolean())); heuristics.add(new ChiSquare(randomBoolean(), randomBoolean())); return heuristics.get(randomInt(3)); } // test that // 1. The output of the builders can actually be parsed // 2. The parser does not swallow parameters after a significance heuristic was defined public void testBuilderAndParser() throws Exception { Set parsers = new HashSet<>(); SignificanceHeuristicParserMapper heuristicParserMapper = new SignificanceHeuristicParserMapper(parsers, null); SearchContext searchContext = new SignificantTermsTestSearchContext(); // test jlh with string assertTrue(parseFromString(heuristicParserMapper, searchContext, ""\""jlh\"":{}"") instanceof JLHScore); // test gnd with string assertTrue(parseFromString(heuristicParserMapper, searchContext, ""\""gnd\"":{}"") instanceof GND); // test mutual information with string boolean includeNegatives = randomBoolean(); boolean backgroundIsSuperset = randomBoolean(); assertThat(parseFromString(heuristicParserMapper, searchContext, ""\""mutual_information\"":{\""include_negatives\"": "" + includeNegatives + "", \""background_is_superset\"":"" + backgroundIsSuperset + ""}""), equalTo((SignificanceHeuristic) (new MutualInformation(includeNegatives, backgroundIsSuperset)))); assertThat(parseFromString(heuristicParserMapper, searchContext, ""\""chi_square\"":{\""include_negatives\"": "" + includeNegatives + "", \""background_is_superset\"":"" + backgroundIsSuperset + ""}""), equalTo((SignificanceHeuristic) (new ChiSquare(includeNegatives, backgroundIsSuperset)))); // test with builders assertTrue(parseFromBuilder(heuristicParserMapper, searchContext, new JLHScore.JLHScoreBuilder()) instanceof JLHScore); assertTrue(parseFromBuilder(heuristicParserMapper, searchContext, new GND.GNDBuilder(backgroundIsSuperset)) instanceof GND); assertThat(parseFromBuilder(heuristicParserMapper, searchContext, new MutualInformation.MutualInformationBuilder(includeNegatives, backgroundIsSuperset)), equalTo((SignificanceHeuristic) new MutualInformation(includeNegatives, backgroundIsSuperset))); assertThat(parseFromBuilder(heuristicParserMapper, searchContext, new ChiSquare.ChiSquareBuilder(includeNegatives, backgroundIsSuperset)), equalTo((SignificanceHeuristic) new ChiSquare(includeNegatives, backgroundIsSuperset))); // test exceptions String faultyHeuristicdefinition = ""\""mutual_information\"":{\""include_negatives\"": false, \""some_unknown_field\"": false}""; String expectedError = ""unknown field [some_unknown_field]""; checkParseException(heuristicParserMapper, searchContext, faultyHeuristicdefinition, expectedError); faultyHeuristicdefinition = ""\""chi_square\"":{\""unknown_field\"": true}""; expectedError = ""unknown field [unknown_field]""; checkParseException(heuristicParserMapper, searchContext, faultyHeuristicdefinition, expectedError); faultyHeuristicdefinition = ""\""jlh\"":{\""unknown_field\"": true}""; expectedError = ""expected an empty object, but found ""; checkParseException(heuristicParserMapper, searchContext, faultyHeuristicdefinition, expectedError); faultyHeuristicdefinition = ""\""gnd\"":{\""unknown_field\"": true}""; expectedError = ""unknown field [unknown_field]""; checkParseException(heuristicParserMapper, searchContext, faultyHeuristicdefinition, expectedError); } protected void checkParseException(SignificanceHeuristicParserMapper heuristicParserMapper, SearchContext searchContext, String faultyHeuristicDefinition, String expectedError) throws IOException { try { XContentParser stParser = JsonXContent.jsonXContent.createParser(""{\""field\"":\""text\"", "" + faultyHeuristicDefinition + "",\""min_doc_count\"":200}""); stParser.nextToken(); new SignificantTermsParser(heuristicParserMapper).parse(""testagg"", stParser, searchContext); fail(); } catch (ElasticsearchParseException e) { assertTrue(e.getMessage().contains(expectedError)); } } protected SignificanceHeuristic parseFromBuilder(SignificanceHeuristicParserMapper heuristicParserMapper, SearchContext searchContext, SignificanceHeuristicBuilder significanceHeuristicBuilder) throws IOException { SignificantTermsBuilder stBuilder = new SignificantTermsBuilder(""testagg""); stBuilder.significanceHeuristic(significanceHeuristicBuilder).field(""text"").minDocCount(200); XContentBuilder stXContentBuilder = XContentFactory.jsonBuilder(); stBuilder.internalXContent(stXContentBuilder, null); XContentParser stParser = JsonXContent.jsonXContent.createParser(stXContentBuilder.string()); return parseSignificanceHeuristic(heuristicParserMapper, searchContext, stParser); } private SignificanceHeuristic parseSignificanceHeuristic(SignificanceHeuristicParserMapper heuristicParserMapper, SearchContext searchContext, XContentParser stParser) throws IOException { stParser.nextToken(); SignificantTermsAggregatorFactory aggregatorFactory = (SignificantTermsAggregatorFactory) new SignificantTermsParser(heuristicParserMapper).parse(""testagg"", stParser, searchContext); stParser.nextToken(); assertThat(aggregatorFactory.getBucketCountThresholds().getMinDocCount(), equalTo(200l)); assertThat(stParser.currentToken(), equalTo(null)); stParser.close(); return aggregatorFactory.getSignificanceHeuristic(); } protected SignificanceHeuristic parseFromString(SignificanceHeuristicParserMapper heuristicParserMapper, SearchContext searchContext, String heuristicString) throws IOException { XContentParser stParser = JsonXContent.jsonXContent.createParser(""{\""field\"":\""text\"", "" + heuristicString + "", \""min_doc_count\"":200}""); return parseSignificanceHeuristic(heuristicParserMapper, searchContext, stParser); } void testBackgroundAssertions(SignificanceHeuristic heuristicIsSuperset, SignificanceHeuristic heuristicNotSuperset) { try { heuristicIsSuperset.getScore(2, 3, 1, 4); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""subsetFreq > supersetFreq"")); } try { heuristicIsSuperset.getScore(1, 4, 2, 3); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""subsetSize > supersetSize"")); } try { heuristicIsSuperset.getScore(2, 1, 3, 4); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""subsetFreq > subsetSize"")); } try { heuristicIsSuperset.getScore(1, 2, 4, 3); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""supersetFreq > supersetSize"")); } try { heuristicIsSuperset.getScore(1, 3, 4, 4); fail(); } catch (IllegalArgumentException assertionError) { assertNotNull(assertionError.getMessage()); assertTrue(assertionError.getMessage().contains(""supersetFreq - subsetFreq > supersetSize - subsetSize"")); } try { int idx = randomInt(3); long[] values = {1, 2, 3, 4}; values[idx] *= -1; heuristicIsSuperset.getScore(values[0], values[1], values[2], values[3]); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""Frequencies of subset and superset must be positive"")); } try { heuristicNotSuperset.getScore(2, 1, 3, 4); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""subsetFreq > subsetSize"")); } try { heuristicNotSuperset.getScore(1, 2, 4, 3); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""supersetFreq > supersetSize"")); } try { int idx = randomInt(3); long[] values = {1, 2, 3, 4}; values[idx] *= -1; heuristicNotSuperset.getScore(values[0], values[1], values[2], values[3]); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""Frequencies of subset and superset must be positive"")); } } void testAssertions(SignificanceHeuristic heuristic) { try { int idx = randomInt(3); long[] values = {1, 2, 3, 4}; values[idx] *= -1; heuristic.getScore(values[0], values[1], values[2], values[3]); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""Frequencies of subset and superset must be positive"")); } try { heuristic.getScore(1, 2, 4, 3); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""supersetFreq > supersetSize"")); } try { heuristic.getScore(2, 1, 3, 4); fail(); } catch (IllegalArgumentException illegalArgumentException) { assertNotNull(illegalArgumentException.getMessage()); assertTrue(illegalArgumentException.getMessage().contains(""subsetFreq > subsetSize"")); } } public void testAssertions() throws Exception { testBackgroundAssertions(new MutualInformation(true, true), new MutualInformation(true, false)); testBackgroundAssertions(new ChiSquare(true, true), new ChiSquare(true, false)); testBackgroundAssertions(new GND(true), new GND(false)); testAssertions(PercentageScore.INSTANCE); testAssertions(JLHScore.INSTANCE); } public void testBasicScoreProperties() { basicScoreProperties(JLHScore.INSTANCE, true); basicScoreProperties(new GND(true), true); basicScoreProperties(PercentageScore.INSTANCE, true); basicScoreProperties(new MutualInformation(true, true), false); basicScoreProperties(new ChiSquare(true, true), false); } public void basicScoreProperties(SignificanceHeuristic heuristic, boolean test0) { assertThat(heuristic.getScore(1, 1, 1, 3), greaterThan(0.0)); assertThat(heuristic.getScore(1, 1, 2, 3), lessThan(heuristic.getScore(1, 1, 1, 3))); assertThat(heuristic.getScore(1, 1, 3, 4), lessThan(heuristic.getScore(1, 1, 2, 4))); if (test0) { assertThat(heuristic.getScore(0, 1, 2, 3), equalTo(0.0)); } double score = 0.0; try { long a = randomLong(); long b = randomLong(); long c = randomLong(); long d = randomLong(); score = heuristic.getScore(a, b, c, d); } catch (IllegalArgumentException e) { } assertThat(score, greaterThanOrEqualTo(0.0)); } public void testScoreMutual() throws Exception { SignificanceHeuristic heuristic = new MutualInformation(true, true); assertThat(heuristic.getScore(1, 1, 1, 3), greaterThan(0.0)); assertThat(heuristic.getScore(1, 1, 2, 3), lessThan(heuristic.getScore(1, 1, 1, 3))); assertThat(heuristic.getScore(2, 2, 2, 4), equalTo(1.0)); assertThat(heuristic.getScore(0, 2, 2, 4), equalTo(1.0)); assertThat(heuristic.getScore(2, 2, 4, 4), equalTo(0.0)); assertThat(heuristic.getScore(1, 2, 2, 4), equalTo(0.0)); assertThat(heuristic.getScore(3, 6, 9, 18), equalTo(0.0)); double score = 0.0; try { long a = randomLong(); long b = randomLong(); long c = randomLong(); long d = randomLong(); score = heuristic.getScore(a, b, c, d); } catch (IllegalArgumentException e) { } assertThat(score, lessThanOrEqualTo(1.0)); assertThat(score, greaterThanOrEqualTo(0.0)); heuristic = new MutualInformation(false, true); assertThat(heuristic.getScore(0, 1, 2, 3), equalTo(Double.NEGATIVE_INFINITY)); heuristic = new MutualInformation(true, false); score = heuristic.getScore(2, 3, 1, 4); assertThat(score, greaterThanOrEqualTo(0.0)); assertThat(score, lessThanOrEqualTo(1.0)); score = heuristic.getScore(1, 4, 2, 3); assertThat(score, greaterThanOrEqualTo(0.0)); assertThat(score, lessThanOrEqualTo(1.0)); score = heuristic.getScore(1, 3, 4, 4); assertThat(score, greaterThanOrEqualTo(0.0)); assertThat(score, lessThanOrEqualTo(1.0)); } public void testGNDCornerCases() throws Exception { GND gnd = new GND(true); //term is only in the subset, not at all in the other set but that is because the other set is empty. // this should actually not happen because only terms that are in the subset are considered now, // however, in this case the score should be 0 because a term that does not exist cannot be relevant... assertThat(gnd.getScore(0, randomIntBetween(1, 2), 0, randomIntBetween(2,3)), equalTo(0.0)); // the terms do not co-occur at all - should be 0 assertThat(gnd.getScore(0, randomIntBetween(1, 2), randomIntBetween(2, 3), randomIntBetween(5,6)), equalTo(0.0)); // comparison between two terms that do not exist - probably not relevant assertThat(gnd.getScore(0, 0, 0, randomIntBetween(1,2)), equalTo(0.0)); // terms co-occur perfectly - should be 1 assertThat(gnd.getScore(1, 1, 1, 1), equalTo(1.0)); gnd = new GND(false); assertThat(gnd.getScore(0, 0, 0, 0), equalTo(0.0)); } } ",0 "ed_Buffer_Overflow__dest.label.xml Template File: sources-sink-67b.tmpl.c */ /* * @description * CWE: 121 Stack Based Buffer Overflow * BadSource: Set data pointer to the bad buffer * GoodSource: Set data pointer to the good buffer * Sinks: cat * BadSink : Copy string to data using strcat * Flow Variant: 67 Data flow: data passed in a struct from one function to another in different source files * * */ #include ""std_testcase.h"" #include typedef struct _CWE121_Stack_Based_Buffer_Overflow__dest_char_alloca_cat_67_structType { char * structFirst; } CWE121_Stack_Based_Buffer_Overflow__dest_char_alloca_cat_67_structType; #ifndef OMITBAD void CWE121_Stack_Based_Buffer_Overflow__dest_char_alloca_cat_67b_badSink(CWE121_Stack_Based_Buffer_Overflow__dest_char_alloca_cat_67_structType myStruct) { char * data = myStruct.structFirst; { char source[100]; memset(source, 'C', 100-1); /* fill with 'C's */ source[100-1] = '\0'; /* null terminate */ /* POTENTIAL FLAW: Possible buffer overflow if the sizeof(data)-strlen(data) is less than the length of source */ strcat(data, source); printLine(data); } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void CWE121_Stack_Based_Buffer_Overflow__dest_char_alloca_cat_67b_goodG2BSink(CWE121_Stack_Based_Buffer_Overflow__dest_char_alloca_cat_67_structType myStruct) { char * data = myStruct.structFirst; { char source[100]; memset(source, 'C', 100-1); /* fill with 'C's */ source[100-1] = '\0'; /* null terminate */ /* POTENTIAL FLAW: Possible buffer overflow if the sizeof(data)-strlen(data) is less than the length of source */ strcat(data, source); printLine(data); } } #endif /* OMITGOOD */ ",0 "served. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::addIncludePath(JPATH_COMPONENT.'/helpers'); ?>
pageclass_sfx);?>""> params->get('show_page_heading')) : ?>

escape($this->params->get('page_heading')); ?>

params->get('show_category_title', 1) or $this->params->get('page_subheading')) : ?>

escape($this->params->get('page_subheading')); ?> params->get('show_category_title')) : ?> category->title;?>

params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
params->get('show_description_image') && $this->category->getParams()->get('image')) : ?> category->getParams()->get('image'); ?>"" alt=""category->title;?>"" /> params->get('show_description') && $this->category->description) : ?> category->description); ?>
loadTemplate('articles'); ?>
children[$this->category->id])&& $this->maxLevel != 0) : ?> loadTemplate('children'); ?>
",0 "ng copyright ownership. 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. */ package com.ibm.jbatch.container.jsl.impl; import com.ibm.jbatch.container.jsl.TransitionElement; import com.ibm.jbatch.container.jsl.ExecutionElement; import com.ibm.jbatch.container.jsl.Transition; public class TransitionImpl implements Transition { private TransitionElement transitionElement; private ExecutionElement executionElement; boolean finishedTransitioning = false; boolean noTransitionElementMatchedAfterException = false; public TransitionImpl() { super(); } @Override public TransitionElement getTransitionElement() { return transitionElement; } @Override public ExecutionElement getNextExecutionElement() { return executionElement; } @Override public void setTransitionElement(TransitionElement transitionElement) { this.transitionElement = transitionElement; } @Override public void setNextExecutionElement(ExecutionElement executionElement) { this.executionElement = executionElement; } @Override public boolean isFinishedTransitioning() { return finishedTransitioning; } @Override public void setFinishedTransitioning() { this.finishedTransitioning = true; } @Override public void setNoTransitionElementMatchAfterException() { this.noTransitionElementMatchedAfterException = true; } @Override public boolean noTransitionElementMatchedAfterException() { return noTransitionElementMatchedAfterException; } } ",0 "http-equiv=""Content-Type"" content=""text/html"" charset=""UTF-8""> Uses of Class org.apache.commons.lang3.SerializationUtils (Apache Commons Lang 3.4 API)
  • Prev
  • Next

Uses of Class
org.apache.commons.lang3.SerializationUtils

No usage of org.apache.commons.lang3.SerializationUtils
  • Prev
  • Next

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

",0 "ensed 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. ***************************************************************************/ package kieker.test.common.junit.record.flow.trace.concurrency.monitor; import java.nio.ByteBuffer; import org.junit.Assert; import org.junit.Test; import kieker.common.record.flow.trace.concurrency.monitor.MonitorNotifyEvent; import kieker.common.util.registry.IRegistry; import kieker.common.util.registry.Registry; import kieker.test.common.junit.AbstractKiekerTest; /** * @author Jan Waller * * @since 1.8 */ public class TestMonitorNotifyEvent extends AbstractKiekerTest { private static final long TSTAMP = 987998L; private static final long TRACE_ID = 23444L; private static final int ORDER_INDEX = 234; private static final int LOCK_ID = 13; /** * Default constructor. */ public TestMonitorNotifyEvent() { // empty default constructor } /** * Tests the constructor and toArray(..) methods of {@link MonitorNotifyEvent}. * * Assert that a record instance event1 equals an instance event2 created by serializing event1 to an array event1Array * and using event1Array to construct event2. This ignores a set loggingTimestamp! */ @Test public void testSerializeDeserializeEquals() { final MonitorNotifyEvent event1 = new MonitorNotifyEvent(TSTAMP, TRACE_ID, ORDER_INDEX, LOCK_ID); Assert.assertEquals(""Unexpected timestamp"", TSTAMP, event1.getTimestamp()); Assert.assertEquals(""Unexpected trace ID"", TRACE_ID, event1.getTraceId()); Assert.assertEquals(""Unexpected order index"", ORDER_INDEX, event1.getOrderIndex()); Assert.assertEquals(""Unexpected lock id"", LOCK_ID, event1.getLockId()); final Object[] event1Array = event1.toArray(); final MonitorNotifyEvent event2 = new MonitorNotifyEvent(event1Array); Assert.assertEquals(event1, event2); Assert.assertEquals(0, event1.compareTo(event2)); } /** * Tests the constructor and writeBytes(..) methods of {@link MonitorNotifyEvent}. */ @Test public void testSerializeDeserializeBinaryEquals() { final MonitorNotifyEvent event1 = new MonitorNotifyEvent(TSTAMP, TRACE_ID, ORDER_INDEX, LOCK_ID); Assert.assertEquals(""Unexpected timestamp"", TSTAMP, event1.getTimestamp()); Assert.assertEquals(""Unexpected trace ID"", TRACE_ID, event1.getTraceId()); Assert.assertEquals(""Unexpected order index"", ORDER_INDEX, event1.getOrderIndex()); Assert.assertEquals(""Unexpected lock id"", LOCK_ID, event1.getLockId()); final IRegistry stringRegistry = new Registry(); final ByteBuffer buffer = ByteBuffer.allocate(event1.getSize()); event1.writeBytes(buffer, stringRegistry); buffer.flip(); final MonitorNotifyEvent event2 = new MonitorNotifyEvent(buffer, stringRegistry); Assert.assertEquals(event1, event2); Assert.assertEquals(0, event1.compareTo(event2)); } } ",0 "cted $name = 'language'; protected $title = 'Language'; protected $shortTitle = 'Language'; protected $viewName = 'language.twig'; protected $fields = [ [ 'name' => 'default_language', 'label' => 'Default Language', 'rules' => 'required' ] ]; public function preRun(&$state) { $this->dataContainer->set('languages', Bootstrap::get('languagesManager')->getLanguagesAvailable()); return null; } public function run($formData, $step, &$state) { $response = parent::run($formData, $step, $state); $_SESSION['install_locale'] = $response->getData('lang_code'); return $response; } } ",0 ". Gano * * 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. * ===================================================================== */ package name.gano.math.nonlinsolvers; /** * * @author Shawn */ public class TestDC implements NonLinearEquationSystemProblem { // main function public static void main(String args[]) { TestDC prob = new TestDC(); double[] fgoals = new double[] {0.0,0.0}; double[] X0 = new double[] {0,0}; //NonLinearEquationSystemSolver dc = new ModifiedNewtonFiniteDiffSolver(prob, fgoals, X0); NonLinearEquationSystemSolver dc = new ModifiedBroydenSolver(prob, fgoals, X0); dc.setVerbose(true); dc.solve(); System.out.println(""\n"" + dc.getOutputMessage()); } public double[] evaluateSystemOfEquations(double[] x) { double[] f = new double[2]; // f[0] = Math.sin(x[0]); // f[1] = Math.cos(x[1]) + 0.0; // f[0] = -2.0*x[0] + 3.0*x[1] -8.0; // f[1] = 3.0*x[0] - 1.0*x[1] + 5.0; // f[0] = x[0] - x[1]*x[1]; // f[1] = -2.0*x[0]*x[1] + 2.0*x[1]; // himmelblau // f[0] = 4*x[0]*x[0]*x[0] + 4*x[0]*x[1]+2*x[1]*x[1] - 42*x[0] -14; // f[1] = 4*x[1]*x[1]*x[1] + 4*x[0]*x[1]+2*x[0]*x[0] - 26*x[1] -22; // Ferrais f[0] = 0.25/Math.PI*x[1]+0.5*x[0]-0.5*Math.sin(x[0]*x[1]); f[1] = Math.E/Math.PI*x[1]-2*Math.E*x[0]+(1-0.25/Math.PI)*(Math.exp(2*x[0])-Math.E); return f; } } ",0 "e 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. */ package org.wte4j.impl.service; import org.wte4j.WteException; /** * Map JDBC types (as defined in java.sql.Types) to Java types. The * mappings have been taken from [1] * ""JDBC 4.0 Specification, JSR 221, November 7, 2006, Appendix B, Table B-3"" * */ final class MapperSqlType { private MapperSqlType() { }; public static Class map(int jdbcType) { switch (jdbcType) { case java.sql.Types.BIT: case java.sql.Types.BOOLEAN: return java.lang.Boolean.class; case java.sql.Types.TINYINT: case java.sql.Types.SMALLINT: case java.sql.Types.INTEGER: return java.lang.Integer.class; case java.sql.Types.BIGINT: return java.lang.Long.class; case java.sql.Types.FLOAT: case java.sql.Types.DOUBLE: return java.lang.Double.class; case java.sql.Types.REAL: return java.lang.Float.class; case java.sql.Types.NUMERIC: // according to [1] Table B-1 case java.sql.Types.DECIMAL: return java.math.BigDecimal.class; case java.sql.Types.CHAR: case java.sql.Types.VARCHAR: case java.sql.Types.LONGVARCHAR: return java.lang.String.class; case java.sql.Types.DATE: return java.sql.Date.class; case java.sql.Types.TIME: return java.sql.Time.class; case java.sql.Types.TIMESTAMP: return java.sql.Timestamp.class; case java.sql.Types.STRUCT: return java.sql.Struct.class; case java.sql.Types.ARRAY: return java.sql.Array.class; case java.sql.Types.BLOB: return java.sql.Blob.class; case java.sql.Types.CLOB: return java.sql.Clob.class; case java.sql.Types.REF: return java.sql.Ref.class; case java.sql.Types.DATALINK: return java.net.URL.class; case java.sql.Types.ROWID: return java.sql.RowId.class; case java.sql.Types.NULL: case java.sql.Types.OTHER: case java.sql.Types.JAVA_OBJECT: case java.sql.Types.DISTINCT: case java.sql.Types.BINARY: case java.sql.Types.VARBINARY: case java.sql.Types.LONGVARBINARY: default: throw new WteException(""invalid or unmapped SQL type ("" + jdbcType + "")""); } } } ",0 "r disqus_shortname = 'andersonvom'; // required: replace example with your forum shortname /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '/js/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); ",0 "erxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; import org.junit.Test; import java.awt.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; /** * Unit tests for {@link BigchainDB}. * * Created by mark.grand on 1/12/2017. */ public class BigchainDBTest { private final static String HOST_ADDRESS = ""example.com""; private final static int PORT_NUMBER = 34567; private final static ObjectMapper objectMapper = new ObjectMapper(); @Test public void createInstance() throws Exception { final BigchainDB bigchainDB = BigchainDB.createInstance(HOST_ADDRESS, PORT_NUMBER); assertEquals(HOST_ADDRESS, bigchainDB.getHostAddress()); assertEquals(PORT_NUMBER, bigchainDB.getPort()); assertNotNull(bigchainDB.getObjectMapper()); } @Test public void createInstance1() throws Exception { final BigchainDB bigchainDB = BigchainDB.createInstance(HOST_ADDRESS, PORT_NUMBER, objectMapper); assertEquals(HOST_ADDRESS, bigchainDB.getHostAddress()); assertEquals(PORT_NUMBER, bigchainDB.getPort()); assertEquals(objectMapper, bigchainDB.getObjectMapper()); } @Test public void createAssetTransaction() throws Throwable { final BigchainDB bigchainDB = BigchainDB.createInstance(HOST_ADDRESS, PORT_NUMBER); final UnsignedCreateTransaction transaction = bigchainDB.createAssetTransaction(new Point(1, 0)); assertNotNull(transaction); final JsonNode json = getAssetData(transaction); assertEquals(1, json.get(""x"").asInt()); assertEquals(0, json.get(""y"").asInt()); } private JsonNode getAssetData(UnsignedCreateTransaction transaction) { //noinspection RedundantTypeArguments return transaction.getAssetData().orElseThrow(() -> {throw new RuntimeException();}); } @Test public void createAssetTransaction1() throws Exception { final BigchainDB bigchainDB = BigchainDB.createInstance(HOST_ADDRESS, PORT_NUMBER); final ObjectNode json = objectMapper.createObjectNode(); json.set(""foo"", JsonNodeFactory.instance.textNode(""bar"")); final UnsignedCreateTransaction transaction = bigchainDB.createAssetTransaction(json); assertNotNull(transaction); assertEquals(json, getAssetData(transaction)); } @Test public void transferAssetTransaction() throws Exception { final BigchainDB bigchainDB = BigchainDB.createInstance(HOST_ADDRESS, PORT_NUMBER); final UnsignedTransferTransaction transaction = bigchainDB.transferAssetTransaction(); assertNotNull(transaction); //assertEquals(ASSET_ID, transaction.getAssetId()); } }",0 "rg/1999/xhtml""> Able Polecat: Data Fields
Able Polecat  0.7.0
Able Polecat Core Class Library
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- e -

  • Generated on Fri Apr 10 2015 11:24:54 for Able Polecat by 1.8.9.1
",0 " class IntegerDomain extends Domain { protected Integer low, high; public static final String name = ""Integer""; @SuppressWarnings(""unused"") private IntegerDomain() { } public IntegerDomain(Integer low, Integer high) { this.low = low; this.high = high; } @Override public boolean contains(Object value) { if (!(value instanceof Number)) return false; double d = ((Number)value).doubleValue(); if (d != Math.round(d)) return false; return d >= this.low && d <= this.high; } @Override public Object randomValue(Random rng) { return rng.nextInt(this.high - this.low + 1) + this.low; } @Override public String toString() { return ""["" + this.low + "","" + this.high + ""]""; } public Integer getLow() { return low; } public void setLow(Integer low) { this.low = low; } public Integer getHigh() { return high; } public void setHigh(Integer high) { this.high = high; } @Override public Object mutatedValue(Random rng, Object value) { return mutatedValue(rng, value, 0.1f); } @Override public Object mutatedValue(Random rng, Object value, float stdDevFactor) { if (!contains(value)) return value; double r = rng.nextGaussian() * ((high - low) * stdDevFactor); return (int) Math.min(Math.max(this.low, Math.round(((Number)value).doubleValue() + r)), this.high); } @Override public List getDiscreteValues() { List values = new LinkedList(); for (int i = this.low; i <= this.high; i++) { values.add(i); } return values; } @Override public String getName() { return name; } @Override public List getGaussianDiscreteValues(Random rng, Object value, float stdDevFactor, int numberSamples) { if (numberSamples == 1) { List singleVals = new LinkedList(); singleVals.add(mutatedValue(rng, value, stdDevFactor)); return singleVals; } if (numberSamples >= (high - low + 1)) { return getDiscreteValues(); } List vals = new LinkedList(); for (int i = 0; i < numberSamples; i++) { if (vals.size() == high - low + 1) break; // sampled all possible values Object val = null; int tries = 0; while ((val == null || vals.contains(val)) && tries++ < (high - low + 1)) { val = mutatedValue(rng, value, stdDevFactor); } vals.add(mutatedValue(rng, value, stdDevFactor)); } return vals; } @Override public List getUniformDistributedValues(int numberSamples) { if (numberSamples >= (high - low + 1)) { return getDiscreteValues(); } List vals = new LinkedList(); double dist = (high - low) / (double) (numberSamples-1); double cur = low; for (int i = 0; i < numberSamples; i++) { if (vals.size() == high - low + 1) break; vals.add(new Integer((int) Math.round(cur))); cur += dist; } return vals; } @Override public Object getMidValueOrNull(Object o1, Object o2) { if (!(o1 instanceof Integer) || !(o2 instanceof Integer)) { return null; } Integer i1 = (Integer)o1; Integer i2 = (Integer)o2; Integer mid = (i1 + i2) / 2; if (i1.equals(mid) || i2.equals(mid)) { return null; } return mid; } } ",0 "without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * * Neither the names of the copyright holders nor the names of his * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * @category Libraries * @package HttpStatus/StatusProviders * @author Stuart Herbert * @copyright 2016-present Ganbaro Digital Ltd www.ganbarodigital.com * @license http://www.opensource.org/licenses/bsd-license.php BSD License * @link http://ganbarodigital.github.io/php-http-status */ namespace GanbaroDigitalTest\HttpStatus\StatusProviders\RequestError; use GanbaroDigital\HttpStatus\Interfaces\HttpStatusProvider; use GanbaroDigital\HttpStatus\StatusProviders\RequestError\UnsupportedMediaTypeStatusProvider; use GanbaroDigital\HttpStatus\StatusValues\RequestError\UnsupportedMediaTypeStatus; use PHPUnit_Framework_TestCase; /** * @coversDefaultClass GanbaroDigital\HttpStatus\StatusProviders\RequestError\UnsupportedMediaTypeStatusProvider */ class UnsupportedMediaTypeStatusProviderTest extends PHPUnit_Framework_TestCase { /** * @coversNothing */ public function testCanInstantiateClassThatUsesThisTrait() { // ---------------------------------------------------------------- // setup your test // ---------------------------------------------------------------- // perform the change $unit = new UnsupportedMediaTypeStatusProviderTestHelper; // ---------------------------------------------------------------- // test the results // make sure the class could instantiate $this->assertInstanceOf(UnsupportedMediaTypeStatusProviderTestHelper::class, $unit); // make sure our test helper does use the trait we're trying to test $traits = class_uses($unit); $this->assertArrayHasKey(UnsupportedMediaTypeStatusProvider::class, $traits); } /** * @covers ::getHttpStatus */ public function testReturnsUnsupportedMediaTypeStatus() { // ---------------------------------------------------------------- // setup your test $expectedType = UnsupportedMediaTypeStatus::class; $unit = new UnsupportedMediaTypeStatusProviderTestHelper; // ---------------------------------------------------------------- // perform the change $actualType = $unit->getHttpStatus(); // ---------------------------------------------------------------- // test the results $this->assertInstanceOf($expectedType, $actualType); } } class UnsupportedMediaTypeStatusProviderTestHelper { use UnsupportedMediaTypeStatusProvider; } ",0 "#import ""DBSerializableProtocol.h"" @class DBTEAMLOGFileRevertDetails; NS_ASSUME_NONNULL_BEGIN #pragma mark - API Object /// /// The `FileRevertDetails` struct. /// /// Reverted files to a previous version. /// /// This class implements the `DBSerializable` protocol (serialize and /// deserialize instance methods), which is required for all Obj-C SDK API route /// objects. /// @interface DBTEAMLOGFileRevertDetails : NSObject #pragma mark - Instance fields #pragma mark - Constructors /// /// Full constructor for the struct (exposes all instance variables). /// /// @return An initialized instance. /// - (instancetype)initDefault; - (instancetype)init NS_UNAVAILABLE; @end #pragma mark - Serializer Object /// /// The serialization class for the `FileRevertDetails` struct. /// @interface DBTEAMLOGFileRevertDetailsSerializer : NSObject /// /// Serializes `DBTEAMLOGFileRevertDetails` instances. /// /// @param instance An instance of the `DBTEAMLOGFileRevertDetails` API object. /// /// @return A json-compatible dictionary representation of the /// `DBTEAMLOGFileRevertDetails` API object. /// + (NSDictionary *)serialize:(DBTEAMLOGFileRevertDetails *)instance; /// /// Deserializes `DBTEAMLOGFileRevertDetails` instances. /// /// @param dict A json-compatible dictionary representation of the /// `DBTEAMLOGFileRevertDetails` API object. /// /// @return An instantiation of the `DBTEAMLOGFileRevertDetails` object. /// + (DBTEAMLOGFileRevertDetails *)deserialize:(NSDictionary *)dict; @end NS_ASSUME_NONNULL_END ",0 "nds to the database column JSON_USER.JSON_USER_ID * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ private byte[] jsonUserId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column JSON_USER.USER_NAME * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ private String userName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column JSON_USER.LAST_LOGIN_RESULT * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ private String lastLoginResult; /** * This field was generated by MyBatis Generator. This field corresponds to the database column JSON_USER.LAST_LOGIN_INFO * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ private String lastLoginInfo; /** * This method was generated by MyBatis Generator. This method returns the value of the database column JSON_USER.JSON_USER_ID * @return the value of JSON_USER.JSON_USER_ID * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ public byte[] getJsonUserId() { return jsonUserId; } /** * This method was generated by MyBatis Generator. This method sets the value of the database column JSON_USER.JSON_USER_ID * @param jsonUserId the value for JSON_USER.JSON_USER_ID * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ public void setJsonUserId(byte[] jsonUserId) { this.jsonUserId = jsonUserId; } /** * This method was generated by MyBatis Generator. This method returns the value of the database column JSON_USER.USER_NAME * @return the value of JSON_USER.USER_NAME * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ public String getUserName() { return userName; } /** * This method was generated by MyBatis Generator. This method sets the value of the database column JSON_USER.USER_NAME * @param userName the value for JSON_USER.USER_NAME * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ public void setUserName(String userName) { this.userName = userName == null ? null : userName.trim(); } /** * This method was generated by MyBatis Generator. This method returns the value of the database column JSON_USER.LAST_LOGIN_RESULT * @return the value of JSON_USER.LAST_LOGIN_RESULT * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ public String getLastLoginResult() { return lastLoginResult; } /** * This method was generated by MyBatis Generator. This method sets the value of the database column JSON_USER.LAST_LOGIN_RESULT * @param lastLoginResult the value for JSON_USER.LAST_LOGIN_RESULT * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ public void setLastLoginResult(String lastLoginResult) { this.lastLoginResult = lastLoginResult == null ? null : lastLoginResult.trim(); } /** * This method was generated by MyBatis Generator. This method returns the value of the database column JSON_USER.LAST_LOGIN_INFO * @return the value of JSON_USER.LAST_LOGIN_INFO * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ public String getLastLoginInfo() { return lastLoginInfo; } /** * This method was generated by MyBatis Generator. This method sets the value of the database column JSON_USER.LAST_LOGIN_INFO * @param lastLoginInfo the value for JSON_USER.LAST_LOGIN_INFO * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ public void setLastLoginInfo(String lastLoginInfo) { this.lastLoginInfo = lastLoginInfo == null ? null : lastLoginInfo.trim(); } }",0 "utils.QueryRunner; import org.apache.commons.dbutils.handlers.BeanListHandler; import com.management.bean.calculate.ProjectCalc; import com.management.bean.calculate.ProjectCalcs; import com.management.dao.calcs.ProjectCalcDao; import com.management.util.DBUtil; public class ProjectCalcDaoImpl implements ProjectCalcDao { @Override public List find() { try { Connection conn = DBUtil.getConnection(); String sql = ""select * from project_calc""; QueryRunner qr = new QueryRunner(); return qr.query(conn, sql, new BeanListHandler<>(ProjectCalc.class)); } catch (SQLException e) { throw new RuntimeException(e); } } @Override public void add(ProjectCalc c) { try { Connection conn = DBUtil.getConnection(); String sql = ""insert into project_calc(rank,category,weight,high,low) values(?,?,?,?,?)""; QueryRunner qr = new QueryRunner(); Object[] params = {c.getRank(),c.getCategory(),c.getWeight(),c.getHigh(),c.getLow()}; qr.update(conn, sql, params); ProjectCalcs.update(); } catch (SQLException e) { throw new RuntimeException(e); } } @Override public void update(ProjectCalc c) { try { Connection conn = DBUtil.getConnection(); String sql = ""update project_calc set rank=?,category=?,weight=?,high=?,low=? where id=?""; QueryRunner qr = new QueryRunner(); Object[] params = {c.getRank(),c.getCategory(),c.getWeight(),c.getHigh(),c.getLow(),c.getId()}; qr.update(conn, sql, params); ProjectCalcs.update(); } catch (SQLException e) { throw new RuntimeException(e); } } @Override public void delete(int id) { try { Connection conn = DBUtil.getConnection(); String sql = ""delete from project_calc where id=?""; QueryRunner qr = new QueryRunner(); qr.update(conn, sql,id); ProjectCalcs.update(); } catch (SQLException e) { throw new RuntimeException(e); } } } ",0 """). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ package com.amazonaws.services.frauddetector.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.Request; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.frauddetector.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.protocol.*; import com.amazonaws.protocol.Protocol; import com.amazonaws.annotation.SdkInternalApi; /** * DeleteEventsByEventTypeRequest Marshaller */ @Generated(""com.amazonaws:aws-java-sdk-code-generator"") @SdkInternalApi public class DeleteEventsByEventTypeRequestProtocolMarshaller implements Marshaller, DeleteEventsByEventTypeRequest> { private static final OperationInfo SDK_OPERATION_BINDING = OperationInfo.builder().protocol(Protocol.AWS_JSON).requestUri(""/"") .httpMethodName(HttpMethodName.POST).hasExplicitPayloadMember(false).hasPayloadMembers(true) .operationIdentifier(""AWSHawksNestServiceFacade.DeleteEventsByEventType"").serviceName(""AmazonFraudDetector"").build(); private final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory; public DeleteEventsByEventTypeRequestProtocolMarshaller(com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory) { this.protocolFactory = protocolFactory; } public Request marshall(DeleteEventsByEventTypeRequest deleteEventsByEventTypeRequest) { if (deleteEventsByEventTypeRequest == null) { throw new SdkClientException(""Invalid argument passed to marshall(...)""); } try { final ProtocolRequestMarshaller protocolMarshaller = protocolFactory.createProtocolMarshaller( SDK_OPERATION_BINDING, deleteEventsByEventTypeRequest); protocolMarshaller.startMarshalling(); DeleteEventsByEventTypeRequestMarshaller.getInstance().marshall(deleteEventsByEventTypeRequest, protocolMarshaller); return protocolMarshaller.finishMarshalling(); } catch (Exception e) { throw new SdkClientException(""Unable to marshall request to JSON: "" + e.getMessage(), e); } } } ",0 " List of All Members for MapPolygon | Qt Location 5.7
Qt 5.7Qt LocationQML TypesList of All Members for MapPolygon
Qt 5.7.0 Reference Documentation

List of All Members for MapPolygon

This is the complete list of members for MapPolygon, including inherited members.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

",0 "enerated by javadoc (1.8.0_144) on Wed Oct 17 11:30:16 CEST 2018 --> Uses of Class se.litsec.eidas.opensaml.ext.attributes.impl.PersonIdentifierTypeBuilder (eIDAS extension for OpenSAML 3.x - 1.3.0)
  • Prev
  • Next

Uses of Class
se.litsec.eidas.opensaml.ext.attributes.impl.PersonIdentifierTypeBuilder

No usage of se.litsec.eidas.opensaml.ext.attributes.impl.PersonIdentifierTypeBuilder
  • Prev
  • Next

Copyright © 2018 Litsec AB. All rights reserved.

",0 "under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ /* * This header file contains extensions to the TEE Client API that are * specific to the Trusted Foundations implementations */ #ifndef __TEE_CLIENT_API_EX_H__ #define __TEE_CLIENT_API_EX_H__ #include /* Implementation-defined login types */ #define TEEC_LOGIN_AUTHENTICATION 0x80000000 #define TEEC_LOGIN_PRIVILEGED 0x80000002 #define TEEC_LOGIN_PRIVILEGED_KERNEL 0x80000002 /* Type definitions */ typedef u64 TEEC_TimeLimit; void TEEC_EXPORT TEEC_GetTimeLimit( TEEC_Context * context, uint32_t timeout, TEEC_TimeLimit *timeLimit); TEEC_Result TEEC_EXPORT TEEC_OpenSessionEx( TEEC_Context * context, TEEC_Session * session, const TEEC_TimeLimit *timeLimit, const TEEC_UUID * destination, uint32_t connectionMethod, void *connectionData, TEEC_Operation * operation, uint32_t *errorOrigin); TEEC_Result TEEC_EXPORT TEEC_InvokeCommandEx( TEEC_Session * session, const TEEC_TimeLimit *timeLimit, uint32_t commandID, TEEC_Operation * operation, uint32_t *errorOrigin); #endif /* __TEE_CLIENT_API_EX_H__ */ ",0 "ic License * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ package org.elasticsearch.xpack.core.ml.datafeed; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.core.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.test.AbstractSerializingTestCase; import java.io.IOException; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.core.Is.is; public class DelayedDataCheckConfigTests extends AbstractSerializingTestCase { @Override protected DelayedDataCheckConfig createTestInstance(){ return createRandomizedConfig(100); } @Override protected Writeable.Reader instanceReader() { return DelayedDataCheckConfig::new; } @Override protected DelayedDataCheckConfig doParseInstance(XContentParser parser) { return DelayedDataCheckConfig.STRICT_PARSER.apply(parser, null); } public void testConstructor() { expectThrows(IllegalArgumentException.class, () -> new DelayedDataCheckConfig(true, TimeValue.MINUS_ONE)); expectThrows(IllegalArgumentException.class, () -> new DelayedDataCheckConfig(true, TimeValue.timeValueHours(25))); } public void testEnabledDelayedDataCheckConfig() { DelayedDataCheckConfig delayedDataCheckConfig = DelayedDataCheckConfig.enabledDelayedDataCheckConfig(TimeValue.timeValueHours(5)); assertThat(delayedDataCheckConfig.isEnabled(), equalTo(true)); assertThat(delayedDataCheckConfig.getCheckWindow(), equalTo(TimeValue.timeValueHours(5))); } public void testDisabledDelayedDataCheckConfig() { DelayedDataCheckConfig delayedDataCheckConfig = DelayedDataCheckConfig.disabledDelayedDataCheckConfig(); assertThat(delayedDataCheckConfig.isEnabled(), equalTo(false)); assertThat(delayedDataCheckConfig.getCheckWindow(), equalTo(null)); } public void testDefaultDelayedDataCheckConfig() { DelayedDataCheckConfig delayedDataCheckConfig = DelayedDataCheckConfig.defaultDelayedDataCheckConfig(); assertThat(delayedDataCheckConfig.isEnabled(), equalTo(true)); assertThat(delayedDataCheckConfig.getCheckWindow(), is(nullValue())); } public static DelayedDataCheckConfig createRandomizedConfig(long bucketSpanMillis) { boolean enabled = randomBoolean(); TimeValue timeWindow = null; if (enabled || randomBoolean()) { // time span is required to be at least 1 millis, so we use a custom method to generate a time value here timeWindow = new TimeValue(randomLongBetween(bucketSpanMillis,bucketSpanMillis*2)); } return new DelayedDataCheckConfig(enabled, timeWindow); } @Override protected DelayedDataCheckConfig mutateInstance(DelayedDataCheckConfig instance) throws IOException { boolean enabled = instance.isEnabled(); TimeValue timeWindow = instance.getCheckWindow(); switch (between(0, 1)) { case 0: enabled = enabled == false; if (randomBoolean()) { timeWindow = TimeValue.timeValueMillis(randomLongBetween(1, 1000)); } else { timeWindow = null; } break; case 1: if (timeWindow == null) { timeWindow = TimeValue.timeValueMillis(randomLongBetween(1, 1000)); } else { timeWindow = new TimeValue(timeWindow.getMillis() + between(10, 100)); } enabled = true; break; default: throw new AssertionError(""Illegal randomisation branch""); } return new DelayedDataCheckConfig(enabled, timeWindow); } } ",0 "ct: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QQUICKIMAGE_P_P_H #define QQUICKIMAGE_P_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #include ""qquickimagebase_p_p.h"" #include ""qquickimage_p.h"" QT_BEGIN_NAMESPACE //class QQuickImageTextureProvider; class QQuickImagePrivate : public QQuickImageBasePrivate { Q_DECLARE_PUBLIC(QQuickImage) public: QQuickImagePrivate(); QQuickImage::FillMode fillMode; qreal paintedWidth; qreal paintedHeight; void setImage(const QImage &img); bool pixmapChanged : 1; bool mipmap : 1; QQuickImage::HAlignment hAlign; QQuickImage::VAlignment vAlign; //QQuickImageTextureProvider *provider; }; QT_END_NAMESPACE #endif // QQUICKIMAGE_P_P_H ",0 " it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include #include #include ""hal.h"" #include ""timer.h"" #include ""wait.h"" #include ""print.h"" #include ""debug.h"" #include ""matrix.h"" #include ""serial_link/system/serial_link.h"" /* * Infinity ErgoDox Pinusage: * Column pins are input with internal pull-down. Row pins are output and strobe with high. * Key is high or 1 when it turns on. * * col: { PTD1, PTD4, PTD5, PTD6, PTD7 } * row: { PTB2, PTB3, PTB18, PTB19, PTC0, PTC9, PTC10, PTC11, PTD0 } */ /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[LOCAL_MATRIX_ROWS]; static bool debouncing = false; static uint16_t debouncing_time = 0; void matrix_init(void) { /* Column(sense) */ palSetPadMode(GPIOD, 1, PAL_MODE_INPUT_PULLDOWN); palSetPadMode(GPIOD, 4, PAL_MODE_INPUT_PULLDOWN); palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN); palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN); palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN); /* Row(strobe) */ palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 18, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 19, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 9, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 10, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); memset(matrix, 0, MATRIX_ROWS); memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS); matrix_init_quantum(); } uint8_t matrix_scan(void) { for (int row = 0; row < LOCAL_MATRIX_ROWS; row++) { matrix_row_t data = 0; // strobe row switch (row) { case 0: palSetPad(GPIOB, 2); break; case 1: palSetPad(GPIOB, 3); break; case 2: palSetPad(GPIOB, 18); break; case 3: palSetPad(GPIOB, 19); break; case 4: palSetPad(GPIOC, 0); break; case 5: palSetPad(GPIOC, 9); break; case 6: palSetPad(GPIOC, 10); break; case 7: palSetPad(GPIOC, 11); break; case 8: palSetPad(GPIOD, 0); break; } // need wait to settle pin state // if you wait too short, or have a too high update rate // the keyboard might freeze, or there might not be enough // processing power to update the LCD screen properly. // 20us, or two ticks at 100000Hz seems to be OK wait_us(20); // read col data: { PTD1, PTD4, PTD5, PTD6, PTD7 } data = ((palReadPort(GPIOD) & 0xF0) >> 3) | ((palReadPort(GPIOD) & 0x02) >> 1); // un-strobe row switch (row) { case 0: palClearPad(GPIOB, 2); break; case 1: palClearPad(GPIOB, 3); break; case 2: palClearPad(GPIOB, 18); break; case 3: palClearPad(GPIOB, 19); break; case 4: palClearPad(GPIOC, 0); break; case 5: palClearPad(GPIOC, 9); break; case 6: palClearPad(GPIOC, 10); break; case 7: palClearPad(GPIOC, 11); break; case 8: palClearPad(GPIOD, 0); break; } if (matrix_debouncing[row] != data) { matrix_debouncing[row] = data; debouncing = true; debouncing_time = timer_read(); } } uint8_t offset = 0; #ifdef MASTER_IS_ON_RIGHT if (is_serial_link_master()) { offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS; } #endif if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { for (int row = 0; row < LOCAL_MATRIX_ROWS; row++) { matrix[offset + row] = matrix_debouncing[row]; } debouncing = false; } matrix_scan_quantum(); return 1; } bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1< * http://www.opennms.org/ * http://www.opennms.com/ *******************************************************************************/ package org.opennms.netmgt.icmp; import java.net.InetAddress; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** *

SinglePingResponseCallback class.

* * @author Ben Reed * @author Mathew Brozowski */ public class SinglePingResponseCallback implements PingResponseCallback { private static final Logger LOG = LoggerFactory .getLogger(SinglePingResponseCallback.class); /** * Value of round-trip-time for the ping in microseconds. */ private Long m_responseTime = null; private InetAddress m_host; private Throwable m_error = null; private CountDownLatch m_latch = new CountDownLatch(1); /** *

Constructor for SinglePingResponseCallback.

* * @param host a {@link java.net.InetAddress} object. */ public SinglePingResponseCallback(InetAddress host) { m_host = host; } /** {@inheritDoc} */ @Override public void handleResponse(InetAddress address, EchoPacket response) { try { info(""got response for address "" + address + "", thread "" + response.getIdentifier() + "", seq "" + response.getSequenceNumber() + "" with a responseTime ""+response.elapsedTime(TimeUnit.MILLISECONDS)+""ms""); m_responseTime = (long)Math.round(response.elapsedTime(TimeUnit.MICROSECONDS)); } finally { m_latch.countDown(); } } /** {@inheritDoc} */ @Override public void handleTimeout(InetAddress address, EchoPacket request) { try { assert(request != null); info(""timed out pinging address "" + address + "", thread "" + request.getIdentifier() + "", seq "" + request.getSequenceNumber()); } finally { m_latch.countDown(); } } /** {@inheritDoc} */ @Override public void handleError(InetAddress address, EchoPacket request, Throwable t) { try { m_error = t; info(""an error occurred pinging "" + address, t); } finally { m_latch.countDown(); } } /** *

waitFor

* * @param timeout a long. * @throws java.lang.InterruptedException if any. */ public void waitFor(long timeout) throws InterruptedException { m_latch.await(timeout, TimeUnit.MILLISECONDS); } /** *

waitFor

* * @throws java.lang.InterruptedException if any. */ public void waitFor() throws InterruptedException { info(""waiting for ping to ""+m_host+"" to finish""); m_latch.await(); info(""finished waiting for ping to ""+m_host+"" to finish""); } public void rethrowError() throws Exception { if (m_error instanceof Error) { throw (Error)m_error; } else if (m_error instanceof Exception) { throw (Exception)m_error; } } /** *

Getter for the field responseTime.

* * @return a {@link java.lang.Long} object. */ public Long getResponseTime() { return m_responseTime; } public Throwable getError() { return m_error; } /** *

info

* * @param msg a {@link java.lang.String} object. */ public void info(String msg) { LOG.info(msg); } /** *

info

* * @param msg a {@link java.lang.String} object. * @param t a {@link java.lang.Throwable} object. */ public void info(String msg, Throwable t) { LOG.info(msg, t); } } ",0 "tion registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), /* * external bundles */ new FOS\UserBundle\FOSUserBundle(), new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(), /* * my bundles */ new Application\Frontend\FrontendBundle\ApplicationFrontendFrontendBundle(), new Application\Backend\BackendBundle\ApplicationBackendBackendBundle(), new Application\Backend\UserBundle\ApplicationBackendUserBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); } } ",0 "rg/1999/xhtml""> CQRS.NET: Cqrs.Configuration.BusRegistrar.GetCommandHandlerRegistrar
CQRS.NET  2.2
A lightweight enterprise framework to write CQRS, event-sourced and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.

◆ GetCommandHandlerRegistrar

Func<Type, Type, IHandlerRegistrar> Cqrs.Configuration.BusRegistrar.GetCommandHandlerRegistrar
staticgetset

A Func<Type, Type, THandlerRegistrar> to use in-place of ICommandHandlerRegistrar

",0 "This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful but, except * as otherwise stated in writing, without any warranty; without even the * implied warranty of merchantability or fitness for a particular purpose. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * * The full GNU General Public License is included in this distribution in * the file called ""COPYING"". * * Contact Information: * Imagination Technologies Ltd. * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK * ******************************************************************************/ #include #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)) #ifndef AUTOCONF_INCLUDED #include #endif #endif #if defined(SUPPORT_DRI_DRM) #define PVR_MOD_STATIC #else #if defined(LDM_PLATFORM) #define PVR_LDM_PLATFORM_MODULE #define PVR_LDM_MODULE #else #if defined(LDM_PCI) #define PVR_LDM_PCI_MODULE #define PVR_LDM_MODULE #endif #endif #define PVR_MOD_STATIC static #endif #if defined(PVR_LDM_PLATFORM_PRE_REGISTERED) #if !defined(NO_HARDWARE) #define PVR_USE_PRE_REGISTERED_PLATFORM_DEV #endif #endif #include #include #include #include #include #if defined(SUPPORT_DRI_DRM) #include #if defined(PVR_SECURE_DRM_AUTH_EXPORT) #include ""env_perproc.h"" #endif #endif #if defined(PVR_LDM_PLATFORM_MODULE) #include #endif #if defined(PVR_LDM_PCI_MODULE) #include #endif #if defined(DEBUG) && defined(PVR_MANUAL_POWER_CONTROL) #include #endif #include ""img_defs.h"" #include ""services.h"" #include ""kerneldisplay.h"" #include ""kernelbuffer.h"" #include ""syscommon.h"" #include ""pvrmmap.h"" #include ""mutils.h"" #include ""mm.h"" #include ""mmap.h"" #include ""mutex.h"" #include ""pvr_debug.h"" #include ""srvkm.h"" #include ""perproc.h"" #include ""handle.h"" #include ""pvr_bridge_km.h"" #include ""proc.h"" #include ""pvrmodule.h"" #include ""private_data.h"" #include ""lock.h"" #include ""linkage.h"" #if defined(SUPPORT_DRI_DRM) #include ""pvr_drm.h"" #endif #define DRVNAME PVRSRV_MODNAME #define DEVNAME PVRSRV_MODNAME #if defined(SUPPORT_DRI_DRM) #define PRIVATE_DATA(pFile) ((pFile)->driver_priv) #else #define PRIVATE_DATA(pFile) ((pFile)->private_data) #endif MODULE_SUPPORTED_DEVICE(DEVNAME); #if defined(PVRSRV_NEED_PVR_DPF) #include extern IMG_UINT32 gPVRDebugLevel; module_param(gPVRDebugLevel, uint, 0644); MODULE_PARM_DESC(gPVRDebugLevel, ""Sets the level of debug output (default 0x7)""); #endif EXPORT_SYMBOL(PVRGetDisplayClassJTable); EXPORT_SYMBOL(PVRGetBufferClassJTable); #if defined(PVR_LDM_MODULE) static struct class *psPvrClass; #endif #if !defined(SUPPORT_DRI_DRM) static int AssignedMajorNumber; static int PVRSRVOpen(struct inode* pInode, struct file* pFile); static int PVRSRVRelease(struct inode* pInode, struct file* pFile); static struct file_operations pvrsrv_fops = { .owner=THIS_MODULE, .unlocked_ioctl = PVRSRV_BridgeDispatchKM, .open=PVRSRVOpen, .release=PVRSRVRelease, .mmap=PVRMMap, }; #endif PVRSRV_LINUX_MUTEX gPVRSRVLock; IMG_UINT32 gui32ReleasePID; #if defined(DEBUG) && defined(PVR_MANUAL_POWER_CONTROL) static IMG_UINT32 gPVRPowerLevel; #endif #if defined(PVR_LDM_MODULE) #if defined(PVR_LDM_PLATFORM_MODULE) #define LDM_DEV struct platform_device #define LDM_DRV struct platform_driver #endif #if defined(PVR_LDM_PCI_MODULE) #define LDM_DEV struct pci_dev #define LDM_DRV struct pci_driver #endif #if defined(PVR_LDM_PLATFORM_MODULE) static int PVRSRVDriverRemove(LDM_DEV *device); static int PVRSRVDriverProbe(LDM_DEV *device); #endif #if defined(PVR_LDM_PCI_MODULE) static void PVRSRVDriverRemove(LDM_DEV *device); static int PVRSRVDriverProbe(LDM_DEV *device, const struct pci_device_id *id); #endif static int PVRSRVDriverSuspend(LDM_DEV *device, pm_message_t state); static void PVRSRVDriverShutdown(LDM_DEV *device); static int PVRSRVDriverResume(LDM_DEV *device); #if defined(PVR_LDM_PCI_MODULE) struct pci_device_id powervr_id_table[] __devinitdata = { {PCI_DEVICE(SYS_SGX_DEV_VENDOR_ID, SYS_SGX_DEV_DEVICE_ID)}, #if defined (SYS_SGX_DEV1_DEVICE_ID) {PCI_DEVICE(SYS_SGX_DEV_VENDOR_ID, SYS_SGX_DEV1_DEVICE_ID)}, #endif {0} }; MODULE_DEVICE_TABLE(pci, powervr_id_table); #endif #if defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV) static struct platform_device_id powervr_id_table[] __devinitdata = { {SYS_SGX_DEV_NAME, 0}, {} }; #endif static LDM_DRV powervr_driver = { #if defined(PVR_LDM_PLATFORM_MODULE) .driver = { .name = DRVNAME, }, #endif #if defined(PVR_LDM_PCI_MODULE) .name = DRVNAME, #endif #if defined(PVR_LDM_PCI_MODULE) || defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV) .id_table = powervr_id_table, #endif .probe = PVRSRVDriverProbe, #if defined(PVR_LDM_PLATFORM_MODULE) .remove = PVRSRVDriverRemove, #endif #if defined(PVR_LDM_PCI_MODULE) .remove = __devexit_p(PVRSRVDriverRemove), #endif .suspend = PVRSRVDriverSuspend, .resume = PVRSRVDriverResume, .shutdown = PVRSRVDriverShutdown, }; LDM_DEV *gpsPVRLDMDev; #if defined(MODULE) && defined(PVR_LDM_PLATFORM_MODULE) && \ !defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV) static void PVRSRVDeviceRelease(struct device unref__ *pDevice) { } static struct platform_device powervr_device = { .name = DEVNAME, .id = -1, .dev = { .release = PVRSRVDeviceRelease } }; #endif #if defined(PVR_LDM_PLATFORM_MODULE) static int PVRSRVDriverProbe(LDM_DEV *pDevice) #endif #if defined(PVR_LDM_PCI_MODULE) static int __devinit PVRSRVDriverProbe(LDM_DEV *pDevice, const struct pci_device_id *id) #endif { SYS_DATA *psSysData; PVR_TRACE((""PVRSRVDriverProbe(pDevice=%p)"", pDevice)); #if 0 if (PerDeviceSysInitialise((IMG_PVOID)pDevice) != PVRSRV_OK) { return -EINVAL; } #endif psSysData = SysAcquireDataNoCheck(); if ( psSysData == IMG_NULL) { gpsPVRLDMDev = pDevice; if (SysInitialise() != PVRSRV_OK) { return -ENODEV; } } return 0; } #if defined (PVR_LDM_PLATFORM_MODULE) static int PVRSRVDriverRemove(LDM_DEV *pDevice) #endif #if defined(PVR_LDM_PCI_MODULE) static void __devexit PVRSRVDriverRemove(LDM_DEV *pDevice) #endif { SYS_DATA *psSysData; PVR_TRACE((""PVRSRVDriverRemove(pDevice=%p)"", pDevice)); SysAcquireData(&psSysData); #if defined(DEBUG) && defined(PVR_MANUAL_POWER_CONTROL) if (gPVRPowerLevel != 0) { if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D0) == PVRSRV_OK) { gPVRPowerLevel = 0; } } #endif (void) SysDeinitialise(psSysData); gpsPVRLDMDev = IMG_NULL; #if 0 if (PerDeviceSysDeInitialise((IMG_PVOID)pDevice) != PVRSRV_OK) { return -EINVAL; } #endif #if defined (PVR_LDM_PLATFORM_MODULE) return 0; #endif #if defined (PVR_LDM_PCI_MODULE) return; #endif } #endif #if defined(PVR_LDM_MODULE) || defined(PVR_DRI_DRM_PLATFORM_DEV) PVR_MOD_STATIC void PVRSRVDriverShutdown(LDM_DEV *pDevice) { PVR_TRACE((""PVRSRVDriverShutdown(pDevice=%p)"", pDevice)); (void) PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D3); } #endif #if defined(PVR_LDM_MODULE) || defined(SUPPORT_DRI_DRM) #if defined(SUPPORT_DRI_DRM) && !defined(PVR_DRI_DRM_PLATFORM_DEV) int PVRSRVDriverSuspend(struct drm_device *pDevice, pm_message_t state) #else PVR_MOD_STATIC int PVRSRVDriverSuspend(LDM_DEV *pDevice, pm_message_t state) #endif { #if !(defined(DEBUG) && defined(PVR_MANUAL_POWER_CONTROL) && !defined(SUPPORT_DRI_DRM)) PVR_TRACE(( ""PVRSRVDriverSuspend(pDevice=%p)"", pDevice)); if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D3) != PVRSRV_OK) { return -EINVAL; } #endif return 0; } #if defined(SUPPORT_DRI_DRM) && !defined(PVR_DRI_DRM_PLATFORM_DEV) int PVRSRVDriverResume(struct drm_device *pDevice) #else PVR_MOD_STATIC int PVRSRVDriverResume(LDM_DEV *pDevice) #endif { #if !(defined(DEBUG) && defined(PVR_MANUAL_POWER_CONTROL) && !defined(SUPPORT_DRI_DRM)) PVR_TRACE((""PVRSRVDriverResume(pDevice=%p)"", pDevice)); if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D0) != PVRSRV_OK) { return -EINVAL; } #endif return 0; } #endif #if defined(DEBUG) && defined(PVR_MANUAL_POWER_CONTROL) && !defined(SUPPORT_DRI_DRM) IMG_INT PVRProcSetPowerLevel(struct file *file, const IMG_CHAR *buffer, IMG_UINT32 count, IMG_VOID *data) { IMG_CHAR data_buffer[2]; IMG_UINT32 PVRPowerLevel; if (count != sizeof(data_buffer)) { return -EINVAL; } else { if (copy_from_user(data_buffer, buffer, count)) return -EINVAL; if (data_buffer[count - 1] != '\n') return -EINVAL; PVRPowerLevel = data_buffer[0] - '0'; if (PVRPowerLevel != gPVRPowerLevel) { if (PVRPowerLevel != 0) { if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D3) != PVRSRV_OK) { return -EINVAL; } } else { if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D0) != PVRSRV_OK) { return -EINVAL; } } gPVRPowerLevel = PVRPowerLevel; } } return (count); } void ProcSeqShowPowerLevel(struct seq_file *sfile,void* el) { seq_printf(sfile, ""%lu\n"", gPVRPowerLevel); } #endif #if defined(SUPPORT_DRI_DRM) int PVRSRVOpen(struct drm_device unref__ *dev, struct drm_file *pFile) #else static int PVRSRVOpen(struct inode unref__ * pInode, struct file *pFile) #endif { PVRSRV_FILE_PRIVATE_DATA *psPrivateData; IMG_HANDLE hBlockAlloc; int iRet = -ENOMEM; PVRSRV_ERROR eError; IMG_UINT32 ui32PID; #if defined(SUPPORT_DRI_DRM) && defined(PVR_SECURE_DRM_AUTH_EXPORT) PVRSRV_ENV_PER_PROCESS_DATA *psEnvPerProc; #endif LinuxLockMutex(&gPVRSRVLock); ui32PID = OSGetCurrentProcessIDKM(); if (PVRSRVProcessConnect(ui32PID, 0) != PVRSRV_OK) goto err_unlock; #if defined(SUPPORT_DRI_DRM) && defined(PVR_SECURE_DRM_AUTH_EXPORT) psEnvPerProc = PVRSRVPerProcessPrivateData(ui32PID); if (psEnvPerProc == IMG_NULL) { PVR_DPF((PVR_DBG_ERROR, ""%s: No per-process private data"", __FUNCTION__)); goto err_unlock; } #endif eError = OSAllocMem(PVRSRV_OS_NON_PAGEABLE_HEAP, sizeof(PVRSRV_FILE_PRIVATE_DATA), (IMG_PVOID *)&psPrivateData, &hBlockAlloc, ""File Private Data""); if(eError != PVRSRV_OK) goto err_unlock; #if defined (SUPPORT_SID_INTERFACE) psPrivateData->hKernelMemInfo = 0; #else psPrivateData->hKernelMemInfo = NULL; #endif #if defined(SUPPORT_DRI_DRM) && defined(PVR_SECURE_DRM_AUTH_EXPORT) psPrivateData->psDRMFile = pFile; list_add_tail(&psPrivateData->sDRMAuthListItem, &psEnvPerProc->sDRMAuthListHead); #endif psPrivateData->ui32OpenPID = ui32PID; psPrivateData->hBlockAlloc = hBlockAlloc; PRIVATE_DATA(pFile) = psPrivateData; iRet = 0; err_unlock: LinuxUnLockMutex(&gPVRSRVLock); return iRet; } #if defined(SUPPORT_DRI_DRM) void PVRSRVRelease(void *pvPrivData) #else static int PVRSRVRelease(struct inode unref__ * pInode, struct file *pFile) #endif { PVRSRV_FILE_PRIVATE_DATA *psPrivateData; LinuxLockMutex(&gPVRSRVLock); #if defined(SUPPORT_DRI_DRM) psPrivateData = (PVRSRV_FILE_PRIVATE_DATA *)pvPrivData; #else psPrivateData = PRIVATE_DATA(pFile); #endif if (psPrivateData != IMG_NULL) { #if defined(SUPPORT_DRI_DRM) && defined(PVR_SECURE_DRM_AUTH_EXPORT) list_del(&psPrivateData->sDRMAuthListItem); #endif gui32ReleasePID = psPrivateData->ui32OpenPID; PVRSRVProcessDisconnect(psPrivateData->ui32OpenPID); gui32ReleasePID = 0; OSFreeMem(PVRSRV_OS_NON_PAGEABLE_HEAP, sizeof(PVRSRV_FILE_PRIVATE_DATA), psPrivateData, psPrivateData->hBlockAlloc); #if !defined(SUPPORT_DRI_DRM) PRIVATE_DATA(pFile) = IMG_NULL; #endif } LinuxUnLockMutex(&gPVRSRVLock); #if !defined(SUPPORT_DRI_DRM) return 0; #endif } #if defined(SUPPORT_DRI_DRM) int PVRCore_Init(void) #else static int __init PVRCore_Init(void) #endif { int error; #if !defined(PVR_LDM_MODULE) PVRSRV_ERROR eError; #else struct device *psDev; #endif #if !defined(SUPPORT_DRI_DRM) PVRDPFInit(); #endif PVR_TRACE((""PVRCore_Init"")); LinuxInitMutex(&gPVRSRVLock); if (CreateProcEntries ()) { error = -ENOMEM; return error; } if (PVROSFuncInit() != PVRSRV_OK) { error = -ENOMEM; goto init_failed; } PVRLinuxMUtilsInit(); if(LinuxMMInit() != PVRSRV_OK) { error = -ENOMEM; goto init_failed; } LinuxBridgeInit(); PVRMMapInit(); #if defined(PVR_LDM_MODULE) #if defined(PVR_LDM_PLATFORM_MODULE) if ((error = platform_driver_register(&powervr_driver)) != 0) { PVR_DPF((PVR_DBG_ERROR, ""PVRCore_Init: unable to register platform driver (%d)"", error)); goto init_failed; } #if defined(MODULE) && !defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV) if ((error = platform_device_register(&powervr_device)) != 0) { platform_driver_unregister(&powervr_driver); PVR_DPF((PVR_DBG_ERROR, ""PVRCore_Init: unable to register platform device (%d)"", error)); goto init_failed; } #endif #endif #if defined(PVR_LDM_PCI_MODULE) if ((error = pci_register_driver(&powervr_driver)) != 0) { PVR_DPF((PVR_DBG_ERROR, ""PVRCore_Init: unable to register PCI driver (%d)"", error)); goto init_failed; } #endif #else if ((eError = SysInitialise()) != PVRSRV_OK) { error = -ENODEV; #if defined(TCF_REV) && (TCF_REV == 110) if(eError == PVRSRV_ERROR_NOT_SUPPORTED) { printk(""\nAtlas wrapper (FPGA image) version mismatch""); error = -ENODEV; } #endif goto init_failed; } #endif #if !defined(SUPPORT_DRI_DRM) AssignedMajorNumber = register_chrdev(0, DEVNAME, &pvrsrv_fops); if (AssignedMajorNumber <= 0) { PVR_DPF((PVR_DBG_ERROR, ""PVRCore_Init: unable to get major number"")); error = -EBUSY; goto sys_deinit; } PVR_TRACE((""PVRCore_Init: major device %d"", AssignedMajorNumber)); #endif #if defined(PVR_LDM_MODULE) psPvrClass = class_create(THIS_MODULE, ""pvr""); if (IS_ERR(psPvrClass)) { PVR_DPF((PVR_DBG_ERROR, ""PVRCore_Init: unable to create class (%ld)"", PTR_ERR(psPvrClass))); error = -EBUSY; goto unregister_device; } psDev = device_create(psPvrClass, NULL, MKDEV(AssignedMajorNumber, 0), #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)) NULL, #endif DEVNAME); if (IS_ERR(psDev)) { PVR_DPF((PVR_DBG_ERROR, ""PVRCore_Init: unable to create device (%ld)"", PTR_ERR(psDev))); error = -EBUSY; goto destroy_class; } #endif return 0; #if defined(PVR_LDM_MODULE) destroy_class: class_destroy(psPvrClass); unregister_device: unregister_chrdev((IMG_UINT)AssignedMajorNumber, DRVNAME); #endif #if !defined(SUPPORT_DRI_DRM) sys_deinit: #endif #if defined(PVR_LDM_MODULE) #if defined(PVR_LDM_PCI_MODULE) pci_unregister_driver(&powervr_driver); #endif #if defined (PVR_LDM_PLATFORM_MODULE) #if defined(MODULE) && !defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV) platform_device_unregister(&powervr_device); #endif platform_driver_unregister(&powervr_driver); #endif #else { SYS_DATA *psSysData; psSysData = SysAcquireDataNoCheck(); if (psSysData != IMG_NULL) { (void) SysDeinitialise(psSysData); } } #endif init_failed: PVRMMapCleanup(); LinuxMMCleanup(); LinuxBridgeDeInit(); PVROSFuncDeInit(); RemoveProcEntries(); return error; } #if defined(SUPPORT_DRI_DRM) void PVRCore_Cleanup(void) #else static void __exit PVRCore_Cleanup(void) #endif { #if !defined(PVR_LDM_MODULE) SYS_DATA *psSysData; #endif PVR_TRACE((""PVRCore_Cleanup"")); #if !defined(PVR_LDM_MODULE) SysAcquireData(&psSysData); #endif #if defined(PVR_LDM_MODULE) device_destroy(psPvrClass, MKDEV(AssignedMajorNumber, 0)); class_destroy(psPvrClass); #endif #if !defined(SUPPORT_DRI_DRM) #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)) if ( #endif unregister_chrdev((IMG_UINT)AssignedMajorNumber, DRVNAME) #if !(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22)) ; #else ) { PVR_DPF((PVR_DBG_ERROR,"" can't unregister device major %d"", AssignedMajorNumber)); } #endif #endif #if defined(PVR_LDM_MODULE) #if defined(PVR_LDM_PCI_MODULE) pci_unregister_driver(&powervr_driver); #endif #if defined (PVR_LDM_PLATFORM_MODULE) #if defined(MODULE) && !defined(PVR_USE_PRE_REGISTERED_PLATFORM_DEV) platform_device_unregister(&powervr_device); #endif platform_driver_unregister(&powervr_driver); #endif #else #if defined(DEBUG) && defined(PVR_MANUAL_POWER_CONTROL) if (gPVRPowerLevel != 0) { if (PVRSRVSetPowerStateKM(PVRSRV_SYS_POWER_STATE_D0) == PVRSRV_OK) { gPVRPowerLevel = 0; } } #endif (void) SysDeinitialise(psSysData); #endif PVRMMapCleanup(); LinuxMMCleanup(); LinuxBridgeDeInit(); PVROSFuncDeInit(); RemoveProcEntries(); PVR_TRACE((""PVRCore_Cleanup: unloading"")); } #if !defined(SUPPORT_DRI_DRM) module_init(PVRCore_Init); module_exit(PVRCore_Cleanup); #endif ",0 "s' ), 'SU' => __( 'Sumatera Utara', 'paid-member-subscriptions' ), 'SB' => __( 'Sumatera Barat', 'paid-member-subscriptions' ), 'RI' => __( 'Riau', 'paid-member-subscriptions' ), 'KR' => __( 'Kepulauan Riau', 'paid-member-subscriptions' ), 'JA' => __( 'Jambi', 'paid-member-subscriptions' ), 'SS' => __( 'Sumatera Selatan', 'paid-member-subscriptions' ), 'BB' => __( 'Bangka Belitung', 'paid-member-subscriptions' ), 'BE' => __( 'Bengkulu', 'paid-member-subscriptions' ), 'LA' => __( 'Lampung', 'paid-member-subscriptions' ), 'JK' => __( 'DKI Jakarta', 'paid-member-subscriptions' ), 'JB' => __( 'Jawa Barat', 'paid-member-subscriptions' ), 'BT' => __( 'Banten', 'paid-member-subscriptions' ), 'JT' => __( 'Jawa Tengah', 'paid-member-subscriptions' ), 'JI' => __( 'Jawa Timur', 'paid-member-subscriptions' ), 'YO' => __( 'Daerah Istimewa Yogyakarta', 'paid-member-subscriptions' ), 'BA' => __( 'Bali', 'paid-member-subscriptions' ), 'NB' => __( 'Nusa Tenggara Barat', 'paid-member-subscriptions' ), 'NT' => __( 'Nusa Tenggara Timur', 'paid-member-subscriptions' ), 'KB' => __( 'Kalimantan Barat', 'paid-member-subscriptions' ), 'KT' => __( 'Kalimantan Tengah', 'paid-member-subscriptions' ), 'KI' => __( 'Kalimantan Timur', 'paid-member-subscriptions' ), 'KS' => __( 'Kalimantan Selatan', 'paid-member-subscriptions' ), 'KU' => __( 'Kalimantan Utara', 'paid-member-subscriptions' ), 'SA' => __( 'Sulawesi Utara', 'paid-member-subscriptions' ), 'ST' => __( 'Sulawesi Tengah', 'paid-member-subscriptions' ), 'SG' => __( 'Sulawesi Tenggara', 'paid-member-subscriptions' ), 'SR' => __( 'Sulawesi Barat', 'paid-member-subscriptions' ), 'SN' => __( 'Sulawesi Selatan', 'paid-member-subscriptions' ), 'GO' => __( 'Gorontalo', 'paid-member-subscriptions' ), 'MA' => __( 'Maluku', 'paid-member-subscriptions' ), 'MU' => __( 'Maluku Utara', 'paid-member-subscriptions' ), 'PA' => __( 'Papua', 'paid-member-subscriptions' ), 'PB' => __( 'Papua Barat', 'paid-member-subscriptions' ) ); ",0 "u.biblioteca.model.Book; import com.twu.biblioteca.service.BookListService; import org.apache.ibatis.session.SqlSession; import java.util.ArrayList; public class BookListServiceImpl implements BookListService { private SqlSession sqlSession; private BookListMapper bookListMapper; public BookListServiceImpl() { this.sqlSession = MyBatisUtil.getSqlSessionFactory().openSession(); this.bookListMapper = sqlSession.getMapper(BookListMapper.class); } public BookListServiceImpl(BookListMapper bookListMapper) { this.bookListMapper = bookListMapper; } @Override public ArrayList getBookList() { return bookListMapper.getBookList(); } } ",0 "an Webinar Series
Dr. Masa Maeda Webinar

Webinar: Jun 06, 2012; 10 AM - 11 AM Pacific
 
Kanban - Beyond IT and Software!
One of the important contributors to the success of several organizations is alignment of IT strategy with Business for achieving Corporate Goals. If Reduced Waste and Smooth Flow (or streamlined processes) throughout the enterprise are part of your corporate strategy, then you should look at Kanban. While Kanban is making waves in IT operations and Software development, it is also proving invaluable for a number of forward-thinking business functions such as HR, sales, marketing, insurance claims and more!

Come hear Dr. Masa K Maeda, renowned thought leader, consultant and coach for Lean Value Innovation, discuss the tremendous benefits of Kanban not only in IT but also for other divisions or BUs of your organization like Sales. Invite your business colleagues to collaboratively use Kanban for improving throughput, quality and other business benefits throughout the enterprise.

Click here to Register for the webinar
Date: Jun 06, 2012; 10 AM - 11 AM Pacific

Thank you and we hope that you will join us!

Swift-Kanban Team
http://www.swift-kanban.com
Follow us:
Digite, Inc. is a leading provider of Lean/ Agile ALM and PPM products and solutions, based out of Mountain View, CA. Digite products and solutions have helped thousands of users around the world manage and deliver large and complex projects and applications executed by distributed teams, both in-house and outsourced. To learn more, please visit www.swift-kanban.com or www.digite.com

Copyright © 2012 Digite, Inc. All rights reserved.
You are receiving this email as you signed up with Digite or one of our media partners. If you have any questions, please contact us at marketing@digite.com

Our mailing address is: Digite, Inc., 82 Pioneer Way, Suite 102, Mountain View, CA 94041

",0 "ng a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef BINARYTREE_H #define BINARYTREE_H #include ""declarations.h"" #include enum { BINARYTREE_ESCAPE_CHAR = 0xFD, BINARYTREE_NODE_START = 0xFE, BINARYTREE_NODE_END = 0xFF }; class BinaryTree : public stdext::shared_object { public: BinaryTree(const FileStreamPtr& fin); ~BinaryTree(); void seek(uint pos); void skip(uint len); uint tell() { return m_pos; } uint size() { unserialize(); return m_buffer.size(); } uint8 getU8(); uint16 getU16(); uint32 getU32(); uint64 getU64(); std::string getString(uint16 len = 0); Point getPoint(); BinaryTreeVec getChildren(); bool canRead() { unserialize(); return m_pos < m_buffer.size(); } private: void unserialize(); void skipNodes(); FileStreamPtr m_fin; DataBuffer m_buffer; uint m_pos; uint m_startPos; }; class OutputBinaryTree : public stdext::shared_object { public: OutputBinaryTree(const FileStreamPtr& finish); void addU8(uint8 v); void addU16(uint16 v); void addU32(uint32 v); void addString(const std::string& v); void addPos(uint16 x, uint16 y, uint8 z); void addPoint(const Point& point); void startNode(uint8 node); void endNode(); private: FileStreamPtr m_fin; protected: void write(const uint8* data, size_t size); }; #endif ",0 "osts()): while (have_posts()): the_post(); ?>

Page Not Found

Sorry, The page you are looking for cannot be found!

Blog Pages

",0 "k; use Drupal\Core\Render\Element; use Drupal\system\Tests\Routing\MockRouteProvider; use Drupal\Tests\Core\Menu\MenuLinkMock; use Drupal\user\Entity\User; use Symfony\Cmf\Component\Routing\RouteObjectInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; /** * Tests \Drupal\system\Plugin\Block\SystemMenuBlock. * * @group Block * @todo Expand test coverage to all SystemMenuBlock functionality, including * block_menu_delete(). * * @see \Drupal\system\Plugin\Derivative\SystemMenuBlock * @see \Drupal\system\Plugin\Block\SystemMenuBlock */ class SystemMenuBlockTest extends KernelTestBase { /** * Modules to enable. * * @var array */ public static $modules = [ 'system', 'block', 'menu_test', 'menu_link_content', 'field', 'user', 'link', ]; /** * The block under test. * * @var \Drupal\system\Plugin\Block\SystemMenuBlock */ protected $block; /** * The menu for testing. * * @var \Drupal\system\MenuInterface */ protected $menu; /** * The menu link tree service. * * @var \Drupal\Core\Menu\MenuLinkTree */ protected $linkTree; /** * The menu link plugin manager service. * * @var \Drupal\Core\Menu\MenuLinkManagerInterface */ protected $menuLinkManager; /** * The block manager service. * * @var \Drupal\Core\block\BlockManagerInterface */ protected $blockManager; /** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->installSchema('system', 'sequences'); $this->installEntitySchema('user'); $this->installEntitySchema('menu_link_content'); $account = User::create([ 'name' => $this->randomMachineName(), 'status' => 1, ]); $account->save(); $this->container->get('current_user')->setAccount($account); $this->menuLinkManager = $this->container->get('plugin.manager.menu.link'); $this->linkTree = $this->container->get('menu.link_tree'); $this->blockManager = $this->container->get('plugin.manager.block'); $routes = new RouteCollection(); $requirements = ['_access' => 'TRUE']; $options = ['_access_checks' => ['access_check.default']]; $routes->add('example1', new Route('/example1', [], $requirements, $options)); $routes->add('example2', new Route('/example2', [], $requirements, $options)); $routes->add('example3', new Route('/example3', [], $requirements, $options)); $routes->add('example4', new Route('/example4', [], $requirements, $options)); $routes->add('example5', new Route('/example5', [], $requirements, $options)); $routes->add('example6', new Route('/example6', [], $requirements, $options)); $routes->add('example7', new Route('/example7', [], $requirements, $options)); $routes->add('example8', new Route('/example8', [], $requirements, $options)); $mock_route_provider = new MockRouteProvider($routes); $this->container->set('router.route_provider', $mock_route_provider); // Add a new custom menu. $menu_name = 'mock'; $label = $this->randomMachineName(16); $this->menu = Menu::create([ 'id' => $menu_name, 'label' => $label, 'description' => 'Description text', ]); $this->menu->save(); // This creates a tree with the following structure: // - 1 // - 2 // - 3 // - 4 // - 5 // - 7 // - 6 // - 8 // With link 6 being the only external link. $links = [ 1 => MenuLinkMock::create(['id' => 'test.example1', 'route_name' => 'example1', 'title' => 'foo', 'parent' => '', 'weight' => 0]), 2 => MenuLinkMock::create(['id' => 'test.example2', 'route_name' => 'example2', 'title' => 'bar', 'parent' => '', 'route_parameters' => ['foo' => 'bar'], 'weight' => 1]), 3 => MenuLinkMock::create(['id' => 'test.example3', 'route_name' => 'example3', 'title' => 'baz', 'parent' => 'test.example2', 'weight' => 2]), 4 => MenuLinkMock::create(['id' => 'test.example4', 'route_name' => 'example4', 'title' => 'qux', 'parent' => 'test.example3', 'weight' => 3]), 5 => MenuLinkMock::create(['id' => 'test.example5', 'route_name' => 'example5', 'title' => 'foofoo', 'parent' => '', 'expanded' => TRUE, 'weight' => 4]), 6 => MenuLinkMock::create(['id' => 'test.example6', 'route_name' => '', 'url' => 'https://www.drupal.org/', 'title' => 'barbar', 'parent' => '', 'weight' => 5]), 7 => MenuLinkMock::create(['id' => 'test.example7', 'route_name' => 'example7', 'title' => 'bazbaz', 'parent' => 'test.example5', 'weight' => 6]), 8 => MenuLinkMock::create(['id' => 'test.example8', 'route_name' => 'example8', 'title' => 'quxqux', 'parent' => '', 'weight' => 7]), ]; foreach ($links as $instance) { $this->menuLinkManager->addDefinition($instance->getPluginId(), $instance->getPluginDefinition()); } } /** * Tests calculation of a system menu block's configuration dependencies. */ public function testSystemMenuBlockConfigDependencies() { $block = Block::create([ 'plugin' => 'system_menu_block:' . $this->menu->id(), 'region' => 'footer', 'id' => 'machinename', 'theme' => 'stark', ]); $dependencies = $block->calculateDependencies()->getDependencies(); $expected = [ 'config' => [ 'system.menu.' . $this->menu->id(), ], 'module' => [ 'system', ], 'theme' => [ 'stark', ], ]; $this->assertIdentical($expected, $dependencies); } /** * Tests the config start level and depth. */ public function testConfigLevelDepth() { // Helper function to generate a configured block instance. $place_block = function ($level, $depth) { return $this->blockManager->createInstance('system_menu_block:' . $this->menu->id(), [ 'region' => 'footer', 'id' => 'machinename', 'theme' => 'stark', 'level' => $level, 'depth' => $depth, ]); }; // All the different block instances we're going to test. $blocks = [ 'all' => $place_block(1, 0), 'level_1_only' => $place_block(1, 1), 'level_2_only' => $place_block(2, 1), 'level_3_only' => $place_block(3, 1), 'level_1_and_beyond' => $place_block(1, 0), 'level_2_and_beyond' => $place_block(2, 0), 'level_3_and_beyond' => $place_block(3, 0), ]; // Scenario 1: test all block instances when there's no active trail. $no_active_trail_expectations = []; $no_active_trail_expectations['all'] = [ 'test.example1' => [], 'test.example2' => [], 'test.example5' => [ 'test.example7' => [], ], 'test.example6' => [], 'test.example8' => [], ]; $no_active_trail_expectations['level_1_only'] = [ 'test.example1' => [], 'test.example2' => [], 'test.example5' => [], 'test.example6' => [], 'test.example8' => [], ]; $no_active_trail_expectations['level_2_only'] = []; $no_active_trail_expectations['level_3_only'] = []; $no_active_trail_expectations['level_1_and_beyond'] = $no_active_trail_expectations['all']; $no_active_trail_expectations['level_2_and_beyond'] = $no_active_trail_expectations['level_2_only']; $no_active_trail_expectations['level_3_and_beyond'] = []; foreach ($blocks as $id => $block) { $block_build = $block->build(); $items = isset($block_build['#items']) ? $block_build['#items'] : []; $this->assertIdentical($no_active_trail_expectations[$id], $this->convertBuiltMenuToIdTree($items), format_string('Menu block %id with no active trail renders the expected tree.', ['%id' => $id])); } // Scenario 2: test all block instances when there's an active trail. $route = $this->container->get('router.route_provider')->getRouteByName('example3'); $request = new Request(); $request->attributes->set(RouteObjectInterface::ROUTE_NAME, 'example3'); $request->attributes->set(RouteObjectInterface::ROUTE_OBJECT, $route); $this->container->get('request_stack')->push($request); // \Drupal\Core\Menu\MenuActiveTrail uses the cache collector pattern, which // includes static caching. Since this second scenario simulates a second // request, we must also simulate it for the MenuActiveTrail service, by // clearing the cache collector's static cache. \Drupal::service('menu.active_trail')->clear(); $active_trail_expectations = []; $active_trail_expectations['all'] = [ 'test.example1' => [], 'test.example2' => [ 'test.example3' => [ 'test.example4' => [], ], ], 'test.example5' => [ 'test.example7' => [], ], 'test.example6' => [], 'test.example8' => [], ]; $active_trail_expectations['level_1_only'] = [ 'test.example1' => [], 'test.example2' => [], 'test.example5' => [], 'test.example6' => [], 'test.example8' => [], ]; $active_trail_expectations['level_2_only'] = [ 'test.example3' => [], ]; $active_trail_expectations['level_3_only'] = [ 'test.example4' => [], ]; $active_trail_expectations['level_1_and_beyond'] = $active_trail_expectations['all']; $active_trail_expectations['level_2_and_beyond'] = [ 'test.example3' => [ 'test.example4' => [], ], ]; $active_trail_expectations['level_3_and_beyond'] = $active_trail_expectations['level_3_only']; foreach ($blocks as $id => $block) { $block_build = $block->build(); $items = isset($block_build['#items']) ? $block_build['#items'] : []; $this->assertIdentical($active_trail_expectations[$id], $this->convertBuiltMenuToIdTree($items), format_string('Menu block %id with an active trail renders the expected tree.', ['%id' => $id])); } } /** * Helper method to allow for easy menu link tree structure assertions. * * Converts the result of MenuLinkTree::build() in a ""menu link ID tree"". * * @param array $build * The return value of MenuLinkTree::build() * * @return array * The ""menu link ID tree"" representation of the given render array. */ protected function convertBuiltMenuToIdTree(array $build) { $level = []; foreach (Element::children($build) as $id) { $level[$id] = []; if (isset($build[$id]['below'])) { $level[$id] = $this->convertBuiltMenuToIdTree($build[$id]['below']); } } return $level; } } ",0 "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. package com.google.android.apps.body.tdl; import android.opengl.Matrix; /** * Helper class for math. */ public class TdlMath { public static void perspective( float[] m, float angle, float aspect, float near, float far) { float f = (float)Math.tan(0.5 * (Math.PI - angle)); float range = near - far; m[0] = f / aspect; m[1] = 0; m[2] = 0; m[3] = 0; m[4] = 0; m[5] = f; m[6] = 0; m[7] = 0; m[8] = 0; m[9] = 0; m[10] = (far + near) / range; m[11] = -1; m[12] = 0; m[13] = 0; m[14] = 2.0f * far * near / range; m[15] = 0; } public static void pickMatrix( float[] m, float x, float y, float width, float height, float[] viewport) { m[0] = viewport[2] / width; m[1] = 0; m[2] = 0; m[3] = 0; m[4] = 0; m[5] = viewport[3] / height; m[6] = 0; m[7] = 0; m[8] = 0; m[9] = 0; m[10] = 1; m[11] = 0; m[12] = (viewport[2] + (viewport[0] - x)*2) / width; m[13] = (viewport[3] + (viewport[1] - y)*2) / height; m[14] = 0; m[15] = 1; } public static float[] subVector(float[] a, float[] b) { float[] result = { a[0] - b[0], a[1] - b[1], a[2] - b[2] }; return result; } public static float dot(float[] a, float[] b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; } public static float[] normalize(float[] a) { float f = 1 / (float)Matrix.length(a[0], a[1], a[2]); float[] result = { a[0] * f, a[1] * f, a[2] * f }; return result; } public static float[] cross(float[] a, float[] b) { float[] result = { a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] }; return result; } } ",0 " * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include ""shp-complextype-factory.h"" static GHashTable *complextypes; static GMutex mutex; /** * shp_complextype_factory_create: * @name: name of the #ShpComplextype * * Creates new #ShpComplextype of type @name. * * Returns: A new #ShpComplextype instance of type @name. Free with * g_object_unref() when no longer needed. */ ShpComplextype* shp_complextype_factory_create (gchar * name) { ShpComplextype *complextype = NULL; gpointer tmp; GType object_type; g_return_val_if_fail (name != NULL, FALSE); g_mutex_lock (&mutex); tmp = g_hash_table_lookup (complextypes, name); g_mutex_unlock (&mutex); if (tmp == NULL) { g_warning (""type '%s' has not been registered"", name); return NULL; } object_type = GPOINTER_TO_UINT (tmp); complextype = g_object_new (object_type, NULL); return complextype; } /** * shp_complextype_factory_register: * @object_type: a #GType * * Registers new #ShpComplextype type, type is represented by @object_type. * * Returns: %TRUE on success and %FALSE otherwise */ gboolean shp_complextype_factory_register (gchar * name, GType object_type) { g_return_val_if_fail (name != NULL, FALSE); if (!g_type_is_a (object_type, SHP_COMPLEXTYPE_TYPE)) { g_error (""the '%s' type is not a descendant of ShpComplextype."", name); return FALSE; } g_mutex_lock (&mutex); if (g_hash_table_lookup (complextypes, name)) { g_error (""type '%s' has already been registered."", name); return FALSE; } g_hash_table_insert (complextypes, g_strdup (name), GUINT_TO_POINTER (object_type)); g_mutex_unlock (&mutex); return TRUE; } /** * shp_complextype_factory_get_complextype_list: * * Returns a %NULL terminated string array with all available complextypes. * * Returns: A newly allocated string array with all available complextypes, free whit * g_strfreev() when nolonger needed. */ gchar** shp_complextype_factory_get_complextype_list () { GHashTableIter iter; gpointer key, value; guint num_complextypes; gchar **result; guint index; g_return_if_fail (complextypes != NULL); g_mutex_lock (&mutex); num_complextypes = g_hash_table_size (complextypes); if (num_complextypes == 0) { g_mutex_unlock (&mutex); return NULL; } result = (gchar **)g_malloc0 ((num_complextypes + 1) * sizeof (gchar*)); index = 0; g_hash_table_iter_init (&iter, complextypes); while (g_hash_table_iter_next (&iter, &key, &value)) { result[index++] = g_strdup ((gchar *)key); } g_mutex_unlock (&mutex); result[index] = NULL; g_assert (index == num_complextypes); return result; } /** * shp_complextype_factory_setup: * @complextype_dir: directory where complextype files are located * * Sets up the complextype factory. * * Returns: %TRUE on success and %FALSE otherwise */ gboolean shp_complextype_factory_setup () { complextypes = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); g_mutex_init (&mutex); return TRUE; } /** * shp_complextype_factory_cleanup: * * Cleans up the complextype factory and frees all resources previously allocated * with shp_complextype_factory_setup(). */ void shp_complextype_factory_cleanup () { /* FIXME: unload complextypes */ g_hash_table_unref (complextypes); complextypes = NULL; g_mutex_clear (&mutex); } ",0 " GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.lang.model.type; /** * Thrown when an unknown type is encountered, * usually by a {@link TypeVisitor}. * * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 * @see TypeVisitor#visitUnknown(TypeMirror,P) */ public class UnknownTypeException extends RuntimeException { private static final long serialVersionUID = 269L; /** * The unknown type. */ private TypeMirror type; /** * The additional parameter. */ private Object param; /** * Constructs a new {@code UnknownTypeException} * for the specified type. An additional * object may also be passed to give further context as * to where the exception occurred, such as the additional parameter * used by visitor classes. * * @param type the unknown type or {@code null}. * @param param the additional parameter or {@code null}. */ public UnknownTypeException(TypeMirror type, Object param) { this.type = type; this.param = param; } /** * Returns the additional parameter or {@code null} if * unavailable. * * @return the additional parameter. */ public Object getArgument() { return param; } /** * Returns the unknown type or {@code null} * if unavailable. The type may be {@code null} if * the value is not {@link java.io.Serializable} but the * exception has been serialized and read back in. * * @return the unknown type. */ public TypeMirror getUnknownType() { return type; } } ",0 "out.println(multiply(""123"", ""20"")); } public static String multiply(String num1, String num2) { String n1 = new StringBuilder(num1).reverse().toString(); String n2 = new StringBuilder(num2).reverse().toString(); int[] tmp = new int[n1.length() + n2.length()]; for (int i = 0; i < n1.length(); i++) { int a = n1.charAt(i) - '0'; for (int j = 0; j < n2.length(); j++) { int b = n2.charAt(j) - '0'; tmp[i + j] += b * a; } } StringBuilder sb = new StringBuilder(); for (int k = 0; k < tmp.length; k++) { int d = tmp[k] % 10; int carry = tmp[k] / 10; // will insert digit from left most sb.insert(0, d); if (k < tmp.length - 1) { tmp[k + 1] += carry; } } // remove zeros which are created by initialization of 'tmp' while(sb.length()>0 && sb.charAt(0)=='0'){ sb.deleteCharAt(0); } return sb.length()==0? ""0"" : sb.toString(); } } ",0 "enerated by javadoc (version 1.7.0_101) on Mon Apr 03 09:58:23 UTC 2017 --> Class Hierarchy (Kurento JSON-RPC Server 6.6.2-SNAPSHOT API)
Kurento JSON-RPC Server 6.6.2-SNAPSHOT
  • Prev
  • Next

Class Hierarchy

Interface Hierarchy

Kurento JSON-RPC Server 6.6.2-SNAPSHOT
  • Prev
  • Next

Copyright © 2017 Kurento. All rights reserved.

",0 "rg/1999/xhtml""> Core Plot (iOS): Source/CPTMutableNumericData+TypeConversion.h Source File
Core Plot (iOS)
Cocoa plotting framework for Mac OS X and iOS
CPTMutableNumericData+TypeConversion.h
Go to the documentation of this file.
2 #import "CPTNumericDataType.h"
3 
8 
11 @property (readwrite, assign) CPTNumericDataType dataType;
12 @property (readwrite, assign) CPTDataTypeFormat dataTypeFormat;
13 @property (readwrite, assign) size_t sampleBytes;
14 @property (readwrite, assign) CFByteOrder byteOrder;
16 
19 -(void)convertToType:(CPTDataTypeFormat)newDataType sampleBytes:(size_t)newSampleBytes byteOrder:(CFByteOrder)newByteOrder;
21 
22 @end
Type conversion methods for CPTMutableNumericData.
Definition: CPTMutableNumericData+TypeConversion.h:7
Structure that describes the encoding of numeric data samples.
Definition: CPTNumericDataType.h:29
CPTDataTypeFormat
Enumeration of data formats for numeric data.
Definition: CPTNumericDataType.h:6
",0 "*/ /** * Handles /social endpoint, so it must be an extrovert. */ class SocialController extends DashboardController { /** @var array Models to automatically instantiate. */ public $Uses = ['Form', 'Database']; /** * Runs before every call to this controller. */ public function initialize() { parent::initialize(); Gdn_Theme::section('Settings'); } /** * Default method. */ public function index() { redirectTo('social/manage'); } /** * Settings page. */ public function manage() { $this->permission('Garden.Settings.Manage'); $this->title(""Social Connect Addons""); $this->setHighlightRoute('/social/manage'); $connections = $this->getConnections(); $this->setData('Connections', $connections); $this->render(); } /** * Find available social plugins. * * @return array|mixed * @throws Exception */ protected function getConnections() { $this->fireEvent('GetConnections'); $connections = []; $addons = Gdn::addonManager()->lookupAllByType(\Vanilla\Addon::TYPE_ADDON); foreach ($addons as $addonName => $addon) { /* @var \Vanilla\Addon $addon */ $addonInfo = $addon->getInfo(); // Limit to designated social addons. if (!array_key_exists('socialConnect', $addonInfo)) { continue; } // See if addon is enabled. $isEnabled = Gdn::addonManager()->isEnabled($addonName, \Vanilla\Addon::TYPE_ADDON); setValue('enabled', $addonInfo, $isEnabled); if (!$isEnabled && !empty($addonInfo['hidden'])) { // Don't show hidden addons unless they are enabled. continue; } // See if we can detect whether connection is configured. $isConfigured = null; if ($isEnabled) { $pluginInstance = Gdn::pluginManager()->getPluginInstance($addonName, Gdn_PluginManager::ACCESS_PLUGINNAME); if (method_exists($pluginInstance, 'isConfigured')) { $isConfigured = $pluginInstance->isConfigured(); } } setValue('configured', $addonInfo, $isConfigured); // Add the connection. $connections[$addonName] = $addonInfo; } return $connections; } } ",0 " */ package diuf.sudoku.solver.rules; import java.util.*; import diuf.sudoku.*; import diuf.sudoku.solver.*; /** * Implementation of the Naked Single solving techniques. */ public class NakedSingle implements DirectHintProducer { /** * Check if a cell has only one potential value, and accumulate * corresponding hints */ public void getHints(Grid grid, HintsAccumulator accu) throws InterruptedException { Grid.Region[] parts = grid.getRegions(Grid.Row.class); // Iterate on parts for (Grid.Region part : parts) { // Iterate on cells for (int index = 0; index < 9; index++) { Cell cell = part.getCell(index); // Get the cell's potential values BitSet potentialValues = cell.getPotentialValues(); if (potentialValues.cardinality() == 1) { // One potential value -> solution found int uniqueValue = potentialValues.nextSetBit(0); accu.add(new NakedSingleHint(this, null, cell, uniqueValue)); } } } } @Override public String toString() { return ""Naked Singles""; } } ",0 "okia.com> * Original author: Sakari Ailus * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA */ #include #include #include #include #include #include /* when accessing, remember to lock with spin_lock(&pndevs.lock); */ struct phonet_device_list pndevs = { .list = LIST_HEAD_INIT(pndevs.list), .lock = __SPIN_LOCK_UNLOCKED(pndevs.lock), }; /* Allocate new Phonet device. */ static struct phonet_device *__phonet_device_alloc(struct net_device *dev) { struct phonet_device *pnd = kmalloc(sizeof(*pnd), GFP_ATOMIC); if (pnd == NULL) return NULL; pnd->netdev = dev; bitmap_zero(pnd->addrs, 64); list_add(&pnd->list, &pndevs.list); return pnd; } static struct phonet_device *__phonet_get(struct net_device *dev) { struct phonet_device *pnd; list_for_each_entry(pnd, &pndevs.list, list) { if (pnd->netdev == dev) return pnd; } return NULL; } static void __phonet_device_free(struct phonet_device *pnd) { list_del(&pnd->list); kfree(pnd); } struct net_device *phonet_device_get(struct net *net) { struct phonet_device *pnd; struct net_device *dev; spin_lock_bh(&pndevs.lock); list_for_each_entry(pnd, &pndevs.list, list) { dev = pnd->netdev; BUG_ON(!dev); if (net_eq(dev_net(dev), net) && (dev->reg_state == NETREG_REGISTERED) && ((pnd->netdev->flags & IFF_UP)) == IFF_UP) break; dev = NULL; } if (dev) dev_hold(dev); spin_unlock_bh(&pndevs.lock); return dev; } int phonet_address_add(struct net_device *dev, u8 addr) { struct phonet_device *pnd; int err = 0; spin_lock_bh(&pndevs.lock); /* Find or create Phonet-specific device data */ pnd = __phonet_get(dev); if (pnd == NULL) pnd = __phonet_device_alloc(dev); if (unlikely(pnd == NULL)) err = -ENOMEM; else if (test_and_set_bit(addr >> 2, pnd->addrs)) err = -EEXIST; spin_unlock_bh(&pndevs.lock); return err; } int phonet_address_del(struct net_device *dev, u8 addr) { struct phonet_device *pnd; int err = 0; spin_lock_bh(&pndevs.lock); pnd = __phonet_get(dev); if (!pnd || !test_and_clear_bit(addr >> 2, pnd->addrs)) err = -EADDRNOTAVAIL; else if (bitmap_empty(pnd->addrs, 64)) __phonet_device_free(pnd); spin_unlock_bh(&pndevs.lock); return err; } /* Gets a source address toward a destination, through a interface. */ u8 phonet_address_get(struct net_device *dev, u8 addr) { struct phonet_device *pnd; spin_lock_bh(&pndevs.lock); pnd = __phonet_get(dev); if (pnd) { BUG_ON(bitmap_empty(pnd->addrs, 64)); /* Use same source address as destination, if possible */ if (!test_bit(addr >> 2, pnd->addrs)) addr = find_first_bit(pnd->addrs, 64) << 2; } else addr = PN_NO_ADDR; spin_unlock_bh(&pndevs.lock); return addr; } int phonet_address_lookup(struct net *net, u8 addr) { struct phonet_device *pnd; spin_lock_bh(&pndevs.lock); list_for_each_entry(pnd, &pndevs.list, list) { if (!net_eq(dev_net(pnd->netdev), net)) continue; /* Don't allow unregistering devices! */ if ((pnd->netdev->reg_state != NETREG_REGISTERED) || ((pnd->netdev->flags & IFF_UP)) != IFF_UP) continue; if (test_bit(addr >> 2, pnd->addrs)) { spin_unlock_bh(&pndevs.lock); return 0; } } spin_unlock_bh(&pndevs.lock); return -EADDRNOTAVAIL; } /* notify Phonet of device events */ static int phonet_device_notify(struct notifier_block *me, unsigned long what, void *arg) { struct net_device *dev = arg; if (what == NETDEV_UNREGISTER) { struct phonet_device *pnd; /* Destroy phonet-specific device data */ spin_lock_bh(&pndevs.lock); pnd = __phonet_get(dev); if (pnd) __phonet_device_free(pnd); spin_unlock_bh(&pndevs.lock); } return 0; } static struct notifier_block phonet_device_notifier = { .notifier_call = phonet_device_notify, .priority = 0, }; /* Initialize Phonet devices list */ void phonet_device_init(void) { register_netdevice_notifier(&phonet_device_notifier); } void phonet_device_exit(void) { struct phonet_device *pnd, *n; rtnl_unregister_all(PF_PHONET); rtnl_lock(); spin_lock_bh(&pndevs.lock); list_for_each_entry_safe(pnd, n, &pndevs.list, list) __phonet_device_free(pnd); spin_unlock_bh(&pndevs.lock); rtnl_unlock(); unregister_netdevice_notifier(&phonet_device_notifier); } ",0 "on; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.BeanDefinitionRegistry; /** * BeanFactoryPostProcessor to remove 2 quartz beans responsible for reloading the default services registry's registered services. *

* Useful in cases where other facilities are responsible for reloading in-memory services cache, for example on-demand reloading * of JSON services registry, etc. *

* This bean just needs to be declared in CAS' application context and upon bootstrap Spring will call back into it and * 2 scheduling quartz beans dedicated for services registry reloading thread will be removed from the final application context * effectively disabling the default reloading behavior. * * @author Dmitriy Kopylenko * @author Unicon, inc. * @since 1.8 */ public class RegisteredServicesReloadDisablingBeanFactoryPostProcessor implements BeanFactoryPostProcessor { private static final String JOB_DETAIL_BEAN_NAME = ""serviceRegistryReloaderJobDetail""; private static final String JOB_TRIGGER_BEAN_NAME = ""periodicServiceRegistryReloaderTrigger""; private static final Logger logger = LoggerFactory.getLogger(RegisteredServicesReloadDisablingBeanFactoryPostProcessor.class); public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { logger.debug(""Removing [{}] bean definition from the application context..."", JOB_DETAIL_BEAN_NAME); BeanDefinitionRegistry.class.cast(beanFactory).removeBeanDefinition(JOB_DETAIL_BEAN_NAME); logger.debug(""Removing [{}] bean definition from the application context..."", JOB_TRIGGER_BEAN_NAME); BeanDefinitionRegistry.class.cast(beanFactory).removeBeanDefinition(JOB_TRIGGER_BEAN_NAME); } } ",0 """id"" [theme]=""theme"" cdk-overlay-origin #origin=""cdkOverlayOrigin"" > {{ label }}

{{ displayFormatter(chip) }}
",0 "ax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.commons.lang3.StringUtils; @WebServlet(""/login"") public class LoginController extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { RequestDispatcher rd = this.getServletContext().getRequestDispatcher(""/WEB-INF/views/login/login.jsp""); rd.forward(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String email = req.getParameter(""email""); String password = req.getParameter(""password""); if (StringUtils.isBlank(email) || StringUtils.isBlank(password)) { resp.sendError(400, ""Non non non ! Zone interdite""); } else if ( StringUtils.equals(email, ""admin@pizzeria.fr"") && StringUtils.equals(password, ""admin"")) { HttpSession session = req.getSession(); session.setAttribute(""email"", email); resp.sendRedirect(req.getContextPath() + ""/pizzas/list""); } else { resp.setStatus(403); req.setAttribute(""msgerr"", ""Ooppps noooo""); RequestDispatcher rd = this.getServletContext().getRequestDispatcher(""/WEB-INF/views/login/login.jsp""); rd.forward(req, resp); } } } ",0 "PACKPLUGIN) # define PACKPLUGIN_EXPORT Q_DECL_EXPORT #else # define PACKPLUGIN_EXPORT Q_DECL_IMPORT #endif namespace Studio { struct PackerState { uint32_t id; QString name; QString type; unique_document document; uint32_t index; std::string buildpath; virtual uint32_t add_dependant(Studio::Document *document, QString type) = 0; virtual uint32_t add_dependant(Studio::Document *document, uint32_t index, QString type) = 0; }; //-------------------------- PackManager ------------------------------------ //--------------------------------------------------------------------------- class PACKPLUGIN_EXPORT PackManager : public QObject { Q_OBJECT public: virtual void register_packer(QString const &type, QObject *packer) = 0; protected: virtual ~PackManager() { } }; } ",0 "language_attributes(); ?>> > "" /> <?php wp_title( '|', true, 'right' ); ?> "" /> id=""wrapper"">
'nav', 'theme_location'=>'main-navigation' ) ); ?>
"" alt="""" />
"" alt="""" />
",0 "once PATH_THIRD.'coinbase_api/config.php'; /** * Coinbase API Update Class * * @package Coinbase * @author Dom Tancredi * @copyright Copyright (c) 2013 Dom & Tom, Inc */ class Coinbase_api_upd { var $version = COINBASE_API_VER; /** * Constructor */ function __construct() { $this->EE =& get_instance(); $this->EE->load->dbforge(); } // -------------------------------------------------------------------- /** * Install */ function install() { $this->EE->db->insert('modules', array( 'module_name' => COINBASE_API_MODULE_NAME, 'module_version' => COINBASE_API_VER, 'has_cp_backend' => 'y', 'has_publish_fields' => 'n' )); $fields = array( 'config_id' => array('type' => 'INT', 'constraint' => 5, 'unsigned' => TRUE, 'auto_increment' => TRUE), 'api_key' => array('type' => 'varchar', 'constraint' => '255', 'null' => TRUE, 'default' => NULL), 'price_currency_iso' => array('type' => 'varchar', 'constraint' => '16','null' => TRUE, 'default' => COINBASE_API_PRICE_CURRENCY_ISO) ); $this->EE->dbforge->add_field($fields); $this->EE->dbforge->add_key('config_id', TRUE); $this->EE->dbforge->create_table('coinbase_api_config'); $data = array( 'api_key' => '', 'price_currency_iso' => COINBASE_API_PRICE_CURRENCY_ISO ); $this->EE->db->insert('coinbase_api_config', $data); return TRUE; } /** * Uninstall */ function uninstall() { $this->EE->db->where('module_name', COINBASE_API_MODULE_NAME)->delete('modules'); $this->EE->dbforge->drop_table('coinbase_api_config'); return TRUE; } /** * Update */ function update($current = '') { return FALSE; } } ",0 "edistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ extern int shlib_1_func (void); int main () { /* We need a reference to shlib_1_func to make sure its shlib is not discarded from the link. This happens on windows. */ int x = shlib_1_func (); return 0; } ",0 " may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * https://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. */ package io.netty.channel.unix; import io.netty.util.internal.ClassInitializerUtil; import io.netty.util.internal.UnstableApi; import java.io.IOException; import java.net.InetSocketAddress; import java.net.PortUnreachableException; import java.nio.channels.ClosedChannelException; import java.util.concurrent.atomic.AtomicBoolean; /** * Tells if {@code netty-transport-native-unix} is * supported. */ public final class Unix { private static final AtomicBoolean registered = new AtomicBoolean(); static { // Preload all classes that will be used in the OnLoad(...) function of JNI to eliminate the possiblity of a // class-loader deadlock. This is a workaround for https://github.com/netty/netty/issues/11209. // This needs to match all the classes that are loaded via NETTY_JNI_UTIL_LOAD_CLASS or looked up via // NETTY_JNI_UTIL_FIND_CLASS. ClassInitializerUtil.tryLoadClasses(Unix.class, // netty_unix_errors OutOfMemoryError.class, RuntimeException.class, ClosedChannelException.class, IOException.class, PortUnreachableException.class, // netty_unix_socket DatagramSocketAddress.class, InetSocketAddress.class ); } /** * Internal method... Should never be called from the user. * * @param registerTask */ @UnstableApi public static void registerInternal(Runnable registerTask) { if (registered.compareAndSet(false, true)) { registerTask.run(); Socket.initialize(); } } /** * Returns {@code true} if and only if the {@code * netty_transport_native_unix} is available. */ @Deprecated public static boolean isAvailable() { return false; } /** * Ensure that {@code netty_transport_native_unix} is * available. * * @throws UnsatisfiedLinkError if unavailable */ @Deprecated public static void ensureAvailability() { throw new UnsupportedOperationException(); } /** * Returns the cause of unavailability of * {@code netty_transport_native_unix}. * * @return the cause if unavailable. {@code null} if available. */ @Deprecated public static Throwable unavailabilityCause() { return new UnsupportedOperationException(); } private Unix() { } } ",0 " import java.nio.ByteOrder; import java.nio.FloatBuffer; import java.util.ArrayList; import java.util.HashMap; import java.util.SortedMap; import java.util.SortedSet; import java.util.TreeMap; import org.apache.http.util.ByteArrayBuffer; import org.json.JSONException; import org.teleal.common.util.ByteArray; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; public class GNetworkClientReceiver extends Thread { private Handler mHandler; private DataInputStream networkReader; private boolean isThreadRun = true; private int messageCounter = 0; protected byte[] recvByte = null; ArrayList particleList = new ArrayList(); private int startFrameID = 0; private int currentFrameID = 0; private int clientID = 0; private TreeMap receiver_stamps = new TreeMap(); private ArrayList reciver_time_list = new ArrayList(); private int duplicated_client_id; private HashMap latencyRecords = new HashMap(); private long totalLatency = 0; public GNetworkClientReceiver(DataInputStream dataInputStream, Handler mHandler) { this.networkReader = dataInputStream; this.mHandler = mHandler; } public TreeMap getReceiverStamps(){ return this.receiver_stamps; } public ArrayList getReceivedTimeList(){ return this.reciver_time_list; } public int getDuplicatedAcc(){ return this.duplicated_client_id; } @Override public void run() { while(isThreadRun == false){ try { Thread.sleep(1); } catch (InterruptedException e) { } } // Recv initial simulation information try { int containerWidth = networkReader.readInt(); int containerHeight = networkReader.readInt(); Log.d(""krha"", ""container size : "" + containerWidth + "", "" + containerHeight); VisualizationStaticInfo.containerWidth = containerWidth; VisualizationStaticInfo.containerHeight = containerHeight; } catch (IOException e1) { e1.printStackTrace(); } long startTime = System.currentTimeMillis(); while(isThreadRun == true){ int recvSize = 0; try { recvSize = this.receiveMsg(networkReader); long currentTime = System.currentTimeMillis(); long duration = currentTime - startTime; long latency = currentTime - this.getSentTime(this.clientID); if(latency > 0) totalLatency += latency; int totalFrameNumber = this.getLastFrameID()-this.startFrameID; if(totalFrameNumber > 0 && latency > 0){ String message = ""FPS: "" + this.roundDigit(1000.0*totalFrameNumber/duration) + "", ACC: "" + this.roundDigit(1000.0*this.clientID/duration) + "", Latency: "" + this.roundDigit(1.0*totalLatency/totalFrameNumber) + "" / "" + latency; this.notifyStatus(GNetworkClient.PROGRESS_MESSAGE, message, recvByte); } } catch (IOException e) { Log.e(""krha"", e.toString()); // this.notifyStatus(GNetworkClient.NETWORK_ERROR, e.toString(), null); break; } } } private int receiveMsg(DataInputStream reader) throws IOException { this.clientID = reader.readInt(); this.currentFrameID = reader.readInt(); int retLength = reader.readInt(); if(this.startFrameID == 0) this.startFrameID = this.currentFrameID; if(recvByte == null || recvByte.length < retLength){ recvByte = new byte[retLength]; } int readSize = 0; while(readSize < retLength){ int ret = reader.read(this.recvByte, readSize, retLength-readSize); if(ret <= 0){ break; } readSize += ret; } long currentTime = System.currentTimeMillis(); if(this.receiver_stamps.get(this.clientID) == null){ this.receiver_stamps.put(this.clientID, currentTime); // Log.d(""krha"", ""Save Client ID : "" + this.clientID); }else{ duplicated_client_id++; } this.reciver_time_list.add(currentTime); return readSize; } private void notifyStatus(int command, String string, byte[] recvData) { // Copy data with endian switching ByteBuffer buf = ByteBuffer.allocate(recvData.length); buf.order(ByteOrder.LITTLE_ENDIAN); buf.put(recvData); buf.flip(); buf.compact(); Message msg = Message.obtain(); msg.what = command; msg.obj = buf; Bundle data = new Bundle(); data.putString(""message"", string); msg.setData(data); this.mHandler.sendMessage(msg); } public void close() { this.isThreadRun = false; try { if(this.networkReader != null) this.networkReader.close(); } catch (IOException e) { Log.e(""krha"", e.toString()); } } public int getLastFrameID() { return this.currentFrameID; } public void recordSentTime(int accIndex, long currentTimeMillis) { this.latencyRecords.put(accIndex, System.currentTimeMillis()); } public long getSentTime(int accID){ if(this.latencyRecords.containsKey(accID) == false){ return Long.MAX_VALUE; }else{ long sentTime = this.latencyRecords.remove(accID); return sentTime; } } public static String roundDigit(double paramFloat) { return String.format(""%.2f"", paramFloat); } } ",0 "URCE CODE ...... *************** //***...................................................*** //*** https://github.com/AAChartModel/AAChartKit *** //*** https://github.com/AAChartModel/AAChartKit-Swift *** //***...................................................*** //*************** ...... SOURCE CODE ...... *************** /* * ------------------------------------------------------------------------------- * * 🌕 🌖 🌗 🌘 ❀❀❀ WARM TIPS!!! ❀❀❀ 🌑 🌒 🌓 🌔 * * Please contact me on GitHub,if there are any problems encountered in use. * GitHub Issues : https://github.com/AAChartModel/AAChartKit/issues * ------------------------------------------------------------------------------- * And if you want to contribute for this project, please contact me as well * GitHub : https://github.com/AAChartModel * StackOverflow : https://stackoverflow.com/users/12302132/codeforu * JianShu : https://www.jianshu.com/u/f1e6753d4254 * SegmentFault : https://segmentfault.com/u/huanghunbieguan * * ------------------------------------------------------------------------------- */ #import @class AADataLabels; @interface AAAreaspline : NSObject AAPropStatementAndPropSetFuncStatement(strong, AAAreaspline, AADataLabels *, dataLabels) @end ",0 "lelcylindricalpointprojector.h"" * \brief Class for point projection/unprojection based on a parallel cylindrical camera mdel. * * This class extends the PointProjector class in order to provide point * projection/unprojection based on a parallel cylindrical camera model. */ class ParallelCylindricalPointProjector : virtual public PointProjector { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW; /** * Empty constructor. * This constructor creates a PinholePointProjector object with default values for all its * attributes. The camera matrix has to be set. */ ParallelCylindricalPointProjector(); /** * Destructor. */ virtual ~ParallelCylindricalPointProjector() {} /** * This method returns the horizontal field of view set to the parallel cylindrical point projector. * @return the horizontal field of view set to the parallel cylindrical point projector. * @see setHorizontalFov() */ inline float horizontalFov() const { return _horizontalFov; } /** * This method set the horizontal field of view to the one given in input. * @param horizontalFov_ is a float value used to update the angular field of view. * @see horizontalFov() */ inline void setHorizontalFov(float horizontalFov_) { _horizontalFov = horizontalFov_; _updateParameters(); } /** * This method returns the height set to the parallel cylindrical point projector. * @return the height set to the parallel cylindrical point projector. * @see setHeight() */ inline float height() const { return _height; } /** * This method set the height to the one given in input. * @param verticalFov_ is a float value used to update the height. * @see height() */ inline void setHeight(float height_) { _height = height_; _updateParameters(); } /** * This method returns the vertical center set to the parallel cylindrical point projector. * @return the vertical center set to the parallel cylindrical point projector. * @see setVerticalCenter() */ inline float verticalCenter() const { return _verticalCenter; } /** * This method set the vertical center to the one given in input. * @param verticalCenter_ is a float value used to update the verticalCenter. * @see verticalCenter() */ inline void setVerticalCenter(float verticalCenter_) { _verticalCenter = verticalCenter_; _updateParameters(); } /** * Virtual method that set the size (rows and columns) of the image where the points are projected. * @param imageRows_ is a constant int value used to update the number of rows. * @param imageCols_ is a constant int value used to update the number of columns. * @see imageRows() * @see imageCols() */ virtual inline void setImageSize(const int imageRows_, const int imageCols_) { _imageRows = imageRows_; _imageCols = imageCols_; _updateParameters(); } /** * Virtual method that set the pose transform to the one given in input. * @param transform_ is a constant reference to the isometry used to update the pose transform. * @see transform() */ virtual inline void setTransform(const Eigen::Isometry3f &transform_) { _transform = transform_; _transform.matrix().row(3) << 0.0f, 0.0f, 0.0f, 1.0f; _updateParameters(); } /** * Virtual method that projects a given set of homogeneous points from the 3D euclidean space to * the parallel cylindrical image space space. This method stores the result * in two images given in input. The projected points that falls out of the image or that are * behind other points are not stored in the images. * @param indexImage is an output parameter which is a reference to an image containing indices. * Each element of this matrix contains the index of the corresponding point in the vector of points given * in input. * @param depthImage is an output parameter which is a reference to an image containing the depth values * of the projected points in meters. * @param points is the input parameter which is a constant reference to a vector containing the set * of homogeneous points to project. * @see unProject() * @see projectIntervals() */ virtual void project(IntImage &indexImage, DepthImage &depthImage, const PointVector& points); /** * Virtual method that unprojects to the 3D euclidean space the points contained in a parallel cylindrical depth image * This method stores the unprojected points in a vector of points and generates * the associated index image. * @param points is an output parameter which is a reference to a vector containing the set * of homogeneous points to unproject to the 3D euclidean space. * @param indexImage is an output parameter which is a reference to an image containing indices. * Each element of this matrix contains the index of the corresponding point in the computed vector of points. * @param depthImage is an output parameter which is a constant reference to an image containing the depth values * in meters. * @see project() * @see projectIntervals() */ virtual void unProject(PointVector &points, IntImage &indexImage, const DepthImage &depthImage) const; /** * Virtual method that unprojects to the 3D euclidean space the points contained in a parallel cylindrical depth image * This method stores the unprojected points in a vector of points and generates * the associated index image. It also compute a vector of gaussians reprensenting the intrinsic error * of the sensor used to acquire the input depth image. * @param points is an output parameter which is a reference to a vector containing the set * of homogeneous points to unproject to the 3D euclidean space. * @param gaussians is an output parameter which is a reference to a vector containing the set * of gaussians representing the intrinsic error of the sensor used to acquire the input depth image. * @param indexImage is an output parameter which is a reference to an image containing indices. * Each element of this matrix contains the index of the corresponding point in the computed vector of points. * @param depthImage is an output parameter which is a constant reference to an image containing the depth values * in meters. * @see project() * @see projectIntervals() */ virtual void unProject(PointVector &points, Gaussian3fVector &gaussians, IntImage &indexImage, const DepthImage &depthImage) const; /** * Virtual method that projects on the output image the size in pixels of a square regions * around the respective point in the input parallel cylindrical depth image. * @param intervalImage is the output parameter which is a reference to an image containing the size of the square * regions around the point in the depth image given in input. * @param depthImage is an input parameter which is a constant reference to an image containing depth values in meters. * @param worldRadius is an input parameter containing a float representing the radius of a sphere in the 3D euclidean * space used to determine the size of the square regions. * @see project() * @see projectInterval() */ virtual void projectIntervals(IntervalImage &intervalImage, const DepthImage &depthImage, const float worldRadius) const; /** * Virtual method that projects a given point from the 3D euclidean space to * the parallel cylindrical image space. This method stores the result * in three output parameters representing the image coordinates (row and column) and a depth value. * @param x is an output int value that will contain the raw coordinate of the projected input point in the depth image. * @param y is an output int value that will contain the column coordinate of the projected input point in the depth image. * @param f is an output parameter which is a reference to a float that will contain the depth values of the projected input point. * @param p is the input parameter which is a constant reference to an homogeneous point to project. * @return true if the projection is valid, false otherwise. * @see project() */ virtual inline bool project(int &x, int &y, float &f, const Point &p) const { return _project(x, y, f, p); } /** * Virtual method that unprojects to the 3D euclidean space the parallel cylindrical point given in input. * This method stores the unprojected point in an output parameter as an homogeneous * point in the 3D euclidean space. * @param p is the output parameter which is a reference to a the unprojected homogenous point to the 3D euclidean space. * @param x is an input parameter representing the row coordinate of the input depth point. * @param y is an input parameter representing the column coordinate of the input depth point. * @param d is an input value containing the depth value of the depth point. * @return true if the unprojection is valid, false otherwise. * @see unProject() */ virtual inline bool unProject(Point &p, const int x, const int y, const float d) const { return _unProject(p, x, y, d); } /** * Virtual method that projects the size in pixels of a square regions around the point specified by the * the input values. * @param x is an input int value representing the raw of the input point in the depth image. * @param y is an input int value representing the column of the input point in the depth image. * @param d is an input value containing the depth value of the input point. * @param worldRadius is an input parameter containing a float representing the radius of a sphere in the 3D euclidean * space used to determine the size of the square regions. * @return an int value representing the size in pixels of the square region around the input point. * @see projectIntervals() */ virtual inline cv::Vec2i projectInterval(const int x, const int y, const float d, const float worldRadius) const { return _projectInterval(x, y, d, worldRadius); } /** * This method is called when is necessary to update the internal parameters used * for point projection/unprojection. */ void _updateParameters(); /** * Method that updates the projector structures in order to handle different size of the * image where the point are projected. If scalingFactor is greater than 1.0 the image will be bigger * (for example in case it's 2.0 the size of the image will be 2 times the size of the original one). * If scalingFactor is lesser than 1.0 the image will be smaller (for example in case it's 0.5 the size * of the image will be half the size of the original one). * @param scalingFactor is a float value used to update the projector structures. */ virtual void scale(float scalingFactor); protected: /** * Internal method that projects a given point from the 3D euclidean space to * the parallel cylindrical image space. This method stores the result * in three output parameters representing the image coordinates (row and column) and a depth value. * @param x is an output int value that will contain the raw coordinate of the projected input point in the depth image. * @param y is an output int value that will contain the column coordinate of the projected input point in the depth image. * @param d is an output parameter which is a reference to a float that will contain the depth values of the projected input point. * @param p is the input parameter which is a constant reference to an homogeneous point to project. * @return true if the projection is valid, false otherwise. * @see project() */ inline bool _project(int &x, int &y, float &d, const Point &p) const { // Point in camera coordinates; Eigen::Vector4f cp = _iT * p; float theta = atan2(cp.x(), cp.z()); d = sqrt(cp.x() * cp.x() + cp.z() * cp.z()); if(d > _maxDistance || d < _minDistance) { return false; } if(fabs(theta > _horizontalFov)) { return false; } if(fabs(cp.y()) > _height) { return false; } x = (int)(_horizontalResolution * theta + _horizontalCenter); y = (int)(_verticalResolution * cp.y() + _verticalCenter); return true; } /** * Internal method that unprojects to the 3D euclidean space the parallel cylindrical point given in input. * This method stores the unprojected point in an output parameter as an homogeneous * point in the 3D euclidean space. * @param p is the output parameter which is a reference to a the unprojected homogenous point to the 3D euclidean space. * @param x_ is an input parameter representing the row coordinate of the input depth point. * @param y_ is an input parameter representing the column coordinate of the input depth point. * @param d is an input value containing the depth value of the depth point. * @return true if the unprojection is valid, false otherwise. * @see unProject() */ inline bool _unProject(Point &p, const int x_, const int y_, const float d) const { float theta = _inverseHorizontalResolution * (x_ - _horizontalCenter); if(d < _minDistance || d > _maxDistance) {return false; } if(fabs(theta) > _horizontalFov) { return false; } float x = sin(theta) * d; float z = cos(theta) * d; float y = (y_ - _verticalCenter) * _inverseVerticalResolution; p = _transform * Eigen::Vector3f(x, y, z); return true; } /** * Internal method that projects the size in pixels of a square regions around the point specified by the * the input values. * @param x_ is an input int value representing the raw of the input point in the depth image. * @param y_ is an input int value representing the column of the input point in the depth image. * @param d is an input value containing the depth value of the input point. * @param worldRadius is an input parameter containing a float representing the radius of a sphere in the 3D euclidean * space used to determine the size of the square regions. * @return an int value representing the size in pixels of the square region around the input point. * @see projectIntervals() */ inline cv::Vec2i _projectInterval(const int x_, const int y_, const float d, const float worldRadius) const { // Just to avoid compilation warnings if(x_ || y_) {} // Point in camera coordinates; if(d > _maxDistance || d < _minDistance) return cv::Vec2i(-1, -1); Eigen::Vector4f cp = Eigen::Vector4f(worldRadius, worldRadius, d, 1.0f); float theta = atan2(cp.x(), cp.z()); int x = (int)(_horizontalResolution * theta); int y = (int)(_verticalResolution * worldRadius); return cv::Vec2i(x, y); } float _horizontalFov; /**< Half horizontal field of view in radians. */ float _horizontalCenter; /**< Horizontal center which is equal to the horizontal resolution times the horizontal field of view. */ float _height; /**< Half height in meters. */ float _verticalCenter; /**< Vertical center which is equal to the half of the rows of the depth image where the projector projects the points. */ float _horizontalResolution; /**< Horizontal resolution indicating how many degrees there are between two columns of the depth image where the projector projects the points. */ float _inverseHorizontalResolution; /**< Inverse of the horizontal resolution. */ float _verticalResolution; /**< Vertical resolution indicating how many degrees there are between two columns of the depth image where the projector projects the points. */ float _inverseVerticalResolution; /**< Inverse of the vertical resolution. */ Eigen::Isometry3f _iT; /**< Inverse of the homogeneous transformation of the projector. */ }; } ",0 "ider yii\data\ActiveDataProvider */ $this->title = 'Управление пользователями'; $this->params['breadcrumbs'][] = $this->title; ?>

title) ?>

render('_search', ['model' => $searchModel]); ?>
$dataProvider, 'filterModel' => $searchModel, 'showHeader' => false, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'username', 'fio', ['class' => 'yii\grid\ActionColumn', 'headerOptions' => ['width' => '80'], 'template' => '{update} - {view}', ], ], ]); ?>

'btn btn-success']) ?>

",0 " * * * * Copyright (c) 2001-2019 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ /** * Gestion d'affichage de la page de réparation de la base de données * * ## REMARQUE IMPORTANTE : SÉCURITÉ * * Ce systeme de réparation doit pouvoir fonctionner même si * la table spip_auteurs est en panne : index.php n'appelle donc pas * inc_auth ; seule l'authentification FTP est exigée. * * @package SPIP\Core\Exec */ if (!defined('_ECRIRE_INC_VERSION')) { return; } /** * Réparer la base de données */ function exec_base_repair_dist() { $ok = false; if (!spip_connect()) { $message = _T('titre_probleme_technique'); } else { $version_sql = sql_version(); if (!$version_sql) { $message = _T('avis_erreur_connexion_mysql'); } else { $message = _T('texte_requetes_echouent'); $ok = true; } $action = _T('texte_tenter_reparation'); } if ($ok) { $admin = charger_fonction('admin', 'inc'); echo $admin('repair', $action, $message, true); } else { include_spip('inc/minipres'); echo minipres(_T('titre_reparation'), ""

$message

""); } } ",0 " AIP E-Science (www.aip.de) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ class Data_Model_Databases extends Daiquiri_Model_Table { /** * Constructor. Sets resource object. */ public function __construct() { $this->setResource('Data_Model_Resource_Databases'); } /** * Returns all database entries. * @return array $response */ public function index() { $databases = array(); foreach($this->getResource()->fetchRows() as $row) { $database = $this->getResource()->fetchRow($row['id'], true, true); $database['publication_role'] = Daiquiri_Auth::getInstance()->getRole($database['publication_role_id']); $database['value'] = '/data/databases/show/id/' . $database['id']; foreach ($database['tables'] as $tableKey => $table) { $database['tables'][$tableKey]['publication_role'] = Daiquiri_Auth::getInstance()->getRole($table['publication_role_id']); $database['tables'][$tableKey]['value'] = '/data/tables/show/id/' . $table['id']; foreach ($table['columns'] as $columnKey => $column) { $database['tables'][$tableKey]['columns'][$columnKey]['value'] = '/data/columns/show/id/' . $column['id']; } } $databases[] = $database; } return array('databases' => $databases, 'status' => 'ok'); } /** * Creates database entry. * @param array $formParams * @return array $response */ public function create(array $formParams = array()) { // create the form object $roles = array_merge(array(0 => 'not published'), Daiquiri_Auth::getInstance()->getRoles()); $form = new Data_Form_Databases(array( 'roles' => $roles, 'submit' => 'Create database entry' )); // valiadate the form if POST if (!empty($formParams)) { if ($form->isValid($formParams)) { // get the form values $values = $form->getValues(); // check if entry is already there if ($this->getResource()->fetchRowByName($values['name']) !== false) { return $this->getModelHelper('CRUD')->validationErrorResponse($form,'Database entry already exists.'); } // check if the order needs to be set to NULL if ($values['order'] === '') { $values['order'] = NULL; } // store the values in the database try { $this->getResource()->insertRow($values); } catch (Exception $e) { return $this->getModelHelper('CRUD')->validationErrorResponse($form, $e->getMessage()); } return array('status' => 'ok'); } else { return $this->getModelHelper('CRUD')->validationErrorResponse($form); } } return array('form' => $form, 'status' => 'form'); } /** * Returns a database entry. * @param mixed $input int id or array with ""db"" key * @param bool $tables fetch table information * @param bool $columns fetch colums information * @return array $response */ public function show($input, $tables = false, $columns = false) { if (is_int($input)) { $row = $this->getResource()->fetchRow($input, $tables, $columns); } elseif (is_array($input)) { if (empty($input['db'])) { throw new Exception('Either int id or array with ""db"" key must be provided as $input'); } $row = $this->getResource()->fetchRowByName($input['db'], $tables, $columns); } else { throw new Exception('$input has wrong type.'); } if (empty($row)) { throw new Daiquiri_Exception_NotFound(); } $row['publication_role'] = Daiquiri_Auth::getInstance()->getRole($row['publication_role_id']); return array('status' => 'ok','row' => $row); } /** * Updates a database entry. * @param mixed $input int id or array with ""db"" key * @return array $response */ public function update($input, array $formParams = array()) { if (is_int($input)) { $entry = $this->getResource()->fetchRow($input); } elseif (is_array($input)) { if (empty($input['db'])) { throw new Exception('Either int id or array with ""db"" key must be provided as $input'); } $entry = $this->getResource()->fetchRowByName($input['db']); } else { throw new Exception('$input has wrong type.'); } if (empty($entry)) { throw new Daiquiri_Exception_NotFound(); } // create the form object $roles = array_merge(array(0 => 'not published'), Daiquiri_Auth::getInstance()->getRoles()); $form = new Data_Form_Databases(array( 'entry' => $entry, 'roles' => $roles, 'submit' => 'Update database entry' )); // valiadate the form if POST if (!empty($formParams)) { if ($form->isValid($formParams)) { // get the form values $values = $form->getValues(); // check if the order needs to be set to NULL if ($values['order'] === '') { $values['order'] = NULL; } $this->getResource()->updateRow($entry['id'], $values); return array('status' => 'ok'); } else { return $this->getModelHelper('CRUD')->validationErrorResponse($form); } } return array('form' => $form, 'status' => 'form'); } /** * Deletes a database entry. * @param mixed $input int id or array with ""db"" key * @return array $response */ public function delete($input, array $formParams = array()) { if (is_int($input)) { $row = $this->getResource()->fetchRow($input); } elseif (is_array($input)) { if (empty($input['db'])) { throw new Exception('Either int id or array with ""db"" key must be provided as $input'); } $row = $this->getResource()->fetchRowByName($input['db']); } else { throw new Exception('$input has wrong type.'); } if (empty($row)) { throw new Daiquiri_Exception_NotFound(); } return $this->getModelHelper('CRUD')->delete($row['id'], $formParams); } /** * Returns all config databases for export. * @return array $response */ public function export() { $rows = array(); foreach($this->getResource()->fetchRows() as $dbRow) { $rows[] = array( 'name' => $dbRow['name'], 'order' => $dbRow['order'], 'description' => $dbRow['description'], 'publication_select' => $dbRow['publication_select'], 'publication_update' => $dbRow['publication_update'], 'publication_insert' => $dbRow['publication_insert'], 'publication_show' => $dbRow['publication_show'], 'publication_role' => Daiquiri_Auth::getInstance()->getRole($dbRow['publication_role_id']) ); } return array( 'data' => array('databases' => $rows), 'status' => 'ok' ); } } ",0 "ral Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. Jedi Academy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Jedi Academy. If not, see . */ // Copyright 2001-2013 Raven Software // client.h -- primary header for client #pragma once #ifndef __CLIENT_H__ #define __CLIENT_H__ #include ""../qcommon/q_shared.h"" #include ""../qcommon/qcommon.h"" #include ""../rd-common/tr_public.h"" #include ""keys.h"" #include ""snd_public.h"" #include ""../cgame/cg_public.h"" // snapshots are a view of the server at a given time typedef struct { qboolean valid; // cleared if delta parsing was invalid int snapFlags; // rate delayed and dropped commands int serverTime; // server time the message is valid for (in msec) int messageNum; // copied from netchan->incoming_sequence int deltaNum; // messageNum the delta is from int ping; // time from when cmdNum-1 was sent to time packet was reeceived byte areamask[MAX_MAP_AREA_BYTES]; // portalarea visibility bits int cmdNum; // the next cmdNum the server is expecting playerState_t ps; // complete information about the current player at this time int numEntities; // all of the entities that need to be presented int parseEntitiesNum; // at the time of this snapshot int serverCommandNum; // execute all commands up to this before // making the snapshot current } clSnapshot_t; /* ============================================================================= the clientActive_t structure is wiped completely at every new gamestate_t, potentially several times during an established connection ============================================================================= */ // the parseEntities array must be large enough to hold PACKET_BACKUP frames of // entities, so that when a delta compressed message arives from the server // it can be un-deltad from the original #define MAX_PARSE_ENTITIES 512 extern int g_console_field_width; typedef struct { int timeoutcount; clSnapshot_t frame; // latest received from server int serverTime; int oldServerTime; // to prevent time from flowing bakcwards int oldFrameServerTime; // to check tournament restarts int serverTimeDelta; // cl.serverTime = cls.realtime + cl.serverTimeDelta // this value changes as net lag varies qboolean extrapolatedSnapshot; // set if any cgame frame has been forced to extrapolate // cleared when CL_AdjustTimeDelta looks at it qboolean newSnapshots; // set on parse, cleared when CL_AdjustTimeDelta looks at it gameState_t gameState; // configstrings char mapname[MAX_QPATH]; // extracted from CS_SERVERINFO int parseEntitiesNum; // index (not anded off) into cl_parse_entities[] int mouseDx[2], mouseDy[2]; // added to by mouse events int mouseIndex; int joystickAxis[MAX_JOYSTICK_AXIS]; // set by joystick events int cgameUserCmdValue; // current weapon to add to usercmd_t float cgameSensitivity; // cmds[cmdNumber] is the predicted command, [cmdNumber-1] is the last // properly generated command usercmd_t cmds[CMD_BACKUP]; // each mesage will send several old cmds int cmdNumber; // incremented each frame, because multiple // frames may need to be packed into a single packet int packetTime[PACKET_BACKUP]; // cls.realtime sent, for calculating pings int packetCmdNumber[PACKET_BACKUP]; // cmdNumber when packet was sent // the client maintains its own idea of view angles, which are // sent to the server each frame. It is cleared to 0 upon entering each level. // the server sends a delta each frame which is added to the locally // tracked view angles to account for standing on rotating objects, // and teleport direction changes vec3_t viewangles; // these are just parsed out of the configstrings for convenience int serverId; // non-gameserver infornamtion int cinematictime; // cls.realtime for first cinematic frame (FIXME: NO LONGER USED!, but I wasn't sure if I could remove it because of struct sizes assumed elsewhere? -Ste) // big stuff at end of structure so most offsets are 15 bits or less clSnapshot_t frames[PACKET_BACKUP]; entityState_t parseEntities[MAX_PARSE_ENTITIES]; //DJC added - making force powers in single player work like those in //multiplayer. This makes hot swapping code more portable. qboolean gcmdSendValue; byte gcmdValue; } clientActive_t; extern clientActive_t cl; /* ============================================================================= the clientConnection_t structure is wiped when disconnecting from a server, either to go to a full screen console, or connect to a different server A connection can be to either a server through the network layer, or just a streaming cinematic. ============================================================================= */ typedef struct { int lastPacketSentTime; // for retransmits int lastPacketTime; char servername[MAX_OSPATH]; // name of server from original connect netadr_t serverAddress; int connectTime; // for connection retransmits int connectPacketCount; // for display on connection dialog int challenge; // from the server to use for connecting int reliableSequence; int reliableAcknowledge; char *reliableCommands[MAX_RELIABLE_COMMANDS]; // reliable messages received from server int serverCommandSequence; char *serverCommands[MAX_RELIABLE_COMMANDS]; // big stuff at end of structure so most offsets are 15 bits or less netchan_t netchan; } clientConnection_t; extern clientConnection_t clc; /* ================================================================== the clientStatic_t structure is never wiped, and is used even when no client connection is active at all ================================================================== */ typedef struct { connstate_t state; // connection status char servername[MAX_OSPATH]; // name of server from original connect (used by reconnect) // when the server clears the hunk, all of these must be restarted qboolean rendererStarted; qboolean soundStarted; qboolean soundRegistered; qboolean uiStarted; qboolean cgameStarted; int framecount; int frametime; // msec since last frame float frametimeFraction; // fraction of a msec since last frame int realtime; // ignores pause float realtimeFraction; // fraction of a msec accumulated int realFrametime; // ignoring pause, so console always works // update server info char updateInfoString[MAX_INFO_STRING]; // rendering info glconfig_t glconfig; qhandle_t charSetShader; qhandle_t whiteShader; qhandle_t consoleShader; } clientStatic_t; #define CON_TEXTSIZE 0x30000 //was 32768 #define NUM_CON_TIMES 4 typedef struct { qboolean initialized; short text[CON_TEXTSIZE]; int current; // line where next message will be printed int x; // offset in current line for next print int display; // bottom of console displays this line int linewidth; // characters across screen int totallines; // total lines in console scrollback float xadjust; // for wide aspect screens float yadjust; float displayFrac; // aproaches finalFrac at scr_conspeed float finalFrac; // 0.0 to 1.0 lines of console to display int vislines; // in scanlines int times[NUM_CON_TIMES]; // cls.realtime time the line was generated // for transparent notify lines vec4_t color; } console_t; extern clientStatic_t cls; //============================================================================= extern refexport_t re; // interface to refresh .dll // // cvars // extern cvar_t *cl_nodelta; extern cvar_t *cl_debugMove; extern cvar_t *cl_noprint; extern cvar_t *cl_timegraph; extern cvar_t *cl_packetdup; extern cvar_t *cl_shownet; extern cvar_t *cl_timeNudge; extern cvar_t *cl_showTimeDelta; extern cvar_t *cl_yawspeed; extern cvar_t *cl_pitchspeed; extern cvar_t *cl_run; extern cvar_t *cl_anglespeedkey; extern cvar_t *cl_sensitivity; extern cvar_t *cl_freelook; extern cvar_t *cl_mouseAccel; extern cvar_t *cl_showMouseRate; extern cvar_t *cl_inGameVideo; extern cvar_t *m_pitch; extern cvar_t *m_yaw; extern cvar_t *m_forward; extern cvar_t *m_side; extern cvar_t *m_filter; extern cvar_t *cl_activeAction; #ifndef _WIN32 extern cvar_t *cl_consoleKeys; #endif //================================================= // // cl_main // void CL_Init (void); void CL_AddReliableCommand( const char *cmd ); void CL_Disconnect_f (void); void CL_Vid_Restart_f( void ); void CL_Snd_Restart_f (void); qboolean CL_CheckPaused(void); // // cl_input // typedef struct { int down[2]; // key nums holding it down unsigned downtime; // msec timestamp unsigned msec; // msec down this frame if both a down and up happened qboolean active; // current state qboolean wasPressed; // set when down, not cleared when up } kbutton_t; extern kbutton_t in_mlook, in_klook; extern kbutton_t in_strafe; extern kbutton_t in_speed; void CL_InitInput (void); void CL_SendCmd (void); void CL_ClearState (void); void CL_ReadPackets (void); void CL_UpdateHotSwap(void); bool CL_ExtendSelectTime(void); void CL_WritePacket( void ); void IN_CenterView (void); float CL_KeyState (kbutton_t *key); const char *Key_KeynumToString( int keynum/*, qboolean bTranslate*/ ); //note: translate is only called for menu display not configs // // cl_parse.c // extern int cl_connectedToCheatServer; void CL_SystemInfoChanged( void ); void CL_ParseServerMessage( msg_t *msg ); //==================================================================== // // console // void Con_DrawCharacter (int cx, int line, int num); void Con_CheckResize (void); void Con_Init (void); void Con_Clear_f (void); void Con_ToggleConsole_f (void); void Con_DrawNotify (void); void Con_ClearNotify (void); void Con_RunConsole (void); void Con_DrawConsole (void); void Con_PageUp( void ); void Con_PageDown( void ); void Con_Top( void ); void Con_Bottom( void ); void Con_Close( void ); // // cl_scrn.c // void SCR_Init (void); void SCR_UpdateScreen (void); void SCR_DebugGraph (float value, int color); int SCR_GetBigStringWidth( const char *str ); // returns in virtual 640x480 coordinates void SCR_FillRect( float x, float y, float width, float height, const float *color ); void SCR_DrawPic( float x, float y, float width, float height, qhandle_t hShader ); void SCR_DrawNamedPic( float x, float y, float width, float height, const char *picname ); void SCR_DrawBigString( int x, int y, const char *s, float alpha, qboolean noColorEscape ); // draws a string with embedded color control characters with fade void SCR_DrawBigStringColor( int x, int y, const char *s, vec4_t color, qboolean noColorEscape ); // ignores embedded color control characters void SCR_DrawSmallStringExt( int x, int y, const char *string, float *setColor, qboolean forceColor, qboolean noColorEscape ); void SCR_DrawBigChar( int x, int y, int ch ); void SCR_DrawSmallChar( int x, int y, int ch ); // // cl_cin.c // void CL_PlayCinematic_f( void ); void CL_PlayInGameCinematic_f(void); qboolean CL_CheckPendingCinematic(void); qboolean CL_IsRunningInGameCinematic(void); qboolean CL_InGameCinematicOnStandBy(void); void SCR_DrawCinematic (void); void SCR_RunCinematic (void); void SCR_StopCinematic( qboolean bAllowRefusal = qfalse ); int CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits, const char *psAudioFile /* = NULL */); e_status CIN_StopCinematic(int handle); e_status CIN_RunCinematic (int handle); void CIN_DrawCinematic (int handle); void CIN_SetExtents (int handle, int x, int y, int w, int h); void CIN_SetLooping (int handle, qboolean loop); void CIN_UploadCinematic(int handle); void CIN_CloseAllVideos(void); // // cl_cgame.c // void CL_InitCGame( void ); void CL_ShutdownCGame( void ); qboolean CL_GameCommand( void ); void CL_CGameRendering( stereoFrame_t stereo ); void CL_SetCGameTime( void ); void CL_FirstSnapshot( void ); // // cl_ui.c // void CL_InitUI( void ); void CL_ShutdownUI( void ); void CL_GenericMenu_f(void); void CL_DataPad_f(void); void CL_EndScreenDissolve_f(void); int Key_GetCatcher( void ); void Key_SetCatcher( int catcher ); #endif //__CLIENT_H__ ",0 "e * 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. */ package gobblin.yarn; /** * A central place for configuration related constants of Gobblin on Yarn. * * @author Yinan Li */ public class GobblinYarnConfigurationKeys { public static final String GOBBLIN_YARN_PREFIX = ""gobblin.yarn.""; // General Gobblin Yarn application configuration properties. public static final String APPLICATION_NAME_KEY = GOBBLIN_YARN_PREFIX + ""app.name""; public static final String APP_QUEUE_KEY = GOBBLIN_YARN_PREFIX + ""app.queue""; public static final String APP_REPORT_INTERVAL_MINUTES_KEY = GOBBLIN_YARN_PREFIX + ""app.report.interval.minutes""; public static final String MAX_GET_APP_REPORT_FAILURES_KEY = GOBBLIN_YARN_PREFIX + ""max.get.app.report.failures""; public static final String EMAIL_NOTIFICATION_ON_SHUTDOWN_KEY = GOBBLIN_YARN_PREFIX + ""email.notification.on.shutdown""; // Gobblin Yarn ApplicationMaster configuration properties. public static final String APP_MASTER_MEMORY_MBS_KEY = GOBBLIN_YARN_PREFIX + ""app.master.memory.mbs""; public static final String APP_MASTER_CORES_KEY = GOBBLIN_YARN_PREFIX + ""app.master.cores""; public static final String APP_MASTER_JARS_KEY = GOBBLIN_YARN_PREFIX + ""app.master.jars""; public static final String APP_MASTER_FILES_LOCAL_KEY = GOBBLIN_YARN_PREFIX + ""app.master.files.local""; public static final String APP_MASTER_FILES_REMOTE_KEY = GOBBLIN_YARN_PREFIX + ""app.master.files.remote""; public static final String APP_MASTER_WORK_DIR_NAME = ""appmaster""; public static final String APP_MASTER_JVM_ARGS_KEY = GOBBLIN_YARN_PREFIX + ""app.master.jvm.args""; // Gobblin Yarn container configuration properties. public static final String INITIAL_CONTAINERS_KEY = GOBBLIN_YARN_PREFIX + ""initial.containers""; public static final String CONTAINER_MEMORY_MBS_KEY = GOBBLIN_YARN_PREFIX + ""container.memory.mbs""; public static final String CONTAINER_CORES_KEY = GOBBLIN_YARN_PREFIX + ""container.cores""; public static final String CONTAINER_JARS_KEY = GOBBLIN_YARN_PREFIX + ""container.jars""; public static final String CONTAINER_FILES_LOCAL_KEY = GOBBLIN_YARN_PREFIX + ""container.files.local""; public static final String CONTAINER_FILES_REMOTE_KEY = GOBBLIN_YARN_PREFIX + ""container.files.remote""; public static final String CONTAINER_WORK_DIR_NAME = ""container""; public static final String CONTAINER_JVM_ARGS_KEY = GOBBLIN_YARN_PREFIX + ""container.jvm.args""; public static final String CONTAINER_HOST_AFFINITY_ENABLED = GOBBLIN_YARN_PREFIX + ""container.affinity.enabled""; // Helix configuration properties. public static final String HELIX_INSTANCE_MAX_RETRIES = GOBBLIN_YARN_PREFIX + ""helix.instance.max.retries""; // Security and authentication configuration properties. public static final String KEYTAB_FILE_PATH = GOBBLIN_YARN_PREFIX + ""keytab.file.path""; public static final String KEYTAB_PRINCIPAL_NAME = GOBBLIN_YARN_PREFIX + ""keytab.principal.name""; public static final String TOKEN_FILE_NAME = "".token""; public static final String LOGIN_INTERVAL_IN_MINUTES = GOBBLIN_YARN_PREFIX + ""login.interval.minutes""; public static final String TOKEN_RENEW_INTERVAL_IN_MINUTES = GOBBLIN_YARN_PREFIX + ""token.renew.interval.minutes""; // Resource/dependencies configuration properties. public static final String LIB_JARS_DIR_KEY = GOBBLIN_YARN_PREFIX + ""lib.jars.dir""; public static final String LOGS_SINK_ROOT_DIR_KEY = GOBBLIN_YARN_PREFIX + ""logs.sink.root.dir""; public static final String LIB_JARS_DIR_NAME = ""_libjars""; public static final String APP_JARS_DIR_NAME = ""_appjars""; public static final String APP_FILES_DIR_NAME = ""_appfiles""; public static final String APP_LOGS_DIR_NAME = ""_applogs""; // Other misc configuration properties. public static final String LOG_COPIER_SCHEDULER = GOBBLIN_YARN_PREFIX + ""log.copier.scheduler""; public static final String LOG_COPIER_MAX_FILE_SIZE = GOBBLIN_YARN_PREFIX + ""log.copier.max.file.size""; public static final String GOBBLIN_YARN_LOG4J_CONFIGURATION_FILE = ""log4j-yarn.properties""; } ",0 "E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,CZ'; $this->A = explode(',', $this->Astr); $this->AT = array('A'=>0,'B'=>1,'C'=>2,'D'=>3,'E'=>4,'F'=>5,'G'=>6,'H'=>7,'I'=>8,'J'=>9,'K'=>10,'L'=>11,'M'=>12,'N'=>13,'O'=>14,'P'=>15,'Q'=>16,'R'=>17,'S'=>18,'T'=>19,'U'=>20,'V'=>21,'W'=>22,'X'=>23,'Y'=>24,'Z'=>25,'AA'=>26,'AB'=>27,'AC'=>28,'AD'=>29,'AE'=>30,'AF'=>31,'AG'=>32,'AH'=>33,'AI'=>34,'AJ'=>35,'AK'=>36,'AL'=>37,'AM'=>38,'AN'=>39,'AO'=>40,'AP'=>41,'AQ'=>42,'AR'=>43,'AS'=>44,'AT'=>45,'AU'=>46,'AV'=>47,'AW'=>48,'AX'=>49,'AY'=>50,'AZ'=>51,'BA'=>52,'BB'=>53,'BC'=>54,'BD'=>55,'BE'=>56,'BF'=>57,'BG'=>58,'BH'=>59,'BI'=>60,'BJ'=>61,'BK'=>62,'BL'=>63,'BM'=>64,'BN'=>65,'BO'=>66,'BP'=>67,'BQ'=>68,'BR'=>69,'BS'=>70,'BT'=>71,'BU'=>72,'BV'=>73,'BW'=>74,'BX'=>75,'BY'=>76,'BZ'=>77,'CA'=>78,'CB'=>79,'CC'=>80,'CD'=>81,'CE'=>82,'CF'=>83,'CG'=>84,'CH'=>85,'CI'=>86,'CJ'=>87,'CK'=>88,'CL'=>89,'CM'=>90,'CN'=>91,'CO'=>92,'CP'=>93,'CQ'=>94,'CR'=>95,'CS'=>96,'CT'=>97,'CU'=>98,'CV'=>99,'CW'=>100,'CX'=>101,'CY'=>102,'CZ'=>103); } public function reader($filePath=null, $index=2) { if(file_exists(ROOT_PATH.'/include/PHPExcel/Reader/Excel2007.php'))include_once(ROOT_PATH.'/include/PHPExcel/Reader/Excel2007.php'); if(file_exists(ROOT_PATH.'/include/PHPExcel/Reader/Excel5.php'))include_once(ROOT_PATH.'/include/PHPExcel/Reader/Excel5.php'); $help = c('xinhu')->helpstr('phpexcel'); if(!class_exists('PHPExcel_Reader_Excel2007'))return '没有安装PHPExcel插件'.$help.''; if($filePath==null)$filePath = $_FILES['file']['tmp_name']; $PHPReader = new PHPExcel_Reader_Excel2007(); if(!$PHPReader->canRead($filePath)){ $PHPReader = new PHPExcel_Reader_Excel5(); if(!$PHPReader->canRead($filePath)){ return '不是正规的Excel文件'.$help.''; } } $PHPExcel = $PHPReader->load($filePath); $rows = array(); $sheet = $PHPExcel->getSheet(0); //第一个表 $allColumn = $sheet->getHighestColumn(); $allRow = $sheet->getHighestRow(); $allCell = $this->AT[$allColumn]; for($row = $index; $row <= $allRow; $row++){ $arr = array(); for($cell= 0; $cell<= $allCell; $cell++){ $val = $sheet->getCellByColumnAndRow($cell, $row)->getValue(); $arr[$this->A[$cell]] = $val; } $rows[] = $arr; } return $rows; } /** 导入到表 */ public function importTable($table, $rows, $fields) { } } ",0 "OpenEyes. * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see . * * @package OpenEyes * @link http://www.openeyes.org.uk * @author OpenEyes * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust * @copyright Copyright (c) 2011-2012, OpenEyes Foundation * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0 */ /** * This is the model class for table ""family_history"". * * The followings are the available columns in table 'family_history': * @property integer $id * @property string $name */ class FamilyHistory extends BaseActiveRecordVersioned { /** * Returns the static model of the specified AR class. * @return FamilyHistory the static model class */ public static function model($className=__CLASS__) { return parent::model($className); } /** * @return string the associated database table name */ public function tableName() { return 'family_history'; } /** * @return array validation rules for model attributes. */ public function rules() { // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( array('patient_id, relative_id, side_id, condition_id, comments','safe'), array('patient_id, relative_id, side_id, condition_id','required'), // The following rule is used by search(). // Please remove those attributes that should not be searched. array('id, name', 'safe', 'on'=>'search'), ); } /** * @return array relational rules. */ public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'relative' => array(self::BELONGS_TO, 'FamilyHistoryRelative', 'relative_id'), 'side' => array(self::BELONGS_TO, 'FamilyHistorySide', 'side_id'), 'condition' => array(self::BELONGS_TO, 'FamilyHistoryCondition', 'condition_id'), ); } /** * @return array customized attribute labels (name=>label) */ public function attributeLabels() { return array( 'id' => 'ID', 'name' => 'Name', ); } /** * Retrieves a list of models based on the current search/filter conditions. * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. */ public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('id',$this->id,true); $criteria->compare('name',$this->name,true); return new CActiveDataProvider(get_class($this), array( 'criteria'=>$criteria, )); } } ",0 "rsion 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. */ package org.wso2.carbon.identity.entitlement.filter.callback; import org.apache.commons.codec.binary.Base64; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.identity.entitlement.filter.exception.EntitlementFilterException; import javax.servlet.http.HttpServletRequest; public class BasicAuthCallBackHandler extends EntitlementFilterCallBackHandler { private static final Log log = LogFactory.getLog(BasicAuthCallBackHandler.class); public BasicAuthCallBackHandler(HttpServletRequest request) throws EntitlementFilterException { String authHeaderEn = null; if (!(request.getHeader(""Authorization"") == null || request.getHeader(""Authorization"").equals(""null""))) { authHeaderEn = request.getHeader(""Authorization""); String tempArr[] = authHeaderEn.split("" ""); if (tempArr.length == 2) { String authHeaderDc = new String(Base64.decodeBase64(tempArr[1].getBytes())); tempArr = authHeaderDc.split("":""); if (tempArr.length == 2) { setUserName(tempArr[0]); } } throw new EntitlementFilterException(""Unable to retrieve username from Authorization header""); } } } ",0 "тирование превращения массива в строку для печати * * Created by vedenin on 04.02.16. */ public class ConvertArrayToStringAndPrintTest { public static void main(String[] s) throws Exception { /* (JDK 5) Использование Arrays.toString и Arrays.deepToString */ // simple array String[] array = new String[]{""John"", ""Mary"", ""Bob""}; System.out.println(Arrays.toString(array)); // Напечатает: [John, Mary, Bob] // nested array String[][] deepArray = new String[][]{{""John"", ""Mary""}, {""Alice"", ""Bob""}}; System.out.println(Arrays.toString(deepArray)); // Напечатает: [[Ljava.lang.String;@106d69c, [Ljava.lang.String;@52e922] System.out.println(Arrays.deepToString(deepArray)); // Напечатает: [[John, Mary], [Alice, Bob]] //double Array double[] arrayGiven = {7.0, 9.0, 5.0, 1.0, 3.0}; System.out.println(Arrays.toString(arrayGiven)); // Напечатает: [7.0, 9.0, 5.0, 1.0, 3.0 ] //int Array int[] arrayInt = {7, 9, 5, 1, 3}; System.out.println(Arrays.toString(arrayInt)); // Напечатает: [7, 9, 5, 1, 3 ] /* (JDK 8) Использование Stream API */ Arrays.asList(array).stream().forEach(System.out::print); // Напечатает: JohnMaryBob System.out.println(); Arrays.asList(deepArray).stream().forEach(s1 -> Arrays.asList(s1).stream().forEach(System.out::print)); System.out.println(); DoubleStream.of(arrayGiven).forEach((d) -> System.out.print(d + "" "")); // Напечатает: 7.0 9.0 5.0 1.0 3.0 System.out.println(); IntStream.of(arrayInt).forEach(System.out::print); // Напечатает: 79513 } } ",0 "enerated by javadoc (1.8.0_102) on Wed Nov 02 19:53:03 IST 2016 --> Uses of Class org.apache.solr.util.stats.Clock (Solr 6.3.0 API)
  • Prev
  • Next

Uses of Class
org.apache.solr.util.stats.Clock

  • Prev
  • Next

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.

",0 "e> #include // uint64_t #include #include #include #include namespace argcv { namespace util { // c style hash key generator // void crypt_init(); // for hash key generator // uint64_t hash(const char * k, uint64_t offset); // uint64_t hash(const std::string & k, uint64_t offset); // c++ style hash key genertator class BlzKeygen { public : static BlzKeygen & instance() { static BlzKeygen hk; return hk; } virtual ~BlzKeygen(); // k : string , offset should not too much , 0~3 in suggestion uint64_t hash(const std::string & k, uint16_t offset); private : BlzKeygen(); // Private constructor BlzKeygen(const BlzKeygen &); // Prevent copy-construction BlzKeygen &operator=(const BlzKeygen &); // Prevent assignment uint64_t crypt[0x500]; // Seed }; // tf-idf // assume : k in document D // stid : size of term k in D // atsid : all term size in D // ads : all document size // dscct : document size contains current term inline double tf_idf(size_t stid, size_t atsid, size_t ads, size_t dscct) { // #define MATH_LG_10 2.302585 // tf * idf if (ads == 0 || atsid == 0 || dscct == 0) return 0; return (static_cast(stid) / atsid) * log(static_cast(ads) / (dscct))/2.302585; } inline static std::string random_str(const int len) { static const char alphanum[] = ""0123456789"" ""ABCDEFGHIJKLMNOPQRSTUVWXYZ"" ""abcdefghijklmnopqrstuvwxyz""; std::stringstream ss; for (int i = 0; i < len; ++i) { ss << alphanum[rand() % (sizeof(alphanum) - 1)]; } return ss.str(); } std::vector &split(const std::string &s, const std::string &delim, std::vector *_elems); std::vector split(const std::string &s, const std::string &delim); bool parse_utf8(const std::string &s,std::vector *_elems); } // namespace util } // namespace argcv #endif // INCLUDE_ARGCV_UTIL_UTIL_H_ ",0 " 1997. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #include #include #include #include #include ""nis_xdr.h"" typedef bool_t (*iofct_t) (XDR *, void *); typedef void (*freefct_t) (void *); static void * read_nis_obj (const char *name, iofct_t readfct, freefct_t freefct, size_t objsize) { FILE *in = fopen (name, ""rce""); if (in == NULL) return NULL; void *obj = calloc (1, objsize); if (obj != NULL) { XDR xdrs; xdrstdio_create (&xdrs, in, XDR_DECODE); bool_t status = readfct (&xdrs, obj); xdr_destroy (&xdrs); if (!status) { freefct (obj); obj = NULL; } } fclose (in); return obj; } static bool_t write_nis_obj (const char *name, const void *obj, iofct_t writefct) { FILE *out = fopen (name, ""wce""); if (out == NULL) return FALSE; XDR xdrs; xdrstdio_create (&xdrs, out, XDR_ENCODE); bool_t status = writefct (&xdrs, (void *) obj); xdr_destroy (&xdrs); fclose (out); return status; } static const char cold_start_file[] = ""/var/nis/NIS_COLD_START""; directory_obj * readColdStartFile (void) { return read_nis_obj (cold_start_file, (iofct_t) _xdr_directory_obj, (freefct_t) nis_free_directory, sizeof (directory_obj)); } libnsl_hidden_def (readColdStartFile) bool_t writeColdStartFile (const directory_obj *obj) { return write_nis_obj (cold_start_file, obj, (iofct_t) _xdr_directory_obj); } nis_object * nis_read_obj (const char *name) { return read_nis_obj (name, (iofct_t) _xdr_nis_object, (freefct_t) nis_free_object, sizeof (nis_object)); } bool_t nis_write_obj (const char *name, const nis_object *obj) { return write_nis_obj (name, obj, (iofct_t) _xdr_nis_object); } ",0 " 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. -->
",0 "on. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0 * * SPDX-License-Identifier: EPL-2.0 */ package org.openhab.binding.neato.internal.handler; import static org.openhab.binding.neato.internal.NeatoBindingConstants.*; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import org.apache.commons.lang.ObjectUtils; import org.eclipse.jdt.annotation.NonNull; import org.openhab.binding.neato.internal.CouldNotFindRobotException; import org.openhab.binding.neato.internal.NeatoBindingConstants; import org.openhab.binding.neato.internal.NeatoCommunicationException; import org.openhab.binding.neato.internal.NeatoRobot; import org.openhab.binding.neato.internal.classes.Cleaning; import org.openhab.binding.neato.internal.classes.Details; import org.openhab.binding.neato.internal.classes.NeatoState; import org.openhab.binding.neato.internal.config.NeatoRobotConfig; import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.OnOffType; import org.openhab.core.library.types.StringType; import org.openhab.core.thing.ChannelUID; import org.openhab.core.thing.Thing; import org.openhab.core.thing.ThingStatus; import org.openhab.core.thing.ThingStatusDetail; import org.openhab.core.thing.binding.BaseThingHandler; import org.openhab.core.types.Command; import org.openhab.core.types.RefreshType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * The {@link NeatoHandler} is responsible for handling commands, which are * sent to one of the channels. * * @author Patrik Wimnell - Initial contribution * @author Jeff Lauterbach - Code Cleanup and Refactor */ public class NeatoHandler extends BaseThingHandler { private Logger logger = LoggerFactory.getLogger(NeatoHandler.class); private NeatoRobot mrRobot; private int refreshTime; private ScheduledFuture refreshTask; public NeatoHandler(Thing thing) { super(thing); } @Override public void handleCommand(@NonNull ChannelUID channelUID, Command command) { if (command instanceof RefreshType) { refreshStateAndUpdate(); } else if (channelUID.getId().equals(NeatoBindingConstants.COMMAND)) { sendCommandToRobot(command); } } private void sendCommandToRobot(Command command) { logger.debug(""Ok - will handle command for CHANNEL_COMMAND""); try { mrRobot.sendCommand(command.toString()); } catch (NeatoCommunicationException e) { logger.debug(""Error while processing command from openHAB."", e); updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage()); } this.refreshStateAndUpdate(); } @Override public void dispose() { logger.debug(""Running dispose()""); if (this.refreshTask != null) { this.refreshTask.cancel(true); this.refreshTask = null; } } @Override public void initialize() { updateStatus(ThingStatus.UNKNOWN); logger.debug(""Will boot up Neato Vacuum Cleaner binding!""); NeatoRobotConfig config = getThing().getConfiguration().as(NeatoRobotConfig.class); logger.debug(""Neato Robot Config: {}"", config); refreshTime = config.getRefresh(); if (refreshTime < 30) { logger.warn( ""Refresh time [{}] is not valid. Refresh time must be at least 30 seconds. Setting to minimum of 30 sec"", refreshTime); config.setRefresh(30); } mrRobot = new NeatoRobot(config); startAutomaticRefresh(); } public void refreshStateAndUpdate() { if (mrRobot != null) { try { mrRobot.sendGetState(); updateStatus(ThingStatus.ONLINE); mrRobot.sendGetGeneralInfo(); publishChannels(); } catch (NeatoCommunicationException | CouldNotFindRobotException e) { logger.debug(""Error when refreshing state."", e); updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage()); } } } private void startAutomaticRefresh() { Runnable refresher = () -> refreshStateAndUpdate(); this.refreshTask = scheduler.scheduleWithFixedDelay(refresher, 0, refreshTime, TimeUnit.SECONDS); logger.debug(""Start automatic refresh at {} seconds"", refreshTime); } private void publishChannels() { logger.debug(""Updating Channels""); NeatoState neatoState = mrRobot.getState(); if (neatoState == null) { return; } updateProperty(Thing.PROPERTY_FIRMWARE_VERSION, neatoState.getMeta().getFirmware()); updateProperty(Thing.PROPERTY_MODEL_ID, neatoState.getMeta().getModelName()); updateState(CHANNEL_STATE, new StringType(neatoState.getRobotState().name())); updateState(CHANNEL_ERROR, new StringType((String) ObjectUtils.defaultIfNull(neatoState.getError(), """"))); updateState(CHANNEL_ACTION, new StringType(neatoState.getRobotAction().name())); Details details = neatoState.getDetails(); if (details != null) { updateState(CHANNEL_BATTERY, new DecimalType(details.getCharge())); updateState(CHANNEL_DOCKHASBEENSEEN, details.getDockHasBeenSeen() ? OnOffType.ON : OnOffType.OFF); updateState(CHANNEL_ISCHARGING, details.getIsCharging() ? OnOffType.ON : OnOffType.OFF); updateState(CHANNEL_ISSCHEDULED, details.getIsScheduleEnabled() ? OnOffType.ON : OnOffType.OFF); updateState(CHANNEL_ISDOCKED, details.getIsDocked() ? OnOffType.ON : OnOffType.OFF); } Cleaning cleaning = neatoState.getCleaning(); if (cleaning != null) { updateState(CHANNEL_CLEANINGCATEGORY, new StringType(cleaning.getCategory().name())); updateState(CHANNEL_CLEANINGMODE, new StringType(cleaning.getMode().name())); updateState(CHANNEL_CLEANINGMODIFIER, new StringType(cleaning.getModifier().name())); updateState(CHANNEL_CLEANINGSPOTWIDTH, new DecimalType(cleaning.getSpotWidth())); updateState(CHANNEL_CLEANINGSPOTHEIGHT, new DecimalType(cleaning.getSpotHeight())); } } } ",0 " * 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. */ package com.orientechnologies.orient.server.network.protocol.http.command.get; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import com.orientechnologies.common.log.OLogManager; import com.orientechnologies.orient.core.config.OGlobalConfiguration; import com.orientechnologies.orient.server.config.OServerCommandConfiguration; import com.orientechnologies.orient.server.config.OServerEntryConfiguration; import com.orientechnologies.orient.server.network.protocol.http.OHttpRequest; import com.orientechnologies.orient.server.network.protocol.http.OHttpResponse; import com.orientechnologies.orient.server.network.protocol.http.OHttpUtils; public class OServerCommandGetStaticContent extends OServerCommandConfigurableAbstract { private static final String[] DEF_PATTERN = { ""GET|www"", ""GET|studio/"", ""GET|"", ""GET|*.htm"", ""GET|*.html"", ""GET|*.xml"", ""GET|*.jpeg"", ""GET|*.jpg"", ""GET|*.png"", ""GET|*.gif"", ""GET|*.js"", ""GET|*.otf"", ""GET|*.css"", ""GET|*.swf"", ""GET|favicon.ico"", ""GET|robots.txt"" }; private static final String CONFIG_HTTP_CACHE = ""http.cache:""; private static final String CONFIG_ROOT_PATH = ""root.path""; private static final String CONFIG_FILE_PATH = ""file.path""; private Map cacheContents; private Map cacheHttp = new HashMap(); private String cacheHttpDefault = ""Cache-Control: max-age=3000""; private String rootPath; private String filePath; public OServerCommandGetStaticContent() { super(DEF_PATTERN); } public OServerCommandGetStaticContent(final OServerCommandConfiguration iConfiguration) { super(iConfiguration.pattern); // LOAD HTTP CACHE CONFIGURATION for (OServerEntryConfiguration par : iConfiguration.parameters) { if (par.name.startsWith(CONFIG_HTTP_CACHE)) { final String filter = par.name.substring(CONFIG_HTTP_CACHE.length()); if (filter.equalsIgnoreCase(""default"")) cacheHttpDefault = par.value; else if (filter.length() > 0) { final String[] filters = filter.split("" ""); for (String f : filters) { cacheHttp.put(f, par.value); } } } else if (par.name.startsWith(CONFIG_ROOT_PATH)) rootPath = par.value; else if (par.name.startsWith(CONFIG_FILE_PATH)) filePath = par.value; } } @Override public boolean beforeExecute(OHttpRequest iRequest, OHttpResponse iResponse) throws IOException { String header = cacheHttpDefault; if (cacheHttp.size() > 0) { final String resource = getResource(iRequest); // SEARCH IN CACHE IF ANY for (Entry entry : cacheHttp.entrySet()) { final int wildcardPos = entry.getKey().indexOf('*'); final String partLeft = entry.getKey().substring(0, wildcardPos); final String partRight = entry.getKey().substring(wildcardPos + 1); if (resource.startsWith(partLeft) && resource.endsWith(partRight)) { // FOUND header = entry.getValue(); break; } } } iResponse.setHeader(header); return true; } @Override public boolean execute(final OHttpRequest iRequest, final OHttpResponse iResponse) throws Exception { iRequest.data.commandInfo = ""Get static content""; iRequest.data.commandDetail = iRequest.url; if (filePath == null && rootPath == null) { // GET GLOBAL CONFIG rootPath = iRequest.configuration.getValueAsString(""orientdb.www.path"", ""src/site""); if (rootPath == null) { OLogManager.instance().warn(this, ""No path configured. Specify the 'root.path', 'file.path' or the global 'orientdb.www.path' variable"", rootPath); return false; } } if (filePath == null) { // CHECK DIRECTORY final File wwwPathDirectory = new File(rootPath); if (!wwwPathDirectory.exists()) OLogManager.instance().warn(this, ""path variable points to '%s' but it doesn't exists"", rootPath); if (!wwwPathDirectory.isDirectory()) OLogManager.instance().warn(this, ""path variable points to '%s' but it isn't a directory"", rootPath); } if (cacheContents == null && OGlobalConfiguration.SERVER_CACHE_FILE_STATIC.getValueAsBoolean()) // CREATE THE CACHE IF ENABLED cacheContents = new HashMap(); InputStream is = null; long contentSize = 0; String type = null; try { String path; if (filePath != null) // SINGLE FILE path = filePath; else { // GET FROM A DIRECTORY final String url = getResource(iRequest); if (url.startsWith(""/www"")) path = rootPath + url.substring(""/www"".length(), url.length()); else path = rootPath + url; } if (cacheContents != null) { synchronized (cacheContents) { final OStaticContentCachedEntry cachedEntry = cacheContents.get(path); if (cachedEntry != null) { is = new ByteArrayInputStream(cachedEntry.content); contentSize = cachedEntry.size; type = cachedEntry.type; } } } if (is == null) { File inputFile = new File(path); if (!inputFile.exists()) { OLogManager.instance().debug(this, ""Static resource not found: %s"", path); iResponse.sendStream(404, ""File not found"", null, null, 0); return false; } if (filePath == null && inputFile.isDirectory()) { inputFile = new File(path + ""/index.htm""); if (inputFile.exists()) path = path + ""/index.htm""; else { inputFile = new File(path + ""/index.html""); if (inputFile.exists()) path = path + ""/index.html""; } } if (path.endsWith("".htm"") || path.endsWith("".html"")) type = ""text/html""; else if (path.endsWith("".png"")) type = ""image/png""; else if (path.endsWith("".jpeg"")) type = ""image/jpeg""; else if (path.endsWith("".js"")) type = ""application/x-javascript""; else if (path.endsWith("".css"")) type = ""text/css""; else if (path.endsWith("".ico"")) type = ""image/x-icon""; else if (path.endsWith("".otf"")) type = ""font/opentype""; else type = ""text/plain""; is = new BufferedInputStream(new FileInputStream(inputFile)); contentSize = inputFile.length(); if (cacheContents != null) { // READ THE ENTIRE STREAM AND CACHE IT IN MEMORY final byte[] buffer = new byte[(int) contentSize]; for (int i = 0; i < contentSize; ++i) buffer[i] = (byte) is.read(); OStaticContentCachedEntry cachedEntry = new OStaticContentCachedEntry(); cachedEntry.content = buffer; cachedEntry.size = contentSize; cachedEntry.type = type; cacheContents.put(path, cachedEntry); is = new ByteArrayInputStream(cachedEntry.content); } } iResponse.sendStream(OHttpUtils.STATUS_OK_CODE, OHttpUtils.STATUS_OK_DESCRIPTION, type, is, contentSize); } catch (IOException e) { e.printStackTrace(); } finally { if (is != null) try { is.close(); } catch (IOException e) { } } return false; } protected String getResource(final OHttpRequest iRequest) { final String url; if (OHttpUtils.URL_SEPARATOR.equals(iRequest.url)) url = ""/www/index.htm""; else { int pos = iRequest.url.indexOf('?'); if (pos > -1) url = iRequest.url.substring(0, pos); else url = iRequest.url; } return url; } } ",0 "nent that is positioned at the bottom of the page. Has same functionality as the ons-toolbar component.

Example

<ons-bottom-toolbar>
 <div style="text-align: center; line-height: 44px">Text</div>
</ons-bottom-toolbar>

Attributes

inline Display the toolbar as an inline element.

See also

",0 "ghts for code used from other parties are included in * the corresponding files. * * This file is part of Psi4. * * Psi4 is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, version 3. * * Psi4 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along * with Psi4; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * @END LICENSE */ #ifndef APPS_H #define APPS_H #include #include #include ""psi4/libmints/wavefunction.h"" namespace psi { class JK; class VBase; // => BASE CLASSES <= // class RBase : public Wavefunction { protected: int print_; int bench_; SharedMatrix C_; SharedMatrix Cocc_; SharedMatrix Cfocc_; SharedMatrix Cfvir_; SharedMatrix Caocc_; SharedMatrix Cavir_; std::shared_ptr eps_focc_; std::shared_ptr eps_fvir_; std::shared_ptr eps_aocc_; std::shared_ptr eps_avir_; SharedMatrix AO2USO_; /// How far to converge the two-norm of the residual double convergence_; /// Global JK object, built in preiterations, destroyed in postiterations std::shared_ptr jk_; std::shared_ptr v_; bool use_symmetry_; double Eref_; public: RBase(SharedWavefunction ref_wfn, Options& options, bool use_symmetry=true); // TODO: Remove AS SOON AS POSSIBLE, such a dirty hack RBase(bool flag); virtual ~RBase(); virtual bool same_a_b_orbs() const { return true; } virtual bool same_a_b_dens() const { return true; } // TODO: Remove AS SOON AS POSSIBLE, such a dirty hack virtual double compute_energy() { return 0.0; } void set_print(int print) { print_ = print; } /// Gets a handle to the JK object, if built by preiterations std::shared_ptr jk() const { return jk_;} /// Set the JK object, say from SCF void set_jk(std::shared_ptr jk) { jk_ = jk; } /// Gets a handle to the VBase object, if built by preiterations std::shared_ptr v() const { return v_;} /// Set the VBase object, say from SCF (except that wouldn't work, right?) void set_jk(std::shared_ptr v) { v_ = v; } /// Builds JK object, if needed virtual void preiterations(); /// Destroys JK object, if needed virtual void postiterations(); /// => Setters <= /// void set_use_symmetry(bool usesym) { use_symmetry_ = usesym; } /// Set convergence behavior void set_convergence(double convergence) { convergence_ = convergence; } /// Set reference info void set_C(SharedMatrix C) { C_ = C; } void set_Cocc(SharedMatrix Cocc) { Cocc_ = Cocc; } void set_Cfocc(SharedMatrix Cfocc) { Cfocc_ = Cfocc; } void set_Caocc(SharedMatrix Caocc) { Caocc_ = Caocc; } void set_Cavir(SharedMatrix Cavir) { Cavir_ = Cavir; } void set_Cfvir(SharedMatrix Cfvir) { Cfvir_ = Cfvir; } void set_eps_focc(SharedVector eps) { eps_focc_ = eps; } void set_eps_aocc(SharedVector eps) { eps_aocc_ = eps; } void set_eps_avir(SharedVector eps) { eps_avir_ = eps; } void set_eps_fvir(SharedVector eps) { eps_fvir_ = eps; } void set_Eref(double Eref) { Eref_ = Eref; } /// Update reference info void set_reference(std::shared_ptr reference); }; // => APPLIED CLASSES <= // class RCIS : public RBase { protected: std::vector > states_; std::vector singlets_; std::vector triplets_; std::vector E_singlets_; std::vector E_triplets_; void sort_states(); virtual void print_header(); virtual void print_wavefunctions(); virtual void print_amplitudes(); virtual void print_transitions(); virtual void print_densities(); virtual SharedMatrix TDmo(SharedMatrix T1, bool singlet = true); virtual SharedMatrix TDso(SharedMatrix T1, bool singlet = true); virtual SharedMatrix TDao(SharedMatrix T1, bool singlet = true); virtual SharedMatrix Dmo(SharedMatrix T1, bool diff = false); virtual SharedMatrix Dso(SharedMatrix T1, bool diff = false); virtual SharedMatrix Dao(SharedMatrix T1, bool diff = false); virtual std::pair > Nmo(SharedMatrix T1, bool diff = false); virtual std::pair > Nso(SharedMatrix T1, bool diff = false); virtual std::pair > Nao(SharedMatrix T1, bool diff = false); virtual std::pair ADmo(SharedMatrix T1); virtual std::pair ADso(SharedMatrix T1); virtual std::pair ADao(SharedMatrix T1); public: RCIS(SharedWavefunction ref_wfn, Options& options); virtual ~RCIS(); virtual double compute_energy(); }; class RTDHF : public RBase { protected: std::vector singlets_X_; std::vector triplets_X_; std::vector singlets_Y_; std::vector triplets_Y_; std::vector E_singlets_; std::vector E_triplets_; virtual void print_header(); public: RTDHF(SharedWavefunction ref_wfn, Options& options); virtual ~RTDHF(); virtual double compute_energy(); }; class RCPHF : public RBase { protected: // OV-Rotations std::map x_; // OV-Perturbations std::map b_; virtual void print_header(); void add_named_tasks(); void analyze_named_tasks(); void add_polarizability(); void analyze_polarizability(); std::set tasks_; public: RCPHF(SharedWavefunction ref_wfn, Options& options, bool use_symmetry=true); virtual ~RCPHF(); /// Solve for all perturbations currently in b virtual double compute_energy(); /// Perturbation vector queue, shove tasks onto this guy before compute_energy std::map& b() { return b_; } /// Resultant solution vectors, available after compute_energy is called std::map& x() { return x_; } /// Add a named task void add_task(const std::string& task); }; class RCPKS : public RCPHF { protected: virtual void print_header(); public: RCPKS(SharedWavefunction ref_wfn, Options& options); virtual ~RCPKS(); virtual double compute_energy(); }; class RTDA : public RCIS { protected: virtual void print_header(); public: RTDA(SharedWavefunction ref_wfn, Options& options); virtual ~RTDA(); virtual double compute_energy(); }; class RTDDFT : public RTDHF { protected: virtual void print_header(); public: RTDDFT(SharedWavefunction ref_wfn, Options& options); virtual ~RTDDFT(); virtual double compute_energy(); }; } #endif ",0 "fine AUDIO_FILENO (STDERR_FILENO + 1) /*! \file * Extended AGI test application * * This code is released into the public domain * with no warranty of any kind * * \ingroup agi */ static int read_environment(void) { char buf[256]; char *val; /* Read environment */ for(;;) { if (!fgets(buf, sizeof(buf), stdin)) { return -1; } if (feof(stdin)) return -1; buf[strlen(buf) - 1] = '\0'; /* Check for end of environment */ if (!strlen(buf)) return 0; val = strchr(buf, ':'); if (!val) { fprintf(stderr, ""Invalid environment: '%s'\n"", buf); return -1; } *val = '\0'; val++; val++; /* Skip space */ fprintf(stderr, ""Environment: '%s' is '%s'\n"", buf, val); /* Load into normal environment */ setenv(buf, val, 1); } /* Never reached */ return 0; } static char *wait_result(void) { fd_set fds; int res; int bytes = 0; static char astresp[256]; char audiobuf[4096]; for (;;) { FD_ZERO(&fds); FD_SET(STDIN_FILENO, &fds); FD_SET(AUDIO_FILENO, &fds); /* Wait for *some* sort of I/O */ res = select(AUDIO_FILENO + 1, &fds, NULL, NULL, NULL); if (res < 0) { fprintf(stderr, ""Error in select: %s\n"", strerror(errno)); return NULL; } if (FD_ISSET(STDIN_FILENO, &fds)) { if (!fgets(astresp, sizeof(astresp), stdin)) { return NULL; } if (feof(stdin)) { fprintf(stderr, ""Got hungup on apparently\n""); return NULL; } astresp[strlen(astresp) - 1] = '\0'; fprintf(stderr, ""Ooh, got a response from Asterisk: '%s'\n"", astresp); return astresp; } if (FD_ISSET(AUDIO_FILENO, &fds)) { res = read(AUDIO_FILENO, audiobuf, sizeof(audiobuf)); if (res > 0) { /* XXX Process the audio with sphinx here XXX */ #if 0 fprintf(stderr, ""Got %d/%d bytes of audio\n"", res, bytes); #endif bytes += res; /* Prentend we detected some audio after 3 seconds */ if (bytes > 16000 * 3) { return ""Sample Message""; bytes = 0; } } } } } static char *run_command(char *command) { fprintf(stdout, ""%s\n"", command); return wait_result(); } static int run_script(void) { char *res; res = run_command(""STREAM FILE demo-enterkeywords 0123456789*#""); if (!res) { fprintf(stderr, ""Failed to execute command\n""); return -1; } fprintf(stderr, ""1. Result is '%s'\n"", res); res = run_command(""STREAM FILE demo-nomatch 0123456789*#""); if (!res) { fprintf(stderr, ""Failed to execute command\n""); return -1; } fprintf(stderr, ""2. Result is '%s'\n"", res); res = run_command(""SAY NUMBER 23452345 0123456789*#""); if (!res) { fprintf(stderr, ""Failed to execute command\n""); return -1; } fprintf(stderr, ""3. Result is '%s'\n"", res); res = run_command(""GET DATA demo-enterkeywords""); if (!res) { fprintf(stderr, ""Failed to execute command\n""); return -1; } fprintf(stderr, ""4. Result is '%s'\n"", res); res = run_command(""STREAM FILE auth-thankyou \""\""""); if (!res) { fprintf(stderr, ""Failed to execute command\n""); return -1; } fprintf(stderr, ""5. Result is '%s'\n"", res); return 0; } int main(int argc, char *argv[]) { char *tmp; int ver = 0; int subver = 0; /* Setup stdin/stdout for line buffering */ setlinebuf(stdin); setlinebuf(stdout); if (read_environment()) { fprintf(stderr, ""Failed to read environment: %s\n"", strerror(errno)); exit(1); } tmp = getenv(""agi_enhanced""); if (tmp) { if (sscanf(tmp, ""%30d.%30d"", &ver, &subver) != 2) ver = 0; } if (ver < 1) { fprintf(stderr, ""No enhanced AGI services available. Use EAGI, not AGI\n""); exit(1); } if (run_script()) return -1; exit(0); } ",0 "e of Conan. Copyright (C) 2009, 2010, 2011, 2012 The Project Faolan Team This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ enum TYPES { SCRIPTGROUP = 0, ANIMSYS = 1010200, STATICAIPOINTS = 1000046, BOUNDEDAREAS = 1000053, PATROLS = 1000067, STATICAIPOINSEXPORT = 1000068, CLIMBINGAREASEXPORT = 1000070, RIVERS = 1000075, CONTENTSPAWNDATAEXPORT = 1000077, ACGSPAWNDATAEXPORT = 1000078, NPCSPAWNDATAEXPORT = 1000079, TREASUREDATAEXPORT = 1000083, SCRYSCRIPTDATAEXPORT = 1000084, SCRYSCRIPTDATAEXPORT2 = 1000085, DESTRUCTIBLECLIENTDATAEXPORT = 1000088, RESURRECTIONPOINTSEXPORT = 1000090, SIMPLEDYNELDATAEXPORT = 1000091, NOTEPADDATAEXPORT = 1000093, CLIMBINGDYNELDATAEXPORT = 1000095, OCEANVOLUMESROOTNODEEXPORT = 1000097, VOLUMETRICFOGSROOTNODEEXPORT = 1000098, PATHFINDINGAREASROOTNODEEXPORT = 1000100, DOORDYNELDATAEXPORT = 1000101, STATICAIPOINTS2 = 1000103, PNG = 1010008, COLLECTIONLIBRARY = 1010014, SCRIPTGROUP2 = 1010028, SCRIPTGROUP3 = 1010029, TEXTSCRIPT = 1010035, PNG2 = 1066603, //The secret world PHYSX30COLLECTION = 1000007, DECALPROJECTORS = 1000519, EFFECTPACKAGE = 1000622, SOUNDENGINE = 1000623, MPEG = 1000635, FCTX1 = 1010004, FCTX2 = 1010006, FCTX3 = 1010218, FCTX4 = 1066606, FCTX5 = 1066610, JPEG = 1010013, MESHINDEXFILE = 1010030, TIFF = 1010042, //The TIFF I checked had an invalid version number?! Is it not always 42? MONSTERDATA = 1010201, BCTGROUP = 1010202, BCTMESH = 1010203, MOVEMENTSET = 1010205, PNG3 = 1000636, PNG4 = 1010210, PNG5 = 1010211, PNG6 = 1010213, CARS = 1010216, LUAARCHIVE = 1010223, ROOMANDPORTALSYSTEM = 1010300, FORMATION = 1010400, CHARACTERCREATOR = 1010700, OGG1 = 1020002, LIP = 1020003, OGG3 = 1020005, BOUNDEDAREACOLLECTIONS = 1040010, ENVIRONMENTSETTINGS = 1060667, SKYDOME = 1060668, PLAYFIELDDESCRIPTIONDATA = 1070003 }; struct TypId { uint32 idx; uint32 type; uint32 unk0; uint32 offset; uint32 size; uint32 unk3; uint32 unk4; uint32 unk5; uint32 unk6; uint32 unk7; uint32 unk8; uint32 unk9; uint32 unk10; }; struct Header { string magic; uint32 version; uint32 hash1; uint32 hash2; uint32 hash3; uint32 hash4; uint32 recordCount; }; ",0 " 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. */ package com.justplay1.shoppist.interactor.units; import com.justplay1.shoppist.executor.PostExecutionThread; import com.justplay1.shoppist.executor.ThreadExecutor; import com.justplay1.shoppist.models.UnitModel; import com.justplay1.shoppist.repository.UnitsRepository; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import java.util.Collections; import java.util.List; import static com.justplay1.shoppist.ModelUtil.createFakeUnitModel; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyZeroInteractions; public class UpdateUnitsTest { private UpdateUnits useCase; @Mock private ThreadExecutor mockThreadExecutor; @Mock private PostExecutionThread mockPostExecutionThread; @Mock private UnitsRepository mockUnitsRepository; private List models; @Before public void setUp() { MockitoAnnotations.initMocks(this); useCase = new UpdateUnits(mockUnitsRepository, mockThreadExecutor, mockPostExecutionThread); models = Collections.singletonList(createFakeUnitModel()); useCase.init(models); } @Test public void updateUnitsUseCase_HappyCase() { useCase.buildUseCaseObservable().subscribe(); verify(mockUnitsRepository).update(models); verifyNoMoreInteractions(mockUnitsRepository); verifyZeroInteractions(mockThreadExecutor); verifyZeroInteractions(mockPostExecutionThread); } } ",0 "anasTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('saranas', function (Blueprint $table) { $table->increments('id'); $table->integer('timeline_id')->unsigned(); $table->integer('latar_belakang_id')->unsigned(); $table->integer('evaluasi_id')->unsigned(); $table->text('tempat'); $table->text('kerjasama'); $table->string('doc_kerjasama'); $table->string('doc_anggaran'); $table->string('doc_resiko'); $table->string('doc_tor'); $table->string('doc_laporan'); $table->string('doc_evaluasi'); $table->string('doc_absensi'); $table->timestamps(); $table->foreign('timeline_id')->references('id')->on('timelines') ->onUpdate('cascade') ->onDelete('restrict'); $table->foreign('latar_belakang_id')->references('id')->on('latar_belakangs') ->onUpdate('cascade') ->onDelete('restrict'); $table->foreign('evaluasi_id')->references('id')->on('evaluasis') ->onUpdate('cascade') ->onDelete('restrict'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('saranas'); } } ",0 "dServer; import zornco.reploidcraft.ReploidCraft; import zornco.reploidcraft.entities.EntityRideArmor; import zornco.reploidcraft.utils.RiderState; import io.netty.buffer.ByteBuf; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import cpw.mods.fml.relauncher.Side; public class MessageRideArmor implements IMessage, IMessageHandler { public float moveForward = 0.0F; public float moveStrafe = 0.0F; public boolean jump = false; public boolean sneak = false; public boolean dash = false; public boolean punch = false; public int ID = 0; public int dimension = 0; public MessageRideArmor() {} public MessageRideArmor(EntityRideArmor rideArmor, Entity entity) { if(rideArmor != null && entity != null){ RiderState rs = ReploidCraft.proxy.getRiderState(entity); if (null != rs) { moveStrafe = rs.getMoveStrafe(); moveForward = rs.getMoveForward(); jump = rs.isJump(); sneak = rs.isSneak(); } ID = rideArmor.getEntityId(); dimension = rideArmor.dimension; } } @Override public IMessage onMessage(MessageRideArmor message, MessageContext ctx) { RiderState rs = new RiderState(); rs.setMoveForward(message.moveForward); rs.setMoveStrafe(message.moveStrafe); rs.setJump(message.jump); rs.setSneak(message.sneak); Entity armor = getEntityByID(message.ID, message.dimension); if( armor != null && armor instanceof EntityRideArmor) { ((EntityRideArmor)armor).setRiderState(rs); } return null; } @Override public void fromBytes(ByteBuf buf) { moveForward = buf.readFloat(); moveStrafe = buf.readFloat(); jump = buf.readBoolean(); sneak = buf.readBoolean(); dash = buf.readBoolean(); punch = buf.readBoolean(); ID = buf.readInt(); dimension = buf.readInt(); } @Override public void toBytes(ByteBuf buf) { buf.writeFloat(moveForward); buf.writeFloat(moveStrafe); buf.writeBoolean(jump); buf.writeBoolean(sneak); buf.writeBoolean(dash); buf.writeBoolean(punch); buf.writeInt(ID); buf.writeInt(dimension); } public Entity getEntityByID(int entityId, int dimension) { Entity targetEntity = null; if (Side.SERVER == FMLCommonHandler.instance().getEffectiveSide()) { WorldServer worldserver = MinecraftServer.getServer().worldServerForDimension(dimension); targetEntity = worldserver.getEntityByID(entityId); } if ((null != targetEntity) && ((targetEntity instanceof EntityRideArmor))) { return (EntityRideArmor)targetEntity; } return null; } } ",0 "a name=""generator"" content=""rustdoc""> servo::style::properties::longhands::background_position::get_initial_value - Rust

servo::style::properties::longhands::background_position

Function servo::style::properties::longhands::background_position::get_initial_value [] [src]

pub fn get_initial_value() -> T

Keyboard Shortcuts

?
Show this help dialog
S
Focus the search field
Move up in search results
Move down in search results
Go to active search result

Search Tricks

Prefix searches with a type followed by a colon (e.g. fn:) to restrict the search to a given type.

Accepted types are: fn, mod, struct, enum, trait, type, macro, and const.

Search functions by type signature (e.g. vec -> usize)

",0 "rg/1999/xhtml""> targeter: Class List
targeter  1
software for EUCALL WP6 deliverable - pre-investigation of XFEL targets
  • Generated by 1.8.13
",0 "lsearch(key, base, count, width, keycmp) char *key; char *base; unsigned *count; unsigned width; _PROTOTYPE( int (*keycmp), (const void *, const void *)); { char *entry; char *last = base + *count * width; for (entry = base; entry < last; entry += width) if (keycmp(key, entry) == 0) return(entry); bcopy(key, last, width); *count += 1; return(last); } char *lfind(key, base, count, width, keycmp) char *key; char *base; unsigned *count; unsigned width; _PROTOTYPE( int (*keycmp), (const void *, const void *)); { char *entry; char *last = base + *count * width; for (entry = base; entry < last; entry += width) if (keycmp(key, entry) == 0) return(entry); return((char *)NULL); } ",0 "his work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.wss4j.stax.impl.securityToken; import org.apache.wss4j.common.bsp.BSPRule; import org.apache.wss4j.common.ext.WSSecurityException; import org.apache.wss4j.common.principal.UsernameTokenPrincipal; import org.apache.wss4j.common.util.UsernameTokenUtil; import org.apache.wss4j.stax.ext.WSInboundSecurityContext; import org.apache.wss4j.stax.ext.WSSConstants; import org.apache.wss4j.stax.securityToken.UsernameSecurityToken; import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants; import org.apache.xml.security.exceptions.XMLSecurityException; import org.apache.xml.security.stax.config.JCEAlgorithmMapper; import org.apache.xml.security.stax.ext.XMLSecurityConstants; import org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken; import javax.crypto.spec.SecretKeySpec; import javax.security.auth.Subject; import java.security.Key; import java.security.Principal; public class UsernameSecurityTokenImpl extends AbstractInboundSecurityToken implements UsernameSecurityToken { private static final long DEFAULT_ITERATION = 1000; private WSSConstants.UsernameTokenPasswordType usernameTokenPasswordType; private String username; private String password; private String createdTime; private byte[] nonce; private byte[] salt; private Long iteration; private final WSInboundSecurityContext wsInboundSecurityContext; private Subject subject; private Principal principal; public UsernameSecurityTokenImpl(WSSConstants.UsernameTokenPasswordType usernameTokenPasswordType, String username, String password, String createdTime, byte[] nonce, byte[] salt, Long iteration, WSInboundSecurityContext wsInboundSecurityContext, String id, WSSecurityTokenConstants.KeyIdentifier keyIdentifier) { super(wsInboundSecurityContext, id, keyIdentifier, true); this.usernameTokenPasswordType = usernameTokenPasswordType; this.username = username; this.password = password; this.createdTime = createdTime; this.nonce = nonce; this.salt = salt; this.iteration = iteration; this.wsInboundSecurityContext = wsInboundSecurityContext; } @Override public boolean isAsymmetric() throws XMLSecurityException { return false; } @Override protected Key getKey(String algorithmURI, XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID) throws XMLSecurityException { Key key = getSecretKey().get(algorithmURI); if (key != null) { return key; } byte[] secretToken = generateDerivedKey(wsInboundSecurityContext); String algoFamily = JCEAlgorithmMapper.getJCEKeyAlgorithmFromURI(algorithmURI); key = new SecretKeySpec(secretToken, algoFamily); setSecretKey(algorithmURI, key); return key; } @Override public WSSecurityTokenConstants.TokenType getTokenType() { return WSSecurityTokenConstants.UsernameToken; } /** * This method generates a derived key as defined in WSS Username * Token Profile. * * @return Returns the derived key a byte array * @throws WSSecurityException */ public byte[] generateDerivedKey() throws WSSecurityException { return generateDerivedKey(wsInboundSecurityContext); } /** * This method generates a derived key as defined in WSS Username * Token Profile. * * @return Returns the derived key a byte array * @throws org.apache.wss4j.common.ext.WSSecurityException * */ protected byte[] generateDerivedKey(WSInboundSecurityContext wsInboundSecurityContext) throws WSSecurityException { if (wsInboundSecurityContext != null) { if (salt == null || salt.length == 0) { wsInboundSecurityContext.handleBSPRule(BSPRule.R4217); } if (iteration == null || iteration < DEFAULT_ITERATION) { wsInboundSecurityContext.handleBSPRule(BSPRule.R4218); } } return UsernameTokenUtil.generateDerivedKey(password, salt, iteration.intValue()); } @Override public Principal getPrincipal() throws WSSecurityException { if (this.principal == null) { this.principal = new UsernameTokenPrincipal() { //todo passwordType and passwordDigest return Enum-Type ? @Override public boolean isPasswordDigest() { return usernameTokenPasswordType == WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST; } @Override public String getPasswordType() { return usernameTokenPasswordType.getNamespace(); } @Override public String getName() { return username; } @Override public String getPassword() { return password; } @Override public String getCreatedTime() { return createdTime; } @Override public byte[] getNonce() { return nonce; } }; } return this.principal; } public WSSConstants.UsernameTokenPasswordType getUsernameTokenPasswordType() { return usernameTokenPasswordType; } public String getCreatedTime() { return createdTime; } public String getPassword() { return password; } public String getUsername() { return username; } public byte[] getNonce() { return nonce; } public byte[] getSalt() { return salt; } public Long getIteration() { return iteration; } public void setSubject(Subject subject) { this.subject = subject; } @Override public Subject getSubject() throws WSSecurityException { return subject; } } ",0 " url_for('rentport.static', filename='css/rentport_style.css') }}""> {% endblock %} {% block navbar %} {% set active_page=""rentport.pay_rent""|default('rentport.home') %} {% include ""base_nav.html"" %} {% endblock %} {% block content %}

Pay Landlord

{% include ""flash.html"" %} {% endblock %} ",0 "import com.google.common.primitives.Longs; import com.ihtsdo.snomed.dto.refset.RefsetDto; import com.ihtsdo.snomed.model.refset.Refset; @XmlRootElement(name=""refset"") public class RefsetDtoShort { private long id; private XmlRefsetConcept concept; private String publicId; private String title; private String description; private Date created; private Date lastModified; private int memberSize; private String snomedExtension; private String snomedReleaseDate; private boolean pendingChanges; public RefsetDtoShort(Refset r){ setId(r.getId()); setConcept(new XmlRefsetConcept(r.getRefsetConcept())); setPublicId(r.getPublicId()); setTitle(r.getTitle()); setDescription(r.getDescription()); setCreated(r.getCreationTime()); setLastModified(r.getModificationTime()); setPendingChanges(r.isPendingChanges()); setMemberSize(r.getMemberSize()); setSnomedExtension(r.getOntologyVersion().getFlavour().getPublicId()); setSnomedReleaseDate(RefsetDto.dateFormat.format(r.getOntologyVersion().getTaggedOn())); } public RefsetDtoShort(){} @Override public String toString() { return Objects.toStringHelper(this) .add(""id"", getId()) .add(""concept"", getConcept()) .add(""publicId"", getPublicId()) .add(""title"", getTitle()) .add(""description"", getDescription()) .add(""created"", getCreated()) .add(""lastModified"", getLastModified()) .add(""pendingChanges"", isPendingChanges()) .add(""memberSize"", getMemberSize()) .add(""snomedExtension"", getSnomedExtension()) .add(""snomedReleaseDate"", getSnomedReleaseDate()) .toString(); } @Override public int hashCode(){ return Longs.hashCode(getId()); } @Override public boolean equals(Object o){ if (o instanceof RefsetDtoShort){ RefsetDtoShort r = (RefsetDtoShort) o; if (r.getId() == this.getId()){ return true; } } return false; } public boolean isPendingChanges() { return pendingChanges; } public void setPendingChanges(boolean pendingChanges) { this.pendingChanges = pendingChanges; } public long getId() { return id; } public void setId(long id) { this.id = id; } public XmlRefsetConcept getConcept() { return concept; } public void setConcept(XmlRefsetConcept concept) { this.concept = concept; } public String getPublicId() { return publicId; } public void setPublicId(String publicId) { this.publicId = publicId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Date getCreated() { return created; } public void setCreated(Date created) { this.created = created; } public Date getLastModified() { return lastModified; } public void setLastModified(Date lastModified) { this.lastModified = lastModified; } public int getMemberSize() { return memberSize; } public void setMemberSize(int memberSize) { this.memberSize = memberSize; } public String getSnomedExtension() { return snomedExtension; } public void setSnomedExtension(String snomedExtension) { this.snomedExtension = snomedExtension; } public String getSnomedReleaseDate() { return snomedReleaseDate; } public void setSnomedReleaseDate(String snomedReleaseDate) { this.snomedReleaseDate = snomedReleaseDate; } public static RefsetDtoShort parse(Refset r){ return getBuilder(new XmlRefsetConcept(r.getRefsetConcept()), r.getPublicId(), r.getTitle(), r.getDescription(), r.getCreationTime(), r.getModificationTime(), r.isPendingChanges(), r.getMemberSize(), r.getOntologyVersion().getFlavour().getPublicId(), r.getOntologyVersion().getTaggedOn()).build(); } public static Builder getBuilder(XmlRefsetConcept concept, String publicId, String title, String description, Date created, Date lastModified, boolean pendingChanges, int memberSize, String snomedExtension, Date snomedReleaseDate) { return new Builder(concept, publicId, title, description, created, lastModified, pendingChanges, memberSize, snomedExtension, snomedReleaseDate); } public static class Builder { private RefsetDtoShort built; Builder(XmlRefsetConcept concept, String publicId, String title, String description, Date created, Date lastModified, boolean pendingChanges, int memberSize, String snomedExtension, Date snomedReleaseDate){ built = new RefsetDtoShort(); built.concept = concept; built.publicId = publicId; built.title = title; built.description = description; built.created = created; built.lastModified = lastModified; built.pendingChanges = pendingChanges; built.memberSize = memberSize; built.setSnomedExtension(snomedExtension); built.setSnomedReleaseDate(RefsetDto.dateFormat.format(snomedReleaseDate)); } public RefsetDtoShort build() { return built; } } } ",0 " {% block title %}{% endblock %} {% block head %} {% endblock %}
{% block content %} {% endblock %}
",0 "nce 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. */ package com.groupon.vertx.memcache.client.response; /** * Represents a memcache store response. * * @author Stuart Siegrist (fsiegrist at groupon dot com) * @since 3.1.0 */ public final class StoreCommandResponse extends MemcacheCommandResponse { private final String data; private StoreCommandResponse(Builder builder) { super(builder); data = builder.data; } public String getData() { return data; } /** * Builder for the StoreCommandResponse */ public static class Builder extends AbstractBuilder { private String data; @Override protected Builder self() { return this; } public Builder setData(String value) { data = value; return self(); } @Override public StoreCommandResponse build() { return new StoreCommandResponse(this); } } } ",0 "served. * Licensed under the Apache License, Version 2.0 (the ""License""). You may not use * this file except in compliance with the License. A copy of the License is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * or in the ""license"" file accompanying this file. * This file 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. * **************************************************************************** */ // This code is auto-generated, do not modify package com.spectralogic.ds3client.commands.parsers; import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser; import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils; import com.spectralogic.ds3client.commands.spectrads3.ModifyUserSpectraS3Response; import com.spectralogic.ds3client.models.SpectraUser; import com.spectralogic.ds3client.networking.WebResponse; import com.spectralogic.ds3client.serializer.XmlOutput; import java.io.IOException; import java.io.InputStream; public class ModifyUserSpectraS3ResponseParser extends AbstractResponseParser { private final int[] expectedStatusCodes = new int[]{200}; @Override public ModifyUserSpectraS3Response parseXmlResponse(final WebResponse response) throws IOException { final int statusCode = response.getStatusCode(); if (ResponseParserUtils.validateStatusCode(statusCode, expectedStatusCodes)) { switch (statusCode) { case 200: try (final InputStream inputStream = response.getResponseStream()) { final SpectraUser result = XmlOutput.fromXml(inputStream, SpectraUser.class); return new ModifyUserSpectraS3Response(result, this.getChecksum(), this.getChecksumType()); } default: assert false: ""validateStatusCode should have made it impossible to reach this line""; } } throw ResponseParserUtils.createFailedRequest(response, expectedStatusCodes); } }",0 "enerated by javadoc (version 1.7.0_91) on Tue Dec 29 12:44:17 AEDT 2015 --> org.bouncycastle.math.raw (Bouncy Castle Library 1.54 API Specification)
Bouncy Castle Cryptography Library 1.54

Package org.bouncycastle.math.raw

Math support for raw multi-precision calculations.

See: Description

Package org.bouncycastle.math.raw Description

Math support for raw multi-precision calculations.
Bouncy Castle Cryptography Library 1.54
",0 "U Public License V2.0 * @version $Id: Author: DrByte Modified in v1.6.0 $ */ $systemChecker = new systemChecker(); $dbVersion = $systemChecker->findCurrentDbVersion(); logDetails($dbVersion, 'Version detected in database_upgrade/header_php.php'); $versionArray = array(); $versionArray[] = '1.2.6'; $versionArray[] = '1.2.7'; $versionArray[] = '1.3.0'; $versionArray[] = '1.3.5'; $versionArray[] = '1.3.6'; $versionArray[] = '1.3.7'; $versionArray[] = '1.3.8'; $versionArray[] = '1.3.9'; $versionArray[] = '1.5.0'; $versionArray[] = '1.5.1'; $versionArray[] = '1.5.2'; $versionArray[] = '1.5.3'; $versionArray[] = '1.5.4'; $versionArray[] = '1.5.5'; $versionArray[] = '1.5.6'; $versionArray[] = '1.6.0'; //print_r($versionArray); $key = array_search($dbVersion, $versionArray); $newArray = array_slice($versionArray, $key + 1); //print_r($newArray); // add current IP to the view-in-maintenance-mode list $systemChecker->updateAdminIpList(); ",0 " /> * * Copyright (c) 2011, Drew Phillips * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * Any modifications to the library should be indicated clearly in the source code * to inform users that the changes are not a part of the original software.

* * If you found this script useful, please take a quick moment to rate it.
* http://www.hotscripts.com/rate/49400.html Thanks. * * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA * @link http://www.phpcaptcha.org/latest.zip Download Latest Version * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation * @copyright 2011 Drew Phillips * @author Drew Phillips * @version 3.0 (October 2011) * @package Securimage * */ require_once dirname(__FILE__) . '/securimage.php'; $img = new Securimage(); //Change some settings $img->image_width = 280; $img->image_height = 100; $img->perturbation = 0.9; // high level of distortion $img->code_length = rand(5,6); // random code length $img->image_bg_color = new Securimage_Color(""#ffffff""); $img->num_lines = 12; $img->noise_level = 5; $img->text_color = new Securimage_Color(""#000000""); $img->noise_color = $img->text_color; $img->line_color = new Securimage_Color(""#cccccc""); $img->show();",0 " simple, the structure is organized by role name that store * the name in value of the 'name' key. The capabilities are stored as an array * in the value of the 'capability' key. * * * array ( * 'rolename' => array ( * 'name' => 'rolename', * 'capabilities' => array() * ) * ) * * * @since 2.0.0 * @package WordPress * @subpackage User */ class WP_Roles { /** * List of roles and capabilities. * * @since 2.0.0 * @access public * @var array */ var $roles; /** * List of the role objects. * * @since 2.0.0 * @access public * @var array */ var $role_objects = array(); /** * List of role names. * * @since 2.0.0 * @access public * @var array */ var $role_names = array(); /** * Option name for storing role list. * * @since 2.0.0 * @access public * @var string */ var $role_key; /** * Whether to use the database for retrieval and storage. * * @since 2.1.0 * @access public * @var bool */ var $use_db = true; /** * PHP4 Constructor - Call {@link WP_Roles::_init()} method. * * @since 2.0.0 * @access public * * @return WP_Roles */ function WP_Roles() { $this->_init(); } /** * Setup the object properties. * * The role key is set to the current prefix for the $wpdb object with * 'user_roles' appended. If the $wp_user_roles global is set, then it will * be used and the role option will not be updated or used. * * @since 2.1.0 * @access protected * @uses $wpdb Used to get the database prefix. * @global array $wp_user_roles Used to set the 'roles' property value. */ function _init () { global $wpdb; global $wp_user_roles; $this->role_key = $wpdb->prefix . 'user_roles'; if ( ! empty( $wp_user_roles ) ) { $this->roles = $wp_user_roles; $this->use_db = false; } else { $this->roles = get_option( $this->role_key ); } if ( empty( $this->roles ) ) return; $this->role_objects = array(); $this->role_names = array(); foreach ( (array) $this->roles as $role => $data ) { $this->role_objects[$role] = new WP_Role( $role, $this->roles[$role]['capabilities'] ); $this->role_names[$role] = $this->roles[$role]['name']; } } /** * Add role name with capabilities to list. * * Updates the list of roles, if the role doesn't already exist. * * @since 2.0.0 * @access public * * @param string $role Role name. * @param string $display_name Role display name. * @param array $capabilities List of role capabilities. * @return null|WP_Role WP_Role object if role is added, null if already exists. */ function add_role( $role, $display_name, $capabilities = array() ) { if ( isset( $this->roles[$role] ) ) return; $this->roles[$role] = array( 'name' => $display_name, 'capabilities' => $capabilities ); if ( $this->use_db ) update_option( $this->role_key, $this->roles ); $this->role_objects[$role] = new WP_Role( $role, $capabilities ); $this->role_names[$role] = $display_name; return $this->role_objects[$role]; } /** * Remove role by name. * * @since 2.0.0 * @access public * * @param string $role Role name. */ function remove_role( $role ) { if ( ! isset( $this->role_objects[$role] ) ) return; unset( $this->role_objects[$role] ); unset( $this->role_names[$role] ); unset( $this->roles[$role] ); if ( $this->use_db ) update_option( $this->role_key, $this->roles ); } /** * Add capability to role. * * @since 2.0.0 * @access public * * @param string $role Role name. * @param string $cap Capability name. * @param bool $grant Optional, default is true. Whether role is capable of preforming capability. */ function add_cap( $role, $cap, $grant = true ) { $this->roles[$role]['capabilities'][$cap] = $grant; if ( $this->use_db ) update_option( $this->role_key, $this->roles ); } /** * Remove capability from role. * * @since 2.0.0 * @access public * * @param string $role Role name. * @param string $cap Capability name. */ function remove_cap( $role, $cap ) { unset( $this->roles[$role]['capabilities'][$cap] ); if ( $this->use_db ) update_option( $this->role_key, $this->roles ); } /** * Retrieve role object by name. * * @since 2.0.0 * @access public * * @param string $role Role name. * @return object|null Null, if role does not exist. WP_Role object, if found. */ function &get_role( $role ) { if ( isset( $this->role_objects[$role] ) ) return $this->role_objects[$role]; else return null; } /** * Retrieve list of role names. * * @since 2.0.0 * @access public * * @return array List of role names. */ function get_names() { return $this->role_names; } /** * Whether role name is currently in the list of available roles. * * @since 2.0.0 * @access public * * @param string $role Role name to look up. * @return bool */ function is_role( $role ) { return isset( $this->role_names[$role] ); } } /** * WordPress Role class. * * @since 2.0.0 * @package WordPress * @subpackage User */ class WP_Role { /** * Role name. * * @since 2.0.0 * @access public * @var string */ var $name; /** * List of capabilities the role contains. * * @since 2.0.0 * @access public * @var array */ var $capabilities; /** * PHP4 Constructor - Setup object properties. * * The list of capabilities, must have the key as the name of the capability * and the value a boolean of whether it is granted to the role or not. * * @since 2.0.0 * @access public * * @param string $role Role name. * @param array $capabilities List of capabilities. * @return WP_Role */ function WP_Role( $role, $capabilities ) { $this->name = $role; $this->capabilities = $capabilities; } /** * Assign role a capability. * * @see WP_Roles::add_cap() Method uses implementation for role. * @since 2.0.0 * @access public * * @param string $cap Capability name. * @param bool $grant Whether role has capability privilege. */ function add_cap( $cap, $grant = true ) { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); $this->capabilities[$cap] = $grant; $wp_roles->add_cap( $this->name, $cap, $grant ); } /** * Remove capability from role. * * This is a container for {@link WP_Roles::remove_cap()} to remove the * capability from the role. That is to say, that {@link * WP_Roles::remove_cap()} implements the functionality, but it also makes * sense to use this class, because you don't need to enter the role name. * * @since 2.0.0 * @access public * * @param string $cap Capability name. */ function remove_cap( $cap ) { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); unset( $this->capabilities[$cap] ); $wp_roles->remove_cap( $this->name, $cap ); } /** * Whether role has capability. * * The capabilities is passed through the 'role_has_cap' filter. The first * parameter for the hook is the list of capabilities the class has * assigned. The second parameter is the capability name to look for. The * third and final parameter for the hook is the role name. * * @since 2.0.0 * @access public * * @param string $cap Capability name. * @return bool True, if user has capability. False, if doesn't have capability. */ function has_cap( $cap ) { $capabilities = apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name ); if ( !empty( $capabilities[$cap] ) ) return $capabilities[$cap]; else return false; } } /** * WordPress User class. * * @since 2.0.0 * @package WordPress * @subpackage User */ class WP_User { /** * User data container. * * This will be set as properties of the object. * * @since 2.0.0 * @access private * @var array */ var $data; /** * The user's ID. * * @since 2.1.0 * @access public * @var int */ var $ID = 0; /** * The deprecated user's ID. * * @since 2.0.0 * @access public * @deprecated Use WP_User::$ID * @see WP_User::$ID * @var int */ var $id = 0; /** * The individual capabilities the user has been given. * * @since 2.0.0 * @access public * @var array */ var $caps = array(); /** * User metadata option name. * * @since 2.0.0 * @access public * @var string */ var $cap_key; /** * The roles the user is part of. * * @since 2.0.0 * @access public * @var array */ var $roles = array(); /** * All capabilities the user has, including individual and role based. * * @since 2.0.0 * @access public * @var array */ var $allcaps = array(); /** * First name of the user. * * Created to prevent notices. * * @since 2.7.0 * @access public * @var string */ var $first_name = ''; /** * Last name of the user. * * Created to prevent notices. * * @since 2.7.0 * @access public * @var string */ var $last_name = ''; /** * PHP4 Constructor - Sets up the object properties. * * Retrieves the userdata and then assigns all of the data keys to direct * properties of the object. Calls {@link WP_User::_init_caps()} after * setting up the object's user data properties. * * @since 2.0.0 * @access public * * @param int|string $id User's ID or username * @param int $name Optional. User's username * @return WP_User */ function WP_User( $id, $name = '' ) { if ( empty( $id ) && empty( $name ) ) return; if ( ! is_numeric( $id ) ) { $name = $id; $id = 0; } if ( ! empty( $id ) ) $this->data = get_userdata( $id ); else $this->data = get_userdatabylogin( $name ); if ( empty( $this->data->ID ) ) return; foreach ( get_object_vars( $this->data ) as $key => $value ) { $this->{$key} = $value; } $this->id = $this->ID; $this->_init_caps(); } /** * Setup capability object properties. * * Will set the value for the 'cap_key' property to current database table * prefix, followed by 'capabilities'. Will then check to see if the * property matching the 'cap_key' exists and is an array. If so, it will be * used. * * @since 2.1.0 * @access protected */ function _init_caps() { global $wpdb; $this->cap_key = $wpdb->prefix . 'capabilities'; $this->caps = &$this->{$this->cap_key}; if ( ! is_array( $this->caps ) ) $this->caps = array(); $this->get_role_caps(); } /** * Retrieve all of the role capabilities and merge with individual capabilities. * * All of the capabilities of the roles the user belongs to are merged with * the users individual roles. This also means that the user can be denied * specific roles that their role might have, but the specific user isn't * granted permission to. * * @since 2.0.0 * @uses $wp_roles * @access public */ function get_role_caps() { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); //Filter out caps that are not role names and assign to $this->roles if ( is_array( $this->caps ) ) $this->roles = array_filter( array_keys( $this->caps ), array( &$wp_roles, 'is_role' ) ); //Build $allcaps from role caps, overlay user's $caps $this->allcaps = array(); foreach ( (array) $this->roles as $role ) { $role = $wp_roles->get_role( $role ); $this->allcaps = array_merge( $this->allcaps, $role->capabilities ); } $this->allcaps = array_merge( $this->allcaps, $this->caps ); } /** * Add role to user. * * Updates the user's meta data option with capabilities and roles. * * @since 2.0.0 * @access public * * @param string $role Role name. */ function add_role( $role ) { $this->caps[$role] = true; update_usermeta( $this->ID, $this->cap_key, $this->caps ); $this->get_role_caps(); $this->update_user_level_from_caps(); } /** * Remove role from user. * * @since 2.0.0 * @access public * * @param string $role Role name. */ function remove_role( $role ) { if ( empty( $this->roles[$role] ) || ( count( $this->roles ) <= 1 ) ) return; unset( $this->caps[$role] ); update_usermeta( $this->ID, $this->cap_key, $this->caps ); $this->get_role_caps(); } /** * Set the role of the user. * * This will remove the previous roles of the user and assign the user the * new one. You can set the role to an empty string and it will remove all * of the roles from the user. * * @since 2.0.0 * @access public * * @param string $role Role name. */ function set_role( $role ) { foreach ( (array) $this->roles as $oldrole ) unset( $this->caps[$oldrole] ); if ( !empty( $role ) ) { $this->caps[$role] = true; $this->roles = array( $role => true ); } else { $this->roles = false; } update_usermeta( $this->ID, $this->cap_key, $this->caps ); $this->get_role_caps(); $this->update_user_level_from_caps(); } /** * Choose the maximum level the user has. * * Will compare the level from the $item parameter against the $max * parameter. If the item is incorrect, then just the $max parameter value * will be returned. * * Used to get the max level based on the capabilities the user has. This * is also based on roles, so if the user is assigned the Administrator role * then the capability 'level_10' will exist and the user will get that * value. * * @since 2.0.0 * @access public * * @param int $max Max level of user. * @param string $item Level capability name. * @return int Max Level. */ function level_reduction( $max, $item ) { if ( preg_match( '/^level_(10|[0-9])$/i', $item, $matches ) ) { $level = intval( $matches[1] ); return max( $max, $level ); } else { return $max; } } /** * Update the maximum user level for the user. * * Updates the 'user_level' user metadata (includes prefix that is the * database table prefix) with the maximum user level. Gets the value from * the all of the capabilities that the user has. * * @since 2.0.0 * @access public */ function update_user_level_from_caps() { global $wpdb; $this->user_level = array_reduce( array_keys( $this->allcaps ), array( &$this, 'level_reduction' ), 0 ); update_usermeta( $this->ID, $wpdb->prefix.'user_level', $this->user_level ); } /** * Add capability and grant or deny access to capability. * * @since 2.0.0 * @access public * * @param string $cap Capability name. * @param bool $grant Whether to grant capability to user. */ function add_cap( $cap, $grant = true ) { $this->caps[$cap] = $grant; update_usermeta( $this->ID, $this->cap_key, $this->caps ); } /** * Remove capability from user. * * @since 2.0.0 * @access public * * @param string $cap Capability name. */ function remove_cap( $cap ) { if ( empty( $this->caps[$cap] ) ) return; unset( $this->caps[$cap] ); update_usermeta( $this->ID, $this->cap_key, $this->caps ); } /** * Remove all of the capabilities of the user. * * @since 2.1.0 * @access public */ function remove_all_caps() { global $wpdb; $this->caps = array(); update_usermeta( $this->ID, $this->cap_key, '' ); update_usermeta( $this->ID, $wpdb->prefix.'user_level', '' ); $this->get_role_caps(); } /** * Whether user has capability or role name. * * This is useful for looking up whether the user has a specific role * assigned to the user. The second optional parameter can also be used to * check for capabilities against a specfic post. * * @since 2.0.0 * @access public * * @param string|int $cap Capability or role name to search. * @param int $post_id Optional. Post ID to check capability against specific post. * @return bool True, if user has capability; false, if user does not have capability. */ function has_cap( $cap ) { if ( is_numeric( $cap ) ) $cap = $this->translate_level_to_cap( $cap ); $args = array_slice( func_get_args(), 1 ); $args = array_merge( array( $cap, $this->ID ), $args ); $caps = call_user_func_array( 'map_meta_cap', $args ); // Must have ALL requested caps $capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args ); foreach ( (array) $caps as $cap ) { //echo ""Checking cap $cap
""; if ( empty( $capabilities[$cap] ) || !$capabilities[$cap] ) return false; } return true; } /** * Convert numeric level to level capability name. * * Prepends 'level_' to level number. * * @since 2.0.0 * @access public * * @param int $level Level number, 1 to 10. * @return string */ function translate_level_to_cap( $level ) { return 'level_' . $level; } } /** * Map meta capabilities to primitive capabilities. * * This does not actually compare whether the user ID has the actual capability, * just what the capability or capabilities are. Meta capability list value can * be 'delete_user', 'edit_user', 'delete_post', 'delete_page', 'edit_post', * 'edit_page', 'read_post', or 'read_page'. * * @since 2.0.0 * * @param string $cap Capability name. * @param int $user_id User ID. * @return array Actual capabilities for meta capability. */ function map_meta_cap( $cap, $user_id ) { $args = array_slice( func_get_args(), 2 ); $caps = array(); switch ( $cap ) { case 'delete_user': $caps[] = 'delete_users'; break; case 'edit_user': if ( !isset( $args[0] ) || $user_id != $args[0] ) { $caps[] = 'edit_users'; } break; case 'delete_post': $author_data = get_userdata( $user_id ); //echo ""post ID: {$args[0]}
""; $post = get_post( $args[0] ); if ( 'page' == $post->post_type ) { $args = array_merge( array( 'delete_page', $user_id ), $args ); return call_user_func_array( 'map_meta_cap', $args ); } $post_author_data = get_userdata( $post->post_author ); //echo ""current user id : $user_id, post author id: "" . $post_author_data->ID . ""
""; // If the user is the author... if ( $user_id == $post_author_data->ID ) { // If the post is published... if ( 'publish' == $post->post_status ) $caps[] = 'delete_published_posts'; else // If the post is draft... $caps[] = 'delete_posts'; } else { // The user is trying to edit someone else's post. $caps[] = 'delete_others_posts'; // The post is published, extra cap required. if ( 'publish' == $post->post_status ) $caps[] = 'delete_published_posts'; elseif ( 'private' == $post->post_status ) $caps[] = 'delete_private_posts'; } break; case 'delete_page': $author_data = get_userdata( $user_id ); //echo ""post ID: {$args[0]}
""; $page = get_page( $args[0] ); $page_author_data = get_userdata( $page->post_author ); //echo ""current user id : $user_id, page author id: "" . $page_author_data->ID . ""
""; // If the user is the author... if ( $user_id == $page_author_data->ID ) { // If the page is published... if ( $page->post_status == 'publish' ) $caps[] = 'delete_published_pages'; else // If the page is draft... $caps[] = 'delete_pages'; } else { // The user is trying to edit someone else's page. $caps[] = 'delete_others_pages'; // The page is published, extra cap required. if ( $page->post_status == 'publish' ) $caps[] = 'delete_published_pages'; elseif ( $page->post_status == 'private' ) $caps[] = 'delete_private_pages'; } break; // edit_post breaks down to edit_posts, edit_published_posts, or // edit_others_posts case 'edit_post': $author_data = get_userdata( $user_id ); //echo ""post ID: {$args[0]}
""; $post = get_post( $args[0] ); if ( 'page' == $post->post_type ) { $args = array_merge( array( 'edit_page', $user_id ), $args ); return call_user_func_array( 'map_meta_cap', $args ); } $post_author_data = get_userdata( $post->post_author ); //echo ""current user id : $user_id, post author id: "" . $post_author_data->ID . ""
""; // If the user is the author... if ( $user_id == $post_author_data->ID ) { // If the post is published... if ( 'publish' == $post->post_status ) $caps[] = 'edit_published_posts'; else // If the post is draft... $caps[] = 'edit_posts'; } else { // The user is trying to edit someone else's post. $caps[] = 'edit_others_posts'; // The post is published, extra cap required. if ( 'publish' == $post->post_status ) $caps[] = 'edit_published_posts'; elseif ( 'private' == $post->post_status ) $caps[] = 'edit_private_posts'; } break; case 'edit_page': $author_data = get_userdata( $user_id ); //echo ""post ID: {$args[0]}
""; $page = get_page( $args[0] ); $page_author_data = get_userdata( $page->post_author ); //echo ""current user id : $user_id, page author id: "" . $page_author_data->ID . ""
""; // If the user is the author... if ( $user_id == $page_author_data->ID ) { // If the page is published... if ( 'publish' == $page->post_status ) $caps[] = 'edit_published_pages'; else // If the page is draft... $caps[] = 'edit_pages'; } else { // The user is trying to edit someone else's page. $caps[] = 'edit_others_pages'; // The page is published, extra cap required. if ( 'publish' == $page->post_status ) $caps[] = 'edit_published_pages'; elseif ( 'private' == $page->post_status ) $caps[] = 'edit_private_pages'; } break; case 'read_post': $post = get_post( $args[0] ); if ( 'page' == $post->post_type ) { $args = array_merge( array( 'read_page', $user_id ), $args ); return call_user_func_array( 'map_meta_cap', $args ); } if ( 'private' != $post->post_status ) { $caps[] = 'read'; break; } $author_data = get_userdata( $user_id ); $post_author_data = get_userdata( $post->post_author ); if ( $user_id == $post_author_data->ID ) $caps[] = 'read'; else $caps[] = 'read_private_posts'; break; case 'read_page': $page = get_page( $args[0] ); if ( 'private' != $page->post_status ) { $caps[] = 'read'; break; } $author_data = get_userdata( $user_id ); $page_author_data = get_userdata( $page->post_author ); if ( $user_id == $page_author_data->ID ) $caps[] = 'read'; else $caps[] = 'read_private_pages'; break; default: // If no meta caps match, return the original cap. $caps[] = $cap; } return $caps; } /** * Whether current user has capability or role. * * @since 2.0.0 * * @param string $capability Capability or role name. * @return bool */ function current_user_can( $capability ) { $current_user = wp_get_current_user(); if ( empty( $current_user ) ) return false; $args = array_slice( func_get_args(), 1 ); $args = array_merge( array( $capability ), $args ); return call_user_func_array( array( &$current_user, 'has_cap' ), $args ); } /** * Retrieve role object. * * @see WP_Roles::get_role() Uses method to retrieve role object. * @since 2.0.0 * * @param string $role Role name. * @return object */ function get_role( $role ) { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); return $wp_roles->get_role( $role ); } /** * Add role, if it does not exist. * * @see WP_Roles::add_role() Uses method to add role. * @since 2.0.0 * * @param string $role Role name. * @param string $display_name Display name for role. * @param array $capabilities List of capabilities. * @return null|WP_Role WP_Role object if role is added, null if already exists. */ function add_role( $role, $display_name, $capabilities = array() ) { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); return $wp_roles->add_role( $role, $display_name, $capabilities ); } /** * Remove role, if it exists. * * @see WP_Roles::remove_role() Uses method to remove role. * @since 2.0.0 * * @param string $role Role name. * @return null */ function remove_role( $role ) { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); return $wp_roles->remove_role( $role ); } ?> ",0 "GNU General Public License, version 3. //See terms in COPYING file or package ar.gov.rosario.siat.rec.view.struts; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import ar.gov.rosario.siat.base.view.struts.BaseDispatchAction; import ar.gov.rosario.siat.base.view.util.BaseConstants; import ar.gov.rosario.siat.base.view.util.UserSession; import ar.gov.rosario.siat.gde.iface.model.NovedadRSAdapter; import ar.gov.rosario.siat.rec.iface.model.NovedadRSVO; import ar.gov.rosario.siat.rec.iface.service.RecServiceLocator; import ar.gov.rosario.siat.rec.iface.util.RecError; import ar.gov.rosario.siat.rec.iface.util.RecSecurityConstants; import ar.gov.rosario.siat.rec.view.util.RecConstants; import coop.tecso.demoda.iface.helper.DemodaUtil; import coop.tecso.demoda.iface.model.CommonKey; import coop.tecso.demoda.iface.model.NavModel; public final class AdministrarNovedadRSDAction extends BaseDispatchAction { private Log log = LogFactory.getLog(AdministrarNovedadRSDAction.class); public ActionForward inicializar(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String funcName = DemodaUtil.currentMethodName(); String act = getCurrentAct(request); if (log.isDebugEnabled()) log.debug(""entrando en "" + funcName); UserSession userSession = canAccess(request, mapping, RecSecurityConstants.ABM_NOVEDADRS, act); if (userSession == null) return forwardErrorSession(request); NavModel navModel = userSession.getNavModel(); NovedadRSAdapter novedadRSAdapterVO = null; String stringServicio = """"; ActionForward actionForward = null; try { CommonKey commonKey = new CommonKey(navModel.getSelectedId()); if (navModel.getAct().equals(BaseConstants.ACT_VER)) { stringServicio = ""getNovedadRSAdapterForView(userSession, commonKey)""; novedadRSAdapterVO = RecServiceLocator.getDreiService().getNovedadRSAdapterForView(userSession, commonKey); actionForward = mapping.findForward(RecConstants.FWD_NOVEDADRS_VIEW_ADAPTER); } if (navModel.getAct().equals(BaseConstants.ACT_APLICAR)) { stringServicio = ""getNovedadRSAdapterForUpdate(userSession, commonKey)""; novedadRSAdapterVO = RecServiceLocator.getDreiService().getNovedadRSAdapterForSimular(userSession, commonKey); novedadRSAdapterVO.addMessage(RecError.NOVEDADRS_MSG_APLICAR); actionForward = mapping.findForward(RecConstants.FWD_NOVEDADRS_EDIT_ADAPTER); } if (navModel.getAct().equals(RecConstants.ACT_APLICAR_MASIVO_NOVEDADRS)) { stringServicio = ""getNovedadRSAdapterForMasivo(userSession)""; novedadRSAdapterVO = RecServiceLocator.getDreiService().getNovedadRSAdapterForMasivo(userSession); novedadRSAdapterVO.addMessage(RecError.NOVEDADRS_MSG_APLICAR_MASIVO); actionForward = mapping.findForward(RecConstants.FWD_NOVEDADRS_VIEW_ADAPTER); } if (log.isDebugEnabled()) log.debug(funcName + "" salimos de servicio: "" + stringServicio ); // Nunca Tiene errores recuperables // Tiene errores no recuperables if (novedadRSAdapterVO.hasErrorNonRecoverable()) { log.error(""error en: "" + funcName + "": servicio: "" + stringServicio + "": "" + novedadRSAdapterVO.errorString()); return forwardErrorNonRecoverable(mapping, request, funcName, NovedadRSAdapter.NAME, novedadRSAdapterVO); } // Seteo los valores de navegacion en el adapter novedadRSAdapterVO.setValuesFromNavModel(navModel); if (log.isDebugEnabled()) log.debug(funcName + "": "" + NovedadRSAdapter.NAME + "": "" + novedadRSAdapterVO.infoString()); // Envio el VO al request request.setAttribute(NovedadRSAdapter.NAME, novedadRSAdapterVO); // Subo el apdater al userSession userSession.put(NovedadRSAdapter.NAME, novedadRSAdapterVO); saveDemodaMessages(request, novedadRSAdapterVO); return actionForward; } catch (Exception exception) { return baseException(mapping, request, funcName, exception, NovedadRSAdapter.NAME); } } public ActionForward aplicar(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String funcName = DemodaUtil.currentMethodName(); if (log.isDebugEnabled()) log.debug(""entrando en "" + funcName); UserSession userSession = canAccess(request, mapping, RecSecurityConstants.ABM_NOVEDADRS, RecSecurityConstants.MTD_APLICAR); if (userSession==null) return forwardErrorSession(request); try { // Bajo el adapter del userSession NovedadRSAdapter novedadRSAdapterVO = (NovedadRSAdapter) userSession.get(NovedadRSAdapter.NAME); // Si es nulo no se puede continuar if (novedadRSAdapterVO == null) { log.error(""error en: "" + funcName + "": "" + NovedadRSAdapter.NAME + "" IS NULL. No se pudo obtener de la sesion""); return forwardErrorSessionNullObject(mapping, request, funcName, NovedadRSAdapter.NAME); } // llamada al servicio NovedadRSVO novedadRSVO = RecServiceLocator.getDreiService().aplicarNovedadRS(userSession, novedadRSAdapterVO.getNovedadRS()); // Tiene errores recuperables if (novedadRSVO.hasErrorRecoverable()) { log.error(""recoverable error en: "" + funcName + "": "" + novedadRSAdapterVO.infoString()); saveDemodaErrors(request, novedadRSVO); return forwardErrorRecoverable(mapping, request, userSession, NovedadRSAdapter.NAME, novedadRSAdapterVO); } // Tiene errores no recuperables if (novedadRSVO.hasErrorNonRecoverable()) { log.error(""error en: "" + funcName + "": "" + novedadRSAdapterVO.errorString()); return forwardErrorNonRecoverable(mapping, request, funcName, NovedadRSAdapter.NAME, novedadRSAdapterVO); } // Fue Exitoso return forwardConfirmarOk(mapping, request, funcName, NovedadRSAdapter.NAME); } catch (Exception exception) { return baseException(mapping, request, funcName, exception, NovedadRSAdapter.NAME); } } public ActionForward aplicarMasivo(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String funcName = DemodaUtil.currentMethodName(); if (log.isDebugEnabled()) log.debug(""entrando en "" + funcName); UserSession userSession = canAccess(request, mapping, RecSecurityConstants.ABM_NOVEDADRS, RecSecurityConstants.MTD_APLICARMASIVO); if (userSession==null) return forwardErrorSession(request); try { // Bajo el adapter del userSession NovedadRSAdapter novedadRSAdapterVO = (NovedadRSAdapter) userSession.get(NovedadRSAdapter.NAME); // Si es nulo no se puede continuar if (novedadRSAdapterVO == null) { log.error(""error en: "" + funcName + "": "" + NovedadRSAdapter.NAME + "" IS NULL. No se pudo obtener de la sesion""); return forwardErrorSessionNullObject(mapping, request, funcName, NovedadRSAdapter.NAME); } // Recuperamos datos del form en el vo DemodaUtil.populateVO(novedadRSAdapterVO, request); // Tiene errores recuperables if (novedadRSAdapterVO.hasErrorRecoverable()) { log.error(""recoverable error en: "" + funcName + "": "" + novedadRSAdapterVO.infoString()); saveDemodaErrors(request, novedadRSAdapterVO); return forwardErrorRecoverable(mapping, request, userSession, NovedadRSAdapter.NAME, novedadRSAdapterVO); } // llamada al servicio novedadRSAdapterVO = RecServiceLocator.getDreiService().aplicarMasivoNovedadRS(userSession,novedadRSAdapterVO); // Tiene errores recuperables if (novedadRSAdapterVO.hasErrorRecoverable()) { log.error(""recoverable error en: "" + funcName + "": "" + novedadRSAdapterVO.infoString()); saveDemodaErrors(request, novedadRSAdapterVO); return forwardErrorRecoverable(mapping, request, userSession, NovedadRSAdapter.NAME, novedadRSAdapterVO, RecConstants.FWD_NOVEDADRS_VIEW_ADAPTER); } // Tiene errores no recuperables if (novedadRSAdapterVO.hasErrorNonRecoverable()) { log.error(""error en: "" + funcName + "": "" + novedadRSAdapterVO.errorString()); return forwardErrorNonRecoverable(mapping, request, funcName, NovedadRSAdapter.NAME, novedadRSAdapterVO); } // Fue Exitoso return forwardConfirmarOk(mapping, request, funcName, NovedadRSAdapter.NAME); } catch (Exception exception) { return baseException(mapping, request, funcName, exception, NovedadRSAdapter.NAME); } } public ActionForward volver(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return baseVolver(mapping, form, request, response, NovedadRSAdapter.NAME); } public ActionForward refill(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String funcName = DemodaUtil.currentMethodName(); return baseRefill(mapping, form, request, response, funcName, NovedadRSAdapter.NAME); } } ",0 ".RLMResults.pvalues — statsmodels v0.10.2 documentation

statsmodels.robust.robust_linear_model.RLMResults.pvalues

method

RLMResults.pvalues()[source]

The two-tailed p values for the t-stats of the params.

© Copyright 2009-2018, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers. Created using Sphinx 2.2.1.
",0 " => 'JIRA Vorgänge', 'tbclorder_jxjiraconnect' => 'JIRA Vorgänge', 'jxjiraconnect_menu' => 'JIRA Vorgänge', 'JXJIRA_OPENISSUE' => 'Vorgang offen', 'JXJIRA_OPENISSUES' => 'Vorgänge offen', 'JXJIRA_STATUSICON' => 'S', 'JXJIRA_KEY' => 'Schlüssel', 'JXJIRA_SUMMARY' => 'Zusammenfasung', 'JXJIRA_PRIORITY' => 'Priorität', 'JXJIRA_STATUS' => 'Status', 'JXJIRA_CREATED' => 'Erstellt', 'JXJIRA_CREATOR' => 'Autor', 'JXJIRA_DUEDATE' => 'Fällig am', 'JXJIRA_DESCRIPTION' => 'Beschreibung', 'JXJIRA_ISSUETYPE_ACCESS' => 'Zugriff', 'JXJIRA_ISSUETYPE_BUG' => 'Fehler/Mangel', 'JXJIRA_ISSUETYPE_FAULT' => 'Störung', 'JXJIRA_ISSUETYPE_PURCHASE' => 'Bestellung', 'JXJIRA_ISSUETYPE_TASK' => 'Aufgabe', 'JXJIRA_PRIORITY_1' => 'Blocker', 'JXJIRA_PRIORITY_2' => 'Kritisch', 'JXJIRA_PRIORITY_3' => 'Wichtig', 'JXJIRA_PRIORITY_4' => 'Unwesentlich', 'JXJIRA_PRIORITY_5' => 'Trivial', 'SHOP_MODULE_GROUP_JXJIRACONNECT_SERVER' => 'JIRA Server', 'SHOP_MODULE_sJxJiraConnectServerUrl' => 'Server URL', 'SHOP_MODULE_sJxJiraConnectProject' => 'JIRA Projekt Schlüssel', 'SHOP_MODULE_GROUP_JXJIRACONNECT_LOGIN' => 'JIRA-Anmeldung', 'SHOP_MODULE_sJxJiraConnectUser' => 'Benutzer', 'SHOP_MODULE_sJxJiraConnectPassword' => 'Passwort', 'SHOP_MODULE_GROUP_JXJIRACONNECT_DEFAULTS' => 'Standard Werte', 'SHOP_MODULE_sJxJiraConnectProject' => 'Projekt Schlüssel', 'SHOP_MODULE_sJxJiraConnectAssignee' => 'Bearbeiter', 'SHOP_MODULE_GROUP_JXJIRACONNECT_FIELDS' => 'Benutzerdefinierte Jira-Felder', 'SHOP_MODULE_sJxJiraConnectCustomerNumber' => 'Feld ID für Kundennummer', 'SHOP_MODULE_sJxJiraConnectCustomerEMail' => 'Feld ID für Kunden E-Mail', ); ",0 ": String ,conditionSelected : Long ) @implicitFieldConstructor = @{ helper.FieldConstructor(twitterBootstrapInput.render) } @main(""My Requests"") {

Create a Book Request

@helper.form(action = routes.CurrentRequest.newRequest()) {
Book
@for(book <- books) { @if(bookSelected == book.getPrimaryKey()){ }}
Version ISBN Bookstore Price Cover
Condition
Price




}






@message

@for(request <- requests) { }
Book Condition Request Price
@request.getBook().getTitle() @request.getCondition().getName()
@if(requests.size() ==0){ No Current Requests}
} ",0 " io.parcoord.db.MakeTableModel; import java.awt.BasicStroke; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.IOException; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.Map.Entry; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSlider; import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import javax.swing.JTable; import javax.swing.ListSelectionModel; import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.metal.MetalLookAndFeel; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableModel; import javax.swing.table.TableRowSorter; import model.graph.Edge; import model.graph.EdgeSetValueMaker; import model.graph.GraphFilter; import model.graph.GraphModel; import model.graph.impl.SymmetricGraphInstance; import model.matrix.DefaultMatrixTableModel; import model.matrix.MatrixTableModel; import model.shared.selection.LinkedGraphMatrixSelectionModelBridge; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.node.MissingNode; import org.codehaus.jackson.node.ObjectNode; import swingPlus.graph.GraphCellRenderer; import swingPlus.graph.JGraph; import swingPlus.graph.force.impl.BarnesHut2DForceCalculator; import swingPlus.graph.force.impl.EdgeWeightedAttractor; import swingPlus.matrix.JHeaderRenderer; import swingPlus.matrix.JMatrix; import swingPlus.parcoord.JColumnList; import swingPlus.parcoord.JColumnList2; import swingPlus.parcoord.JParCoord; import swingPlus.shared.MyFrame; import swingPlus.tablelist.ColumnSortControl; import swingPlus.tablelist.JEditableVarColTable; import ui.StackedRowTableUI; import util.Messages; import util.colour.ColorUtilities; import util.ui.NewMetalTheme; import util.ui.VerticalLabelUI; import example.graph.renderers.node.NodeDegreeGraphCellRenderer; import example.multiview.renderers.edge.EdgeCountFatEdgeRenderer; import example.multiview.renderers.matrix.JSONObjHeaderRenderer; import example.multiview.renderers.matrix.KeyedDataHeaderRenderer; import example.multiview.renderers.matrix.NumberShadeRenderer; import example.multiview.renderers.node.JSONNodeTypeGraphRenderer; import example.multiview.renderers.node.JSONTooltipGraphCellRenderer; import example.multiview.renderers.node.KeyedDataGraphCellRenderer; import example.multiview.renderers.node.TableTooltipGraphCellRenderer; import example.multiview.renderers.node.valuemakers.NodeTotalEdgeWeightValueMaker; import example.tablelist.renderers.ColourBarCellRenderer; public class NapierDBVis { static final Logger LOGGER = Logger.getLogger (NapierDBVis.class); /** * @param args */ public static void main (final String[] args) { //final MetalLookAndFeel lf = new MetalLookAndFeel(); MetalLookAndFeel.setCurrentTheme (new NewMetalTheme()); PropertyConfigurator.configure (Messages.makeProperties (""log4j"")); new NapierDBVis (); } public NapierDBVis () { TableModel tableModel = null; GraphModel graph = null; TableModel listTableModel = null; MatrixTableModel matrixModel = null; Map nodeTypeMap = null; final Properties connectionProperties = Messages.makeProperties (""dbconnect"", this.getClass(), false); final Properties queryProperties = Messages.makeProperties (""queries"", this.getClass(), false); final Connect connect = ConnectFactory.getConnect (connectionProperties); //ResultSet resultSet = null; Statement stmt; try { stmt = connect.getConnection().createStatement(); //final ResultSet resultSet = stmt.executeQuery (""Select * from people where peopleid>0;""); final String peopleDataQuery = queryProperties.get (""PeopleData"").toString(); System.err.println (peopleDataQuery); final ResultSet peopleDataResultSet = stmt.executeQuery (peopleDataQuery); final MakeTableModel mtm2 = new MakeTableModel(); tableModel = mtm2.makeTable (peopleDataResultSet); //final ResultSet resultSet = stmt.executeQuery (""Select * from people where peopleid>0;""); final String pubJoinQuery = queryProperties.get (""PublicationJoin"").toString(); System.err.println (pubJoinQuery); final ResultSet pubJoinResultSet = stmt.executeQuery (pubJoinQuery); //FormatResultSet.getInstance().printResultSet (resultSet); final MakeTableModel mtm = new MakeTableModel(); TableModel tableModel2 = mtm.makeTable (pubJoinResultSet); //final DatabaseMetaData dmd = connect.getConnection().getMetaData(); //final ResultSet resultSet2 = dmd.getProcedures (connect.getConnection().getCatalog(), null, ""%""); //FormatResultSet.getInstance().printResultSet (resultSet2); final String pubsByYearQuery = queryProperties.get (""PubsByYear"").toString(); System.err.println (pubsByYearQuery); final ResultSet pubsByYearResultSet = stmt.executeQuery (pubsByYearQuery); final MakeTableModel mtm3 = new MakeTableModel(); TableModel tableModel3 = mtm3.makeTable (pubsByYearResultSet); listTableModel = makePubByYearTable (tableModel3); Map keyDataMap = makeKeyedDataMap (tableModel, 0, 1); graph = makeGraph (keyDataMap, ""peopleid"", tableModel2); matrixModel = new DefaultMatrixTableModel (graph); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); connect.close(); } connect.close(); System.err.println (tableModel == null ? ""no model"" : ""tableModel rows: ""+tableModel.getRowCount()+"", cols: ""+tableModel.getColumnCount()); /* try { final ObjectMapper objMapper = new ObjectMapper (); final JsonNode rootNode = objMapper.readValue (new File (fileName), JsonNode.class); LOGGER.info (""rootnode: ""+rootNode); final JSONStructureMaker structureMaker = new JSONStructureMaker (rootNode); graph = structureMaker.makeGraph (new String[] {""people""}, new String[] {""publications"", ""grants""}); //graph = structureMaker.makeGraph (new String[] {""grants""}, new String[] {""publications"", ""people""}); //graph = structureMaker.makeGraph (new String[] {""publications"", ""people"", ""grants""}, new String[] {""people""}); //tableModel = structureMaker.makeTable (""publications""); tableModel = structureMaker.makeTable (""people""); matrixModel = new DefaultMatrixTableModel (graph); nodeTypeMap = structureMaker.makeNodeTypeMap (new String[] {""publications"", ""people"", ""grants""}); } catch (JsonParseException e) { e.printStackTrace(); } catch (JsonMappingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } */ Map keyRowMap = makeKeyRowMap (tableModel, 0); final JGraph jgraph = new JGraph (graph); final EdgeWeightedAttractor edgeWeighter = new EdgeWeightedAttractor (); jgraph.setAttractiveForceCalculator (edgeWeighter); jgraph.setShowEdges (true); final EdgeSetValueMaker weightedEdgeMaker = new NodeTotalEdgeWeightValueMaker (); //final GraphCellRenderer tableTupleRenderer = new TableTupleGraphRenderer (tableModel, keyRowMap); final GraphCellRenderer jsonGraphRenderer = new JSONNodeTypeGraphRenderer (nodeTypeMap); jgraph.setDefaultNodeRenderer (String.class, new NodeDegreeGraphCellRenderer (10.0)); jgraph.setDefaultNodeRenderer (JsonNode.class, jsonGraphRenderer); jgraph.setDefaultNodeRenderer (ObjectNode.class, jsonGraphRenderer); jgraph.setDefaultNodeRenderer (KeyedData.class, new KeyedDataGraphCellRenderer (weightedEdgeMaker)); jgraph.setDefaultEdgeRenderer (Integer.class, new EdgeCountFatEdgeRenderer ()); jgraph.setDefaultNodeToolTipRenderer (KeyedData.class, new TableTooltipGraphCellRenderer ()); final JTable pubTable = new JEditableVarColTable (listTableModel); //final JTable jtable3 = new JTable (dtm); pubTable.setSelectionMode (ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); pubTable.setRowSelectionAllowed (true); //jt2.setColumnSelectionAllowed (true); pubTable.setRowSorter (new TableRowSorter ((DefaultTableModel)listTableModel)); final StackedRowTableUI tlui = new StackedRowTableUI (); pubTable.setUI (tlui); tlui.setRelativeLayout (true); final Color[] columnColours = new Color [pubTable.getColumnCount() - 1]; for (int n = 0; n < columnColours.length; n++) { double perc = (double)n / columnColours.length; columnColours[n] = ColorUtilities.mixColours (Color.orange, new Color (0, 128, 255), (float)perc); } pubTable.getTableHeader().setReorderingAllowed(true); pubTable.getTableHeader().setResizingAllowed(false); System.err.println (""ptc: ""+pubTable.getColumnModel().getColumnCount()); for (int col = 1; col < pubTable.getColumnCount(); col++) { System.err.println (""col: ""+col+"", ptyc: ""+pubTable.getColumnModel().getColumn(col)); pubTable.getColumnModel().getColumn(col).setCellRenderer (new ColourBarCellRenderer (columnColours [(col - 1) % columnColours.length])); } final JColumnList jcl = new JColumnList (pubTable) { @Override public boolean isCellEditable (final int row, final int column) { return super.isCellEditable (row, column) && row > 0; } }; //jcl.addTable (pubTable); final JMatrix jmatrix = new JMatrix ((TableModel) matrixModel); //final JHeaderRenderer stringHeader = new JSONObjHeaderRenderer (); //final JHeaderRenderer stringHeader2 = new JSONObjHeaderRenderer (); final JHeaderRenderer stringHeader = new KeyedDataHeaderRenderer (); final JHeaderRenderer stringHeader2 = new KeyedDataHeaderRenderer (); jmatrix.getRowHeader().setDefaultRenderer (Object.class, stringHeader); jmatrix.getRowHeader().setDefaultRenderer (String.class, stringHeader); jmatrix.getColumnHeader().setDefaultRenderer (Object.class, stringHeader2); jmatrix.getColumnHeader().setDefaultRenderer (String.class, stringHeader2); ((JLabel)stringHeader2).setUI (new VerticalLabelUI (false)); stringHeader.setSelectionBackground (jmatrix.getRowHeader()); stringHeader2.setSelectionBackground (jmatrix.getColumnHeader()); //jmatrix.setDefaultRenderer (HashSet.class, stringHeader); jmatrix.setDefaultRenderer (String.class, stringHeader); jmatrix.setDefaultRenderer (Integer.class, new NumberShadeRenderer ()); final JTable table = new JParCoord (tableModel); table.setSelectionMode (ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); table.setRowSelectionAllowed (true); table.setAutoCreateRowSorter (true); table.setColumnSelectionAllowed (true); table.setForeground (Color.lightGray); table.setSelectionForeground (Color.orange); if (table instanceof JParCoord) { ((JParCoord)table).setBrushForegroundColour (Color.gray); ((JParCoord)table).setBrushSelectionColour (Color.red); ((JParCoord)table).setSelectedStroke (new BasicStroke (2.0f)); //((JParCoord)table).setBrushing (true); } table.setGridColor (Color.gray); table.setShowVerticalLines (false); table.setBorder (BorderFactory.createEmptyBorder (24, 2, 24, 2)); if (table.getRowSorter() instanceof TableRowSorter) { final TableRowSorter trs = (TableRowSorter)table.getRowSorter(); } table.setAutoResizeMode (JTable.AUTO_RESIZE_OFF); /* jgraph.setPreferredSize (new Dimension (768, 640)); table.setPreferredSize (new Dimension (768, 384)); table.setMinimumSize (new Dimension (256, 128)); final LinkedGraphMatrixSelectionModelBridge selectionBridge = new LinkedGraphMatrixSelectionModelBridge (); selectionBridge.addJGraph (jgraph); selectionBridge.addJTable (table); selectionBridge.addJTable (jmatrix); */ SwingUtilities.invokeLater ( new Runnable () { @Override public void run() { final JFrame jf2 = new MyFrame (""JGraph Demo""); jf2.setSize (1024, 768); final JPanel optionPanel = new JPanel (); optionPanel.setLayout (new BoxLayout (optionPanel, BoxLayout.Y_AXIS)); final JSlider llengthSlider = new JSlider (20, 1000, (int)edgeWeighter.getLinkLength()); llengthSlider.addChangeListener( new ChangeListener () { @Override public void stateChanged (final ChangeEvent cEvent) { edgeWeighter.setLinkLength (llengthSlider.getValue()); } } ); final JSlider lstiffSlider = new JSlider (20, 1000, edgeWeighter.getStiffness()); lstiffSlider.addChangeListener( new ChangeListener () { @Override public void stateChanged (final ChangeEvent cEvent) { edgeWeighter.setStiffness (lstiffSlider.getValue()); } } ); final JSlider repulseSlider = new JSlider (1, 50, 10); repulseSlider.addChangeListener( new ChangeListener () { @Override public void stateChanged (final ChangeEvent cEvent) { ((BarnesHut2DForceCalculator)jgraph.getRepulsiveForceCalculator()).setAttenuator (3.0 / repulseSlider.getValue()); } } ); final JCheckBox showSingletons = new JCheckBox (""Show singletons"", true); showSingletons.addActionListener ( new ActionListener () { @Override public void actionPerformed (final ActionEvent e) { final Object source = e.getSource(); if (source instanceof JCheckBox) { final boolean selected = ((JCheckBox)source).isSelected(); final GraphFilter singletonFilter = new GraphFilter () { @Override public boolean includeNode (final Object obj) { return jgraph.getModel().getEdges(obj).size() > 0 || selected; } @Override public boolean includeEdge (final Edge edge) { return true; } }; jgraph.setGraphFilter (singletonFilter); } } } ); final JButton clearSelections = new JButton (""Clear Selections""); clearSelections.addActionListener ( new ActionListener () { @Override public void actionPerformed (ActionEvent e) { jgraph.getSelectionModel().clearSelection (); } } ); final JButton graphFreezer = new JButton (""Freeze Graph""); graphFreezer.addActionListener ( new ActionListener () { @Override public void actionPerformed (ActionEvent e) { jgraph.pauseWorker(); } } ); optionPanel.add (new JLabel (""Link Length:"")); optionPanel.add (llengthSlider); optionPanel.add (new JLabel (""Link Stiffness:"")); optionPanel.add (lstiffSlider); optionPanel.add (new JLabel (""Repulse Strength:"")); optionPanel.add (repulseSlider); optionPanel.add (showSingletons); optionPanel.add (clearSelections); optionPanel.add (graphFreezer); JPanel listTablePanel = new JPanel (new BorderLayout ()); listTablePanel.add (new JScrollPane (pubTable), BorderLayout.CENTER); final Box pubControlPanel = Box.createVerticalBox(); final JScrollPane pubTableScrollPane = new JScrollPane (pubControlPanel); pubTableScrollPane.setPreferredSize (new Dimension (168, 400)); jcl.getColumnModel().getColumn(1).setWidth (30); listTablePanel.add (pubTableScrollPane, BorderLayout.WEST); JTable columnSorter = new ColumnSortControl (pubTable); pubControlPanel.add (jcl.getTableHeader()); pubControlPanel.add (jcl); pubControlPanel.add (columnSorter.getTableHeader()); pubControlPanel.add (columnSorter); JScrollPane parCoordsScrollPane = new JScrollPane (table); JScrollPane matrixScrollPane = new JScrollPane (jmatrix); JTabbedPane jtp = new JTabbedPane (); JPanel graphPanel = new JPanel (new BorderLayout ()); graphPanel.add (jgraph, BorderLayout.CENTER); graphPanel.add (optionPanel, BorderLayout.WEST); jtp.addTab (""Node-Link"", graphPanel); jtp.addTab (""Matrix"", matrixScrollPane); jtp.addTab (""Pubs"", listTablePanel); jtp.addTab (""||-Coords"", parCoordsScrollPane); jtp.setPreferredSize(new Dimension (800, 480)); //jf2.getContentPane().add (optionPanel, BorderLayout.EAST); jf2.getContentPane().add (jtp, BorderLayout.CENTER); //jf2.getContentPane().add (tableScrollPane, BorderLayout.SOUTH); jf2.setVisible (true); } } ); } public GraphModel makeGraph (final ResultSet nodeSet, final ResultSet edgeSet) throws SQLException { edgeSet.beforeFirst(); final GraphModel graph = new SymmetricGraphInstance (); // Look through the rootnode for fields named 'nodeType' // Add that nodeTypes' subfields as nodes to a graph while (edgeSet.next()) { Object author1 = edgeSet.getObject(1); Object author2 = edgeSet.getObject(2); graph.addNode (author1); graph.addNode (author2); final Set edges = graph.getEdges (author1, author2); if (edges.isEmpty()) { graph.addEdge (author1, author2, Integer.valueOf (1)); } else { final Iterator edgeIter = edges.iterator(); final Edge firstEdge = edgeIter.next(); final Integer val = (Integer)firstEdge.getEdgeObject(); firstEdge.setEdgeObject (Integer.valueOf (val.intValue() + 1)); //graph.removeEdge (firstEdge); //graph.addEdge (node1, node2, Integer.valueOf (val.intValue() + 1)); } } return graph; } public GraphModel makeGraph (final TableModel nodes, final String primaryKeyColumn, final TableModel edges) throws SQLException { final GraphModel graph = new SymmetricGraphInstance (); final Map primaryKeyRowMap = new HashMap (); for (int row = 0; row < nodes.getRowCount(); row++) { primaryKeyRowMap.put (nodes.getValueAt (row, 0), Integer.valueOf (row)); } // Look through the rootnode for fields named 'nodeType' // Add that nodeTypes' subfields as nodes to a graph for (int row = 0; row < edges.getRowCount(); row++) { Object authorKey1 = edges.getValueAt (row, 0); Object authorKey2 = edges.getValueAt (row, 1); int authorIndex1 = (primaryKeyRowMap.get(authorKey1) == null ? -1 : primaryKeyRowMap.get(authorKey1).intValue()); int authorIndex2 = (primaryKeyRowMap.get(authorKey2) == null ? -1 : primaryKeyRowMap.get(authorKey2).intValue()); if (authorIndex1 >= 0 && authorIndex2 >= 0) { Object graphNode1 = nodes.getValueAt (authorIndex1, 1); Object graphNode2 = nodes.getValueAt (authorIndex2, 1); graph.addNode (graphNode1); graph.addNode (graphNode2); final Set gedges = graph.getEdges (graphNode1, graphNode2); if (gedges.isEmpty()) { graph.addEdge (graphNode1, graphNode2, Integer.valueOf (1)); } else { final Iterator edgeIter = gedges.iterator(); final Edge firstEdge = edgeIter.next(); final Integer val = (Integer)firstEdge.getEdgeObject(); firstEdge.setEdgeObject (Integer.valueOf (val.intValue() + 1)); } } } return graph; } public GraphModel makeGraph (final Map keyDataMap, final String primaryKeyColumn, final TableModel edges) throws SQLException { final GraphModel graph = new SymmetricGraphInstance (); // Look through the rootnode for fields named 'nodeType' // Add that nodeTypes' subfields as nodes to a graph for (int row = 0; row < edges.getRowCount(); row++) { Object authorKey1 = edges.getValueAt (row, 0); Object authorKey2 = edges.getValueAt (row, 1); if (authorKey1 != null && authorKey2 != null) { Object graphNode1 = keyDataMap.get (authorKey1); Object graphNode2 = keyDataMap.get (authorKey2); if (graphNode1 != null && graphNode2 != null) { graph.addNode (graphNode1); graph.addNode (graphNode2); final Set gedges = graph.getEdges (graphNode1, graphNode2); if (gedges.isEmpty()) { graph.addEdge (graphNode1, graphNode2, Integer.valueOf (1)); } else { final Iterator edgeIter = gedges.iterator(); final Edge firstEdge = edgeIter.next(); final Integer val = (Integer)firstEdge.getEdgeObject(); firstEdge.setEdgeObject (Integer.valueOf (val.intValue() + 1)); } } } } return graph; } public Map makeKeyRowMap (final TableModel tableModel, final int columnPKIndex) { final Map primaryKeyRowMap = new HashMap (); for (int row = 0; row < tableModel.getRowCount(); row++) { primaryKeyRowMap.put (tableModel.getValueAt (row, 0), Integer.valueOf (row)); } return primaryKeyRowMap; } public Map makeKeyedDataMap (final TableModel tableModel, final int columnPKIndex, final int columnLabelIndex) { final Map primaryKeyDataMap = new HashMap (); for (int row = 0; row < tableModel.getRowCount(); row++) { primaryKeyDataMap.put (tableModel.getValueAt (row, columnPKIndex), makeKeyedData (tableModel, columnPKIndex, columnLabelIndex, row)); } return primaryKeyDataMap; } public KeyedData makeKeyedData (final TableModel tableModel, final int columnPKIndex, final int columnLabelIndex, final int rowIndex) { List data = new ArrayList (); for (int n = 0; n < tableModel.getColumnCount(); n++) { data.add (tableModel.getValueAt (rowIndex, n)); } KeyedData kd = new KeyedData (tableModel.getValueAt (rowIndex, columnPKIndex), data, columnLabelIndex); return kd; } /** * can't do pivot queries in ANSI SQL * @param sqlresult * @return */ public TableModel makePubByYearTable (final TableModel sqlresult) { DefaultTableModel tm = new DefaultTableModel () { public Class getColumnClass(int columnIndex) { if (columnIndex > 0) { return Long.class; } return Integer.class; } public boolean isCellEditable (final int row, final int column) { return false; } }; Map> yearsToTypes = new HashMap> (); Map columnTypes = new HashMap (); tm.addColumn (""Year""); int col = 1; for (int sqlrow = 0; sqlrow < sqlresult.getRowCount(); sqlrow++) { Object type = sqlresult.getValueAt (sqlrow, 1); if (columnTypes.get(type) == null) { columnTypes.put(type, Integer.valueOf(col)); tm.addColumn (type); col++; } } System.err.println (""cols: ""+columnTypes+"", ""+columnTypes.size()); for (int sqlrow = 0; sqlrow < sqlresult.getRowCount(); sqlrow++) { Object year = sqlresult.getValueAt (sqlrow, 0); if (year != null) { Object type = sqlresult.getValueAt (sqlrow, 1); Object val = sqlresult.getValueAt (sqlrow, 2); int colIndex = columnTypes.get(type).intValue(); List store = yearsToTypes.get (year); if (store == null) { Long[] storep = new Long [col - 1]; Arrays.fill (storep, Long.valueOf(0)); List longs = Arrays.asList (storep); store = new ArrayList (longs); //Collections.fill (store, Long.valueOf (0)); yearsToTypes.put (year, store); } store.set (colIndex - 1, (Long)val); } } for (Entry> yearEntry : yearsToTypes.entrySet()) { Object[] rowData = new Object [col]; rowData[0] = yearEntry.getKey(); for (int n = 1; n < col; n++) { rowData[n] = yearEntry.getValue().get(n-1); } tm.addRow(rowData); } return tm; } } ",0 "ation, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Routing\Generator; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\Exception\InvalidParameterException; use Symfony\Component\Routing\Exception\RouteNotFoundException; use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; use Psr\Log\LoggerInterface; /** * UrlGenerator can generate a URL or a path for any route in the RouteCollection * based on the passed parameters. * * @author Fabien Potencier * @author Tobias Schultze */ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInterface { protected $routes; protected $context; /** * @var bool|null */ protected $strictRequirements = true; protected $logger; /** * This array defines the characters (besides alphanumeric ones) that will not be percent-encoded in the path segment of the generated URL. * * PHP's rawurlencode() encodes all chars except ""a-zA-Z0-9-._~"" according to RFC 3986. But we want to allow some chars * to be used in their literal form (reasons below). Other chars inside the path must of course be encoded, e.g. * ""?"" and ""#"" (would be interpreted wrongly as query and fragment identifier), * ""'"" and """""" (are used as delimiters in HTML). */ protected $decodedChars = array( // the slash can be used to designate a hierarchical structure and we want allow using it with this meaning // some webservers don't allow the slash in encoded form in the path for security reasons anyway // see http://stackoverflow.com/questions/4069002/http-400-if-2f-part-of-get-url-in-jboss '%2F' => '/', // the following chars are general delimiters in the URI specification but have only special meaning in the authority component // so they can safely be used in the path in unencoded form '%40' => '@', '%3A' => ':', // these chars are only sub-delimiters that have no predefined meaning and can therefore be used literally // so URI producing applications can use these chars to delimit subcomponents in a path segment without being encoded for better readability '%3B' => ';', '%2C' => ',', '%3D' => '=', '%2B' => '+', '%21' => '!', '%2A' => '*', '%7C' => '|', ); public function __construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null) { $this->routes = $routes; $this->context = $context; $this->logger = $logger; } /** * {@inheritdoc} */ public function setContext(RequestContext $context) { $this->context = $context; } /** * {@inheritdoc} */ public function getContext() { return $this->context; } /** * {@inheritdoc} */ public function setStrictRequirements($enabled) { $this->strictRequirements = null === $enabled ? null : (bool) $enabled; } /** * {@inheritdoc} */ public function isStrictRequirements() { return $this->strictRequirements; } /** * {@inheritdoc} */ public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) { if (null === $route = $this->routes->get($name)) { throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route ""%s"" as such route does not exist.', $name)); } // the Route has a cache of its own and is not recompiled as long as it does not get modified $compiledRoute = $route->compile(); return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $name, $referenceType, $compiledRoute->getHostTokens(), $route->getSchemes()); } /** * @throws MissingMandatoryParametersException When some parameters are missing that are mandatory for the route * @throws InvalidParameterException When a parameter value for a placeholder is not correct because * it does not match the requirement */ protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = array()) { if (is_bool($referenceType) || is_string($referenceType)) { @trigger_error('The hardcoded value you are using for the $referenceType argument of the '.__CLASS__.'::generate method is deprecated since version 2.8 and will not be supported anymore in 3.0. Use the constants defined in the UrlGeneratorInterface instead.', E_USER_DEPRECATED); if (true === $referenceType) { $referenceType = self::ABSOLUTE_URL; } elseif (false === $referenceType) { $referenceType = self::ABSOLUTE_PATH; } elseif ('relative' === $referenceType) { $referenceType = self::RELATIVE_PATH; } elseif ('network' === $referenceType) { $referenceType = self::NETWORK_PATH; } } $variables = array_flip($variables); $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters); // all params must be given if ($diff = array_diff_key($variables, $mergedParams)) { throw new MissingMandatoryParametersException(sprintf('Some mandatory parameters are missing (""%s"") to generate a URL for route ""%s"".', implode('"", ""', array_keys($diff)), $name)); } $url = ''; $optional = true; foreach ($tokens as $token) { if ('variable' === $token[0]) { if (!$optional || !array_key_exists($token[3], $defaults) || null !== $mergedParams[$token[3]] && (string) $mergedParams[$token[3]] !== (string) $defaults[$token[3]]) { // check requirement if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#', $mergedParams[$token[3]])) { $message = sprintf('Parameter ""%s"" for route ""%s"" must match ""%s"" (""%s"" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]); if ($this->strictRequirements) { throw new InvalidParameterException($message); } if ($this->logger) { $this->logger->error($message); } return; } $url = $token[1].$mergedParams[$token[3]].$url; $optional = false; } } else { // static text $url = $token[1].$url; $optional = false; } } if ('' === $url) { $url = '/'; } // the contexts base URL is already encoded (see Symfony\Component\HttpFoundation\Request) $url = strtr(rawurlencode($url), $this->decodedChars); // the path segments ""."" and "".."" are interpreted as relative reference when resolving a URI; see http://tools.ietf.org/html/rfc3986#section-3.3 // so we need to encode them as they are not used for this purpose here // otherwise we would generate a URI that, when followed by a user agent (e.g. browser), does not match this route $url = strtr($url, array('/../' => '/%2E%2E/', '/./' => '/%2E/')); if ('/..' === substr($url, -3)) { $url = substr($url, 0, -2).'%2E%2E'; } elseif ('/.' === substr($url, -2)) { $url = substr($url, 0, -1).'%2E'; } $schemeAuthority = ''; if ($host = $this->context->getHost()) { $scheme = $this->context->getScheme(); if ($requiredSchemes) { if (!in_array($scheme, $requiredSchemes, true)) { $referenceType = self::ABSOLUTE_URL; $scheme = current($requiredSchemes); } } elseif (isset($requirements['_scheme']) && ($req = strtolower($requirements['_scheme'])) && $scheme !== $req) { // We do this for BC; to be removed if _scheme is not supported anymore $referenceType = self::ABSOLUTE_URL; $scheme = $req; } if ($hostTokens) { $routeHost = ''; foreach ($hostTokens as $token) { if ('variable' === $token[0]) { if (null !== $this->strictRequirements && !preg_match('#^'.$token[2].'$#i', $mergedParams[$token[3]])) { $message = sprintf('Parameter ""%s"" for route ""%s"" must match ""%s"" (""%s"" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]); if ($this->strictRequirements) { throw new InvalidParameterException($message); } if ($this->logger) { $this->logger->error($message); } return; } $routeHost = $token[1].$mergedParams[$token[3]].$routeHost; } else { $routeHost = $token[1].$routeHost; } } if ($routeHost !== $host) { $host = $routeHost; if (self::ABSOLUTE_URL !== $referenceType) { $referenceType = self::NETWORK_PATH; } } } if (self::ABSOLUTE_URL === $referenceType || self::NETWORK_PATH === $referenceType) { $port = ''; if ('http' === $scheme && 80 != $this->context->getHttpPort()) { $port = ':'.$this->context->getHttpPort(); } elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) { $port = ':'.$this->context->getHttpsPort(); } $schemeAuthority = self::NETWORK_PATH === $referenceType ? '//' : ""$scheme://""; $schemeAuthority .= $host.$port; } } if (self::RELATIVE_PATH === $referenceType) { $url = self::getRelativePath($this->context->getPathInfo(), $url); } else { $url = $schemeAuthority.$this->context->getBaseUrl().$url; } // add a query string if needed $extra = array_udiff_assoc(array_diff_key($parameters, $variables), $defaults, function ($a, $b) { return $a == $b ? 0 : 1; }); if ($extra && $query = http_build_query($extra, '', '&')) { // ""/"" and ""?"" can be left decoded for better user experience, see // http://tools.ietf.org/html/rfc3986#section-3.4 $url .= '?'.strtr($query, array('%2F' => '/')); } return $url; } /** * Returns the target path as relative reference from the base path. * * Only the URIs path component (no schema, host etc.) is relevant and must be given, starting with a slash. * Both paths must be absolute and not contain relative parts. * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. * Furthermore, they can be used to reduce the link size in documents. * * Example target paths, given a base path of ""/a/b/c/d"": * - ""/a/b/c/d"" -> """" * - ""/a/b/c/"" -> ""./"" * - ""/a/b/"" -> ""../"" * - ""/a/b/c/other"" -> ""other"" * - ""/a/x/y"" -> ""../../x/y"" * * @param string $basePath The base path * @param string $targetPath The target path * * @return string The relative target path */ public static function getRelativePath($basePath, $targetPath) { if ($basePath === $targetPath) { return ''; } $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); $targetDirs = explode('/', isset($targetPath[0]) && '/' === $targetPath[0] ? substr($targetPath, 1) : $targetPath); array_pop($sourceDirs); $targetFile = array_pop($targetDirs); foreach ($sourceDirs as $i => $dir) { if (isset($targetDirs[$i]) && $dir === $targetDirs[$i]) { unset($sourceDirs[$i], $targetDirs[$i]); } else { break; } } $targetDirs[] = $targetFile; $path = str_repeat('../', count($sourceDirs)).implode('/', $targetDirs); // A reference to the same base directory or an empty subdirectory must be prefixed with ""./"". // This also applies to a segment with a colon character (e.g., ""file:colon"") that cannot be used // as the first segment of a relative-path reference, as it would be mistaken for a scheme name // (see http://tools.ietf.org/html/rfc3986#section-4.2). return '' === $path || '/' === $path[0] || false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos) ? ""./$path"" : $path; } } ",0 "pliance 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. * */ #ifndef GRPC_RB_XDS_CHANNEL_CREDENTIALS_H_ #define GRPC_RB_XDS_CHANNEL_CREDENTIALS_H_ #include #include #include /* Initializes the ruby ChannelCredentials class. */ void Init_grpc_xds_channel_credentials(); /* Gets the wrapped credentials from the ruby wrapper */ grpc_channel_credentials* grpc_rb_get_wrapped_xds_channel_credentials(VALUE v); /* Check if v is kind of XdsChannelCredentials */ bool grpc_rb_is_xds_channel_credentials(VALUE v); #endif /* GRPC_RB_XDS_CHANNEL_CREDENTIALS_H_ */ ",0 "e 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. */ /** * Created by PhpStorm. * User: ch3 * Date: 8/9/2017 * Time: 10:10 AM */ namespace App\ResAppBundle\Controller; //use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; //use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\HttpFoundation\Request; use App\UserdirectoryBundle\Controller\UserRequestController; class ResAppUserRequestController extends UserRequestController { public function __construct() { $this->siteName = 'resapp'; $this->siteNameShowuser = 'resapp'; $this->siteNameStr = 'Residency Applications'; $this->roleEditor = 'ROLE_RESAPP_COORDINATOR'; } /** * Displays a form to create a new UserRequest entity. * * @Route(""/account-requests/new"", name=""resapp_accountrequest_new"", methods={""GET""}) * @Template(""AppUserdirectoryBundle/UserRequest/account_request.html.twig"") */ public function newAction() { return parent::newAction(); } /** * Creates a new UserRequest entity. * * @Route(""/account-requests/new"", name=""resapp_accountrequest_create"", methods={""POST""}) * @Template(""AppUserdirectoryBundle/UserRequest/account_request.html.twig"") */ public function createAction(Request $request) { return parent::createAction($request); } /** * Lists all UserRequest entities. * * @Route(""/account-requests"", name=""resapp_accountrequest"", methods={""GET""}) * @Template(""AppUserdirectoryBundle/UserRequest/index.html.twig"") */ public function indexAction( Request $request ) { return parent::indexAction($request); } /** * @Route(""/account-requests/{id}/{status}/status"", name=""resapp_accountrequest_status"", methods={""GET""}, requirements={""id"" = ""\d+""}) * @Template(""AppUserdirectoryBundle/UserRequest/index.html.twig"") */ public function statusAction($id, $status) { return parent::statusAction($id,$status); } /** * Update (Approve) a new UserRequest entity. * * @Route(""/account-requests-approve"", name=""resapp_accountrequest_approve"", methods={""POST""}) * @Template(""AppUserdirectoryBundle/UserRequest/index.html.twig"") */ public function approveUserAccountRequestAction(Request $request) { return parent::approveUserAccountRequestAction($request); } }",0 "modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'jMonkeyEngine' nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.jme3.bullet.joints; import com.jme3.bullet.objects.PhysicsRigidBody; import com.jme3.export.*; import com.jme3.math.Vector3f; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; /** *

* PhysicsJoint - Basic Phyiscs Joint *

* * @author normenhansen */ public abstract class PhysicsJoint implements Savable { protected long objectId = 0; protected PhysicsRigidBody nodeA; protected PhysicsRigidBody nodeB; protected Vector3f pivotA; protected Vector3f pivotB; protected boolean collisionBetweenLinkedBodys = true; public PhysicsJoint() { } /** * @param nodeA first node of the joint * @param nodeB second node of the joint * @param pivotA local translation of the joint connection point in node A * @param pivotB local translation of the joint connection point in node B */ public PhysicsJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB) { this.nodeA = nodeA; this.nodeB = nodeB; this.pivotA = pivotA; this.pivotB = pivotB; nodeA.addJoint(this); nodeB.addJoint(this); } public float getAppliedImpulse() { return getAppliedImpulse(objectId); } private native float getAppliedImpulse(long objectId); /** * @return the constraint */ public long getObjectId() { return objectId; } /** * @return the collisionBetweenLinkedBodys */ public boolean isCollisionBetweenLinkedBodys() { return collisionBetweenLinkedBodys; } /** * toggles collisions between linked bodys
* joint has to be removed from and added to PhyiscsSpace to apply this. * * @param collisionBetweenLinkedBodys set to false to have no collisions * between linked bodys */ public void setCollisionBetweenLinkedBodys(boolean collisionBetweenLinkedBodys) { this.collisionBetweenLinkedBodys = collisionBetweenLinkedBodys; } public PhysicsRigidBody getBodyA() { return nodeA; } public PhysicsRigidBody getBodyB() { return nodeB; } public Vector3f getPivotA() { return pivotA; } public Vector3f getPivotB() { return pivotB; } /** * destroys this joint and removes it from its connected PhysicsRigidBodys * joint lists */ public void destroy() { getBodyA().removeJoint(this); getBodyB().removeJoint(this); } @Override public void write(JmeExporter ex) throws IOException { OutputCapsule capsule = ex.getCapsule(this); capsule.write(nodeA, ""nodeA"", null); capsule.write(nodeB, ""nodeB"", null); capsule.write(pivotA, ""pivotA"", null); capsule.write(pivotB, ""pivotB"", null); } @Override public void read(JmeImporter im) throws IOException { InputCapsule capsule = im.getCapsule(this); this.nodeA = ((PhysicsRigidBody) capsule.readSavable(""nodeA"", new PhysicsRigidBody())); this.nodeB = (PhysicsRigidBody) capsule.readSavable(""nodeB"", new PhysicsRigidBody()); this.pivotA = (Vector3f) capsule.readSavable(""pivotA"", new Vector3f()); this.pivotB = (Vector3f) capsule.readSavable(""pivotB"", new Vector3f()); } @Override protected void finalize() throws Throwable { try { Logger.getLogger(this.getClass().getName()).log(Level.FINE, ""Finalizing Joint {0}"", Long.toHexString(objectId)); finalizeNative(objectId); } finally { super.finalize(); } } protected native void finalizeNative(long objectId); } ",0 "ters one block device per Axon's DDR2 memory bank found on a system. * Block devices are called axonram?, their major and minor numbers are * available in /proc/devices, /proc/partitions or in /sys/block/axonram?/dev. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define AXON_RAM_MODULE_NAME ""axonram"" #define AXON_RAM_DEVICE_NAME ""axonram"" #define AXON_RAM_MINORS_PER_DISK 16 #define AXON_RAM_BLOCK_SHIFT PAGE_SHIFT #define AXON_RAM_BLOCK_SIZE 1 << AXON_RAM_BLOCK_SHIFT #define AXON_RAM_SECTOR_SHIFT 9 #define AXON_RAM_SECTOR_SIZE 1 << AXON_RAM_SECTOR_SHIFT #define AXON_RAM_IRQ_FLAGS IRQF_SHARED | IRQF_TRIGGER_RISING static int azfs_major, azfs_minor; struct axon_ram_bank { struct platform_device *device; struct gendisk *disk; unsigned int irq_id; unsigned long ph_addr; unsigned long io_addr; unsigned long size; unsigned long ecc_counter; }; static ssize_t axon_ram_sysfs_ecc(struct device *dev, struct device_attribute *attr, char *buf) { struct platform_device *device = to_platform_device(dev); struct axon_ram_bank *bank = device->dev.platform_data; BUG_ON(!bank); return sprintf(buf, ""%ld\n"", bank->ecc_counter); } static DEVICE_ATTR(ecc, S_IRUGO, axon_ram_sysfs_ecc, NULL); /* */ static irqreturn_t axon_ram_irq_handler(int irq, void *dev) { struct platform_device *device = dev; struct axon_ram_bank *bank = device->dev.platform_data; BUG_ON(!bank); dev_err(&device->dev, ""Correctable memory error occurred\n""); bank->ecc_counter++; return IRQ_HANDLED; } /* */ static void axon_ram_make_request(struct request_queue *queue, struct bio *bio) { struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data; unsigned long phys_mem, phys_end; void *user_mem; struct bio_vec *vec; unsigned int transfered; unsigned short idx; phys_mem = bank->io_addr + (bio->bi_sector << AXON_RAM_SECTOR_SHIFT); phys_end = bank->io_addr + bank->size; transfered = 0; bio_for_each_segment(vec, bio, idx) { if (unlikely(phys_mem + vec->bv_len > phys_end)) { bio_io_error(bio); return; } user_mem = page_address(vec->bv_page) + vec->bv_offset; if (bio_data_dir(bio) == READ) memcpy(user_mem, (void *) phys_mem, vec->bv_len); else memcpy((void *) phys_mem, user_mem, vec->bv_len); phys_mem += vec->bv_len; transfered += vec->bv_len; } bio_endio(bio, 0); } /* */ static int axon_ram_direct_access(struct block_device *device, sector_t sector, void **kaddr, unsigned long *pfn) { struct axon_ram_bank *bank = device->bd_disk->private_data; loff_t offset; offset = sector; if (device->bd_part != NULL) offset += device->bd_part->start_sect; offset <<= AXON_RAM_SECTOR_SHIFT; if (offset >= bank->size) { dev_err(&bank->device->dev, ""Access outside of address space\n""); return -ERANGE; } *kaddr = (void *)(bank->ph_addr + offset); *pfn = virt_to_phys(kaddr) >> PAGE_SHIFT; return 0; } static const struct block_device_operations axon_ram_devops = { .owner = THIS_MODULE, .direct_access = axon_ram_direct_access }; /* */ static int axon_ram_probe(struct platform_device *device) { static int axon_ram_bank_id = -1; struct axon_ram_bank *bank; struct resource resource; int rc = 0; axon_ram_bank_id++; dev_info(&device->dev, ""Found memory controller on %s\n"", device->dev.of_node->full_name); bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL); if (bank == NULL) { dev_err(&device->dev, ""Out of memory\n""); rc = -ENOMEM; goto failed; } device->dev.platform_data = bank; bank->device = device; if (of_address_to_resource(device->dev.of_node, 0, &resource) != 0) { dev_err(&device->dev, ""Cannot access device tree\n""); rc = -EFAULT; goto failed; } bank->size = resource_size(&resource); if (bank->size == 0) { dev_err(&device->dev, ""No DDR2 memory found for %s%d\n"", AXON_RAM_DEVICE_NAME, axon_ram_bank_id); rc = -ENODEV; goto failed; } dev_info(&device->dev, ""Register DDR2 memory device %s%d with %luMB\n"", AXON_RAM_DEVICE_NAME, axon_ram_bank_id, bank->size >> 20); bank->ph_addr = resource.start; bank->io_addr = (unsigned long) ioremap_prot( bank->ph_addr, bank->size, _PAGE_NO_CACHE); if (bank->io_addr == 0) { dev_err(&device->dev, ""ioremap() failed\n""); rc = -EFAULT; goto failed; } bank->disk = alloc_disk(AXON_RAM_MINORS_PER_DISK); if (bank->disk == NULL) { dev_err(&device->dev, ""Cannot register disk\n""); rc = -EFAULT; goto failed; } bank->disk->major = azfs_major; bank->disk->first_minor = azfs_minor; bank->disk->fops = &axon_ram_devops; bank->disk->private_data = bank; bank->disk->driverfs_dev = &device->dev; sprintf(bank->disk->disk_name, ""%s%d"", AXON_RAM_DEVICE_NAME, axon_ram_bank_id); bank->disk->queue = blk_alloc_queue(GFP_KERNEL); if (bank->disk->queue == NULL) { dev_err(&device->dev, ""Cannot register disk queue\n""); rc = -EFAULT; goto failed; } set_capacity(bank->disk, bank->size >> AXON_RAM_SECTOR_SHIFT); blk_queue_make_request(bank->disk->queue, axon_ram_make_request); blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE); add_disk(bank->disk); bank->irq_id = irq_of_parse_and_map(device->dev.of_node, 0); if (bank->irq_id == NO_IRQ) { dev_err(&device->dev, ""Cannot access ECC interrupt ID\n""); rc = -EFAULT; goto failed; } rc = request_irq(bank->irq_id, axon_ram_irq_handler, AXON_RAM_IRQ_FLAGS, bank->disk->disk_name, device); if (rc != 0) { dev_err(&device->dev, ""Cannot register ECC interrupt handler\n""); bank->irq_id = NO_IRQ; rc = -EFAULT; goto failed; } rc = device_create_file(&device->dev, &dev_attr_ecc); if (rc != 0) { dev_err(&device->dev, ""Cannot create sysfs file\n""); rc = -EFAULT; goto failed; } azfs_minor += bank->disk->minors; return 0; failed: if (bank != NULL) { if (bank->irq_id != NO_IRQ) free_irq(bank->irq_id, device); if (bank->disk != NULL) { if (bank->disk->major > 0) unregister_blkdev(bank->disk->major, bank->disk->disk_name); del_gendisk(bank->disk); } device->dev.platform_data = NULL; if (bank->io_addr != 0) iounmap((void __iomem *) bank->io_addr); kfree(bank); } return rc; } /* */ static int axon_ram_remove(struct platform_device *device) { struct axon_ram_bank *bank = device->dev.platform_data; BUG_ON(!bank || !bank->disk); device_remove_file(&device->dev, &dev_attr_ecc); free_irq(bank->irq_id, device); del_gendisk(bank->disk); iounmap((void __iomem *) bank->io_addr); kfree(bank); return 0; } static struct of_device_id axon_ram_device_id[] = { { .type = ""dma-memory"" }, {} }; static struct platform_driver axon_ram_driver = { .probe = axon_ram_probe, .remove = axon_ram_remove, .driver = { .name = AXON_RAM_MODULE_NAME, .owner = THIS_MODULE, .of_match_table = axon_ram_device_id, }, }; /* */ static int __init axon_ram_init(void) { azfs_major = register_blkdev(azfs_major, AXON_RAM_DEVICE_NAME); if (azfs_major < 0) { printk(KERN_ERR ""%s cannot become block device major number\n"", AXON_RAM_MODULE_NAME); return -EFAULT; } azfs_minor = 0; return platform_driver_register(&axon_ram_driver); } /* */ static void __exit axon_ram_exit(void) { platform_driver_unregister(&axon_ram_driver); unregister_blkdev(azfs_major, AXON_RAM_DEVICE_NAME); } module_init(axon_ram_init); module_exit(axon_ram_exit); MODULE_LICENSE(""GPL""); MODULE_AUTHOR(""Maxim Shchetynin ""); MODULE_DESCRIPTION(""Axon DDR2 RAM device driver for IBM Cell BE""); ",0 " the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the QtAws. If not, see . */ #ifndef QTAWS_CREATETAGOPTIONRESPONSE_P_H #define QTAWS_CREATETAGOPTIONRESPONSE_P_H #include ""servicecatalogresponse_p.h"" namespace QtAws { namespace ServiceCatalog { class CreateTagOptionResponse; class CreateTagOptionResponsePrivate : public ServiceCatalogResponsePrivate { public: explicit CreateTagOptionResponsePrivate(CreateTagOptionResponse * const q); void parseCreateTagOptionResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(CreateTagOptionResponse) Q_DISABLE_COPY(CreateTagOptionResponsePrivate) }; } // namespace ServiceCatalog } // namespace QtAws #endif ",0 "ance 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. */ package com.exorath.plugin.game.cakewars.rewards; import com.exorath.plugin.game.cakewars.Main; import com.exorath.service.currency.api.CurrencyServiceAPI; import com.exorath.victoryHandler.rewards.CurrencyReward; import net.md_5.bungee.api.ChatColor; /** * Created by toonsev on 5/31/2017. */ public class KillsReward extends CurrencyReward{ public static final int CRUMBS_PER_KILL = 2; private int kills; public KillsReward(CurrencyServiceAPI currencyServiceAPI) { super(null, currencyServiceAPI, Main.CRUMBS_CURRENCY, 0); setCurrencyColor(ChatColor.GOLD); setCurrencyName(""Crumbs""); } public void addKill(){ kills++; setAmount(kills*CRUMBS_PER_KILL); setReason(""Killing "" + kills + "" Players""); } } ",0 "%> <%namespace name='static' file='static_content.html'/> ## WARNING: These files are specific to edx.org and are not used in installations outside of that domain. Open edX users will want to use the file ""footer.html"" for any changes or overrides.

${_(""About edX"")}

${_( u""\u00A9 edX Inc. All rights reserved except where noted. "" u""EdX, Open edX and the edX and Open EdX logos are registered trademarks "" u""or trademarks of edX Inc."" )}

## The OpenEdX link may be hidden when this view is served ## through an API to partner sites (such as marketing sites or blogs), ## which are not technically powered by OpenEdX. % if not hide_openedx_link: % endif
% for link in footer['social_links']: ${link['action']} % endfor
% for link in footer['mobile_links']: % endfor
% if include_dependencies: <%static:js group='base_vendor'/> <%static:css group='style-vendor'/> <%include file=""widgets/segment-io.html"" /> <%include file=""widgets/segment-io-footer.html"" /> % endif % if bidi == 'rtl': <%static:css group='style-lms-footer-edx-rtl'/> % else: <%static:css group='style-lms-footer-edx'/> % endif % if footer_css_urls: % for url in footer_css_urls: % endfor % endif % if footer_js_url: % endif ",0 "ny person obtaining * a copy of this software and associated documentation files (the ""Software""), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute,sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED,INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ #include ""dirTraversal.h"" #include #include #include #ifndef WIN32 // for linux #undef __STRICT_ANSI__ #define D_GNU_SOURCE #define _GNU_SOURCE #include #include #include #include #else // for windows #include #endif //WIN32 #ifndef WIN32 // for linux inline int isDir(const char* path) { struct stat st; lstat(path, &st); return S_ISDIR(st.st_mode); } // int doTraversal(const char *path, int recursive,file_callback xCallback,void * usr) { DIR *pdir; struct dirent *pdirent; char tmp[1024]; pdir = opendir(path); if(pdir) { while((pdirent = readdir(pdir)) != 0) { //ignore ""."" && "".."" if(!strcmp(pdirent->d_name, ""."")|| !strcmp(pdirent->d_name, "".."")) continue; sprintf(tmp, ""%s/%s"", path, pdirent->d_name); xCallback(usr,tmp,isDir(tmp)); //if is Dir and recursive is true , into recursive if(isDir(tmp) && recursive) { doTraversal(tmp, recursive,xCallback,usr); } } }else { fprintf(stderr,""opendir error:%s\n"", path); } closedir(pdir); return 1; } //interface int dirTraversal(const char *path, int recursive,file_callback xCallback,void * usr) { int len; char tmp[256]; len = strlen(path); strcpy(tmp, path); if(tmp[len - 1] == '/') tmp[len -1] = '\0'; if(isDir(tmp)) { doTraversal(tmp, recursive,xCallback,usr); } else { //printf(""%s\n"", path); xCallback(usr,path,isDir(path)); } return 1; } #else //for windows /** * */ //int dirTraversal(const char *path, int recursive,file_callback xCallback) int dirTraversal(const char *path, int recursive,file_callback xCallback,void * usr) { int len = strlen(path)+3; long handle; char mypath[1024]; char searchpath[1024]; char tmppath[1024]; char nxtpath[1024]; char sp = '/'; int i; struct _finddata_t fileinfo; sprintf(mypath,""%s"",path); switch(mypath[len-1]) { case '\\': sp = '\\'; len -= 1; mypath[len-1] = '\0'; break; case '/': len -= 1; mypath[len-1] = '\0'; case '.': sp = '/'; break; default : for(i=0;ipdoDb = new PdoDb(new DbInfo(CONFIG_FILE_PATH, $environment, ""database"")); } public function start_backup($filename) { $fh = fopen($filename, ""w""); $rows = $this->pdoDb->query(""SHOW TABLES""); foreach ($rows as $row) { $this->show_create($row[0], $fh); } fclose($fh); } private function show_create($tablename, $fh) { $query = ""SHOW CREATE TABLE `$tablename`""; $row = $this->pdoDb->query($query); fwrite($fh, $row[0][1] . "";\n""); $insert = $this->retrieve_data($tablename); fwrite($fh, $insert); $this->output .= ""Table: $tablename backed up successfully""; } private function retrieve_data($tablename) { $query = ""SHOW COLUMNS FROM `"" . $tablename . ""`""; $rows = $this->pdoDb->query($query); $i = 0; $columns = array(); foreach($rows as $row) { $columns[$i++][0] = $row[0]; } $colcnt = count($columns); $query = """"; $rows = $this->pdoDb->request(""SELECT"", $tablename); foreach($rows as $row) { $query .= ""INSERT INTO `"" . $tablename . ""` VALUES(""; for ($i = 0; $i < $colcnt; $i++) { $query .= ""'"" . addslashes($row[$columns[$i][0]]) . ""'"" . ($i + 1 == $colcnt ? "");\n"" : "",""); } } $query .= ""\n""; return $query; } public function getOutput() { return $this->output; } } ",0 "physics Object Oriented Simulation Environment */ /* */ /* (c) 2010 Battelle Energy Alliance, LLC */ /* ALL RIGHTS RESERVED */ /* */ /* Prepared by Battelle Energy Alliance, LLC */ /* Under Contract No. DE-AC07-05ID14517 */ /* With the U. S. Department of Energy */ /* */ /* See COPYRIGHT for full restrictions */ /****************************************************************/ #ifndef COMPUTERESIDUALTHREAD_H #define COMPUTERESIDUALTHREAD_H #include ""ThreadedElementLoop.h"" // libMesh includes #include ""libmesh/elem_range.h"" // Forward declarations class FEProblemBase; class NonlinearSystemBase; class MaterialPropertyStorage; class MaterialData; class Assembly; class ComputeMaterialsObjectThread : public ThreadedElementLoop { public: ComputeMaterialsObjectThread(FEProblemBase & fe_problem, std::vector> & material_data, std::vector> & bnd_material_data, std::vector> & neighbor_material_data, MaterialPropertyStorage & material_props, MaterialPropertyStorage & bnd_material_props, std::vector & assembly); // Splitting Constructor ComputeMaterialsObjectThread(ComputeMaterialsObjectThread & x, Threads::split split); virtual ~ComputeMaterialsObjectThread(); virtual void post() override; virtual void subdomainChanged() override; virtual void onElement(const Elem * elem) override; virtual void onBoundary(const Elem * elem, unsigned int side, BoundaryID bnd_id) override; virtual void onInternalSide(const Elem * elem, unsigned int side) override; void join(const ComputeMaterialsObjectThread & /*y*/); protected: FEProblemBase & _fe_problem; NonlinearSystemBase & _nl; std::vector> & _material_data; std::vector> & _bnd_material_data; std::vector> & _neighbor_material_data; MaterialPropertyStorage & _material_props; MaterialPropertyStorage & _bnd_material_props; /// Reference to the Material object warehouses const MaterialWarehouse & _materials; const MaterialWarehouse & _discrete_materials; std::vector & _assembly; bool _need_internal_side_material; const bool _has_stateful_props; const bool _has_bnd_stateful_props; }; #endif // COMPUTERESIDUALTHREAD_H ",0 "d private String id; private String symbol; private String name; private float open; private float prevClose; private float currentQuote; private float high; private float low; private String date; private String quoteTime; private Date timestamp; public QuoteEntity() { super(); } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getSymbol() { return symbol; } public void setSymbol(String symbol) { this.symbol = symbol; } public String getName() { return name; } public void setName(String name) { this.name = name; } public float getOpen() { return open; } public void setOpen(float open) { this.open = open; } public float getPrevClose() { return prevClose; } public void setPrevClose(float prevClose) { this.prevClose = prevClose; } public float getCurrentQuote() { return currentQuote; } public void setCurrentQuote(float currentQuote) { this.currentQuote = currentQuote; } public float getHigh() { return high; } public void setHigh(float high) { this.high = high; } public float getLow() { return low; } public void setLow(float low) { this.low = low; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getQuoteTime() { return quoteTime; } public void setQuoteTime(String quoteTime) { this.quoteTime = quoteTime; } public Date getTimestamp() { return timestamp; } public void setTimestamp(Date timestamp) { this.timestamp = timestamp; } } ",0 "dweb.com) * Pedro Henrique Braga Moreira - Engenharia e Programação(ikkinet@gmail.com) * * Este arquivo é parte do programa Gerenciador Clínico Odontológico * * Gerenciador Clínico Odontológico é um software livre; você pode * redistribuí-lo e/ou modificá-lo dentro dos termos da Licença * Pública Geral GNU como publicada pela Fundação do Software Livre * (FSF); na versão 2 da Licença invariavelmente. * * Este programa é distribuído na esperança que possa ser útil, * mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÂO * a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a * Licença Pública Geral GNU para maiores detalhes. * * Você recebeu uma cópia da Licença Pública Geral GNU, * que está localizada na raíz do programa no arquivo COPYING ou COPYING.TXT * junto com este programa. Se não, visite o endereço para maiores informações: * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (Inglês) * http://www.magnux.org/doc/GPL-pt_BR.txt (Português - Brasil) * * Em caso de dúvidas quanto ao software ou quanto à licença, visite o * endereço eletrônico ou envie-nos um e-mail: * * http://www.smileodonto.com.br/gco * smile@smileodonto.com.br * * Ou envie sua carta para o endereço: * * Smile Odontolóogia * Rua Laudemira Maria de Jesus, 51 - Lourdes * Arcos - MG - CEP 35588-000 * * */ include ""../lib/config.inc.php""; include ""../lib/func.inc.php""; include ""../lib/classes.inc.php""; require_once '../lang/'.$idioma.'.php'; header(""Content-type: text/html; charset=UTF-8"", true); if(!checklog()) { echo ''; die(); } if(!verifica_nivel('convenios', 'L')) { echo $LANG['general']['you_tried_to_access_a_restricted_area']; die(); } // if($_GET[confirm_del] == ""delete"") { // mysql_query(""DELETE FROM honorarios WHERE codigo = '"".$_GET['codigo'].""'"") or die(mysql_error()); // mysql_query(""DELETE FROM honorarios_convenios WHERE codigo_convenio = '"".$_GET['codigo'].""'"") or die(mysql_error()); // } ?>
   "">
*/?> '.$LANG['plan']['include_new_plan'].'':'')?>    

 
 
",0 "rmation, please view the LICENSE * file that was distributed with this source code. */ namespace Sokil\Mongo\Validator; /** * Alphanumeric values validator * * @author Dmytro Sokil */ class AlphaNumericValidator extends \Sokil\Mongo\Validator { public function validateField(\Sokil\Mongo\Document $document, $fieldName, array $params) { if (!$document->get($fieldName)) { return; } if (preg_match('/^\w+$/', $document->get($fieldName))) { return; } if (!isset($params['message'])) { $params['message'] = 'Field ""' . $fieldName . '"" not alpha-numeric in model ' . get_called_class(); } $document->addError($fieldName, $this->getName(), $params['message']); } } ",0 "om.syncano.android.lib.modules.Params; import com.syncano.android.lib.modules.Response; /** * Params to create new user. */ public class ParamsUserNew extends Params { /** Name of user */ @Expose @SerializedName(value = ""user_name"") private String userName; /** Nickname of user */ @Expose private String nick; /** Avatar base64 for user */ @Expose private String avatar; /** User's password. */ @Expose @SerializedName(value = ""password"") private String password; /** * @param userName * User name defining user. Can be null. */ public ParamsUserNew(String userName) { setUserName(userName); } @Override public String getMethodName() { return ""user.new""; } public Response instantiateResponse() { return new ResponseUserNew(); } /** * @return user name */ public String getUserName() { return userName; } /** * Sets user name * * @param user_name * user name */ public void setUserName(String userName) { this.userName = userName; } /** * @return user nickname */ public String getNick() { return nick; } /** * Sets user nickname * * @param nick * nickname */ public void setNick(String nick) { this.nick = nick; } /** * @return avatar base64 */ public String getAvatar() { return avatar; } /** * Sets avatar base64 * * @param avatar * avatar base64 */ public void setAvatar(String avatar) { this.avatar = avatar; } /** * @return password */ public String getPassword() { return password; } /** * @param Sets * user password */ public void setPassword(String password) { this.password = password; } }",0 "/Developing_a_Model-View-Controller_Component_-_Part_4 * @license GNU/GPL */ // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.application.component.model'); /** * Hello Hello Model * * @package Joomla.Tutorials * @subpackage Components */ class ModelsModelModel extends JModel { /** * Constructor that retrieves the ID from the request * * @access public * @return void */ function __construct() { parent::__construct(); $array = JRequest::getVar('cid', 0, '', 'array'); $o = JRequest::getVar('cat', 0, 'POST', 'int'); $this->setId((int)$array[0], $o); } /** * Method to set the Category identifier * * @access public * @param int Category identifier * @return void */ function setId($id, $o) { // Set id and wipe data $this->_id = $id; $this->_origin = $o; $this->_data = null; } function getOrigin(){ return $this->_origin; } /** * Method to get a Category * @return object with data */ function &getData() { // Load the data if (empty( $this->_data )) { $query = ' SELECT * FROM #__models '. ' WHERE id = '.$this->_id; $this->_db->setQuery( $query ); $this->_data = $this->_db->loadObject(); } if (!$this->_data) { $this->_data = new stdClass(); $this->_data->id = 0; $this->_data->name= null; $this->_data->published = 0; $this->_data->category = 0; $this->_data->gender = 0; $this->_data->age = 0; $this->_data->size = 0; $this->_data->height = 0; $this->_data->weight = 0; $this->_data->bust = 0; $this->_data->waist = 0; $this->_data->hips = 0; $this->_data->shoes = 0; $this->_data->eyes = 0; $this->_data->hair = 0; } return $this->_data; } function getLists(){ $row =& JTable::getInstance('model', 'Table'); $cid = JRequest::getVar( 'cid', array(0), '', 'array' ); $id = $cid[0]; $row->load($id); $lists = array(); $categories = array(); //listar categorias $db =& JFactory::getDBO(); $query = ""SELECT count(*) FROM #__models_cat""; $db->setQuery( $query ); $total = $db->loadResult(); $query = ""SELECT * FROM #__models_cat""; $db->setQuery( $query ); $row2 = $db->loadObjectList(); if ($db->getErrorNum()) { echo $db->stderr(); return false; } foreach($row2 as $category){ $categories[$category->id]=array('value' => $category->id, 'text' => $category->name); } $lists['models'] = JHTML::_('select.genericList', $categories, 'category', 'class=""inputbox"" '. '', 'value', 'text', $row->category ); $gender = array( '0' => array('value' => 'f', 'text' => 'Female'), '1' => array('value' => 'm', 'text' => 'Male') ); $lists['gender'] = JHTML::_('select.genericlist',$gender,'gender', 'class=""inputbox"" ', 'value', 'text', $row->gender); $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class=""inputbox""', $row->published); $lists['upload'] = JHTML::_('behavior.modal'); $lists['editPhotos'] = 'index.php?option=com_models&controller=photo&cid[]='. $row->id; return $lists; } /** * Method to store a record * * @access public * @return boolean True on success */ function store() { $row =& $this->getTable('Model'); $data = JRequest::get( 'post' ); // Bind the form fields to the hello table if (!$row->bind($data)) { $this->setError($this->_db->getErrorMsg()); return false; } // Make sure the hello record is valid if (!$row->check()) { $this->setError($this->_db->getErrorMsg()); return false; } // Store the web link table to the database if (!$row->store()) { $this->setError( $row->getErrorMsg() ); return false; } return true; } function publish($publish) { $cid = JRequest::getVar( 'cid', array(), '', 'array' ); $row =& $this->getTable('Model'); $row->publish($cid, $publish); return true; } /** * Method to delete record(s) * * @access public * @return boolean True on success */ function delete() { $cids = JRequest::getVar( 'cid', array(0), 'post', 'array' ); $row =& $this->getTable('Model'); if (count( $cids )) { foreach($cids as $cid) { if (!$row->delete( $cid )) { $this->setError( $row->getErrorMsg() ); return false; } } } return true; } }",0 "re Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ""Free Software"" and ""Free Software Needs Free Documentation"", with the Front-Cover Texts being ""A GNU Manual,"" and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: ""You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."" --> Debugging with GDB: Bootstrapping

Next: Debug Session, Previous: Stub Contents, Up: Remote Stub   [Contents][Index]


20.5.2 What You Must Do for the Stub

The debugging stubs that come with GDB are set up for a particular chip architecture, but they have no information about the rest of your debugging target machine.

First of all you need to tell the stub how to communicate with the serial port.

int getDebugChar()

Write this subroutine to read a single character from the serial port. It may be identical to getchar for your target system; a different name is used to allow you to distinguish the two if you wish.

void putDebugChar(int)

Write this subroutine to write a single character to the serial port. It may be identical to putchar for your target system; a different name is used to allow you to distinguish the two if you wish.

If you want GDB to be able to stop your program while it is running, you need to use an interrupt-driven serial driver, and arrange for it to stop when it receives a ^C (‘\003’, the control-C character). That is the character which GDB uses to tell the remote system to stop.

Getting the debugging target to return the proper status to GDB probably requires changes to the standard stub; one quick and dirty way is to just execute a breakpoint instruction (the “dirty” part is that GDB reports a SIGTRAP instead of a SIGINT).

Other routines you need to supply are:

void exceptionHandler (int exception_number, void *exception_address)

Write this function to install exception_address in the exception handling tables. You need to do this because the stub does not have any way of knowing what the exception handling tables on your target system are like (for example, the processor’s table might be in ROM, containing entries which point to a table in RAM). The exception_number specifies the exception which should be changed; its meaning is architecture-dependent (for example, different numbers might represent divide by zero, misaligned access, etc). When this exception occurs, control should be transferred directly to exception_address, and the processor state (stack, registers, and so on) should be just as it is when a processor exception occurs. So if you want to use a jump instruction to reach exception_address, it should be a simple jump, not a jump to subroutine.

For the 386, exception_address should be installed as an interrupt gate so that interrupts are masked while the handler runs. The gate should be at privilege level 0 (the most privileged level). The SPARC and 68k stubs are able to mask interrupts themselves without help from exceptionHandler.

void flush_i_cache()

On SPARC and SPARCLITE only, write this subroutine to flush the instruction cache, if any, on your target machine. If there is no instruction cache, this subroutine may be a no-op.

On target machines that have instruction caches, GDB requires this function to make certain that the state of your program is stable.

You must also make sure this library routine is available:

void *memset(void *, int, int)

This is the standard library function memset that sets an area of memory to a known value. If you have one of the free versions of libc.a, memset can be found there; otherwise, you must either obtain it from your hardware manufacturer, or write your own.

If you do not use the GNU C compiler, you may need other standard library subroutines as well; this varies from one stub to another, but in general the stubs are likely to use any of the common library subroutines which GCC generates as inline code.


Next: Debug Session, Previous: Stub Contents, Up: Remote Stub   [Contents][Index]

",0 "ght (c) Imagination Technologies Ltd. All Rights Reserved @Description This header provides system-specific declarations and macros @License Dual MIT/GPLv2 The contents of this file are subject to the MIT license as set out below. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Alternatively, the contents of this file may be used under the terms of the GNU General Public License Version 2 (""GPL"") in which case the provisions of GPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of GPL, and not to allow others to use your version of this file under the terms of the MIT license, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by GPL as set out in the file called ""GPL-COPYING"" included in this distribution. If you do not delete the provisions above, a recipient may use your version of this file under the terms of either the MIT license or GPL. This License is also included in this distribution in the file called ""MIT-COPYING"". EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ #if !defined(__APOLLO_H__) #define __APOLLO_H__ #define TC_SYSTEM_NAME ""Rogue Test Chip"" /* Valid values for the TC_MEMORY_CONFIG configuration option */ #define TC_MEMORY_LOCAL (1) #define TC_MEMORY_HOST (2) #define TC_MEMORY_HYBRID (3) #define TC_MEMORY_DIRECT_MAPPED (4) #define RGX_TC_CORE_CLOCK_SPEED (90000000) #define RGX_TC_MEM_CLOCK_SPEED (65000000) #if defined(SUPPORT_DISPLAY_CLASS) || defined(SUPPORT_DRM_DC_MODULE) /* Memory reserved for use by the PDP DC. */ #define RGX_TC_RESERVE_DC_MEM_SIZE (32 * 1024 * 1024) #endif #if defined(SUPPORT_ION) /* Memory reserved for use by ion. */ #define RGX_TC_RESERVE_ION_MEM_SIZE (384 * 1024 * 1024) #endif /* Apollo reg on base register 0 */ #define SYS_APOLLO_REG_PCI_BASENUM (0) #define SYS_APOLLO_REG_REGION_SIZE (0x00010000) #define SYS_APOLLO_REG_SYS_OFFSET (0x0000) #define SYS_APOLLO_REG_SYS_SIZE (0x0400) #define SYS_APOLLO_REG_PLL_OFFSET (0x1000) #define SYS_APOLLO_REG_PLL_SIZE (0x0400) #define SYS_APOLLO_REG_HOST_OFFSET (0x4050) #define SYS_APOLLO_REG_HOST_SIZE (0x0014) #define SYS_APOLLO_REG_PDP_OFFSET (0xC000) #define SYS_APOLLO_REG_PDP_SIZE (0x0400) /* Offsets for flashing Apollo PROMs from base 0 */ #define APOLLO_FLASH_STAT_OFFSET (0x4058) #define APOLLO_FLASH_DATA_WRITE_OFFSET (0x4050) #define APOLLO_FLASH_RESET_OFFSET (0x4060) #define APOLLO_FLASH_FIFO_STATUS_MASK (0xF) #define APOLLO_FLASH_FIFO_STATUS_SHIFT (0) #define APOLLO_FLASH_PROGRAM_STATUS_MASK (0xF) #define APOLLO_FLASH_PROGAM_STATUS_SHIFT (16) #define APOLLO_FLASH_PROG_COMPLETE_BIT (0x1) #define APOLLO_FLASH_PROG_PROGRESS_BIT (0x2) #define APOLLO_FLASH_PROG_FAILED_BIT (0x4) #define APOLLO_FLASH_INV_FILETYPE_BIT (0x8) #define APOLLO_FLASH_FIFO_SIZE (8) /* RGX reg on base register 1 */ #define SYS_RGX_REG_PCI_BASENUM (1) #define SYS_RGX_REG_REGION_SIZE (0x00004000) /* Device memory (including HP mapping) on base register 2 */ #define SYS_DEV_MEM_PCI_BASENUM (2) /* number of bytes that are broken */ #define SYS_DEV_MEM_BROKEN_BYTES (1024 * 1024) #define SYS_DEV_MEM_REGION_SIZE (0x40000000 - SYS_DEV_MEM_BROKEN_BYTES) #endif /* if !defined(__APOLLO_H__) */ ",0 ", and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * (c) Copyright 1996 Hewlett-Packard Company * (c) Copyright 1996 International Business Machines Corp. * (c) Copyright 1996 Sun Microsystems, Inc. * (c) Copyright 1996 Novell, Inc. * (c) Copyright 1996 Digital Equipment Corp. * (c) Copyright 1996 Fujitsu Limited * (c) Copyright 1996 Hitachi, Ltd. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * ""Software""), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject * to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Except as contained in this notice, the names of the copyright holders * shall not be used in advertising or otherwise to promote the sale, use * or other dealings in this Software without prior written authorization * from said copyright holders. */ /******************************************************************* ** ** ********************************************************* ** * ** * File: PsPolygon.c ** * ** * Contents: Draws Polygons and Rectangles for the PS DDX ** * ** * Created By: Roger Helmendach (Liberty Systems) ** * ** * Copyright: Copyright 1996 The Open Group, Inc. ** * ** ********************************************************* ** ********************************************************************/ /* $XFree86: xc/programs/Xserver/Xprint/ps/PsPolygon.c,v 1.7 2001/12/14 19:59:17 dawes Exp $ */ #include ""Ps.h"" #include ""gcstruct.h"" #include ""windowstr.h"" void PsPolyRectangle( DrawablePtr pDrawable, GCPtr pGC, int nRects, xRectangle *pRects) { if( pDrawable->type==DRAWABLE_PIXMAP ) { DisplayElmPtr elm; PixmapPtr pix = (PixmapPtr)pDrawable; PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; DisplayListPtr disp; GCPtr gc; if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; disp = PsGetFreeDisplayBlock(priv); elm = &disp->elms[disp->nelms]; elm->type = PolyRectangleCmd; elm->gc = gc; elm->c.rects.nRects = nRects; elm->c.rects.pRects = (xRectangle *)xalloc(nRects*sizeof(xRectangle)); memcpy(elm->c.rects.pRects, pRects, nRects*sizeof(xRectangle)); disp->nelms += 1; } else { int i; PsOutPtr psOut; ColormapPtr cMap; if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; PsOut_Offset(psOut, pDrawable->x, pDrawable->y); PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel)); PsLineAttrs(psOut, pGC, cMap); for( i=0 ; itype==DRAWABLE_PIXMAP ) { DisplayElmPtr elm; PixmapPtr pix = (PixmapPtr)pDrawable; PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; DisplayListPtr disp; GCPtr gc; if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; disp = PsGetFreeDisplayBlock(priv); elm = &disp->elms[disp->nelms]; elm->type = FillPolygonCmd; elm->gc = gc; elm->c.polyPts.mode = mode; elm->c.polyPts.nPoints = nPoints; elm->c.polyPts.pPoints = (xPoint *)xalloc(nPoints*sizeof(xPoint)); memcpy(elm->c.polyPts.pPoints, pPoints, nPoints*sizeof(xPoint)); disp->nelms += 1; } else { int i; PsOutPtr psOut; PsPointPtr pts; PsRuleEnum rule; ColormapPtr cMap; if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; PsOut_Offset(psOut, pDrawable->x, pDrawable->y); PsSetFillColor(pDrawable, pGC, psOut, cMap); if( pGC->fillRule==EvenOddRule ) rule = PsEvenOdd; else rule = PsNZWinding; PsOut_FillRule(psOut, rule); pts = (PsPointPtr)xalloc(sizeof(PsPointRec)*nPoints); if( mode==CoordModeOrigin ) { for( i=0 ; itype==DRAWABLE_PIXMAP ) { DisplayElmPtr elm; PixmapPtr pix = (PixmapPtr)pDrawable; PsPixmapPrivPtr priv = (PsPixmapPrivPtr)pix->devPrivate.ptr; DisplayListPtr disp; GCPtr gc; if ((gc = PsCreateAndCopyGC(pDrawable, pGC)) == NULL) return; disp = PsGetFreeDisplayBlock(priv); elm = &disp->elms[disp->nelms]; elm->type = PolyFillRectCmd; elm->gc = gc; elm->c.rects.nRects = nRects; elm->c.rects.pRects = (xRectangle *)xalloc(nRects*sizeof(xRectangle)); memcpy(elm->c.rects.pRects, pRects, nRects*sizeof(xRectangle)); disp->nelms += 1; } else { int i; PsOutPtr psOut; ColormapPtr cMap; if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; PsOut_Offset(psOut, pDrawable->x, pDrawable->y); PsSetFillColor(pDrawable, pGC, psOut, cMap); for( i=0 ; i
條目 窩停主人
注音 ㄨㄛ ㄊ|ㄥˊ ㄓㄨˇ ㄖㄣˊ
漢語拼音 wō tíng zhǔ rén
釋義 藏匿罪犯或贓物的人。宋˙洪邁˙夷堅支志癸˙卷二˙李五郎:*為盜有求不愜,誣為窩停主人,訴于郡,不見察,故陷黨中。*
附錄 修訂本參考資料
",0 "terials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Florian Pirchner - Initial implementation */ package org.lunifera.ecview.core.ui.core.editparts.extension; import org.lunifera.ecview.core.common.editpart.IFieldEditpart; /** * An edit part for optionGroup. */ public interface IEnumOptionsGroupEditpart extends IFieldEditpart { } ",0 " main(int argc, char *argv[]) { DB_ENV *dbenv = NULL; DB *dbp, **second; DBTYPE type; DBT key, data; db_recno_t recno; size_t dsize; int ch, i, count, secondaries; char *ts, buf[64]; cleanup_test_dir(); count = 100000; ts = ""Btree""; type = DB_BTREE; dsize = 20; secondaries = 0; while ((ch = getopt(argc, argv, ""c:d:s:t:"")) != EOF) switch (ch) { case 'c': count = atoi(optarg); break; case 'd': dsize = atoi(optarg); break; case 's': secondaries = atoi(optarg); break; case 't': switch (optarg[0]) { case 'B': case 'b': ts = ""Btree""; type = DB_BTREE; break; case 'H': case 'h': ts = ""Hash""; type = DB_HASH; break; case 'Q': case 'q': ts = ""Queue""; type = DB_QUEUE; break; case 'R': case 'r': ts = ""Recno""; type = DB_RECNO; break; default: return (usage()); } break; case '?': default: return (usage()); } argc -= optind; argv += optind; if (argc != 0) return (usage()); #if DB_VERSION_MAJOR < 3 || DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR < 3 /* * Secondaries were added after DB 3.2.9. */ if (secondaries) return (0); #endif /* Create the environment. */ DB_BENCH_ASSERT(db_env_create(&dbenv, 0) == 0); dbenv->set_errfile(dbenv, stderr); DB_BENCH_ASSERT( dbenv->set_cachesize(dbenv, 0, 1048576 /* 1MB */, 0) == 0); #if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR < 1 DB_BENCH_ASSERT(dbenv->open(dbenv, ""TESTDIR"", NULL, DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE, 0666) == 0); #else DB_BENCH_ASSERT(dbenv->open(dbenv, ""TESTDIR"", DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE, 0666) == 0); #endif /* * Create the database. * Optionally set the record length for Queue. */ DB_BENCH_ASSERT(db_create(&dbp, dbenv, 0) == 0); if (type == DB_QUEUE) DB_BENCH_ASSERT(dbp->set_re_len(dbp, dsize) == 0); #if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 DB_BENCH_ASSERT( dbp->open(dbp, NULL, ""a"", NULL, type, DB_CREATE, 0666) == 0); #else DB_BENCH_ASSERT(dbp->open(dbp, ""a"", NULL, type, DB_CREATE, 0666) == 0); #endif /* Optionally create the secondaries. */ if (secondaries != 0) { DB_BENCH_ASSERT( (second = calloc(sizeof(DB *), secondaries)) != NULL); for (i = 0; i < secondaries; ++i) { DB_BENCH_ASSERT(db_create(&second[i], dbenv, 0) == 0); snprintf(buf, sizeof(buf), ""%d.db"", i); #if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 DB_BENCH_ASSERT(second[i]->open(second[i], NULL, buf, NULL, DB_BTREE, DB_CREATE, 0600) == 0); #else DB_BENCH_ASSERT(second[i]->open(second[i], buf, NULL, DB_BTREE, DB_CREATE, 0600) == 0); #endif #if DB_VERSION_MAJOR > 3 || DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR >= 3 #if DB_VERSION_MAJOR > 3 && DB_VERSION_MINOR > 0 /* * The DB_TXN argument to Db.associate was added in * 4.1.25. */ DB_BENCH_ASSERT( dbp->associate(dbp, NULL, second[i], s, 0) == 0); #else DB_BENCH_ASSERT( dbp->associate(dbp, second[i], s, 0) == 0); #endif #endif } } /* Store a key/data pair. */ memset(&key, 0, sizeof(key)); memset(&data, 0, sizeof(data)); switch (type) { case DB_BTREE: case DB_HASH: key.data = ""01234567890123456789""; key.size = 10; break; case DB_QUEUE: case DB_RECNO: recno = 1; key.data = &recno; key.size = sizeof(recno); break; case DB_UNKNOWN: abort(); break; } DB_BENCH_ASSERT((data.data = malloc(data.size = dsize)) != NULL); /* Store the key/data pair count times. */ TIMER_START; for (i = 0; i < count; ++i) DB_BENCH_ASSERT(dbp->put(dbp, NULL, &key, &data, 0) == 0); TIMER_STOP; if (type == DB_BTREE || type == DB_HASH) printf( ""# %d %s database put of 10 byte key, %lu byte data"", count, ts, (u_long)dsize); else printf(""# %d %s database put of key, %lu byte data"", count, ts, (u_long)dsize); if (secondaries) printf("" with %d secondaries"", secondaries); printf(""\n""); TIMER_DISPLAY(count); return (0); } int s(dbp, pkey, pdata, skey) DB *dbp; const DBT *pkey, *pdata; DBT *skey; { skey->data = pkey->data; skey->size = pkey->size; return (0); } int usage() { (void)fprintf(stderr, ""usage: b_put [-c count] [-d bytes] [-s secondaries] [-t type]\n""); return (EXIT_FAILURE); } ",0 " LICENSE file. package org.chromium.chrome.browser.browserservices.ui.splashscreen.trustedwebactivity; import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static androidx.browser.trusted.TrustedWebActivityIntentBuilder.EXTRA_SPLASH_SCREEN_PARAMS; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Matrix; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import androidx.browser.customtabs.TrustedWebUtils; import androidx.browser.trusted.TrustedWebActivityIntentBuilder; import androidx.browser.trusted.splashscreens.SplashScreenParamKey; import org.chromium.base.IntentUtils; import org.chromium.chrome.browser.browserservices.intents.BrowserServicesIntentDataProvider; import org.chromium.chrome.browser.browserservices.ui.splashscreen.SplashController; import org.chromium.chrome.browser.browserservices.ui.splashscreen.SplashDelegate; import org.chromium.chrome.browser.customtabs.TranslucentCustomTabActivity; import org.chromium.chrome.browser.tab.Tab; import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.util.ColorUtils; import javax.inject.Inject; /** * Orchestrates the flow of showing and removing splash screens for apps based on Trusted Web * Activities. * * The flow is as follows: * - TWA client app verifies conditions for showing splash screen. If the checks pass, it shows the * splash screen immediately. * - The client passes the URI to a file with the splash image to * {@link androidx.browser.customtabs.CustomTabsService}. The image is decoded and put into * {@link SplashImageHolder}. * - The client then launches a TWA, at which point the Bitmap is already available. * - ChromeLauncherActivity calls {@link #handleIntent}, which starts * {@link TranslucentCustomTabActivity} - a CustomTabActivity with translucent style. The * translucency is necessary in order to avoid a flash that might be seen when starting the activity * before the splash screen is attached. * - {@link TranslucentCustomTabActivity} creates an instance of {@link TwaSplashController} which * immediately displays the splash screen in an ImageView on top of the rest of view hierarchy. * - It also immediately removes the translucency. See comment in {@link SplashController} for more * details. * - It waits for the page to load, and removes the splash image once first paint (or a failure) * occurs. * * Lifecycle: this class is resolved only once when CustomTabActivity is launched, and is * gc-ed when it finishes its job. * If these lifecycle assumptions change, consider whether @ActivityScope needs to be added. */ public class TwaSplashController implements SplashDelegate { // TODO(pshmakov): move this to AndroidX. private static final String KEY_SHOWN_IN_CLIENT = ""androidx.browser.trusted.KEY_SPLASH_SCREEN_SHOWN_IN_CLIENT""; private final SplashController mSplashController; private final Activity mActivity; private final SplashImageHolder mSplashImageCache; private final BrowserServicesIntentDataProvider mIntentDataProvider; @Inject public TwaSplashController(SplashController splashController, Activity activity, ActivityWindowAndroid activityWindowAndroid, SplashImageHolder splashImageCache, BrowserServicesIntentDataProvider intentDataProvider) { mSplashController = splashController; mActivity = activity; mSplashImageCache = splashImageCache; mIntentDataProvider = intentDataProvider; long splashHideAnimationDurationMs = IntentUtils.safeGetInt(getSplashScreenParamsFromIntent(), SplashScreenParamKey.KEY_FADE_OUT_DURATION_MS, 0); mSplashController.setConfig(this, splashHideAnimationDurationMs); } @Override public View buildSplashView() { Bitmap bitmap = mSplashImageCache.takeImage(mIntentDataProvider.getSession()); if (bitmap == null) { return null; } ImageView splashView = new ImageView(mActivity); splashView.setLayoutParams(new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT)); splashView.setImageBitmap(bitmap); applyCustomizationsToSplashScreenView(splashView); return splashView; } @Override public void onSplashHidden(Tab tab, long startTimestamp, long endTimestamp) {} @Override public boolean shouldWaitForSubsequentPageLoadToHideSplash() { return false; } private void applyCustomizationsToSplashScreenView(ImageView imageView) { Bundle params = getSplashScreenParamsFromIntent(); int backgroundColor = IntentUtils.safeGetInt( params, SplashScreenParamKey.KEY_BACKGROUND_COLOR, Color.WHITE); imageView.setBackgroundColor(ColorUtils.getOpaqueColor(backgroundColor)); int scaleTypeOrdinal = IntentUtils.safeGetInt(params, SplashScreenParamKey.KEY_SCALE_TYPE, -1); ImageView.ScaleType[] scaleTypes = ImageView.ScaleType.values(); ImageView.ScaleType scaleType; if (scaleTypeOrdinal < 0 || scaleTypeOrdinal >= scaleTypes.length) { scaleType = ImageView.ScaleType.CENTER; } else { scaleType = scaleTypes[scaleTypeOrdinal]; } imageView.setScaleType(scaleType); if (scaleType != ImageView.ScaleType.MATRIX) return; float[] matrixValues = IntentUtils.safeGetFloatArray( params, SplashScreenParamKey.KEY_IMAGE_TRANSFORMATION_MATRIX); if (matrixValues == null || matrixValues.length != 9) return; Matrix matrix = new Matrix(); matrix.setValues(matrixValues); imageView.setImageMatrix(matrix); } private Bundle getSplashScreenParamsFromIntent() { return mIntentDataProvider.getIntent().getBundleExtra(EXTRA_SPLASH_SCREEN_PARAMS); } /** * Returns true if the intent corresponds to a TWA with a splash screen. */ public static boolean intentIsForTwaWithSplashScreen(Intent intent) { boolean isTrustedWebActivity = IntentUtils.safeGetBooleanExtra( intent, TrustedWebUtils.EXTRA_LAUNCH_AS_TRUSTED_WEB_ACTIVITY, false); boolean requestsSplashScreen = IntentUtils.safeGetParcelableExtra(intent, EXTRA_SPLASH_SCREEN_PARAMS) != null; return isTrustedWebActivity && requestsSplashScreen; } /** * Handles the intent if it should launch a TWA with splash screen. * @param activity Activity, from which to start the next one. * @param intent Incoming intent. * @return Whether the intent was handled. */ public static boolean handleIntent(Activity activity, Intent intent) { if (!intentIsForTwaWithSplashScreen(intent)) return false; Bundle params = IntentUtils.safeGetBundleExtra( intent, TrustedWebActivityIntentBuilder.EXTRA_SPLASH_SCREEN_PARAMS); boolean shownInClient = IntentUtils.safeGetBoolean(params, KEY_SHOWN_IN_CLIENT, true); // shownInClient is ""true"" by default for the following reasons: // - For compatibility with older clients which don't use this bundle key. // - Because getting ""false"" when it should be ""true"" leads to more severe visual glitches, // than vice versa. if (shownInClient) { // If splash screen was shown in client, we must launch a translucent activity to // ensure smooth transition. intent.setClassName(activity, TranslucentCustomTabActivity.class.getName()); } intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); activity.startActivity(intent); activity.overridePendingTransition(0, 0); return true; } } ",0 " Menu Default material menu

Basic menu

Food

This is a Menu


Home

This is a Menu

MdMenuModule Official Documentation

<md-menu> is a floating panel containing list of options.

By itself, the <md-menu> element does not render anything. The menu is attached to and opened via application of the mdMenuTriggerFor directive:

<md-menu #appMenu=""mdMenu"">
  <button md-menu-item> Settings </button>
  <button md-menu-item> Help </button>
</md-menu>

<button md-icon-button [mdMenuTriggerFor]=""appMenu"">
   <md-icon>more_vert</md-icon>
</button>
            

Toggling the menu programmatically

The menu exposes an API to open/close programmatically. Please note that in this case, an mdMenuTriggerFor directive is still necessary to attach the menu to a trigger element in the DOM.

              
class MyComponent {
  @ViewChild(MdMenuTrigger) trigger: MdMenuTrigger;

  someMethod() {
    this.trigger.openMenu();
  }
}
              
            

Icons

Menus support displaying md-icon elements before the menu item text.

my-comp.html

<md-menu #menu=""mdMenu"">
  <button md-menu-item>
    <md-icon> dialpad </md-icon>
    <span> Redial </span>
  </button>
  <button md-menu-item disabled>
    <md-icon> voicemail </md-icon>
    <span> Check voicemail </span>
  </button>
  <button md-menu-item>
    <md-icon> notifications_off </md-icon>
    <span> Disable alerts </span>
  </button>
</md-menu>
            

Customizing menu position

By default, the menu will display after and below its trigger. The position can be changed using the x-position (before | after) and y-position (above | below) attributes.

Keyboard interaction

  • DOWN_ARROW: Focuses the next menu item
  • UP_ARROW: Focuses previous menu item
  • ENTER: Activates the focused menu item
MdMenuModule

Directives

MdChipList

A material design chips component (named ChipList for it's similarity to the List component). Example: <md-chip-list> <md-chip>Chip 1<md-chip> <md-chip>Chip 2<md-chip> </md-chip-list>

Properties

Name Description

chips

The chip components contained within this chip list.
@Input()

selectable

Whether or not this chip is selectable. When a chip is not selectable, it's selected state is always ignored.

Methods

focus
Programmatically focus the chip list. This in turn focuses the first non-disabled chip in this chip list.

MdChip

Material design styled Chip component. Used inside the MdChipList component.

Properties

Name Description

onFocus

Emitted when the chip is focused.
@Output()

select

Emitted when the chip is selected.
@Output()

deselect

Emitted when the chip is deselected.
@Output()

destroy

Emitted when the chip is destroyed.
@Input()

disabled

Whether or not the chip is disabled.
@Input()

selected

Whether or not this chip is selected.
@Input()

color

The color of the chip. Can be `primary`, `accent`, or `warn`.

Methods

toggleSelected
Toggles the current selected state of this chip.
Returns
boolean

Whether the chip is selected.

focus
Allows for programmatic focusing of the chip.
",0 "* this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include #include #include ""internal/provider_util.h"" void ossl_prov_cipher_reset(PROV_CIPHER *pc) { EVP_CIPHER_free(pc->alloc_cipher); pc->alloc_cipher = NULL; pc->cipher = NULL; pc->engine = NULL; } int ossl_prov_cipher_copy(PROV_CIPHER *dst, const PROV_CIPHER *src) { if (src->alloc_cipher != NULL && !EVP_CIPHER_up_ref(src->alloc_cipher)) return 0; dst->engine = src->engine; dst->cipher = src->cipher; dst->alloc_cipher = src->alloc_cipher; return 1; } static int load_common(const OSSL_PARAM params[], const char **propquery, ENGINE **engine) { const OSSL_PARAM *p; *propquery = NULL; p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_PROPERTIES); if (p != NULL) { if (p->data_type != OSSL_PARAM_UTF8_STRING) return 0; *propquery = p->data; } *engine = NULL; /* TODO legacy stuff, to be removed */ /* Inside the FIPS module, we don't support legacy ciphers */ #if !defined(FIPS_MODE) && !defined(OPENSSL_NO_ENGINE) p = OSSL_PARAM_locate_const(params, ""engine""); if (p != NULL) { if (p->data_type != OSSL_PARAM_UTF8_STRING) return 0; ENGINE_finish(*engine); *engine = ENGINE_by_id(p->data); if (*engine == NULL) return 0; } #endif return 1; } int ossl_prov_cipher_load_from_params(PROV_CIPHER *pc, const OSSL_PARAM params[], OPENSSL_CTX *ctx) { const OSSL_PARAM *p; const char *propquery; if (!load_common(params, &propquery, &pc->engine)) return 0; p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_CIPHER); if (p == NULL) return 1; if (p->data_type != OSSL_PARAM_UTF8_STRING) return 0; EVP_CIPHER_free(pc->alloc_cipher); pc->cipher = pc->alloc_cipher = EVP_CIPHER_fetch(ctx, p->data, propquery); /* TODO legacy stuff, to be removed */ #ifndef FIPS_MODE /* Inside the FIPS module, we don't support legacy ciphers */ if (pc->cipher == NULL) pc->cipher = EVP_get_cipherbyname(p->data); #endif return pc->cipher != NULL; } const EVP_CIPHER *ossl_prov_cipher_cipher(const PROV_CIPHER *pc) { return pc->cipher; } ENGINE *ossl_prov_cipher_engine(const PROV_CIPHER *pc) { return pc->engine; } void ossl_prov_digest_reset(PROV_DIGEST *pd) { EVP_MD_free(pd->alloc_md); pd->alloc_md = NULL; pd->md = NULL; pd->engine = NULL; } int ossl_prov_digest_copy(PROV_DIGEST *dst, const PROV_DIGEST *src) { if (src->alloc_md != NULL && !EVP_MD_up_ref(src->alloc_md)) return 0; dst->engine = src->engine; dst->md = src->md; dst->alloc_md = src->alloc_md; return 1; } int ossl_prov_digest_load_from_params(PROV_DIGEST *pd, const OSSL_PARAM params[], OPENSSL_CTX *ctx) { const OSSL_PARAM *p; const char *propquery; if (!load_common(params, &propquery, &pd->engine)) return 0; p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_DIGEST); if (p == NULL) return 1; if (p->data_type != OSSL_PARAM_UTF8_STRING) return 0; EVP_MD_free(pd->alloc_md); pd->md = pd->alloc_md = EVP_MD_fetch(ctx, p->data, propquery); /* TODO legacy stuff, to be removed */ #ifndef FIPS_MODE /* Inside the FIPS module, we don't support legacy digests */ if (pd->md == NULL) pd->md = EVP_get_digestbyname(p->data); #endif return pd->md != NULL; } const EVP_MD *ossl_prov_digest_md(const PROV_DIGEST *pd) { return pd->md; } ENGINE *ossl_prov_digest_engine(const PROV_DIGEST *pd) { return pd->engine; } int ossl_prov_macctx_load_from_params(EVP_MAC_CTX **macctx, const OSSL_PARAM params[], const char *macname, const char *ciphername, const char *mdname, OPENSSL_CTX *libctx) { const OSSL_PARAM *p; OSSL_PARAM mac_params[5], *mp = mac_params; const char *properties = NULL; if (macname == NULL && (p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_MAC)) != NULL) { if (p->data_type != OSSL_PARAM_UTF8_STRING) return 0; macname = p->data; } if ((p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_PROPERTIES)) != NULL) { if (p->data_type != OSSL_PARAM_UTF8_STRING) return 0; properties = p->data; } /* If we got a new mac name, we make a new EVP_MAC_CTX */ if (macname != NULL) { EVP_MAC *mac = EVP_MAC_fetch(libctx, macname, properties); EVP_MAC_CTX_free(*macctx); *macctx = mac == NULL ? NULL : EVP_MAC_CTX_new(mac); /* The context holds on to the MAC */ EVP_MAC_free(mac); if (*macctx == NULL) return 0; } /* * If there is no MAC yet (and therefore, no MAC context), we ignore * all other parameters. */ if (*macctx == NULL) return 1; if (mdname == NULL) { if ((p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_DIGEST)) != NULL) { if (p->data_type != OSSL_PARAM_UTF8_STRING) return 0; mdname = p->data; } } if (ciphername == NULL) { if ((p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_CIPHER)) != NULL) { if (p->data_type != OSSL_PARAM_UTF8_STRING) return 0; ciphername = p->data; } } if (mdname != NULL) *mp++ = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST, (char *)mdname, 0); if (ciphername != NULL) *mp++ = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST, (char *)ciphername, 0); if (properties != NULL) *mp++ = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_PROPERTIES, (char *)properties, 0); #if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODE) if ((p = OSSL_PARAM_locate_const(params, ""engine"")) != NULL) { if (p->data_type != OSSL_PARAM_UTF8_STRING) return 0; *mp++ = OSSL_PARAM_construct_utf8_string(""engine"", p->data, p->data_size); } #endif *mp = OSSL_PARAM_construct_end(); if (EVP_MAC_CTX_set_params(*macctx, mac_params)) return 1; EVP_MAC_CTX_free(*macctx); *macctx = NULL; return 0; } ",0 "ructor */ function kml_Overlay() { parent::kml_Feature(); } /* Assignments */ function set_color($color) { $this->color = $color; } function set_drawOrder($drawOrder) { $this->drawOrder = $drawOrder; } function set_Icon($Icon) { $this->Icon = $Icon; } /* Render */ function render($doc) { $X = parent::render($doc); if (isset($this->color)) $X->appendChild(XML_create_text_element($doc, 'color', $this->color)); if (isset($this->drawOrder)) $X->appendChild(XML_create_text_element($doc, 'drawOrder', $this->drawOrder)); if (isset($this->Icon)) $X->appendChild($this->Icon->render($doc)); return $X; } } /* $a = new kml_Overlay(); $a->set_id('1'); $a->dump(false); */ ",0 "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. */ package org.onosproject.store.serializers; import org.onosproject.net.ConnectPoint; import org.onosproject.net.LinkKey; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.Serializer; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; /** * Kryo Serializer for {@link LinkKey}. */ public class LinkKeySerializer extends Serializer { /** * Creates {@link LinkKey} serializer instance. */ public LinkKeySerializer() { // non-null, immutable super(false, true); } @Override public void write(Kryo kryo, Output output, LinkKey object) { kryo.writeClassAndObject(output, object.src()); kryo.writeClassAndObject(output, object.dst()); } @Override public LinkKey read(Kryo kryo, Input input, Class type) { ConnectPoint src = (ConnectPoint) kryo.readClassAndObject(input); ConnectPoint dst = (ConnectPoint) kryo.readClassAndObject(input); return LinkKey.linkKey(src, dst); } } ",0 ".GenericAssayMeta; import org.cbioportal.persistence.MolecularDataRepository; import org.cbioportal.service.GeneService; import org.cbioportal.service.GenericAssayService; import org.cbioportal.service.MolecularProfileService; import org.cbioportal.service.SampleService; import org.cbioportal.service.exception.MolecularProfileNotFoundException; import org.cbioportal.service.util.ExpressionEnrichmentUtil; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.Spy; import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class ExpressionEnrichmentServiceImplTest extends BaseServiceImplTest { @InjectMocks private ExpressionEnrichmentServiceImpl enrichmentServiceImpl; @Mock private SampleService sampleService; @Mock private MolecularProfileService molecularProfileService; @Mock private MolecularDataRepository molecularDataRepository; @Mock private GeneService geneService; @Spy @InjectMocks private ExpressionEnrichmentUtil expressionEnrichmentUtil; @Mock private GenericAssayService genericAssayService; CancerStudy cancerStudy = new CancerStudy(); MolecularProfile geneMolecularProfile = new MolecularProfile(); MolecularProfileSamples molecularProfileSamples = new MolecularProfileSamples(); List samples = new ArrayList<>(); Map> molecularProfileCaseSets = new HashMap<>(); Map> molecularProfilePatientLevelCaseSets = new HashMap<>(); // patient level only data public static final String SAMPLE_ID5 = ""sample_id5""; @Before public void setup() throws MolecularProfileNotFoundException { cancerStudy.setReferenceGenome(ReferenceGenome.HOMO_SAPIENS_DEFAULT_GENOME_NAME); cancerStudy.setCancerStudyIdentifier(STUDY_ID); geneMolecularProfile.setCancerStudyIdentifier(STUDY_ID); geneMolecularProfile.setStableId(MOLECULAR_PROFILE_ID); geneMolecularProfile.setCancerStudy(cancerStudy); molecularProfileSamples.setMolecularProfileId(MOLECULAR_PROFILE_ID); molecularProfileSamples.setCommaSeparatedSampleIds(""1,2,3,4""); Sample sample1 = new Sample(); sample1.setStableId(SAMPLE_ID1); sample1.setInternalId(1); sample1.setCancerStudyIdentifier(STUDY_ID); sample1.setPatientId(1); samples.add(sample1); Sample sample2 = new Sample(); sample2.setStableId(SAMPLE_ID2); sample2.setInternalId(2); sample2.setCancerStudyIdentifier(STUDY_ID); sample2.setPatientId(2); samples.add(sample2); Sample sample3 = new Sample(); sample3.setStableId(SAMPLE_ID3); sample3.setInternalId(3); sample3.setCancerStudyIdentifier(STUDY_ID); sample3.setPatientId(3); samples.add(sample3); Sample sample4 = new Sample(); sample4.setStableId(SAMPLE_ID4); sample4.setInternalId(4); sample4.setCancerStudyIdentifier(STUDY_ID); sample4.setPatientId(4); samples.add(sample4); List alteredSampleIdentifieres = new ArrayList<>(); List unalteredSampleIdentifieres = new ArrayList<>(); List unalteredPatientLevelSampleIdentifieres = new ArrayList<>(); MolecularProfileCaseIdentifier caseIdentifier1 = new MolecularProfileCaseIdentifier(); caseIdentifier1.setMolecularProfileId(MOLECULAR_PROFILE_ID); caseIdentifier1.setCaseId(SAMPLE_ID1); alteredSampleIdentifieres.add(caseIdentifier1); MolecularProfileCaseIdentifier caseIdentifier2 = new MolecularProfileCaseIdentifier(); caseIdentifier2.setMolecularProfileId(MOLECULAR_PROFILE_ID); caseIdentifier2.setCaseId(SAMPLE_ID2); alteredSampleIdentifieres.add(caseIdentifier2); MolecularProfileCaseIdentifier caseIdentifier3 = new MolecularProfileCaseIdentifier(); caseIdentifier3.setMolecularProfileId(MOLECULAR_PROFILE_ID); caseIdentifier3.setCaseId(SAMPLE_ID3); unalteredSampleIdentifieres.add(caseIdentifier3); unalteredPatientLevelSampleIdentifieres.add(caseIdentifier3); MolecularProfileCaseIdentifier caseIdentifier4 = new MolecularProfileCaseIdentifier(); caseIdentifier4.setMolecularProfileId(MOLECULAR_PROFILE_ID); caseIdentifier4.setCaseId(SAMPLE_ID4); unalteredSampleIdentifieres.add(caseIdentifier4); unalteredPatientLevelSampleIdentifieres.add(caseIdentifier4); // patient level only data MolecularProfileCaseIdentifier caseIdentifier5 = new MolecularProfileCaseIdentifier(); caseIdentifier5.setMolecularProfileId(MOLECULAR_PROFILE_ID); caseIdentifier5.setCaseId(SAMPLE_ID5); unalteredPatientLevelSampleIdentifieres.add(caseIdentifier5); molecularProfileCaseSets.put(""altered samples"", alteredSampleIdentifieres); molecularProfileCaseSets.put(""unaltered samples"", unalteredSampleIdentifieres); molecularProfilePatientLevelCaseSets.put(""altered samples"", alteredSampleIdentifieres); molecularProfilePatientLevelCaseSets.put(""unaltered samples"", unalteredPatientLevelSampleIdentifieres); Mockito.when(molecularProfileService.getMolecularProfile(MOLECULAR_PROFILE_ID)) .thenReturn(geneMolecularProfile); Mockito.when(molecularDataRepository.getCommaSeparatedSampleIdsOfMolecularProfile(MOLECULAR_PROFILE_ID)) .thenReturn(molecularProfileSamples); Mockito.when(sampleService.fetchSamples(Arrays.asList(STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID), Arrays.asList(SAMPLE_ID3, SAMPLE_ID4, SAMPLE_ID1, SAMPLE_ID2), ""ID"")).thenReturn(samples); } @Test public void getGenomicEnrichments() throws Exception { geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.MRNA_EXPRESSION); List molecularDataList = new ArrayList(); GeneMolecularAlteration geneMolecularAlteration1 = new GeneMolecularAlteration(); geneMolecularAlteration1.setEntrezGeneId(ENTREZ_GENE_ID_2); geneMolecularAlteration1.setValues(""2,3,2.1,3""); molecularDataList.add(geneMolecularAlteration1); GeneMolecularAlteration geneMolecularAlteration2 = new GeneMolecularAlteration(); geneMolecularAlteration2.setEntrezGeneId(ENTREZ_GENE_ID_3); geneMolecularAlteration2.setValues(""1.1,5,2.3,3""); molecularDataList.add(geneMolecularAlteration2); Mockito.when(molecularDataRepository.getGeneMolecularAlterationsIterableFast(MOLECULAR_PROFILE_ID)) .thenReturn(molecularDataList); List expectedGeneList = new ArrayList<>(); Gene gene1 = new Gene(); gene1.setEntrezGeneId(ENTREZ_GENE_ID_2); gene1.setHugoGeneSymbol(HUGO_GENE_SYMBOL_2); expectedGeneList.add(gene1); Gene gene2 = new Gene(); gene2.setEntrezGeneId(ENTREZ_GENE_ID_3); gene2.setHugoGeneSymbol(HUGO_GENE_SYMBOL_3); expectedGeneList.add(gene2); Mockito.when(geneService.fetchGenes(Arrays.asList(""2"", ""3""), ""ENTREZ_GENE_ID"", ""SUMMARY"")) .thenReturn(expectedGeneList); List result = enrichmentServiceImpl.getGenomicEnrichments(MOLECULAR_PROFILE_ID, molecularProfileCaseSets, EnrichmentType.SAMPLE); Assert.assertEquals(2, result.size()); GenomicEnrichment expressionEnrichment = result.get(0); Assert.assertEquals(ENTREZ_GENE_ID_2, expressionEnrichment.getEntrezGeneId()); Assert.assertEquals(HUGO_GENE_SYMBOL_2, expressionEnrichment.getHugoGeneSymbol()); Assert.assertEquals(null, expressionEnrichment.getCytoband()); Assert.assertEquals(2, expressionEnrichment.getGroupsStatistics().size()); GroupStatistics unalteredGroupStats = expressionEnrichment.getGroupsStatistics().get(0); Assert.assertEquals(""unaltered samples"", unalteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""2.55""), unalteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""0.6363961030678927""), unalteredGroupStats.getStandardDeviation()); GroupStatistics alteredGroupStats = expressionEnrichment.getGroupsStatistics().get(1); Assert.assertEquals(""altered samples"", alteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""2.5""), alteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""0.7071067811865476""), alteredGroupStats.getStandardDeviation()); Assert.assertEquals(new BigDecimal(""0.9475795430163914""), expressionEnrichment.getpValue()); expressionEnrichment = result.get(1); Assert.assertEquals(ENTREZ_GENE_ID_3, expressionEnrichment.getEntrezGeneId()); Assert.assertEquals(HUGO_GENE_SYMBOL_3, expressionEnrichment.getHugoGeneSymbol()); Assert.assertEquals(null, expressionEnrichment.getCytoband()); Assert.assertEquals(2, expressionEnrichment.getGroupsStatistics().size()); unalteredGroupStats = expressionEnrichment.getGroupsStatistics().get(0); Assert.assertEquals(""unaltered samples"", unalteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""2.65""), unalteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""0.4949747468305834""), unalteredGroupStats.getStandardDeviation()); alteredGroupStats = expressionEnrichment.getGroupsStatistics().get(1); Assert.assertEquals(""altered samples"", alteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""3.05""), alteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""2.7577164466275352""), alteredGroupStats.getStandardDeviation()); Assert.assertEquals(new BigDecimal(""0.8716148250471419""), expressionEnrichment.getpValue()); } @Test public void getGenericAssayEnrichments() throws Exception { geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY); List molecularDataList = new ArrayList(); GenericAssayMolecularAlteration genericAssayMolecularAlteration1 = new GenericAssayMolecularAlteration(); genericAssayMolecularAlteration1.setGenericAssayStableId(HUGO_GENE_SYMBOL_1); genericAssayMolecularAlteration1.setValues(""2,3,2.1,3""); molecularDataList.add(genericAssayMolecularAlteration1); GenericAssayMolecularAlteration genericAssayMolecularAlteration2 = new GenericAssayMolecularAlteration(); genericAssayMolecularAlteration2.setGenericAssayStableId(HUGO_GENE_SYMBOL_2); genericAssayMolecularAlteration2.setValues(""1.1,5,2.3,3""); molecularDataList.add(genericAssayMolecularAlteration2); Mockito.when(molecularDataRepository.getGenericAssayMolecularAlterationsIterable(MOLECULAR_PROFILE_ID, null, ""SUMMARY"")).thenReturn(molecularDataList); Mockito.when(genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds( Arrays.asList(HUGO_GENE_SYMBOL_1, HUGO_GENE_SYMBOL_2), Arrays.asList(MOLECULAR_PROFILE_ID, MOLECULAR_PROFILE_ID), ""SUMMARY"")) .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1), new GenericAssayMeta(HUGO_GENE_SYMBOL_2))); List result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID, molecularProfileCaseSets, EnrichmentType.SAMPLE); Assert.assertEquals(2, result.size()); GenericAssayEnrichment genericAssayEnrichment = result.get(0); Assert.assertEquals(HUGO_GENE_SYMBOL_1, genericAssayEnrichment.getStableId()); Assert.assertEquals(2, genericAssayEnrichment.getGroupsStatistics().size()); GroupStatistics unalteredGroupStats = genericAssayEnrichment.getGroupsStatistics().get(0); Assert.assertEquals(""unaltered samples"", unalteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""2.55""), unalteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""0.6363961030678927""), unalteredGroupStats.getStandardDeviation()); GroupStatistics alteredGroupStats = genericAssayEnrichment.getGroupsStatistics().get(1); Assert.assertEquals(""altered samples"", alteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""2.5""), alteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""0.7071067811865476""), alteredGroupStats.getStandardDeviation()); Assert.assertEquals(new BigDecimal(""0.9475795430163914""), genericAssayEnrichment.getpValue()); genericAssayEnrichment = result.get(1); Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayEnrichment.getStableId()); Assert.assertEquals(2, genericAssayEnrichment.getGroupsStatistics().size()); unalteredGroupStats = genericAssayEnrichment.getGroupsStatistics().get(0); Assert.assertEquals(""unaltered samples"", unalteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""2.65""), unalteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""0.4949747468305834""), unalteredGroupStats.getStandardDeviation()); alteredGroupStats = genericAssayEnrichment.getGroupsStatistics().get(1); Assert.assertEquals(""altered samples"", alteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""3.05""), alteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""2.7577164466275352""), alteredGroupStats.getStandardDeviation()); Assert.assertEquals(new BigDecimal(""0.8716148250471419""), genericAssayEnrichment.getpValue()); } @Test public void getGenericAssayPatientLevelEnrichments() throws Exception { geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY); geneMolecularProfile.setPatientLevel(true); List molecularDataList = new ArrayList(); GenericAssayMolecularAlteration genericAssayMolecularAlteration1 = new GenericAssayMolecularAlteration(); genericAssayMolecularAlteration1.setGenericAssayStableId(HUGO_GENE_SYMBOL_1); genericAssayMolecularAlteration1.setValues(""2,3,2.1,3,3,3""); molecularDataList.add(genericAssayMolecularAlteration1); GenericAssayMolecularAlteration genericAssayMolecularAlteration2 = new GenericAssayMolecularAlteration(); genericAssayMolecularAlteration2.setGenericAssayStableId(HUGO_GENE_SYMBOL_2); genericAssayMolecularAlteration2.setValues(""1.1,5,2.3,3,3""); molecularDataList.add(genericAssayMolecularAlteration2); Mockito.when(molecularDataRepository.getGenericAssayMolecularAlterationsIterable(MOLECULAR_PROFILE_ID, null, ""SUMMARY"")).thenReturn(molecularDataList); Mockito.when(genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds( Arrays.asList(HUGO_GENE_SYMBOL_1, HUGO_GENE_SYMBOL_2), Arrays.asList(MOLECULAR_PROFILE_ID, MOLECULAR_PROFILE_ID), ""SUMMARY"")) .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1), new GenericAssayMeta(HUGO_GENE_SYMBOL_2))); // add 5th sample which is the second sample of patient 4 Sample sample5 = new Sample(); sample5.setStableId(SAMPLE_ID5); sample5.setInternalId(5); sample5.setCancerStudyIdentifier(STUDY_ID); sample5.setPatientId(4); samples.add(sample5); Mockito.when(sampleService.fetchSamples(Arrays.asList(STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID), Arrays.asList(SAMPLE_ID3, SAMPLE_ID4, SAMPLE_ID5, SAMPLE_ID1, SAMPLE_ID2), ""ID"")).thenReturn(samples); List result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID, molecularProfilePatientLevelCaseSets, EnrichmentType.SAMPLE); Assert.assertEquals(2, result.size()); GenericAssayEnrichment genericAssayEnrichment = result.get(0); Assert.assertEquals(HUGO_GENE_SYMBOL_1, genericAssayEnrichment.getStableId()); Assert.assertEquals(2, genericAssayEnrichment.getGroupsStatistics().size()); GroupStatistics unalteredGroupStats = genericAssayEnrichment.getGroupsStatistics().get(0); Assert.assertEquals(""unaltered samples"", unalteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""2.55""), unalteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""0.6363961030678927""), unalteredGroupStats.getStandardDeviation()); GroupStatistics alteredGroupStats = genericAssayEnrichment.getGroupsStatistics().get(1); Assert.assertEquals(""altered samples"", alteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""2.5""), alteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""0.7071067811865476""), alteredGroupStats.getStandardDeviation()); Assert.assertEquals(new BigDecimal(""0.9475795430163914""), genericAssayEnrichment.getpValue()); genericAssayEnrichment = result.get(1); Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayEnrichment.getStableId()); Assert.assertEquals(2, genericAssayEnrichment.getGroupsStatistics().size()); unalteredGroupStats = genericAssayEnrichment.getGroupsStatistics().get(0); Assert.assertEquals(""unaltered samples"", unalteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""2.65""), unalteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""0.4949747468305834""), unalteredGroupStats.getStandardDeviation()); alteredGroupStats = genericAssayEnrichment.getGroupsStatistics().get(1); Assert.assertEquals(""altered samples"", alteredGroupStats.getName()); Assert.assertEquals(new BigDecimal(""3.05""), alteredGroupStats.getMeanExpression()); Assert.assertEquals(new BigDecimal(""2.7577164466275352""), alteredGroupStats.getStandardDeviation()); Assert.assertEquals(new BigDecimal(""0.8716148250471419""), genericAssayEnrichment.getpValue()); } } ",0 "cloudcontroller.js""> ",0 "ice-width, initial-scale=1""> Wrigley-1981 The population history of England, 1541-1871: a re | Communicating with Prisoners
Skip to content

Communicating with Prisoners

Public Interest Analysis

Wrigley-1981 The population history of England, 1541-1871: a re


reference-type: Book
author: Wrigley, E. A. and Schofield, R. S.
year: 1981
title: The population history of England, 1541-1871: a reconstruction
place-published: Cambridge, MA
publisher: Harvard Univ. Press
otx-key: Wrigley-1981

",0 "s. Elle totalisait 807 habitants en 2008.

Le nombre de logements, à Valsonne, se décomposait en 2011 en 66 appartements et 381 maisons soit un marché plutôt équilibré.

La commune compte quelques équipements, elle propose entre autres un terrain de tennis et un terrain de sport.

À Valsonne, le prix moyen à l'achat d'un appartement s'évalue à 1 423 € du m² en vente. la valorisation moyenne d'une maison à l'achat se situe à 1 482 € du m². À la location la valorisation moyenne se situe à 6,36 € du m² mensuel.

À coté de Valsonne sont positionnées géographiquement les villes de Ternand localisée à 7 km, 729 habitants, Dareizé localisée à 6 km, 432 habitants, Saint-Loup située à 7 km, 958 habitants, Ronno localisée à 5 km, 598 habitants, Saint-Appolinaire localisée à 3 km, 146 habitants, Les Sauvages à 4 km, 620 habitants, entre autres. De plus, Valsonne est située à seulement 29 km de Roanne.

Si vous pensez venir habiter à Valsonne, vous pourrez aisément trouver une maison à vendre.

",0 "text/html; charset=utf-8""> ROUTES ",0 "n 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. */ package com.intellij.ide.actions; import com.intellij.CommonBundle; import com.intellij.history.LocalHistory; import com.intellij.history.LocalHistoryAction; import com.intellij.ide.IdeBundle; import com.intellij.openapi.application.WriteAction; import com.intellij.openapi.application.WriteActionAware; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.command.UndoConfirmationPolicy; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.NlsContexts; import com.intellij.openapi.util.Ref; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.PsiElement; import com.intellij.psi.SmartPointerManager; import com.intellij.psi.SmartPsiElementPointer; import com.intellij.util.ThrowableRunnable; import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; /** * @author peter */ public abstract class ElementCreator implements WriteActionAware { private static final Logger LOG = Logger.getInstance(ElementCreator.class); private final Project myProject; private final @NlsContexts.DialogTitle String myErrorTitle; protected ElementCreator(Project project, @NotNull @NlsContexts.DialogTitle String errorTitle) { myProject = project; myErrorTitle = errorTitle; } protected abstract PsiElement @NotNull [] create(@NotNull String newName) throws Exception; @NlsContexts.Command @NotNull protected abstract String getActionName(@NotNull String newName); public @NotNull PsiElement @NotNull [] tryCreate(@NotNull final String inputString) { if (inputString.isEmpty()) { Messages.showMessageDialog(myProject, IdeBundle.message(""error.name.should.be.specified""), CommonBundle.getErrorTitle(), Messages.getErrorIcon()); return PsiElement.EMPTY_ARRAY; } Ref>> createdElements = Ref.create(); Exception exception = executeCommand(getActionName(inputString), () -> { PsiElement[] psiElements = create(inputString); SmartPointerManager manager = SmartPointerManager.getInstance(myProject); createdElements.set(ContainerUtil.map(psiElements, manager::createSmartPsiElementPointer)); }); if (exception != null) { handleException(exception); return PsiElement.EMPTY_ARRAY; } return ContainerUtil.mapNotNull(createdElements.get(), SmartPsiElementPointer::getElement).toArray(PsiElement.EMPTY_ARRAY); } @Nullable private Exception executeCommand(@NotNull @NlsContexts.Command String commandName, @NotNull ThrowableRunnable invokeCreate) { final Exception[] exception = new Exception[1]; CommandProcessor.getInstance().executeCommand(myProject, () -> { LocalHistoryAction action = LocalHistory.getInstance().startAction(commandName); try { if (startInWriteAction()) { WriteAction.run(invokeCreate); } else { invokeCreate.run(); } } catch (Exception ex) { exception[0] = ex; } finally { action.finish(); } }, commandName, null, UndoConfirmationPolicy.REQUEST_CONFIRMATION); return exception[0]; } private void handleException(Exception t) { LOG.info(t); String errorMessage = getErrorMessage(t); Messages.showMessageDialog(myProject, errorMessage, myErrorTitle, Messages.getErrorIcon()); } public static @NlsContexts.DialogMessage String getErrorMessage(Throwable t) { String errorMessage = CreateElementActionBase.filterMessage(t.getMessage()); if (StringUtil.isEmpty(errorMessage)) { errorMessage = t.toString(); } return errorMessage; } } ",0 "clude ""jpeg_drv_6589_reg.h"" #include ""jpeg_drv_6589_common.h"" #define JPEG_ENC_RST_BIT 0x1 #define JPEG_ENC_CTRL_ENABLE_BIT 0x01 #define JPEG_ENC_CTRL_DIS_GMC_BIT 0x02 #define JPEG_ENC_CTRL_INT_EN_BIT 0x04 #define JPEG_ENC_CTRL_YUV_BIT 0x18 #define JPEG_ENC_CTRL_FILE_FORMAT_BIT 0x20 #define JPEG_ENC_CTRL_GRAY_EN_BIT 0x80 #define JPEG_ENC_CTRL_ULTRA_HIGH_EN_BIT 0x200 #define JPEG_ENC_CTRL_RESTART_EN_BIT 0x400 #define JPEG_ENC_CTRL_BURST_TYPE_MASK 0x00007000 #define JPEG_ENC_CTRL_BURST_TYPE_SHIFT_COUNT 12 #define JPEG_ENC_EN_DIS_GMC (1 << 2) #define JPEG_ENC_EN_JFIF_EXIF (1 << 5) #define JPEG_ENC_EN_SELF_INIT (1 << 16) #define JPEG_ENC_DEBUG_INFO0_GMC_IDLE_MASK (1 << 13) #define JPEG_MSG printk #define JPEG_WRN printk #define JPEG_ERR printk kal_uint32 _jpeg_enc_int_status = 0; int jpeg_isr_enc_lisr(void) { unsigned int tmp, tmp1 ; //_jpeg_enc_int_status = REG_JPEG_ENC_INTERRUPT_STATUS; tmp1 = REG_JPEG_ENC_INTERRUPT_STATUS ; tmp = tmp1 & (JPEG_DRV_ENC_INT_STATUS_MASK_ALLIRQ); if(tmp){ _jpeg_enc_int_status = tmp ; /// clear the interrupt status register //if(_jpeg_enc_int_status) //{ IMG_REG_WRITE( 0, REG_ADDR_JPEG_ENC_INTERRUPT_STATUS); //REG_JPEG_ENC_INTERRUPT_STATUS = 0; return 0; //} }else if(_jpeg_enc_int_status){ IMG_REG_WRITE( 0, REG_ADDR_JPEG_ENC_INTERRUPT_STATUS); //REG_JPEG_ENC_INTERRUPT_STATUS = 0; return 0; } return -1; } kal_uint32 jpeg_drv_enc_set_src_image(kal_uint32 width, kal_uint32 height, kal_uint32 yuv_format, kal_uint32 totalEncDU) { kal_uint32 ret = 1; ret &= jpeg_drv_enc_set_img_size(width, height); ret &= jpeg_drv_enc_set_encFormat(yuv_format) ; ret &= jpeg_drv_enc_set_blk_num(totalEncDU); return ret; } kal_uint32 jpeg_drv_enc_set_src_buf(kal_uint32 yuv_format, kal_uint32 img_stride, kal_uint32 mem_stride, kal_uint32 srcAddr, kal_uint32 srcAddr_C) { kal_uint32 ret = 1; if( yuv_format == 0x00 || yuv_format == 0x01 ){ if( (mem_stride & 0x1f) || (img_stride & 0x1f) ){ JPEG_MSG(""JPEGENC: set image/memory stride not align 0x1f in fmt %x(%x/%x)!!\n"", yuv_format, mem_stride, img_stride); ret = 0; } } ret &= jpeg_drv_enc_set_image_stride(img_stride); ret &= jpeg_drv_enc_set_memory_stride(mem_stride); ret &= jpeg_drv_enc_set_luma_addr(srcAddr); ret &= jpeg_drv_enc_set_chroma_addr(srcAddr_C); return ret; } /////////////////////////////////////////////////////////////////////////////// kal_uint32 jpeg_drv_enc_ctrl_cfg( kal_uint32 exif_en, kal_uint32 quality, kal_uint32 restart_interval) { jpeg_drv_enc_set_quality(quality); jpeg_drv_enc_set_restart_interval(restart_interval); jpeg_drv_enc_set_EncodeMode(exif_en); return 1; //if (0 != ctrl_cfg.gmc_disable) // REG_JPEG_ENC_CTRL |= JPEG_ENC_CTRL_DIS_GMC_BIT; // //REG_JPEG_ENC_CTRL |= JPEG_ENC_EN_SELF_INIT; } void jpeg_drv_enc_dump_reg(void) { unsigned int reg_value = 0; unsigned int index = 0; JPEG_MSG(""===== JPEG ENC DUMP =====\n""); for(index = 0x100 ; index < JPEG_ENC_REG_COUNT ; index += 4){ #ifdef FPGA_VERSION reg_value = *(volatile kal_uint32 *)(JPEG_ENC_BASE + index); #else //reg_value = ioread32(JPEG_ENC_BASE + index); IMG_REG_READ(reg_value, JPEG_ENC_BASE + index); #endif JPEG_MSG(""+0x%x 0x%08x\n"", index, reg_value); } } void jpeg_drv_enc_start(void) { unsigned int u4Value ; u4Value = REG_JPEG_ENC_CTRL ; u4Value |= (JPEG_ENC_CTRL_INT_EN_BIT | JPEG_ENC_CTRL_ENABLE_BIT); IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_CTRL); //REG_JPEG_ENC_CTRL |= (JPEG_ENC_CTRL_INT_EN_BIT | JPEG_ENC_CTRL_ENABLE_BIT); } extern void jpeg_drv_enc_power_on(void); extern void jpeg_drv_enc_power_off(void); // workaround for jpeg odd read operation at cg gating state void jpeg_drv_enc_verify_state_and_reset(void) { unsigned int temp, value; IMG_REG_WRITE( (0), REG_ADDR_JPEG_ENC_RSTB); //REG_JPEG_ENC_RSTB = 0; IMG_REG_WRITE( (0), REG_ADDR_JPEG_ENC_RSTB); //REG_JPEG_ENC_RSTB = 0; IMG_REG_WRITE( (1), REG_ADDR_JPEG_ENC_RSTB); //REG_JPEG_ENC_RSTB = 1; IMG_REG_WRITE( (1), REG_ADDR_JPEG_ENC_RSTB); //REG_JPEG_ENC_RSTB = 1; IMG_REG_READ( temp, REG_ADDR_JPEG_ENC_ULTRA_THRES ); IMG_REG_READ( value, REG_ADDR_JPEG_ENC_DMA_ADDR0 ); // issue happen, need to do 1 read at cg gating state if (value == 0xFFFFFFFF) { JPEG_MSG(""JPGENC APB R/W issue found, start to do recovery!\n""); jpeg_drv_enc_power_off(); IMG_REG_READ( value, REG_ADDR_JPEG_ENC_ULTRA_THRES ); jpeg_drv_enc_power_on(); } IMG_REG_WRITE( (0), REG_ADDR_JPEG_ENC_CODEC_SEL); //REG_JPEG_ENC_CODEC_SEL = 0; //switch SRAM to jpeg module _jpeg_enc_int_status = 0; } void jpeg_drv_enc_reset(void) { IMG_REG_WRITE( (0), REG_ADDR_JPEG_ENC_RSTB); //REG_JPEG_ENC_RSTB = 0; IMG_REG_WRITE( (1), REG_ADDR_JPEG_ENC_RSTB); //REG_JPEG_ENC_RSTB = 1; IMG_REG_WRITE( (0), REG_ADDR_JPEG_ENC_CODEC_SEL); //REG_JPEG_ENC_CODEC_SEL = 0; //switch SRAM to jpeg module _jpeg_enc_int_status = 0; } kal_uint32 jpeg_drv_enc_warm_reset(void) { kal_uint32 timeout = 0xFFFFF; REG_JPEG_ENC_CTRL &= ~JPEG_ENC_CTRL_ENABLE_BIT; REG_JPEG_ENC_CTRL |= JPEG_ENC_CTRL_ENABLE_BIT; while (0 == (REG_JPEG_ENC_DEBUG_INFO0 & JPEG_ENC_DEBUG_INFO0_GMC_IDLE_MASK)) { timeout--; if (0 == timeout) { JPEG_MSG(""Wait for GMC IDLE timeout\n""); return 0; } } REG_JPEG_ENC_RSTB &= ~(JPEG_ENC_RST_BIT); REG_JPEG_ENC_RSTB |= JPEG_ENC_RST_BIT; IMG_REG_WRITE( (0), REG_ADDR_JPEG_ENC_CODEC_SEL); //REG_JPEG_ENC_CODEC_SEL = 0; _jpeg_enc_int_status = 0; return 1; } kal_uint32 jpeg_drv_enc_set_encFormat(kal_uint32 encFormat) { kal_uint32 val ; unsigned int u4Value ; if(encFormat & (~3)){ JPEG_ERR(""JPEG_DRV_ENC: set encFormat Err %d!!\n"", encFormat ); return 0; } val = (encFormat & 3) << 3; #if 0 // REG_JPEG_ENC_CTRL &= ~JPEG_ENC_CTRL_YUV_BIT; // // REG_JPEG_ENC_CTRL |= val; #else u4Value = REG_JPEG_ENC_CTRL ; u4Value &= ~JPEG_ENC_CTRL_YUV_BIT; u4Value |= val; IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_CTRL); #endif return 1; } kal_uint32 jpeg_drv_enc_set_quality(kal_uint32 quality) { unsigned int u4Value ; if (quality == 0x8 || quality == 0xC) { JPEG_MSG(""JPEGENC: set quality failed\n""); return 0; } u4Value = REG_JPEG_ENC_QUALITY; u4Value = (u4Value & 0xFFFF0000) | quality ; IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_QUALITY); //REG_JPEG_ENC_QUALITY = (REG_JPEG_ENC_QUALITY & 0xFFFF0000) | quality; return 1; } kal_uint32 jpeg_drv_enc_set_img_size(kal_uint32 width, kal_uint32 height) { unsigned int u4Value ; if ((width & 0xffff0000) || (height & 0xffff0000)) { JPEG_MSG(""JPEGENC: img size exceed 65535, (%x, %x)!!\n"", width, height); return 0; } u4Value = (width << 16) | height ; IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_IMG_SIZE); //REG_JPEG_ENC_IMG_SIZE = (width << 16) | height; return 1; } kal_uint32 jpeg_drv_enc_set_blk_num(kal_uint32 blk_num) //NO_USE { if (blk_num < 4) { return 0; } IMG_REG_WRITE( (blk_num), REG_ADDR_JPEG_ENC_BLK_NUM); //REG_JPEG_ENC_BLK_NUM = blk_num; return 1; } kal_uint32 jpeg_drv_enc_set_luma_addr(kal_uint32 src_luma_addr) { if (src_luma_addr & 0x0F) { JPEG_MSG(""JPEGENC: set LUMA addr not align (%x)!!\n"", src_luma_addr); //return 0; } IMG_REG_WRITE( (src_luma_addr), REG_ADDR_JPEG_ENC_SRC_LUMA_ADDR); //REG_JPEG_ENC_SRC_LUMA_ADDR = src_luma_addr; return 1; } kal_uint32 jpeg_drv_enc_set_chroma_addr(kal_uint32 src_chroma_addr) { if (src_chroma_addr & 0x0F) { JPEG_MSG(""JPEGENC: set CHROMA addr not align (%x)!!\n"", src_chroma_addr); //return 0; } IMG_REG_WRITE( (src_chroma_addr), REG_ADDR_JPEG_ENC_SRC_CHROMA_ADDR); //REG_JPEG_ENC_SRC_CHROMA_ADDR = src_chroma_addr; return 1; } kal_uint32 jpeg_drv_enc_set_memory_stride(kal_uint32 mem_stride) { if ( mem_stride & 0x0F ) { JPEG_MSG(""JPEGENC: set memory stride failed, not align to 0x1f (%x)!!\n"", mem_stride); return 0; } IMG_REG_WRITE( (mem_stride), REG_ADDR_JPEG_ENC_STRIDE); //REG_JPEG_ENC_STRIDE = (mem_stride); return 1; } kal_uint32 jpeg_drv_enc_set_image_stride(kal_uint32 img_stride) { if (img_stride & 0x0F) { JPEG_MSG(""JPEGENC: set image stride failed, not align to 0x0f (%x)!!\n"", img_stride); return 0; } IMG_REG_WRITE( (img_stride), REG_ADDR_JPEG_ENC_IMG_STRIDE); //REG_JPEG_ENC_IMG_STRIDE = (img_stride); return 1; } void jpeg_drv_enc_set_restart_interval(kal_uint32 restart_interval) { unsigned int u4Value ; u4Value = REG_JPEG_ENC_CTRL ; if (0 != restart_interval) { u4Value |= JPEG_ENC_CTRL_RESTART_EN_BIT ; IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_CTRL); //REG_JPEG_ENC_CTRL |= JPEG_ENC_CTRL_RESTART_EN_BIT; } else { u4Value &= ~JPEG_ENC_CTRL_RESTART_EN_BIT; IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_CTRL); //REG_JPEG_ENC_CTRL &= ~JPEG_ENC_CTRL_RESTART_EN_BIT; } IMG_REG_WRITE( (restart_interval), REG_ADDR_JPEG_ENC_RST_MCU_NUM); //REG_JPEG_ENC_RST_MCU_NUM = restart_interval; } kal_uint32 jpeg_drv_enc_set_offset_addr(kal_uint32 offset) { if (offset & 0x0F) { JPEG_MSG(""JPEGENC:WARN set offset addr %x\n"", offset); //return 0; } IMG_REG_WRITE( (offset), REG_ADDR_JPEG_ENC_OFFSET_ADDR); //REG_JPEG_ENC_OFFSET_ADDR = offset; return 1; } kal_uint32 jpeg_drv_enc_set_dst_buff(kal_uint32 dst_addr, kal_uint32 stall_size, kal_uint32 init_offset, kal_uint32 offset_mask) { if (stall_size < 624) { JPEG_MSG(""JPEGENC:stall offset less than 624 to write header %d!!\n"",stall_size); return 0; } if (offset_mask & 0x0F) { JPEG_MSG(""JPEGENC: set offset addr %x\n"", offset_mask); //return 0; } IMG_REG_WRITE( (init_offset & (~0xF)), REG_ADDR_JPEG_ENC_OFFSET_ADDR); //REG_JPEG_ENC_OFFSET_ADDR = init_offset & (~0xF); IMG_REG_WRITE( (offset_mask & 0xF), REG_ADDR_JPEG_ENC_BYTE_OFFSET_MASK); //REG_JPEG_ENC_BYTE_OFFSET_MASK = (offset_mask & 0xF); IMG_REG_WRITE( (dst_addr & (~0xF)), REG_ADDR_JPEG_ENC_DST_ADDR0); //REG_JPEG_ENC_DST_ADDR0 = dst_addr & (~0xF); IMG_REG_WRITE( ((dst_addr + stall_size) & (~0xF)), REG_ADDR_JPEG_ENC_STALL_ADDR0); //REG_JPEG_ENC_STALL_ADDR0 = (dst_addr + stall_size) & (~0xF); return 1; } // 0:JPG mode, 1:JFIF/EXIF mode void jpeg_drv_enc_set_EncodeMode(kal_uint32 exif_en) { unsigned int u4Value ; u4Value = REG_JPEG_ENC_CTRL; u4Value &= ~(JPEG_ENC_CTRL_FILE_FORMAT_BIT); IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_CTRL); //REG_JPEG_ENC_CTRL &= ~(JPEG_ENC_CTRL_FILE_FORMAT_BIT); if (exif_en) { u4Value = REG_JPEG_ENC_CTRL; u4Value |= JPEG_ENC_EN_JFIF_EXIF; IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_CTRL); //REG_JPEG_ENC_CTRL |= JPEG_ENC_EN_JFIF_EXIF; } } void jpeg_drv_enc_set_gmc_disable_bit(void) { unsigned int u4Value ; u4Value = REG_JPEG_ENC_CTRL ; u4Value |= JPEG_ENC_EN_DIS_GMC; IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_CTRL); } void jpeg_drv_enc_set_burst_type(kal_uint32 burst_type) { unsigned int u4Value ; u4Value = REG_JPEG_ENC_CTRL ; u4Value &= ~JPEG_ENC_CTRL_BURST_TYPE_MASK; u4Value |= (burst_type << JPEG_ENC_CTRL_BURST_TYPE_SHIFT_COUNT); IMG_REG_WRITE( (u4Value), REG_ADDR_JPEG_ENC_CTRL); } kal_uint32 jpeg_drv_enc_get_cycle_count() { return REG_JPEG_ENC_TOTAL_CYCLE; } kal_uint32 jpeg_drv_enc_get_file_size() { return REG_JPEG_ENC_DMA_ADDR0 - REG_JPEG_ENC_DST_ADDR0; //return REG_JPEG_ENC_CURR_DMA_ADDR - REG_JPEG_ENC_DST_ADDR0; } #ifdef FPGA_VERSION kal_uint32 jpeg_drv_enc_get_result() { kal_uint32 file_size; file_size = jpeg_drv_enc_get_file_size(); return file_size; } #else kal_uint32 jpeg_drv_enc_get_result(kal_uint32 *fileSize) { *fileSize = jpeg_drv_enc_get_file_size(); if(_jpeg_enc_int_status & JPEG_DRV_ENC_INT_STATUS_DONE) { return 0; } else if(_jpeg_enc_int_status & JPEG_DRV_ENC_INT_STATUS_STALL) { return 1; }else if( _jpeg_enc_int_status & JPEG_DRV_ENC_INT_STATUS_VCODEC_IRQ){ return 2; } JPEG_MSG(""JPEGENC: int_st %x!!\n"", _jpeg_enc_int_status); return 3; } #endif ",0 "javadoc (build 1.6.0_26) on Sun Dec 22 15:55:56 GMT 2013 --> Uses of Class org.lwjgl.opencl.KHRGLDepthImages (LWJGL API)
Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
 PREV   NEXT FRAMES    NO FRAMES    

Uses of Class
org.lwjgl.opencl.KHRGLDepthImages

No usage of org.lwjgl.opencl.KHRGLDepthImages


Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
 PREV   NEXT FRAMES    NO FRAMES    

Copyright © 2002-2009 lwjgl.org. All Rights Reserved. ",0 "Success; ULONG length; ULONG bytesRead; ULONG bytesWritten; BYTE buffer[1024]; HANDLE hVirtualChannel; length = sizeof(buffer); hVirtualChannel = WTSVirtualChannelOpenEx( WTS_CURRENT_SESSION, ""ECHO"",WTS_CHANNEL_OPTION_DYNAMIC); if (hVirtualChannel == INVALID_HANDLE_VALUE) { printf(""WTSVirtualChannelOpen failed: %""PRIu32""\n"", GetLastError()); return -1; } printf(""WTSVirtualChannelOpen opend""); bytesWritten = 0; bSuccess = WTSVirtualChannelWrite(hVirtualChannel, (PCHAR) buffer, length, &bytesWritten); if (!bSuccess) { printf(""WTSVirtualChannelWrite failed: %""PRIu32""\n"", GetLastError()); return -1; } printf(""WTSVirtualChannelWrite written""); bytesRead = 0; bSuccess = WTSVirtualChannelRead(hVirtualChannel, 5000, (PCHAR) buffer, length, &bytesRead); if (!bSuccess) { printf(""WTSVirtualChannelRead failed: %""PRIu32""\n"", GetLastError()); return -1; } printf(""WTSVirtualChannelRead read""); if (!WTSVirtualChannelClose(hVirtualChannel)) { printf(""WTSVirtualChannelClose failed\n""); return -1; } return 0; } ",0 "le>simple-io: 27 s 🏆
« Up

simple-io 1.3.0 27 s 🏆

📅 (2022-01-04 03:17:13 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-num            base        Num library distributed with the OCaml compiler
base-threads        base
base-unix           base
camlp5              7.14        Preprocessor-pretty-printer of OCaml
conf-findutils      1           Virtual package relying on findutils
conf-perl           1           Virtual package relying on perl
coq                 8.9.0       Formal proof management system
num                 0           The Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.05.0      The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0      Official 4.05.0 release
ocaml-config        1           OCaml Switch Configuration
ocamlfind           1.9.1       A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Li-yao Xia <lysxia@gmail.com>"
authors: "Li-yao Xia"
homepage: "https://github.com/Lysxia/coq-simple-io"
bug-reports: "https://github.com/Lysxia/coq-simple-io/issues"
license: "MIT"
dev-repo: "git+https://github.com/Lysxia/coq-simple-io.git"
build: [make "build"]
run-test: [make "test"]
install: [make "install"]
depends: [
  "ocaml"
  "coq" {>= "8.8" & < "8.13~"}
  "coq-ext-lib"
  "ocamlbuild" {with-test}
]
tags: [
  "date:2020-03-08"
  "logpath:SimpleIO"
  "keyword:extraction"
  "keyword:effects"
]
synopsis: "IO monad for Coq"
description: """
This library provides tools to implement IO programs directly in Coq, in a
similar style to Haskell. Facilities for formal verification are not included.
IO is defined as a parameter with a purely functional interface in Coq,
to be extracted to OCaml. Some wrappers for the basic types and functions in
the OCaml Pervasives module are provided. Users are free to define their own
APIs on top of this IO type."""
url {
  src: "https://github.com/Lysxia/coq-simple-io/archive/1.3.0.tar.gz"
  checksum: "sha512=bcf7746e7877c4672e509e8c80db28b93cffbb064e114cf4df4465d9be3d55274c84a7406b38eaf510deda8a2574e42f3b40c8f716841bd92557e7b59d86e7cb"
}

Lint

Command
true
Return code
0

Dry install 🏜️

Dry install with the current Coq version:

Command
opam install -y --show-action coq-simple-io.1.3.0 coq.8.9.0
Return code
0

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command
true
Return code
0

Install dependencies

Command
opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-simple-io.1.3.0 coq.8.9.0
Return code
0
Duration
1 m 13 s

Install 🚀

Command
opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-simple-io.1.3.0 coq.8.9.0
Return code
0
Duration
27 s

Installation size

Total: 478 K

  • 50 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Unix.vo
  • 43 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Stdlib.vo
  • 28 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_UnsafeNat.vo
  • 28 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_RawChar.vo
  • 28 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_String.vo
  • 26 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Bytes.vo
  • 26 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Unsafe.vo
  • 26 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Float.vo
  • 25 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Random.vo
  • 25 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Sys.vo
  • 25 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/SimpleIO.vo
  • 25 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_StdlibAxioms.vo
  • 16 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Stdlib.glob
  • 15 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Unix.glob
  • 14 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Monad.vo
  • 13 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Unix.v
  • 11 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Stdlib.v
  • 10 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Monad.glob
  • 4 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_UnsafeNat.glob
  • 4 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Monad.v
  • 4 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Exceptions.vo
  • 4 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_String.glob
  • 3 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_RawChar.glob
  • 3 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_String.v
  • 2 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_RawChar.v
  • 2 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Float.v
  • 2 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Unsafe.glob
  • 2 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Unsafe.v
  • 2 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Bytes.glob
  • 2 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Bytes.v
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Float.glob
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_UnsafeNat.v
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Exceptions.glob
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Random.v
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Exceptions.v
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Random.glob
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Sys.v
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_Sys.glob
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_StdlibAxioms.glob
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/SimpleIO.glob
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/SimpleIO.v
  • 1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/SimpleIO/IO_StdlibAxioms.v

Uninstall 🧹

Command
opam remove -y coq-simple-io.1.3.0
Return code
0
Missing removes
none
Wrong removes
none

Sources are on GitHub © Guillaume Claret 🐣

",0 "- Last modified 6 Apr 97 ---------------------------------------------- Converts C (C++) source to HTML code fragment with syntax highlighting. Since program written for personal purpose the tags generated. This is optional page format specific thing. Usage: CTHM . All output is done to STDOUTPUT, error messages to STDERR. For HTML fragment generation: CHTM file.c > file.htm - Some input convertion required to use this code as CGI module. Will be done soon. - Optimization required for blocks of EOL comments */ #include // ------------------- Decoding status values #define START 0 #define INLINE 1 #define DEFINE 2 // ------------------- Decoding Remark #define REM1 20 #define REM2 21 #define REM_END 22 #define REM_STAR 23 #define REM_STAR_1 24 #define STRING 25 // String is ""like"" remark // ------------------- HTML TAG Generation #define ON 1 #define OFF 0 // ------------------- HTML TAG type #define MODE_KEYWORD 0 #define MODE_REMARK 2 #define MODE_REMARK_EOL 4 #define MODE_DEFINE 6 #define MODE_STRING 8 int is_delimeter(char c) { int ii=0; char dlms[] = ""\t\r\n (){}[]+-*/%\""'&|^~:;<>.,""; //-------------------------------- while (dlms[ii]) { if (c==dlms[ii++]) return 1; } return 0; } int is_keyword(char * str) { char * kwords[] = { ""asm"", ""auto"", ""break"", ""case"", ""cdecl"", ""char"", ""class"", ""const"", ""continue"", ""default"", ""delete"", ""do"", ""double"", ""else"", ""enum"", ""extern"", ""far"", ""float"", ""for"", ""friend"", ""goto"", ""huge"", ""if"", ""inline"", ""int"", ""interrupt"", ""long"", ""near"", ""new"", ""operator"", ""pascal"", ""private"", ""protected"", ""public"", ""register"", ""return"", ""short"", ""signed"", ""sizeof"", ""static"", ""struct"", ""switch"", ""template"", ""this"", ""typedef"", ""union"", ""unsigned"", ""virtual"", ""void"", ""volatile"", ""while"", NULL }; int ii=0; int jj; int check; while (kwords[ii]) { jj = 0; check = 1; while (kwords[ii][jj] && check) { if (str[jj] != kwords[ii][jj]) { check = 0; } jj++; } if (check) return 1; ii++; } return 0; } void set_mode(int on_off, int mode) { char * tags[] = { //-------------------- KEYWORD """", """", //-------------------- Classic remarks """", """", //-------------------- EOL Remarks """", """", //-------------------- #DEFINE """", """", //-------------------- ""string"" """", """", NULL, NULL }; fprintf(stdout,tags[mode + 1 - on_off]); } void print_char_html(char c) { switch (c) { case '<': fprintf(stdout,""<""); break; case '>': fprintf(stdout,"">""); break; case '""': fprintf(stdout,"""""); break; case '&': fprintf(stdout,""&""); break; case '|': fprintf(stdout,""¦""); break; default: fprintf(stdout,""%c"",c); } } int main(int _argc, char** _argv) { FILE *in, *out; char c; int mode; char buf[80]; int bufidx = 0; int progress = 1; int echo; int saved_mode; int kw; char tmpc; char prevc; if (_argc < 2) { fprintf(stderr, ""USAGE: c2html \n""); return 1; } if ((in = fopen(_argv[1], ""rt"")) == NULL) { fprintf(stderr, ""Cannot open input file.\n""); return 1; } fprintf(stdout, ""
"");
   mode = START;

   while (!feof(in) && progress)
   {
        echo = 1;
        prevc = c;
        c = fgetc(in);

        if (c=='/' && (mode < REM1))
        {
            saved_mode = mode;
            mode = REM1;
        }

        switch (mode)
        {
            case REM1:
                 echo = 0;
                 mode = REM2;
                 break;

            case REM2:
                 if (c=='/')
                 {
                    if (saved_mode == DEFINE)
                    {
                      set_mode(OFF, MODE_DEFINE);
                    }
                    mode = REM_END;
                    set_mode(ON, MODE_REMARK_EOL);
                 }
                 else if (c=='*')
                 {
                    if (saved_mode == DEFINE)
                    {
                      set_mode(OFF, MODE_DEFINE);
                    }
                    mode = REM_STAR;
                    set_mode(ON, MODE_REMARK);
                 }
                 else
                 {
                    mode = saved_mode;
                 }
                 printf(""/"");
                 break;

            case REM_END:
                 if (c=='\n')
                 {
                   set_mode(OFF, MODE_REMARK_EOL);
                 }
                 break;

            case REM_STAR:
                 if (c=='*')
                 {
                    mode = REM_STAR_1;
                 }
                 break;

            case REM_STAR_1:
                 if (c=='/')
                 {
                    mode = INLINE;
                    fprintf(stdout,""/"");
                    echo = 0;
                    set_mode(OFF, MODE_REMARK);
                 }
                 else mode = REM_STAR;
                 break;

            case START:
                 if (c=='#')
                 {
                    mode = DEFINE;
                    set_mode(ON, MODE_DEFINE);
                    break;
                 }
                 else if (c==' ') break;

                 mode = INLINE;
                 // and continue in next case

            case INLINE:
                 if (c=='""' &&        //
                     prevc != 0x27 && //
                     prevc != '\\')   //
                 {
                    set_mode(ON, MODE_STRING);
                    mode = STRING;
                 }
                 break;

            case STRING:
                 if (c=='""' && prevc != '\\')
                 {
                    print_char_html('""');
                    set_mode(OFF, MODE_STRING);
                    echo = 0;
                    mode = INLINE;
                 }
                 break;

            case DEFINE:
                 if (c=='\n')
                 {
                    set_mode(OFF, MODE_DEFINE);
                 }
                 break;

        }

        if (echo && //
            (mode == INLINE || //
             (mode!=INLINE &&  //
              bufidx)))        //
        {
            buf[bufidx++] = c;
            buf[bufidx]   = 0;
            if (is_delimeter(c))
            {
                kw = 0;
                if (bufidx>2)
                {
                  kw = is_keyword(buf);
                }
                if (kw)
                {
                  set_mode(ON, MODE_KEYWORD);
                }
                tmpc = buf[bufidx-1];
                buf[bufidx-1] = 0;
                fprintf(stdout,""%s"",buf);
                if (kw)
                {
                  set_mode(OFF, MODE_KEYWORD);
                }
                print_char_html(tmpc);
                bufidx = 0;
                buf[0] = 0;
            }
        }
        else if (echo) print_char_html(c);

        if (c=='\n' && mode != REM_STAR)
        {
            mode = START;
        }
   }

   fclose(in);
   fprintf(stdout,""
\n""); fprintf(stdout, ""\n""); fprintf(stdout, ""\n""); return 0; } ",0 "->
BetterMe

Admin

Email First Last Admin
{{user.email}} {{user.firstName}} {{user.lastName}} {{user.admin}}
    Title Coach Start End
    {{regimen.title}} {{regimen._coach.email}} {{model.displayDate(regimen.start)}} {{model.displayDate(regimen.end)}}
",0 "le>interval: Not compatible 👼
« Up

interval 3.4.2 Not compatible 👼

📅 (2022-02-03 17:13:05 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-num            base        Num library distributed with the OCaml compiler
base-threads        base
base-unix           base
camlp5              7.14        Preprocessor-pretty-printer of OCaml
conf-findutils      1           Virtual package relying on findutils
conf-perl           2           Virtual package relying on perl
coq                 8.6         Formal proof management system
num                 0           The Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.05.0      The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0      Official 4.05.0 release
ocaml-config        1           OCaml Switch Configuration
ocamlfind           1.9.3       A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "guillaume.melquiond@inria.fr"
homepage: "https://coqinterval.gitlabpages.inria.fr/"
dev-repo: "git+https://gitlab.inria.fr/coqinterval/interval.git"
bug-reports: "https://gitlab.inria.fr/coqinterval/interval/issues"
license: "CeCILL-C"
build: [
  ["./configure"]
  ["./remake" "-j%{jobs}%"]
]
install: ["./remake" "install"]
depends: [
  "coq" {>= "8.7" & < "8.12~"}
  "coq-bignums"
  "coq-flocq" {>= "3.0"}
  "coq-mathcomp-ssreflect" {>= "1.6"}
  "coq-coquelicot" {>= "3.0"}
  ("conf-g++" | "conf-clang")
]
tags: [
  "keyword:interval arithmetic"
  "keyword:decision procedure"
  "keyword:floating-point arithmetic"
  "keyword:reflexive tactic"
  "keyword:Taylor models"
  "category:Mathematics/Real Calculus and Topology"
  "category:Computer Science/Decision Procedures and Certified Algorithms/Decision procedures"
  "date:2020-02-25"
]
authors: [ "Guillaume Melquiond <guillaume.melquiond@inria.fr>" "Érik Martin-Dorel <erik.martin-dorel@irit.fr>" "Thomas Sibut-Pinote <thomas.sibut-pinote@inria.fr>" ]
synopsis: "A Coq tactic for proving bounds on real-valued expressions automatically"
url {
  src: "https://coqinterval.gitlabpages.inria.fr/releases/interval-3.4.2.tar.gz"
  checksum: "sha512=4e61a3bfe5f8758db8a09dec4f690213bb369a1ae960237ecfeb3c1d999619f9ef5afd5daeeeecc44dfe64bd4c46ffcca7a2872c11febd47ecbb0d799bc478fe"
}

Lint

Command
true
Return code
0

Dry install 🏜️

Dry install with the current Coq version:

Command
opam install -y --show-action coq-interval.3.4.2 coq.8.6
Return code
5120
Output
[NOTE] Package coq is already installed (current version is 8.6).
The following dependencies couldn't be met:
  - coq-interval -> coq >= 8.7
Your request can't be satisfied:
  - No available version of coq satisfies the constraints
No solution found, exiting

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command
opam remove -y coq; opam install -y --show-action --unlock-base coq-interval.3.4.2
Return code
0

Install dependencies

Command
true
Return code
0
Duration
0 s

Install 🚀

Command
true
Return code
0
Duration
0 s

Installation size

No files were installed.

Uninstall 🧹

Command
true
Return code
0
Missing removes
none
Wrong removes
none

Sources are on GitHub © Guillaume Claret 🐣

",0 "dee; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; /** * Makes sure indexes of attendees from request are equal to indexes of the same * attendees so that in the end we end up with correct data. */ class AttendeesSubscriber implements EventSubscriberInterface { /** * {@inheritdoc} */ public static function getSubscribedEvents() { return [ FormEvents::PRE_SUBMIT => ['fixSubmittedData', 100], ]; } /** * @SuppressWarnings(PHPMD.NPathComplexity) * * Makes sure indexes of attendees from request are equal to indexes of the same * attendees so that in the end we end up with correct data. * * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function fixSubmittedData(FormEvent $event) { /** @var Attendee[]|Collection $data */ $data = $event->getData(); $attendees = $event->getForm()->getData(); if (!$attendees || !$data) { return; } $attendeeKeysByEmail = []; foreach ($attendees as $key => $attendee) { $id = $attendee->getEmail() ?: $attendee->getDisplayName(); if (!$id) { return; } $attendeeKeysByEmail[$id] = $key; } $nextNewKey = count($attendeeKeysByEmail); $fixedData = []; foreach ($data as $attendee) { if (empty($attendee['email']) && empty($attendee['displayName'])) { return; } $id = empty($attendee['email']) ? $attendee['displayName'] : $attendee['email']; $key = isset($attendeeKeysByEmail[$id]) ? $attendeeKeysByEmail[$id] : $nextNewKey++; $fixedData[$key] = $attendee; } $event->setData($fixedData); } } ",0 "se SMW\SQLStore\QueryEngine\DescriptionInterpreter; use SMW\SQLStore\QueryEngine\QuerySegment; use SMW\SQLStore\QueryEngine\QuerySegmentListBuilder; use SMWSql3SmwIds; /** * @license GNU GPL v2+ * @since 2.2 * * @author Markus Krötzsch * @author Jeroen De Dauw * @author mwjames */ class NamespaceDescriptionInterpreter implements DescriptionInterpreter { /** * @var QuerySegmentListBuilder */ private $querySegmentListBuilder; /** * @since 2.2 * * @param QuerySegmentListBuilder $querySegmentListBuilder */ public function __construct( QuerySegmentListBuilder $querySegmentListBuilder ) { $this->querySegmentListBuilder = $querySegmentListBuilder; } /** * @since 2.2 * * @return boolean */ public function canInterpretDescription( Description $description ) { return $description instanceof NamespaceDescription; } /** * TODO: One instance of the SMW IDs table on s_id always suffices (swm_id is KEY)! Doable in execution ... (PERFORMANCE) * * @since 2.2 * * @param Description $description * * @return QuerySegment */ public function interpretDescription( Description $description ) { $db = $this->querySegmentListBuilder->getStore()->getConnection( 'mw.db.queryengine' ); $query = new QuerySegment(); $query->joinTable = SMWSql3SmwIds::TABLE_NAME; $query->joinfield = ""$query->alias.smw_id""; $query->where = ""$query->alias.smw_namespace="" . $db->addQuotes( $description->getNamespace() ); return $query; } } ",0 "IEditingSession_h__ #ifndef __gen_nsISupports_h__ #include ""nsISupports.h"" #endif #ifndef __gen_domstubs_h__ #include ""domstubs.h"" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif class nsIEditor; /* forward declaration */ /* starting interface: nsIEditingSession */ #define NS_IEDITINGSESSION_IID_STR ""24f3f4da-18a4-448d-876d-7360fefac029"" #define NS_IEDITINGSESSION_IID \ {0x24f3f4da, 0x18a4, 0x448d, \ { 0x87, 0x6d, 0x73, 0x60, 0xfe, 0xfa, 0xc0, 0x29 }} class NS_NO_VTABLE nsIEditingSession : public nsISupports { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IEDITINGSESSION_IID) enum { eEditorOK = 0, eEditorCreationInProgress = 1, eEditorErrorCantEditMimeType = 2, eEditorErrorFileNotFound = 3, eEditorErrorCantEditFramesets = 8, eEditorErrorUnknown = 9 }; /* readonly attribute unsigned long editorStatus; */ NS_IMETHOD GetEditorStatus(uint32_t *aEditorStatus) = 0; /* void makeWindowEditable (in nsIDOMWindow window, in string aEditorType, in boolean doAfterUriLoad, in boolean aMakeWholeDocumentEditable, in boolean aInteractive); */ NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char * aEditorType, bool doAfterUriLoad, bool aMakeWholeDocumentEditable, bool aInteractive) = 0; /* boolean windowIsEditable (in nsIDOMWindow window); */ NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, bool *_retval) = 0; /* nsIEditor getEditorForWindow (in nsIDOMWindow window); */ NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor * *_retval) = 0; /* void setupEditorOnWindow (in nsIDOMWindow window); */ NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) = 0; /* void tearDownEditorOnWindow (in nsIDOMWindow window); */ NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) = 0; /* void setEditorOnControllers (in nsIDOMWindow aWindow, in nsIEditor aEditor); */ NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) = 0; /* void disableJSAndPlugins (in nsIDOMWindow aWindow); */ NS_IMETHOD DisableJSAndPlugins(nsIDOMWindow *aWindow) = 0; /* void restoreJSAndPlugins (in nsIDOMWindow aWindow); */ NS_IMETHOD RestoreJSAndPlugins(nsIDOMWindow *aWindow) = 0; /* void detachFromWindow (in nsIDOMWindow aWindow); */ NS_IMETHOD DetachFromWindow(nsIDOMWindow *aWindow) = 0; /* void reattachToWindow (in nsIDOMWindow aWindow); */ NS_IMETHOD ReattachToWindow(nsIDOMWindow *aWindow) = 0; /* readonly attribute boolean jsAndPluginsDisabled; */ NS_IMETHOD GetJsAndPluginsDisabled(bool *aJsAndPluginsDisabled) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIEditingSession, NS_IEDITINGSESSION_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIEDITINGSESSION \ NS_IMETHOD GetEditorStatus(uint32_t *aEditorStatus) override; \ NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char * aEditorType, bool doAfterUriLoad, bool aMakeWholeDocumentEditable, bool aInteractive) override; \ NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, bool *_retval) override; \ NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor * *_retval) override; \ NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) override; \ NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) override; \ NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) override; \ NS_IMETHOD DisableJSAndPlugins(nsIDOMWindow *aWindow) override; \ NS_IMETHOD RestoreJSAndPlugins(nsIDOMWindow *aWindow) override; \ NS_IMETHOD DetachFromWindow(nsIDOMWindow *aWindow) override; \ NS_IMETHOD ReattachToWindow(nsIDOMWindow *aWindow) override; \ NS_IMETHOD GetJsAndPluginsDisabled(bool *aJsAndPluginsDisabled) override; /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIEDITINGSESSION(_to) \ NS_IMETHOD GetEditorStatus(uint32_t *aEditorStatus) override { return _to GetEditorStatus(aEditorStatus); } \ NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char * aEditorType, bool doAfterUriLoad, bool aMakeWholeDocumentEditable, bool aInteractive) override { return _to MakeWindowEditable(window, aEditorType, doAfterUriLoad, aMakeWholeDocumentEditable, aInteractive); } \ NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, bool *_retval) override { return _to WindowIsEditable(window, _retval); } \ NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor * *_retval) override { return _to GetEditorForWindow(window, _retval); } \ NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) override { return _to SetupEditorOnWindow(window); } \ NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) override { return _to TearDownEditorOnWindow(window); } \ NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) override { return _to SetEditorOnControllers(aWindow, aEditor); } \ NS_IMETHOD DisableJSAndPlugins(nsIDOMWindow *aWindow) override { return _to DisableJSAndPlugins(aWindow); } \ NS_IMETHOD RestoreJSAndPlugins(nsIDOMWindow *aWindow) override { return _to RestoreJSAndPlugins(aWindow); } \ NS_IMETHOD DetachFromWindow(nsIDOMWindow *aWindow) override { return _to DetachFromWindow(aWindow); } \ NS_IMETHOD ReattachToWindow(nsIDOMWindow *aWindow) override { return _to ReattachToWindow(aWindow); } \ NS_IMETHOD GetJsAndPluginsDisabled(bool *aJsAndPluginsDisabled) override { return _to GetJsAndPluginsDisabled(aJsAndPluginsDisabled); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIEDITINGSESSION(_to) \ NS_IMETHOD GetEditorStatus(uint32_t *aEditorStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEditorStatus(aEditorStatus); } \ NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char * aEditorType, bool doAfterUriLoad, bool aMakeWholeDocumentEditable, bool aInteractive) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeWindowEditable(window, aEditorType, doAfterUriLoad, aMakeWholeDocumentEditable, aInteractive); } \ NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowIsEditable(window, _retval); } \ NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEditorForWindow(window, _retval); } \ NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetupEditorOnWindow(window); } \ NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TearDownEditorOnWindow(window); } \ NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEditorOnControllers(aWindow, aEditor); } \ NS_IMETHOD DisableJSAndPlugins(nsIDOMWindow *aWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DisableJSAndPlugins(aWindow); } \ NS_IMETHOD RestoreJSAndPlugins(nsIDOMWindow *aWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RestoreJSAndPlugins(aWindow); } \ NS_IMETHOD DetachFromWindow(nsIDOMWindow *aWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DetachFromWindow(aWindow); } \ NS_IMETHOD ReattachToWindow(nsIDOMWindow *aWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReattachToWindow(aWindow); } \ NS_IMETHOD GetJsAndPluginsDisabled(bool *aJsAndPluginsDisabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJsAndPluginsDisabled(aJsAndPluginsDisabled); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsEditingSession : public nsIEditingSession { public: NS_DECL_ISUPPORTS NS_DECL_NSIEDITINGSESSION nsEditingSession(); private: ~nsEditingSession(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS(nsEditingSession, nsIEditingSession) nsEditingSession::nsEditingSession() { /* member initializers and constructor code */ } nsEditingSession::~nsEditingSession() { /* destructor code */ } /* readonly attribute unsigned long editorStatus; */ NS_IMETHODIMP nsEditingSession::GetEditorStatus(uint32_t *aEditorStatus) { return NS_ERROR_NOT_IMPLEMENTED; } /* void makeWindowEditable (in nsIDOMWindow window, in string aEditorType, in boolean doAfterUriLoad, in boolean aMakeWholeDocumentEditable, in boolean aInteractive); */ NS_IMETHODIMP nsEditingSession::MakeWindowEditable(nsIDOMWindow *window, const char * aEditorType, bool doAfterUriLoad, bool aMakeWholeDocumentEditable, bool aInteractive) { return NS_ERROR_NOT_IMPLEMENTED; } /* boolean windowIsEditable (in nsIDOMWindow window); */ NS_IMETHODIMP nsEditingSession::WindowIsEditable(nsIDOMWindow *window, bool *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsIEditor getEditorForWindow (in nsIDOMWindow window); */ NS_IMETHODIMP nsEditingSession::GetEditorForWindow(nsIDOMWindow *window, nsIEditor * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* void setupEditorOnWindow (in nsIDOMWindow window); */ NS_IMETHODIMP nsEditingSession::SetupEditorOnWindow(nsIDOMWindow *window) { return NS_ERROR_NOT_IMPLEMENTED; } /* void tearDownEditorOnWindow (in nsIDOMWindow window); */ NS_IMETHODIMP nsEditingSession::TearDownEditorOnWindow(nsIDOMWindow *window) { return NS_ERROR_NOT_IMPLEMENTED; } /* void setEditorOnControllers (in nsIDOMWindow aWindow, in nsIEditor aEditor); */ NS_IMETHODIMP nsEditingSession::SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) { return NS_ERROR_NOT_IMPLEMENTED; } /* void disableJSAndPlugins (in nsIDOMWindow aWindow); */ NS_IMETHODIMP nsEditingSession::DisableJSAndPlugins(nsIDOMWindow *aWindow) { return NS_ERROR_NOT_IMPLEMENTED; } /* void restoreJSAndPlugins (in nsIDOMWindow aWindow); */ NS_IMETHODIMP nsEditingSession::RestoreJSAndPlugins(nsIDOMWindow *aWindow) { return NS_ERROR_NOT_IMPLEMENTED; } /* void detachFromWindow (in nsIDOMWindow aWindow); */ NS_IMETHODIMP nsEditingSession::DetachFromWindow(nsIDOMWindow *aWindow) { return NS_ERROR_NOT_IMPLEMENTED; } /* void reattachToWindow (in nsIDOMWindow aWindow); */ NS_IMETHODIMP nsEditingSession::ReattachToWindow(nsIDOMWindow *aWindow) { return NS_ERROR_NOT_IMPLEMENTED; } /* readonly attribute boolean jsAndPluginsDisabled; */ NS_IMETHODIMP nsEditingSession::GetJsAndPluginsDisabled(bool *aJsAndPluginsDisabled) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif #endif /* __gen_nsIEditingSession_h__ */ ",0 " by javadoc (build 1.6.0_29) on Wed Jan 11 13:02:06 MST 2012 --> Uses of Class org.imgscalr.Scalr.Mode (imgscalr v4.2 - Java Image Scaling Library)
Package  Class   Use  Tree  Deprecated  Index  Help 
 PREV   NEXT FRAMES    NO FRAMES    

Uses of Class
org.imgscalr.Scalr.Mode

Uses of Scalr.Mode in org.imgscalr
 

Methods in org.imgscalr that return Scalr.Mode
static Scalr.Mode Scalr.Mode.valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Scalr.Mode[] Scalr.Mode.values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 

Methods in org.imgscalr with parameters of type Scalr.Mode
static BufferedImage Scalr.resize(BufferedImage src, Scalr.Method scalingMethod, Scalr.Mode resizeMode, int targetSize, BufferedImageOp... ops)
          Resize a given image (maintaining its original proportion) to a width and height no bigger than targetSize (or fitting the image to the given WIDTH or HEIGHT explicitly, depending on the Scalr.Mode specified) using the given scaling method and apply the given BufferedImageOps (if any) to the result before returning it.
static Future<BufferedImage> AsyncScalr.resize(BufferedImage src, Scalr.Method scalingMethod, Scalr.Mode resizeMode, int targetSize, BufferedImageOp... ops)
           
static BufferedImage Scalr.resize(BufferedImage src, Scalr.Method scalingMethod, Scalr.Mode resizeMode, int targetWidth, int targetHeight, BufferedImageOp... ops)
          Resize a given image (maintaining its original proportion) to the target width and height (or fitting the image to the given WIDTH or HEIGHT explicitly, depending on the Scalr.Mode specified) using the given scaling method and apply the given BufferedImageOps (if any) to the result before returning it.
static Future<BufferedImage> AsyncScalr.resize(BufferedImage src, Scalr.Method scalingMethod, Scalr.Mode resizeMode, int targetWidth, int targetHeight, BufferedImageOp... ops)
           
static BufferedImage Scalr.resize(BufferedImage src, Scalr.Mode resizeMode, int targetSize, BufferedImageOp... ops)
          Resize a given image (maintaining its original proportion) to a width and height no bigger than targetSize (or fitting the image to the given WIDTH or HEIGHT explicitly, depending on the Scalr.Mode specified) and apply the given BufferedImageOps (if any) to the result before returning it.
static Future<BufferedImage> AsyncScalr.resize(BufferedImage src, Scalr.Mode resizeMode, int targetSize, BufferedImageOp... ops)
           
static BufferedImage Scalr.resize(BufferedImage src, Scalr.Mode resizeMode, int targetWidth, int targetHeight, BufferedImageOp... ops)
          Resize a given image (maintaining its original proportion) to the target width and height (or fitting the image to the given WIDTH or HEIGHT explicitly, depending on the Scalr.Mode specified) and apply the given BufferedImageOps (if any) to the result before returning it.
static Future<BufferedImage> AsyncScalr.resize(BufferedImage src, Scalr.Mode resizeMode, int targetWidth, int targetHeight, BufferedImageOp... ops)
           
 


Package  Class   Use  Tree  Deprecated  Index  Help 
Copyright 2011 The Buzz Media, LLC
 PREV   NEXT FRAMES    NO FRAMES    

",0 "ate static $_connections = array(); public static $_forceStoreConnectionInInstance = null; public static function factory($config) { if (! is_array($config)) { // convert to an array $conf = array(); $conf['adapter'] = $config->adapter; $conf['params'] = (array) $config->params; $conf['profiler'] = (array) $config->profiler; } else { $conf = $config; } $adapterName = get_class() . '\\Adapter\\' . $conf['adapter']; $dbAdapter = new $adapterName($conf['params']); $dbAdapter->setProfilerConfig($conf['profiler']); return $dbAdapter; } public static function getConnection($configName, $alternateHostname = null, $alternateDatabase = null, $storeInInstance = true) { $config = \Nf\Registry::get('config'); if (!isset($config->db->$configName)) { throw new \Exception('The adapter ""' . $configName . '"" is not defined in the config file'); } if (self::$_forceStoreConnectionInInstance !== null) { $storeInInstance = self::$_forceStoreConnectionInInstance; } $defaultHostname = $config->db->$configName->params->hostname; $defaultDatabase = $config->db->$configName->params->database; $hostname = ($alternateHostname !== null) ? $alternateHostname : $defaultHostname; $database = ($alternateDatabase !== null) ? $alternateDatabase : $defaultDatabase; if (isset($config->db->$configName->params->port)) { $port = $config->db->$configName->params->port; } else { $port = null; } // if the connection has already been created and if we store the connection in memory for future use if (isset(self::$_connections[$configName . '-' . $hostname . '-' . $database]) && $storeInInstance) { return self::$_connections[$configName . '-' . $hostname . '-' . $database]; } else { // optional profiler config $profilerConfig = isset($config->db->$configName->profiler) ? (array)$config->db->$configName->profiler : null; if ($profilerConfig != null) { $profilerConfig['name'] = $configName; } // or else we create a new connection $dbConfig = array( 'adapter' => $config->db->$configName->adapter, 'params' => array( 'hostname' => $hostname, 'port' => $port, 'username' => $config->db->$configName->params->username, 'password' => $config->db->$configName->params->password, 'database' => $database, 'charset' => $config->db->$configName->params->charset ), 'profiler' => $profilerConfig ); // connection with the factory method $dbConnection = self::factory($dbConfig); if ($storeInInstance) { self::$_connections[$configName . '-' . $hostname . '-' . $database] = $dbConnection; } return $dbConnection; } } } ",0 "ept 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. */ package eu.binjr.common.javafx.controls; import javafx.scene.Node; import javafx.scene.SnapshotParameters; import javafx.scene.image.WritableImage; import javafx.scene.transform.Transform; import javafx.stage.Screen; public final class SnapshotUtils { public static WritableImage outputScaleAwareSnapshot(Node node) { return scaledSnapshot(node, 0.0,0.0); } public static WritableImage scaledSnapshot(Node node, double scaleX, double scaleY) { SnapshotParameters spa = new SnapshotParameters(); spa.setTransform(Transform.scale( scaleX == 0.0 ? Screen.getPrimary().getOutputScaleX() : scaleX, scaleY == 0.0 ? Screen.getPrimary().getOutputScaleY() : scaleY)); return node.snapshot(spa, null); } } ",0 "perex@perex.cz> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * Virtual Raw MIDI client * * The virtual rawmidi client is a sequencer client which associate * a rawmidi device file. The created rawmidi device file can be * accessed as a normal raw midi, but its MIDI source and destination * are arbitrary. For example, a user-client software synth connected * to this port can be used as a normal midi device as well. * * The virtual rawmidi device accepts also multiple opens. Each file * has its own input buffer, so that no conflict would occur. The drain * of input/output buffer acts only to the local buffer. * */ #include #include #include #include #include #include #include #include #include #include #include #include MODULE_AUTHOR(""Takashi Iwai ""); MODULE_DESCRIPTION(""Virtual Raw MIDI client on Sequencer""); MODULE_LICENSE(""GPL""); /* * initialize an event record */ static void snd_virmidi_init_event(struct snd_virmidi *vmidi, struct snd_seq_event *ev) { memset(ev, 0, sizeof(*ev)); ev->source.port = vmidi->port; switch (vmidi->seq_mode) { case SNDRV_VIRMIDI_SEQ_DISPATCH: ev->dest.client = SNDRV_SEQ_ADDRESS_SUBSCRIBERS; break; case SNDRV_VIRMIDI_SEQ_ATTACH: /* FIXME: source and destination are same - not good.. */ ev->dest.client = vmidi->client; ev->dest.port = vmidi->port; break; } ev->type = SNDRV_SEQ_EVENT_NONE; } /* * decode input event and put to read buffer of each opened file */ static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev, struct snd_seq_event *ev) { struct snd_virmidi *vmidi; unsigned char msg[4]; int len; read_lock(&rdev->filelist_lock); list_for_each_entry(vmidi, &rdev->filelist, list) { if (!vmidi->trigger) continue; if (ev->type == SNDRV_SEQ_EVENT_SYSEX) { if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE) continue; snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)snd_rawmidi_receive, vmidi->substream); } else { len = snd_midi_event_decode(vmidi->parser, msg, sizeof(msg), ev); if (len > 0) snd_rawmidi_receive(vmidi->substream, msg, len); } } read_unlock(&rdev->filelist_lock); return 0; } /* * receive an event from the remote virmidi port * * for rawmidi inputs, you can call this function from the event * handler of a remote port which is attached to the virmidi via * SNDRV_VIRMIDI_SEQ_ATTACH. */ #if 0 int snd_virmidi_receive(struct snd_rawmidi *rmidi, struct snd_seq_event *ev) { struct snd_virmidi_dev *rdev; rdev = rmidi->private_data; return snd_virmidi_dev_receive_event(rdev, ev); } #endif /* 0 */ /* * event handler of virmidi port */ static int snd_virmidi_event_input(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop) { struct snd_virmidi_dev *rdev; rdev = private_data; if (!(rdev->flags & SNDRV_VIRMIDI_USE)) return 0; /* ignored */ return snd_virmidi_dev_receive_event(rdev, ev); } /* * trigger rawmidi stream for input */ static void snd_virmidi_input_trigger(struct snd_rawmidi_substream *substream, int up) { struct snd_virmidi *vmidi = substream->runtime->private_data; if (up) { vmidi->trigger = 1; } else { vmidi->trigger = 0; } } /* * trigger rawmidi stream for output */ static void snd_virmidi_output_trigger(struct snd_rawmidi_substream *substream, int up) { struct snd_virmidi *vmidi = substream->runtime->private_data; int count, res; unsigned char buf[32], *pbuf; if (up) { vmidi->trigger = 1; if (vmidi->seq_mode == SNDRV_VIRMIDI_SEQ_DISPATCH && !(vmidi->rdev->flags & SNDRV_VIRMIDI_SUBSCRIBE)) { snd_rawmidi_transmit_ack(substream, substream->runtime->buffer_size - substream->runtime->avail); return; /* ignored */ } if (vmidi->event.type != SNDRV_SEQ_EVENT_NONE) { if (snd_seq_kernel_client_dispatch(vmidi->client, &vmidi->event, in_atomic(), 0) < 0) return; vmidi->event.type = SNDRV_SEQ_EVENT_NONE; } while (1) { count = snd_rawmidi_transmit_peek(substream, buf, sizeof(buf)); if (count <= 0) break; pbuf = buf; while (count > 0) { res = snd_midi_event_encode(vmidi->parser, pbuf, count, &vmidi->event); if (res < 0) { snd_midi_event_reset_encode(vmidi->parser); continue; } snd_rawmidi_transmit_ack(substream, res); pbuf += res; count -= res; if (vmidi->event.type != SNDRV_SEQ_EVENT_NONE) { if (snd_seq_kernel_client_dispatch(vmidi->client, &vmidi->event, in_atomic(), 0) < 0) return; vmidi->event.type = SNDRV_SEQ_EVENT_NONE; } } } } else { vmidi->trigger = 0; } } /* * open rawmidi handle for input */ static int snd_virmidi_input_open(struct snd_rawmidi_substream *substream) { struct snd_virmidi_dev *rdev = substream->rmidi->private_data; struct snd_rawmidi_runtime *runtime = substream->runtime; struct snd_virmidi *vmidi; unsigned long flags; vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL); if (vmidi == NULL) return -ENOMEM; vmidi->substream = substream; if (snd_midi_event_new(0, &vmidi->parser) < 0) { kfree(vmidi); return -ENOMEM; } vmidi->seq_mode = rdev->seq_mode; vmidi->client = rdev->client; vmidi->port = rdev->port; runtime->private_data = vmidi; write_lock_irqsave(&rdev->filelist_lock, flags); list_add_tail(&vmidi->list, &rdev->filelist); write_unlock_irqrestore(&rdev->filelist_lock, flags); vmidi->rdev = rdev; return 0; } /* * open rawmidi handle for output */ static int snd_virmidi_output_open(struct snd_rawmidi_substream *substream) { struct snd_virmidi_dev *rdev = substream->rmidi->private_data; struct snd_rawmidi_runtime *runtime = substream->runtime; struct snd_virmidi *vmidi; vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL); if (vmidi == NULL) return -ENOMEM; vmidi->substream = substream; if (snd_midi_event_new(MAX_MIDI_EVENT_BUF, &vmidi->parser) < 0) { kfree(vmidi); return -ENOMEM; } vmidi->seq_mode = rdev->seq_mode; vmidi->client = rdev->client; vmidi->port = rdev->port; snd_virmidi_init_event(vmidi, &vmidi->event); vmidi->rdev = rdev; runtime->private_data = vmidi; return 0; } /* * close rawmidi handle for input */ static int snd_virmidi_input_close(struct snd_rawmidi_substream *substream) { struct snd_virmidi *vmidi = substream->runtime->private_data; snd_midi_event_free(vmidi->parser); list_del(&vmidi->list); substream->runtime->private_data = NULL; kfree(vmidi); return 0; } /* * close rawmidi handle for output */ static int snd_virmidi_output_close(struct snd_rawmidi_substream *substream) { struct snd_virmidi *vmidi = substream->runtime->private_data; snd_midi_event_free(vmidi->parser); substream->runtime->private_data = NULL; kfree(vmidi); return 0; } /* * subscribe callback - allow output to rawmidi device */ static int snd_virmidi_subscribe(void *private_data, struct snd_seq_port_subscribe *info) { struct snd_virmidi_dev *rdev; rdev = private_data; if (!try_module_get(rdev->card->module)) return -EFAULT; rdev->flags |= SNDRV_VIRMIDI_SUBSCRIBE; return 0; } /* * unsubscribe callback - disallow output to rawmidi device */ static int snd_virmidi_unsubscribe(void *private_data, struct snd_seq_port_subscribe *info) { struct snd_virmidi_dev *rdev; rdev = private_data; rdev->flags &= ~SNDRV_VIRMIDI_SUBSCRIBE; module_put(rdev->card->module); return 0; } /* * use callback - allow input to rawmidi device */ static int snd_virmidi_use(void *private_data, struct snd_seq_port_subscribe *info) { struct snd_virmidi_dev *rdev; rdev = private_data; if (!try_module_get(rdev->card->module)) return -EFAULT; rdev->flags |= SNDRV_VIRMIDI_USE; return 0; } /* * unuse callback - disallow input to rawmidi device */ static int snd_virmidi_unuse(void *private_data, struct snd_seq_port_subscribe *info) { struct snd_virmidi_dev *rdev; rdev = private_data; rdev->flags &= ~SNDRV_VIRMIDI_USE; module_put(rdev->card->module); return 0; } /* * Register functions */ static struct snd_rawmidi_ops snd_virmidi_input_ops = { .open = snd_virmidi_input_open, .close = snd_virmidi_input_close, .trigger = snd_virmidi_input_trigger, }; static struct snd_rawmidi_ops snd_virmidi_output_ops = { .open = snd_virmidi_output_open, .close = snd_virmidi_output_close, .trigger = snd_virmidi_output_trigger, }; /* * create a sequencer client and a port */ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev) { int client; struct snd_seq_port_callback pcallbacks; struct snd_seq_port_info *pinfo; int err; if (rdev->client >= 0) return 0; pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL); if (!pinfo) { err = -ENOMEM; goto __error; } client = snd_seq_create_kernel_client(rdev->card, rdev->device, ""%s %d-%d"", rdev->rmidi->name, rdev->card->number, rdev->device); if (client < 0) { err = client; goto __error; } rdev->client = client; /* create a port */ pinfo->addr.client = client; sprintf(pinfo->name, ""VirMIDI %d-%d"", rdev->card->number, rdev->device); /* set all capabilities */ pinfo->capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SYNC_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE; pinfo->capability |= SNDRV_SEQ_PORT_CAP_READ | SNDRV_SEQ_PORT_CAP_SYNC_READ | SNDRV_SEQ_PORT_CAP_SUBS_READ; pinfo->capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; pinfo->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | SNDRV_SEQ_PORT_TYPE_SOFTWARE | SNDRV_SEQ_PORT_TYPE_PORT; pinfo->midi_channels = 16; memset(&pcallbacks, 0, sizeof(pcallbacks)); pcallbacks.owner = THIS_MODULE; pcallbacks.private_data = rdev; pcallbacks.subscribe = snd_virmidi_subscribe; pcallbacks.unsubscribe = snd_virmidi_unsubscribe; pcallbacks.use = snd_virmidi_use; pcallbacks.unuse = snd_virmidi_unuse; pcallbacks.event_input = snd_virmidi_event_input; pinfo->kernel = &pcallbacks; err = snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_CREATE_PORT, pinfo); if (err < 0) { snd_seq_delete_kernel_client(client); rdev->client = -1; goto __error; } rdev->port = pinfo->addr.port; err = 0; /* success */ __error: kfree(pinfo); return err; } /* * release the sequencer client */ static void snd_virmidi_dev_detach_seq(struct snd_virmidi_dev *rdev) { if (rdev->client >= 0) { snd_seq_delete_kernel_client(rdev->client); rdev->client = -1; } } /* * register the device */ static int snd_virmidi_dev_register(struct snd_rawmidi *rmidi) { struct snd_virmidi_dev *rdev = rmidi->private_data; int err; switch (rdev->seq_mode) { case SNDRV_VIRMIDI_SEQ_DISPATCH: err = snd_virmidi_dev_attach_seq(rdev); if (err < 0) return err; break; case SNDRV_VIRMIDI_SEQ_ATTACH: if (rdev->client == 0) return -EINVAL; /* should check presence of port more strictly.. */ break; default: snd_printk(KERN_ERR ""seq_mode is not set: %d\n"", rdev->seq_mode); return -EINVAL; } return 0; } /* * unregister the device */ static int snd_virmidi_dev_unregister(struct snd_rawmidi *rmidi) { struct snd_virmidi_dev *rdev = rmidi->private_data; if (rdev->seq_mode == SNDRV_VIRMIDI_SEQ_DISPATCH) snd_virmidi_dev_detach_seq(rdev); return 0; } /* * */ static struct snd_rawmidi_global_ops snd_virmidi_global_ops = { .dev_register = snd_virmidi_dev_register, .dev_unregister = snd_virmidi_dev_unregister, }; /* * free device */ static void snd_virmidi_free(struct snd_rawmidi *rmidi) { struct snd_virmidi_dev *rdev = rmidi->private_data; kfree(rdev); } /* * create a new device * */ /* exported */ int snd_virmidi_new(struct snd_card *card, int device, struct snd_rawmidi **rrmidi) { struct snd_rawmidi *rmidi; struct snd_virmidi_dev *rdev; int err; *rrmidi = NULL; if ((err = snd_rawmidi_new(card, ""VirMidi"", device, 16, /* may be configurable */ 16, /* may be configurable */ &rmidi)) < 0) return err; strcpy(rmidi->name, rmidi->id); rdev = kzalloc(sizeof(*rdev), GFP_KERNEL); if (rdev == NULL) { snd_device_free(card, rmidi); return -ENOMEM; } rdev->card = card; rdev->rmidi = rmidi; rdev->device = device; rdev->client = -1; rwlock_init(&rdev->filelist_lock); INIT_LIST_HEAD(&rdev->filelist); rdev->seq_mode = SNDRV_VIRMIDI_SEQ_DISPATCH; rmidi->private_data = rdev; rmidi->private_free = snd_virmidi_free; rmidi->ops = &snd_virmidi_global_ops; snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_virmidi_input_ops); snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_virmidi_output_ops); rmidi->info_flags = SNDRV_RAWMIDI_INFO_INPUT | SNDRV_RAWMIDI_INFO_OUTPUT | SNDRV_RAWMIDI_INFO_DUPLEX; *rrmidi = rmidi; return 0; } /* * ENTRY functions */ static int __init alsa_virmidi_init(void) { return 0; } static void __exit alsa_virmidi_exit(void) { } module_init(alsa_virmidi_init) module_exit(alsa_virmidi_exit) EXPORT_SYMBOL(snd_virmidi_new); ",0 " // Подключаем хедер?>

' . _x( '←', 'Previous post link', 'twentyten' ) . ' %title' ); // Ссылка на предидущий пост?> ' . _x( '→', 'Next post link', 'twentyten' ) . '' ); // Ссылка на следующий пост?> ",0 " #1976d2; text-decoration: none; } ",0 "ted from source code. * You may modify this file by translating the extracted messages. * * Each array element represents the translation (value) of a message (key). * If the value is empty, the message is considered as not translated. * Messages that no longer need translation will have their translations * enclosed between a pair of '@@' marks. * * Message string can be used with plural forms format. Check i18n section * of the guide for details. * * NOTE: this file must be saved in UTF-8 encoding. */ return [ '--- Select Course ---' => 'اختر الفرقة الدراسية', 'ADD' => 'أضف', 'Active' => 'نشط', 'Add' => 'أضف', 'Add Batch' => 'أضف عام دراسي', 'Add Course' => 'أضف مقرر', 'Add Section' => 'أضف مجموعة', 'Are you sure you want to delete this item?' => 'هل ترغب في حذف هذه الفرقة الدراسية بالفعل؟', 'Back' => 'عودة', 'Batch' => 'العام الدراسي', 'Batch Alias' => 'الاسم المختصر للعام الدراسي', 'Batch Course' => 'مقرر العام الدراسي', 'Batch ID' => 'كود العام الدراسي', 'Batch Name' => 'اسم العام الدراسي', 'Batches' => 'الدفعات', 'Cancel' => 'إلغاء', 'Course' => 'الفرقة', 'Course Alias' => 'مختصر اسم الفرقة الدراسية', 'Course Already Exists with this Course code.' => 'الفرقة الدراسية بموجودة بالفعل مع هذا الكود', 'Course Code' => 'كود الفرقة الدراسية', 'Course ID' => 'كود الفرقة الدراسية', 'Course Management' => 'إدارة الفرقة الدراسية', 'Course Name' => 'اسم الفرقة الدراسية', 'Create' => 'انشاء', 'Create New' => 'جديد', 'Create Section' => 'انشيء مجموعة', 'Created At' => 'انشئت في', 'Created By' => 'بمعرفة', 'Delete' => 'حذف', 'EXCEL' => 'EXCEL', 'Edit Batch Details' => 'تحرير تفاصيل العام الدراسي', 'Edit Course Details' => 'تحرير تفاصيل الفرقة الدراسية', 'Edit Section Details' => 'تحرير تفاصيل التخصص', 'End Date' => 'تاريخ الانتهاء', 'Inactive' => 'غير نشط', 'Initial Batch' => 'العام الدراسي الأولى', 'Initial Section' => 'التخصص الأولى', 'Intake' => 'العدد', 'Manage Batches' => 'إدارة الدفعات', 'Manage Course' => 'إدارة الفرقة الدراسية', 'Manage Course Modules' => 'إدارة موديولات الفرقة الدراسية', 'Manage Courses' => 'إدارة الفرق الدراسية', 'Manage Current Active Course' => 'إدارة الفرق الدراسية النشطة', 'Manage Section' => 'إدارة التخصص', 'Manage Sections' => 'إدارة التخصصات', 'No results found.' => 'لم يتم العثور على نتائج', 'PDF' => 'PDF', 'Section' => 'التخصص', 'Section Already Exists of this Batch.' => 'التخصص موجودة بالفعل في هذه العام الدراسي', 'Section Batch' => 'عام دراسي التخصص', 'Section ID' => 'كود التخصص', 'Section Name' => 'اسم التخصص', 'Start Date' => 'تاريخ الالتحاق', 'Status' => 'الحالة', 'Students' => 'الطلبة', 'Update' => 'تحديث', 'Update Batch' => 'تحديث العام الدراسي', 'Update Batches: ' => 'تحديث الدفعات', 'Update Course' => 'تحديث الفرقة الدراسية', 'Update Courses: ' => 'تحديث الفرقة الدراسيةات', 'Update Section' => 'تحديث التخصص', 'Update Section: ' => 'تحديث التخصص', 'Updated At' => 'تم التحديث في', 'Updated By' => 'بمعرفة', 'View Batch' => 'اظهار العام الدراسي', 'View Batch Details' => 'اظهار تفاصيل العام الدراسي', 'View Course' => 'اظهار الفرقة الدراسية', 'View Course Details' => 'إظهار تفاصيل الفرقة الدراسية', 'View Section' => 'إظهار التخصص', 'View Section Details' => 'إظهار تفاصيل التخصص', ]; ",0 "onTable extends CoreTable { protected $table ='session'; public function __construct(Adapter $adapter) { parent::__construct($adapter, new Session()); } /** * Киносеанс * @param $idSession int * @return Session */ public function get($idSession) { $where = array( 'id_session' => $idSession ); $rowset = $this->select($where); return $rowset->current(); } /** * Все актуальные сеансы для данного кинотеатра и зала. * @param $idCinema integer * @param $idHall integer * @param $date String День, когда нужно посмотреть сеансы * @return Session[] */ public function getSessions($idCinema, $idHall = null, $date = null) { $today = date('Y:m:d H:i:s'); if (!is_null($date)) { $today = $date; } $where = array( 'id_cinema' => $idCinema, 'start_date > ?' => $today, 'start_date <= ?' => date('Y:m:d H:i:s', strtotime('+1 day')) ); if (!is_null($idHall)) { $where['id_hall'] = $idHall; } $rowset = $this->select(function (Select $select) use ($where) { $select->where($where); $select->order('start_date ASC'); }); return $rowset; } } ",0 "net.glowstone.util.collection.SuperCollection.ResultMode (Glowstone 2021.7.1-SNAPSHOT API)

Uses of Enum Class
net.glowstone.util.collection.SuperCollection.ResultMode

Packages that use SuperCollection.ResultMode
Package
Description
 

Copyright © 2021. All rights reserved.

",0 "enerated by javadoc (version 1.7.0_75) on Sat May 16 22:22:26 CEST 2015 --> RangeTombstoneListTest
org.apache.cassandra.db

Class RangeTombstoneListTest

  • java.lang.Object
    • org.apache.cassandra.db.RangeTombstoneListTest


  • public class RangeTombstoneListTest
    extends java.lang.Object
    • Constructor Detail

      • RangeTombstoneListTest

        public RangeTombstoneListTest()
    • Method Detail

      • testDiff

        public void testDiff()
      • sortedAdditionTest

        public void sortedAdditionTest()
      • nonSortedAdditionTest

        public void nonSortedAdditionTest()
      • overlappingAdditionTest

        public void overlappingAdditionTest()
      • largeAdditionTest

        public void largeAdditionTest()
      • simpleOverlapTest

        public void simpleOverlapTest()
      • overlappingPreviousEndEqualsStartTest

        public void overlappingPreviousEndEqualsStartTest()
      • searchTest

        public void searchTest()
      • addAllTest

        public void addAllTest()
      • addAllSequentialTest

        public void addAllSequentialTest()
      • addAllIncludedTest

        public void addAllIncludedTest()
      • purgetTest

        public void purgetTest()
      • minMaxTest

        public void minMaxTest()
      • addAllRandomTest

        public void addAllRandomTest()
                              throws java.lang.Throwable
        Throws:
        java.lang.Throwable
",0 "id (^apisuccess)(NSURLSessionDataTask *sessionDataTask, id responseObject); typedef void (^apifailure)(NSURLSessionDataTask *sessionDataTask, NSError *error); @interface FMAPIManager : NSObject +(instancetype)sharedInstance; -(void)post:(NSString*)url param:(NSDictionary*)params success:(void (^)(NSURLSessionDataTask *sessionDataTask, id responseObject))success failure:(void (^)(NSURLSessionDataTask *sessionDataTask, NSError *error))failure; -(void)get:(NSString*)url param:(NSDictionary*)params success:(void (^)(NSURLSessionDataTask *sessionDataTask, id responseObject))success failure:(void (^)(NSURLSessionDataTask *sessionDataTask, NSError *error))failure; -(void)getImage:(NSString*)url param:(NSDictionary*)params success:(void (^)(NSURLSessionDataTask *sessionDataTask, id responseObject))success failure:(void (^)(NSURLSessionDataTask *sessionDataTask, NSError *error))failure; -(void)getImage:(NSString*)url param:(NSDictionary*)params contentType:(id)contentType responseSerializer:(id)responseSerializer success:(void (^)(NSURLSessionDataTask *sessionDataTask, id responseObject))success failure:(void (^)(NSURLSessionDataTask *sessionDataTask, NSError *error))failure; @end ",0 "errer-Policy: Referrer Policy is set to 'strict-origin-when-cross-origin'
",0 "date=""100609""/>
--> Series
",0 "ved. * * This file is part of JAT. JAT is free software; you can * redistribute it and/or modify it under the terms of the * NASA Open Source Agreement * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * NASA Open Source Agreement for more details. * * You should have received a copy of the NASA Open Source Agreement * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * * File Created on Jun 20, 2003 */ //import jat.gps.*; import jat.coreNOSA.cm.Constants; import jat.coreNOSA.cm.TwoBody; import jat.coreNOSA.math.MatrixVector.data.Matrix; import jat.coreNOSA.math.MatrixVector.data.RandomNumber; import jat.coreNOSA.math.MatrixVector.data.VectorN; /** *

* The URE_Model Class provides a model of the errors in the GPS system * due to GPS SV ephemeris and clock errors. For this simulation, they * are modeled as random constants with sigmas from: * * Reference: J. F. Zumberge and W. I. Bertiger, ""Ephemeris and Clock * Navigation Message Accuracy"", Global Positioning System: Theory and * Applications, Volume 1, edited by Parkinson and Spilker. * * @author * @version 1.0 */ public class URE_Model { /** Radial ephemeris error sigma in meters */ private static final double sigma_r = 1.2; /** Cross-track ephemeris error sigma in meters */ private static final double sigma_c = 3.2; /** Along-track ephemeris error sigma in meters */ private static final double sigma_a = 4.5; /** SV Clock error sigma in meters */ private static final double sigma_t = 1.12E-08 * Constants.c; private static final double sigma_ure = Math.sqrt(sigma_r*sigma_r + sigma_c*sigma_c + sigma_a*sigma_a + sigma_t*sigma_t); public static final double correlationTime = 7200.0; private double qbias; private double q; /** Radial ephemeris error vector, one entry per GPS SV */ private VectorN dr; /** Crosstrack ephemeris error vector, one entry per GPS SV */ private VectorN dc; /** Alongtrack ephemeris error vector, one entry per GPS SV */ private VectorN da; /** SV Clock error vector, one entry per GPS SV */ private VectorN dtc; /** Size of the GPS Constellation */ private int size; /** Constructor * @param n size of the GPS Constellation */ public URE_Model(int n) { this.size = n; dr = new VectorN(n); dc = new VectorN(n); da = new VectorN(n); dtc = new VectorN(n); RandomNumber rn = new RandomNumber(); for (int i = 0; i < n; i++) { double radial = rn.normal(0.0, sigma_r); dr.set(i, radial); double crosstrack = rn.normal(0.0, sigma_c); dc.set(i, crosstrack); double alongtrack = rn.normal(0.0, sigma_a); da.set(i, alongtrack); double clock = rn.normal(0.0, sigma_t); dtc.set(i, clock); } double dt = 1.0; double exponent = -2.0*dt/correlationTime; this.qbias = sigma_ure*sigma_ure*(1.0 - Math.exp(exponent)); // in (rad/sec)^2/Hz this.q = 2.0 * sigma_ure*sigma_ure / correlationTime; } /** Constructor * @param n size of the GPS Constellation * @param seed long containing random number seed to be used */ public URE_Model(int n, long seed) { this.size = n; dr = new VectorN(n); dc = new VectorN(n); da = new VectorN(n); dtc = new VectorN(n); RandomNumber rn = new RandomNumber(seed); for (int i = 0; i < n; i++) { double radial = rn.normal(0.0, sigma_r); dr.set(i, radial); double crosstrack = rn.normal(0.0, sigma_c); dc.set(i, crosstrack); double alongtrack = rn.normal(0.0, sigma_a); da.set(i, alongtrack); double clock = rn.normal(0.0, sigma_t); dtc.set(i, clock); } double dt = 1.0; double exponent = -2.0*dt/correlationTime; this.qbias = sigma_ure*sigma_ure*(1.0 - Math.exp(exponent)); // in (rad/sec)^2/Hz this.q = 2.0 * sigma_ure*sigma_ure / correlationTime; } /** Compute the User range error due to SV clock and ephemeris errors. * @param i GPS SV index * @param los GPS line of sight vector * @param rGPS GPS SV position vector * @param vGPS GPS SV velocity vector * @return the user range error in meters */ public double ure (int i, VectorN los, VectorN rGPS, VectorN vGPS) { // get the transformation from RIC to ECI TwoBody orbit = new TwoBody(Constants.GM_Earth, rGPS, vGPS); Matrix rot = orbit.RSW2ECI(); // form the ephemeris error vector for the ith GPS SV VectorN error = new VectorN(this.dr.x[i], this.da.x[i], this.dc.x[i]); // rotate the ephemeris error to the ECI frame VectorN errECI = rot.times(error); // find the magnitude of the projection of the error vector onto the LOS vector double drho = errECI.projectionMag(los); // add the SV clock error double out = drho + this.dtc.x[i]; return out; } /** * Compute the derivatives for the URE state. * The URE is modeled as a first order Gauss-Markov process. * Used by GPS_INS Process Model. * @param ure URE state vector * @return the time derivative of the URE */ public VectorN ureProcess(VectorN ure) { double coef = -1.0/correlationTime; VectorN out = ure.times(coef); return out; } /** * Return the URE noise strength to be used in * the process noise matrix Q. * @return URE noise strength */ public double biasQ() { return this.qbias; } /** * Return the URE noise strength to be used in * the process noise matrix Q. * @return URE noise strength */ public double Q() { return this.q; } /** * Return the URE sigma * @return URE sigma */ public double sigma() { return sigma_ure; } } ",0 "lopers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: we make no copyright claims on it. */ /* If we use autoconf. */ #ifdef HAVE_CONFIG_H #include ""config.h"" #endif #include #include #include #include ""getopt.h"" #include ""cmdline.h"" const char *gengetopt_args_info_purpose = ""Purpose:\n The Ganglia Meta Daemon (gmetad) collects information from\n multiple gmond or gmetad data sources, saves the information to local\n round-robin databases, and exports XML which is the concatentation of\n all data sources""; const char *gengetopt_args_info_usage = ""Usage: gmetad [OPTIONS]...""; const char *gengetopt_args_info_description = """"; const char *gengetopt_args_info_help[] = { "" -h, --help Print help and exit"", "" -V, --version Print version and exit"", "" -c, --conf=STRING Location of gmetad configuration file \n (default='"" SYSCONFDIR ""/gmetad.conf')"", "" -d, --debug=INT Debug level. If greater than zero, daemon will stay in \n foreground. (default='0')"", "" -p, --pid-file=STRING Write process-id to file"", 0 }; typedef enum {ARG_NO , ARG_STRING , ARG_INT } cmdline_parser_arg_type; static void clear_given (struct gengetopt_args_info *args_info); static void clear_args (struct gengetopt_args_info *args_info); static int cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error); static char * gengetopt_strdup (const char *s); static void clear_given (struct gengetopt_args_info *args_info) { args_info->help_given = 0 ; args_info->version_given = 0 ; args_info->conf_given = 0 ; args_info->debug_given = 0 ; args_info->pid_file_given = 0 ; } static void clear_args (struct gengetopt_args_info *args_info) { args_info->conf_arg = gengetopt_strdup (SYSCONFDIR ""/gmetad.conf""); args_info->conf_orig = NULL; args_info->debug_arg = 0; args_info->debug_orig = NULL; args_info->pid_file_arg = NULL; args_info->pid_file_orig = NULL; } static void init_args_info(struct gengetopt_args_info *args_info) { args_info->help_help = gengetopt_args_info_help[0] ; args_info->version_help = gengetopt_args_info_help[1] ; args_info->conf_help = gengetopt_args_info_help[2] ; args_info->debug_help = gengetopt_args_info_help[3] ; args_info->pid_file_help = gengetopt_args_info_help[4] ; } void cmdline_parser_print_version (void) { printf (""%s %s\n"", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION); } static void print_help_common(void) { cmdline_parser_print_version (); if (strlen(gengetopt_args_info_purpose) > 0) printf(""\n%s\n"", gengetopt_args_info_purpose); if (strlen(gengetopt_args_info_usage) > 0) printf(""\n%s\n"", gengetopt_args_info_usage); printf(""\n""); if (strlen(gengetopt_args_info_description) > 0) printf(""%s\n"", gengetopt_args_info_description); } void cmdline_parser_print_help (void) { int i = 0; print_help_common(); while (gengetopt_args_info_help[i]) printf(""%s\n"", gengetopt_args_info_help[i++]); } void cmdline_parser_init (struct gengetopt_args_info *args_info) { clear_given (args_info); clear_args (args_info); init_args_info (args_info); } void cmdline_parser_params_init(struct cmdline_parser_params *params) { if (params) { params->override = 0; params->initialize = 1; params->check_required = 1; params->check_ambiguity = 0; params->print_errors = 1; } } struct cmdline_parser_params * cmdline_parser_params_create(void) { struct cmdline_parser_params *params = (struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params)); cmdline_parser_params_init(params); return params; } static void free_string_field (char **s) { if (*s) { free (*s); *s = 0; } } static void cmdline_parser_release (struct gengetopt_args_info *args_info) { free_string_field (&(args_info->conf_arg)); free_string_field (&(args_info->conf_orig)); free_string_field (&(args_info->debug_orig)); free_string_field (&(args_info->pid_file_arg)); free_string_field (&(args_info->pid_file_orig)); clear_given (args_info); } static void write_into_file(FILE *outfile, const char *opt, const char *arg, char *values[]) { if (arg) { fprintf(outfile, ""%s=\""%s\""\n"", opt, arg); } else { fprintf(outfile, ""%s\n"", opt); } } int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info) { int i = 0; if (!outfile) { fprintf (stderr, ""%s: cannot dump options to stream\n"", CMDLINE_PARSER_PACKAGE); return EXIT_FAILURE; } if (args_info->help_given) write_into_file(outfile, ""help"", 0, 0 ); if (args_info->version_given) write_into_file(outfile, ""version"", 0, 0 ); if (args_info->conf_given) write_into_file(outfile, ""conf"", args_info->conf_orig, 0); if (args_info->debug_given) write_into_file(outfile, ""debug"", args_info->debug_orig, 0); if (args_info->pid_file_given) write_into_file(outfile, ""pid-file"", args_info->pid_file_orig, 0); i = EXIT_SUCCESS; return i; } int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info) { FILE *outfile; int i = 0; outfile = fopen(filename, ""w""); if (!outfile) { fprintf (stderr, ""%s: cannot open file for writing: %s\n"", CMDLINE_PARSER_PACKAGE, filename); return EXIT_FAILURE; } i = cmdline_parser_dump(outfile, args_info); fclose (outfile); return i; } void cmdline_parser_free (struct gengetopt_args_info *args_info) { cmdline_parser_release (args_info); } /** @brief replacement of strdup, which is not standard */ char * gengetopt_strdup (const char *s) { char *result = NULL; if (!s) return result; result = (char*)malloc(strlen(s) + 1); if (result == (char*)0) return (char*)0; strcpy(result, s); return result; } int cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info) { return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); } int cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params) { int result; result = cmdline_parser_internal (argc, argv, args_info, params, NULL); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) { int result; struct cmdline_parser_params params; params.override = override; params.initialize = initialize; params.check_required = check_required; params.check_ambiguity = 0; params.print_errors = 1; result = cmdline_parser_internal (argc, argv, args_info, ¶ms, NULL); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name) { return EXIT_SUCCESS; } static char *package_name = 0; /** * @brief updates an option * @param field the generic pointer to the field to update * @param orig_field the pointer to the orig field * @param field_given the pointer to the number of occurrence of this option * @param prev_given the pointer to the number of occurrence already seen * @param value the argument for this option (if null no arg was specified) * @param possible_values the possible values for this option (if specified) * @param default_value the default value (in case the option only accepts fixed values) * @param arg_type the type of this option * @param check_ambiguity @see cmdline_parser_params.check_ambiguity * @param override @see cmdline_parser_params.override * @param no_free whether to free a possible previous value * @param multiple_option whether this is a multiple option * @param long_opt the corresponding long option * @param short_opt the corresponding short option (or '-' if none) * @param additional_error possible further error specification */ static int update_arg(void *field, char **orig_field, unsigned int *field_given, unsigned int *prev_given, char *value, char *possible_values[], const char *default_value, cmdline_parser_arg_type arg_type, int check_ambiguity, int override, int no_free, int multiple_option, const char *long_opt, char short_opt, const char *additional_error) { char *stop_char = 0; const char *val = value; int found; char **string_field; stop_char = 0; found = 0; if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given))) { if (short_opt != '-') fprintf (stderr, ""%s: '--%s' ('-%c') option given more than once%s\n"", package_name, long_opt, short_opt, (additional_error ? additional_error : """")); else fprintf (stderr, ""%s: '--%s' option given more than once%s\n"", package_name, long_opt, (additional_error ? additional_error : """")); return 1; /* failure */ } if (field_given && *field_given && ! override) return 0; if (prev_given) (*prev_given)++; if (field_given) (*field_given)++; if (possible_values) val = possible_values[found]; switch(arg_type) { case ARG_INT: if (val) *((int *)field) = strtol (val, &stop_char, 0); break; case ARG_STRING: if (val) { string_field = (char **)field; if (!no_free && *string_field) free (*string_field); /* free previous string */ *string_field = gengetopt_strdup (val); } break; default: break; }; /* check numeric conversion */ switch(arg_type) { case ARG_INT: if (val && !(stop_char && *stop_char == '\0')) { fprintf(stderr, ""%s: invalid numeric value: %s\n"", package_name, val); return 1; /* failure */ } break; default: ; }; /* store the original value */ switch(arg_type) { case ARG_NO: break; default: if (value && orig_field) { if (no_free) { *orig_field = value; } else { if (*orig_field) free (*orig_field); /* free previous string */ *orig_field = gengetopt_strdup (value); } } }; return 0; /* OK */ } int cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error) { int c; /* Character of the parsed option. */ int error = 0; struct gengetopt_args_info local_args_info; int override; int initialize; int check_required; int check_ambiguity; package_name = argv[0]; override = params->override; initialize = params->initialize; check_required = params->check_required; check_ambiguity = params->check_ambiguity; if (initialize) cmdline_parser_init (args_info); cmdline_parser_init (&local_args_info); optarg = 0; optind = 0; opterr = params->print_errors; optopt = '?'; while (1) { int option_index = 0; static struct option long_options[] = { { ""help"", 0, NULL, 'h' }, { ""version"", 0, NULL, 'V' }, { ""conf"", 1, NULL, 'c' }, { ""debug"", 1, NULL, 'd' }, { ""pid-file"", 1, NULL, 'p' }, { NULL, 0, NULL, 0 } }; c = getopt_long (argc, argv, ""hVc:d:p:"", long_options, &option_index); if (c == -1) break; /* Exit from 'while (1)' loop. */ switch (c) { case 'h': /* Print help and exit. */ cmdline_parser_print_help (); cmdline_parser_free (&local_args_info); exit (EXIT_SUCCESS); case 'V': /* Print version and exit. */ cmdline_parser_print_version (); cmdline_parser_free (&local_args_info); exit (EXIT_SUCCESS); case 'c': /* Location of gmetad configuration file. */ if (update_arg( (void *)&(args_info->conf_arg), &(args_info->conf_orig), &(args_info->conf_given), &(local_args_info.conf_given), optarg, 0, SYSCONFDIR ""/gmetad.conf"", ARG_STRING, check_ambiguity, override, 0, 0, ""conf"", 'c', additional_error)) goto failure; break; case 'd': /* Debug level. If greater than zero, daemon will stay in foreground.. */ if (update_arg( (void *)&(args_info->debug_arg), &(args_info->debug_orig), &(args_info->debug_given), &(local_args_info.debug_given), optarg, 0, ""0"", ARG_INT, check_ambiguity, override, 0, 0, ""debug"", 'd', additional_error)) goto failure; break; case 'p': /* Write process-id to file. */ if (update_arg( (void *)&(args_info->pid_file_arg), &(args_info->pid_file_orig), &(args_info->pid_file_given), &(local_args_info.pid_file_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, ""pid-file"", 'p', additional_error)) goto failure; break; case 0: /* Long option with no short option */ case '?': /* Invalid option. */ /* 'getopt_long' already printed an error message. */ goto failure; default: /* bug: option not considered. */ fprintf (stderr, ""%s: option unknown: %c%s\n"", CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error : """")); abort (); } /* switch */ } /* while */ cmdline_parser_release (&local_args_info); if ( error ) return (EXIT_FAILURE); return 0; failure: cmdline_parser_release (&local_args_info); return (EXIT_FAILURE); } ",0 "ort { private String text; private String supplier; private String status; private String dateCreateStart; private String dateCreateEnd; private String dateUpdateStart; private String dateUpdateEnd; private String sort; private List recordsChecked; public Sort() { } /** * The constructor of the sort class * * @param text the search value of the text field * @param supplier the search value of the supplier field * @param status the search value of the status field * @param format the search value of the format field * @param dateUpdateStart the search value of the date start field * @param dateUpdateEnd the search value of the date end field * @param sort the sort type value * @param recordsChecked the UUID's of the records selected */ public Sort(String text, String supplier, String status, String dateCreateStart, String dateCreateEnd, String dateUpdateStart, String dateUpdateEnd, String sort, List recordsChecked) { this.text = text; this.supplier = supplier; this.status = status; this.dateCreateStart = dateCreateStart; this.dateCreateEnd = dateCreateEnd; this.dateUpdateStart = dateUpdateStart; this.dateUpdateEnd = dateUpdateEnd; this.sort = sort; this.recordsChecked = recordsChecked; } public String getText() { return text; } public void setText(String text) { this.text = text; } public String getSupplier() { return supplier; } public void setSupplier(String supplier) { this.supplier = supplier; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getDateCreateStart() { return dateCreateStart; } public void setDateCreateStart(String dateCreateStart) { this.dateCreateStart = dateCreateStart; } public String getDateCreateEnd() { return dateCreateEnd; } public void setDateCreateEnd(String dateCreateEnd) { this.dateCreateEnd = dateCreateEnd; } public String getDateUpdateStart() { return dateUpdateStart; } public void setDateUpdateStart(String dateUpdateStart) { this.dateUpdateStart = dateUpdateStart; } public String getDateUpdateEnd() { return dateUpdateEnd; } public void setDateUpdateEnd(String dateUpdateEnd) { this.dateUpdateEnd = dateUpdateEnd; } public String getSort() { return sort; } public void setSort(String sort) { this.sort = sort; } public List getRecordsChecked() { return recordsChecked; } public void setRecordsChecked(List recordsChecked) { this.recordsChecked = recordsChecked; } } ",0 "please view the LICENSE * file that was distributed with this source code. */ namespace PHPExiftool\Driver\Tag\HP; use JMS\Serializer\Annotation\ExclusionPolicy; use PHPExiftool\Driver\AbstractTag; /** * @ExclusionPolicy(""all"") */ class PreviewImage extends AbstractTag { protected $Id = 'PreviewImage'; protected $Name = 'PreviewImage'; protected $FullName = 'HP::Type2'; protected $GroupName = 'HP'; protected $g0 = 'MakerNotes'; protected $g1 = 'HP'; protected $g2 = 'Camera'; protected $Type = '?'; protected $Writable = false; protected $Description = 'Preview Image'; protected $local_g2 = 'Preview'; protected $flag_Permanent = true; } ",0 "stributed under the terms of the GNU Lesser * General Public License version 3 as published by the Free Software Foundation. * * For the full copyright and license information, please read the LICENSE * file that was distributed with this source code. For the full list of * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Tests\Exception; use PhpOffice\PhpWord\Exception\InvalidStyleException; /** * Test class for PhpOffice\PhpWord\Exception\InvalidStyleException * * @coversDefaultClass \PhpOffice\PhpWord\Exception\InvalidStyleException * @runTestsInSeparateProcesses */ class InvalidStyleExceptionTest extends \PHPUnit_Framework_TestCase { /** * Throw new exception * * @expectedException \PhpOffice\PhpWord\Exception\InvalidStyleException * @covers \PhpOffice\PhpWord\Exception\InvalidStyleException */ public function testThrowException() { throw new InvalidStyleException; } } ",0 " * Store some additional attributes not available for all audio types */ public class Mp4AudioHeader extends GenericAudioHeader { /** * The key for the kind field
* * @see #content */ public final static String FIELD_KIND = ""KIND""; /** * The key for the profile
* * @see #content */ public final static String FIELD_PROFILE = ""PROFILE""; /** * The key for the ftyp brand
* * @see #content */ public final static String FIELD_BRAND = ""BRAND""; public void setKind(Mp4EsdsBox.Kind kind) { content.put(FIELD_KIND, kind); } /** * @return kind */ public Mp4EsdsBox.Kind getKind() { return (Mp4EsdsBox.Kind) content.get(FIELD_KIND); } /** * The key for the profile * * @param profile */ public void setProfile(Mp4EsdsBox.AudioProfile profile) { content.put(FIELD_PROFILE, profile); } /** * @return audio profile */ public Mp4EsdsBox.AudioProfile getProfile() { return (Mp4EsdsBox.AudioProfile) content.get(FIELD_PROFILE); } /** * @param brand */ public void setBrand(String brand) { content.put(FIELD_BRAND, brand); } /** * @return brand */ public String getBrand() { return (String) content.get(FIELD_BRAND); } } ",0 "ation; use Icinga\Web\Request; use Icinga\Web\Response; use Icinga\Web\Url; use Exception; /** * QuickForm wants to be a base class for simple forms */ abstract class QuickForm extends QuickBaseForm { const ID = '__FORM_NAME'; const CSRF = '__FORM_CSRF'; /** * The name of this form */ protected $formName; /** * Whether the form has been sent */ protected $hasBeenSent; /** * Whether the form has been sent */ protected $hasBeenSubmitted; /** * The submit caption, element - still tbd */ // protected $submit; /** * Our request */ protected $request; /** * @var Url */ protected $successUrl; protected $successMessage; protected $submitLabel; protected $submitButtonName; protected $deleteButtonName; protected $fakeSubmitButtonName; /** * Whether form elements have already been created */ protected $didSetup = false; protected $isApiRequest = false; public function __construct($options = null) { parent::__construct($options); $this->setMethod('post'); $this->getActionFromRequest() ->createIdElement() ->regenerateCsrfToken() ->setPreferredDecorators(); } protected function getActionFromRequest() { $this->setAction(Url::fromRequest()); return $this; } protected function setPreferredDecorators() { $this->setAttrib('class', 'autofocus icinga-controls'); $this->setDecorators( array( 'Description', array('FormErrors', array('onlyCustomFormErrors' => true)), 'FormElements', 'Form' ) ); return $this; } protected function addSubmitButtonIfSet() { if (false === ($label = $this->getSubmitLabel())) { return; } if ($this->submitButtonName && $el = $this->getElement($this->submitButtonName)) { return; } $el = $this->createElement('submit', $label) ->setLabel($label) ->setDecorators(array('ViewHelper')); $this->submitButtonName = $el->getName(); $this->addElement($el); $fakeEl = $this->createElement('submit', '_FAKE_SUBMIT') ->setLabel($label) ->setDecorators(array('ViewHelper')); $this->fakeSubmitButtonName = $fakeEl->getName(); $this->addElement($fakeEl); $this->addDisplayGroup( array($this->fakeSubmitButtonName), 'fake_button', array( 'decorators' => array('FormElements'), 'order' => 1, ) ); $grp = array( $this->submitButtonName, $this->deleteButtonName ); $this->addDisplayGroup($grp, 'buttons', array( 'decorators' => array( 'FormElements', array('HtmlTag', array('tag' => 'dl')), 'DtDdWrapper', ), 'order' => 1000, )); } protected function addSimpleDisplayGroup($elements, $name, $options) { if (! array_key_exists('decorators', $options)) { $options['decorators'] = array( 'FormElements', array('HtmlTag', array('tag' => 'dl')), 'Fieldset', ); } return $this->addDisplayGroup($elements, $name, $options); } protected function createIdElement() { $this->detectName(); $this->addHidden(self::ID, $this->getName()); $this->getElement(self::ID)->setIgnore(true); return $this; } public function getSentValue($name, $default = null) { $request = $this->getRequest(); if ($request->isPost() && $this->hasBeenSent()) { return $request->getPost($name); } else { return $default; } } public function getSubmitLabel() { if ($this->submitLabel === null) { return $this->translate('Submit'); } return $this->submitLabel; } public function setSubmitLabel($label) { $this->submitLabel = $label; return $this; } public function setApiRequest($isApiRequest = true) { $this->isApiRequest = $isApiRequest; return $this; } public function isApiRequest() { return $this->isApiRequest; } public function regenerateCsrfToken() { if (! $element = $this->getElement(self::CSRF)) { $this->addHidden(self::CSRF, CsrfToken::generate()); $element = $this->getElement(self::CSRF); } $element->setIgnore(true); return $this; } public function removeCsrfToken() { $this->removeElement(self::CSRF); return $this; } public function setSuccessUrl($url, $params = null) { if (! $url instanceof Url) { $url = Url::fromPath($url); } if ($params !== null) { $url->setParams($params); } $this->successUrl = $url; return $this; } public function getSuccessUrl() { $url = $this->successUrl ?: $this->getAction(); if (! $url instanceof Url) { $url = Url::fromPath($url); } return $url; } protected function beforeSetup() { } public function setup() { } protected function onSetup() { } public function setAction($action) { if ($action instanceof Url) { $action = $action->getAbsoluteUrl('&'); } return parent::setAction($action); } public function hasBeenSubmitted() { if ($this->hasBeenSubmitted === null) { $req = $this->getRequest(); if ($req->isPost()) { if (! $this->hasSubmitButton()) { return $this->hasBeenSubmitted = $this->hasBeenSent(); } $this->hasBeenSubmitted = $this->pressedButton( $this->fakeSubmitButtonName, $this->getSubmitLabel() ) || $this->pressedButton( $this->submitButtonName, $this->getSubmitLabel() ); } else { $this->hasBeenSubmitted = false; } } return $this->hasBeenSubmitted; } protected function hasSubmitButton() { return $this->submitButtonName !== null; } protected function pressedButton($name, $label) { $req = $this->getRequest(); if (! $req->isPost()) { return false; } $req = $this->getRequest(); $post = $req->getPost(); return array_key_exists($name, $post) && $post[$name] === $label; } protected function beforeValidation($data = array()) { } public function prepareElements() { if (! $this->didSetup) { $this->beforeSetup(); $this->setup(); $this->addSubmitButtonIfSet(); $this->onSetup(); $this->didSetup = true; } return $this; } public function handleRequest(Request $request = null) { if ($request === null) { $request = $this->getRequest(); } else { $this->setRequest($request); } $this->prepareElements(); if ($this->hasBeenSent()) { $post = $request->getPost(); if ($this->hasBeenSubmitted()) { $this->beforeValidation($post); if ($this->isValid($post)) { try { $this->onSuccess(); } catch (Exception $e) { $this->addException($e); $this->onFailure(); } } else { $this->onFailure(); } } else { $this->setDefaults($post); } } else { // Well... } return $this; } public function addException(Exception $e, $elementName = null) { $file = preg_split('/[\/\\\]/', $e->getFile(), -1, PREG_SPLIT_NO_EMPTY); $file = array_pop($file); $msg = sprintf( '%s (%s:%d)', $e->getMessage(), $file, $e->getLine() ); if ($el = $this->getElement($elementName)) { $el->addError($msg); } else { $this->addError($msg); } } public function onSuccess() { $this->redirectOnSuccess(); } public function setSuccessMessage($message) { $this->successMessage = $message; return $this; } public function getSuccessMessage($message = null) { if ($message !== null) { return $message; } if ($this->successMessage === null) { return t('Form has successfully been sent'); } return $this->successMessage; } public function redirectOnSuccess($message = null) { if ($this->isApiRequest()) { // TODO: Set the status line message? $this->successMessage = $this->getSuccessMessage($message); return; } $url = $this->getSuccessUrl(); $this->notifySuccess($this->getSuccessMessage($message)); $this->redirectAndExit($url); } public function onFailure() { } public function notifySuccess($message = null) { if ($message === null) { $message = t('Form has successfully been sent'); } Notification::success($message); return $this; } public function notifyError($message) { Notification::error($message); return $this; } protected function redirectAndExit($url) { /** @var Response $response */ $response = Icinga::app()->getFrontController()->getResponse(); $response->redirectAndExit($url); } protected function setHttpResponseCode($code) { Icinga::app()->getFrontController()->getResponse()->setHttpResponseCode($code); return $this; } protected function onRequest() { } public function setRequest(Request $request) { if ($this->request !== null) { throw new ProgrammingError('Unable to set request twice'); } $this->request = $request; $this->prepareElements(); $this->onRequest(); return $this; } /** * @return Request */ public function getRequest() { if ($this->request === null) { /** @var Request $request */ $request = Icinga::app()->getFrontController()->getRequest(); $this->setRequest($request); } return $this->request; } public function hasBeenSent() { if ($this->hasBeenSent === null) { /** @var Request $req */ if ($this->request === null) { $req = Icinga::app()->getFrontController()->getRequest(); } else { $req = $this->request; } if ($req->isPost()) { $post = $req->getPost(); $this->hasBeenSent = array_key_exists(self::ID, $post) && $post[self::ID] === $this->getName(); } else { $this->hasBeenSent = false; } } return $this->hasBeenSent; } protected function detectName() { if ($this->formName !== null) { $this->setName($this->formName); } else { $this->setName(get_class($this)); } } } ",0 "ader file includes the tcc files of the corresponding header file * and the header files of its dependent types. Include this header file * only when you need to use custom protocols (e.g. DebugProtocol, * VirtualProtocol) to read/write thrift structs. */ #include ""thrift/compiler/test/fixtures/fatal-compat/gen-cpp2/service_with_special_names.tcc"" #include ""thrift/compiler/test/fixtures/fatal-compat/gen-cpp2/module_types_custom_protocol.h"" ",0 "m is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ #ifndef XAPIAN_INCLUDED_SAFESYSSTAT_H #define XAPIAN_INCLUDED_SAFESYSSTAT_H #include #include #ifdef __WIN32__ // MSVC lacks these POSIX macros and other compilers may too: #ifndef S_ISDIR # define S_ISDIR(ST_MODE) (((ST_MODE) & _S_IFMT) == _S_IFDIR) #endif #ifndef S_ISREG # define S_ISREG(ST_MODE) (((ST_MODE) & _S_IFMT) == _S_IFREG) #endif // On UNIX, mkdir() is prototyped in but on Windows it's in // , so just include that from here to avoid build failures on // MSVC just because of some new use of mkdir(). This also reduces the // number of conditionalised #include statements we need in the sources. #include // Add overloaded version of mkdir which takes an (ignored) mode argument // to allow source code to just specify a mode argument unconditionally. // // The () around mkdir are in case it's defined as a macro. inline int (mkdir)(const char *pathname, mode_t /*mode*/) { return _mkdir(pathname); } #else // These were specified by POSIX.1-1996, so most platforms should have // these by now: #ifndef S_ISDIR # define S_ISDIR(ST_MODE) (((ST_MODE) & S_IFMT) == S_IFDIR) #endif #ifndef S_ISREG # define S_ISREG(ST_MODE) (((ST_MODE) & S_IFMT) == S_IFREG) #endif #endif #endif /* XAPIAN_INCLUDED_SAFESYSSTAT_H */ ",0 "c je laisse à blanc, pour le moment ... */ background-color: #FFF; } .header { background-color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.26); color: #707070; position: fixed; top: 0; width: 100%; z-index: 5; height:80px; } header { display: block; } .main { flex: 1; box-sizing: border-box; } .header-wrapper { height: 80px; margin: 0 auto; max-width: 1280px; width: 100%; flex: 1; box-sizing: border-box; } .header-logo-container { margin-left: 32px; max-width: 2000px; overflow: hidden; } #header-titre { font-size: 20px; font-weight: 300; margin-left: 15px; } #header-logo { height : 50px; } .main { margin-top: 80px; } .items-grid { margin: 0; padding: 0; } ul { list-style-type: disc; -webkit-margin-before: 1em; -webkit-margin-after: 1em; -webkit-margin-start: 0px; -webkit-margin-end: 0px; -webkit-padding-start: 40px; } li { display: list-item; text-align: -webkit-match-parent; } .item-wrapper { list-style: none; } .tuile { background-color: #f1fdf6; box-sizing: border-box; color: #303030; display: block; margin: 8px; min-height: 260px; position: relative; text-decoration: none; transition: box-shadow .2s; } .tuile:hover { box-shadow: 0 6px 12px 0 rgba(0,0,0,0.2); } .tuile-contenu { box-sizing: border-box; height: 100%; left: 0; padding: 28px; position: absolute; top: 0; width: 100%; } .tuile-icons { height: 24px; list-style: none; width: 24px; } .tuile-icons img { border: 0 none; max-height: 100%; max-width: 100%; vertical-align: middle; } .card__product-count { color: #c7c7c7; display: inline-block; line-height: 32px; margin-left: 5px; } .tuile-icons-container { margin: 0; padding: 0; } .tuile-titre { font-size: 24px; font-weight: 300; line-height: 32px; margin: 0; min-height: 96px; margin-top: 20px; } h4.tuile-etat { text-align: right; font-style: italic; } ",0 "hp * @copyright ©2017 Mahsum UREBE **/ namespace System\DB\QueryBuilder; use System\DB\QueryBuilder\Abstracts\TableAbstract; /** * Insert Class * * @package Referances\System\DB\QueryBuilder * @group Database */ class Insert extends TableAbstract { /** * INSERT .... SELECT olayı * * @var Select */ public $select; /** * Sütunlar * * @var string[] */ protected $columns = array(); /** * Değerler * * @var string[]|string[][] */ protected $values = array(); protected $statments = array(); /** * Insert sınıfı yapıcı methodu. * * @param string|string[] $tables * @param string|string[] $data * @param string[] $values */ public function __construct($tables = null, $data = null, $values = null) { $this->select = new Select(); $this->table($tables); if (!empty($data) && empty($values)) $this->setData($data); else if (!empty($data) && empty($values)) $this->setColumn($data) ->setValue($values); } /** * Verileri belirleyen method. * * @param string[]|string[][] $data Veriler * * @return $this */ public function setData($data) { if (is_array($data)) { if (is_array(current($data))) { // eğer birden fazla değer varsa $columns = array_keys(current($data)); $values = array_map('array_values', $data); } else { $columns = array_keys($data); $values = array_values($data); } $this->setValue($values); $this->setColumn($columns); } return $this; } /** * Değerleri belirleyen method. * * @param string[]|string[][] $values Değerler * * @return $this */ public function setValue($values) { if (!is_array(current($values))) $values = array($values); $this->values = array_merge($this->values, $values); return $this; } /** * Sütunları belirleyen method. * * @param string|string[] $column_name Sütun adı * * @return $this */ public function setColumn($column_name) { if (!is_array($column_name)) $column_name = array($column_name); $this->columns = array_merge($this->columns, Escape::escapeName($column_name)); return $this; } /** * Düşük öncelik * * @return Insert */ public function LOW_PRIORITY() { return $this->statement('LOW_PRIORITY', 0); } /** * Method kaydı. * * @param string $statment Method * @param int $level Seviye * * @return $this */ private function statement($statment, $level) { $this->statments[ $level ] = $statment; return $this; } /** * Yüksek öncelik * * @return Insert */ public function HIGH_PRIORITY() { return $this->statement('HIGH_PRIORITY', 0); } /** * Gecikmeli öncelik * * @return Insert */ public function DELAYED() { return $this->statement('DELAYED', 0); } /** * Yüksek öncelik * * @return Insert */ public function IGNORE() { return $this->statement('IGNORE', 1); } public function getQuery() { $statements = implode(' ', $this->statments); if (!empty($statements)) $statements .= ' '; $QueryPattern = 'INSERT ' . $statements . 'INTO '; $QueryPattern .= CRLF . implode(', ', $this->tables); $QueryPattern .= ' ' . sprintf('(%s)', implode(', ', $this->columns)); $QueryPattern .= (count($this->values) > 1) ? CRLF . ' VALUES' : ' VALUE'; $QueryPattern .= ' ' . $this->getValuesStr(); return $QueryPattern; } private function getValuesStr() { $out = array(); foreach ($this->values as $value) $out[] = sprintf('(%s)', implode(', ', Escape::escapeValue($value))); return implode(', ' . CRLF, $out); } }",0 "HP7 to handle these operations with anonymous classes. Therefore, it's the matter of having the required syntax because internal mechanisms are already in place and functional. This is a framework capable of running consecutive versions of the same extension simultaneously without name collisions. It's based on anonymous classes: no names - no name collisions! Namespacing can't help in this case because these are versions of the same extensions, and namespace shouldn't be changed between minor versions. Anonymous classes are differentiated by their place in code (so classes from two copies of a file in different locations are treated as different classes); and by the storage structure of the framework. They are addressed by the module that owns them. The example Framework is configured like this: - Zoo module contains Animal class with eat() function. - AlienZoo module is designed to rely on Zoo module. It inherits the Animal class to its Coeurl class. - ""Zoo_beta"" folder contains a ""later version"" (not a new release!) of the Zoo module. The Animal class has a slightly different implementation. - ""AlienZoo_beta"" folder also contains a ""later version"" of AlienZoo module. configured to work with ""Zoo_beta"" In this example, it's incompatible to the obsolete Zoo version, but it doesn't have to be the case. I just don't want to involve Interfaces in this example (and it would preferably require anonymous traits and interfaces, outside of current technical capacity). - ZooKeeper is a module that uses both Zoo and ""Zoo_beta"" by instantiating objects of Animal class and executing ""eat"" function. It can also test AlienZoo and Coeurl species, but currently it's unavailable due to a bug. In frameworks's files there are comments containing the preferred syntax, such as being able to work with anonymous class directly - class() { } - and not by instantiating it - new ReflectionClass(new class() {...}) . The temporary object is created just to to gain access to the new class! It's unnecessary. An object representing a class is not unheard of and is widely used in languages like JavaScript and Ruby. There are design patterns involving this feature. This very example is born of a practical need. Our website is a creative/gaming community with a custom engine. The game is often updated, both technically and gameplay-wise. Admins want to test new versions prior to upgrading the game. For now, it can only be done by having a sub-domain with a differently configured engine. It doesn't allow for many real usage situations. It does isolate possible problems from the production... But when the closed testing is done, we would like to have an additional live stage of trying out updates. This would prevent many issues and allow us to iterate game design decisions before committing to them. Of course, this is impossible due to name collisions... */ include('Framework.php'); $framework=new Framework ([ 'modules'=> [ 'zoo'=> [ 'dir'=>'Zoo', ], 'alien_zoo'=> [ 'dir'=>'AlienZoo', ], 'zoo_beta'=> [ 'dir'=>'Zoo_beta', ], 'alien_zoo_beta'=> [ 'dir'=>'AlienZoo_beta', 'zoo_key'=>'zoo_beta' ], 'zoo_master'=> [ 'dir'=>'ZooMaster', 'zoo_list'=>['alien_zoo', 'alien_zoo_beta'], 'test_species'=>'Coeurl', ] ] ]); $framework->get_module('zoo_master')->test_zoos();",0 "late { public function __construct(Twig_Environment $env) { parent::__construct($env); // line 1 try { $this->parent = $this->env->loadTemplate(""MyBlogBundle::base.html.twig""); } catch (Twig_Error_Loader $e) { $e->setTemplateFile($this->getTemplateName()); $e->setTemplateLine(1); throw $e; } $this->blocks = array( 'body' => array($this, 'block_body'), ); } protected function doGetParent(array $context) { return ""MyBlogBundle::base.html.twig""; } protected function doDisplay(array $context, array $blocks = array()) { $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 3 public function block_body($context, array $blocks = array()) { // line 5 echo ""

Текстова страница 1

\t \t
""; // line 8 echo twig_escape_filter($this->env, $this->getAttribute((isset($context[""entity""]) ? $context[""entity""] : $this->getContext($context, ""entity"")), ""title"", array()), ""html"", null, true); echo ""
\t \t
""; // line 12 echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute((isset($context[""entity""]) ? $context[""entity""] : $this->getContext($context, ""entity"")), ""date"", array()), ""d.m.Y | H:i""), ""html"", null, true); echo ""
\t
""; // line 16 echo twig_escape_filter($this->env, $this->getAttribute((isset($context[""entity""]) ? $context[""entity""] : $this->getContext($context, ""entity"")), ""text"", array()), ""html"", null, true); echo ""
\t\t ""; } public function getTemplateName() { return ""MyBlogBundle:Page1:show.html.twig""; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 65 => 20, 58 => 16, 51 => 12, 44 => 8, 39 => 5, 36 => 3, 11 => 1,); } } ",0 "d Hat elfutils. Written by Ulrich Drepper , 2000. Red Hat elfutils is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. Red Hat elfutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Red Hat elfutils; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. In addition, as a special exception, Red Hat, Inc. gives You the additional right to link the code of Red Hat elfutils with code licensed under any Open Source Initiative certified open source license (http://www.opensource.org/licenses/index.php) which requires the distribution of source code with any binary distribution and to distribute linked combinations of the two. Non-GPL Code permitted under this exception must only link to the code of Red Hat elfutils through those well defined interfaces identified in the file named EXCEPTION found in the source code files (the ""Approved Interfaces""). The files of Non-GPL Code may instantiate templates or use macros or inline functions from the Approved Interfaces without causing the resulting work to be covered by the GNU General Public License. Only Red Hat, Inc. may make changes or additions to the list of Approved Interfaces. Red Hat's grant of this exception is conditioned upon your not adding any new exceptions. If you wish to add a new Approved Interface or exception, please contact Red Hat. You must obey the GNU General Public License in all respects for all of the Red Hat elfutils code and other code used in conjunction with Red Hat elfutils except the Non-GPL Code covered by this exception. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to provide this exception without modification, you must delete this exception statement from your version and license this file solely under the GPL without exception. Red Hat elfutils is an included package of the Open Invention Network. An included package of the Open Invention Network is a package for which Open Invention Network licensees cross-license their patents. No patent license is granted, either expressly or impliedly, by designation as an included package. Should you wish to participate in the Open Invention Network licensing program, please visit www.openinventionnetwork.com . */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include ""libelfP.h"" int gelf_update_syminfo (data, ndx, src) Elf_Data *data; int ndx; GElf_Syminfo *src; { Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; Elf_Scn *scn; int result = 0; if (data == NULL) return 0; if (unlikely (ndx < 0)) { __libelf_seterrno (ELF_E_INVALID_INDEX); return 0; } if (unlikely (data_scn->d.d_type != ELF_T_SYMINFO)) { /* The type of the data better should match. */ __libelf_seterrno (ELF_E_DATA_MISMATCH); return 0; } /* The types for 32 and 64 bit are the same. Lucky us. */ assert (sizeof (GElf_Syminfo) == sizeof (Elf32_Syminfo)); assert (sizeof (GElf_Syminfo) == sizeof (Elf64_Syminfo)); scn = data_scn->s; rwlock_wrlock (scn->elf->lock); /* Check whether we have to resize the data buffer. */ if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data_scn->d.d_size)) { __libelf_seterrno (ELF_E_INVALID_INDEX); goto out; } ((GElf_Syminfo *) data_scn->d.d_buf)[ndx] = *src; result = 1; /* Mark the section as modified. */ scn->flags |= ELF_F_DIRTY; out: rwlock_unlock (scn->elf->lock); return result; } ",0 " * * 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. */ package org.jboss.pnc.indyrepositorymanager; import org.jboss.pnc.indyrepositorymanager.fixture.TestBuildExecution; import org.jboss.pnc.enums.RepositoryType; import org.jboss.pnc.spi.repositorymanager.BuildExecution; import org.jboss.pnc.spi.repositorymanager.model.RepositoryConnectionInfo; import org.jboss.pnc.spi.repositorymanager.model.RepositorySession; import org.jboss.pnc.test.category.ContainerTest; import org.junit.Test; import org.junit.experimental.categories.Category; import java.util.Collections; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; @Category(ContainerTest.class) public class AllSessionUrlsForBuildAreAlikeTest extends AbstractRepositoryManagerDriverTest { @Test public void formatRepositoryURLForSimpleInfo_AllURLsMatch() throws Exception { // create a dummy non-chained build execution and a repo session based on it BuildExecution execution = new TestBuildExecution(); RepositorySession repositoryConfiguration = driver.createBuildRepository( execution, accessToken, accessToken, RepositoryType.MAVEN, Collections.emptyMap(), false); assertThat(repositoryConfiguration, notNullValue()); RepositoryConnectionInfo connectionInfo = repositoryConfiguration.getConnectionInfo(); assertThat(connectionInfo, notNullValue()); // check that all URLs in the connection info are the same (this might be different in another repo driver) String expectedUrl = connectionInfo.getDependencyUrl(); assertThat(connectionInfo.getToolchainUrl(), equalTo(expectedUrl)); // assertThat(connectionInfo.getDeployPath(), equalTo(expectedUrl)); } } ",0 "enerated by javadoc (version 1.7.0_65) on Fri Oct 31 22:35:35 CET 2014 --> R-Index
A B C D E F G H I L M P R S T U V W 

R

removeFollowed(Follow) - Method in class es.udc.fi.dc.fd.follow.FollowRepository
 
requiresAuthentication() - Method in class es.udc.fi.dc.fd.account.UserAuthenticationIntegrationTest
 
A B C D E F G H I L M P R S T U V W 
",0 "de #include #include #include #include #include #include #include #include #include ""internal.h"" #define VALID_FLAGS (SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE| \ SYNC_FILE_RANGE_WAIT_AFTER) /* * Do the filesystem syncing work. For simple filesystems * writeback_inodes_sb(sb) just dirties buffers with inodes so we have to * submit IO for these buffers via __sync_blockdev(). This also speeds up the * wait == 1 case since in that case write_inode() functions do * sync_dirty_buffer() and thus effectively write one block at a time. */ static int __sync_filesystem(struct super_block *sb, int wait) { /* * This should be safe, as we require bdi backing to actually * write out data in the first place */ if (sb->s_bdi == &noop_backing_dev_info) return 0; if (sb->s_qcop && sb->s_qcop->quota_sync) sb->s_qcop->quota_sync(sb, -1, wait); if (wait) sync_inodes_sb(sb); else writeback_inodes_sb(sb, WB_REASON_SYNC); if (sb->s_op->sync_fs) sb->s_op->sync_fs(sb, wait); return __sync_blockdev(sb->s_bdev, wait); } /* * Write out and wait upon all dirty data associated with this * superblock. Filesystem data as well as the underlying block * device. Takes the superblock lock. */ int sync_filesystem(struct super_block *sb) { int ret; /* * We need to be protected against the filesystem going from * r/o to r/w or vice versa. */ WARN_ON(!rwsem_is_locked(&sb->s_umount)); /* * No point in syncing out anything if the filesystem is read-only. */ if (sb->s_flags & MS_RDONLY) return 0; ret = __sync_filesystem(sb, 0); if (ret < 0) return ret; return __sync_filesystem(sb, 1); } EXPORT_SYMBOL_GPL(sync_filesystem); static void sync_one_sb(struct super_block *sb, void *arg) { if (!(sb->s_flags & MS_RDONLY)) __sync_filesystem(sb, *(int *)arg); } /* * Sync all the data for all the filesystems (called by sys_sync() and * emergency sync) */ void sync_filesystems(int wait) { iterate_supers(sync_one_sb, &wait); } /* * sync everything. Start out by waking pdflush, because that writes back * all queues in parallel. */ SYSCALL_DEFINE0(sync) { wakeup_flusher_threads(0, WB_REASON_SYNC); sync_filesystems(0); sync_filesystems(1); if (unlikely(laptop_mode)) laptop_sync_completion(); return 0; } static void do_sync_work(struct work_struct *work) { /* * Sync twice to reduce the possibility we skipped some inodes / pages * because they were temporarily locked */ sync_filesystems(0); sync_filesystems(0); printk(""Emergency Sync complete\n""); kfree(work); } void emergency_sync(void) { struct work_struct *work; work = kmalloc(sizeof(*work), GFP_ATOMIC); if (work) { INIT_WORK(work, do_sync_work); schedule_work(work); } } /* * sync a single super */ SYSCALL_DEFINE1(syncfs, int, fd) { struct file *file; struct super_block *sb; int ret; int fput_needed; file = fget_light(fd, &fput_needed); if (!file) return -EBADF; sb = file->f_dentry->d_sb; down_read(&sb->s_umount); ret = sync_filesystem(sb); up_read(&sb->s_umount); fput_light(file, fput_needed); return ret; } /** * vfs_fsync_range - helper to sync a range of data & metadata to disk * @file: file to sync * @start: offset in bytes of the beginning of data range to sync * @end: offset in bytes of the end of data range (inclusive) * @datasync: perform only datasync * * Write back data in range @start..@end and metadata for @file to disk. If * @datasync is set only metadata needed to access modified file data is * written. */ int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync) { if (!file->f_op || !file->f_op->fsync) return -EINVAL; return file->f_op->fsync(file, start, end, datasync); } EXPORT_SYMBOL(vfs_fsync_range); /** * vfs_fsync - perform a fsync or fdatasync on a file * @file: file to sync * @datasync: only perform a fdatasync operation * * Write back data and metadata for @file to disk. If @datasync is * set only metadata needed to access modified file data is written. */ int vfs_fsync(struct file *file, int datasync) { return vfs_fsync_range(file, 0, LLONG_MAX, datasync); } EXPORT_SYMBOL(vfs_fsync); static int do_fsync(unsigned int fd, int datasync) { struct file *file; int ret = -EBADF; file = fget(fd); if (file) { ret = vfs_fsync(file, datasync); fput(file); } return ret; } SYSCALL_DEFINE1(fsync, unsigned int, fd) { return do_fsync(fd, 0); } SYSCALL_DEFINE1(fdatasync, unsigned int, fd) { return do_fsync(fd, 1); } /** * generic_write_sync - perform syncing after a write if file / inode is sync * @file: file to which the write happened * @pos: offset where the write started * @count: length of the write * * This is just a simple wrapper about our general syncing function. */ int generic_write_sync(struct file *file, loff_t pos, loff_t count) { if (!(file->f_flags & O_DSYNC) && !IS_SYNC(file->f_mapping->host)) return 0; return vfs_fsync_range(file, pos, pos + count - 1, (file->f_flags & __O_SYNC) ? 0 : 1); } EXPORT_SYMBOL(generic_write_sync); /* * sys_sync_file_range() permits finely controlled syncing over a segment of * a file in the range offset .. (offset+nbytes-1) inclusive. If nbytes is * zero then sys_sync_file_range() will operate from offset out to EOF. * * The flag bits are: * * SYNC_FILE_RANGE_WAIT_BEFORE: wait upon writeout of all pages in the range * before performing the write. * * SYNC_FILE_RANGE_WRITE: initiate writeout of all those dirty pages in the * range which are not presently under writeback. Note that this may block for * significant periods due to exhaustion of disk request structures. * * SYNC_FILE_RANGE_WAIT_AFTER: wait upon writeout of all pages in the range * after performing the write. * * Useful combinations of the flag bits are: * * SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE: ensures that all pages * in the range which were dirty on entry to sys_sync_file_range() are placed * under writeout. This is a start-write-for-data-integrity operation. * * SYNC_FILE_RANGE_WRITE: start writeout of all dirty pages in the range which * are not presently under writeout. This is an asynchronous flush-to-disk * operation. Not suitable for data integrity operations. * * SYNC_FILE_RANGE_WAIT_BEFORE (or SYNC_FILE_RANGE_WAIT_AFTER): wait for * completion of writeout of all pages in the range. This will be used after an * earlier SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE operation to wait * for that operation to complete and to return the result. * * SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER: * a traditional sync() operation. This is a write-for-data-integrity operation * which will ensure that all pages in the range which were dirty on entry to * sys_sync_file_range() are committed to disk. * * * SYNC_FILE_RANGE_WAIT_BEFORE and SYNC_FILE_RANGE_WAIT_AFTER will detect any * I/O errors or ENOSPC conditions and will return those to the caller, after * clearing the EIO and ENOSPC flags in the address_space. * * It should be noted that none of these operations write out the file's * metadata. So unless the application is strictly performing overwrites of * already-instantiated disk blocks, there are no guarantees here that the data * will be available after a crash. */ SYSCALL_DEFINE(sync_file_range)(int fd, loff_t offset, loff_t nbytes, unsigned int flags) { int ret; struct file *file; struct address_space *mapping; loff_t endbyte; /* inclusive */ int fput_needed; umode_t i_mode; ret = -EINVAL; if (flags & ~VALID_FLAGS) goto out; endbyte = offset + nbytes; if ((s64)offset < 0) goto out; if ((s64)endbyte < 0) goto out; if (endbyte < offset) goto out; if (sizeof(pgoff_t) == 4) { if (offset >= (0x100000000ULL << PAGE_CACHE_SHIFT)) { /* * The range starts outside a 32 bit machine's * pagecache addressing capabilities. Let it ""succeed"" */ ret = 0; goto out; } if (endbyte >= (0x100000000ULL << PAGE_CACHE_SHIFT)) { /* * Out to EOF */ nbytes = 0; } } if (nbytes == 0) endbyte = LLONG_MAX; else endbyte--; /* inclusive */ ret = -EBADF; file = fget_light(fd, &fput_needed); if (!file) goto out; i_mode = file->f_path.dentry->d_inode->i_mode; ret = -ESPIPE; if (!S_ISREG(i_mode) && !S_ISBLK(i_mode) && !S_ISDIR(i_mode) && !S_ISLNK(i_mode)) goto out_put; mapping = file->f_mapping; if (!mapping) { ret = -EINVAL; goto out_put; } ret = 0; if (flags & SYNC_FILE_RANGE_WAIT_BEFORE) { ret = filemap_fdatawait_range(mapping, offset, endbyte); if (ret < 0) goto out_put; } if (flags & SYNC_FILE_RANGE_WRITE) { ret = filemap_fdatawrite_range(mapping, offset, endbyte); if (ret < 0) goto out_put; } if (flags & SYNC_FILE_RANGE_WAIT_AFTER) ret = filemap_fdatawait_range(mapping, offset, endbyte); out_put: fput_light(file, fput_needed); out: return ret; } #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS asmlinkage long SyS_sync_file_range(long fd, loff_t offset, loff_t nbytes, long flags) { return SYSC_sync_file_range((int) fd, offset, nbytes, (unsigned int) flags); } SYSCALL_ALIAS(sys_sync_file_range, SyS_sync_file_range); #endif /* It would be nice if people remember that not all the world's an i386 when they introduce new system calls */ SYSCALL_DEFINE(sync_file_range2)(int fd, unsigned int flags, loff_t offset, loff_t nbytes) { return sys_sync_file_range(fd, offset, nbytes, flags); } #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS asmlinkage long SyS_sync_file_range2(long fd, long flags, loff_t offset, loff_t nbytes) { return SYSC_sync_file_range2((int) fd, (unsigned int) flags, offset, nbytes); } SYSCALL_ALIAS(sys_sync_file_range2, SyS_sync_file_range2); #endif ",0 "til.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.dom4j.DocumentException; import org.dom4j.Element; import org.dom4j.io.SAXReader; import com.thoughtworks.xstream.XStream; import com.weixin.vo.TextMessage; /** * @author : Jay */ public class MessageUtil { /** * xml 转为 map * @param request * @return * @throws IOException * @throws DocumentException */ public static Map xmlToMap(HttpServletRequest request) throws IOException, DocumentException { Map map = new HashMap(); SAXReader reader = new SAXReader(); InputStream ins = request.getInputStream(); org.dom4j.Document doc = reader.read(ins); Element root = doc.getRootElement(); List list = root.elements(); for (Element e : list) { map.put(e.getName(), e.getText()); } ins.close(); return map; } /** * 将文本消息对象转为xml * @return */ public static String textMessageToXml(TextMessage textMessage){ XStream xstream = new XStream(); xstream.alias(""xml"", textMessage.getClass()); return xstream.toXML(textMessage); } /** * 初始化文本消 * @param toUserName * @param fromUserName * @param content * @return */ public static String initText(String toUserName, String fromUserName,String content){ TextMessage text = new TextMessage(); text.setFromUserName(toUserName); text.setToUserName(fromUserName); text.setMsgType(""text""); text.setCreateTime(new Date().getTime()); text.setContent(content); return MessageUtil.textMessageToXml(text); } } ",0 "tract; use Aquatic\FedEx\Request\ValidateAddress as ValidateAddressRequest; use Aquatic\FedEx\Response\ValidateAddress as ValidateAddressResponse; use Aquatic\FedEx\Request\Shipment\Track as TrackShipmentRequest; use Aquatic\FedEx\Response\Shipment\Track as TrackShipmentResponse; use Aquatic\FedEx\Request\Shipment\CustomsAndDuties as CustomsAndDutiesRequest; use Aquatic\FedEx\Response\Shipment\CustomsAndDuties as CustomsAndDutiesResponse; // Facade for FedEx requests class FedEx { public static function trackShipment(int $tracking_number): ResponseContract { return (new TrackShipmentRequest($tracking_number)) ->setCredentials(getenv('FEDEX_KEY'), getenv('FEDEX_PASSWORD'), getenv('FEDEX_ACCOUNT_NUMBER'), getenv('FEDEX_METER_NUMBER')) ->send(new TrackShipmentResponse); } public static function customsAndDuties(Shipment $shipment, Address $shipper) { return (new CustomsAndDutiesRequest($shipment, $shipper)) ->setCredentials(getenv('FEDEX_KEY'), getenv('FEDEX_PASSWORD'), getenv('FEDEX_ACCOUNT_NUMBER'), getenv('FEDEX_METER_NUMBER')) ->send(new CustomsAndDutiesResponse($shipment->getItems())); } public static function validateAddress(Address $address) { return (new ValidateAddressRequest($address)) ->setCredentials(getenv('FEDEX_KEY'), getenv('FEDEX_PASSWORD'), getenv('FEDEX_ACCOUNT_NUMBER'), getenv('FEDEX_METER_NUMBER')) ->send(new ValidateAddressResponse); } }",0 "linux/init.h> #include #include #include #include #include #include #include #include #define LGR_TIMER_INTERVAL_SECS (30 * 60) #define VM_LEVEL_MAX 2 /* Maximum is 8, but we only record two levels */ /* * LGR info: Contains stfle and stsi data */ struct lgr_info { /* Bit field with facility information: 4 DWORDs are stored */ u64 stfle_fac_list[4]; /* Level of system (1 = CEC, 2 = LPAR, 3 = z/VM */ u32 level; /* Level 1: CEC info (stsi 1.1.1) */ char manufacturer[16]; char type[4]; char sequence[16]; char plant[4]; char model[16]; /* Level 2: LPAR info (stsi 2.2.2) */ u16 lpar_number; char name[8]; /* Level 3: VM info (stsi 3.2.2) */ u8 vm_count; struct { char name[8]; char cpi[16]; } vm[VM_LEVEL_MAX]; } __packed __aligned(8); /* * LGR globals */ static char lgr_page[PAGE_SIZE] __aligned(PAGE_SIZE); static struct lgr_info lgr_info_last; static struct lgr_info lgr_info_cur; static struct debug_info *lgr_dbf; /* * Copy buffer and then convert it to ASCII */ static void cpascii(char *dst, char *src, int size) { memcpy(dst, src, size); EBCASC(dst, size); } /* * Fill LGR info with 1.1.1 stsi data */ static void lgr_stsi_1_1_1(struct lgr_info *lgr_info) { struct sysinfo_1_1_1 *si = (void *) lgr_page; if (stsi(si, 1, 1, 1)) return; cpascii(lgr_info->manufacturer, si->manufacturer, sizeof(si->manufacturer)); cpascii(lgr_info->type, si->type, sizeof(si->type)); cpascii(lgr_info->model, si->model, sizeof(si->model)); cpascii(lgr_info->sequence, si->sequence, sizeof(si->sequence)); cpascii(lgr_info->plant, si->plant, sizeof(si->plant)); } /* * Fill LGR info with 2.2.2 stsi data */ static void lgr_stsi_2_2_2(struct lgr_info *lgr_info) { struct sysinfo_2_2_2 *si = (void *) lgr_page; if (stsi(si, 2, 2, 2)) return; cpascii(lgr_info->name, si->name, sizeof(si->name)); memcpy(&lgr_info->lpar_number, &si->lpar_number, sizeof(lgr_info->lpar_number)); } /* * Fill LGR info with 3.2.2 stsi data */ static void lgr_stsi_3_2_2(struct lgr_info *lgr_info) { struct sysinfo_3_2_2 *si = (void *) lgr_page; int i; if (stsi(si, 3, 2, 2)) return; for (i = 0; i < min_t(u8, si->count, VM_LEVEL_MAX); i++) { cpascii(lgr_info->vm[i].name, si->vm[i].name, sizeof(si->vm[i].name)); cpascii(lgr_info->vm[i].cpi, si->vm[i].cpi, sizeof(si->vm[i].cpi)); } lgr_info->vm_count = si->count; } /* * Fill LGR info with current data */ static void lgr_info_get(struct lgr_info *lgr_info) { int level; memset(lgr_info, 0, sizeof(*lgr_info)); stfle(lgr_info->stfle_fac_list, ARRAY_SIZE(lgr_info->stfle_fac_list)); level = stsi(NULL, 0, 0, 0); lgr_info->level = level; if (level >= 1) lgr_stsi_1_1_1(lgr_info); if (level >= 2) lgr_stsi_2_2_2(lgr_info); if (level >= 3) lgr_stsi_3_2_2(lgr_info); } /* * Check if LGR info has changed and if yes log new LGR info to s390dbf */ void lgr_info_log(void) { static DEFINE_SPINLOCK(lgr_info_lock); unsigned long flags; if (!spin_trylock_irqsave(&lgr_info_lock, flags)) return; lgr_info_get(&lgr_info_cur); if (memcmp(&lgr_info_last, &lgr_info_cur, sizeof(lgr_info_cur)) != 0) { debug_event(lgr_dbf, 1, &lgr_info_cur, sizeof(lgr_info_cur)); lgr_info_last = lgr_info_cur; } spin_unlock_irqrestore(&lgr_info_lock, flags); } EXPORT_SYMBOL_GPL(lgr_info_log); static void lgr_timer_set(void); /* * LGR timer callback */ static void lgr_timer_fn(unsigned long ignored) { lgr_info_log(); lgr_timer_set(); } static struct timer_list lgr_timer = TIMER_DEFERRED_INITIALIZER(lgr_timer_fn, 0, 0); /* * Setup next LGR timer */ static void lgr_timer_set(void) { mod_timer(&lgr_timer, jiffies + LGR_TIMER_INTERVAL_SECS * HZ); } /* * Initialize LGR: Add s390dbf, write initial lgr_info and setup timer */ static int __init lgr_init(void) { lgr_dbf = debug_register(""lgr"", 1, 1, sizeof(struct lgr_info)); if (!lgr_dbf) return -ENOMEM; debug_register_view(lgr_dbf, &debug_hex_ascii_view); lgr_info_get(&lgr_info_last); debug_event(lgr_dbf, 1, &lgr_info_last, sizeof(lgr_info_last)); lgr_timer_set(); return 0; } device_initcall(lgr_init); ",0 " by javadoc (build 1.6.0_05) on Tue Mar 25 10:54:12 CET 2008 --> TransponderType (hal 0.4.1-SNAPSHOT API)
Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.accada.hal.transponder
Enum TransponderType

java.lang.Object
  java.lang.Enum<TransponderType>
      org.accada.hal.transponder.TransponderType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TransponderType>

public enum TransponderType
extends java.lang.Enum<TransponderType>


Enum Constant Summary
EM4222
           
EPCclass0Gen1
           
EPCclass1Gen1
           
EPCclass1Gen2
           
ICode1
           
ICodeEPC
           
ICodeUID
           
ISO15693
           
ISO18000_6A
           
ISO18000_6B
           
TagItHF
           
UNKNOWN
           
 
Method Summary
 int code()
           
 int dataSize()
           
static TransponderType getType(byte trType)
           
static TransponderType getType(java.lang.String trTypeName)
           
static TransponderType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TransponderType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ICode1

public static final TransponderType ICode1

TagItHF

public static final TransponderType TagItHF

ISO15693

public static final TransponderType ISO15693

ICodeEPC

public static final TransponderType ICodeEPC

ICodeUID

public static final TransponderType ICodeUID

ISO18000_6A

public static final TransponderType ISO18000_6A

ISO18000_6B

public static final TransponderType ISO18000_6B

EM4222

public static final TransponderType EM4222

EPCclass1Gen2

public static final TransponderType EPCclass1Gen2

EPCclass0Gen1

public static final TransponderType EPCclass0Gen1

EPCclass1Gen1

public static final TransponderType EPCclass1Gen1

UNKNOWN

public static final TransponderType UNKNOWN
Method Detail

values

public static TransponderType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TransponderType c : TransponderType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TransponderType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

code

public int code()

dataSize

public int dataSize()

getType

public static TransponderType getType(byte trType)

getType

public static TransponderType getType(java.lang.String trTypeName)

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright © 2008. All Rights Reserved. ",0 "ileColor"" content=""#222c37"" />

Scripting API


ExtendedAssets.Destroy

public void Destroy(ExtendedWindow window);

Parameters

window

Description

Destroys all the textures loaded for the given window

",0 "on1DWidget; class VolumeRenderWidget; class QSlider; class VOLUMERENDERER_EXPORT VolumeRenderer : public QWidget { Q_OBJECT public: VolumeRenderer(); ~VolumeRenderer(); void SetData(int* sizes_t, float* spacings_t, GLenum data_format_t, void* data_t); private: TransferFunction1DWidget* transfer_function_1d_widget_; VolumeRenderWidget* volume_render_widget_; QSlider* win_center_slider; QSlider* win_width_slider; void InitializeWidget(); private slots: void OnTransferFunctionChanged(); void OnWinCenterChanged(int); void OnWinWidthChanged(int); void OnOptimizationTriggered(); }; #endif // VOLUME_RENDERER_H ",0 " by javadoc (build 1.5.0_01) on Sun Jul 03 11:32:25 ICT 2005 --> com.golden.gamedev.engine.graphics Class Hierarchy (GTGE Add-Ons)
Overview  Package  Class   Tree  Index  Help 
 PREV   NEXT FRAMES    NO FRAMES    

Hierarchy For Package com.golden.gamedev.engine.graphics

Package Hierarchies:
All Packages

Class Hierarchy


Overview  Package  Class   Tree  Index  Help 
 PREV   NEXT FRAMES    NO FRAMES    

Copyright © 2003-2005 Golden T Studios. All rights reserved. Use is subject to license terms.
GoldenStudios.or.id
",0 " LICENSE file. #ifndef UI_EVENTS_ANDROID_EVENT_HANDLER_ANDROID_H_ #define UI_EVENTS_ANDROID_EVENT_HANDLER_ANDROID_H_ #include ""ui/events/events_export.h"" namespace ui { class DragEventAndroid; class GestureEventAndroid; class KeyEventAndroid; class MotionEventAndroid; // Dispatches events to appropriate targets. The default implementations of // all of the specific handlers do nothing. Implementations should set // themselves to the ViewAndroid in the view tree to get the calls routed. // Use bool return type to stop propagating the call i.e. overriden method // should return true to indicate that the event was handled and stop // the processing. class EVENTS_EXPORT EventHandlerAndroid { public: virtual bool OnDragEvent(const DragEventAndroid& event); virtual bool OnTouchEvent(const MotionEventAndroid& event); virtual bool OnMouseEvent(const MotionEventAndroid& event); virtual bool OnMouseWheelEvent(const MotionEventAndroid& event); virtual bool OnGestureEvent(const GestureEventAndroid& event); virtual void OnSizeChanged(); virtual void OnPhysicalBackingSizeChanged(); virtual void OnBrowserControlsHeightChanged(); virtual bool OnGenericMotionEvent(const MotionEventAndroid& event); virtual bool OnKeyUp(const KeyEventAndroid& event); virtual bool DispatchKeyEvent(const KeyEventAndroid& event); virtual bool ScrollBy(float delta_x, float delta_y); virtual bool ScrollTo(float x, float y); }; } // namespace ui #endif // UI_EVENTS_ANDROID_EVENT_HANDLER_ANDROID_H_ ",0 "s */ /* */ /* 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. */ /* -------------------------------------------------------------------------- */ #ifndef VIRTUAL_MACHINE_TEMPLATE_H_ #define VIRTUAL_MACHINE_TEMPLATE_H_ #include ""Template.h"" #include using namespace std; /** * Virtual Machine Template class, it represents a VM configuration file. */ class VirtualMachineTemplate : public Template { public: VirtualMachineTemplate(): Template(false,'=',""TEMPLATE""){}; VirtualMachineTemplate( bool _replace_mode, const char _separator, const char * _xml_root): Template(_replace_mode, _separator, _xml_root){}; ~VirtualMachineTemplate(){}; VirtualMachineTemplate(VirtualMachineTemplate& vmt):Template(vmt){}; /** * Checks the template for RESTRICTED ATTRIBUTES * @param rs_attr the first restricted attribute found if any * @return true if a restricted attribute is found in the template */ bool check(string& rs_attr) { return Template::check(rs_attr, restricted_attributes); }; void set_xml_root(const char * _xml_root) { Template::set_xml_root(_xml_root); }; /** * Deletes all restricted attributes */ void remove_restricted(); /** * Deletes all the attributes, excepts the restricted ones */ void remove_all_except_restricted(); /** * Replaces the given image from the DISK attribute with a new one * @param target_id IMAGE_ID the image to be replaced * @param target_name IMAGE the image to be replaced * @param target_uname IMAGE_UNAME the image to be replaced * @param new_name of the new image * @param new_uname of the owner of the new image */ int replace_disk_image(int target_id, const string& target_name, const string& target_uname, const string& new_name, const string& new_uname); private: friend class VirtualMachinePool; static vector restricted_attributes; /** * Stores the attributes as restricted, these attributes will be used in * VirtualMachineTemplate::check * @param rattrs Attributes to restrict */ static void set_restricted_attributes(vector& rattrs) { Template::set_restricted_attributes(rattrs, restricted_attributes); }; }; /* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ #endif /*VIRTUAL_MACHINE_TEMPLATE_H_*/ ",0 "ss=""col-md-12""> {!! Form::open(['url' => 'management/file/store','files' => true,'id'=>'storeForm','class'=>'form-horizontal']) !!} {!! Form::hidden('id', isset($data)?$data->id:null, ['id' => 'id']) !!} {!! Form::file('image',['class'=>'form-control','style' => 'visibility:hidden','id'=>'filename']) !!}
{!!Form::text('name',isset($data)?$data->name:null, ['readonly'=>true,'maxlength' => 100, 'class' => 'form-control','id'=>'name','placeholder'=>lang::get('label.file name')]) !!}
{!!Form::textarea('description',isset($data)?$data->description:null, ['rows'=>3,'maxlength' => 100, 'class' => 'form-control col-xs-12 col-sm-6','id'=>'description','placeholder'=>lang::get('label.description')]) !!}
{!! Form::select('company_id', \App\Models\Company::where('active',1)->lists('name', 'id'), isset($data)?$data->company_id:null, ['placeholder' => Lang::get('label.select company'),'class' => 'chosen form-control col-sm-12' ,'id' => 'company_id']) !!}
{!!Form::select('user_from[]',\App\Models\User::join('roles','roles.id','=','users.role_id')->select(['users.id','first_name'])->where('users.active',1)->where('authorize','==','0')->lists('first_name','id'),null, ['multiple'=>'multiple','size' => 8,'class' => 'form-control','id'=>'multiselect','placeholder'=>lang::get('label.select users')]) !!}
{!!Form::select('users[]',\App\Models\FileUser::join('users','users.id','=','file_users.user_id')->select(['users.id','users.first_name'])->where('users.active',1)->where('file_users.file_id',$data?$data->id:0)->lists('first_name','id'),null, ['multiple'=>'multiple','size' => 8,'class' => 'form-control','id'=>'multiselect_to','placeholder'=>lang::get('label.selected users')]) !!}
{!!Form::checkbox('active',1,isset($data)?$data->active==1?true:false:false, ['id'=>'active']) !!}
{!! Lang::get('label.back') !!}
{!! Form::close() !!} @endsection @push('css') @endpush @push('scripts {!! JsValidate::formRequest('\App\Http\Requests\FileRequest', '#storeForm') !!} @endpush",0 "a name=""generator"" content=""rustdoc""> libc::notbsd::linux::other::PTRACE_PEEKUSER - Rust

libc::notbsd::linux::other::PTRACE_PEEKUSER [] [src]

pub const PTRACE_PEEKUSER: c_uint = 3
",0 "his program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __NVHOST_INTR_H #define __NVHOST_INTR_H #include #include #include struct nvhost_channel; enum nvhost_intr_action { /** * Perform cleanup after a submit has completed. * 'data' points to a channel */ NVHOST_INTR_ACTION_SUBMIT_COMPLETE = 0, /** * Save a HW context. * 'data' points to a context */ NVHOST_INTR_ACTION_CTXSAVE, /** * Wake up a task. * 'data' points to a wait_queue_head_t */ NVHOST_INTR_ACTION_WAKEUP, /** * Wake up a interruptible task. * 'data' points to a wait_queue_head_t */ NVHOST_INTR_ACTION_WAKEUP_INTERRUPTIBLE, NVHOST_INTR_ACTION_COUNT }; struct nvhost_intr; struct nvhost_intr_syncpt { struct nvhost_intr *intr; u8 id; u8 irq_requested; u16 irq; spinlock_t lock; struct list_head wait_head; char thresh_irq_name[12]; }; struct nvhost_intr { struct nvhost_intr_syncpt *syncpt; struct mutex mutex; int host_general_irq; bool host_general_irq_requested; }; #define intr_to_dev(x) container_of(x, struct nvhost_master, intr) #define intr_op(intr) (intr_to_dev(intr)->op.intr) #define intr_syncpt_to_intr(is) (is->intr) /** * Schedule an action to be taken when a sync point reaches the given threshold. * * @id the sync point * @thresh the threshold * @action the action to take * @data a pointer to extra data depending on action, see above * @waiter waiter allocated with nvhost_intr_alloc_waiter - assumes ownership * @ref must be passed if cancellation is possible, else NULL * * This is a non-blocking api. */ int nvhost_intr_add_action(struct nvhost_intr *intr, u32 id, u32 thresh, enum nvhost_intr_action action, void *data, void *waiter, void **ref); /** * Allocate a waiter. */ void *nvhost_intr_alloc_waiter(void); /** * Unreference an action submitted to nvhost_intr_add_action(). * You must call this if you passed non-NULL as ref. * @ref the ref returned from nvhost_intr_add_action() */ void nvhost_intr_put_ref(struct nvhost_intr *intr, void *ref); int nvhost_intr_init(struct nvhost_intr *intr, u32 irq_gen, u32 irq_sync); void nvhost_intr_deinit(struct nvhost_intr *intr); void nvhost_intr_start(struct nvhost_intr *intr, u32 hz); void nvhost_intr_stop(struct nvhost_intr *intr); irqreturn_t nvhost_syncpt_thresh_fn(int irq, void *dev_id); #endif ",0 "Anton P. Kolosov, et al. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License version 3 * as published by the Free Software Foundation with the addition of the * following permission added to Section 15 as permitted in Section 7(a): * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY * ANTON P. KOLOSOV. ANTON P. KOLOSOV DISCLAIMS THE WARRANTY OF NON INFRINGEMENT * OF THIRD PARTY RIGHTS * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Affero General Public License for more details. * You should have received a copy of the GNU Affero General Public License * along with this program; if not, see http://www.gnu.org/licenses or write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA, 02110-1301 USA. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License. * * You can be released from the requirements of the license by purchasing * a commercial license. Buying such a license is mandatory as soon as you * develop commercial activities involving the Non-Linear Book software without * disclosing the source code of your own applications. * * For more information, please contact Anton P. Kolosov at this * address: antokolos@gmail.com * * Copyright (c) 2012 Anton P. Kolosov All rights reserved. */ package com.nlbhub.nlb.domain; import com.nlbhub.nlb.api.PropertyManager; /** * The MediaExportParameters class represents parameters used when saving media files during export of the scheme * to some end format (such as INSTEAD game). * * @author Anton P. Kolosov * @version 1.0 8/9/12 */ public class MediaExportParameters { public enum Preset {CUSTOM, DEFAULT, NOCHANGE, COMPRESSED}; private static final MediaExportParameters NOCHANGE = new MediaExportParameters(Preset.NOCHANGE, false, 0); private static final MediaExportParameters COMPRESSED = new MediaExportParameters(Preset.COMPRESSED, true, 80); private static final MediaExportParameters DEFAULT = ( new MediaExportParameters( Preset.DEFAULT, PropertyManager.getSettings().getDefaultConfig().getExport().isConvertpng2jpg(), PropertyManager.getSettings().getDefaultConfig().getExport().getQuality() ) ); private Preset m_preset = Preset.CUSTOM; private boolean m_convertPNG2JPG; private int m_quality; public static MediaExportParameters fromPreset(Preset preset) { switch (preset) { case NOCHANGE: return MediaExportParameters.NOCHANGE; case COMPRESSED: return MediaExportParameters.COMPRESSED; default: return MediaExportParameters.DEFAULT; } } public static MediaExportParameters getDefault() { return DEFAULT; } /* public MediaExportParameters(boolean convertPNG2JPG, int quality) { m_preset = Preset.CUSTOM; m_convertPNG2JPG = convertPNG2JPG; m_quality = quality; } */ private MediaExportParameters(Preset preset, boolean convertPNG2JPG, int quality) { m_preset = preset; m_convertPNG2JPG = convertPNG2JPG; m_quality = quality; } public Preset getPreset() { return m_preset; } public boolean isConvertPNG2JPG() { return m_convertPNG2JPG; } public int getQuality() { return m_quality; } } ",0 " \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ * $Id$ * * Copyright (C) 2006 by Barry Wardell * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This software is distributed on an ""AS IS"" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ****************************************************************************/ #ifndef _ADC_TARGET_H_ #define _ADC_TARGET_H_ /* only two channels used by the Gigabeat */ #define NUM_ADC_CHANNELS 2 #define ADC_BATTERY 0 #define ADC_HPREMOTE 1 #define ADC_UNKNOWN_3 2 #define ADC_UNKNOWN_4 3 #define ADC_UNKNOWN_5 4 #define ADC_UNKNOWN_6 5 #define ADC_UNKNOWN_7 6 #define ADC_UNKNOWN_8 7 #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */ #define ADC_READ_ERROR 0xFFFF #endif ",0 " exit; // Exit if accessed directly // Unused woocommerce code // Load colours // $bg = get_option( 'woocommerce_email_background_color' ); // $body = get_option( 'woocommerce_email_body_background_color' ); // $base = get_option( 'woocommerce_email_base_color' ); // $base_text = woocommerce_light_or_dark( $base, '#202020', '#ffffff' ); // $text = get_option( 'woocommerce_email_text_color' ); // $bg_darker_10 = woocommerce_hex_darker( $bg, 10 ); // $base_lighter_20 = woocommerce_hex_lighter( $base, 20 ); // $text_lighter_20 = woocommerce_hex_lighter( $text, 20 ); ?> Guymark, Excellence in Audiology .*bghell tdborder\"">(.*)<\/a>.* */ if ($daten->ba_nr == 0) { echo ""BA-Initiative $antrag_id: "" . ""Keine BA-Angabe""; $GLOBALS[""RIS_PARSE_ERROR_LOG""][] = ""Keine BA-Angabe (Initiative): $antrag_id""; return; } $aenderungen = """"; /** @var Antrag $alter_eintrag */ $alter_eintrag = Antrag::model()->findByPk($antrag_id); $changed = true; if ($alter_eintrag) { $changed = false; if ($alter_eintrag->betreff != $daten->betreff) $aenderungen .= ""Betreff: "" . $alter_eintrag->betreff . "" => "" . $daten->betreff . ""\n""; if ($alter_eintrag->bearbeitungsfrist != $daten->bearbeitungsfrist) $aenderungen .= ""Bearbeitungsfrist: "" . $alter_eintrag->bearbeitungsfrist . "" => "" . $daten->bearbeitungsfrist . ""\n""; if ($alter_eintrag->status != $daten->status) $aenderungen .= ""Status: "" . $alter_eintrag->status . "" => "" . $daten->status . ""\n""; if ($alter_eintrag->fristverlaengerung != $daten->fristverlaengerung) $aenderungen .= ""Fristverlängerung: "" . $alter_eintrag->fristverlaengerung . "" => "" . $daten->fristverlaengerung . ""\n""; if ($alter_eintrag->initiative_to_aufgenommen != $daten->initiative_to_aufgenommen) $aenderungen .= ""In TO Aufgenommen: "" . $alter_eintrag->initiative_to_aufgenommen . "" => "" . $daten->initiative_to_aufgenommen . ""\n""; if ($aenderungen != """") $changed = true; if ($alter_eintrag->wahlperiode == """") $alter_eintrag->wahlperiode = ""?""; } if ($changed) { if ($aenderungen == """") $aenderungen = ""Neu angelegt\n""; echo ""BA-Initiative $antrag_id: Verändert: "" . $aenderungen . ""\n""; if ($alter_eintrag) { $alter_eintrag->copyToHistory(); $alter_eintrag->setAttributes($daten->getAttributes()); if (!$alter_eintrag->save()) { var_dump($alter_eintrag->getErrors()); die(""Fehler""); } $daten = $alter_eintrag; } else { if (!$daten->save()) { var_dump($daten->getErrors()); die(""Fehler""); } } $daten->resetPersonen(); } foreach ($dokumente as $dok) { $aenderungen .= Dokument::create_if_necessary(Dokument::$TYP_BA_INITIATIVE, $daten, $dok); } if ($aenderungen != """") { $aend = new RISAenderung(); $aend->ris_id = $daten->id; $aend->ba_nr = $daten->ba_nr; $aend->typ = RISAenderung::$TYP_BA_INITIATIVE; $aend->datum = new CDbExpression(""NOW()""); $aend->aenderungen = $aenderungen; $aend->save(); /** @var Antrag $antrag */ $antrag = Antrag::model()->findByPk($antrag_id); $antrag->datum_letzte_aenderung = new CDbExpression('NOW()'); // Auch bei neuen Dokumenten $antrag->save(); $antrag->rebuildVorgaenge(); } } public function parseSeite($seite, $first) { if (SITE_CALL_MODE != ""cron"") echo ""BA-Initiativen Seite $seite\n""; $text = RISTools::load_file(RIS_BA_BASE_URL . ""ba_initiativen.jsp?Trf=n&Start=$seite""); $txt = explode("""", $text); $txt = explode(""
"", $txt[1]); preg_match_all(""/ba_initiativen_details\.jsp\?Id=([0-9]+)[\""'& ]/siU"", $txt[0], $matches); if ($first && count($matches[1]) > 0) RISTools::report_ris_parser_error(""BA-Initiativen VOLL"", ""Erste Seite voll: $seite""); for ($i = count($matches[1]) - 1; $i >= 0; $i--) try { $this->parse($matches[1][$i]); } catch (Exception $e) { echo "" EXCEPTION! "" . $e . ""\n""; } return $matches[1]; } public function parseAlle() { $anz = static::$MAX_OFFSET; $first = true; for ($i = $anz; $i >= 0; $i -= 10) { if (SITE_CALL_MODE != ""cron"") echo ($anz - $i) . "" / $anz\n""; $this->parseSeite($i, $first); $first = false; } } public function parseUpdate() { echo ""Updates: BA-Initiativen\n""; $loaded_ids = []; $anz = static::$MAX_OFFSET_UPDATE; for ($i = $anz; $i >= 0; $i -= 10) { $ids = $this->parseSeite($i, false); $loaded_ids = array_merge($loaded_ids, array_map(""IntVal"", $ids)); } } public function parseQuickUpdate() { } } ",0 "enerated by javadoc (1.8.0_66) on Mon Apr 25 01:00:02 PDT 2016 --> Uses of Class ml.optimization.NonlinearConjugateGradient
  • Prev
  • Next

Uses of Class
ml.optimization.NonlinearConjugateGradient

No usage of ml.optimization.NonlinearConjugateGradient
  • Prev
  • Next
",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.commons.io.output; import java.io.IOException; import java.io.OutputStream; /** * Classic splitter of OutputStream. Named after the unix 'tee' * command. It allows a stream to be branched off so there * are now two streams. * */ public class TeeOutputStream extends ProxyOutputStream { /** the second OutputStream to write to */ protected OutputStream branch; //TODO consider making this private /** * Constructs a TeeOutputStream. * @param out the main OutputStream * @param branch the second OutputStream */ public TeeOutputStream(final OutputStream out, final OutputStream branch) { super(out); this.branch = branch; } /** * Write the bytes to both streams. * @param b the bytes to write * @throws IOException if an I/O error occurs */ @Override public synchronized void write(final byte[] b) throws IOException { super.write(b); this.branch.write(b); } /** * Write the specified bytes to both streams. * @param b the bytes to write * @param off The start offset * @param len The number of bytes to write * @throws IOException if an I/O error occurs */ @Override public synchronized void write(final byte[] b, final int off, final int len) throws IOException { super.write(b, off, len); this.branch.write(b, off, len); } /** * Write a byte to both streams. * @param b the byte to write * @throws IOException if an I/O error occurs */ @Override public synchronized void write(final int b) throws IOException { super.write(b); this.branch.write(b); } /** * Flushes both streams. * @throws IOException if an I/O error occurs */ @Override public void flush() throws IOException { super.flush(); this.branch.flush(); } /** * Closes both output streams. * * If closing the main output stream throws an exception, attempt to close the branch output stream. * * If closing the main and branch output streams both throw exceptions, which exceptions is thrown by this method is * currently unspecified and subject to change. * * @throws IOException * if an I/O error occurs */ @Override public void close() throws IOException { try { super.close(); } finally { this.branch.close(); } } } ",0 "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. ******************************************************************************/ package uk.ac.ebi.embl.api.validation.check.sourcefeature; import static org.junit.Assert.*; import java.util.Collection; import org.junit.After; import org.junit.Before; import org.junit.Test; import uk.ac.ebi.embl.api.entry.Entry; import uk.ac.ebi.embl.api.entry.EntryFactory; import uk.ac.ebi.embl.api.entry.feature.Feature; import uk.ac.ebi.embl.api.entry.feature.FeatureFactory; import uk.ac.ebi.embl.api.entry.qualifier.Qualifier; import uk.ac.ebi.embl.api.entry.sequence.Sequence; import uk.ac.ebi.embl.api.entry.sequence.SequenceFactory; import uk.ac.ebi.embl.api.storage.DataRow; import uk.ac.ebi.embl.api.validation.*; public class MoleculeTypeAndSourceQualifierCheckTest { private Entry entry; private Feature source; private MoleculeTypeAndSourceQualifierCheck check; @Before public void setUp() { ValidationMessageManager .addBundle(ValidationMessageManager.STANDARD_VALIDATION_BUNDLE); EntryFactory entryFactory = new EntryFactory(); SequenceFactory sequenceFactory = new SequenceFactory(); FeatureFactory featureFactory = new FeatureFactory(); entry = entryFactory.createEntry(); source = featureFactory.createSourceFeature(); entry.addFeature(source); Sequence sequence = sequenceFactory.createSequence(); entry.setSequence(sequence); DataRow dataRow = new DataRow( ""tissue_type,dev_stage,isolation_source,collection_date,host,lab_host,sex,mating_type,haplotype,cultivar,ecotype,variety,breed,isolate,strain,clone,country,lat_lon,specimen_voucher,culture_collection,biomaterial,PCR_primers"", ""mRNA""); GlobalDataSets.addTestDataSet(GlobalDataSetFile.MOLTYPE_SOURCE_QUALIFIERS, dataRow); DataRow dataRow1=new DataRow(""genomic DNA"",Qualifier.GERMLINE_QUALIFIER_NAME); GlobalDataSets.addTestDataSet(GlobalDataSetFile.SOURCE_QUALIFIERS_MOLTYPE_VALUES, dataRow1); check = new MoleculeTypeAndSourceQualifierCheck(); } @After public void tearDown() { GlobalDataSets.resetTestDataSets(); } @Test public void testCheck_NoEntry() { assertTrue(check.check(null).isValid()); } @Test public void testCheck_NoMoleculeType() { entry.getSequence().setMoleculeType(null); source.addQualifier(""organism"", ""Deltavirus""); assertTrue(check.check(entry).isValid()); } @Test public void testCheck_NoSequence() { entry.setSequence(null); source.addQualifier(""organism"", ""liver""); assertTrue(check.check(entry).isValid()); } @Test public void testCheck_noSourceQualifier() { entry.getSequence().setMoleculeType(""mRNA""); ValidationResult result = check.check(entry); assertEquals(2, result.count(""MoleculeTypeAndSourceQualifierCheck"", Severity.ERROR)); } @Test public void testCheck_NoSource() { entry.getSequence().setMoleculeType(""mRNA""); entry.removeFeature(source); ValidationResult result = check.check(entry); assertEquals(0, result.getMessages().size()); } @Test public void testCheck_noRequiredQualifier() { entry.getSequence().setMoleculeType(""mRNA""); source.addQualifier(""organism"", ""some organism""); ValidationResult result = check.check(entry); assertEquals(1, result.getMessages().size()); } @Test public void testCheck_requiredQualifier() { entry.getSequence().setMoleculeType(""mRNA""); source.addQualifier(""tissue_type"", ""liver""); ValidationResult result = check.check(entry); assertEquals(0, result.getMessages().size()); } @Test public void testCheck_Message() { entry.getSequence().setMoleculeType(""mRNA""); ValidationResult result = check.check(entry); Collection> messages = result.getMessages( ""MoleculeTypeAndSourceQualifierCheck"", Severity.ERROR); assertEquals( ""At least one of the Qualifiers \""tissue_type, dev_stage, isolation_source, collection_date, host, lab_host, sex, mating_type, haplotype, cultivar, ecotype, variety, breed, isolate, strain, clone, country, lat_lon, specimen_voucher, culture_collection, biomaterial, PCR_primers\"" must exist in Source feature if Molecule Type matches the Value \""mRNA\""."", messages.iterator().next().getMessage()); } @Test public void testCheck_invalidMolTypeValue() { entry.getSequence().setMoleculeType(""mRNA""); source.addQualifier(Qualifier.GERMLINE_QUALIFIER_NAME); entry.addFeature(source); ValidationResult result = check.check(entry); assertEquals(1,result.getMessages(""MoleculeTypeAndSourceQualifierCheck_1"", Severity.ERROR).size()); } @Test public void testCheck_validMolTypeValue() { entry.getSequence().setMoleculeType(""genomic DNA""); source.addQualifier(Qualifier.GERMLINE_QUALIFIER_NAME); entry.addFeature(source); ValidationResult result = check.check(entry); assertEquals(0,result.getMessages(""MoleculeTypeAndSourceQualifierCheck_1"", Severity.ERROR).size()); } } ",0 "m> * @version 2.5.00 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 */ class LTI_Tool_Consumer { /** * @var string Local name of tool consumer. */ public $name = NULL; /** * @var string Shared secret. */ public $secret = NULL; /** * @var string LTI version (as reported by last tool consumer connection). */ public $lti_version = NULL; /** * @var string Name of tool consumer (as reported by last tool consumer connection). */ public $consumer_name = NULL; /** * @var string Tool consumer version (as reported by last tool consumer connection). */ public $consumer_version = NULL; /** * @var string Tool consumer GUID (as reported by first tool consumer connection). */ public $consumer_guid = NULL; /** * @var string Optional CSS path (as reported by last tool consumer connection). */ public $css_path = NULL; /** * @var boolean Whether the tool consumer instance is protected by matching the consumer_guid value in incoming requests. */ public $protected = FALSE; /** * @var boolean Whether the tool consumer instance is enabled to accept incoming connection requests. */ public $enabled = FALSE; /** * @var object Date/time from which the the tool consumer instance is enabled to accept incoming connection requests. */ public $enable_from = NULL; /** * @var object Date/time until which the tool consumer instance is enabled to accept incoming connection requests. */ public $enable_until = NULL; /** * @var object Date of last connection from this tool consumer. */ public $last_access = NULL; /** * @var int Default scope to use when generating an Id value for a user. */ public $id_scope = LTI_Tool_Provider::ID_SCOPE_ID_ONLY; /** * @var string Default email address (or email domain) to use when no email address is provided for a user. */ public $defaultEmail = ''; /** * @var object Date/time when the object was created. */ public $created = NULL; /** * @var object Date/time when the object was last updated. */ public $updated = NULL; /** * @var string Consumer key value. */ private $key = NULL; /** * @var mixed Data connector object or string. */ private $data_connector = NULL; /** * Class constructor. * * @param string $key Consumer key * @param mixed $data_connector String containing table name prefix, or database connection object, or array containing one or both values (optional, default is MySQL with an empty table name prefix) * @param boolean $autoEnable true if the tool consumers is to be enabled automatically (optional, default is false) */ public function __construct($key = NULL, $data_connector = '', $autoEnable = FALSE) { $this->data_connector = LTI_Data_Connector::getDataConnector($data_connector); if (!empty($key)) { $this->load($key, $autoEnable); } else { $this->secret = LTI_Data_Connector::getRandomString(32); } } /** * Initialise the tool consumer. */ public function initialise() { $this->key = NULL; $this->name = NULL; $this->secret = NULL; $this->lti_version = NULL; $this->consumer_name = NULL; $this->consumer_version = NULL; $this->consumer_guid = NULL; $this->css_path = NULL; $this->protected = FALSE; $this->enabled = FALSE; $this->enable_from = NULL; $this->enable_until = NULL; $this->last_access = NULL; $this->id_scope = LTI_Tool_Provider::ID_SCOPE_ID_ONLY; $this->defaultEmail = ''; $this->created = NULL; $this->updated = NULL; } /** * Save the tool consumer to the database. * * @return boolean True if the object was successfully saved */ public function save() { return $this->data_connector->Tool_Consumer_save($this); } /** * Delete the tool consumer from the database. * * @return boolean True if the object was successfully deleted */ public function delete() { return $this->data_connector->Tool_Consumer_delete($this); } /** * Get the tool consumer key. * * @return string Consumer key value */ public function getKey() { return $this->key; } /** * Get the data connector. * * @return mixed Data connector object or string */ public function getDataConnector() { return $this->data_connector; } /** * Is the consumer key available to accept launch requests? * * @return boolean True if the consumer key is enabled and within any date constraints */ public function getIsAvailable() { $ok = $this->enabled; $now = time(); if ($ok && !is_null($this->enable_from)) { $ok = $this->enable_from <= $now; } if ($ok && !is_null($this->enable_until)) { $ok = $this->enable_until > $now; } return $ok; } /** * Add the OAuth signature to an LTI message. * * @param string $url URL for message request * @param string $type LTI message type * @param string $version LTI version * @param array $params Message parameters * * @return array Array of signed message parameters */ public function signParameters($url, $type, $version, $params) { if (!empty($url)) { // Check for query parameters which need to be included in the signature $query_params = array(); $query_string = parse_url($url, PHP_URL_QUERY); if (!is_null($query_string)) { $query_items = explode('&', $query_string); foreach ($query_items as $item) { if (strpos($item, '=') !== FALSE) { list($name, $value) = explode('=', $item); $query_params[urldecode($name)] = urldecode($value); } else { $query_params[urldecode($item)] = ''; } } } $params = $params + $query_params; // Add standard parameters $params['lti_version'] = $version; $params['lti_message_type'] = $type; $params['oauth_callback'] = 'about:blank'; // Add OAuth signature $hmac_method = new OAuthSignatureMethod_HMAC_SHA1(); $consumer = new OAuthConsumer($this->getKey(), $this->secret, NULL); $req = OAuthRequest::from_consumer_and_token($consumer, NULL, 'POST', $url, $params); $req->sign_request($hmac_method, $consumer, NULL); $params = $req->get_parameters(); // Remove parameters being passed on the query string foreach (array_keys($query_params) as $name) { unset($params[$name]); } } return $params; } ### ### PRIVATE METHOD ### /** * Load the tool consumer from the database. * * @param string $key The consumer key value * @param boolean $autoEnable True if the consumer should be enabled (optional, default if false) * * @return boolean True if the consumer was successfully loaded */ private function load($key, $autoEnable = FALSE) { $this->initialise(); $this->key = $key; $ok = $this->data_connector->Tool_Consumer_load($this); if (!$ok) { $this->enabled = $autoEnable; } return $ok; } }",0 "ccount on 5/31/15. */ public class Quest { //TODO QUEST public static int nextId; public final ItemStack target; public final ItemStack result; public final int id; public String string; public Quest(String string, ItemStack target, ItemStack result) { this.target = target; this.result = result; this.string = string; this.id = nextId; nextId++; } public boolean hasCompleted(EntityPlayer player) { // QuestData questData = (QuestData) player.getExtendedProperties(QuestData.EXT_PROP_NAME); // return questData.completedQuests.contains(this); return false; } public void complete(EntityPlayer player) { //QuestData questData = (QuestData) player.getExtendedProperties(QuestData.EXT_PROP_NAME); // questData.completedQuests.add(this); // AuraCascade.analytics.eventDesign(""questComplete"", id); } } ",0 " #pragma once #include ""..\khalin03\Button.h"" #include #include ""..\khalin01\Printable.h"" #include /** * @brief It's just a printable version of Button class. * * Instances of this class are able to be printed into file and be represented in the string. * @author Khalin Yevhen */ class PrintableButton : public Button, public MStorageInterface, public Printable { public: PrintableButton(ButtonForm form); PrintableButton(); virtual ~PrintableButton(); // inherited method virtual std::string toString(); // inherited method virtual void OnStore(std::ostream& aStream); // inherited method virtual void OnLoad(std::istream& aStream); }; typedef PrintableButton PButton;",0 " public class InfoBean { public int info_id; public int user_id; public String bookname; public String price; //public String time; public String address; public int concern_num; public int accusation_num; public String generate_time; public InfoBean() { } public String getRealAddress() { try { JSONObject jsonObject = new JSONObject(address); return jsonObject.getString(""address1""); } catch (JSONException e) { Log.d(""InfoBean"", e.toString()); } return """"; // {""contact"":""ÁªÏµÈË"",""address"":""¼ªÁÖÊ¡³¤´ºÊÐÊÐÏ½ÇøÏêϸµØÖ·"",""phone"":""18940997430""} } public static Comparator Comparator = new Comparator() { public int compare(InfoBean s1, InfoBean s2) { return s2.info_id - s1.info_id; } }; } ",0 "Exception\RuntimeException; /** * @internal This class has been auto-generated by the Symfony Dependency Injection Component. */ class getForm_TypeExtension_Form_ValidatorService extends App_KernelDevDebugContainer { /** * Gets the private 'form.type_extension.form.validator' shared service. * * @return \Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension */ public static function do($container, $lazyLoad = true) { include_once \dirname(__DIR__, 4).'/vendor/symfony/form/FormTypeExtensionInterface.php'; include_once \dirname(__DIR__, 4).'/vendor/symfony/form/AbstractTypeExtension.php'; include_once \dirname(__DIR__, 4).'/vendor/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php'; include_once \dirname(__DIR__, 4).'/vendor/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php'; return $container->privates['form.type_extension.form.validator'] = new \Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension(($container->services['validator'] ?? $container->getValidatorService())); } } ",0 " * * Theme's Function * */ /* * Set default $content_width */ if ( ! isset( $content_width ) ) $content_width = 590; /* Adjust $content_width depending on the page being displayed */ function boldr_content_width() { global $content_width; if ( is_singular() && !is_page() ) $content_width = 595; if ( is_page() ) $content_width = 680; if ( is_page_template( 'page-full-width.php' ) ) $content_width = 920; } add_action( 'template_redirect', 'boldr_content_width' ); /* * Setup and registration functions */ function boldr_setup(){ /* Translation support * Translations can be added to the /languages directory. * A .pot template file is included to get you started */ load_theme_textdomain('boldr', get_template_directory() . '/languages'); /* Feed links support */ add_theme_support( 'automatic-feed-links' ); /* Register menus */ register_nav_menu( 'primary', 'Navigation menu' ); register_nav_menu( 'footer-menu', 'Footer menu' ); /* Post Thumbnails Support */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 260, 260, true ); /* Custom header support */ add_theme_support( 'custom-header', array( 'header-text' => false, 'width' => 920, 'height' => 370, 'flex-height' => true, ) ); /* Custom background support */ add_theme_support( 'custom-background', array( 'default-color' => '333333', 'default-image' => get_template_directory_uri() . '/img/black-leather.png', ) ); } add_action('after_setup_theme', 'boldr_setup'); /* * Page title */ function boldr_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = ""$title $sep $site_description""; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = ""$title $sep "" . sprintf( __( 'Page %s', 'boldr' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'boldr_wp_title', 10, 2 ); /* * Add a home link to wp_page_menu() ( wp_nav_menu() fallback ) */ function boldr_page_menu_args( $args ) { if ( ! isset( $args['show_home'] ) ) $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'boldr_page_menu_args' ); /* * Add parent Class to parent menu items */ function boldr_add_menu_parent_class( $items ) { $parents = array(); foreach ( $items as $item ) { if ( $item->menu_item_parent && $item->menu_item_parent > 0 ) { $parents[] = $item->menu_item_parent; } } foreach ( $items as $item ) { if ( in_array( $item->ID, $parents ) ) { $item->classes[] = 'menu-parent-item'; } } return $items; } add_filter( 'wp_nav_menu_objects', 'boldr_add_menu_parent_class' ); /* * The automatically generated fallback menu is not responsive. * Add an admin notice to warn users who did not set a primary menu * and make this notice dismissable so it is less intrusive. */ function boldr_admin_notice(){ global $current_user; $user_id = $current_user->ID; /* Display notice if primary menu is not set and user did not dismiss the notice */ if ( !has_nav_menu( 'primary' ) && !get_user_meta($user_id, 'boldr_ignore_notice' ) ): echo '

BoldR Lite Notice: you have not set your primary menu yet, and your site is currently using a fallback menu which is not responsive. Please take a minute to set your menu now!'; printf(__('Dismiss'), '?boldr_notice_ignore=0'); echo '

'; endif; } add_action('admin_notices', 'boldr_admin_notice'); function boldr_notice_ignore() { global $current_user; $user_id = $current_user->ID; /* If user clicks to ignore the notice, add that to their user meta */ if ( isset($_GET['boldr_notice_ignore']) && '0' == $_GET['boldr_notice_ignore'] ): add_user_meta($user_id, 'boldr_ignore_notice', true, true); endif; } add_action('admin_init', 'boldr_notice_ignore'); /* * Register Sidebar and Footer widgetized areas */ function boldr_widgets_init() { register_sidebar( array( 'name' => __( 'Default Sidebar', 'boldr' ), 'id' => 'sidebar', 'description' => '', 'class' => '', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); register_sidebar( array( 'name' => __( 'Footer', 'boldr' ), 'id' => 'footer-sidebar', 'description' => '', 'class' => '', 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } add_action( 'widgets_init', 'boldr_widgets_init' ); /* * Enqueue CSS styles */ function boldr_styles() { $template_directory_uri = get_template_directory_uri(); // Parent theme URI $stylesheet_directory = get_stylesheet_directory(); // Current theme directory $stylesheet_directory_uri = get_stylesheet_directory_uri(); // Current theme URI $responsive_mode = boldr_get_option('responsive_mode'); if ($responsive_mode != 'off'): $stylesheet = '/css/boldr.min.css'; else: $stylesheet = '/css/boldr-unresponsive.min.css'; endif; /* Child theme support: * Enqueue child-theme's versions of stylesheet in /css if they exist, * or the parent theme's version otherwise */ if ( @file_exists( $stylesheet_directory . $stylesheet ) ) wp_register_style( 'boldr', $stylesheet_directory_uri . $stylesheet ); else wp_register_style( 'boldr', $template_directory_uri . $stylesheet ); // Always enqueue style.css from the current theme wp_register_style( 'style', $stylesheet_directory_uri . '/style.css'); wp_enqueue_style( 'boldr' ); wp_enqueue_style( 'style' ); // Google Webfonts wp_enqueue_style( 'Oswald-webfonts', ""//fonts.googleapis.com/css?family=Oswald:400italic,700italic,400,700&subset=latin,latin-ext"", array(), null ); wp_enqueue_style( 'PTSans-webfonts', ""//fonts.googleapis.com/css?family=PT+Sans:400italic,700italic,400,700&subset=latin,latin-ext"", array(), null ); } add_action('wp_enqueue_scripts', 'boldr_styles'); /* * Register editor style */ function boldr_editor_styles() { add_editor_style(); } add_action( 'init', 'boldr_editor_styles' ); /* * Enqueue Javascripts */ function boldr_scripts() { wp_enqueue_script('boldr', get_template_directory_uri() . '/js/boldr.min.js', array('jquery')); /* Threaded comments support */ if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action('wp_enqueue_scripts', 'boldr_scripts'); /* * Remove ""rel"" tags in category links (HTML5 invalid) */ function boldr_remove_rel_cat( $text ) { $text = str_replace(' rel=""category""', """", $text); return $text; } add_filter( 'the_category', 'boldr_remove_rel_cat' ); /* * Fix for a known issue with enclosing shortcodes and wpautop * (wpautop tends to add empty

    or
    tags before and/or after enclosing shortcodes) * Thanks to Johann Heyne */ function boldr_shortcode_empty_paragraph_fix($content) { $array = array ( '

    [' => '[', ']

    ' => ']', ']
    ' => ']', ); $content = strtr($content, $array); return $content; } add_filter('the_content', 'boldr_shortcode_empty_paragraph_fix'); /* * Improved version of clean_pre * Based on a work by Emrah Gunduz */ function boldr_protect_pre($pee) { $pee = preg_replace_callback('!(]*>)(.*?)!is', 'boldr_eg_clean_pre', $pee ); return $pee; } function boldr_eg_clean_pre($matches) { if ( is_array($matches) ) $text = $matches[1] . $matches[2] . """"; else $text = $matches; $text = str_replace('
    ', '', $text); return $text; } add_filter( 'the_content', 'boldr_protect_pre' ); /* * Customize ""read more"" links on index view */ function boldr_excerpt_more( $more ) { global $post; return ''; } add_filter( 'excerpt_more', 'boldr_excerpt_more' ); /* * Rewrite and replace wp_trim_excerpt() so it adds a relevant read more link * when the or quicktags are used * This new function preserves every features and filters from the original wp_trim_excerpt */ function boldr_trim_excerpt($text = '') { global $post; $raw_excerpt = $text; if ( '' == $text ) { $text = get_the_content(''); $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $text = wp_trim_words( $text, $excerpt_length, $excerpt_more ); /* If the post_content contains a OR a quicktag * AND the more link has not been added already * then we add it now */ if ( ( preg_match('//', $post->post_content ) || preg_match('//', $post->post_content ) ) && strpos($text,$excerpt_more) === false ) { $text .= $excerpt_more; } } return apply_filters('boldr_trim_excerpt', $text, $raw_excerpt); } remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' ); add_filter( 'get_the_excerpt', 'boldr_trim_excerpt' ); /* * Create dropdown menu (used in responsive mode) * Requires a custom menu to be set (won't work with fallback menu) */ function boldr_dropdown_nav_menu () { $menu_name = 'primary'; if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) { if ($menu = wp_get_nav_menu_object( $locations[ $menu_name ] ) ) { $menu_items = wp_get_nav_menu_items($menu->term_id); $menu_list = ''; // $menu_list now ready to output echo $menu_list; } } } /* * Find whether post page needs comments pagination links (used in comments.php) */ function boldr_page_has_comments_nav() { global $wp_query; return ($wp_query->max_num_comment_pages > 1); } function boldr_page_has_next_comments_link() { global $wp_query; $max_cpage = $wp_query->max_num_comment_pages; $cpage = get_query_var( 'cpage' ); return ( $max_cpage > $cpage ); } function boldr_page_has_previous_comments_link() { $cpage = get_query_var( 'cpage' ); return ($cpage > 1); } /* * Find whether attachement page needs navigation links (used in single.php) */ function boldr_adjacent_image_link($prev = true) { global $post; $post = get_post($post); $attachments = array_values(get_children(""post_parent=$post->post_parent&post_type=attachment&post_mime_type=image&orderby=\""menu_order ASC, ID ASC\"""")); foreach ( $attachments as $k => $attachment ) if ( $attachment->ID == $post->ID ) break; $k = $prev ? $k - 1 : $k + 1; if ( isset($attachments[$k]) ) return true; else return false; } /* * Framework Elements */ include_once('functions/icefit-options/settings.php'); // Admin Settings Panel ?>",0 "java.util.Map; import javax.script.Invocable; import javax.script.ScriptException; import sagex.phoenix.util.PhoenixScriptEngine; public class JSMethodInvocationHandler implements InvocationHandler { private PhoenixScriptEngine eng; private Map methodMap = new HashMap(); public JSMethodInvocationHandler(PhoenixScriptEngine eng, String interfaceMethod, String jsMethod) { this.eng = eng; methodMap.put(interfaceMethod, jsMethod); } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (Object.class == method.getDeclaringClass()) { String name = method.getName(); if (""equals"".equals(name)) { return proxy == args[0]; } else if (""hashCode"".equals(name)) { return System.identityHashCode(proxy); } else if (""toString"".equals(name)) { return proxy.getClass().getName() + ""@"" + Integer.toHexString(System.identityHashCode(proxy)) + "", with InvocationHandler "" + this; } else { throw new IllegalStateException(String.valueOf(method)); } } String jsMethod = methodMap.get(method.getName()); if (jsMethod == null) { throw new NoSuchMethodException(""No Javascript Method for "" + method.getName()); } Invocable inv = (Invocable) eng.getEngine(); try { return inv.invokeFunction(jsMethod, args); } catch (NoSuchMethodException e) { throw new NoSuchMethodException(""The Java Method: "" + method.getName() + "" maps to a Javascript Method "" + jsMethod + "" that does not exist.""); } catch (ScriptException e) { throw e; } } } ",0 "ogram is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 2.1 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. * * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * . * #L% */ import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; import soot.AnySubType; import soot.ArrayType; import soot.FastHierarchy; import soot.G; import soot.NullType; import soot.PhaseOptions; import soot.RefType; import soot.Scene; import soot.Singletons; import soot.SootClass; import soot.SootMethod; import soot.Type; import soot.jimple.SpecialInvokeExpr; import soot.options.CGOptions; import soot.toolkits.scalar.Pair; import soot.util.Chain; import soot.util.HashMultiMap; import soot.util.LargeNumberedMap; import soot.util.MultiMap; import soot.util.NumberedString; import soot.util.SmallNumberedMap; import soot.util.queue.ChunkedQueue; /** * Resolves virtual calls. * * @author Ondrej Lhotak */ public class VirtualCalls { private CGOptions options = new CGOptions(PhaseOptions.v().getPhaseOptions(""cg"")); public VirtualCalls(Singletons.Global g) { } public static VirtualCalls v() { return G.v().soot_jimple_toolkits_callgraph_VirtualCalls(); } private final LargeNumberedMap> typeToVtbl = new LargeNumberedMap>(Scene.v().getTypeNumberer()); public SootMethod resolveSpecial(SpecialInvokeExpr iie, NumberedString subSig, SootMethod container) { return resolveSpecial(iie, subSig, container, false); } public SootMethod resolveSpecial(SpecialInvokeExpr iie, NumberedString subSig, SootMethod container, boolean appOnly) { SootMethod target = iie.getMethod(); /* cf. JVM spec, invokespecial instruction */ if (Scene.v().getOrMakeFastHierarchy().canStoreType(container.getDeclaringClass().getType(), target.getDeclaringClass().getType()) && container.getDeclaringClass().getType() != target.getDeclaringClass().getType() && !target.getName().equals("""") && subSig != sigClinit) { return resolveNonSpecial(container.getDeclaringClass().getSuperclass().getType(), subSig, appOnly); } else { return target; } } public SootMethod resolveNonSpecial(RefType t, NumberedString subSig) { return resolveNonSpecial(t, subSig, false); } public SootMethod resolveNonSpecial(RefType t, NumberedString subSig, boolean appOnly) { SmallNumberedMap vtbl = typeToVtbl.get(t); if (vtbl == null) { typeToVtbl.put(t, vtbl = new SmallNumberedMap()); } SootMethod ret = vtbl.get(subSig); if (ret != null) { return ret; } SootClass cls = t.getSootClass(); if (appOnly && cls.isLibraryClass()) { return null; } SootMethod m = cls.getMethodUnsafe(subSig); if (m != null) { if (!m.isAbstract()) { ret = m; } } else { SootClass c = cls.getSuperclassUnsafe(); if (c != null) { ret = resolveNonSpecial(c.getType(), subSig); } } vtbl.put(subSig, ret); return ret; } protected MultiMap baseToSubTypes = new HashMultiMap(); protected MultiMap, Pair> baseToPossibleSubTypes = new HashMultiMap, Pair>(); public void resolve(Type t, Type declaredType, NumberedString subSig, SootMethod container, ChunkedQueue targets) { resolve(t, declaredType, null, subSig, container, targets); } public void resolve(Type t, Type declaredType, NumberedString subSig, SootMethod container, ChunkedQueue targets, boolean appOnly) { resolve(t, declaredType, null, subSig, container, targets, appOnly); } public void resolve(Type t, Type declaredType, Type sigType, NumberedString subSig, SootMethod container, ChunkedQueue targets) { resolve(t, declaredType, sigType, subSig, container, targets, false); } public void resolve(Type t, Type declaredType, Type sigType, NumberedString subSig, SootMethod container, ChunkedQueue targets, boolean appOnly) { if (declaredType instanceof ArrayType) { declaredType = RefType.v(""java.lang.Object""); } if (sigType instanceof ArrayType) { sigType = RefType.v(""java.lang.Object""); } if (t instanceof ArrayType) { t = RefType.v(""java.lang.Object""); } FastHierarchy fastHierachy = Scene.v().getOrMakeFastHierarchy(); if (declaredType != null && !fastHierachy.canStoreType(t, declaredType)) { return; } if (sigType != null && !fastHierachy.canStoreType(t, sigType)) { return; } if (t instanceof RefType) { SootMethod target = resolveNonSpecial((RefType) t, subSig, appOnly); if (target != null) { targets.add(target); } } else if (t instanceof AnySubType) { RefType base = ((AnySubType) t).getBase(); /* * Whenever any sub type of a specific type is considered as receiver for a method to call and the base type is an * interface, calls to existing methods with matching signature (possible implementation of method to call) are also * added. As Javas' subtyping allows contra-variance for return types and co-variance for parameters when overriding a * method, these cases are also considered here. * * Example: Classes A, B (B sub type of A), interface I with method public A foo(B b); and a class C with method public * B foo(A a) { ... }. The extended class hierarchy will contain C as possible implementation of I. * * Since Java has no multiple inheritance call by signature resolution is only activated if the base is an interface. */ if (options.library() == CGOptions.library_signature_resolution && base.getSootClass().isInterface()) { resolveLibrarySignature(declaredType, sigType, subSig, container, targets, appOnly, base); } else { resolveAnySubType(declaredType, sigType, subSig, container, targets, appOnly, base); } } else if (t instanceof NullType) { } else { throw new RuntimeException(""oops "" + t); } } public void resolveSuperType(Type t, Type declaredType, NumberedString subSig, ChunkedQueue targets, boolean appOnly) { if (declaredType == null) { return; } if (t == null) { return; } if (declaredType instanceof ArrayType) { declaredType = RefType.v(""java.lang.Object""); } if (t instanceof ArrayType) { t = RefType.v(""java.lang.Object""); } if (declaredType instanceof RefType) { RefType parent = (RefType)declaredType; SootClass parentClass = parent.getSootClass(); RefType child; SootClass childClass; if (t instanceof AnySubType) { child = ((AnySubType) t).getBase(); } else if (t instanceof RefType) { child = (RefType)t; } else { return; } childClass = child.getSootClass(); FastHierarchy fastHierachy = Scene.v().getOrMakeFastHierarchy(); if (fastHierachy.canStoreClass(childClass,parentClass)) { SootMethod target = resolveNonSpecial(child, subSig, appOnly); if (target != null) { targets.add(target); } } } } protected void resolveAnySubType(Type declaredType, Type sigType, NumberedString subSig, SootMethod container, ChunkedQueue targets, boolean appOnly, RefType base) { FastHierarchy fastHierachy = Scene.v().getOrMakeFastHierarchy(); { Set subTypes = baseToSubTypes.get(base); if (subTypes != null && !subTypes.isEmpty()) { for (final Type st : subTypes) { resolve(st, declaredType, sigType, subSig, container, targets, appOnly); } return; } } Set newSubTypes = new HashSet<>(); newSubTypes.add(base); LinkedList worklist = new LinkedList(); HashSet workset = new HashSet(); FastHierarchy fh = fastHierachy; SootClass cl = base.getSootClass(); if (workset.add(cl)) { worklist.add(cl); } while (!worklist.isEmpty()) { cl = worklist.removeFirst(); if (cl.isInterface()) { for (Iterator cIt = fh.getAllImplementersOfInterface(cl).iterator(); cIt.hasNext();) { final SootClass c = cIt.next(); if (workset.add(c)) { worklist.add(c); } } } else { if (cl.isConcrete()) { resolve(cl.getType(), declaredType, sigType, subSig, container, targets, appOnly); newSubTypes.add(cl.getType()); } for (Iterator cIt = fh.getSubclassesOf(cl).iterator(); cIt.hasNext();) { final SootClass c = cIt.next(); if (workset.add(c)) { worklist.add(c); } } } } baseToSubTypes.putAll(base, newSubTypes); } protected void resolveLibrarySignature(Type declaredType, Type sigType, NumberedString subSig, SootMethod container, ChunkedQueue targets, boolean appOnly, RefType base) { FastHierarchy fastHierachy = Scene.v().getOrMakeFastHierarchy(); assert (declaredType instanceof RefType); Pair pair = new Pair(base, subSig); { Set> types = baseToPossibleSubTypes.get(pair); // if this type and method has been resolved earlier we can // just retrieve the previous result. if (types != null) { for (Pair tuple : types) { Type st = tuple.getO1(); if (!fastHierachy.canStoreType(st, declaredType)) { resolve(st, st, sigType, subSig, container, targets, appOnly); } else { resolve(st, declaredType, sigType, subSig, container, targets, appOnly); } } return; } } Set> types = new HashSet>(); // get return type; method name; parameter types String[] split = subSig.getString().replaceAll(""(.*) (.*)\\((.*)\\)"", ""$1;$2;$3"").split("";""); Type declaredReturnType = Scene.v().getType(split[0]); String declaredName = split[1]; List declaredParamTypes = new ArrayList(); // separate the parameter types if (split.length == 3) { for (String type : split[2].split("","")) { declaredParamTypes.add(Scene.v().getType(type)); } } Chain classes = Scene.v().getClasses(); for (SootClass sc : classes) { for (SootMethod sm : sc.getMethods()) { if (!sm.isAbstract()) { // method name has to match if (!sm.getName().equals(declaredName)) { continue; } // the return type has to be a the declared return // type or a sub type of it if (!fastHierachy.canStoreType(sm.getReturnType(), declaredReturnType)) { continue; } List paramTypes = sm.getParameterTypes(); // method parameters have to match to the declared // ones (same type or super type). if (declaredParamTypes.size() != paramTypes.size()) { continue; } boolean check = true; for (int i = 0; i < paramTypes.size(); i++) { if (!fastHierachy.canStoreType(declaredParamTypes.get(i), paramTypes.get(i))) { check = false; break; } } if (check) { Type st = sc.getType(); if (!fastHierachy.canStoreType(st, declaredType)) { // final classes can not be extended and // therefore not used in library client if (!sc.isFinal()) { NumberedString newSubSig = sm.getNumberedSubSignature(); resolve(st, st, sigType, newSubSig, container, targets, appOnly); types.add(new Pair(st, newSubSig)); } } else { resolve(st, declaredType, sigType, subSig, container, targets, appOnly); types.add(new Pair(st, subSig)); } } } } } baseToPossibleSubTypes.putAll(pair, types); } public final NumberedString sigClinit = Scene.v().getSubSigNumberer().findOrAdd(""void ()""); public final NumberedString sigStart = Scene.v().getSubSigNumberer().findOrAdd(""void start()""); public final NumberedString sigRun = Scene.v().getSubSigNumberer().findOrAdd(""void run()""); } ",0 "th, initial-scale=1""> ",0 "his work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.cxf.microprofile.client.cdi; import java.lang.reflect.Method; import java.security.AccessController; import java.security.PrivilegedExceptionAction; import java.util.concurrent.Callable; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.cxf.common.logging.LogUtils; import com.ibm.websphere.ras.annotation.Trivial; public interface CDIInterceptorWrapper { Logger LOG = LogUtils.getL7dLogger(CDIInterceptorWrapper.class); class BasicCDIInterceptorWrapper implements CDIInterceptorWrapper { BasicCDIInterceptorWrapper() { } @Trivial //Liberty change @Override public Object invoke(Object restClient, Method m, Object[] params, Callable callable) throws Exception { return callable.call(); } } static CDIInterceptorWrapper createWrapper(Class restClient) { try { return AccessController.doPrivileged((PrivilegedExceptionAction) () -> { Object beanManager = CDIFacade.getBeanManager().orElseThrow(() -> new Exception(""CDI not available"")); return new CDIInterceptorWrapperImpl(restClient, beanManager); }); //} catch (PrivilegedActionException pae) { } catch (Exception pae) { //Liberty change // expected for environments where CDI is not supported if (LOG.isLoggable(Level.FINEST)) { LOG.log(Level.FINEST, ""Unable to load CDI SPI classes, assuming no CDI is available"", pae); } return new BasicCDIInterceptorWrapper(); } } Object invoke(Object restClient, Method m, Object[] params, Callable callable) throws Exception; } ",0 " * Copyright (c) 2013-2014 Chukong Technologies Inc. * * Heavy based on: https://github.com/funkaster/FakeWebGL/blob/master/FakeWebGL/WebGL/XMLHTTPRequest.h * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef __FAKE_XMLHTTPREQUEST_H__ #define __FAKE_XMLHTTPREQUEST_H__ #include ""jsapi.h"" #include ""jsfriendapi.h"" #include ""network/HttpClient.h"" #include ""js_bindings_config.h"" #include ""ScriptingCore.h"" #include ""jsb_helper.h"" class MinXmlHttpRequest : public cocos2d::Ref { public: enum class ResponseType { STRING, ARRAY_BUFFER, BLOB, DOCUMENT, JSON }; // Ready States (http://www.w3.org/TR/XMLHttpRequest/#interface-xmlhttprequest) static const unsigned short UNSENT = 0; static const unsigned short OPENED = 1; static const unsigned short HEADERS_RECEIVED = 2; static const unsigned short LOADING = 3; static const unsigned short DONE = 4; MinXmlHttpRequest(); ~MinXmlHttpRequest(); JS_BINDED_CLASS_GLUE(MinXmlHttpRequest); JS_BINDED_CONSTRUCTOR(MinXmlHttpRequest); JS_BINDED_PROP_ACCESSOR(MinXmlHttpRequest, onreadystatechange); JS_BINDED_PROP_ACCESSOR(MinXmlHttpRequest, responseType); JS_BINDED_PROP_ACCESSOR(MinXmlHttpRequest, withCredentials); JS_BINDED_PROP_ACCESSOR(MinXmlHttpRequest, upload); JS_BINDED_PROP_ACCESSOR(MinXmlHttpRequest, timeout); JS_BINDED_PROP_GET(MinXmlHttpRequest, readyState); JS_BINDED_PROP_GET(MinXmlHttpRequest, status); JS_BINDED_PROP_GET(MinXmlHttpRequest, statusText); JS_BINDED_PROP_GET(MinXmlHttpRequest, responseText); JS_BINDED_PROP_GET(MinXmlHttpRequest, response); JS_BINDED_PROP_GET(MinXmlHttpRequest, responseXML); JS_BINDED_FUNC(MinXmlHttpRequest, open); JS_BINDED_FUNC(MinXmlHttpRequest, send); JS_BINDED_FUNC(MinXmlHttpRequest, abort); JS_BINDED_FUNC(MinXmlHttpRequest, getAllResponseHeaders); JS_BINDED_FUNC(MinXmlHttpRequest, getResponseHeader); JS_BINDED_FUNC(MinXmlHttpRequest, setRequestHeader); JS_BINDED_FUNC(MinXmlHttpRequest, overrideMimeType); void handle_requestResponse(cocos2d::network::HttpClient *sender, cocos2d::network::HttpResponse *response); private: void _gotHeader(std::string header); void _setRequestHeader(const char* field, const char* value); void _setHttpRequestHeader(); void _sendRequest(JSContext *cx); std::string _url; JSContext* _cx; std::string _meth; std::string _type; char* _data; uint32_t _dataSize; JSObject* _onreadystateCallback; int _readyState; int _status; std::string _statusText; ResponseType _responseType; unsigned _timeout; bool _isAsync; cocos2d::network::HttpRequest* _httpRequest; bool _isNetwork; bool _withCredentialsValue; bool _errorFlag; std::unordered_map _httpHeader; std::unordered_map _requestHeader; }; #endif ",0 "y Library ** ** Risk Quantify is free software; you can redistribute it and/or ** modify it under the terms of the GNU Library General Public ** License as published by the Free Software Foundation; either ** version 2 of the License, or (at your option) any later version. ** ** Risk Quantify is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** Library General Public License for more details. ** ** You should have received a copy of the GNU Library General Public ** License along with Risk Quantify; if not, write to the Free ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef rq_xml_util_h #define rq_xml_util_h #ifdef __cplusplus extern ""C"" { #if 0 } // purely to not screw up my indenting... #endif #endif #include ""rq_stream.h"" /** Get the start and end position of a valid piece of XML. */ RQ_EXPORT rq_error_code rq_xml_util_get_start_end_pos(rq_stream_t stream, const char *tag, long *start_pos, long *end_pos); #ifdef __cplusplus #if 0 { // purely to not screw up my indenting... #endif }; #endif #endif ",0 "014-2015, CWI, Amsterdam Contact: astra@uantwerpen.be Website: http://sf.net/projects/astra-toolbox This file is part of the ASTRA Toolbox. The ASTRA Toolbox is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The ASTRA Toolbox is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the ASTRA Toolbox. If not, see . ----------------------------------------------------------------------- $Id$ */ #ifndef _CUDA_SIRT3D_H #define _CUDA_SIRT3D_H #include ""util3d.h"" #include ""algo3d.h"" namespace astraCUDA3d { class _AstraExport SIRT : public ReconAlgo3D { public: SIRT(); ~SIRT(); // bool setConeGeometry(const SDimensions3D& dims, const SConeProjection* projs); bool enableVolumeMask(); bool enableSinogramMask(); // init should be called after setting all geometry bool init(); // setVolumeMask should be called after init and before iterate, // but only if enableVolumeMask was called before init. // It may be called again after iterate. bool setVolumeMask(cudaPitchedPtr& D_maskData); // setSinogramMask should be called after init and before iterate, // but only if enableSinogramMask was called before init. // It may be called again after iterate. bool setSinogramMask(cudaPitchedPtr& D_smaskData); // setBuffers should be called after init and before iterate. // It may be called again after iterate. bool setBuffers(cudaPitchedPtr& D_volumeData, cudaPitchedPtr& D_projData); // set Min/Max constraints. They may be called at any time, and will affect // any iterate() calls afterwards. bool setMinConstraint(float fMin); bool setMaxConstraint(float fMax); // iterate should be called after init and setBuffers. // It may be called multiple times. bool iterate(unsigned int iterations); // Compute the norm of the difference of the FP of the current reconstruction // and the sinogram. (This performs one FP.) // It can be called after iterate. float computeDiffNorm(); protected: void reset(); bool precomputeWeights(); bool useVolumeMask; bool useSinogramMask; bool useMinConstraint; bool useMaxConstraint; float fMinConstraint; float fMaxConstraint; cudaPitchedPtr D_maskData; cudaPitchedPtr D_smaskData; // Input/output cudaPitchedPtr D_sinoData; cudaPitchedPtr D_volumeData; // Temporary buffers cudaPitchedPtr D_projData; cudaPitchedPtr D_tmpData; // Geometry-specific precomputed data cudaPitchedPtr D_lineWeight; cudaPitchedPtr D_pixelWeight; }; bool doSIRT(cudaPitchedPtr D_volumeData, unsigned int volumePitch, cudaPitchedPtr D_projData, unsigned int projPitch, cudaPitchedPtr D_maskData, unsigned int maskPitch, const SDimensions3D& dims, const SConeProjection* projs, unsigned int iterations); } #endif ",0 "software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include #include ""string_functions.h"" #include ""server_configuration_struct.h"" /* * Function name: ServerConfiguration_new * Description: Create and initialize new ServerConfiguration structure. * Returns: Pointer to newly created ServerConfiguration structure. */ ServerConfiguration* ServerConfiguration_new() { ServerConfiguration* tmp = calloc(1, sizeof(ServerConfiguration)); assert(tmp != NULL); if (tmp == NULL) { return NULL; } return tmp; } /* * Function name: ServerConfiguration_free * Description: Free the memory allocated for ServerConfiguration structure. * Arguments: sc - pointer to pointer to ServerConfiguration structure */ void ServerConfiguration_free(ServerConfiguration** sc) { int i; assert(sc != NULL); if (sc == NULL) { return; } assert((*sc) != NULL); if ((*sc) == NULL) { return; } if ((*sc)->certificateFile) { free((*sc)->certificateFile); (*sc)->certificateFile = NULL; } if ((*sc)->keysFile) { free((*sc)->keysFile); (*sc)->keysFile = NULL; } if ((*sc)->dateFormat) { free((*sc)->dateFormat); (*sc)->dateFormat = NULL; } if ((*sc)->realmsTable) { for (i = 0; i < (*sc)->realmsNumber; ++i) { if ((*sc)->realmsTable[i]) { ServerRealm_free(&((*sc)->realmsTable[i])); } } free((*sc)->realmsTable); (*sc)->realmsTable = NULL; } free((*sc)); (*sc) = NULL; } /* * Function name: ServerConfiguration_set_certificateFile * Description: Set certificate filename. * Arguments: sc - pointer to ServerConfiguration structure * certificateFile - certificate filename */ void ServerConfiguration_set_certificateFile(ServerConfiguration* sc, char* certificateFile) { assert(sc != NULL); if (sc == NULL) { return; } string_cp(&(sc->certificateFile), certificateFile); } /* * Function name: ServerConfiguration_set_keysFile * Description: Set keys filename. * Arguments: sc - pointer to ServerConfiguration structure * keysFile - keys filename */ void ServerConfiguration_set_keysFile(ServerConfiguration* sc, char* keysFile) { assert(sc != NULL); if (sc == NULL) { return; } string_cp(&(sc->keysFile), keysFile); } /* * Function name: ServerConfiguration_set_dateFormat * Description: Set format of the date string. * Arguments: sc - pointer to ServerConfiguration structure * dateFormat - format of the date string */ void ServerConfiguration_set_dateFormat(ServerConfiguration* sc, char* dateFormat) { assert(sc != NULL); if (sc == NULL) { return; } string_cp(&(sc->dateFormat), dateFormat); } /* * Function name: ServerConfiguration_set_realmsNumber * Description: Set number of realms. * Arguments: sc - pointer to ServerConfiguration structure * realmsNumber - number of realms */ void ServerConfiguration_set_realmsNumber(ServerConfiguration* sc, int realmsNumber) { assert(sc != NULL); if (sc == NULL) { return; } sc->realmsNumber = realmsNumber; } /* * Function name: ServerConfiguration_set_startTime * Description: Set start time of the server. * Arguments: sc - pointer to ServerConfiguration structure * startTime - start time of the server */ void ServerConfiguration_set_startTime(ServerConfiguration* sc, time_t startTime) { assert(sc != NULL); if (sc == NULL) { return; } sc->startTime = startTime; } /* * Function name: ServerConfiguration_set_realmsTable * Description: Set table of realms. * Arguments: sc - pointer to ServerConfiguration structure * realmsTable - table of realms */ void ServerConfiguration_set_realmsTable(ServerConfiguration* sc, ServerRealm** realmsTable) { int i; assert(sc != NULL); if (sc == NULL) { return; } if (sc->realmsTable) { for (i = 0; i < sc->realmsNumber; ++i) { if (sc->realmsTable[i]) { ServerRealm_free(&(sc->realmsTable[i])); } } free(sc->realmsTable); sc->realmsTable = NULL; } sc->realmsTable = realmsTable; } /* * Function name: ServerConfiguration_get_certificateFile * Description: Get certificate filename. * Arguments: sc - pointer to ServerConfiguration structure * Returns: Certificate filename. */ char* ServerConfiguration_get_certificateFile(ServerConfiguration* sc) { assert(sc != NULL); if (sc == NULL) { return NULL; } return sc->certificateFile; } /* * Function name: ServerConfiguration_get_keysFile * Description: Get keys filename. * Arguments: sc - pointer to ServerConfiguration structure * Returns: Keys filename. */ char* ServerConfiguration_get_keysFile(ServerConfiguration* sc) { assert(sc != NULL); if (sc == NULL) { return NULL; } return sc->keysFile; } /* * Function name: ServerConfiguration_get_dateFormat * Description: Get format of the date string. * Arguments: sc - pointer to ServerConfiguration structure * Returns: Format of the date string. */ char* ServerConfiguration_get_dateFormat(ServerConfiguration* sc) { assert(sc != NULL); if (sc == NULL) { return NULL; } return sc->dateFormat; } /* * Function name: ServerConfiguration_get_realmsNumber * Description: Get number of realms. * Arguments: sc - pointer to ServerConfiguration structure * Returns: Number of realms. */ int ServerConfiguration_get_realmsNumber(ServerConfiguration* sc) { assert(sc != NULL); if (sc == NULL) { return -1; } return sc->realmsNumber; } /* * Function name: ServerConfiguration_get_startTime * Description: Get start time of the server. * Arguments: sc - pointer to ServerConfiguration structure * Returns: Start time of the server. */ time_t ServerConfiguration_get_startTime(ServerConfiguration* sc) { assert(sc != NULL); if (sc == NULL) { return 0; } return sc->startTime; } /* * Function name: ServerConfiguration_get_realmsTable * Description: Get table of realms. * Arguments: sc - pointer to ServerConfiguration structure * Returns: Table of realms. */ ServerRealm** ServerConfiguration_get_realmsTable(ServerConfiguration* sc) { assert(sc != NULL); if (sc == NULL) { return NULL; } return sc->realmsTable; } ",0 "le>mathcomp-abel: Not compatible 👼
    « Up

    mathcomp-abel 1.0.0 Not compatible 👼

    📅 (2022-01-23 18:18:12 UTC)

    Context

    # Packages matching: installed
    # Name              # Installed # Synopsis
    base-bigarray       base
    base-threads        base
    base-unix           base
    camlp5              7.14        Preprocessor-pretty-printer of OCaml
    conf-findutils      1           Virtual package relying on findutils
    conf-perl           1           Virtual package relying on perl
    coq                 8.9.0       Formal proof management system
    num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
    ocaml               4.07.1      The OCaml compiler (virtual package)
    ocaml-base-compiler 4.07.1      Official release 4.07.1
    ocaml-config        1           OCaml Switch Configuration
    ocamlfind           1.9.1       A library manager for OCaml
    # opam file:
    opam-version: "2.0"
    maintainer: "Cyril Cohen <cyril.cohen@inria.fr>"
    homepage: "https://github.com/math-comp/abel"
    dev-repo: "git+https://github.com/math-comp/abel.git"
    bug-reports: "https://github.com/math-comp/abel/issues"
    license: "CECILL-B"
    synopsis: "Abel - Ruffini's theorem"
    description: """
    This repository contains a proof of Abel - Galois Theorem
    (equivalence between being solvable by radicals and having a
    solvable Galois group) and Abel - Ruffini Theorem (unsolvability of
    quintic equations) in the Coq proof-assistant and using the
    Mathematical Components library."""
    build: [make "-j%{jobs}%" ]
    install: [make "install"]
    depends: [
      "coq" { (>= "8.10" & < "8.14~") | = "dev" }
      "coq-mathcomp-ssreflect" { (>= "1.11.0" & < "1.13~") | = "dev" }
      "coq-mathcomp-fingroup" 
      "coq-mathcomp-algebra" 
      "coq-mathcomp-solvable" 
      "coq-mathcomp-field" 
      "coq-mathcomp-real-closed" { (>= "1.1.1") | = "dev" }
    ]
    tags: [
      "keyword:algebra"
      "keyword:Galois"
      "keyword:Abel Ruffini"
      "keyword:unsolvability of quintincs"
      "logpath:Abel"
    ]
    authors: [
      "Sophie Bernard"
      "Cyril Cohen"
      "Assia Mahboubi"
      "Pierre-Yves Strub"
    ]
    url {
      src: "https://github.com/math-comp/Abel/archive/1.0.0.tar.gz"
      checksum: "sha256=45ff1fc19ee16d1d97892a54fbbc9864e89fe79b0c7aa3cc9503e44bced5f446"
    }
    

    Lint

    Command
    true
    Return code
    0

    Dry install 🏜️

    Dry install with the current Coq version:

    Command
    opam install -y --show-action coq-mathcomp-abel.1.0.0 coq.8.9.0
    Return code
    5120
    Output
    [NOTE] Package coq is already installed (current version is 8.9.0).
    The following dependencies couldn't be met:
      - coq-mathcomp-abel -> coq >= dev
          no matching version
    Your request can't be satisfied:
      - No available version of coq satisfies the constraints
    No solution found, exiting
    

    Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

    Command
    opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-abel.1.0.0
    Return code
    0

    Install dependencies

    Command
    true
    Return code
    0
    Duration
    0 s

    Install 🚀

    Command
    true
    Return code
    0
    Duration
    0 s

    Installation size

    No files were installed.

    Uninstall 🧹

    Command
    true
    Return code
    0
    Missing removes
    none
    Wrong removes
    none

    Sources are on GitHub © Guillaume Claret 🐣

    ",0 "an Average Ticket Price by Carrier * @author Deepen Mehta * */ public class MeanFlight { public static void main(String[] args) throws NumberFormatException, IOException { Context context = new Context(); context.setMapperClass(M.class); context.setReducerClass(R.class); context.setInputPath(args[0]); context.setOutputPath(args[1]); context.jobWaitCompletionTrue(); } } ",0 "BASE CONNECTIVITY SETTINGS | ------------------------------------------------------------------- | This file will contain the settings needed to access your database. | | For complete instructions please consult the 'Database Connection' | page of the User Guide. | | ------------------------------------------------------------------- | EXPLANATION OF VARIABLES | ------------------------------------------------------------------- | | ['dsn'] The full DSN string describe a connection to the database. | ['hostname'] The hostname of your database server. | ['username'] The username used to connect to the database | ['password'] The password used to connect to the database | ['database'] The name of the database you want to connect to | ['dbdriver'] The database driver. e.g.: mysqli. | Currently supported: | cubrid, ibase, mssql, mysql, mysqli, oci8, | odbc, pdo, postgre, sqlite, sqlite3, sqlsrv | ['dbprefix'] You can add an optional prefix, which will be added | to the table name when using the Query Builder class | ['pconnect'] TRUE/FALSE - Whether to use a persistent connection | ['db_debug'] TRUE/FALSE - Whether database errors should be displayed. | ['cache_on'] TRUE/FALSE - Enables/disables query caching | ['cachedir'] The path to the folder where cache files should be stored | ['char_set'] The character set used in communicating with the database | ['dbcollat'] The character collation used in communicating with the database | NOTE: For MySQL and MySQLi databases, this setting is only used | as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7 | (and in table creation queries made with DB Forge). | There is an incompatibility in PHP with mysql_real_escape_string() which | can make your site vulnerable to SQL injection if you are using a | multi-byte character set and are running versions lower than these. | Sites using Latin-1 or UTF-8 database character set and collation are unaffected. | ['swap_pre'] A default table prefix that should be swapped with the dbprefix | ['encrypt'] Whether or not to use an encrypted connection. | | 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE | 'mysqli' and 'pdo/mysql' drivers accept an array with the following options: | | 'ssl_key' - Path to the private key file | 'ssl_cert' - Path to the public key certificate file | 'ssl_ca' - Path to the certificate authority file | 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format | 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':') | 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only) | | ['compress'] Whether or not to use client compression (MySQL only) | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections | - good for ensuring strict SQL while developing | ['ssl_options'] Used to set various SSL options that can be used when making SSL connections. | ['failover'] array - A array with 0 or more data for connections if the main should fail. | ['save_queries'] TRUE/FALSE - Whether to ""save"" all executed queries. | NOTE: Disabling this will also effectively disable both | $this->db->last_query() and profiling of DB queries. | When you run a query, with this setting set to TRUE (default), | CodeIgniter will store the SQL statement for debugging purposes. | However, this may cause high memory usage, especially if you run | a lot of SQL queries ... disable this to avoid that problem. | | The $active_group variable lets you choose which connection group to | make active. By default there is only one group (the 'default' group). | | The $query_builder variables lets you determine whether or not to load | the query builder class. */ $active_group = 'default'; $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => 'root', 'database' => 'my_mvc_db', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE ); ",0 "liance 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. */ package org.fcrepo.http.api; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; /** * @author cabeer * @since 10/17/14 */ @Component public class FedoraHttpConfiguration { @Value(""${fcrepo.http.ldp.putRequiresIfMatch:false}"") private boolean putRequiresIfMatch; /** * Should PUT requests require an If-Match header? * @return put request if match */ public boolean putRequiresIfMatch() { return putRequiresIfMatch; } } ",0 " LICENSE file. #ifndef MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ #define MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ #include ""base/memory/scoped_ptr.h"" #include ""base/message_loop/message_loop.h"" #include ""base/threading/thread_local_storage.h"" #include ""base/timer/timer.h"" #include ""cc/blink/web_compositor_support_impl.h"" #include ""mojo/services/html_viewer/blink_resource_map.h"" #include ""mojo/services/html_viewer/webmimeregistry_impl.h"" #include ""mojo/services/html_viewer/webthemeengine_impl.h"" #include ""third_party/WebKit/public/platform/Platform.h"" #include ""third_party/WebKit/public/platform/WebScrollbarBehavior.h"" namespace html_viewer { class BlinkPlatformImpl : public blink::Platform { public: explicit BlinkPlatformImpl(); virtual ~BlinkPlatformImpl(); // blink::Platform methods: virtual blink::WebMimeRegistry* mimeRegistry(); virtual blink::WebThemeEngine* themeEngine(); virtual blink::WebString defaultLocale(); virtual double currentTime(); virtual double monotonicallyIncreasingTime(); virtual void cryptographicallyRandomValues( unsigned char* buffer, size_t length); virtual void setSharedTimerFiredFunction(void (*func)()); virtual void setSharedTimerFireInterval(double interval_seconds); virtual void stopSharedTimer(); virtual void callOnMainThread(void (*func)(void*), void* context); virtual bool isThreadedCompositingEnabled(); virtual blink::WebCompositorSupport* compositorSupport(); virtual blink::WebURLLoader* createURLLoader(); virtual blink::WebSocketHandle* createWebSocketHandle(); virtual blink::WebString userAgent(); virtual blink::WebData parseDataURL( const blink::WebURL& url, blink::WebString& mime_type, blink::WebString& charset); virtual blink::WebURLError cancelledError(const blink::WebURL& url) const; virtual blink::WebThread* createThread(const char* name); virtual blink::WebThread* currentThread(); virtual void yieldCurrentThread(); virtual blink::WebWaitableEvent* createWaitableEvent(); virtual blink::WebWaitableEvent* waitMultipleEvents( const blink::WebVector& events); virtual blink::WebScrollbarBehavior* scrollbarBehavior(); virtual const unsigned char* getTraceCategoryEnabledFlag( const char* category_name); virtual blink::WebData loadResource(const char* name); private: void SuspendSharedTimer(); void ResumeSharedTimer(); void DoTimeout() { if (shared_timer_func_ && !shared_timer_suspended_) shared_timer_func_(); } static void DestroyCurrentThread(void*); base::MessageLoop* main_loop_; base::OneShotTimer shared_timer_; void (*shared_timer_func_)(); double shared_timer_fire_time_; bool shared_timer_fire_time_was_set_while_suspended_; int shared_timer_suspended_; // counter base::ThreadLocalStorage::Slot current_thread_slot_; cc_blink::WebCompositorSupportImpl compositor_support_; WebThemeEngineImpl theme_engine_; WebMimeRegistryImpl mime_registry_; blink::WebScrollbarBehavior scrollbar_behavior_; BlinkResourceMap blink_resource_map_; DISALLOW_COPY_AND_ASSIGN(BlinkPlatformImpl); }; } // namespace html_viewer #endif // MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ ",0 "enerated by javadoc (1.8.0_92) on Sun Nov 20 21:48:31 CET 2016 --> eu.aspire_fp7.adss.optimizationAPI Class Hierarchy

    Hierarchy For Package eu.aspire_fp7.adss.optimizationAPI

    Package Hierarchies:

    Class Hierarchy

    • java.lang.Object
      • eu.aspire_fp7.adss.optimizationAPI.CPlexOptimizer (implements eu.aspire_fp7.adss.optimizationAPI.Optimizer)
      • java.lang.Throwable (implements java.io.Serializable)

    Interface Hierarchy

    • eu.aspire_fp7.adss.optimizationAPI.Optimizer
    ",0 "a name=""generator"" content=""rustdoc""> bincode::serde::writer::TAG_TWO_B - Rust

    bincode::serde::writer::TAG_TWO_B [] [src]

    const TAG_TWO_B: u8 = 192
    ",0 " *---------------------------------------------------------------------------- * DESCRIPTION: Functions to validate Admin operations (i.e. check permissions * parameters, timing, etc.) *---------------------------------------------------------------------------- * Modification History * 2016-04-05 JJK Added check for AddAssessments * 2020-08-01 JJK Re-factored to use jjklogin for authentication * 2020-12-21 JJK Re-factored to use jjklogin package *============================================================================*/ // Define a super global constant for the log file (this will be in scope for all functions) define(""LOG_FILE"", ""./php.log""); require_once 'vendor/autoload.php'; // Figure out how many levels up to get to the ""public_html"" root folder $webRootDirOffset = substr_count(strstr(dirname(__FILE__),""public_html""),DIRECTORY_SEPARATOR) + 1; // Get settings and credentials from a file in a directory outside of public_html // (assume a settings file in the ""external_includes"" folder one level up from ""public_html"") $extIncludePath = dirname(__FILE__, $webRootDirOffset+1).DIRECTORY_SEPARATOR.'external_includes'.DIRECTORY_SEPARATOR; require_once $extIncludePath.'hoadbSecrets.php'; require_once $extIncludePath.'jjkloginSettings.php'; // Common functions require_once 'php_secure/commonUtil.php'; // Common database functions and table record classes require_once 'php_secure/hoaDbCommon.php'; use \jkauflin\jjklogin\LoginAuth; $adminRec = new AdminRec(); try { $userRec = LoginAuth::getUserRec($cookieNameJJKLogin,$cookiePathJJKLogin,$serverKeyJJKLogin); if ($userRec->userName == null || $userRec->userName == '') { throw new Exception('User is NOT logged in', 500); } if ($userRec->userLevel < 1) { throw new Exception('User is NOT authorized (contact Administrator)', 500); } $currTimestampStr = date(""Y-m-d H:i:s""); //JJK test, date = 2015-04-22 19:45:09 $adminRec->result = ""Not Valid""; $adminRec->message = """"; $adminRec->userName = $userRec->userName; $adminRec->userLevel = $userRec->userLevel; $adminLevel = $userRec->userLevel; $action = getParamVal(""action""); $fy = getParamVal(""fy""); $duesAmt = strToUSD(getParamVal(""duesAmt"")); if ($adminLevel < 2) { $adminRec->message = ""You do not have permissions for this function""; $adminRec->result = ""Not Valid""; } else { $adminRec->result = ""Valid""; $adminRec->message = ""Continue with "" . $action . ""?""; if ($action == ""AddAssessments"") { if (empty($duesAmt) || empty($fy)) { $adminRec->message = ""You must enter Dues Amount and Fiscal Year.""; $adminRec->result = ""Not Valid""; } else { $adminRec->message = ""Are you sure you want to add assessment for Fiscal Year "" . $fy . ' with Dues Amount of $' . $duesAmt .'?'; } } else if ($action == ""MarkMailed"") { $adminRec->message = ""Continue to record Communication to mark paper notices as mailed?""; } else if ($action == ""DuesEmailsTest"") { $adminRec->message = ""Continue with TEST email of Dues Notices to show the list and send the first one to the test address?""; } else if ($action == ""DuesEmails"") { $adminRec->message = ""Continue with email of Dues Notices? This will create a Communication record for each email to send""; } } echo json_encode($adminRec); } catch(Exception $e) { //error_log(date('[Y-m-d H:i] '). ""in "" . basename(__FILE__,"".php"") . "", Exception = "" . $e->getMessage() . PHP_EOL, 3, LOG_FILE); $adminRec->message = $e->getMessage(); $adminRec->result = ""Not Valid""; echo json_encode($adminRec); /* echo json_encode( array( 'error' => $e->getMessage(), 'error_code' => $e->getCode() ) ); */ } ?> ",0 "stract This is the controller for handling the Extended Contact Map(ECM) Notes. */ class Ecmnote extends CI_Controller { function __construct() { parent::__construct(); /** * Make sure our users are logged in. */ if (!$this->ion_auth->logged_in()) { redirect('/auth/'); } /** * Determine if a Project has been selected. If not force user to select one. */ if (isset($_SESSION['project_id'])) { $this->information['project_id'] = $_SESSION['project_id']; } else { redirect('/'); } /** * Determine if we are logged in with admin status. */ if($this->ion_auth->is_admin() || $this->ion_auth->is_group_admin()) { $this->template->assign('admin', TRUE); } else { $this->template->assign('admin', FALSE); } /** * Determine if we are logged in as a guest. */ if($this->ion_auth->is_guest()) { $this->template->assign('guest', TRUE); } else { $this->template->assign('guest', FALSE); } /** * Capture any messages or errors. */ if(isset($_SESSION['messages'])) { $this->information['messages'] = $_SESSION['messages']; unset($_SESSION['messages']); } elseif(isset($_SESSION['errors'])) { $this->information['errors'] = $_SESSION['errors']; unset($_SESSION['errors']); } $this->lang->load('auth_lang'); $this->load->model( 'model_ecmnote' ); } ####################################################################################################################### # List all ECM Notes # ####################################################################################################################### function index( $page = 0 ) { $this->model_utilities->pagination( TRUE ); $data_info = $this->model_ecmnote->lister( $page ); $this->information['who'] = $id; $this->information['title'] = 'List of ECM Notes for Project'; $this->template->assign( 'pager', $this->model_ecmnote->pager ); $this->template->assign( 'ecmnote_fields', $this->model_ecmnote->fields( TRUE ) ); $this->template->assign( 'ecmnote_data', $data_info ); $this->template->assign( 'information', $this->information); $this->_render_page('list_ecmnote.tpl'); } ################################################################################################### # Show ECM Note Comments. Input from ECM Diagrams # ################################################################################################### function show( $id ) { $this->session->set_userdata('tag','ECM'); $data = $this->model_ecmnote->get( $id ); $fields = $this->model_ecmnote->fields( TRUE ); $this->template->assign( 'id', $id ); $this->template->assign( 'ecmnote_fields', $fields ); $this->template->assign( 'data', $data ); $this->template->assign( 'table_name', 'Ecmnote' ); $this->template->assign( 'template', 'show_ecmnote' ); $this->template->display( 'frame_admin.tpl' ); } ####################################################################################################################### # Create new ECM Note # ####################################################################################################################### function create( $id = false ) { if($this->ion_auth->is_guest()) //A guest user should never get this far but if they do send them packing. { redirect('ecmnote'); } if (isset($_POST) && !empty($_POST)) { $this->form_validation->set_rules( 'ecmnote', lang('ecmnote'), 'required|max_length[45]' ); $this->form_validation->set_rules( 'comment', lang('comment'), 'required' ); if ( $this->form_validation->run() ) { $data_post['ecmnote'] = $this->input->post( 'ecmnote' ); $data_post['comment'] = $this->input->post( 'comment' ); $data_post['project_id'] = $_SESSION['project_id']; if( $this->model_ecmnote->dupcheck($data_post['ecmnote']) ) { $id = $this->model_utilities->insert( 'ecmnote', $data_post ); $_SESSION['messages'] = ""Update Successful""; redirect( 'ecmnote/edit/' . $id ); } else { $this->information['errors'] = ""ECM Note "".$data_post['ecmnote']. "" already exsists in project.""; } } else { $this->information['errors'] = validation_errors(); } } $this->information['who'] = ''; $this->information['title'] = 'Create New ECM Note'; $this->data['ecmnote'] = $this->form_validation->set_value('ecmnote', $data_post['ecmnote']); $this->data['comment'] = $this->form_validation->set_value('comment', $data_post['comment']); $this->template->assign( 'ecmnote_fields', $this->model_ecmnote->fields() ); $this->template->assign( 'information', $this->information); $this->template->assign( 'data', $this->data ); $this->_render_page('form_ecmnote.tpl'); } ################################################################################################### # Edit ECM Notes # ################################################################################################### function edit( $id = false ) { $_SESSION['tag'] = 'idecm'; $data = $this->model_ecmnote->get( $id ); if (isset($_POST) && !empty($_POST)) { $this->form_validation->set_rules( 'ecmnote', lang('ecmnote'), 'required|max_length[45]' ); $this->form_validation->set_rules( 'comment', lang('comment'), 'required' ); if ( $this->form_validation->run() ) { $data_post['ecmnote'] = $this->input->post( 'ecmnote' ); $data_post['comment'] = $this->input->post( 'comment' ); $this->model_utilities->update( 'ecmnote', 'idecm', $id, $data_post ); $_SESSION['messages'] = ""Update Successful""; redirect( 'ecmnote/edit/' . $id ); } else { $this->information['errors'] = validation_errors(); } } $this->information['who'] = $data['ecmnote']; $this->information['title'] = 'Edit ECM Note '; $this->data['ecmnote'] = $this->form_validation->set_value('ecmnote', $data['ecmnote']); $this->data['comment'] = $this->form_validation->set_value('comment', $data['comment']); $this->template->assign( 'ecmnote_fields', $this->model_ecmnote->fields() ); $this->template->assign( 'information', $this->information); $this->template->assign( 'data', $this->data ); $this->template->assign( 'action_mode', 'edit' ); $this->_render_page('form_ecmnote.tpl'); } ####################################################################################################################### # Delete ECM Note(s) # ####################################################################################################################### function delete( $id = FALSE ) { if(!$this->ion_auth->is_admin()) //Only allowing system administrators to do this for now. { redirect('ecmnote'); } $id = $this->uri->segment(3); $data = $this->model_ecmnote->get($id); if (isset($_POST) && !empty($_POST)) { $post = $this->input->post('idme'); if($this->ion_auth->delete_ecmnote($id)) //This will delete the ecmnote, pubmed, pubauth, and rules records. { $this->model_ecmnote->unlinked_molecules(); //This deletes any molecules that become orphans. $_SESSION['messages'] = 'ECM Note Deletion Successful'; redirect('ecmnote'); } $this->information['errors'] = 'ECM Note Deletion Unsuccessful'; } $this->information['who'] = ''; $this->information['title'] = 'Deletion of ECM Note '.$data['ecmnote'].' and ALL Linked Data. '; $this->template->assign('information', $this->information); $this->_render_page('biohazard.tpl'); } ####################################################################################################################### # Loads our Pages by Passing Obects # ####################################################################################################################### function _render_page($view, $data=null, $render=false) { $this->template->assign( 'logged_in', $this->ion_auth->logged_in( TRUE ) ); $this->template->assign( 'user_id', $this->ion_auth->get_user_id()); $this->template->assign( 'project', $_SESSION['project_name']); $this->template->assign( 'template', $view ); $view_html = $this->template->display( 'frame_admin.tpl' ); if (!$render) return $view_html; } }//end of file brace. ",0 "#################################################################### * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * * ######################################################################## */ #include ""ieee754sp.h"" /* close to ieeep754sp_logb */ ieee754sp ieee754sp_frexp(ieee754sp x, int *eptr) { COMPXSP; CLEARCX; EXPLODEXSP; switch (xc) { case IEEE754_CLASS_SNAN: case IEEE754_CLASS_QNAN: case IEEE754_CLASS_INF: case IEEE754_CLASS_ZERO: *eptr = 0; return x; case IEEE754_CLASS_DNORM: SPDNORMX; break; case IEEE754_CLASS_NORM: break; } *eptr = xe + 1; return buildsp(xs, -1 + SP_EBIAS, xm & ~SP_HIDDEN_BIT); } ",0 " ## ## ## ################################################## # define('APPLICATION', 'application'); define('CONFIG', 'config'); define('CONTROLLER', 'controllers'); define('CORE', 'core'); define('DS', DIRECTORY_SEPARATOR); define('ERRORS', 'errors'); define('LIBRARY', 'libraries'); define('MODEL', 'models'); define('RUN', true); define('PHP', '.php'); define('VIEW', 'views'); ################################################## ## ## ## GET UTILITIES ## ## ## ################################################## # require_once(APPLICATION.DS.CORE.DS.'Utilities'.PHP); ################################################## ## ## ## BOOTSTRAP ## ## ## ################################################## # load_class('Logging', CORE); load_class('Controller', CORE); load_class('Security', CORE); load_class('Router', CORE);",0 "nse""); * 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. */ package tv.danmaku.ijk.media.player.misc; import android.annotation.TargetApi; import android.os.Build; import android.text.TextUtils; import java.util.HashMap; import java.util.Locale; import java.util.Map; import tv.danmaku.ijk.media.player.IjkMediaMeta; public class IjkMediaFormat implements IMediaFormat { // Common public static final String KEY_IJK_CODEC_LONG_NAME_UI = ""ijk-codec-long-name-ui""; public static final String KEY_IJK_CODEC_NAME_UI = ""ijk-codec-name-ui""; public static final String KEY_IJK_BIT_RATE_UI = ""ijk-bit-rate-ui""; // Video public static final String KEY_IJK_CODEC_PROFILE_LEVEL_UI = ""ijk-profile-level-ui""; public static final String KEY_IJK_CODEC_PIXEL_FORMAT_UI = ""ijk-pixel-format-ui""; public static final String KEY_IJK_RESOLUTION_UI = ""ijk-resolution-ui""; public static final String KEY_IJK_FRAME_RATE_UI = ""ijk-frame-rate-ui""; // Audio public static final String KEY_IJK_SAMPLE_RATE_UI = ""ijk-sample-rate-ui""; public static final String KEY_IJK_CHANNEL_UI = ""ijk-channel-ui""; // Codec public static final String CODEC_NAME_H264 = ""h264""; public final IjkMediaMeta.IjkStreamMeta mMediaFormat; public IjkMediaFormat(IjkMediaMeta.IjkStreamMeta streamMeta) { mMediaFormat = streamMeta; } @TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override public int getInteger(String name) { if (mMediaFormat == null) return 0; return mMediaFormat.getInt(name); } @Override public String getString(String name) { if (mMediaFormat == null) return null; if (sFormatterMap.containsKey(name)) { Formatter formatter = sFormatterMap.get(name); return formatter.format(this); } return mMediaFormat.getString(name); } //------------------------- // Formatter //------------------------- private static abstract class Formatter { public String format(IjkMediaFormat mediaFormat) { String value = doFormat(mediaFormat); if (TextUtils.isEmpty(value)) return getDefaultString(); return value; } protected abstract String doFormat(IjkMediaFormat mediaFormat); @SuppressWarnings(""SameReturnValue"") protected String getDefaultString() { return ""N/A""; } } private static final Map sFormatterMap = new HashMap(); { sFormatterMap.put(KEY_IJK_CODEC_LONG_NAME_UI, new Formatter() { @Override public String doFormat(IjkMediaFormat mediaFormat) { return mMediaFormat.getString(IjkMediaMeta.IJKM_KEY_CODEC_LONG_NAME); } }); sFormatterMap.put(KEY_IJK_CODEC_NAME_UI, new Formatter() { @Override public String doFormat(IjkMediaFormat mediaFormat) { return mMediaFormat.getString(IjkMediaMeta.IJKM_KEY_CODEC_NAME); } }); sFormatterMap.put(KEY_IJK_BIT_RATE_UI, new Formatter() { @Override protected String doFormat(IjkMediaFormat mediaFormat) { int bitRate = mediaFormat.getInteger(IjkMediaMeta.IJKM_KEY_BITRATE); if (bitRate <= 0) { return null; } else if (bitRate < 1000) { return String.format(Locale.US, ""%d bit/s"", bitRate); } else { return String.format(Locale.US, ""%d kb/s"", bitRate / 1000); } } }); sFormatterMap.put(KEY_IJK_CODEC_PROFILE_LEVEL_UI, new Formatter() { @Override protected String doFormat(IjkMediaFormat mediaFormat) { int profileIndex = mediaFormat.getInteger(IjkMediaMeta.IJKM_KEY_CODEC_PROFILE_ID); String profile; switch (profileIndex) { case IjkMediaMeta.FF_PROFILE_H264_BASELINE: profile = ""Baseline""; break; case IjkMediaMeta.FF_PROFILE_H264_CONSTRAINED_BASELINE: profile = ""Constrained Baseline""; break; case IjkMediaMeta.FF_PROFILE_H264_MAIN: profile = ""Main""; break; case IjkMediaMeta.FF_PROFILE_H264_EXTENDED: profile = ""Extended""; break; case IjkMediaMeta.FF_PROFILE_H264_HIGH: profile = ""High""; break; case IjkMediaMeta.FF_PROFILE_H264_HIGH_10: profile = ""High 10""; break; case IjkMediaMeta.FF_PROFILE_H264_HIGH_10_INTRA: profile = ""High 10 Intra""; break; case IjkMediaMeta.FF_PROFILE_H264_HIGH_422: profile = ""High 4:2:2""; break; case IjkMediaMeta.FF_PROFILE_H264_HIGH_422_INTRA: profile = ""High 4:2:2 Intra""; break; case IjkMediaMeta.FF_PROFILE_H264_HIGH_444: profile = ""High 4:4:4""; break; case IjkMediaMeta.FF_PROFILE_H264_HIGH_444_PREDICTIVE: profile = ""High 4:4:4 Predictive""; break; case IjkMediaMeta.FF_PROFILE_H264_HIGH_444_INTRA: profile = ""High 4:4:4 Intra""; break; case IjkMediaMeta.FF_PROFILE_H264_CAVLC_444: profile = ""CAVLC 4:4:4""; break; default: return null; } StringBuilder sb = new StringBuilder(); sb.append(profile); String codecName = mediaFormat.getString(IjkMediaMeta.IJKM_KEY_CODEC_NAME); if (!TextUtils.isEmpty(codecName) && codecName.equalsIgnoreCase(CODEC_NAME_H264)) { int level = mediaFormat.getInteger(IjkMediaMeta.IJKM_KEY_CODEC_LEVEL); if (level < 10) return sb.toString(); sb.append("" Profile Level ""); sb.append((level / 10) % 10); if ((level % 10) != 0) { sb.append("".""); sb.append(level % 10); } } return sb.toString(); } }); sFormatterMap.put(KEY_IJK_CODEC_PIXEL_FORMAT_UI, new Formatter() { @Override protected String doFormat(IjkMediaFormat mediaFormat) { return mediaFormat.getString(IjkMediaMeta.IJKM_KEY_CODEC_PIXEL_FORMAT); } }); sFormatterMap.put(KEY_IJK_RESOLUTION_UI, new Formatter() { @Override protected String doFormat(IjkMediaFormat mediaFormat) { int width = mediaFormat.getInteger(KEY_WIDTH); int height = mediaFormat.getInteger(KEY_HEIGHT); int sarNum = mediaFormat.getInteger(IjkMediaMeta.IJKM_KEY_SAR_NUM); int sarDen = mediaFormat.getInteger(IjkMediaMeta.IJKM_KEY_SAR_DEN); if (width <= 0 || height <= 0) { return null; } else if (sarNum <= 0 || sarDen <= 0) { return String.format(Locale.US, ""%d x %d"", width, height); } else { return String.format(Locale.US, ""%d x %d [SAR %d:%d]"", width, height, sarNum, sarDen); } } }); sFormatterMap.put(KEY_IJK_FRAME_RATE_UI, new Formatter() { @Override protected String doFormat(IjkMediaFormat mediaFormat) { int fpsNum = mediaFormat.getInteger(IjkMediaMeta.IJKM_KEY_FPS_NUM); int fpsDen = mediaFormat.getInteger(IjkMediaMeta.IJKM_KEY_FPS_DEN); if (fpsNum <= 0 || fpsDen <= 0) { return null; } else { return String.valueOf(((float) (fpsNum)) / fpsDen); } } }); sFormatterMap.put(KEY_IJK_SAMPLE_RATE_UI, new Formatter() { @Override protected String doFormat(IjkMediaFormat mediaFormat) { int sampleRate = mediaFormat.getInteger(IjkMediaMeta.IJKM_KEY_SAMPLE_RATE); if (sampleRate <= 0) { return null; } else { return String.format(Locale.US, ""%d Hz"", sampleRate); } } }); sFormatterMap.put(KEY_IJK_CHANNEL_UI, new Formatter() { @Override protected String doFormat(IjkMediaFormat mediaFormat) { int channelLayout = mediaFormat.getInteger(IjkMediaMeta.IJKM_KEY_CHANNEL_LAYOUT); if (channelLayout <= 0) { return null; } else { if (channelLayout == IjkMediaMeta.AV_CH_LAYOUT_MONO) { return ""mono""; } else if (channelLayout == IjkMediaMeta.AV_CH_LAYOUT_STEREO) { return ""stereo""; } else { return String.format(Locale.US, ""%x"", channelLayout); } } } }); } } ",0 ".org/1999/xhtml"" xml:lang=""en"" lang=""en""> Module: Ronin::Model::HasLicense::InstanceMethods — Ronin Documentation

    Module: Ronin::Model::HasLicense::InstanceMethods

    Defined in:
    lib/ronin/model/has_license.rb

    Overview

    Instance methods that are added when Ronin::Model::HasLicense is included into a model.

    Instance Method Summary (collapse)

    Instance Method Details

    - (Object) license!(name)

    Deprecated.

    license! was deprecated in favor of #licensed_under.

    Since:

    • 1.0.0

    '; } ?>
    ",0 " table.attrs %} {{ table.attrs.as_html }}{% endif %}> {% block table.thead %} {% for column in table.columns %} {% if column.orderable %} {% else %} {% endif %} {% endfor %} {% endblock table.thead %} {% block table.tbody %} {% for row in table.page.object_list|default:table.rows %} {# support pagination #} {% block table.tbody.row %} {# avoid cycle for Django 1.2-1.6 compatibility #} {% for column, cell in row.items %} {% endfor %} {% endblock table.tbody.row %} {% empty %} {% if table.empty_text %} {% block table.tbody.empty_text %} {% endblock table.tbody.empty_text %} {% endif %} {% endfor %} {% endblock table.tbody %} {% block table.tfoot %} {% endblock table.tfoot %}
    {{ column.header }}{{ column.header }}
    {% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %}{{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %}
    {{ table.empty_text }}
    {% endblock table %} {% if table.page %} {% with table.page.paginator.count as total %} {% with table.page.object_list|length as count %} {% comment %} {% block pagination %} {% endblock pagination %} {% endcomment %} {% endwith %} {% endwith %} {% endif %} {% endspaceless %} ",0 "rencia; import com.eng.univates.pojo.Usuario; import com.vividsolutions.jts.geom.Point; @Remote public interface OcorrenciaBD extends CrudBD { public String convertPontosGeo(); public List getPontosConvertidos(); public List getDescricaoFatos(); public List filtraMapa(Filter filtro); public List pontosBatalhao(Usuario usuario, Point localViatura, Double distance); } ",0 "h, initial-scale=1.0, user-scalable=no"">

      Please wait...
      ",0 "VERIFIER_nondet_pointer(); extern float __VERIFIER_nondet_float(); extern long __VERIFIER_nondet_long(); extern int nondet_int(); int main() { int a = __VERIFIER_nondet_int(); bool b = __VERIFIER_nondet_bool(); void* pointer = __VERIFIER_nondet_pointer(); int c = __VERIFIER_nondet_int8_t(); long d = __VERIFIER_nondet_long(); float e = __VERIFIER_nondet_float(); int f = nondet_int(); } ",0 "Christian Engel ** ** Module: setups.h ** ** setup file */ #ifdef __TURBOC__ # ifndef __COMPACT__ # error ""The COMPACT model is needed"" # endif #endif #include #include #include #include #include #if defined(__TURBOC__) | defined(MSC) # include /* for type declarations */ #endif #ifdef UCB # include #else # include #endif #ifdef VMS # define GOOD 1 #else # define GOOD 0 #endif #ifdef __TURBOC__ /*--- ONE MEGABYTE for EACH BUFFER? Really? - not for a brain-dead cpu like the 8086 or 80286. Would my account on the VAX let me have this much? Maybe, one day when we all have an 80386+, or a SPARC, or a real cpu.... ---*/ #define MAXLEN (0xfff0) /* maximum length of document */ /* A segment is 64k bytes! */ #else /* ... but no problem on virtual operating systems */ #define MAXLEN (1024*1024) /* maximum length of document */ #endif #define MAXWORD 250 /* maximum word length */ #define MAXLINE 500 /* maximum line length */ #define MAXDEF 200 /* maximum number of defines */ #define MAXARGS 128 /* maximal number of arguments */ #define EOS '\0' /* end of string */ #if defined(__TURBOC__) | defined (VAXC) # define index strchr #endif #ifdef MAIN /* can only declare globals once */ # define GLOBAL #else # define GLOBAL extern #endif GLOBAL int math_mode, /* math mode status */ de_arg, /* .de argument */ IP_stat, /* IP status */ QP_stat, /* QP status */ TP_stat; /* TP status */ #ifdef DEBUG GLOBAL int debug_o; GLOBAL int debug_v; #endif GLOBAL struct defs { char *def_macro; char *replace; int illegal; } def[MAXDEF]; GLOBAL struct mydefs { char *def_macro; char *replace; int illegal; int arg_no; int par; /* if it impiles (or contains) a par break */ } mydef[MAXDEF]; GLOBAL struct measure { char old_units[MAXWORD]; float old_value; char units[MAXWORD]; float value; char def_units[MAXWORD]; /* default units */ int def_value; /* default value: 0 means take last one */ } linespacing, indent, tmpind, space, vspace; typedef unsigned char bool; extern int errno; ",0 "sitional.dtd""> ActiveJob::Core::ClassMethods

      These methods will be included into any Active Job object, adding helpers for de/serialization and creation of job instances.

      Methods
      D
      S
      Instance Public methods
      deserialize(job_data) Link

      Creates a new job instance from a hash created with serialize

      Source: show

      # File ../../.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activejob-4.2.6/lib/active_job/core.rb, line 27
      def deserialize(job_data)
        job                      = job_data['job_class'].constantize.new
        job.job_id               = job_data['job_id']
        job.queue_name           = job_data['queue_name']
        job.serialized_arguments = job_data['arguments']
        job.locale               = job_data['locale'] || I18n.locale
        job
      end
      set(options={}) Link

      Creates a job preconfigured with the given options. You can call perform_later with the job arguments to enqueue the job with the preconfigured options

      Options

      • :wait - Enqueues the job with the specified delay

      • :wait_until - Enqueues the job at the time specified

      • :queue - Enqueues the job on the specified queue

      Examples

      VideoJob.set(queue: :some_queue).perform_later(Video.last)
      VideoJob.set(wait: 5.minutes).perform_later(Video.last)
      VideoJob.set(wait_until: Time.now.tomorrow).perform_later(Video.last)
      VideoJob.set(queue: :some_queue, wait: 5.minutes).perform_later(Video.last)
      VideoJob.set(queue: :some_queue, wait_until: Time.now.tomorrow).perform_later(Video.last)
      

      Source: show

      # File ../../.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activejob-4.2.6/lib/active_job/core.rb, line 52
      def set(options={})
        ConfiguredJob.new(self, options)
      end
      ",0 ": Courier New"" text=""#000000"" link=""#000000"" vlink=""#000000"" alink=""#808080"">

      Back to Server.Items

      OnItemConsumed : MulticastDelegate, ICloneable, ISerializable

      (ctor) OnItemConsumed( object object, IntPtr method )
      virtual IAsyncResult BeginInvoke( Item item, int amount, AsyncCallback callback, object object )
      virtual void EndInvoke( IAsyncResult result )
      virtual void Invoke( Item item, int amount )
      ",0 "ms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package com.powsybl.iidm.network.impl; import com.powsybl.iidm.network.*; /** * * @author Geoffroy Jamgotchian */ class GeneratorAdderImpl extends AbstractInjectionAdder implements GeneratorAdder { private final VoltageLevelExt voltageLevel; private EnergySource energySource = EnergySource.OTHER; private double minP = Double.NaN; private double maxP = Double.NaN; private TerminalExt regulatingTerminal; private Boolean voltageRegulatorOn; private double targetP = Double.NaN; private double targetQ = Double.NaN; private double targetV = Double.NaN; private double ratedS = Double.NaN; GeneratorAdderImpl(VoltageLevelExt voltageLevel) { this.voltageLevel = voltageLevel; } @Override protected NetworkImpl getNetwork() { return voltageLevel.getNetwork(); } @Override protected String getTypeDescription() { return ""Generator""; } @Override public GeneratorAdderImpl setEnergySource(EnergySource energySource) { this.energySource = energySource; return this; } @Override public GeneratorAdderImpl setMaxP(double maxP) { this.maxP = maxP; return this; } @Override public GeneratorAdderImpl setMinP(double minP) { this.minP = minP; return this; } @Override public GeneratorAdder setVoltageRegulatorOn(boolean voltageRegulatorOn) { this.voltageRegulatorOn = voltageRegulatorOn; return this; } @Override public GeneratorAdder setRegulatingTerminal(Terminal regulatingTerminal) { this.regulatingTerminal = (TerminalExt) regulatingTerminal; return this; } @Override public GeneratorAdderImpl setTargetP(double targetP) { this.targetP = targetP; return this; } @Override public GeneratorAdderImpl setTargetQ(double targetQ) { this.targetQ = targetQ; return this; } @Override public GeneratorAdderImpl setTargetV(double targetV) { this.targetV = targetV; return this; } @Override public GeneratorAdder setRatedS(double ratedS) { this.ratedS = ratedS; return this; } @Override public GeneratorImpl add() { NetworkImpl network = getNetwork(); if (network.getMinValidationLevel() == ValidationLevel.EQUIPMENT && voltageRegulatorOn == null) { voltageRegulatorOn = false; } String id = checkAndGetUniqueId(); TerminalExt terminal = checkAndGetTerminal(); ValidationUtil.checkMinP(this, minP); ValidationUtil.checkMaxP(this, maxP); ValidationUtil.checkActivePowerLimits(this, minP, maxP); ValidationUtil.checkRegulatingTerminal(this, regulatingTerminal, network); network.setValidationLevelIfGreaterThan(ValidationUtil.checkActivePowerSetpoint(this, targetP, network.getMinValidationLevel())); network.setValidationLevelIfGreaterThan(ValidationUtil.checkVoltageControl(this, voltageRegulatorOn, targetV, targetQ, network.getMinValidationLevel())); ValidationUtil.checkActivePowerLimits(this, minP, maxP); ValidationUtil.checkRatedS(this, ratedS); GeneratorImpl generator = new GeneratorImpl(network.getRef(), id, getName(), isFictitious(), energySource, minP, maxP, voltageRegulatorOn, regulatingTerminal != null ? regulatingTerminal : terminal, targetP, targetQ, targetV, ratedS); generator.addTerminal(terminal); voltageLevel.attach(terminal, false); network.getIndex().checkAndAdd(generator); network.getListeners().notifyCreation(generator); return generator; } } ",0 "69991442'>Ápii
      6 7 8 9 10 T XT v
      The New York
      copyright reserved Botanical Garden
      M
      L .
      PLANTS OF MARTINIQUE
      Frank E.Egler No. 89 Ñ 30
      June 25, 1939
      *
      New York Botanical Garden
      1^240^5
      Ten m. tree in the Dunkerque-Catherine mangrove; commune of Ste. Anne; arid zone. In the vicinity: forming pure forests on the seaward side of mangrove sites; palatable to stock; developing on both clay and sand.
      Deposited at the New York Botanical Garden to authenticate ecological studies of this West indian Island made during the summer of 1939.
      1624095


      Legend - Level of confidence that token is an accurately-transcribed word
          extremely low     very low     low     undetermined     medium     high     very high
      ",0 "information regarding copyright * ownership. Elasticsearch licenses this file to you 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. */ package org.elasticsearch.search.aggregations.bucket.composite; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.LeafReaderContext; import org.elasticsearch.search.aggregations.LeafBucketCollector; import java.io.IOException; import static org.elasticsearch.search.aggregations.support.ValuesSource.Numeric; import static org.elasticsearch.search.aggregations.support.ValuesSource.Bytes; import static org.elasticsearch.search.aggregations.support.ValuesSource.Bytes.WithOrdinals; final class CompositeValuesComparator { private final int size; private final CompositeValuesSource[] arrays; private boolean topValueSet = false; /** * * @param sources The list of {@link CompositeValuesSourceConfig} to build the composite buckets. * @param size The number of composite buckets to keep. */ CompositeValuesComparator(IndexReader reader, CompositeValuesSourceConfig[] sources, int size) { this.size = size; this.arrays = new CompositeValuesSource[sources.length]; for (int i = 0; i < sources.length; i++) { final int reverseMul = sources[i].reverseMul(); if (sources[i].valuesSource() instanceof WithOrdinals && reader instanceof DirectoryReader) { WithOrdinals vs = (WithOrdinals) sources[i].valuesSource(); arrays[i] = CompositeValuesSource.wrapGlobalOrdinals(vs, size, reverseMul); } else if (sources[i].valuesSource() instanceof Bytes) { Bytes vs = (Bytes) sources[i].valuesSource(); arrays[i] = CompositeValuesSource.wrapBinary(vs, size, reverseMul); } else if (sources[i].valuesSource() instanceof Numeric) { final Numeric vs = (Numeric) sources[i].valuesSource(); if (vs.isFloatingPoint()) { arrays[i] = CompositeValuesSource.wrapDouble(vs, size, reverseMul); } else { arrays[i] = CompositeValuesSource.wrapLong(vs, sources[i].format(), size, reverseMul); } } } } /** * Moves the values in slot1 to slot2. */ void move(int slot1, int slot2) { assert slot1 < size && slot2 < size; for (int i = 0; i < arrays.length; i++) { arrays[i].move(slot1, slot2); } } /** * Compares the values in slot1 with slot2. */ int compare(int slot1, int slot2) { assert slot1 < size && slot2 < size; for (int i = 0; i < arrays.length; i++) { int cmp = arrays[i].compare(slot1, slot2); if (cmp != 0) { return cmp; } } return 0; } /** * Returns true if a top value has been set for this comparator. */ boolean hasTop() { return topValueSet; } /** * Sets the top values for this comparator. */ void setTop(Comparable[] values) { assert values.length == arrays.length; topValueSet = true; for (int i = 0; i < arrays.length; i++) { arrays[i].setTop(values[i]); } } /** * Compares the top values with the values in slot. */ int compareTop(int slot) { assert slot < size; for (int i = 0; i < arrays.length; i++) { int cmp = arrays[i].compareTop(slot); if (cmp != 0) { return cmp; } } return 0; } /** * Builds the {@link CompositeKey} for slot. */ CompositeKey toCompositeKey(int slot) throws IOException { assert slot < size; Comparable[] values = new Comparable[arrays.length]; for (int i = 0; i < values.length; i++) { values[i] = arrays[i].toComparable(slot); } return new CompositeKey(values); } /** * Gets the {@link LeafBucketCollector} that will record the composite buckets of the visited documents. */ CompositeValuesSource.Collector getLeafCollector(LeafReaderContext context, CompositeValuesSource.Collector in) throws IOException { int last = arrays.length - 1; CompositeValuesSource.Collector next = arrays[last].getLeafCollector(context, in); for (int i = last - 1; i >= 0; i--) { next = arrays[i].getLeafCollector(context, next); } return next; } } ",0 "*/ class AmHasManyRelation extends AmCollectionAbstractRelation{ /** * Después de guardar el registro propietario se debe guardar los registro * relacionados. */ public function afterSave(){ // Se debe actualizar todos los registros relacionados $record = $this->getRecord(); // Si no es un regsitro nuevo se deben acutalizar todas las referencias if(!$record->isNew()){ $foreign = $this->getForeign(); $index = $foreign->getCols(); $table = $foreign->getTableInstance(); $query = $table->all(); $update = false; // Asignar cada campo de la relación foreach ($index as $from => $to){ $value = itemOr($to, $this->beforeIndex); $newValue = $record->get($to); // WHEREWHERE $query->andWhere($from, $value); if($value != $newValue){ $update = true; $query->set($from, $record->get($to)); } } // Ejecutar acctualización if($update) $query->update(); } foreach($this->news as $i => $model){ $this->sync($model); if($model->save()) unset($this->news[$i]); } foreach($this->removeds as $i => $model){ $this->sync($model); if($model->delete()) unset($this->removeds[$i]); } } /** * Hace que una instancia de un modelo pertenezca el registro dueño de la * relación * @param AmModel $model Instancia del modelo a agregar. */ protected function sync(AmModel $model){ // Obtener el reistro propietario de la relación. $record = $this->getRecord(); // Obtener las columnas relacionadas. $index = $this->getForeign()->getCols(); // Realizar asignaciones foreach ($index as $from => $to) $model->set($from, $record ? $record->get($to) : null); } }",0 "ds

      Several RSS feeds are available for consumption from the Arch website. The majority of these are package-related and allow feeds to be customized for the updates you care about.

      News and Activity Feeds

      Grab the news item feed to keep up-to-date with the latest news from the Arch Linux development staff.

      The Arch Wiki: Recent changes feed is also available to track document changes from the Arch Wiki.

      Package Feeds

      If you are interested in all package updates, then grab this feed. Note that when a package is updated for multiple architectures, you will see each individual update show up here. Alternatively, you can select a packages feed from the below table that is more tailored to your specific needs. If you are only interested in one architecture, there are a variety of feeds you can choose from. Note that feeds for a specific architecture, such as 'i686', will also include all package updates for 'any' (architecture-independent) packages.

      {% for arch in arches %} {% endfor %} {% for arch in arches %} {% endfor %} {% for repo in repos %} {% for arch in arches %} {% endfor %} {% endfor %}
      All Arches{{ arch }}
      All Repos FeedFeed
      {{ repo }} FeedFeed

      A newest packages feed is also available from the Arch User Repository (AUR).

      Release Feed

      Grab the ISO release feed if you want to help seed the ISO release torrents as they come out.

      Development Feeds

      Subscribe to any of the following to track bug tickets and feature requests from the Arch Linux Bugtracker:

      Project Recently Opened Tasks Recently Edited Tasks Recently Closed Tasks
      All Projects Feed Feed Feed
      Arch Linux Feed Feed Feed
      Release Engineering Feed Feed Feed
      Pacman Development Feed Feed Feed
      Community Packages Feed Feed Feed
      AUR Feed Feed Feed
      {% endblock %} ",0 "in 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. */ package org.activiti.engine.impl.context; import org.activiti.engine.impl.persistence.entity.DeploymentEntity; import org.activiti.engine.impl.persistence.entity.ExecutionEntity; import org.activiti.engine.impl.util.ProcessDefinitionUtil; import org.activiti.engine.repository.ProcessDefinition; /** * @author Tom Baeyens */ public class ExecutionContext { protected ExecutionEntity execution; public ExecutionContext(ExecutionEntity execution) { this.execution = execution; } public ExecutionEntity getExecution() { return execution; } public ExecutionEntity getProcessInstance() { return execution.getProcessInstance(); } public ProcessDefinition getProcessDefinition() { return ProcessDefinitionUtil.getProcessDefinition(execution.getProcessDefinitionId()); } public DeploymentEntity getDeployment() { String deploymentId = getProcessDefinition().getDeploymentId(); DeploymentEntity deployment = Context.getCommandContext().getDeploymentEntityManager().findById(deploymentId); return deployment; } } ",0 "\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} */ class Configuration implements ConfigurationInterface { /** * {@inheritdoc} */ public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('place_finder_api'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for // more information on that topic. return $treeBuilder; } } ",0 " the LICENSE file. #ifndef CHROME_BROWSER_SYNC_GLUE_PREFERENCE_CHANGE_PROCESSOR_H_ #define CHROME_BROWSER_SYNC_GLUE_PREFERENCE_CHANGE_PROCESSOR_H_ #pragma once #include #include ""chrome/browser/prefs/pref_change_registrar.h"" #include ""chrome/browser/prefs/pref_service.h"" #include ""chrome/browser/sync/engine/syncapi.h"" #include ""chrome/browser/sync/glue/change_processor.h"" #include ""chrome/browser/sync/glue/sync_backend_host.h"" #include ""content/common/notification_observer.h"" namespace browser_sync { class PreferenceModelAssociator; class UnrecoverableErrorHandler; // This class is responsible for taking changes from the PrefService and // applying them to the sync_api 'syncable' model, and vice versa. All // operations and use of this class are from the UI thread. class PreferenceChangeProcessor : public ChangeProcessor, public NotificationObserver { public: PreferenceChangeProcessor(PreferenceModelAssociator* model_associator, UnrecoverableErrorHandler* error_handler); virtual ~PreferenceChangeProcessor(); // NotificationObserver implementation. // PrefService -> sync_api model change application. virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details); // sync_api model -> PrefService change application. virtual void ApplyChangesFromSyncModel( const sync_api::BaseTransaction* trans, const sync_api::SyncManager::ChangeRecord* changes, int change_count); protected: virtual void StartImpl(Profile* profile); virtual void StopImpl(); private: Value* ReadPreference(sync_api::ReadNode* node, std::string* name); void StartObserving(); void StopObserving(); // The model we are processing changes from. Non-NULL when |running_| is true. PrefService* pref_service_; // The two models should be associated according to this ModelAssociator. PreferenceModelAssociator* model_associator_; // Whether we are currently processing a preference change notification. bool processing_pref_change_; PrefChangeRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(PreferenceChangeProcessor); }; } // namespace browser_sync #endif // CHROME_BROWSER_SYNC_GLUE_PREFERENCE_CHANGE_PROCESSOR_H_ ",0 "====// SingletonType.h: header file for generic singletons Purpose is to allow user to create singleton object of arbitrary type. Implementation: Shane J. Neph, June 2004, University of Washington //============================================================================*/ template class SingletonType { ~SingletonType() { /* */ } public: static T* Instance() { static T val; return(&val); } }; #endif // CSE473_SINGLETON_H ",0 "; static TextLayer *s_label_layer; static BitmapLayer *s_icon_layer; static ActionBarLayer *s_action_bar_layer; static uint8_t resp_buffer[3]; static SmartstrapAttribute *s_attr_bat_chg; static GBitmap *s_icon_bitmap, *s_tick_bitmap, *s_cross_bitmap; static void up_click_handler(ClickRecognizerRef recognizer, void *context) { Window *win = context; SmartstrapAttribute *s_attr_bat_chg = (SmartstrapAttribute *)window_get_user_data(win); SmartstrapResult result; if (!smartstrap_service_is_available(smartstrap_attribute_get_service_id(s_attr_bat_chg))) { APP_LOG(APP_LOG_LEVEL_DEBUG, ""s_attr_bat_chg is not available""); dialog_choice_window_pop(); return; } uint8_t *buffer = NULL; size_t length = 0; result = smartstrap_attribute_begin_write(s_attr_bat_chg, &buffer, &length); if (result != SmartstrapResultOk) { APP_LOG(APP_LOG_LEVEL_ERROR, ""Write of s_attr_bat_chg failed with result %d"", result); return; } uint8_t enable = 1; memcpy(buffer, &enable, 1); result = smartstrap_attribute_end_write(s_attr_bat_chg, sizeof(enable), false); if (result != SmartstrapResultOk) { APP_LOG(APP_LOG_LEVEL_ERROR, ""Write of s_attr_bat_chg failed with result %d"", result); return; } APP_LOG(APP_LOG_LEVEL_DEBUG, ""set enable charge""); } static void down_click_handler(ClickRecognizerRef recognizer, void *context) { Window *win = context; SmartstrapAttribute *s_attr_bat_chg = (SmartstrapAttribute *)window_get_user_data(win); SmartstrapResult result; if (!smartstrap_service_is_available(smartstrap_attribute_get_service_id(s_attr_bat_chg))) { APP_LOG(APP_LOG_LEVEL_DEBUG, ""s_attr_bat_chg is not available""); dialog_choice_window_pop(); return; } uint8_t *buffer = NULL; size_t length = 0; result = smartstrap_attribute_begin_write(s_attr_bat_chg, &buffer, &length); if (result != SmartstrapResultOk) { APP_LOG(APP_LOG_LEVEL_ERROR, ""Write of s_attr_bat_chg failed with result %d"", result); return; } uint8_t enable = 0; memcpy(buffer, &enable, 1); result = smartstrap_attribute_end_write(s_attr_bat_chg, sizeof(enable), false); if (result != SmartstrapResultOk) { APP_LOG(APP_LOG_LEVEL_ERROR, ""Write of s_attr_bat_chg failed with result %d"", result); return; } APP_LOG(APP_LOG_LEVEL_DEBUG, ""set disable charge""); } static void click_config_provider(void *context) { window_single_click_subscribe(BUTTON_ID_UP, up_click_handler); window_single_click_subscribe(BUTTON_ID_DOWN, down_click_handler); } static void window_load(Window *window) { Layer *window_layer = window_get_root_layer(window); GRect bounds = layer_get_bounds(window_layer); s_icon_bitmap = gbitmap_create_with_resource(RESOURCE_ID_CHARGE); GRect bitmap_bounds = gbitmap_get_bounds(s_icon_bitmap); s_icon_layer = bitmap_layer_create(GRect((bounds.size.w / 2) - (bitmap_bounds.size.w / 2) - (ACTION_BAR_WIDTH / 2), 10, bitmap_bounds.size.w, bitmap_bounds.size.h)); bitmap_layer_set_bitmap(s_icon_layer, s_icon_bitmap); bitmap_layer_set_compositing_mode(s_icon_layer, GCompOpSet); layer_add_child(window_layer, bitmap_layer_get_layer(s_icon_layer)); s_label_layer = text_layer_create(GRect(10, 10 + bitmap_bounds.size.h + 5, 124 - ACTION_BAR_WIDTH, bounds.size.h - (10 + bitmap_bounds.size.h + 15))); text_layer_set_text(s_label_layer, DIALOG_CHOICE_WINDOW_MESSAGE); text_layer_set_background_color(s_label_layer, GColorClear); text_layer_set_text_alignment(s_label_layer, GTextAlignmentCenter); text_layer_set_font(s_label_layer, fonts_get_system_font(FONT_KEY_GOTHIC_24_BOLD)); layer_add_child(window_layer, text_layer_get_layer(s_label_layer)); s_tick_bitmap = gbitmap_create_with_resource(RESOURCE_ID_TICK); s_cross_bitmap = gbitmap_create_with_resource(RESOURCE_ID_CROSS); s_action_bar_layer = action_bar_layer_create(); action_bar_layer_set_icon(s_action_bar_layer, BUTTON_ID_UP, s_tick_bitmap); action_bar_layer_set_icon(s_action_bar_layer, BUTTON_ID_DOWN, s_cross_bitmap); action_bar_layer_add_to_window(s_action_bar_layer, window); action_bar_layer_set_context(s_action_bar_layer, window); action_bar_layer_set_click_config_provider(s_action_bar_layer, click_config_provider); } static void window_unload(Window *window) { text_layer_destroy(s_label_layer); action_bar_layer_destroy(s_action_bar_layer); bitmap_layer_destroy(s_icon_layer); gbitmap_destroy(s_icon_bitmap); gbitmap_destroy(s_tick_bitmap); gbitmap_destroy(s_cross_bitmap); window_destroy(window); s_diag_window = NULL; } void dialog_choice_window_push(SmartstrapAttribute *attr) { if (!s_diag_window) { s_diag_window = window_create(); window_set_user_data(s_diag_window, attr); window_set_background_color(s_diag_window, GColorWhite); window_set_window_handlers(s_diag_window, (WindowHandlers){ .load = window_load, .unload = window_unload, }); } window_stack_push(s_diag_window, true); } void dialog_choice_window_pop() { if (s_diag_window) { window_stack_remove(s_diag_window, true); } } ",0 "s/old-licenses/gpl-2.0.html * @version 1.0 * @updated 00.00.00 **/ #################################################################################################### if ( ! is_admin() ) { return; } /** * PBWebToProspectOptionsPage **/ $PBWebToProspectOptionsPage = new PBWebToProspectOptionsPage(); class PBWebToProspectOptionsPage { /** * __construct * * @version 1.0 * @updated 02.16.13 **/ function __construct() { $this->set( 'settings', new PBSettings() ); $this->set( 'file_path', $this->settings->file_path . ""/"" . $this->settings->dir_name ); $this->add_options_page(); $this->add_actions_for_options(); } // end function __construct /** * set * * @version 1.0 * @updated 02.10.13 **/ function set( $key, $val = false ) { if ( isset( $key ) AND ! empty( $key ) ) { $this->$key = $val; } } // end function set #################################################################################################### /** * Functionality **/ #################################################################################################### /** * add_options_page * * @version 1.0 * @updated 02.17.14 **/ function add_options_page() { create__options_page( array( 'version' => $this->settings->version, 'option_name' => ""_"" . $this->settings->option_name, 'option_group' => $this->settings->option_name, 'default_options' => $this->settings->default_options, 'add_submenu_page' => array( 'parent_slug' => 'options-general.php', 'page_title' => __( 'Property Base Web to Prospect', 'pbwtp' ), 'menu_title' => __( 'Property Base', 'pbwtp' ), 'capability' => 'administrator', ), // 'options_page_title' => false, // 'options_page_desc' => 'Options page description and general information here.', // Metaboxs and Optionns 'options' => array( // pbase 'metacake' => array( 'meta_box' => array( 'title' => ""file_path/images/icon.png\"" alt=\""Zuzsa\"" /> Zuzsa"", 'context' => 'normal', 'priority' => 'core', // 'desc' => 'Description.', 'callback' => array( &$this, 'custom_meta_box_option' ), // 'save_all_settings' => __( 'Save', 'pbwtp' ), // uses value as button text & sanitize_title_with_dashes(save_all_settings) for value ), 'settings' => array( 'text' => array( 'type' => 'blank', 'validation' => 'blank', 'title' => __( 'Blank', 'pbwtp' ), // 'desc' => __( '', 'pbwtp' ), ) ), ), // end pbase 'pbase' => array( 'meta_box' => array( 'title' => ""Property Base Version"", 'context' => 'normal', 'priority' => 'core', // 'desc' => 'Description.', // 'callback' => array( &$this, 'custom_meta_box_option' ), // 'save_all_settings' => __( 'Save', 'pbwtp' ), // uses value as button text & sanitize_title_with_dashes(save_all_settings) for value ), 'settings' => array( 'version' => array( 'type' => 'select', 'validation' => 'select', 'title' => __( 'Version Number', 'pbwtp' ), 'desc' => __( 'Please select what version you current use within Property Base', 'pbwtp' ), 'options' => array( 'Select a Version' => 0, // 'Version 2' => 2, 'Version 3' => 3, ) ), 'force_subdomain' => array( 'type' => 'text', 'validation' => 'text', 'title' => __( 'Force Sub Domain', 'pbwtp' ), 'desc' => __( 'e.g. yoursubname.force.com', 'pbwtp' ), ), 'token' => array( 'type' => 'text', 'validation' => 'text', 'title' => __( 'Token', 'pbwtp' ), // 'desc' => __( 'e.g. yoursubname.force.com', 'pbwtp' ), ), /*'include__utm_campaign' => array( 'type' => 'select', 'validation' => 'select', 'title' => __( 'Include utm_campaign', 'pbwtp' ), 'desc' => __( 'This will allow the variable utm_campaign to be appended to your Specific_Lead_Source__c optional campaign data.', 'pbwtp' ), 'options' => array( 'Yes' => 1, 'No' => 0 ) ),*/ 'is_testing' => array( 'type' => 'select', 'validation' => 'select', 'title' => __( 'Test Mode', 'pbwtp' ), 'desc' => __( 'Test mode will update the Lead Source to include the word test which can be targeted in the property base system to ignored.', 'pbwtp' ), 'options' => array( 'Yes' => 1, 'No' => 0 ) ), ), ), // end pbase // pbasev3 'pbasev3' => array( // Metabox 'meta_box' => array( 'title' => __( 'Property Base V3', 'pbwtp' ), 'context' => 'normal', 'priority' => 'core', // 'desc' => 'Description.', // 'callback' => array( &$this, 'custom_meta_box_option' ), // 'save_all_settings' => __( 'Save', 'pbwtp' ), // uses value as button text & sanitize_title_with_dashes(save_all_settings) for value ), // settings and options 'settings' => array( // Single setting and option 'LeadSource' => array( 'type' => 'text', 'validation' => 'text_only', 'title' => __( 'Lead Source', 'pbwtp' ), 'desc' => __( 'e.g. Web', 'pbwtp' ), ), 'FieldName_message' => array( 'type' => 'text', 'validation' => 'text_only', 'title' => __( 'PBase Message field name', 'pbwtp' ), 'desc' => __( 'Please enter the custom field name you would like to receive the form ""message"" with in the contact object of property base.', 'pbwtp' ), ), /*'include__utm_campaign' => array( 'type' => 'select', 'validation' => 'select', 'title' => __( 'Include utm_campaign', 'pbwtp' ), 'desc' => __( 'This will allow the variable utm_campaign to be appended to your Specific_Lead_Source__c optional campaign data.', 'pbwtp' ), 'options' => array( 'Yes' => 1, 'No' => 0 ) ),*/ ), ), // end pbase // pbasev2 'pbasev2' => array( // Metabox 'meta_box' => array( 'title' => __( 'Property Base V2', 'pbwtp' ), 'context' => 'normal', 'priority' => 'core', // 'desc' => 'Description.', // 'callback' => array( &$this, 'custom_meta_box_option' ), // 'save_all_settings' => __( 'Save', 'pbwtp' ), // uses value as button text & sanitize_title_with_dashes(save_all_settings) for value ), // settings and options 'settings' => array( // Single setting and option 'ContactType__pc' => array( 'type' => 'text', 'validation' => 'text_only', 'title' => __( 'ContactType__pc', 'pbwtp' ), 'desc' => __( 'e.g. Email', 'pbwtp' ), ), 'Specific_Lead_Source__c' => array( 'type' => 'text', 'validation' => 'text_only', 'title' => __( 'Specific_Lead_Source__c', 'pbwtp' ), 'desc' => __( 'e.g. My website: Page: Short code', 'pbwtp' ), ), 'general_Lead_Source__c' => array( 'type' => 'text', 'validation' => 'text_only', 'title' => __( 'general_Lead_Source__c', 'pbwtp' ), 'desc' => __( 'e.g. Interactive', 'pbwtp' ), ), 'Lead_Type__c' => array( 'type' => 'text', 'validation' => 'text_only', 'title' => __( 'Lead_Type__c', 'pbwtp' ), 'desc' => __( 'e.g. Website Page', 'pbwtp' ), ), /*'success_page' => array( 'type' => 'text', 'validation' => 'text_only', 'title' => __( 'Success Page', 'pbwtp' ), 'desc' => __( 'Leave this blank to have the success page return to the current page', 'pbwtp' ), ), 'fail_page' => array( 'type' => 'text', 'validation' => 'text_only', 'title' => __( 'Fail Page', 'pbwtp' ), 'desc' => __( 'Leave this blank to have the fail page return to the current page', 'pbwtp' ), ),*/ 'custom-message-field' => array( 'type' => 'text', 'validation' => 'text_only', 'title' => __( 'Custom message field', 'pbwtp' ), 'desc' => __( 'This will be the field within property base that has been created to receive messages about the lead. e.g. NOTES__c', 'pbwtp' ), ), ), ), // end pbasev2 // Form 'form' => array( // Metabox 'meta_box' => array( 'title' => __( 'Form Display', 'pbwtp' ), 'context' => 'normal', 'priority' => 'core', // 'desc' => 'Description.', // 'callback' => array( &$this, 'custom_meta_box_option' ), // 'save_all_settings' => __( 'Save', 'pbwtp' ), // uses value as button text & sanitize_title_with_dashes(save_all_settings) for value ), // settings and options 'settings' => array( // Single setting and option 'title' => array( 'type' => 'text', 'validation' => 'text', 'title' => __( 'Form Title', 'pbwtp' ), ), 'desc' => array( 'type' => 'simple_text_editor', 'validation' => 'text_editor', 'title' => __( 'Form Description', 'pbwtp' ), ), 'error_message' => array( 'type' => 'simple_text_editor', 'validation' => 'text_editor', 'title' => __( 'Submission Error text', 'pbwtp' ), 'desc' => __( 'Please keep in mind that an email may only be entered into the Property Base system once, after that it will throw an error.', 'pbwtp' ), ), 'success_message' => array( 'type' => 'simple_text_editor', 'validation' => 'text_editor', 'title' => __( 'Submission Success text', 'pbwtp' ), ), ), ), // end Form // Settings 'settings' => array( // Metabox 'meta_box' => array( 'title' => __( 'Settings', 'pbwtp' ), 'context' => 'normal', 'priority' => 'core', // 'desc' => 'Description.', // 'callback' => array( &$this, 'custom_meta_box_option' ), // 'save_all_settings' => __( 'Save', 'pbwtp' ), // uses value as button text & sanitize_title_with_dashes(save_all_settings) for value ), // settings and options 'settings' => array( // Single setting and option 'remove_css' => array( 'type' => 'select', 'validation' => 'select', 'title' => __( 'Remove CSS', 'pbwtp' ), 'options' => array( 'Yes' => 1, 'No' => 0 ) ), 'reset_options' => array( 'type' => 'checkbox', 'validation' => 'reset_options', 'title' => __( 'Reset Options', 'pbwtp' ), 'desc' => __( 'Reset all options to default settings as if the plugin was just activated.', 'pbwtp' ), ), 'deactivate_plugin' => array( 'type' => 'checkbox', 'validation' => 'deactivate_plugin', 'title' => __( 'Uninstall', 'pbwtp' ), 'desc' => __( 'Delete all options from the database and deactivate the plugin. ', 'pbwtp' ), ), ), ), // end Settings ) // end options ) ); // end default_settings array } // end function add_options_page #################################################################################################### /** * Functionality **/ #################################################################################################### /** * Add Settings Field * * @version 1.0 * @updated 00.00.13 **/ function add_actions_for_options() { // add_action( ""_"" . $this->settings->option_name . ""-add_settings_field"", array( &$this, 'add_settings_field' ), 10, 2 ); add_action( ""_"" . $this->settings->option_name . ""-sanitize-option"", array( &$this, 'sanitize_callback' ), 10, 2 ); } // end function add_actions_for_options /** * Options Version Update * * @version 1.0 * @updated 00.00.13 * * ToDo: * Add switch case for version control **/ function options_version_update( $settings ) { // nothing here yet } // end function options_version_update /** * Add Settings Field * * @version 1.0 * @updated 00.00.13 **/ function add_settings_field( $field, $raw_option ) { if ( is_array( $field ) AND ! empty( $field ) ) { extract( $field, EXTR_SKIP ); } else { return; } // Options if ( isset( $field['options'] ) AND ! empty( $field['options'] ) ) { $options = $field['options']; } else { $options = false; } // Desc if ( isset( $field['desc'] ) AND ! empty( $field['desc'] ) ) { $desc = $field['desc']; } else { $desc = false; } // Desc if ( isset( $field['val'] ) AND ! empty( $field['val'] ) ) { $val = $field['val']; } else { $val = false; } switch ( $type ) { case ""blank"" : echo """"; if ( $desc ) echo ""

      $desc

      ""; break; } } // end function add_settings_field /** * Sanitize Callback * * @version 1.0 * @updated 00.00.13 **/ function sanitize_callback( $new_option, $option_args ) { switch ( $option_args['validation'] ) { case ""deactivate_plugin"" : if ( $new_option == 'on' ) { delete_option( ""_"" . $this->settings->option_name ); delete_option( ""_"" . $this->settings->option_name . ""-version"" ); $this->deactivate_plugin(); wp_redirect( home_url() . ""/wp-admin"" ); exit; } break; case ""reset_options"" : if ( $new_option == 'on' ) { delete_option( ""_"" . $this->settings->option_name ); delete_option( ""_"" . $this->settings->option_name . ""-version"" ); $new_option = false; } break; } return $new_option; } // end function sanitize_callback /** * Create Post meta form, Meta box content * * @version 1.0 * @updated 00.00.13 **/ function custom_meta_box_option( $options, $metabox ) { $style = ""background:#e9ffe9;display:inline-block;""; ?>

      Shortcode Usage:

      Copy and paste the shortcode "">[pbase_form] into the text-editor of a page, post or custom-post-type to insert your property base form.

      Widget Usage:

      Drag and drop the widget "">Property Base Form Widget to the widget area of your choice to display your Property Base Form.

      set( 'plugin_path', $this->settings->dir_name . ""/"" . $this->settings->dir_name . "".php"" ); if ( is_plugin_active( $this->plugin_path ) ) { deactivate_plugins( array( $this->plugin_path ) ); } } // end function deactivate_plugin } // end class PBWebToProspectOptionsPage",0 "/*< Diagnostic float 1*/ float diagFl2; /*< Diagnostic float 2*/ float diagFl3; /*< Diagnostic float 3*/ int16_t diagSh1; /*< Diagnostic short 1*/ int16_t diagSh2; /*< Diagnostic short 2*/ int16_t diagSh3; /*< Diagnostic short 3*/ }) mavlink_diagnostic_t; #define MAVLINK_MSG_ID_DIAGNOSTIC_LEN 18 #define MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN 18 #define MAVLINK_MSG_ID_173_LEN 18 #define MAVLINK_MSG_ID_173_MIN_LEN 18 #define MAVLINK_MSG_ID_DIAGNOSTIC_CRC 2 #define MAVLINK_MSG_ID_173_CRC 2 #if MAVLINK_COMMAND_24BIT #define MAVLINK_MESSAGE_INFO_DIAGNOSTIC { \ 173, \ ""DIAGNOSTIC"", \ 6, \ { { ""diagFl1"", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_diagnostic_t, diagFl1) }, \ { ""diagFl2"", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_diagnostic_t, diagFl2) }, \ { ""diagFl3"", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_diagnostic_t, diagFl3) }, \ { ""diagSh1"", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_diagnostic_t, diagSh1) }, \ { ""diagSh2"", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_diagnostic_t, diagSh2) }, \ { ""diagSh3"", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_diagnostic_t, diagSh3) }, \ } \ } #else #define MAVLINK_MESSAGE_INFO_DIAGNOSTIC { \ ""DIAGNOSTIC"", \ 6, \ { { ""diagFl1"", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_diagnostic_t, diagFl1) }, \ { ""diagFl2"", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_diagnostic_t, diagFl2) }, \ { ""diagFl3"", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_diagnostic_t, diagFl3) }, \ { ""diagSh1"", NULL, MAVLINK_TYPE_INT16_T, 0, 12, offsetof(mavlink_diagnostic_t, diagSh1) }, \ { ""diagSh2"", NULL, MAVLINK_TYPE_INT16_T, 0, 14, offsetof(mavlink_diagnostic_t, diagSh2) }, \ { ""diagSh3"", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_diagnostic_t, diagSh3) }, \ } \ } #endif /** * @brief Pack a diagnostic message * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param msg The MAVLink message to compress the data into * * @param diagFl1 Diagnostic float 1 * @param diagFl2 Diagnostic float 2 * @param diagFl3 Diagnostic float 3 * @param diagSh1 Diagnostic short 1 * @param diagSh2 Diagnostic short 2 * @param diagSh3 Diagnostic short 3 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_diagnostic_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, float diagFl1, float diagFl2, float diagFl3, int16_t diagSh1, int16_t diagSh2, int16_t diagSh3) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_DIAGNOSTIC_LEN]; _mav_put_float(buf, 0, diagFl1); _mav_put_float(buf, 4, diagFl2); _mav_put_float(buf, 8, diagFl3); _mav_put_int16_t(buf, 12, diagSh1); _mav_put_int16_t(buf, 14, diagSh2); _mav_put_int16_t(buf, 16, diagSh3); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIAGNOSTIC_LEN); #else mavlink_diagnostic_t packet; packet.diagFl1 = diagFl1; packet.diagFl2 = diagFl2; packet.diagFl3 = diagFl3; packet.diagSh1 = diagSh1; packet.diagSh2 = diagSh2; packet.diagSh3 = diagSh3; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIAGNOSTIC_LEN); #endif msg->msgid = MAVLINK_MSG_ID_DIAGNOSTIC; return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC); } /** * @brief Pack a diagnostic message on a channel * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param diagFl1 Diagnostic float 1 * @param diagFl2 Diagnostic float 2 * @param diagFl3 Diagnostic float 3 * @param diagSh1 Diagnostic short 1 * @param diagSh2 Diagnostic short 2 * @param diagSh3 Diagnostic short 3 * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t mavlink_msg_diagnostic_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, float diagFl1,float diagFl2,float diagFl3,int16_t diagSh1,int16_t diagSh2,int16_t diagSh3) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_DIAGNOSTIC_LEN]; _mav_put_float(buf, 0, diagFl1); _mav_put_float(buf, 4, diagFl2); _mav_put_float(buf, 8, diagFl3); _mav_put_int16_t(buf, 12, diagSh1); _mav_put_int16_t(buf, 14, diagSh2); _mav_put_int16_t(buf, 16, diagSh3); memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIAGNOSTIC_LEN); #else mavlink_diagnostic_t packet; packet.diagFl1 = diagFl1; packet.diagFl2 = diagFl2; packet.diagFl3 = diagFl3; packet.diagSh1 = diagSh1; packet.diagSh2 = diagSh2; packet.diagSh3 = diagSh3; memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIAGNOSTIC_LEN); #endif msg->msgid = MAVLINK_MSG_ID_DIAGNOSTIC; return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC); } /** * @brief Encode a diagnostic struct * * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param msg The MAVLink message to compress the data into * @param diagnostic C-struct to read the message contents from */ static inline uint16_t mavlink_msg_diagnostic_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_diagnostic_t* diagnostic) { return mavlink_msg_diagnostic_pack(system_id, component_id, msg, diagnostic->diagFl1, diagnostic->diagFl2, diagnostic->diagFl3, diagnostic->diagSh1, diagnostic->diagSh2, diagnostic->diagSh3); } /** * @brief Encode a diagnostic struct on a channel * * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param diagnostic C-struct to read the message contents from */ static inline uint16_t mavlink_msg_diagnostic_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_diagnostic_t* diagnostic) { return mavlink_msg_diagnostic_pack_chan(system_id, component_id, chan, msg, diagnostic->diagFl1, diagnostic->diagFl2, diagnostic->diagFl3, diagnostic->diagSh1, diagnostic->diagSh2, diagnostic->diagSh3); } /** * @brief Send a diagnostic message * @param chan MAVLink channel to send the message * * @param diagFl1 Diagnostic float 1 * @param diagFl2 Diagnostic float 2 * @param diagFl3 Diagnostic float 3 * @param diagSh1 Diagnostic short 1 * @param diagSh2 Diagnostic short 2 * @param diagSh3 Diagnostic short 3 */ #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS static inline void mavlink_msg_diagnostic_send(mavlink_channel_t chan, float diagFl1, float diagFl2, float diagFl3, int16_t diagSh1, int16_t diagSh2, int16_t diagSh3) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char buf[MAVLINK_MSG_ID_DIAGNOSTIC_LEN]; _mav_put_float(buf, 0, diagFl1); _mav_put_float(buf, 4, diagFl2); _mav_put_float(buf, 8, diagFl3); _mav_put_int16_t(buf, 12, diagSh1); _mav_put_int16_t(buf, 14, diagSh2); _mav_put_int16_t(buf, 16, diagSh3); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, buf, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC); #else mavlink_diagnostic_t packet; packet.diagFl1 = diagFl1; packet.diagFl2 = diagFl2; packet.diagFl3 = diagFl3; packet.diagSh1 = diagSh1; packet.diagSh2 = diagSh2; packet.diagSh3 = diagSh3; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, (const char *)&packet, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC); #endif } /** * @brief Send a diagnostic message * @param chan MAVLink channel to send the message * @param struct The MAVLink struct to serialize */ static inline void mavlink_msg_diagnostic_send_struct(mavlink_channel_t chan, const mavlink_diagnostic_t* diagnostic) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS mavlink_msg_diagnostic_send(chan, diagnostic->diagFl1, diagnostic->diagFl2, diagnostic->diagFl3, diagnostic->diagSh1, diagnostic->diagSh2, diagnostic->diagSh3); #else _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, (const char *)diagnostic, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC); #endif } #if MAVLINK_MSG_ID_DIAGNOSTIC_LEN <= MAVLINK_MAX_PAYLOAD_LEN /* This varient of _send() can be used to save stack space by re-using memory from the receive buffer. The caller provides a mavlink_message_t which is the size of a full mavlink message. This is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ static inline void mavlink_msg_diagnostic_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float diagFl1, float diagFl2, float diagFl3, int16_t diagSh1, int16_t diagSh2, int16_t diagSh3) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS char *buf = (char *)msgbuf; _mav_put_float(buf, 0, diagFl1); _mav_put_float(buf, 4, diagFl2); _mav_put_float(buf, 8, diagFl3); _mav_put_int16_t(buf, 12, diagSh1); _mav_put_int16_t(buf, 14, diagSh2); _mav_put_int16_t(buf, 16, diagSh3); _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, buf, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC); #else mavlink_diagnostic_t *packet = (mavlink_diagnostic_t *)msgbuf; packet->diagFl1 = diagFl1; packet->diagFl2 = diagFl2; packet->diagFl3 = diagFl3; packet->diagSh1 = diagSh1; packet->diagSh2 = diagSh2; packet->diagSh3 = diagSh3; _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIAGNOSTIC, (const char *)packet, MAVLINK_MSG_ID_DIAGNOSTIC_MIN_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_LEN, MAVLINK_MSG_ID_DIAGNOSTIC_CRC); #endif } #endif #endif // MESSAGE DIAGNOSTIC UNPACKING /** * @brief Get field diagFl1 from diagnostic message * * @return Diagnostic float 1 */ static inline float mavlink_msg_diagnostic_get_diagFl1(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 0); } /** * @brief Get field diagFl2 from diagnostic message * * @return Diagnostic float 2 */ static inline float mavlink_msg_diagnostic_get_diagFl2(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 4); } /** * @brief Get field diagFl3 from diagnostic message * * @return Diagnostic float 3 */ static inline float mavlink_msg_diagnostic_get_diagFl3(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 8); } /** * @brief Get field diagSh1 from diagnostic message * * @return Diagnostic short 1 */ static inline int16_t mavlink_msg_diagnostic_get_diagSh1(const mavlink_message_t* msg) { return _MAV_RETURN_int16_t(msg, 12); } /** * @brief Get field diagSh2 from diagnostic message * * @return Diagnostic short 2 */ static inline int16_t mavlink_msg_diagnostic_get_diagSh2(const mavlink_message_t* msg) { return _MAV_RETURN_int16_t(msg, 14); } /** * @brief Get field diagSh3 from diagnostic message * * @return Diagnostic short 3 */ static inline int16_t mavlink_msg_diagnostic_get_diagSh3(const mavlink_message_t* msg) { return _MAV_RETURN_int16_t(msg, 16); } /** * @brief Decode a diagnostic message into a struct * * @param msg The message to decode * @param diagnostic C-struct to decode the message contents into */ static inline void mavlink_msg_diagnostic_decode(const mavlink_message_t* msg, mavlink_diagnostic_t* diagnostic) { #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS diagnostic->diagFl1 = mavlink_msg_diagnostic_get_diagFl1(msg); diagnostic->diagFl2 = mavlink_msg_diagnostic_get_diagFl2(msg); diagnostic->diagFl3 = mavlink_msg_diagnostic_get_diagFl3(msg); diagnostic->diagSh1 = mavlink_msg_diagnostic_get_diagSh1(msg); diagnostic->diagSh2 = mavlink_msg_diagnostic_get_diagSh2(msg); diagnostic->diagSh3 = mavlink_msg_diagnostic_get_diagSh3(msg); #else uint8_t len = msg->len < MAVLINK_MSG_ID_DIAGNOSTIC_LEN? msg->len : MAVLINK_MSG_ID_DIAGNOSTIC_LEN; memset(diagnostic, 0, MAVLINK_MSG_ID_DIAGNOSTIC_LEN); memcpy(diagnostic, _MAV_PAYLOAD(msg), len); #endif } ",0 " <%= htmlWebpackPlugin.options.title %>
      ",0 "id
      +0x008 Size : Uint2B
      +0x00a Flags : UChar
      +0x00b SmallTagIndex : UChar
      +0x008 SubSegmentCode : Uint4B
      +0x00c PreviousSize : Uint2B
      +0x00e SegmentOffset : UChar
      +0x00e LFHFlags : UChar
      +0x00f UnusedBytes : UChar
      +0x008 CompactHeader : Uint8B
      ",0 "p-congress-bjp-hung-assembly.jpg ---

      नई दिल्ली: हरियाणा चुनाव के नतीजे काफी दिलचस्प हो गए हैं। अब तक के रुझान में भाजपा यहां आगे जरूर चल रही है, लेकिन बहुमत का आंकड़ा उससे दूर है। जबकि कांग्रेस ने जबरदस्त वापसी की है और जेजेपी भी बढ़िया प्रदर्शन कर रही है। ऐसे में बीजेपी को सरकार बनाने के लिए जेजेपी की जरूरत पड़ सकती है। लिहाजा हरियाणा के मुख्यमंत्री मनोहर लाल खट्टर को बीजेपी आलाकमान ने दिल्ली बुलाया है। वहीं कांग्रेस अध्यक्ष सोनिया गांधी ने भी भूपेन्द्र सिंह हुड्डा से बात की है। इस बीच जननायक जनता पार्टी (जेजेपी) की भूमिका काफी अहम हो गई है। जानकारी के मुताबिक प्रदेश के पूर्व मुख्यमंत्री प्रकाश सिंह बादल को भाजपा की ओर से जेजेपी से मध्यस्थता के लिए आगे किया जा सकता है। वहीं यह भी खबर है कि जेजपी ने सीएम पद की शर्त के साथ कांग्रेस को समर्थन का प्रस्ताव दिया है। हालांकि थोड़ी देर में तस्वीर साफ हो जाएगी कि हरियाणा की जनता ने किस पार्टी को प्रदेश की कमान सौंपने का निर्णय लिया है। राज्य में सोमवार को मतदान हुआ था।

      ",0 "al Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include ""pbd/memento_command.h"" #include ""evoral/Parameter.hpp"" #include ""ardour/session.h"" namespace ARDOUR { class MidiSource; class AutomationList; /** A class for late-binding a MidiSource and a Parameter to an AutomationList */ class MidiAutomationListBinder : public MementoCommandBinder { public: MidiAutomationListBinder (boost::shared_ptr, Evoral::Parameter); MidiAutomationListBinder (XMLNode *, ARDOUR::Session::SourceMap const &); ARDOUR::AutomationList* get () const; void add_state (XMLNode *); private: boost::shared_ptr _source; Evoral::Parameter _parameter; }; } ",0 """stylesheet"" type=""text/css"" href=""style.css"" />
      «

      "">

      "">

      "">OPERATOR:

      "">

      "">ADDRES S :

      "">PO Box 269000 Oklahoma City, OK 73126
      Bendjxon 1-10H

      "">WELL NAME:

      "">SURFACE LOCATION:
      CASING LOCATION:
      BOTTOM HOLE LOCATION:

      "">265’ FSL & 2140’ FWL Section 10 T159N - RIOOW
      Appx. 708’ FSL & 2045 ’ FWL Section 10 casing at 9531’ MD, appx. 9296.5’ TVD
      10079.35’ north from surface & 202.72’ west from
      ~"".4‘.‘AA nan"" ’30:, E‘kTT 9' 1007’ U‘IIT

      "">511113.05, uPPK. ADJ I‘th (X4 174/ 1' VVL:
      S3 — T159N fl RIOOW
      33—105-03837
      29820
      Williams

      "">API#:
      ND PERMIT #:

      "">COUNTY:

      "">STATE:

      "">BASIN:

      "">FIELD :

      "">PROSPECT:
      WELL TYPE: ELEVATION:
      SPUD DATE:
      TOTAL DEPTH/DATE: DAYS FROM SPUD:
      BOTTOM HOLE DATA:

      "">

      "">Continental Resources, Inc.

      "">North Dakota

      "">Williston

      "">Green Lake

      "">

      "">single leg horizontal in Middle Bakken RG: 2053’ SUB: 24’ KB: 2077’
      drill surface shoe on 11/26/14 @ 6:00 AM
      19178’ / 12/15/14
      19 days from spud
      Total Measured Depth: 19178’ Inclination: 90.0 degrees Azimuth: 355.2 degrees
      True Vertical Depth: 9154.79’ Vertical Section: 10081 .30’

      "">

      ",0 "ct { uint32_t percent; ngx_http_variable_value_t value; } ngx_http_split_clients_part_t; typedef struct { ngx_http_complex_value_t value; ngx_array_t parts; } ngx_http_split_clients_ctx_t; static char *ngx_conf_split_clients_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); static char *ngx_http_split_clients(ngx_conf_t *cf, ngx_command_t *dummy, void *conf); static ngx_command_t ngx_http_split_clients_commands[] = { { ngx_string(""split_clients""), NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_TAKE2, ngx_conf_split_clients_block, NGX_HTTP_MAIN_CONF_OFFSET, 0, NULL }, ngx_null_command }; static ngx_http_module_t ngx_http_split_clients_module_ctx = { NULL, /* preconfiguration */ NULL, /* postconfiguration */ NULL, /* create main configuration */ NULL, /* init main configuration */ NULL, /* create server configuration */ NULL, /* merge server configuration */ NULL, /* create location configuration */ NULL /* merge location configuration */ }; ngx_module_t ngx_http_split_clients_module = { NGX_MODULE_V1, &ngx_http_split_clients_module_ctx, /* module context */ ngx_http_split_clients_commands, /* module directives */ NGX_HTTP_MODULE, /* module type */ NULL, /* init master */ NULL, /* init module */ NULL, /* init process */ NULL, /* init thread */ NULL, /* exit thread */ NULL, /* exit process */ NULL, /* exit master */ NGX_MODULE_V1_PADDING }; static ngx_int_t ngx_http_split_clients_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data) { ngx_http_split_clients_ctx_t *ctx = (ngx_http_split_clients_ctx_t *) data; uint32_t hash; ngx_str_t val; ngx_uint_t i; ngx_http_split_clients_part_t *part; *v = ngx_http_variable_null_value; if (ngx_http_complex_value(r, &ctx->value, &val) != NGX_OK) { return NGX_OK; } hash = ngx_murmur_hash2(val.data, val.len); part = ctx->parts.elts; for (i = 0; i < ctx->parts.nelts; i++) { ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, ""http split: %uD %uD"", hash, part[i].percent); if (hash < part[i].percent) { *v = part[i].value; return NGX_OK; } } return NGX_OK; } static char * ngx_conf_split_clients_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { char *rv; ngx_str_t *value, name; ngx_uint_t i, sum, last; ngx_conf_t save; ngx_http_variable_t *var; ngx_http_split_clients_ctx_t *ctx; ngx_http_split_clients_part_t *part; ngx_http_compile_complex_value_t ccv; ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_split_clients_ctx_t)); if (ctx == NULL) { return NGX_CONF_ERROR; } value = cf->args->elts; ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t)); ccv.cf = cf; ccv.value = &value[1]; ccv.complex_value = &ctx->value; if (ngx_http_compile_complex_value(&ccv) != NGX_OK) { return NGX_CONF_ERROR; } name = value[2]; name.len--; name.data++; var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGEABLE); if (var == NULL) { return NGX_CONF_ERROR; } var->get_handler = ngx_http_split_clients_variable; var->data = (uintptr_t) ctx; if (ngx_array_init(&ctx->parts, cf->pool, 2, sizeof(ngx_http_split_clients_part_t)) != NGX_OK) { return NGX_CONF_ERROR; } save = *cf; cf->ctx = ctx; cf->handler = ngx_http_split_clients; cf->handler_conf = conf; rv = ngx_conf_parse(cf, NULL); *cf = save; if (rv != NGX_CONF_OK) { return rv; } sum = 0; last = 0; part = ctx->parts.elts; for (i = 0; i < ctx->parts.nelts; i++) { sum = part[i].percent ? sum + part[i].percent : 10000; if (sum > 10000) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, ""percent sum is more than 100%%""); return NGX_CONF_ERROR; } if (part[i].percent) { part[i].percent = (uint32_t) (last + 0xffffffff / 10000 * part[i].percent); } else { part[i].percent = 0xffffffff; } last = part[i].percent; } return rv; } static char * ngx_http_split_clients(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) { ngx_int_t n; ngx_str_t *value; ngx_http_split_clients_ctx_t *ctx; ngx_http_split_clients_part_t *part; ctx = cf->ctx; value = cf->args->elts; part = ngx_array_push(&ctx->parts); if (part == NULL) { return NGX_CONF_ERROR; } if (value[0].len == 1 && value[0].data[0] == '*') { part->percent = 0; } else { if (value[0].data[value[0].len - 1] != '%') { goto invalid; } n = ngx_atofp(value[0].data, value[0].len - 1, 2); if (n == NGX_ERROR || n == 0) { goto invalid; } part->percent = (uint32_t) n; } part->value.len = value[1].len; part->value.valid = 1; part->value.no_cacheable = 0; part->value.not_found = 0; part->value.data = value[1].data; return NGX_CONF_OK; invalid: ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, ""invalid percent value \""%V\"""", &value[0]); return NGX_CONF_ERROR; } ",0 "z; protected function setUp() { $this->object = new FizzBuzz(); $this->fizzBuzz = $this->object->run(); } function testLength() { $this->assertCount(100, $this->fizzBuzz); } function testNormalNumbersAreThemselves() { $this->assertEquals(1, $this->fizzBuzz[0]); } function testMultipleOf3HasFizz() { $this->assertEquals('Fizz', $this->fizzBuzz[2]); } function testMultipleOf5HasBuzz() { $this->assertEquals('Buzz', $this->fizzBuzz[4]); } function testMultipleOf15isFizzBuzz() { $this->assertEquals('FizzBuzz', $this->fizzBuzz[14]); } function testContains3HasFizz() { $this->assertEquals('Fizz', $this->fizzBuzz[12]); } function testContains5HasBuzz() { $this->assertEquals('Buzz', $this->fizzBuzz[51]); } function testContains3And5IsFizzBuzz() { $this->assertEquals('FizzBuzz', $this->fizzBuzz[52]); } } ",0 " */ /* This file is part of the class library */ /* SoPlex --- the Sequential object-oriented simPlex. */ /* */ /* Copyright (C) 1996-2018 Konrad-Zuse-Zentrum */ /* fuer Informationstechnik Berlin */ /* */ /* SoPlex is distributed under the terms of the ZIB Academic Licence. */ /* */ /* You should have received a copy of the ZIB Academic License */ /* along with SoPlex; see the file COPYING. If not email to soplex@zib.de. */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /**@file ssvectorbase.h * @brief Semi sparse vector. */ #ifndef _SSVECTORBASE_H_ #define _SSVECTORBASE_H_ #include #include ""spxdefines.h"" #include ""dvectorbase.h"" #include ""idxset.h"" #include ""spxalloc.h"" namespace soplex { template < class R > class SVectorBase; template < class R > class SVSetBase; /**@brief Semi sparse vector. * @ingroup Algebra * * This class implements semi-sparse vectors. Such are #DVectorBase%s where the indices of its nonzero elements can be * stored in an extra IdxSet. Only elements with absolute value > #epsilon are considered to be nonzero. Since really * storing the nonzeros is not always convenient, an SSVectorBase provides two different stati: setup and not setup. * An SSVectorBase being setup means that the nonzero indices are available, otherwise an SSVectorBase is just an * ordinary DVectorBase with an empty IdxSet. Note that due to arithmetic operation, zeros can slip in, i.e., it is * only guaranteed that at least every non-zero is in the IdxSet. */ template < class R > class SSVectorBase : public DVectorBase, protected IdxSet { private: friend class DVectorBase; friend class VectorBase; template < class S > friend class DSVectorBase; // ------------------------------------------------------------------------------------------------------------------ /**@name Data */ //@{ /// Is the SSVectorBase set up? bool setupStatus; /// A value x with |x| < epsilon is considered zero. R epsilon; /// Allocates enough space to accommodate \p newmax values. void setMax(int newmax) { assert(idx != 0); assert(newmax != 0); assert(newmax >= IdxSet::size()); len = newmax; spx_realloc(idx, len); } //@} public: // ------------------------------------------------------------------------------------------------------------------ /**@name Status of an SSVectorBase * * An SSVectorBase can be set up or not. In case it is set up, its IdxSet correctly contains all indices of nonzero * elements of the SSVectorBase. Otherwise, it does not contain any useful data. Whether or not an SSVectorBase is * setup can be determined with the method \ref soplex::SSVectorBase::isSetup() ""isSetup()"". * * There are three methods for directly affecting the setup status of an SSVectorBase: * * - unSetup(): This method sets the status to ``not setup''. * * - setup(): This method initializes the IdxSet to the SSVectorBase's nonzero indices and sets the status to * ``setup''. * * - forceSetup(): This method sets the status to ``setup'' without verifying that the IdxSet correctly contains all * nonzero indices. It may be used when the nonzero indices have been computed externally. */ //@{ /// Only used in slufactor.cpp. R* get_ptr() { return DVectorBase::get_ptr(); } /// Returns the non-zero epsilon used. R getEpsilon() const { return epsilon; } /// Changes the non-zero epsilon, invalidating the setup. */ void setEpsilon(R eps) { if( eps != epsilon ) { epsilon = eps; setupStatus = false; } } /// Returns setup status. bool isSetup() const { return setupStatus; } /// Makes SSVectorBase not setup. void unSetup() { setupStatus = false; } /// Initializes nonzero indices for elements with absolute values above #epsilon and sets all other elements to 0. void setup() { if( !isSetup() ) { IdxSet::clear(); int d = dim(); num = 0; for( int i = 0; i < d; ++i ) { if( VectorBase::val[i] != R(0) ) { if( spxAbs(VectorBase::val[i]) <= epsilon ) VectorBase::val[i] = R(0); else { idx[num] = i; num++; } } } setupStatus = true; assert(isConsistent()); } } /// Forces setup status. void forceSetup() { setupStatus = true; } //@} // ------------------------------------------------------------------------------------------------------------------ /**@name Methods for setup SSVectorBases */ //@{ /// Returns index of the \p n 'th nonzero element. int index(int n) const { assert(isSetup()); return IdxSet::index(n); } /// Returns value of the \p n 'th nonzero element. R value(int n) const { assert(isSetup()); assert(n >= 0 && n < size()); return VectorBase::val[idx[n]]; } /// Finds the position of index \p i in the #IdxSet, or -1 if \p i doesn't exist. int pos(int i) const { assert(isSetup()); return IdxSet::pos(i); } /// Returns the number of nonzeros. int size() const { assert(isSetup()); return IdxSet::size(); } /// Adds nonzero (\p i, \p x) to SSVectorBase. /** No nonzero with index \p i must exist in the SSVectorBase. */ void add(int i, R x) { assert(VectorBase::val[i] == R(0)); assert(pos(i) < 0); addIdx(i); VectorBase::val[i] = x; } /// Sets \p i 'th element to \p x. void setValue(int i, R x) { assert(i >= 0); assert(i < DVectorBase::dim()); if( isSetup() ) { int n = pos(i); if( n < 0 ) { if( spxAbs(x) > epsilon ) IdxSet::add(1, &i); } else if( x == R(0) ) clearNum(n); } VectorBase::val[i] = x; assert(isConsistent()); } /// Scale \p i 'th element by a void scaleValue(int i, int scaleExp) { assert(i >= 0); assert(i < DVectorBase::dim()); VectorBase::val[i] = spxLdexp(VectorBase::val[i], scaleExp); assert(isConsistent()); } /// Clears element \p i. void clearIdx(int i) { if( isSetup() ) { int n = pos(i); if( n >= 0 ) remove(n); } VectorBase::val[i] = 0; assert(isConsistent()); } /// Sets \p n 'th nonzero element to 0 (index \p n must exist). void clearNum(int n) { assert(isSetup()); assert(index(n) >= 0); VectorBase::val[index(n)] = 0; remove(n); assert(isConsistent()); } //@} // ------------------------------------------------------------------------------------------------------------------ /**@name Methods independent of the Status */ //@{ /// Returns \p i 'th value. R operator[](int i) const { return VectorBase::val[i]; } /// Returns array indices. const int* indexMem() const { return idx; } /// Returns array values. const R* values() const { return VectorBase::val; } /// Returns indices. const IdxSet& indices() const { return *this; } /// Returns array indices. int* altIndexMem() { unSetup(); return idx; } /// Returns array values. R* altValues() { unSetup(); return VectorBase::val; } /// Returns indices. IdxSet& altIndices() { unSetup(); return *this; } //@} // ------------------------------------------------------------------------------------------------------------------ /**@name Arithmetic operations */ //@{ /// Addition. template < class S > SSVectorBase& operator+=(const VectorBase& vec) { VectorBase::operator+=(vec); if (isSetup()) { setupStatus = false; setup(); } return *this; } /// Addition. template < class S > SSVectorBase& operator+=(const SVectorBase& vec); /// Addition. template < class S > SSVectorBase& operator+=(const SSVectorBase& vec) { assert(vec.isSetup()); for( int i = vec.size() - 1; i >= 0; --i ) VectorBase::val[vec.index(i)] += vec.value(i); if( isSetup() ) { setupStatus = false; setup(); } return *this; } /// Subtraction. template < class S > SSVectorBase& operator-=(const VectorBase& vec) { VectorBase::operator-=(vec); if( isSetup() ) { setupStatus = false; setup(); } return *this; } /// Subtraction. template < class S > SSVectorBase& operator-=(const SVectorBase& vec); /// Subtraction. template < class S > SSVectorBase& operator-=(const SSVectorBase& vec) { if( vec.isSetup() ) { for( int i = vec.size() - 1; i >= 0; --i ) VectorBase::val[vec.index(i)] -= vec.value(i); } else VectorBase::operator-=(VectorBase(vec)); if( isSetup() ) { setupStatus = false; setup(); } return *this; } /// Scaling. template < class S > SSVectorBase& operator*=(S x) { assert(isSetup()); assert(x != S(0)); for( int i = size() - 1; i >= 0; --i ) VectorBase::val[index(i)] *= x; assert(isConsistent()); return *this; } // Inner product. template < class S > R operator*(const SSVectorBase& w) { setup(); R x = R(0); int i = size() - 1; int j = w.size() - 1; // both *this and w non-zero vectors? if( i >= 0 && j >= 0 ) { int vi = index(i); int wj = w.index(j); while( i != 0 && j != 0 ) { if( vi == wj ) { x += VectorBase::val[vi] * R(w.val[wj]); vi = index(--i); wj = w.index(--j); } else if( vi > wj ) vi = index(--i); else wj = w.index(--j); } /* check remaining indices */ while( i != 0 && vi != wj ) vi = index(--i); while( j != 0 && vi != wj ) wj = w.index(--j); if( vi == wj ) x += VectorBase::val[vi] * R(w.val[wj]); } return x; } /// Addition of a scaled vector. ///@todo SSVectorBase::multAdd() should be rewritten without pointer arithmetic. template < class S, class T > SSVectorBase& multAdd(S xx, const SVectorBase& vec); /// Addition of a scaled vector. template < class S, class T > SSVectorBase& multAdd(S x, const VectorBase& vec) { VectorBase::multAdd(x, vec); if( isSetup() ) { setupStatus = false; setup(); } return *this; } /// Assigns pair wise vector product to SSVectorBase. template < class S, class T > SSVectorBase& assignPWproduct4setup(const SSVectorBase& x, const SSVectorBase& y); /// Assigns \f$x^T \cdot A\f$ to SSVectorBase. template < class S, class T > SSVectorBase& assign2product(const SSVectorBase& x, const SVSetBase& A); /// Assigns SSVectorBase to \f$A \cdot x\f$ for a setup \p x. template < class S, class T > SSVectorBase& assign2product4setup(const SVSetBase& A, const SSVectorBase& x); public: /// Assigns SSVectorBase to \f$A \cdot x\f$ thereby setting up \p x. template < class S, class T > SSVectorBase& assign2productAndSetup(const SVSetBase& A, SSVectorBase& x); /// Maximum absolute value, i.e., infinity norm. R maxAbs() const { if( isSetup() ) { R maxabs = 0; for( int i = 0; i < num; ++i ) { R x = spxAbs(VectorBase::val[idx[i]]); if( x > maxabs ) maxabs = x; } return maxabs; } else return VectorBase::maxAbs(); } /// Squared euclidian norm. R length2() const { R x = 0; if( isSetup() ) { for( int i = 0; i < num; ++i ) x += VectorBase::val[idx[i]] * VectorBase::val[idx[i]]; } else x = VectorBase::length2(); return x; } /// Floating point approximation of euclidian norm (without any approximation guarantee). Real length() const { return spxSqrt((Real)length2()); } //@} // ------------------------------------------------------------------------------------------------------------------ /**@name Miscellaneous */ //@{ /// Dimension of VectorBase. int dim() const { return VectorBase::dimen; } /// Resets dimension to \p newdim. void reDim(int newdim) { for( int i = IdxSet::size() - 1; i >= 0; --i ) { if( index(i) >= newdim ) remove(i); } DVectorBase::reDim(newdim); setMax(DVectorBase::memSize() + 1); assert(isConsistent()); } /// Sets number of nonzeros (thereby unSetup SSVectorBase). void setSize(int n) { assert(n >= 0); assert(n <= IdxSet::max()); unSetup(); num = n; } /// Resets memory consumption to \p newsize. void reMem(int newsize) { DVectorBase::reSize(newsize); assert(isConsistent()); setMax(DVectorBase::memSize() + 1); } /// Clears vector. void clear() { if( isSetup() ) { for( int i = 0; i < num; ++i ) VectorBase::val[idx[i]] = 0; } else VectorBase::clear(); IdxSet::clear(); setupStatus = true; assert(isConsistent()); } /// consistency check. bool isConsistent() const { #ifdef ENABLE_CONSISTENCY_CHECKS if( VectorBase::dim() > IdxSet::max() ) return MSGinconsistent(""SSVectorBase""); if( VectorBase::dim() < IdxSet::dim() ) return MSGinconsistent(""SSVectorBase""); if( isSetup() ) { for( int i = 0; i < VectorBase::dim(); ++i ) { int j = pos(i); if( j < 0 && spxAbs(VectorBase::val[i]) > 0 ) { MSG_ERROR( std::cerr << ""ESSVEC01 i = "" << i << ""\tidx = "" << j << ""\tval = "" << std::setprecision(16) << VectorBase::val[i] << std::endl; ) return MSGinconsistent(""SSVectorBase""); } } } return DVectorBase::isConsistent() && IdxSet::isConsistent(); #else return true; #endif } //@} // ------------------------------------------------------------------------------------------------------------------ /**@name Constructors / Destructors */ //@{ /// Default constructor. explicit SSVectorBase(int p_dim, R p_eps = Param::epsilon()) : DVectorBase(p_dim) , IdxSet() , setupStatus(true) , epsilon(p_eps) { len = (p_dim < 1) ? 1 : p_dim; spx_alloc(idx, len); VectorBase::clear(); assert(isConsistent()); } /// Copy constructor. template < class S > SSVectorBase(const SSVectorBase& vec) : DVectorBase(vec) , IdxSet() , setupStatus(vec.setupStatus) , epsilon(vec.epsilon) { len = (vec.dim() < 1) ? 1 : vec.dim(); spx_alloc(idx, len); IdxSet::operator=(vec); assert(isConsistent()); } /// Copy constructor. /** The redundancy with the copy constructor below is necessary since otherwise the compiler doesn't realize that it * could use the more general one with S = R and generates a shallow copy constructor. */ SSVectorBase(const SSVectorBase& vec) : DVectorBase(vec) , IdxSet() , setupStatus(vec.setupStatus) , epsilon(vec.epsilon) { len = (vec.dim() < 1) ? 1 : vec.dim(); spx_alloc(idx, len); IdxSet::operator=(vec); assert(isConsistent()); } /// Constructs nonsetup copy of \p vec. template < class S > explicit SSVectorBase(const VectorBase& vec, R eps = Param::epsilon()) : DVectorBase(vec) , IdxSet() , setupStatus(false) , epsilon(eps) { len = (vec.dim() < 1) ? 1 : vec.dim(); spx_alloc(idx, len); assert(isConsistent()); } /// Sets up \p rhs vector, and assigns it. template < class S > void setup_and_assign(SSVectorBase& rhs) { clear(); epsilon = rhs.epsilon; setMax(rhs.max()); DVectorBase::reDim(rhs.dim()); if( rhs.isSetup() ) { IdxSet::operator=(rhs); for( int i = size() - 1; i >= 0; --i ) { int j = index(i); VectorBase::val[j] = rhs.val[j]; } } else { int d = rhs.dim(); num = 0; for( int i = 0; i < d; ++i ) { if( rhs.val[i] != 0 ) { if( spxAbs(rhs.val[i]) > epsilon ) { rhs.idx[num] = i; idx[num] = i; VectorBase::val[i] = rhs.val[i]; num++; } else rhs.val[i] = 0; } } rhs.num = num; rhs.setupStatus = true; } setupStatus = true; assert(rhs.isConsistent()); assert(isConsistent()); } /// Assigns only the elements of \p rhs. template < class S > SSVectorBase& assign(const SVectorBase& rhs); /// Assignment operator. template < class S > SSVectorBase& operator=(const SSVectorBase& rhs) { assert(rhs.isConsistent()); if( this != &rhs ) { clear(); epsilon = rhs.epsilon; setMax(rhs.max()); DVectorBase::reDim(rhs.dim()); if( rhs.isSetup() ) { IdxSet::operator=(rhs); for( int i = size() - 1; i >= 0; --i ) { int j = index(i); VectorBase::val[j] = rhs.val[j]; } } else { int d = rhs.dim(); num = 0; for( int i = 0; i < d; ++i ) { if( spxAbs(rhs.val[i]) > epsilon ) { VectorBase::val[i] = rhs.val[i]; idx[num] = i; num++; } } } setupStatus = true; } assert(isConsistent()); return *this; } /// Assignment operator. SSVectorBase& operator=(const SSVectorBase& rhs) { assert(rhs.isConsistent()); if( this != &rhs ) { clear(); epsilon = rhs.epsilon; setMax(rhs.max()); DVectorBase::reDim(rhs.dim()); if( rhs.isSetup() ) { IdxSet::operator=(rhs); for( int i = size() - 1; i >= 0; --i ) { int j = index(i); VectorBase::val[j] = rhs.val[j]; } } else { num = 0; for( int i = 0; i < rhs.dim(); ++i ) { if( spxAbs(rhs.val[i]) > epsilon ) { VectorBase::val[i] = rhs.val[i]; idx[num] = i; num++; } } } setupStatus = true; } assert(isConsistent()); return *this; } /// Assignment operator. template < class S > SSVectorBase& operator=(const SVectorBase& rhs); /// Assignment operator. template < class S > SSVectorBase& operator=(const VectorBase& rhs) { unSetup(); VectorBase::operator=(rhs); assert(isConsistent()); return *this; } /// destructor ~SSVectorBase() { if( idx ) spx_free(idx); } //@} private: // ------------------------------------------------------------------------------------------------------------------ /**@name Private helpers */ //@{ /// Assignment helper. template < class S, class T > SSVectorBase& assign2product1(const SVSetBase& A, const SSVectorBase& x); /// Assignment helper. template < class S, class T > SSVectorBase& assign2productShort(const SVSetBase& A, const SSVectorBase& x); /// Assignment helper. template < class S, class T > SSVectorBase& assign2productFull(const SVSetBase& A, const SSVectorBase& x); //@} }; } // namespace soplex #endif // _SSVECTORBASE_H_ ",0 "on. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0 * * SPDX-License-Identifier: EPL-2.0 */ package org.openhab.binding.enocean.internal.eep.D2_01; import static org.openhab.binding.enocean.internal.EnOceanBindingConstants.*; import org.eclipse.smarthome.config.core.Configuration; import org.eclipse.smarthome.config.discovery.DiscoveryResultBuilder; import org.eclipse.smarthome.core.library.types.DecimalType; import org.eclipse.smarthome.core.library.types.OnOffType; import org.eclipse.smarthome.core.library.types.PercentType; import org.eclipse.smarthome.core.library.types.QuantityType; import org.eclipse.smarthome.core.library.unit.SmartHomeUnits; import org.eclipse.smarthome.core.types.Command; import org.eclipse.smarthome.core.types.RefreshType; import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.UnDefType; import org.eclipse.smarthome.core.util.HexUtils; import org.openhab.binding.enocean.internal.config.EnOceanChannelDimmerConfig; import org.openhab.binding.enocean.internal.eep.Base._VLDMessage; import org.openhab.binding.enocean.internal.messages.ERP1Message; /** * * @author Daniel Weber - Initial contribution */ public abstract class D2_01 extends _VLDMessage { protected final byte cmdMask = 0x0f; protected final byte outputValueMask = 0x7f; protected final byte outputChannelMask = 0x1f; protected final byte CMD_ACTUATOR_SET_STATUS = 0x01; protected final byte CMD_ACTUATOR_STATUS_QUERY = 0x03; protected final byte CMD_ACTUATOR_STATUS_RESPONE = 0x04; protected final byte CMD_ACTUATOR_MEASUREMENT_QUERY = 0x06; protected final byte CMD_ACTUATOR_MEASUREMENT_RESPONE = 0x07; protected final byte AllChannels_Mask = 0x1e; protected final byte ChannelA_Mask = 0x00; protected final byte ChannelB_Mask = 0x01; protected final byte STATUS_SWITCHING_ON = 0x01; protected final byte STATUS_SWITCHING_OFF = 0x00; protected final byte STATUS_DIMMING_100 = 0x64; public D2_01() { super(); } public D2_01(ERP1Message packet) { super(packet); } protected byte getCMD() { return (byte) (bytes[0] & cmdMask); } protected void setSwitchingData(OnOffType command, byte outputChannel) { if (command == OnOffType.ON) { setData(CMD_ACTUATOR_SET_STATUS, outputChannel, STATUS_SWITCHING_ON); } else { setData(CMD_ACTUATOR_SET_STATUS, outputChannel, STATUS_SWITCHING_OFF); } } protected void setSwitchingQueryData(byte outputChannel) { setData(CMD_ACTUATOR_STATUS_QUERY, outputChannel); } protected State getSwitchingData() { if (getCMD() == CMD_ACTUATOR_STATUS_RESPONE) { return (bytes[bytes.length - 1] & outputValueMask) == STATUS_SWITCHING_OFF ? OnOffType.OFF : OnOffType.ON; } return UnDefType.UNDEF; } protected byte getChannel() { return (byte) (bytes[1] & outputChannelMask); } protected State getSwitchingData(byte channel) { if (getCMD() == CMD_ACTUATOR_STATUS_RESPONE && (getChannel() == channel || getChannel() == AllChannels_Mask)) { return (bytes[bytes.length - 1] & outputValueMask) == STATUS_SWITCHING_OFF ? OnOffType.OFF : OnOffType.ON; } return UnDefType.UNDEF; } protected void setDimmingData(Command command, byte outputChannel, Configuration config) { byte outputValue; if (command instanceof DecimalType) { if (((DecimalType) command).equals(DecimalType.ZERO)) { outputValue = STATUS_SWITCHING_OFF; } else { outputValue = ((DecimalType) command).byteValue(); } } else if ((OnOffType) command == OnOffType.ON) { outputValue = STATUS_DIMMING_100; } else { outputValue = STATUS_SWITCHING_OFF; } EnOceanChannelDimmerConfig c = config.as(EnOceanChannelDimmerConfig.class); byte rampingTime = (c.rampingTime == null) ? Zero : c.rampingTime.byteValue(); setData(CMD_ACTUATOR_SET_STATUS, (byte) ((rampingTime << 5) | outputChannel), outputValue); } protected State getDimmingData() { if (getCMD() == CMD_ACTUATOR_STATUS_RESPONE) { return new PercentType((bytes[bytes.length - 1] & outputValueMask)); } return UnDefType.UNDEF; } protected void setEnergyMeasurementQueryData(byte outputChannel) { setData(CMD_ACTUATOR_MEASUREMENT_QUERY, outputChannel); } protected void setPowerMeasurementQueryData(byte outputChannel) { setData(CMD_ACTUATOR_MEASUREMENT_QUERY, (byte) (0x20 | outputChannel)); } protected State getEnergyMeasurementData() { if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONE) { float factor = 1; switch (bytes[1] >>> 5) { case 0: factor /= 3600.0; break; case 1: factor /= 1000; break; case 2: factor = 1; break; default: return UnDefType.UNDEF; } float energy = Long.parseLong(HexUtils.bytesToHex(new byte[] { bytes[2], bytes[3], bytes[4], bytes[5] }), 16) * factor; return new QuantityType<>(energy, SmartHomeUnits.KILOWATT_HOUR); } return UnDefType.UNDEF; } protected State getPowerMeasurementData() { if (getCMD() == CMD_ACTUATOR_MEASUREMENT_RESPONE) { float factor = 1; switch (bytes[1] >>> 5) { case 3: factor = 1; break; case 4: factor /= 1000; break; default: return UnDefType.UNDEF; } float power = Long.parseLong(HexUtils.bytesToHex(new byte[] { bytes[2], bytes[3], bytes[4], bytes[5] }), 16) * factor; return new QuantityType<>(power, SmartHomeUnits.WATT); } return UnDefType.UNDEF; } @Override public void addConfigPropertiesTo(DiscoveryResultBuilder discoveredThingResultBuilder) { discoveredThingResultBuilder.withProperty(PARAMETER_SENDINGEEPID, getEEPType().getId()) .withProperty(PARAMETER_RECEIVINGEEPID, getEEPType().getId()); } @Override protected void convertFromCommandImpl(String channelId, String channelTypeId, Command command, State currentState, Configuration config) { if (channelId.equals(CHANNEL_GENERAL_SWITCHING)) { if (command == RefreshType.REFRESH) { setSwitchingQueryData(AllChannels_Mask); } else { setSwitchingData((OnOffType) command, AllChannels_Mask); } } else if (channelId.equals(CHANNEL_GENERAL_SWITCHINGA)) { if (command == RefreshType.REFRESH) { setSwitchingQueryData(ChannelA_Mask); } else { setSwitchingData((OnOffType) command, ChannelA_Mask); } } else if (channelId.equals(CHANNEL_GENERAL_SWITCHINGB)) { if (command == RefreshType.REFRESH) { setSwitchingQueryData(ChannelB_Mask); } else { setSwitchingData((OnOffType) command, ChannelB_Mask); } } else if (channelId.equals(CHANNEL_DIMMER)) { if (command == RefreshType.REFRESH) { setSwitchingQueryData(AllChannels_Mask); } else { setDimmingData(command, AllChannels_Mask, config); } } else if (channelId.equals(CHANNEL_INSTANTPOWER) && command == RefreshType.REFRESH) { setPowerMeasurementQueryData(AllChannels_Mask); } else if (channelId.equals(CHANNEL_TOTALUSAGE) && command == RefreshType.REFRESH) { setEnergyMeasurementQueryData(AllChannels_Mask); } } @Override protected State convertToStateImpl(String channelId, String channelTypeId, State currentState, Configuration config) { switch (channelId) { case CHANNEL_GENERAL_SWITCHING: return getSwitchingData(); case CHANNEL_GENERAL_SWITCHINGA: return getSwitchingData(ChannelA_Mask); case CHANNEL_GENERAL_SWITCHINGB: return getSwitchingData(ChannelB_Mask); case CHANNEL_DIMMER: return getDimmingData(); case CHANNEL_INSTANTPOWER: return getPowerMeasurementData(); case CHANNEL_TOTALUSAGE: return getEnergyMeasurementData(); } return UnDefType.UNDEF; } } ",0 "gine.core.bll.Backend; import org.ovirt.engine.core.common.businessentities.VDS; import org.ovirt.engine.core.common.businessentities.VdsProtocol; import org.ovirt.engine.core.common.businessentities.VdsStatic; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.common.interfaces.FutureVDSCall; import org.ovirt.engine.core.common.vdscommands.FutureVDSCommandType; import org.ovirt.engine.core.common.vdscommands.TimeBoundPollVDSCommandParameters; import org.ovirt.engine.core.common.vdscommands.VDSReturnValue; import org.ovirt.engine.core.dal.dbbroker.DbFacade; import org.ovirt.engine.core.utils.transaction.TransactionMethod; import org.ovirt.engine.core.utils.transaction.TransactionSupport; import org.ovirt.engine.core.vdsbroker.ResourceManager; /** * We need to detect whether vdsm supports jsonrpc or only xmlrpc. It is confusing to users * when they have cluster 3.5+ and connect to vdsm <3.5 which supports only xmlrpc. * In order to present version information in such situation we need fallback to xmlrpc. * */ public class ProtocolDetector { private Integer connectionTimeout = null; private Integer retryAttempts = null; private VDS vds; public ProtocolDetector(VDS vds) { this.vds = vds; this.retryAttempts = Config. getValue(ConfigValues.ProtocolFallbackRetries); this.connectionTimeout = Config. getValue(ConfigValues.ProtocolFallbackTimeoutInMilliSeconds); } /** * Attempts to connect to vdsm using a proxy from {@code VdsManager} for a host. * There are 3 attempts to connect. * * @return true if connected or false if connection failed. */ public boolean attemptConnection() { boolean connected = false; try { for (int i = 0; i < this.retryAttempts; i++) { long timeout = Config. getValue(ConfigValues.SetupNetworksPollingTimeout); FutureVDSCall task = Backend.getInstance().getResourceManager().runFutureVdsCommand(FutureVDSCommandType.TimeBoundPoll, new TimeBoundPollVDSCommandParameters(vds.getId(), timeout, TimeUnit.SECONDS)); VDSReturnValue returnValue = task.get(timeout, TimeUnit.SECONDS); connected = returnValue.getSucceeded(); if (connected) { break; } Thread.sleep(this.connectionTimeout); } } catch (TimeoutException | InterruptedException ignored) { } return connected; } /** * Stops {@code VdsManager} for a host. */ public void stopConnection() { ResourceManager.getInstance().RemoveVds(this.vds.getId()); } /** * Fall back the protocol and attempts the connection {@link ProtocolDetector#attemptConnection()}. * * @return true if connected or false if connection failed. */ public boolean attemptFallbackProtocol() { vds.setProtocol(VdsProtocol.XML); ResourceManager.getInstance().AddVds(vds, false); return attemptConnection(); } /** * Updates DB with fall back protocol (xmlrpc). */ public void setFallbackProtocol() { final VdsStatic vdsStatic = this.vds.getStaticData(); vdsStatic.setProtocol(VdsProtocol.XML); TransactionSupport.executeInNewTransaction(new TransactionMethod() { @Override public Void runInTransaction() { DbFacade.getInstance().getVdsStaticDao().update(vdsStatic); return null; } }); } } ",0 "ab'; var tab_title = (title) ? (' title=""' + title + '""') : ''; var _li = document.createElement('li'); _li.id = tab_id; _li.className = 'tab'; _li.innerHTML = '' + text + """"; ccc.appendChild(_li); } function is_in_array(elem, array) { for (var i = 0, length = array.length; i < length; i++) { // === is correct (IE) if (array[i] === elem) { return i; } } return -1; } function nextTag(node) { var node = node.nextSibling; return (node && node.nodeType != 1) ? nextTag(node) : node; }
        ",0 "this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.storm.mongodb.topology; import org.apache.storm.spout.SpoutOutputCollector; import org.apache.storm.task.TopologyContext; import org.apache.storm.topology.IRichSpout; import org.apache.storm.topology.OutputFieldsDeclarer; import org.apache.storm.tuple.Fields; import org.apache.storm.tuple.Values; import java.util.Map; import java.util.Random; import java.util.UUID; public class WordSpout implements IRichSpout { boolean isDistributed; SpoutOutputCollector collector; public static final String[] words = new String[] { ""apple"", ""orange"", ""pineapple"", ""banana"", ""watermelon"" }; public WordSpout() { this(true); } public WordSpout(boolean isDistributed) { this.isDistributed = isDistributed; } public boolean isDistributed() { return this.isDistributed; } @SuppressWarnings(""rawtypes"") public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) { this.collector = collector; } public void close() { } public void nextTuple() { final Random rand = new Random(); final String word = words[rand.nextInt(words.length)]; this.collector.emit(new Values(word), UUID.randomUUID()); Thread.yield(); } public void ack(Object msgId) { } public void fail(Object msgId) { } public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields(""word"")); } @Override public void activate() { } @Override public void deactivate() { } @Override public Map getComponentConfiguration() { return null; } } ",0 "c * PURPOSE: Reads the user input and then envokes the selected * command by the user. * PROGRAMMERS: Lee Schroeder */ #include ""diskpart.h"" BOOL exit_main(INT argc, LPWSTR *argv); BOOL rem_main(INT argc, LPWSTR *argv); COMMAND cmds[] = { {L""active"", active_main, IDS_HELP_CMD_ACTIVE, IDS_HELP_CMD_DESC_ACTIVE}, {L""add"", add_main, IDS_HELP_CMD_ADD, IDS_HELP_CMD_DESC_ADD}, {L""assign"", assign_main, IDS_HELP_CMD_ASSIGN, IDS_HELP_CMD_DESC_ASSIGN}, {L""attach"", attach_main, IDS_HELP_CMD_ATTACH, IDS_HELP_CMD_DESC_ATTACH}, {L""attributes"", attributes_main, IDS_HELP_CMD_ATTRIBUTES, IDS_HELP_CMD_DESC_ATTRIBUTES}, {L""automount"", automount_main, IDS_HELP_CMD_AUTOMOUNT, IDS_HELP_CMD_DESC_AUTOMOUNT}, {L""break"", break_main, IDS_HELP_CMD_BREAK, IDS_HELP_CMD_DESC_BREAK}, {L""clean"", clean_main, IDS_HELP_CMD_CLEAN, IDS_HELP_CMD_DESC_CLEAN}, {L""compact"", compact_main, IDS_HELP_CMD_COMPACT, IDS_HELP_CMD_DESC_COMPACT}, {L""convert"", convert_main, IDS_HELP_CMD_CONVERT, IDS_HELP_CMD_DESC_CONVERT}, {L""create"", create_main, IDS_HELP_CMD_CREATE, IDS_HELP_CMD_DESC_CREATE}, {L""delete"", delete_main, IDS_HELP_CMD_DELETE, IDS_HELP_CMD_DESC_DELETE}, {L""detail"", detail_main, IDS_HELP_CMD_DETAIL, IDS_HELP_CMD_DESC_DETAIL}, {L""detach"", detach_main, IDS_HELP_CMD_DETACH, IDS_HELP_CMD_DESC_DETACH}, {L""exit"", NULL, IDS_NONE, IDS_HELP_CMD_DESC_EXIT}, {L""expand"", expand_main, IDS_HELP_CMD_EXPAND, IDS_HELP_CMD_DESC_EXPAND}, {L""extend"", extend_main, IDS_HELP_CMD_EXTEND, IDS_HELP_CMD_DESC_EXTEND}, {L""filesystems"", filesystems_main, IDS_HELP_CMD_FILESYSTEMS, IDS_HELP_CMD_DESC_FS}, {L""format"", format_main, IDS_HELP_CMD_FORMAT, IDS_HELP_CMD_DESC_FORMAT}, {L""gpt"", gpt_main, IDS_HELP_CMD_GPT, IDS_HELP_CMD_DESC_GPT}, {L""help"", help_main, IDS_HELP_CMD_HELP, IDS_HELP_CMD_DESC_HELP}, {L""import"", import_main, IDS_HELP_CMD_IMPORT, IDS_HELP_CMD_DESC_IMPORT}, {L""inactive"", inactive_main, IDS_HELP_CMD_INACTIVE, IDS_HELP_CMD_DESC_INACTIVE}, {L""list"", list_main, IDS_HELP_CMD_LIST, IDS_HELP_CMD_DESC_LIST}, {L""merge"", merge_main, IDS_HELP_CMD_MERGE, IDS_HELP_CMD_DESC_MERGE}, {L""offline"", offline_main, IDS_HELP_CMD_OFFLINE, IDS_HELP_CMD_DESC_OFFLINE}, {L""online"", online_main, IDS_HELP_CMD_ONLINE, IDS_HELP_CMD_DESC_ONLINE}, {L""recover"", recover_main, IDS_HELP_CMD_RECOVER, IDS_HELP_CMD_DESC_RECOVER}, {L""rem"", NULL, IDS_NONE, IDS_HELP_CMD_DESC_REM}, {L""remove"", remove_main, IDS_HELP_CMD_REMOVE, IDS_HELP_CMD_DESC_REMOVE}, {L""repair"", repair_main, IDS_HELP_CMD_REPAIR, IDS_HELP_CMD_DESC_REPAIR}, {L""rescan"", rescan_main, IDS_HELP_CMD_RESCAN, IDS_HELP_CMD_DESC_RESCAN}, {L""retain"", retain_main, IDS_HELP_CMD_RETAIN, IDS_HELP_CMD_DESC_RETAIN}, {L""san"", san_main, IDS_HELP_CMD_SAN, IDS_HELP_CMD_DESC_SAN}, {L""select"", select_main, IDS_HELP_CMD_SELECT, IDS_HELP_CMD_DESC_SELECT}, {L""setid"", setid_main, IDS_HELP_CMD_SETID, IDS_HELP_CMD_DESC_SETID}, {L""shrink"", shrink_main, IDS_HELP_CMD_SHRINK, IDS_HELP_CMD_DESC_SHRINK}, {L""uniqueid"", uniqueid_main, IDS_HELP_CMD_UNIQUEID, IDS_HELP_CMD_DESC_UNIQUEID}, {NULL, NULL, IDS_NONE, IDS_NONE} }; /* FUNCTIONS *****************************************************************/ /* * InterpretCmd(char *cmd_line, char *arg_line): * compares the command name to a list of available commands, and * determines which function to envoke. */ BOOL InterpretCmd(int argc, LPWSTR *argv) { PCOMMAND cmdptr; /* First, determine if the user wants to exit or to use a comment */ if(wcsicmp(argv[0], L""exit"") == 0) return FALSE; if(wcsicmp(argv[0], L""rem"") == 0) return TRUE; /* Scan internal command table */ for (cmdptr = cmds; cmdptr->name; cmdptr++) { if (wcsicmp(argv[0], cmdptr->name) == 0) return cmdptr->func(argc, argv); } help_cmdlist(); return TRUE; } /* * InterpretScript(char *line): * The main function used for when reading commands from scripts. */ BOOL InterpretScript(LPWSTR input_line) { LPWSTR args_vector[MAX_ARGS_COUNT]; INT args_count = 0; BOOL bWhiteSpace = TRUE; LPWSTR ptr; memset(args_vector, 0, sizeof(args_vector)); ptr = input_line; while (*ptr != 0) { if (iswspace(*ptr) || *ptr == L'\n') { *ptr = 0; bWhiteSpace = TRUE; } else { if ((bWhiteSpace == TRUE) && (args_count < MAX_ARGS_COUNT)) { args_vector[args_count] = ptr; args_count++; } bWhiteSpace = FALSE; } ptr++; } /* sends the string to find the command */ return InterpretCmd(args_count, args_vector); } /* * InterpretMain(): * Contents for the main program loop as it reads each line, and then * it sends the string to interpret_line, where it determines what * command to use. */ VOID InterpretMain(VOID) { WCHAR input_line[MAX_STRING_SIZE]; LPWSTR args_vector[MAX_ARGS_COUNT]; INT args_count = 0; BOOL bWhiteSpace = TRUE; BOOL bRun = TRUE; LPWSTR ptr; while (bRun == TRUE) { args_count = 0; memset(args_vector, 0, sizeof(args_vector)); /* shown just before the input where the user places commands */ PrintResourceString(IDS_APP_PROMPT); /* gets input from the user. */ fgetws(input_line, MAX_STRING_SIZE, stdin); ptr = input_line; while (*ptr != 0) { if (iswspace(*ptr) || *ptr == L'\n') { *ptr = 0; bWhiteSpace = TRUE; } else { if ((bWhiteSpace == TRUE) && (args_count < MAX_ARGS_COUNT)) { args_vector[args_count] = ptr; args_count++; } bWhiteSpace = FALSE; } ptr++; } /* sends the string to find the command */ bRun = InterpretCmd(args_count, args_vector); } } ",0 "a name=""generator"" content=""rustdoc""> libc::MAP_LOCKED - Rust

        libc::MAP_LOCKED [] [src]

        pub const MAP_LOCKED: c_int = 0x02000
        ",0 "istribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * piRSS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with piRSS. If not, see . */ package de.codefu.android.rss.updateservice; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.util.Log; import de.codefu.android.rss.CursorChangedReceiver; import de.codefu.android.rss.db.ItemProvider; /** * Helper that defines the communication between the Activities and Services. *

        * One important thing covered here are insert intents. An insert intent is an * intent whose receiver is the {@link InsertService} and that communicates that * some RSS feed data should be inserted into the database. This intent has two * different forms: *

          *
        • One uses the {@link #CONTENT}
        • extra whose value is the data that was * downloaded from the RSS feed. *
        • The other form uses the {@link #CONTENT_REF} extra whose value is the ID * of a row in an auxiliary database table that has the data that was downloaded * from the RSS feed.
        • *
        * The reason for this intent having two different kinds of behavior is that * normally passing the RSS feed data directly is better in terms of CPU cycles. * But an intent is passed using RPC and for RPC data there is a maximum size. * So whenever feed data is larger than that maximum size {@link ServiceComm} * stores it in the database and passes the ID of that database entry using the * {@link #CONTENT_REF} extra. * * @author mj */ public class ServiceComm { /** * The key for the extra hat has the ID of the feed whose data is attached * or referenced. */ public static final String FEED_ID = ""feedid""; /** * The key for the extra that has the RSS feed data. */ private static final String CONTENT = ""content""; /** * The key for the extra that has the ID of the row in the auxiliary table * where the RSS feed data is stored. */ private static final String CONTENT_REF = ""contentid""; /** * Wrapper for the information extracted from the insert intent. */ public static class IntentContent { /** * The data to insert. */ public String content; /** * The ID of the feed for which to insert the data. */ public long feedId; } /** * The maximum size of data that can be stored in an intent. */ // TODO: Get correct max size private static final int MAX_RPC_SIZE = 50 * 1024; /** * Name of a broadcast that is sent when polling starts. */ public static final String POLLING_STARTED = ""pollingstarted""; /** * Name of a broadcast that is sent when there are problems during polling. */ public static final String POLLING_PROBLEM = ""pollingproblem""; /** * Creates an insert intent. *

        * If the data given is too large for the RPC system (larger than * {@link #MAX_RPC_SIZE}) the data is stored in a database and the ID of * that data in the database is stored in the intent. Otherwise the data * itself is stored in the intent. * * @param c * the context to create the intent for * @param feedId * the ID of the feed whose data is in body * @param body * the data of the RSS feed * @return an intent object ready for sending */ public static Intent createInsertIntent(Context c, long feedId, String body) { final Intent i = new Intent(c, InsertService.class); if (body.length() > MAX_RPC_SIZE) { final Uri uri = ItemProvider.CONTENT_URI_AUX; final ContentValues cv = new ContentValues(); cv.put(""content"", body); final Uri id = c.getContentResolver().insert(uri, cv); i.putExtra(CONTENT_REF, id); } else { i.putExtra(CONTENT, body); } i.putExtra(FEED_ID, feedId); Log.d(""ServComm"", ""Created "" + i); return i; } /** * Takes an insert intent created with * {@link #createInsertIntent(Context, long, String)} and retrieves the data * in it. *

        * The handling of the data in the intent (reference or directly attached * data) is totally transparent. The caller also does not have to care about * the maintenance of the auxiliary table. * * @param c * the content to use for a possible database access * @param intent * the intent to read from * @return the object with the data and feed ID read from the intent. */ public static IntentContent getInsertContent(Context c, Intent intent) { final IntentContent ic = new IntentContent(); final Bundle extras = intent.getExtras(); final Object contentRefO = extras.get(CONTENT_REF); ic.feedId = extras.getLong(FEED_ID); if (contentRefO != null) { if (contentRefO instanceof Uri) { final Uri contentRef = (Uri) contentRefO; final Cursor cursor = c.getContentResolver().query(contentRef, null, null, null, null); if (cursor != null) { if (cursor.moveToFirst()) { ic.content = cursor.getString(cursor.getColumnIndex(ItemProvider.AUX_COL_CONTENT)); } cursor.close(); } c.getContentResolver().delete(contentRef, null, null); } Log.i(""ServComm"", ""Read intent for feed "" + ic.feedId + "" from aux table""); } else { ic.content = extras.getString(CONTENT); Log.i(""ServComm"", ""Read intent for feed "" + ic.feedId); } return ic; } private static void sendBroadcast(Context context, String action) { final Intent intent = new Intent(action); intent.setPackage(CursorChangedReceiver.PACKAGE_NAME); context.sendBroadcast(intent); } /** * Sends a broadcast to announce that the data in the DB has changed. * * @param context * the content to use for sending the intent */ public static void sendDataChangedBroadcast(Context context) { sendBroadcast(context, CursorChangedReceiver.DATA_CHANGED); } /** * Sends a broadcast to announce that polling has stated. * * @param context * the content to use for sending the intent */ public static void sendPollingStartedBroadcast(Context context) { sendBroadcast(context, POLLING_STARTED); } /** * Sends a broadcast to announce that there was a problem during the * download for a given feed. * * @param context * the content to use for sending the intent * @param feedId * the ID of the feed that was attempted to poll */ public static void sendPollingProblemBroadcast(Context context, long feedId) { final Intent intent = new Intent(POLLING_PROBLEM); intent.setPackage(CursorChangedReceiver.PACKAGE_NAME); intent.putExtra(FEED_ID, feedId); context.sendBroadcast(intent); } public static void sendPollIntent(Context context, long feedId) { final Intent i = new Intent(context, UpdateService.class); i.putExtra(ServiceComm.FEED_ID, feedId); context.startService(i); } /** * Sends an intent to the {@link AutoPollService} to trigger polling the * feeds for which automatic polling is configured. * * @param context * the context to use for sending the intent */ public static void sendAutoPollIntent(Context context) { final Intent i = new Intent(context, AutoPollService.class); context.startService(i); } } ",0 "PRE>

        SYNOPSIS

               #include <curses.h>
        
               int keybound(int keycode, int count);
        
        
        

        DESCRIPTION

               This is an extension to the curses library.  It permits an
               application to determine the string which  is  defined  in
               the terminfo for specific keycodes.
        
        
        

        RETURN VALUE

               The  keycode  must  be  greater  than  zero,  else NULL is
               returned.  If it does not correspond  to  a  defined  key,
               then  NULL is returned.  Otherwise, the function returns a
               string, which must be freed by the caller.
        
        
        

        PORTABILITY

               These routines are specific to  ncurses.   They  were  not
               supported  on  Version 7, BSD or System V implementations.
               It is recommended that any code depending on them be  con-
               ditioned using NCURSES_VERSION.
        
        
        

        SEE ALSO

               define_key(3x), keyok(3x).
        
        
        

        AUTHOR

               Thomas Dickey.
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        

        Man(1) output converted with man2html
        ",0 "annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** *

        Java class for anonymous complex type. * *

        The following schema fragment specifies the expected content contained within this class. * *

         * <complexType>
         *   <complexContent>
         *     <restriction base=""{http://www.w3.org/2001/XMLSchema}anyType"">
         *       <sequence>
         *         <element name=""ret"" type=""{urn:api3}soapDocument"" maxOccurs=""unbounded""/>
         *       </sequence>
         *     </restriction>
         *   </complexContent>
         * </complexType>
         * 
        * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = """", propOrder = { ""ret"" }) @XmlRootElement(name = ""getClientDocumentsResponse"") @Generated(value = ""com.sun.tools.xjc.Driver"", date = ""2015-10-25T05:29:34+06:00"", comments = ""JAXB RI v2.2.11"") public class GetClientDocumentsResponse { @XmlElement(required = true) @Generated(value = ""com.sun.tools.xjc.Driver"", date = ""2015-10-25T05:29:34+06:00"", comments = ""JAXB RI v2.2.11"") protected List ret; /** * Gets the value of the ret property. * *

        * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the ret property. * *

        * For example, to add a new item, do as follows: *

             *    getRet().add(newItem);
             * 
        * * *

        * Objects of the following type(s) are allowed in the list * {@link SoapDocument } * * */ @Generated(value = ""com.sun.tools.xjc.Driver"", date = ""2015-10-25T05:29:34+06:00"", comments = ""JAXB RI v2.2.11"") public List getRet() { if (ret == null) { ret = new ArrayList(); } return this.ret; } } ",0 "#include ""st.h"" #define CINNAMON_TYPE_GENERIC_CONTAINER (cinnamon_generic_container_get_type ()) #define CINNAMON_GENERIC_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CINNAMON_TYPE_GENERIC_CONTAINER, CinnamonGenericContainer)) #define CINNAMON_GENERIC_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CINNAMON_TYPE_GENERIC_CONTAINER, CinnamonGenericContainerClass)) #define CINNAMON_IS_GENERIC_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CINNAMON_TYPE_GENERIC_CONTAINER)) #define CINNAMON_IS_GENERIC_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CINNAMON_TYPE_GENERIC_CONTAINER)) #define CINNAMON_GENERIC_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CINNAMON_TYPE_GENERIC_CONTAINER, CinnamonGenericContainerClass)) typedef struct { float min_size; float natural_size; /* */ guint _refcount; } CinnamonGenericContainerAllocation; #define CINNAMON_TYPE_GENERIC_CONTAINER_ALLOCATION (cinnamon_generic_container_allocation_get_type ()) GType cinnamon_generic_container_allocation_get_type (void); typedef struct _CinnamonGenericContainer CinnamonGenericContainer; typedef struct _CinnamonGenericContainerClass CinnamonGenericContainerClass; typedef struct _CinnamonGenericContainerPrivate CinnamonGenericContainerPrivate; struct _CinnamonGenericContainer { StContainer parent; CinnamonGenericContainerPrivate *priv; }; struct _CinnamonGenericContainerClass { StContainerClass parent_class; }; GType cinnamon_generic_container_get_type (void) G_GNUC_CONST; guint cinnamon_generic_container_get_n_skip_paint (CinnamonGenericContainer *self); gboolean cinnamon_generic_container_get_skip_paint (CinnamonGenericContainer *self, ClutterActor *child); void cinnamon_generic_container_set_skip_paint (CinnamonGenericContainer *self, ClutterActor *child, gboolean skip); #endif /* __CINNAMON_GENERIC_CONTAINER_H__ */ ",0 "ort java.util.ArrayList; import java.util.List; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.Query; /** * * @author Christian Plonka (cplonka81@gmail.com) */ public class QueryPipeline { private List builders; private Query currentQuery; public Query getCurrentQuery() { return currentQuery; } public Query generateQuery() { return currentQuery = generateQuery(false); } public Query generateBaseQuery() { return generateQuery(true); } private Query generateQuery(boolean baseQuery) { BooleanQuery.Builder ret = new BooleanQuery.Builder(); for (IQueryBuilder builder : builders) { Query query = null; if (baseQuery) { // only create basequery if (builder.isBaseQuery()) { query = builder.createQuery(); } } else { query = builder.createQuery(); } if (query != null) { ret.add(query, builder.getCondition()); } } return ret.build(); } public void addQueryBuilder(IQueryBuilder builder) { if (builders == null) { builders = new ArrayList(); } builders.add(builder); } public void removeQueryBuilder(IQueryBuilder builder) { if (builders != null) { builders.remove(builder); } } } ",0 "s.js"">

        FAILED (This TC requires JavaScript enabled)
        ",0 "eProvider; import com.ironz.binaryprefs.event.EventBridge; import com.ironz.binaryprefs.exception.TransactionInvalidatedException; import com.ironz.binaryprefs.file.transaction.FileTransaction; import com.ironz.binaryprefs.file.transaction.TransactionElement; import com.ironz.binaryprefs.serialization.SerializerFactory; import com.ironz.binaryprefs.serialization.serializer.persistable.Persistable; import com.ironz.binaryprefs.serialization.strategy.SerializationStrategy; import com.ironz.binaryprefs.serialization.strategy.impl.*; import com.ironz.binaryprefs.task.barrier.FutureBarrier; import com.ironz.binaryprefs.task.TaskExecutor; import java.util.*; import java.util.concurrent.locks.Lock; final class BinaryPreferencesEditor implements PreferencesEditor { private static final String TRANSACTED_TWICE_MESSAGE = ""Transaction should be applied or committed only once!""; private final Map strategyMap = new HashMap<>(); private final Set removeSet = new HashSet<>(); private final FileTransaction fileTransaction; private final EventBridge bridge; private final TaskExecutor taskExecutor; private final SerializerFactory serializerFactory; private final CacheProvider cacheProvider; private final CacheCandidateProvider candidateProvider; private final Lock writeLock; private boolean invalidated; BinaryPreferencesEditor(FileTransaction fileTransaction, EventBridge bridge, TaskExecutor taskExecutor, SerializerFactory serializerFactory, CacheProvider cacheProvider, CacheCandidateProvider candidateProvider, Lock writeLock) { this.fileTransaction = fileTransaction; this.bridge = bridge; this.taskExecutor = taskExecutor; this.serializerFactory = serializerFactory; this.cacheProvider = cacheProvider; this.candidateProvider = candidateProvider; this.writeLock = writeLock; } @Override public PreferencesEditor putString(String key, String value) { if (value == null) { return remove(key); } writeLock.lock(); try { SerializationStrategy strategy = new StringSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putStringSet(String key, Set value) { if (value == null) { return remove(key); } writeLock.lock(); try { SerializationStrategy strategy = new StringSetSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putInt(String key, int value) { writeLock.lock(); try { SerializationStrategy strategy = new IntegerSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putLong(String key, long value) { writeLock.lock(); try { SerializationStrategy strategy = new LongSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putFloat(String key, float value) { writeLock.lock(); try { SerializationStrategy strategy = new FloatSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putBoolean(String key, boolean value) { writeLock.lock(); try { SerializationStrategy strategy = new BooleanSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putPersistable(String key, T value) { if (value == null) { return remove(key); } writeLock.lock(); try { SerializationStrategy strategy = new PersistableSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putByte(String key, byte value) { writeLock.lock(); try { SerializationStrategy strategy = new ByteSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putShort(String key, short value) { writeLock.lock(); try { SerializationStrategy strategy = new ShortSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putChar(String key, char value) { writeLock.lock(); try { SerializationStrategy strategy = new CharSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putDouble(String key, double value) { writeLock.lock(); try { SerializationStrategy strategy = new DoubleSerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor putByteArray(String key, byte[] value) { writeLock.lock(); try { SerializationStrategy strategy = new ByteArraySerializationStrategy(value, serializerFactory); strategyMap.put(key, strategy); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor remove(String key) { writeLock.lock(); try { removeSet.add(key); return this; } finally { writeLock.unlock(); } } @Override public PreferencesEditor clear() { writeLock.lock(); try { Set all = candidateProvider.keys(); removeSet.addAll(all); return this; } finally { writeLock.unlock(); } } @Override public void apply() { writeLock.lock(); try { performTransaction(); } finally { writeLock.unlock(); } } @Override public boolean commit() { writeLock.lock(); try { FutureBarrier barrier = performTransaction(); return barrier.completeBlockingWithStatus(); } finally { writeLock.unlock(); } } private FutureBarrier performTransaction() { removeCache(); storeCache(); invalidate(); return taskExecutor.submit(new Runnable() { @Override public void run() { commitTransaction(); } }); } private void removeCache() { for (String name : removeSet) { candidateProvider.remove(name); cacheProvider.remove(name); } } private void storeCache() { for (String name : strategyMap.keySet()) { SerializationStrategy strategy = strategyMap.get(name); Object value = strategy.getValue(); candidateProvider.put(name); cacheProvider.put(name, value); } } private void invalidate() { if (invalidated) { throw new TransactionInvalidatedException(TRANSACTED_TWICE_MESSAGE); } invalidated = true; } private void commitTransaction() { List transaction = createTransaction(); fileTransaction.commit(transaction); notifyListeners(transaction); } private List createTransaction() { List elements = new LinkedList<>(); elements.addAll(removePersistence()); elements.addAll(storePersistence()); return elements; } private List removePersistence() { List elements = new LinkedList<>(); for (String name : removeSet) { TransactionElement e = TransactionElement.createRemovalElement(name); elements.add(e); } return elements; } private List storePersistence() { Set strings = strategyMap.keySet(); List elements = new LinkedList<>(); for (String name : strings) { SerializationStrategy strategy = strategyMap.get(name); byte[] bytes = strategy.serialize(); TransactionElement e = TransactionElement.createUpdateElement(name, bytes); elements.add(e); } return elements; } private void notifyListeners(List transaction) { for (TransactionElement element : transaction) { String name = element.getName(); byte[] bytes = element.getContent(); if (element.getAction() == TransactionElement.ACTION_REMOVE) { bridge.notifyListenersRemove(name); } if (element.getAction() == TransactionElement.ACTION_UPDATE) { bridge.notifyListenersUpdate(name, bytes); } } } }",0 " libre software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the COPYING file for more details. */ #ifndef GROUPCHATFORM_H #define GROUPCHATFORM_H #include #include #include #include #include #include #include #include #include ""widget/tool/chattextedit.h"" #include ""ui_widget.h"" // Spacing in px inserted when the author of the last message changes #define AUTHOR_CHANGE_SPACING 5 class Group; class GroupChatForm : public QObject { Q_OBJECT public: GroupChatForm(Group* chatGroup); ~GroupChatForm(); void show(Ui::Widget& ui); void setName(QString newName); void addGroupMessage(QString message, int peerId); void addMessage(QString author, QString message, QString date=QTime::currentTime().toString(""hh:mm"")); void addMessage(QLabel* author, QLabel* message, QLabel* date); void onUserListChanged(); signals: void sendMessage(int, QString); private slots: void onSendTriggered(); void onSliderRangeChanged(); void onChatContextMenuRequested(QPoint pos); void onSaveLogClicked(); private: Group* group; QHBoxLayout *headLayout, *mainFootLayout; QVBoxLayout *headTextLayout, *mainLayout; QGridLayout *mainChatLayout; QLabel *avatar, *name, *nusers, *namesList; ChatTextEdit *msgEdit; QPushButton *sendButton; QScrollArea *chatArea; QWidget *main, *head, *chatAreaWidget; QString previousName; int curRow; bool lockSliderToBottom; }; #endif // GROUPCHATFORM_H ",0 " 0x00000002 #define DGA_BLIT_RECT 0x00000004 #define DGA_BLIT_RECT_TRANS 0x00000008 #define DGA_PIXMAP_AVAILABLE 0x00000010 #define DGA_INTERLACED 0x00010000 #define DGA_DOUBLESCAN 0x00020000 #define DGA_FLIP_IMMEDIATE 0x00000001 #define DGA_FLIP_RETRACE 0x00000002 #define DGA_COMPLETED 0x00000000 #define DGA_PENDING 0x00000001 #define DGA_NEED_ROOT 0x00000001 typedef struct { int num; /* A unique identifier for the mode (num > 0) */ char *name; /* name of mode given in the XF86Config */ int VSync_num; int VSync_den; int flags; /* DGA_CONCURRENT_ACCESS, etc... */ int imageWidth; /* linear accessible portion (pixels) */ int imageHeight; int pixmapWidth; /* Xlib accessible portion (pixels) */ int pixmapHeight; /* both fields ignored if no concurrent access */ int bytesPerScanline; int byteOrder; /* MSBFirst, LSBFirst */ int depth; int bitsPerPixel; unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; short visualClass; int viewportWidth; int viewportHeight; int xViewportStep; /* viewport position granularity */ int yViewportStep; int maxViewportX; /* max viewport origin */ int maxViewportY; int viewportFlags; /* types of page flipping possible */ int offset; int reserved1; int reserved2; } XDGAModeRec, *XDGAModePtr; /* DDX interface */ extern _X_EXPORT int DGASetMode(int Index, int num, XDGAModePtr mode, PixmapPtr *pPix); extern _X_EXPORT void DGASetInputMode(int Index, Bool keyboard, Bool mouse); extern _X_EXPORT void DGASelectInput(int Index, ClientPtr client, long mask); extern _X_EXPORT Bool DGAAvailable(int Index); extern _X_EXPORT Bool DGAActive(int Index); extern _X_EXPORT void DGAShutdown(void); extern _X_EXPORT void DGAInstallCmap(ColormapPtr cmap); extern _X_EXPORT int DGAGetViewportStatus(int Index); extern _X_EXPORT int DGASync(int Index); extern _X_EXPORT int DGAFillRect(int Index, int x, int y, int w, int h, unsigned long color); extern _X_EXPORT int DGABlitRect(int Index, int srcx, int srcy, int w, int h, int dstx, int dsty); extern _X_EXPORT int DGABlitTransRect(int Index, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long color); extern _X_EXPORT int DGASetViewport(int Index, int x, int y, int mode); extern _X_EXPORT int DGAGetModes(int Index); extern _X_EXPORT int DGAGetOldDGAMode(int Index); extern _X_EXPORT int DGAGetModeInfo(int Index, XDGAModePtr mode, int num); extern _X_EXPORT Bool DGAVTSwitch(void); extern _X_EXPORT Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, int button, int is_down); extern _X_EXPORT Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); extern _X_EXPORT Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, int key_code, int is_down); extern _X_EXPORT Bool DGAOpenFramebuffer(int Index, char **name, unsigned char **mem, int *size, int *offset, int *flags); extern _X_EXPORT void DGACloseFramebuffer(int Index); extern _X_EXPORT Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode); extern _X_EXPORT int DGACreateColormap(int Index, ClientPtr client, int id, int mode, int alloc); extern _X_EXPORT unsigned char DGAReqCode; extern _X_EXPORT int DGAErrorBase; extern _X_EXPORT int DGAEventBase; extern _X_EXPORT int *XDGAEventBase; #endif /* __DGAPROC_H */ ",0 "e""); 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. */ package org.wicketstuff.gmap.geocoder.pojos; import com.fasterxml.jackson.annotation.JsonProperty; /** * POJO for an entity in Google geocoders address_components Array
        * *

        * See also: * Google Geocoder Result Documentation
        * * Note:
        * The most documentation in this class a have been adopted by Google documentation.
        * Say thank you to Google! *

        * * @author Mathias Born - Contact: www.mathiasborn.de */ public class GeocoderAddress { /** full text description or name of the address component */ @JsonProperty(""long_name"") private String longName; /** an abbreviated textual name for the address component */ @JsonProperty(""short_name"") private String shortName; /** array indicating the type of the address component. */ private String[] types; /** * @return the longName */ public String getLongName() { return longName; } /** * Set the full text description or name of the address component * * @param longName * the longName to set */ public void setLongName(String longName) { this.longName = longName; } /** * Get the full text description or name of the address component * * @return the shortName */ public String getShortName() { return shortName; } /** * Set an abbreviated textual name for the address component * * @param shortName * the shortName to set */ public void setShortName(String shortName) { this.shortName = shortName; } /** * Get an array that indicating the type of the address component. * * @return the types */ public String[] getTypes() { return types; } /** * Set an array that indicating the type of the address component. * * @param types * the types to set */ public void setTypes(String[] types) { this.types = types; } } ",0 " public static final DateFormat formatter = new SimpleDateFormat(""MM/dd/yyyy""); public static String getData(Scanner in, PrintWriter out, String name) { String tmp; out.print(name + "": ""); out.flush(); tmp = in.nextLine(); return (tmp.length() == 0) ? null : tmp; } public static String getDataMultiLine(Scanner in, PrintWriter out, String name) { String tmp = """"; String ret = """"; out.print(name + "": ""); out.flush(); while(!tmp.equalsIgnoreCase(""end"")) { ret += tmp + ""\n""; tmp = in.nextLine(); } return (ret.replaceAll(""\\s"","""").length() == 0) ? null : ret; } public static int getDataInt(Scanner in, PrintWriter out, String name) { String tmp; out.print(name + "": ""); out.flush(); tmp = in.nextLine(); try { return (tmp.length() == 0) ? -1 : Integer.parseInt(tmp); }catch(NumberFormatException nfe) { System.err.println(""Not an integer value for "" + name + "": "" + tmp); return -1; } } public static Date getDataDate(Scanner in, PrintWriter out, String name) { String tmp; out.print(name + "": ""); out.flush(); tmp = in.nextLine(); try { return (tmp.length() == 0) ? null : formatter.parse(tmp); }catch(ParseException pe) { System.err.println(""Could not parse date for "" + name + "": "" + tmp); return null; } } public static Set getDataSet(Scanner in, PrintWriter out, String name) { Set ret = new HashSet(); String tmp; do { tmp = getData(in, out, name); if(tmp != null) { ret.add(tmp); } }while(tmp != null); return (ret.size() == 0)? null : ret; } public static void prepare(XStream xstream) { xstream.alias(""Person"", Person.class); xstream.alias(""Index"", Index.class); xstream.alias(""Collection"", SongCollection.class); xstream.alias(""Song"", Song.class); } }",0 "t"" href=""../../../boostbook.css"" type=""text/css"">

        Use the specified file to obtain the temporary Diffie-Hellman parameters.

        void use_tmp_dh_file(
            const std::string & filename);
          » more...
        
        asio::error_code use_tmp_dh_file(
            const std::string & filename,
            asio::error_code & ec);
          » more...
        
        Copyright © 2003-2013 Christopher M. Kohlhoff

        Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


        ",0 "rg/1999/xhtml"" xml:lang=""en"" lang=""en""> URI Class : CodeIgniter User Guide

        CodeIgniter User Guide Version 2.2.3

        Table of Contents Page
        CodeIgniter Home  ›  User Guide Home  ›  URI Class
        Search User Guide   

        URI Class

        The URI Class provides functions that help you retrieve information from your URI strings. If you use URI routing, you can also retrieve information about the re-routed segments.

        Note: This class is initialized automatically by the system so there is no need to do it manually.

        $this->uri->segment(n)

        Permits you to retrieve a specific segment. Where n is the segment number you wish to retrieve. Segments are numbered from left to right. For example, if your full URL is this:

        http://example.com/index.php/news/local/metro/crime_is_up

        The segment numbers would be this:

        1. news
        2. local
        3. metro
        4. crime_is_up

        By default the function returns FALSE (boolean) if the segment does not exist. There is an optional second parameter that permits you to set your own default value if the segment is missing. For example, this would tell the function to return the number zero in the event of failure:

        $product_id = $this->uri->segment(3, 0);

        It helps avoid having to write code like this:

        if ($this->uri->segment(3) === FALSE)
        {
            $product_id = 0;
        }
        else
        {
            $product_id = $this->uri->segment(3);
        }

        $this->uri->rsegment(n)

        This function is identical to the previous one, except that it lets you retrieve a specific segment from your re-routed URI in the event you are using CodeIgniter's URI Routing feature.

        $this->uri->slash_segment(n)

        This function is almost identical to $this->uri->segment(), except it adds a trailing and/or leading slash based on the second parameter. If the parameter is not used, a trailing slash added. Examples:

        $this->uri->slash_segment(3);
        $this->uri->slash_segment(3, 'leading');
        $this->uri->slash_segment(3, 'both');

        Returns:

        1. segment/
        2. /segment
        3. /segment/

        $this->uri->slash_rsegment(n)

        This function is identical to the previous one, except that it lets you add slashes a specific segment from your re-routed URI in the event you are using CodeIgniter's URI Routing feature.

        $this->uri->uri_to_assoc(n)

        This function lets you turn URI segments into and associative array of key/value pairs. Consider this URI:

        index.php/user/search/name/joe/location/UK/gender/male

        Using this function you can turn the URI into an associative array with this prototype:

        [array]
        (
            'name' => 'joe'
            'location' => 'UK'
            'gender' => 'male'
        )

        The first parameter of the function lets you set an offset. By default it is set to 3 since your URI will normally contain a controller/function in the first and second segments. Example:

        $array = $this->uri->uri_to_assoc(3);

        echo $array['name'];

        The second parameter lets you set default key names, so that the array returned by the function will always contain expected indexes, even if missing from the URI. Example:

        $default = array('name', 'gender', 'location', 'type', 'sort');

        $array = $this->uri->uri_to_assoc(3, $default);

        If the URI does not contain a value in your default, an array index will be set to that name, with a value of FALSE.

        Lastly, if a corresponding value is not found for a given key (if there is an odd number of URI segments) the value will be set to FALSE (boolean).

        $this->uri->ruri_to_assoc(n)

        This function is identical to the previous one, except that it creates an associative array using the re-routed URI in the event you are using CodeIgniter's URI Routing feature.

        $this->uri->assoc_to_uri()

        Takes an associative array as input and generates a URI string from it. The array keys will be included in the string. Example:

        $array = array('product' => 'shoes', 'size' => 'large', 'color' => 'red');

        $str = $this->uri->assoc_to_uri($array);

        // Produces: product/shoes/size/large/color/red

        $this->uri->uri_string()

        Returns a string with the complete URI. For example, if this is your full URL:

        http://example.com/index.php/news/local/345

        The function would return this:

        news/local/345

        $this->uri->ruri_string()

        This function is identical to the previous one, except that it returns the re-routed URI in the event you are using CodeIgniter's URI Routing feature.

        $this->uri->total_segments()

        Returns the total number of segments.

        $this->uri->total_rsegments()

        This function is identical to the previous one, except that it returns the total number of segments in your re-routed URI in the event you are using CodeIgniter's URI Routing feature.

        $this->uri->segment_array()

        Returns an array containing the URI segments. For example:

        $segs = $this->uri->segment_array();

        foreach ($segs as $segment)
        {
            echo $segment;
            echo '<br />';
        }

        $this->uri->rsegment_array()

        This function is identical to the previous one, except that it returns the array of segments in your re-routed URI in the event you are using CodeIgniter's URI Routing feature.

        Previous Topic:  Unit Testing Class    ·   Top of Page   ·   User Guide Home   ·   Next Topic:  User Agent Class

        CodeIgniter  ·  Copyright © 2006 - 2014  ·  EllisLab, Inc.  ·  Copyright © 2014 - 2015  ·  British Columbia Institute of Technology

        ",0 "init(); if ($this->_mail === null) { $this->_mail = Yii::$app->getMailer(); //$this->_mail->htmlLayout = Yii::getAlias($this->id . '/mails/layouts/html'); //$this->_mail->textLayout = Yii::getAlias($this->id . '/mails/layouts/text'); $this->_mail->viewPath = '@app/modules/' . $module->id . '/mails/views'; if (isset(Yii::$app->params['robotEmail']) && Yii::$app->params['robotEmail'] !== null) { $this->_mail->messageConfig['from'] = !isset(Yii::$app->params['robotName']) ? Yii::$app->params['robotEmail'] : [Yii::$app->params['robotEmail'] => Yii::$app->params['robotName']]; } } return $this->_mail; } } ",0 "me=""viewport"" content=""width=device-width, initial-scale=1.0"">

        牛妞和痲痲的宫斗...

        160526

        nn2564

        • 听了老师的建议,对于她考试没考好的事我一个字都没提,
        • 我俩一起写字一起讲我小时候学书法的故事,
        • 然后她对我说:
        • 妈妈,我明天上课不带密码盒了,我想每天都和你一起练字!
        • 谢谢毛刘阿姨送给大妞这么有意义的礼物,
        • 让我们今天有个愉快的夜晚![爱心]

        (粑粑:

        是也乎,( ̄▽ ̄)

        )

        Comments

        ",0 "ioArray; protected $_statausArray; /* * getter and setter */ public function __construct($name = null) { parent::__construct('add'); $inputFilter = new UserFilter(); $this->setInputFilter($inputFilter); $this->setAttribute('method', 'post'); $this->add(array( 'name' => 'firstname', 'attributes' => array( 'type' => 'text', ), 'options' => array( 'label' => 'Name', ), )); $this->add(array( 'name' => 'lastname', 'attributes' => array( 'type' => 'text', ), 'options' => array( 'label' => 'Nachname', ), )); $this->add(array( 'name' => 'email', 'attributes' => array( 'type' => 'text', ), 'options' => array( 'label' => 'Email', ), )); $this->add(array( 'name' => 'password', 'attributes' => array( 'type' => 'password', ), 'options' => array( 'label' => 'Passwort', ), )); $this->add(array( 'name' => 'submit', 'attributes' => array( 'type' => 'submit', 'value' => 'login', 'id' => 'submitbutton' ), )); } } ",0 "rg/1999/xhtml""> KlusterKite: KlusterKite.API.Provider.Resolvers.EnumResolver< T > Class Template Reference
        KlusterKite  0.0.0
        A framework to create scalable and redundant services based on awesome Akka.Net project.
        KlusterKite.API.Provider.Resolvers.EnumResolver< T > Class Template Reference

        Resolves a enum value More...

        Inheritance diagram for KlusterKite.API.Provider.Resolvers.EnumResolver< T >:

        Public Member Functions

        Task< JToken > ResolveQuery (object source, ApiRequest request, ApiField apiField, RequestContext context, JsonSerializer argumentsSerializer, Action< Exception > onErrorCallback)
         Resolves API request to object More...
         
        ApiType GetElementType ()
         Gets the resolved api type of resolved element More...
         
        IEnumerable< ApiFieldGetTypeArguments ()
         Gets the list of arguments that are supported by resolver itself (not the original object method arguments) More...
         

        Properties

        static ApiType GeneratedType [get]
         Gets the generated api type for typed argument More...
         

        Detailed Description

        Resolves a enum value

        Template Parameters
        TThe type of enum

        Definition at line 32 of file EnumResolver.cs.

        Member Function Documentation

        ◆ GetElementType()

        Gets the resolved api type of resolved element

        Implements KlusterKite.API.Provider.Resolvers.IResolver.

        Definition at line 79 of file EnumResolver.cs.

        ◆ GetTypeArguments()

        IEnumerable<ApiField> KlusterKite.API.Provider.Resolvers.EnumResolver< T >.GetTypeArguments ( )

        Gets the list of arguments that are supported by resolver itself (not the original object method arguments)

        Implements KlusterKite.API.Provider.Resolvers.IResolver.

        Definition at line 85 of file EnumResolver.cs.

        ◆ ResolveQuery()

        Task<JToken> KlusterKite.API.Provider.Resolvers.EnumResolver< T >.ResolveQuery ( object  source,
        ApiRequest  request,
        ApiField  apiField,
        RequestContext  context,
        JsonSerializer  argumentsSerializer,
        Action< Exception >  onErrorCallback 
        )

        Resolves API request to object

        Implements KlusterKite.API.Provider.Resolvers.IResolver.

        Definition at line 72 of file EnumResolver.cs.

        Property Documentation

        ◆ GeneratedType

        Gets the generated api type for typed argument

        Definition at line 69 of file EnumResolver.cs.


        The documentation for this class was generated from the following file:
        ",0 " KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSLS, KC_INS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_PGUP, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTRL,MO(2), KC_LEFT, KC_DOWN, KC_RGHT), [1] = LAYOUT_all( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), [2] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), [3] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; ",0 "or * additional information regarding copyright ownership. * * GraphHopper licenses this file to you 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. */ package com.graphhopper.routing.util; import com.graphhopper.routing.VirtualEdgeIteratorState; import com.graphhopper.util.EdgeIterator; import com.graphhopper.util.GHUtility; import com.graphhopper.util.Helper; import com.graphhopper.util.PMap; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * @author Peter Karich */ public class FastestWeightingTest { private final FlagEncoder encoder = new EncodingManager(""CAR"").getEncoder(""CAR""); @Test public void testMinWeightHasSameUnitAs_getWeight() { FastestWeighting instance = new FastestWeighting(encoder); long flags = encoder.setProperties(encoder.getMaxSpeed(), true, true); assertEquals(instance.getMinWeight(10), instance.calcWeight(createEdge(10, flags), false, EdgeIterator.NO_EDGE), 1e-8); } @Test public void testWeightWrongHeading() { FastestWeighting instance = new FastestWeighting(encoder, new PMap().put(""heading_penalty"", ""100"")); VirtualEdgeIteratorState virtEdge = new VirtualEdgeIteratorState(0, 1, 1, 2, 10, encoder.setProperties(10, true, true), ""test"", Helper.createPointList(51, 0, 51, 1)); double time = instance.calcWeight(virtEdge, false, 0); virtEdge.setVirtualEdgePreference(true, false); // heading penalty on edge assertEquals(time + 100, instance.calcWeight(virtEdge, false, 0), 1e-8); // but not in reverse heading assertEquals(time, instance.calcWeight(virtEdge, true, 0), 1e-8); // only after setting it virtEdge.setVirtualEdgePreference(true, true); assertEquals(time + 100, instance.calcWeight(virtEdge, true, 0), 1e-8); // but not after releasing it virtEdge.setVirtualEdgePreference(false, true); assertEquals(time, instance.calcWeight(virtEdge, true, 0), 1e-8); // test default penalty instance = new FastestWeighting(encoder); assertEquals(time + FastestWeighting.DEFAULT_HEADING_PENALTY, instance.calcWeight(virtEdge, false, 0), 1e-8); } @Test public void testSpeed0() { FastestWeighting instance = new FastestWeighting(encoder); assertEquals(1.0 / 0, instance.calcWeight(createEdge(10, encoder.setProperties(0, true, true)), false, EdgeIterator.NO_EDGE), 1e-8); // 0 / 0 returns NaN but calcWeight should not return NaN! assertEquals(1.0 / 0, instance.calcWeight(createEdge(0, encoder.setProperties(0, true, true)), false, EdgeIterator.NO_EDGE), 1e-8); } EdgeIterator createEdge( final double distance, final long flags ) { return new GHUtility.DisabledEdgeIterator() { @Override public double getDistance() { return distance; } @Override public long getFlags() { return flags; } @Override public boolean getBoolean( int key, boolean reverse, boolean _default ) { return _default; } }; } } ",0 " href=""../static/style.css"">

        shrinkwrap

        Lock down dependency versions

        SYNOPSIS

        npm shrinkwrap

        DESCRIPTION

        This command locks down the versions of a package's dependencies so that you can control exactly which versions of each dependency will be used when your package is installed.

        By default, "npm install" recursively installs the target's dependencies (as specified in package.json), choosing the latest available version that satisfies the dependency's semver pattern. In some situations, particularly when shipping software where each change is tightly managed, it's desirable to fully specify each version of each dependency recursively so that subsequent builds and deploys do not inadvertently pick up newer versions of a dependency that satisfy the semver pattern. Specifying specific semver patterns in each dependency's package.json would facilitate this, but that's not always possible or desirable, as when another author owns the npm package. It's also possible to check dependencies directly into source control, but that may be undesirable for other reasons.

        As an example, consider package A:

        {
            "name": "A",
            "version": "0.1.0",
            "dependencies": {
                "B": "<0.1.0"
            }
        }

        package B:

        {
            "name": "B",
            "version": "0.0.1",
            "dependencies": {
                "C": "<0.1.0"
            }
        }

        and package C:

        {
            "name": "C,
            "version": "0.0.1"
        }

        If these are the only versions of A, B, and C available in the registry, then a normal "npm install A" will install:

        A@0.1.0
        `-- B@0.0.1
            `-- C@0.0.1

        However, if B@0.0.2 is published, then a fresh "npm install A" will install:

        A@0.1.0
        `-- B@0.0.2
            `-- C@0.0.1

        assuming the new version did not modify B's dependencies. Of course, the new version of B could include a new version of C and any number of new dependencies. If such changes are undesirable, the author of A could specify a dependency on B@0.0.1. However, if A's author and B's author are not the same person, there's no way for A's author to say that he or she does not want to pull in newly published versions of C when B hasn't changed at all.

        In this case, A's author can run

        npm shrinkwrap

        This generates npm-shrinkwrap.json, which will look something like this:

        {
          "name": "A",
          "version": "0.1.0",
          "dependencies": {
            "B": {
              "version": "0.0.1",
              "dependencies": {
                "C": {
                  "version": "0.1.0"
                }
              }
            }
          }
        }

        The shrinkwrap command has locked down the dependencies based on what's currently installed in node_modules. When "npm install" installs a package with a npm-shrinkwrap.json file in the package root, the shrinkwrap file (rather than package.json files) completely drives the installation of that package and all of its dependencies (recursively). So now the author publishes A@0.1.0, and subsequent installs of this package will use B@0.0.1 and C@0.1.0, regardless the dependencies and versions listed in A's, B's, and C's package.json files.

        Using shrinkwrapped packages

        Using a shrinkwrapped package is no different than using any other package: you can "npm install" it by hand, or add a dependency to your package.json file and "npm install" it.

        Building shrinkwrapped packages

        To shrinkwrap an existing package:

        1. Run "npm install" in the package root to install the current versions of all dependencies.
        2. Validate that the package works as expected with these versions.
        3. Run "npm shrinkwrap", add npm-shrinkwrap.json to git, and publish your package.

        To add or update a dependency in a shrinkwrapped package:

        1. Run "npm install" in the package root to install the current versions of all dependencies.
        2. Add or update dependencies. "npm install" each new or updated package individually and then update package.json. Note that they must be explicitly named in order to be installed: running npm install with no arguments will merely reproduce the existing shrinkwrap.
        3. Validate that the package works as expected with the new dependencies.
        4. Run "npm shrinkwrap", commit the new npm-shrinkwrap.json, and publish your package.

        You can use outdated(1) to view dependencies with newer versions available.

        Other Notes

        Since "npm shrinkwrap" uses the locally installed packages to construct the shrinkwrap file, devDependencies will be included if and only if you've installed them already when you make the shrinkwrap.

        A shrinkwrap file must be consistent with the package's package.json file. "npm shrinkwrap" will fail if required dependencies are not already installed, since that would result in a shrinkwrap that wouldn't actually work. Similarly, the command will fail if there are extraneous packages (not referenced by package.json), since that would indicate that package.json is not correct.

        If shrinkwrapped package A depends on shrinkwrapped package B, B's shrinkwrap will not be used as part of the installation of A. However, because A's shrinkwrap is constructed from a valid installation of B and recursively specifies all dependencies, the contents of B's shrinkwrap will implicitly be included in A's shrinkwrap.

        Caveats

        Shrinkwrap files only lock down package versions, not actual package contents. While discouraged, a package author can republish an existing version of a package, causing shrinkwrapped packages using that version to pick up different code than they were before. If you want to avoid any risk that a byzantine author replaces a package you're using with code that breaks your application, you could modify the shrinkwrap file to use git URL references rather than version numbers so that npm always fetches all packages from git.

        If you wish to lock down the specific bytes included in a package, for example to have 100% confidence in being able to reproduce a deployment or build, then you ought to check your dependencies into source control, or pursue some other mechanism that can verify contents rather than versions.

        SEE ALSO

        shrinkwrap — npm@1.2.14

        ",0 "melo_trans.h> #include ""pc_lib.h"" #include ""pc_pomelo_i.h"" void pc_trans_fire_event(pc_client_t* client, int ev_type, const char* arg1, const char* arg2) { int pending = 0; if (!client) { pc_lib_log(PC_LOG_ERROR, ""pc_client_fire_event - client is null""); return ; } if (client->config.enable_polling) { pending = 1; } pc__trans_fire_event(client, ev_type, arg1, arg2, pending); } void pc__trans_fire_event(pc_client_t* client, int ev_type, const char* arg1, const char* arg2, int pending) { QUEUE* q; pc_ev_handler_t* handler; pc_event_t* ev; int i; if (ev_type >= PC_EV_COUNT || ev_type < 0) { pc_lib_log(PC_LOG_ERROR, ""pc__transport_fire_event - error event type""); return; } if (ev_type == PC_EV_USER_DEFINED_PUSH && (!arg1 || !arg2)) { pc_lib_log(PC_LOG_ERROR, ""pc__transport_fire_event - push msg but without a route or msg""); return; } if (ev_type == PC_EV_CONNECT_ERROR || ev_type == PC_EV_UNEXPECTED_DISCONNECT || ev_type == PC_EV_PROTO_ERROR || ev_type == PC_EV_CONNECT_FAILED) { if (!arg1) { pc_lib_log(PC_LOG_ERROR, ""pc__transport_fire_event - event should be with a reason description""); return ; } } if (pending) { assert(client->config.enable_polling); pc_lib_log(PC_LOG_INFO, ""pc__trans_fire_event - add pending event: %s"", pc_client_ev_str(ev_type)); pc_mutex_lock(&client->event_mutex); ev = NULL; for (i = 0; i < PC_PRE_ALLOC_EVENT_SLOT_COUNT; ++i) { if (PC_PRE_ALLOC_IS_IDLE(client->pending_events[i].type)) { ev = &client->pending_events[i]; PC_PRE_ALLOC_SET_BUSY(ev->type); break; } } if (!ev) { ev = (pc_event_t* )pc_lib_malloc(sizeof(pc_event_t)); memset(ev, 0, sizeof(pc_event_t)); ev->type = PC_DYN_ALLOC; } PC_EV_SET_NET_EVENT(ev->type); QUEUE_INIT(&ev->queue); QUEUE_INSERT_TAIL(&client->pending_ev_queue, &ev->queue); ev->data.ev.ev_type = ev_type; if (arg1) { ev->data.ev.arg1 = pc_lib_strdup(arg1); } else { ev->data.ev.arg1 = NULL; } if (arg2) { ev->data.ev.arg2 = pc_lib_strdup(arg2); } else { ev->data.ev.arg2 = NULL; } pc_mutex_unlock(&client->event_mutex); return ; } pc_lib_log(PC_LOG_INFO, ""pc__trans_fire_event - fire event: %s, arg1: %s, arg2: %s"", pc_client_ev_str(ev_type), arg1 ? arg1 : """", arg2 ? arg2 : """"); pc_mutex_lock(&client->state_mutex); switch(ev_type) { case PC_EV_CONNECTED: assert(client->state == PC_ST_CONNECTING); client->state = PC_ST_CONNECTED; break; case PC_EV_CONNECT_ERROR: assert(client->state == PC_ST_CONNECTING || client->state == PC_ST_DISCONNECTING); break; case PC_EV_CONNECT_FAILED: assert(client->state == PC_ST_CONNECTING || client->state == PC_ST_DISCONNECTING); client->state = PC_ST_INITED; break; case PC_EV_DISCONNECT: assert(client->state == PC_ST_DISCONNECTING); client->state = PC_ST_INITED; break; case PC_EV_KICKED_BY_SERVER: assert(client->state == PC_ST_CONNECTED || client->state == PC_ST_DISCONNECTING); client->state = PC_ST_INITED; break; case PC_EV_UNEXPECTED_DISCONNECT: case PC_EV_PROTO_ERROR: assert(client->state == PC_ST_CONNECTING || client->state == PC_ST_CONNECTED || client->state == PC_ST_DISCONNECTING); client->state = PC_ST_CONNECTING; break; case PC_EV_USER_DEFINED_PUSH: /* do nothing here */ break; default: /* never run to here */ pc_lib_log(PC_LOG_ERROR, ""pc__trans_fire_event - unknown network event: %d"", ev_type); } pc_mutex_unlock(&client->state_mutex); /* invoke handler */ pc_mutex_lock(&client->handler_mutex); QUEUE_FOREACH(q, &client->ev_handlers) { handler = QUEUE_DATA(q, pc_ev_handler_t, queue); assert(handler && handler->cb); handler->cb(client, ev_type, handler->ex_data, arg1, arg2); } pc_mutex_unlock(&client->handler_mutex); } void pc_trans_sent(pc_client_t* client, unsigned int seq_num, int rc) { int pending = 0; if (!client) { pc_lib_log(PC_LOG_ERROR, ""pc_trans_sent - client is null""); return ; } if (client->config.enable_polling) { pending = 1; } pc__trans_sent(client, seq_num, rc, pending); } void pc__trans_sent(pc_client_t* client, unsigned int seq_num, int rc, int pending) { QUEUE* q; pc_notify_t* notify; pc_notify_t* target; pc_event_t* ev; int i; if (pending) { pc_mutex_lock(&client->event_mutex); pc_lib_log(PC_LOG_INFO, ""pc__trans_sent - add pending sent event, seq_num: %u, rc: %s"", seq_num, pc_client_rc_str(rc)); ev = NULL; for (i = 0; i < PC_PRE_ALLOC_EVENT_SLOT_COUNT; ++i) { if (PC_PRE_ALLOC_IS_IDLE(client->pending_events[i].type)) { ev = &client->pending_events[i]; PC_PRE_ALLOC_SET_BUSY(ev->type); break; } } if (!ev) { ev = (pc_event_t* )pc_lib_malloc(sizeof(pc_event_t)); memset(ev, 0, sizeof(pc_event_t)); ev->type = PC_DYN_ALLOC; } QUEUE_INIT(&ev->queue); PC_EV_SET_NOTIFY_SENT(ev->type); ev->data.notify.seq_num = seq_num; ev->data.notify.rc = rc; QUEUE_INSERT_TAIL(&client->pending_ev_queue, &ev->queue); pc_mutex_unlock(&client->event_mutex); return ; } /* callback immediately */ pc_mutex_lock(&client->notify_mutex); target = NULL; QUEUE_FOREACH(q, &client->notify_queue) { notify = (pc_notify_t* )QUEUE_DATA(q, pc_common_req_t, queue); if (notify->base.seq_num == seq_num) { pc_lib_log(PC_LOG_INFO, ""pc__trans_sent - fire sent event, seq_num: %u, rc: %s"", seq_num, pc_client_rc_str(rc)); target = notify; QUEUE_REMOVE(q); QUEUE_INIT(q); break; } } pc_mutex_unlock(&client->notify_mutex); if (target) { target->cb(target, rc); pc_lib_free((char*)target->base.msg); pc_lib_free((char*)target->base.route); target->base.msg = NULL; target->base.route = NULL; if (PC_IS_PRE_ALLOC(target->base.type)) { pc_mutex_lock(&client->notify_mutex); PC_PRE_ALLOC_SET_IDLE(target->base.type); pc_mutex_unlock(&client->notify_mutex); } else { pc_lib_free(target); } } else { pc_lib_log(PC_LOG_ERROR, ""pc__trans_sent - no pending notify found"" "" when transport has sent it, seq num: %u"", seq_num); } } void pc_trans_resp(pc_client_t* client, unsigned int req_id, int rc, const char* resp) { int pending = 0; if (!client) { pc_lib_log(PC_LOG_ERROR, ""pc_trans_resp - client is null""); return ; } if (client->config.enable_polling) { pending = 1; } pc__trans_resp(client, req_id, rc, resp, pending); } void pc__trans_resp(pc_client_t* client, unsigned int req_id, int rc, const char* resp, int pending) { QUEUE* q; pc_request_t* req; pc_event_t* ev; pc_request_t* target; int i; if (pending) { pc_mutex_lock(&client->event_mutex); pc_lib_log(PC_LOG_INFO, ""pc__trans_resp - add pending resp event, req_id: %u, rc: %s"", req_id, pc_client_rc_str(rc)); ev = NULL; for (i = 0; i < PC_PRE_ALLOC_EVENT_SLOT_COUNT; ++i) { if (PC_PRE_ALLOC_IS_IDLE(client->pending_events[i].type)) { ev = &client->pending_events[i]; PC_PRE_ALLOC_SET_BUSY(ev->type); break; } } if (!ev) { ev = (pc_event_t* )pc_lib_malloc(sizeof(pc_event_t)); memset(ev, 0, sizeof(pc_event_t)); ev->type = PC_DYN_ALLOC; } PC_EV_SET_RESP(ev->type); QUEUE_INIT(&ev->queue); ev->data.req.req_id = req_id; ev->data.req.rc = rc; ev->data.req.resp = pc_lib_strdup(resp); QUEUE_INSERT_TAIL(&client->pending_ev_queue, &ev->queue); pc_mutex_unlock(&client->event_mutex); return ; } /* invoke callback immediately */ target = NULL; pc_mutex_lock(&client->req_mutex); QUEUE_FOREACH(q, &client->req_queue) { req= (pc_request_t* )QUEUE_DATA(q, pc_common_req_t, queue); if (req->req_id == req_id) { pc_lib_log(PC_LOG_INFO, ""pc__trans_resp - fire resp event, req_id: %u, rc: %s"", req_id, pc_client_rc_str(rc)); target = req; QUEUE_REMOVE(q); QUEUE_INIT(q); break; } } pc_mutex_unlock(&client->req_mutex); if (target) { target->cb(target, rc, resp); pc_lib_free((char*)target->base.msg); pc_lib_free((char*)target->base.route); target->base.msg = NULL; target->base.route = NULL; if (PC_IS_PRE_ALLOC(target->base.type)) { pc_mutex_lock(&client->req_mutex); PC_PRE_ALLOC_SET_IDLE(target->base.type); pc_mutex_unlock(&client->req_mutex); } else { pc_lib_free(target); } } else { pc_lib_log(PC_LOG_ERROR, ""pc__trans_resp - no pending request found when"" "" get a response, req id: %u"", req_id); } } ",0 "cation. * Copyright (C) 2014-2022 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko * Website: https://www.espocrm.com * * EspoCRM is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EspoCRM is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with EspoCRM. If not, see http://www.gnu.org/licenses/. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU General Public License version 3. * * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the ""EspoCRM"" word. ************************************************************************/ namespace tests\Espo\Core\Utils; use Espo\Core\Utils\Preload; class PreloadTest extends \PHPUnit\Framework\TestCase { public function testPreload() { $preload = new Preload(); $preload->process(); $this->assertTrue($preload->getCount() > 0); } } ",0 "UDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // VideoSetDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // VideoSetDlg dialog class VideoSetDlg : public CDialog { // Construction public: void initDlg(); void refreshDevice(); VideoSetDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(VideoSetDlg) enum { IDD = IDD_DIALOG_VIDEOSET }; CComboBox m_playDevice; CComboBox m_videoDevice; CComboBox m_resolution; CComboBox m_quality; CComboBox m_preparam; CComboBox m_frameRate; CComboBox m_bitRate; CComboBox m_audioMode; CComboBox m_audioDevice; BOOL m_enableAGC; BOOL m_enableEcho; BOOL m_enableNS; BOOL m_enableVAD; BOOL m_serverPriority; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(VideoSetDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(VideoSetDlg) afx_msg void OnCheckAGC(); afx_msg void OnCheckEcho(); afx_msg void OnCheckNS(); afx_msg void OnCheckVAD(); afx_msg void OnCheckServerPriority(); afx_msg void OnSelAudioDevice(); afx_msg void OnSelAudioMode(); afx_msg void OnSelBitRate(); afx_msg void OnSelFrameRate(); afx_msg void OnSelPreParam(); afx_msg void OnSelVideoQuality(); afx_msg void OnSelResolution(); afx_msg void OnSelVideodevice(); virtual BOOL OnInitDialog(); afx_msg void OnSelPlayDevice(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_VIDEOSETDLG_H__664275CD_D25D_4617_BDF9_55BBFFF58C78__INCLUDED_) ",0 "u can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $RCSfile: eestrcon.c,v $ $Locker: $ $Name: $ $State: Exp $ char *EStrConcat(int argcnt, ...) Concats up to argcnt strings together and malloc() a buffer that will receive the result. If one of the string == NULL, this string is ignored. On failure, the program is terminated with the ""out of memory"" error. Return: the malloc'ed buffer ob(ject): EStrConcat su(bsystem): error ty(pe): H sh(ort description): Concat several strings together lo(ng description): Concats several strings together, by using the \tok{StrConcat()} function, and terminates the program on failure with the error message: ""Out of memory"" pr(erequistes): re(lated to): StrConcat se(condary subsystems): dynstr in(itialized by): wa(rning): bu(gs): va(lue): constructed dynamic string fi(le): eestrcon.c */ #include ""initsupl.loc"" #ifndef _MICROC_ #include #include #include #endif #include ""dynstr.h"" #include ""msgs.h"" #include ""suppldbg.h"" #ifdef RCS_Version static char const rcsid[] = ""$Id: eestrcon.c,v 1.1 2006/06/17 03:25:02 blairdude Exp $""; #endif #ifdef _MICROC_ register char *EStrConcat(int argcnt) { unsigned cnt, *poi; unsigned Xcnt, *Xpoi; unsigned length; char *h, *p; DBG_ENTER1 cnt = nargs(); DBG_ENTER2(""EStrConcat"", ""error"") DBG_ARGUMENTS( (""argcnt=%u cnt=%u"", argcnt, cnt) ) Xpoi = poi = cnt * 2 - 2 + &argcnt; Xcnt = cnt = min(cnt, *poi); for(length = 1; cnt--;) if(*--poi) length += strlen(*poi); chkHeap if((h = p = malloc(length)) == 0) Esuppl_noMem(); chkHeap while(Xcnt--) if(*--Xpoi) p = stpcpy(p, *Xpoi); chkHeap DBG_RETURN_S( h) } #else /* !_MICROC_ */ char *EStrConcat(int argcnt, ...) { va_list strings; char *p, *s; size_t length, l; DBG_ENTER(""EStrConcat"", Suppl_error) DBG_ARGUMENTS( (""argcnt=%u cnt=%u"", argcnt, argcnt) ) va_start(strings, argcnt); chkHeap p = Estrdup(""""); chkHeap length = 1; while(argcnt--) { s = va_arg(strings, char *); if(s && *s) { l = length - 1; Eresize(p, length += strlen(s)); strcpy(p + l, s); } } va_end(strings); chkHeap DBG_RETURN_S( p) } #endif /* _MICROC_ */ ",0 " */ /* * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions, and the following disclaimer, * without modification. * 2. Redistributions in binary form must reproduce at minimum a disclaimer * substantially similar to the ""NO WARRANTY"" disclaimer below * (""Disclaimer"") and any redistribution must be conditioned upon * including a substantially similar Disclaimer requirement for further * binary redistribution. * 3. Neither the names of the above-listed copyright holders nor the names * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * Alternatively, this software may be distributed under the terms of the * GNU General Public License (""GPL"") version 2 as published by the Free * Software Foundation. * * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. */ #ifndef __ACOUTPUT_H__ #define __ACOUTPUT_H__ /* */ /* */ #define ACPI_UTILITIES 0x00000001 #define ACPI_HARDWARE 0x00000002 #define ACPI_EVENTS 0x00000004 #define ACPI_TABLES 0x00000008 #define ACPI_NAMESPACE 0x00000010 #define ACPI_PARSER 0x00000020 #define ACPI_DISPATCHER 0x00000040 #define ACPI_EXECUTER 0x00000080 #define ACPI_RESOURCES 0x00000100 #define ACPI_CA_DEBUGGER 0x00000200 #define ACPI_OS_SERVICES 0x00000400 #define ACPI_CA_DISASSEMBLER 0x00000800 /* */ #define ACPI_COMPILER 0x00001000 #define ACPI_TOOLS 0x00002000 #define ACPI_EXAMPLE 0x00004000 #define ACPI_DRIVER 0x00008000 #define DT_COMPILER 0x00010000 #define ACPI_ALL_COMPONENTS 0x0001FFFF #define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS) /* */ #define ACPI_ALL_DRIVERS 0xFFFF0000 /* */ #define ACPI_LV_INIT 0x00000001 #define ACPI_LV_DEBUG_OBJECT 0x00000002 #define ACPI_LV_INFO 0x00000004 #define ACPI_LV_REPAIR 0x00000008 #define ACPI_LV_ALL_EXCEPTIONS 0x0000000F /* */ #define ACPI_LV_INIT_NAMES 0x00000020 #define ACPI_LV_PARSE 0x00000040 #define ACPI_LV_LOAD 0x00000080 #define ACPI_LV_DISPATCH 0x00000100 #define ACPI_LV_EXEC 0x00000200 #define ACPI_LV_NAMES 0x00000400 #define ACPI_LV_OPREGION 0x00000800 #define ACPI_LV_BFIELD 0x00001000 #define ACPI_LV_TABLES 0x00002000 #define ACPI_LV_VALUES 0x00004000 #define ACPI_LV_OBJECTS 0x00008000 #define ACPI_LV_RESOURCES 0x00010000 #define ACPI_LV_USER_REQUESTS 0x00020000 #define ACPI_LV_PACKAGE 0x00040000 #define ACPI_LV_VERBOSITY1 0x0007FF40 | ACPI_LV_ALL_EXCEPTIONS /* */ #define ACPI_LV_ALLOCATIONS 0x00100000 #define ACPI_LV_FUNCTIONS 0x00200000 #define ACPI_LV_OPTIMIZATIONS 0x00400000 #define ACPI_LV_VERBOSITY2 0x00700000 | ACPI_LV_VERBOSITY1 #define ACPI_LV_ALL ACPI_LV_VERBOSITY2 /* */ #define ACPI_LV_MUTEX 0x01000000 #define ACPI_LV_THREADS 0x02000000 #define ACPI_LV_IO 0x04000000 #define ACPI_LV_INTERRUPTS 0x08000000 #define ACPI_LV_VERBOSITY3 0x0F000000 | ACPI_LV_VERBOSITY2 /* */ #define ACPI_LV_AML_DISASSEMBLE 0x10000000 #define ACPI_LV_VERBOSE_INFO 0x20000000 #define ACPI_LV_FULL_TABLES 0x40000000 #define ACPI_LV_EVENTS 0x80000000 #define ACPI_LV_VERBOSE 0xF0000000 /* */ #define ACPI_DEBUG_LEVEL(dl) (u32) dl,ACPI_DEBUG_PARAMETERS /* */ #define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) #define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) #define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO) #define ACPI_DB_REPAIR ACPI_DEBUG_LEVEL (ACPI_LV_REPAIR) #define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS) /* */ #define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES) #define ACPI_DB_THREADS ACPI_DEBUG_LEVEL (ACPI_LV_THREADS) #define ACPI_DB_PARSE ACPI_DEBUG_LEVEL (ACPI_LV_PARSE) #define ACPI_DB_DISPATCH ACPI_DEBUG_LEVEL (ACPI_LV_DISPATCH) #define ACPI_DB_LOAD ACPI_DEBUG_LEVEL (ACPI_LV_LOAD) #define ACPI_DB_EXEC ACPI_DEBUG_LEVEL (ACPI_LV_EXEC) #define ACPI_DB_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_NAMES) #define ACPI_DB_OPREGION ACPI_DEBUG_LEVEL (ACPI_LV_OPREGION) #define ACPI_DB_BFIELD ACPI_DEBUG_LEVEL (ACPI_LV_BFIELD) #define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES) #define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS) #define ACPI_DB_OPTIMIZATIONS ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS) #define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES) #define ACPI_DB_OBJECTS ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS) #define ACPI_DB_ALLOCATIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS) #define ACPI_DB_RESOURCES ACPI_DEBUG_LEVEL (ACPI_LV_RESOURCES) #define ACPI_DB_IO ACPI_DEBUG_LEVEL (ACPI_LV_IO) #define ACPI_DB_INTERRUPTS ACPI_DEBUG_LEVEL (ACPI_LV_INTERRUPTS) #define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS) #define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE) #define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX) #define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS) #define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL) /* */ #define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR) #define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR) #define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL) #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) /* */ #define ACPI_MODULE_NAME(name) static const char ACPI_UNUSED_VAR _acpi_module_name[] = name; #else /* */ #define ACPI_MODULE_NAME(name) #define _acpi_module_name """" #endif /* */ #ifndef ACPI_NO_ERROR_MESSAGES #define AE_INFO _acpi_module_name, __LINE__ /* */ #define ACPI_INFO(plist) acpi_info plist #define ACPI_WARNING(plist) acpi_warning plist #define ACPI_EXCEPTION(plist) acpi_exception plist #define ACPI_ERROR(plist) acpi_error plist #define ACPI_DEBUG_OBJECT(obj,l,i) acpi_ex_do_debug_object(obj,l,i) #else /* */ #define ACPI_INFO(plist) #define ACPI_WARNING(plist) #define ACPI_EXCEPTION(plist) #define ACPI_ERROR(plist) #define ACPI_DEBUG_OBJECT(obj,l,i) #endif /* */ /* */ #ifdef ACPI_DEBUG_OUTPUT /* */ #ifndef ACPI_GET_FUNCTION_NAME #define ACPI_GET_FUNCTION_NAME _acpi_function_name /* */ #define ACPI_FUNCTION_NAME(name) static const char _acpi_function_name[] = #name; #else /* */ #define ACPI_FUNCTION_NAME(name) #endif /* */ /* */ #define ACPI_DEBUG_PARAMETERS __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT /* */ #define ACPI_DEBUG_PRINT(plist) acpi_debug_print plist #define ACPI_DEBUG_PRINT_RAW(plist) acpi_debug_print_raw plist #else /* */ #define ACPI_FUNCTION_NAME(a) #define ACPI_DEBUG_PRINT(pl) #define ACPI_DEBUG_PRINT_RAW(pl) #endif /* */ #endif /* */ ",0 "GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ package com.android.systemui.tuner; import android.content.Context; import android.content.res.TypedArray; import android.preference.Preference; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.TextView; import com.android.systemui.R; public class SeekBarPreference extends Preference implements OnSeekBarChangeListener { public static int maximum = 100; public static int interval = 5; private TextView monitorBox; private SeekBar bar; int currentValue = 100; private OnPreferenceChangeListener changer; public SeekBarPreference(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected View onCreateView(ViewGroup parent) { View layout = View.inflate(getContext(), R.layout.qs_slider_preference, null); monitorBox = (TextView) layout.findViewById(R.id.monitor_box); bar = (SeekBar) layout.findViewById(R.id.seek_bar); bar.setProgress(currentValue); monitorBox.setText(String.valueOf(currentValue) + ""%""); bar.setOnSeekBarChangeListener(this); return layout; } public void setInitValue(int progress) { currentValue = progress; } @Override protected Object onGetDefaultValue(TypedArray a, int index) { // TODO Auto-generated method stub return super.onGetDefaultValue(a, index); } @Override public void setOnPreferenceChangeListener( OnPreferenceChangeListener onPreferenceChangeListener) { changer = onPreferenceChangeListener; super.setOnPreferenceChangeListener(onPreferenceChangeListener); } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { progress = Math.round(((float) progress) / interval) * interval; currentValue = progress; monitorBox.setText(String.valueOf(progress) + ""%""); } @Override public void onStartTrackingTouch(SeekBar seekBar) { } @Override public void onStopTrackingTouch(SeekBar seekBar) { changer.onPreferenceChange(this, Integer.toString(currentValue)); } } ",0 "+190; } return $width; } /** * Return a themed breadcrumb trail. * * @param $breadcrumb * An array containing the breadcrumb links. * @return a string containing the breadcrumb output. */ function phptemplate_breadcrumb($breadcrumb) { if (!empty($breadcrumb)) { $breadcrumb[] = drupal_get_title(); array_shift($breadcrumb); return '

        '.t('You are here').''. implode(' / ', $breadcrumb) .'

        '; } } ",0 "ublisher.v1.dto.*; import org.apache.cxf.jaxrs.ext.MessageContext; import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.KeyManagerListDTO; import java.util.List; import java.io.InputStream; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; public interface KeyManagersApiService { public Response keyManagersGet(MessageContext messageContext) throws APIManagementException; } ",0 "le>dpdgraph: Not compatible 👼
        « Up

        dpdgraph 0.6.1 Not compatible 👼

        📅 (2021-11-30 11:23:11 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-threads        base
        base-unix           base
        conf-findutils      1           Virtual package relying on findutils
        coq                 8.10.2      Formal proof management system
        num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.09.1      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.09.1      Official release 4.09.1
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.9.1       A library manager for OCaml
        # opam file:
        opam-version: "2.0"
        maintainer: "yves.bertot@inria.fr"
        license: "LGPL 2.1"
        homepage: "https://github.com/karmaki/coq-dpdgraph"
        build: [
          ["./configure"]
          ["echo" "%{jobs}%" "jobs for the linter"]
          [make]
         ]
        bug-reports: "https://github.com/karmaki/coq-dpdgraph/issues"
        dev-repo: "git+https://github.com/karmaki/coq-dpdgraph.git"
        install: [
          [make "install" "BINDIR=%{bin}%"]
        ]
        remove: [
          ["rm" "%{bin}%/dpd2dot" "%{bin}%/dpdusage"]
          ["rm" "-R" "%{lib}%/coq/user-contrib/dpdgraph"]
        ]
        depends: [
          "ocaml"
          "coq" {>= "8.6" & < "8.7~"}
          "ocamlgraph"
        ]
        authors: [ "Anne Pacalet" "Yves Bertot"]
        synopsis: "Compute dependencies between Coq objects (definitions, theorems) and produce graphs"
        flags: light-uninstall
        url {
          src:
            "https://github.com/ybertot/coq-dpdgraph/archive/coq-dpdgraph-0.6.1.zip"
          checksum: "md5=0477114ba537b184ad715c23d94ac0ca"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-dpdgraph.0.6.1 coq.8.10.2
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.10.2).
        The following dependencies couldn't be met:
          - coq-dpdgraph -> coq < 8.7~ -> ocaml < 4.06.0
              base of this switch (use `--unlock-base' to force)
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-dpdgraph.0.6.1
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "import po.DistributeReceiptPO; import po.DriverPO; import po.EnVehicleReceiptPO; import po.GatheringReceiptPO; import po.OrderAcceptReceiptPO; import po.OrganizationPO; import po.VehiclePO; /** * BusinessData */ public interface BusinessDataService extends Remote { // 根据营业厅ID(找到文件)和营业厅业务员ID(查找文件内容),ID为null就返回第一个 public BusinessPO getBusinessInfo(String organizationID, String ID) throws RemoteException; // 根据营业厅ID和车辆ID查询车辆PO public VehiclePO getVehicleInfo(String organizationID, String vehicleID) throws RemoteException; // 营业厅每日一个,每日早上8点发货一次 public boolean addReceipt(String organizationID, OrderAcceptReceiptPO po) throws RemoteException; // 获得某营业厅的全部车辆信息 public ArrayList getVehicleInfos(String organizationID) throws RemoteException; // 添加装车单到今日装车单文件中 public boolean addEnVehicleReceipt(String organizationID, ArrayList pos) throws RemoteException; // 增加一个车辆信息VehiclePO到VehiclePOList中 public boolean addVehicle(String organizationID, VehiclePO po) throws RemoteException; // 删除VehiclePOList中的一个车辆信息VehiclePO public boolean deleteVehicle(String organizationID, VehiclePO po) throws RemoteException; // 修改VehiclePOList中的一个车辆信息VehiclePO public boolean modifyVehicle(String organizationID, VehiclePO po) throws RemoteException; // 返回本营业厅司机信息列表 public ArrayList getDriverInfos(String organizationID) throws RemoteException; // 增加一个GatheringReceipt到本营业厅今日的文件中,一天也就一个 public boolean addGatheringReceipt(String organizationID, GatheringReceiptPO grp) throws RemoteException; // 获得今日本营业厅OrderAcceptReceiptPO的个数 public int getNumOfOrderAcceptReceipt(String organizationID) throws RemoteException; // 返回规定日期的所有GatheringReceipt,time格式 2015-11-23 public ArrayList getGatheringReceipt(String time) throws RemoteException; public ArrayList getGatheringReceiptByHallID(String organization) throws RemoteException; public ArrayList getGatheringReceiptByBoth(String organization, String time) throws RemoteException; // 增加一个DistributeOrder到本营业厅今日的文件中,一天也就一个 public boolean addDistributeReceipt(String organizationID, DistributeReceiptPO po) throws RemoteException; // 查照死机 public DriverPO getDriverInfo(String organizationID, String ID) throws RemoteException; // 增加一个司机到本营业厅 public boolean addDriver(String organizationID, DriverPO po) throws RemoteException; // 删除一个司机到本营业厅 public boolean deleteDriver(String organizationID, DriverPO po) throws RemoteException; // 修改本营业厅该司机信息 public boolean modifyDriver(String organizationID, DriverPO po) throws RemoteException; /** * Lizi 收款单 */ public ArrayList getSubmittedGatheringReceiptInfo() throws RemoteException; /** * Lizi 派件单 */ public ArrayList getSubmittedDistributeReceiptInfo() throws RemoteException; /** * Lizi 装车 */ public ArrayList getSubmittedEnVehicleReceiptInfo() throws RemoteException; /** * Lizi 到达单 */ public ArrayList getSubmittedOrderAcceptReceiptInfo() throws RemoteException; public void saveDistributeReceiptInfo(DistributeReceiptPO po) throws RemoteException; public void saveOrderAcceptReceiptInfo(OrderAcceptReceiptPO po) throws RemoteException; public void saveEnVehicleReceiptInfo(EnVehicleReceiptPO po) throws RemoteException; public void saveGatheringReceiptInfo(GatheringReceiptPO po) throws RemoteException; // public boolean addDriverTime(String organizationID, String driverID) throws RemoteException; public ArrayList getOrganizationInfos() throws RemoteException; public int getNumOfVehicles(String organizationID) throws RemoteException; public int getNumOfDrivers(String organizationID) throws RemoteException; public int getNumOfEnVechileReceipt(String organizationID) throws RemoteException; public int getNumOfOrderReceipt(String organizationID) throws RemoteException; public int getNumOfOrderDistributeReceipt(String organizationID) throws RemoteException; // // /** // * 返回待转运的订单的列表 // */ // public ArrayList getTransferOrders() throws RemoteException; // // /** // * 返回待派送的订单的列表 // */ // public ArrayList getFreeVehicles() throws RemoteException; // // /** // * 生成装车单 // */ // public boolean addEnVehicleReceiptPO(EnVehicleReceiptPO po) throws // RemoteException; // // /** // * 获取收款汇总单 // */ // public ArrayList getGatheringReceiptPOs() throws // RemoteException; // // /** // * 增加收货单 // */ // public boolean addReceipt(OrderAcceptReceiptPO po) throws // RemoteException; // // /** // * 增加收款汇总单 // */ // // public boolean addGatheringReceipt(GatheringReceiptPO po); } ",0 "enerated by javadoc (1.8.0_292) on Fri Jul 02 16:35:39 UTC 2021 --> Uses of Interface org.bukkit.WorldBorder (Glowkit 1.16.5-R0.1-SNAPSHOT API)
        • Prev
        • Next

        Uses of Interface
        org.bukkit.WorldBorder

        • Prev
        • Next

        Copyright © 2021. All rights reserved.

        ",0 "tion.h> #import NS_ASSUME_NONNULL_BEGIN @interface DNTag : NSObject @property (nonatomic, copy) NSString *text; @property (nonatomic, copy) NSAttributedString *attributedText; @property (nonatomic, strong) UIColor *textColor; @property (nonatomic, strong) UIColor *bgColor; @property (nonatomic, strong) UIColor *highlightedBgColor; @property (nonatomic, strong) UIColor *borderColor; @property (nonatomic, strong) UIImage *bgImg; @property (nonatomic, strong) UIFont *font; @property (nonatomic, assign) CGFloat cornerRadius; @property (nonatomic, assign) CGFloat borderWidth; ///like padding in css @property (nonatomic, assign) UIEdgeInsets padding; ///if no font is specified, system font with fontSize is used @property (nonatomic, assign) CGFloat fontSize; ///default:YES @property (nonatomic, assign) BOOL enable; - (nonnull instancetype)initWithText: (nonnull NSString *)text; + (nonnull instancetype)tagWithText: (nonnull NSString *)text; @end NS_ASSUME_NONNULL_END ",0 "); public function __construct($page, $perPage = 10) { $this->page = $page < 1 ? 1 : (int)$page; $this->perPage = (int)$perPage; } public function isEmpty() { return empty($this->items); } public function getIterator() { return new ArrayIterator($this->items); } public function getPage() { return $this->page; } public function getOffset() { return ($this->page - 1) * $this->perPage; } public function getPerPage() { return $this->perPage; } public function getPageCount() { return $this->pageCount; } public function fill($totalItems, $items) { $this->pageCount = ceil($totalItems / $this->perPage); $this->items = $items; } public function isLinkToFirstPageAvailable() { return $this->page > 2; } public function isLinkToPreviousPageAvailable() { return $this->page > 1; } public function isLinkToNextPageAvailable() { return $this->page < $this->pageCount; } public function isLinkToLastPageAvailable() { return $this->page < ($this->pageCount - 1); } public function render($href, $param = 'page') { if ($this->getPageCount() < 2) { return ''; } $result = 'Strony (' . $this->getPageCount() . '): '; $result .= $this->isLinkToFirstPageAvailable() ? '« Pierwsza ' #: '« First '; : ''; $result .= $this->isLinkToPreviousPageAvailable() ? '‹ Poprzednia ' #: '‹ Previous '; : ''; $pageNumbers = 3; $page = $this->getPage(); $last = $page + $pageNumbers; $cut = true; if (($page - $pageNumbers) < 1) { $page = 1; } else { $page -= $pageNumbers; if ($page !== 1) $result .= '... '; } if ($last > $this->getPageCount()) { $last = $this->getPageCount(); $cut = false; } for (; $page <= $last; ++$page) { $result .= $page === $this->getPage() ? '' . $page . '' : '' . $page . ''; $result .= $page < $last ? ' | ' : ' '; } if ($cut && $last != $this->getPageCount()) { $result .= '... '; } $result .= $this->isLinkToNextPageAvailable() ? 'Następna › ' #: 'Next › '; : ''; $result .= $this->isLinkToLastPageAvailable() ? 'Ostatnia »' #: 'Last »'; : ''; return $result; } } ",0 "ain 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. * * Copyright 2012-2017 the original author or authors. */ package org.assertj.core.util.introspection; import static java.lang.String.format; import static java.util.Collections.emptyList; import static java.util.Collections.unmodifiableList; import static org.assertj.core.util.IterableUtil.isNullOrEmpty; import static org.assertj.core.util.Preconditions.checkArgument; import static org.assertj.core.util.introspection.Introspection.getPropertyGetter; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import org.assertj.core.util.VisibleForTesting; /** * Utility methods for properties access. * * @author Joel Costigliola * @author Alex Ruiz * @author Nicolas François * @author Florent Biville */ public class PropertySupport { private static final String SEPARATOR = "".""; private static final PropertySupport INSTANCE = new PropertySupport(); /** * Returns the singleton instance of this class. * * @return the singleton instance of this class. */ public static PropertySupport instance() { return INSTANCE; } @VisibleForTesting PropertySupport() { } /** * Returns a {@link List} containing the values of the given property name, from the elements of the * given {@link Iterable}. If the given {@code Iterable} is empty or {@code null}, this method will * return an empty {@code List}. This method supports nested properties (e.g. ""address.street.number""). * * @param propertyName the name of the property. It may be a nested property. It is left to the clients to validate * for {@code null} or empty. * @param target the given {@code Iterable}. * @return an {@code Iterable} containing the values of the given property name, from the elements of the given * {@code Iterable}. * @throws IntrospectionError if an element in the given {@code Iterable} does not have a property with a matching * name. */ public List propertyValues(String propertyName, Class clazz, Iterable target) { if (isNullOrEmpty(target)) { return emptyList(); } if (isNestedProperty(propertyName)) { String firstPropertyName = popPropertyNameFrom(propertyName); Iterable propertyValues = propertyValues(firstPropertyName, Object.class, target); // extract next sub-property values until reaching the last sub-property return propertyValues(nextPropertyNameFrom(propertyName), clazz, propertyValues); } return simplePropertyValues(propertyName, clazz, target); } /** * Static variant of {@link #propertyValueOf(String, Class, Object)} for syntactic sugar. *

        * * @param propertyName the name of the property. It may be a nested property. It is left to the clients to validate * for {@code null} or empty. * @param target the given object * @param clazz type of property * @return a the values of the given property name * @throws IntrospectionError if the given target does not have a property with a matching name. */ public static T propertyValueOf(String propertyName, Object target, Class clazz) { return instance().propertyValueOf(propertyName, clazz, target); } private List simplePropertyValues(String propertyName, Class clazz, Iterable target) { List propertyValues = new ArrayList<>(); for (Object e : target) { propertyValues.add(e == null ? null : propertyValue(propertyName, clazz, e)); } return unmodifiableList(propertyValues); } private String popPropertyNameFrom(String propertyNameChain) { if (!isNestedProperty(propertyNameChain)) { return propertyNameChain; } return propertyNameChain.substring(0, propertyNameChain.indexOf(SEPARATOR)); } private String nextPropertyNameFrom(String propertyNameChain) { if (!isNestedProperty(propertyNameChain)) { return """"; } return propertyNameChain.substring(propertyNameChain.indexOf(SEPARATOR) + 1); } /** *

         isNestedProperty("address.street"); // true
           * isNestedProperty("address.street.name"); // true
           * isNestedProperty("person"); // false
           * isNestedProperty(".name"); // false
           * isNestedProperty("person."); // false
           * isNestedProperty("person.name."); // false
           * isNestedProperty(".person.name"); // false
           * isNestedProperty("."); // false
           * isNestedProperty(""); // false
        */ private boolean isNestedProperty(String propertyName) { return propertyName.contains(SEPARATOR) && !propertyName.startsWith(SEPARATOR) && !propertyName.endsWith(SEPARATOR); } /** * Return the value of a simple property from a target object. *

        * This only works for simple property, nested property are not supported ! use * {@link #propertyValueOf(String, Class, Object)} * * @param propertyName the name of the property. It may be a nested property. It is left to the clients to validate * for {@code null} or empty. * @param target the given object * @param clazz type of property * @return a the values of the given property name * @throws IntrospectionError if the given target does not have a property with a matching name. */ @SuppressWarnings(""unchecked"") public T propertyValue(String propertyName, Class clazz, Object target) { Method getter = getPropertyGetter(propertyName, target); try { return (T) getter.invoke(target); } catch (ClassCastException e) { String msg = format(""Unable to obtain the value of the property <'%s'> from <%s> - wrong property type specified <%s>"", propertyName, target, clazz); throw new IntrospectionError(msg, e); } catch (Exception unexpected) { String msg = format(""Unable to obtain the value of the property <'%s'> from <%s>"", propertyName, target); throw new IntrospectionError(msg, unexpected); } } /** * Returns the value of the given property name given target. If the given object is {@code null}, this method will * return null.
        * This method supports nested properties (e.g. ""address.street.number""). * * @param propertyName the name of the property. It may be a nested property. It is left to the clients to validate * for {@code null} or empty. * @param clazz the class of property. * @param target the given Object to extract property from. * @return the value of the given property name given target. * @throws IntrospectionError if target object does not have a property with a matching name. * @throws IllegalArgumentException if propertyName is null. */ public T propertyValueOf(String propertyName, Class clazz, Object target) { checkArgument(propertyName != null, ""the property name should not be null.""); // returns null if target is null as we can't extract a property from a null object // but don't want to raise an exception if we were looking at a nested property if (target == null) return null; if (isNestedProperty(propertyName)) { String firstPropertyName = popPropertyNameFrom(propertyName); Object propertyValue = propertyValue(firstPropertyName, Object.class, target); // extract next sub-property values until reaching the last sub-property return propertyValueOf(nextPropertyNameFrom(propertyName), clazz, propertyValue); } return propertyValue(propertyName, clazz, target); } /** * just delegates to {@link #propertyValues(String, Class, Iterable)} with Class being Object.class */ public List propertyValues(String fieldOrPropertyName, Iterable objects) { return propertyValues(fieldOrPropertyName, Object.class, objects); } public boolean publicGetterExistsFor(String fieldName, Object actual) { try { getPropertyGetter(fieldName, actual); } catch (IntrospectionError e) { return false; } return true; } } ",0 "license information, please view the LICENSE * file that was distributed with this source code. */ namespace SunCat\WeatherUndergroundBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader; /** * DI extension * * @author suncat2000 */ class WeatherUndergroundExtension extends Extension { /** * {@inheritDoc} */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); $container->setParameter('weather_underground.apikey', $config['apikey']); $container->setParameter('weather_underground.format', $config['format']); $container->setParameter('weather_underground.host_data_features', $config['host_data_features']); $container->setParameter('weather_underground.host_autocomlete', $config['host_autocomlete']); } } ",0 "the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Write the data from the opcode */ switch (inst.code.save) { /* Byte */ case S_C_Eb: inst_op1_b=inst.cond ? 1 : 0; case S_Eb: if (inst.rm<0xc0) SaveMb(inst.rm_eaa,inst_op1_b); else reg_8(inst.rm_eai)=inst_op1_b; break; case S_Gb: reg_8(inst.rm_index)=inst_op1_b; break; case S_EbGb: if (inst.rm<0xc0) SaveMb(inst.rm_eaa,inst_op1_b); else reg_8(inst.rm_eai)=inst_op1_b; reg_8(inst.rm_index)=inst_op2_b; break; /* Word */ case S_Ew: if (inst.rm<0xc0) SaveMw(inst.rm_eaa,inst_op1_w); else reg_16(inst.rm_eai)=inst_op1_w; break; case S_Gw: reg_16(inst.rm_index)=inst_op1_w; break; case S_EwGw: if (inst.rm<0xc0) SaveMw(inst.rm_eaa,inst_op1_w); else reg_16(inst.rm_eai)=inst_op1_w; reg_16(inst.rm_index)=inst_op2_w; break; /* Dword */ case S_Ed: if (inst.rm<0xc0) SaveMd(inst.rm_eaa,inst_op1_d); else reg_32(inst.rm_eai)=inst_op1_d; break; case S_EdMw: /* Special one 16 to memory, 32 zero extend to reg */ if (inst.rm<0xc0) SaveMw(inst.rm_eaa,inst_op1_w); else reg_32(inst.rm_eai)=inst_op1_d; break; case S_Gd: reg_32(inst.rm_index)=inst_op1_d; break; case S_EdGd: if (inst.rm<0xc0) SaveMd(inst.rm_eaa,inst_op1_d); else reg_32(inst.rm_eai)=inst_op1_d; reg_32(inst.rm_index)=inst_op2_d; break; case S_REGb: reg_8(inst.code.extra)=inst_op1_b; break; case S_REGw: reg_16(inst.code.extra)=inst_op1_w; break; case S_REGd: reg_32(inst.code.extra)=inst_op1_d; break; case S_SEGm: if (CPU_SetSegGeneral((SegNames)inst.rm_index,inst_op1_w)) RunException(); break; case S_SEGGw: if (CPU_SetSegGeneral((SegNames)inst.code.extra,inst_op2_w)) RunException(); reg_16(inst.rm_index)=inst_op1_w; break; case S_SEGGd: if (CPU_SetSegGeneral((SegNames)inst.code.extra,inst_op2_w)) RunException(); reg_32(inst.rm_index)=inst_op1_d; break; case S_PUSHw: Push_16(inst_op1_w); break; case S_PUSHd: Push_32(inst_op1_d); break; case S_C_AIPw: if (!inst.cond) goto nextopcode; case S_AIPw: SaveIP(); reg_eip+=inst_op1_d; reg_eip&=0xffff; continue; case S_C_AIPd: if (!inst.cond) goto nextopcode; case S_AIPd: SaveIP(); reg_eip+=inst_op1_d; continue; case S_IPIw: reg_esp+=Fetchw(); case S_IP: SaveIP(); reg_eip=inst_op1_d; continue; case 0: break; default: LOG(LOG_CPU,LOG_ERROR)(""SAVE:Unhandled code %d entry %X"",inst.code.save,inst.entry); } ",0 " Magic3 Framework * @author 平田直毅(Naoki Hirata) * @copyright Copyright 2006-2014 Magic3 Project. * @license http://www.gnu.org/copyleft/gpl.html GPL License * @version SVN: $Id$ * @link http://www.magic3.org */

        名前
        HTML
        ",0 "javadoc (build 1.5.0_22) on Thu May 24 19:39:44 WET 2012 --> API Help (Apache JMeter API)
        Overview  Package  Class  Tree  Deprecated  Index   Help 
        Apache JMeter
         PREV   NEXT FRAMES    NO FRAMES    

        How This API Document Is Organized

        This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

        Overview

        The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

        Package

        Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

        • Interfaces (italic)
        • Classes
        • Enums
        • Exceptions
        • Errors
        • Annotation Types

        Class/Interface

        Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

        • Class inheritance diagram
        • Direct Subclasses
        • All Known Subinterfaces
        • All Known Implementing Classes
        • Class/interface declaration
        • Class/interface description

        • Nested Class Summary
        • Field Summary
        • Constructor Summary
        • Method Summary

        • Field Detail
        • Constructor Detail
        • Method Detail
        Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

        Annotation Type

        Each annotation type has its own separate page with the following sections:

        • Annotation Type declaration
        • Annotation Type description
        • Required Element Summary
        • Optional Element Summary
        • Element Detail

        Enum

        Each enum has its own separate page with the following sections:

        • Enum declaration
        • Enum description
        • Enum Constant Summary
        • Enum Constant Detail

        Tree (Class Hierarchy)

        There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
        • When viewing the Overview page, clicking on ""Tree"" displays the hierarchy for all packages.
        • When viewing a particular package, class or interface page, clicking ""Tree"" displays the hierarchy for only that package.

        Deprecated API

        The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

        Index

        The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

        Prev/Next

        These links take you to the next or previous class, interface, package, or related page.

        Frames/No Frames

        These links show and hide the HTML frames. All pages are available with or without frames.

        Serialized Form

        Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking ""Serialized Form"" in the ""See also"" section of the class description.

        Constant Field Values

        The Constant Field Values page lists the static final fields and their values.

        This help file applies to API documentation generated using the standard doclet.


        Overview  Package  Class  Tree  Deprecated  Index   Help 
        Apache JMeter
         PREV   NEXT FRAMES    NO FRAMES    

        Copyright © 1998-2012 Apache Software Foundation. All Rights Reserved. ",0 "sor.ArgumentException; import org.renjin.primitives.annotations.processor.ArgumentIterator; import org.renjin.primitives.annotations.processor.WrapperRuntime; import org.renjin.sexp.BuiltinFunction; import org.renjin.sexp.Environment; import org.renjin.sexp.FunctionCall; import org.renjin.sexp.PairList; import org.renjin.sexp.SEXP; import org.renjin.sexp.StringVector; import org.renjin.sexp.Vector; public class R$primitive$attr$assign extends BuiltinFunction { public R$primitive$attr$assign() { super(""attr<-""); } public SEXP apply(Context context, Environment environment, FunctionCall call, PairList args) { try { ArgumentIterator argIt = new ArgumentIterator(context, environment, args); SEXP s0 = argIt.evalNext(); SEXP s1 = argIt.evalNext(); SEXP s2 = argIt.evalNext(); if (!argIt.hasNext()) { return this.doApply(context, environment, s0, s1, s2); } throw new EvalException(""attr<-: too many arguments, expected at most 3.""); } catch (ArgumentException e) { throw new EvalException(context, ""Invalid argument: %s. Expected:\n\tattr<-(any, character(1), any)"", e.getMessage()); } catch (EvalException e) { e.initContext(context); throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new EvalException(e); } } public static SEXP doApply(Context context, Environment environment, FunctionCall call, String[] argNames, SEXP[] args) { try { if ((args.length) == 3) { return doApply(context, environment, args[ 0 ], args[ 1 ], args[ 2 ]); } } catch (EvalException e) { e.initContext(context); throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new EvalException(e); } throw new EvalException(""attr<-: max arity is 3""); } public SEXP apply(Context context, Environment environment, FunctionCall call, String[] argNames, SEXP[] args) { return R$primitive$attr$assign.doApply(context, environment, call, argNames, args); } public static SEXP doApply(Context context, Environment environment, SEXP arg0, SEXP arg1, SEXP arg2) throws Exception { if (((arg0 instanceof SEXP)&&((arg1 instanceof Vector)&&StringVector.VECTOR_TYPE.isWiderThanOrEqualTo(((Vector) arg1))))&&(arg2 instanceof SEXP)) { return Attributes.setAttribute(((SEXP) arg0), WrapperRuntime.convertToString(arg1), ((SEXP) arg2)); } else { throw new EvalException(String.format(""Invalid argument:\n\tattr<-(%s, %s, %s)\n\tExpected:\n\tattr<-(any, character(1), any)"", arg0 .getTypeName(), arg1 .getTypeName(), arg2 .getTypeName())); } } } ",0 "javadoc (build 1.6.0_24) on Fri Feb 22 14:06:12 EET 2013 --> javalabra.chess.core.impl.state (Chess 0.0.1-SNAPSHOT API)
        Overview   Package  Class  Use  Tree  Deprecated  Index  Help 
         PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES    

        Package javalabra.chess.core.impl.state

        Class Summary
        AbstractGameState Abstract game state.
        SelectMoveState State object representing state when piece on the board is selected and game is waiting for a move to be choosen.
        SelectPieceState State object representing state when game is waiting for piece of concrete color to be selected.
         


        Overview   Package  Class  Use  Tree  Deprecated  Index  Help 
         PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES    

        Copyright © 2013. All Rights Reserved. ",0 "ard core Moodle (>1.8) formslib. For * more info about them, please visit: * * http://docs.moodle.org/en/Development:lib/formslib.php * * The form must provide support for, at least these fields: * - name: text element of 64cc max * * Also, it's usual to use these fields: * - intro: one htmlarea element to describe the activity * (will be showed in the list of activities of * deva type (index.php) and in the header * of the deva main page (view.php). * - introformat: The format used to write the contents * of the intro field. It automatically defaults * to HTML when the htmleditor is used and can be * manually selected if the htmleditor is not used * (standard formats are: MOODLE, HTML, PLAIN, MARKDOWN) * See lib/weblib.php Constants and the format_text() * function for more info */ require_once($CFG->dirroot.'/course/moodleform_mod.php'); class mod_deva_mod_form extends moodleform_mod { function definition() { global $COURSE; $mform =& $this->_form; //------------------------------------------------------------------------------- /// Adding the ""general"" fieldset, where all the common settings are showed $mform->addElement('header', 'general', get_string('general', 'form')); /// Adding the standard ""name"" field $mform->addElement('text', 'name', get_string('devaname', 'deva'), array('size'=>'64')); $mform->setType('name', PARAM_TEXT); $mform->addRule('name', null, 'required', null, 'client'); $mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client'); /// Adding the required ""intro"" field to hold the description of the instance $mform->addElement('htmleditor', 'intro', get_string('devaintro', 'deva')); $mform->setType('intro', PARAM_RAW); $mform->addRule('intro', get_string('required'), 'required', null, 'client'); $mform->setHelpButton('intro', array('writing', 'richtext'), false, 'editorhelpbutton'); /// Adding ""introformat"" field $mform->addElement('format', 'introformat', get_string('format')); //------------------------------------------------------------------------------- /// Adding the rest of deva settings, spreeading all them into this fieldset /// or adding more fieldsets ('header' elements) if needed for better logic $mform->addElement('static', 'label1', 'devasetting1', 'Your deva fields go here. Replace me!'); $mform->addElement('header', 'devafieldset', get_string('devafieldset', 'deva')); $mform->addElement('static', 'label2', 'devasetting2', 'Your deva fields go here. Replace me!'); //------------------------------------------------------------------------------- // add standard elements, common to all modules $this->standard_coursemodule_elements(); //------------------------------------------------------------------------------- // add standard buttons, common to all modules $this->add_action_buttons(); } } ?> ",0 "org/1999/xhtml""> Einleitung zu Vienna   Einleitung zu Vienna

        Vienna ist ein Programm zum lesen und verwalten von RSS und Atom Feeds auf Mac OSX Computern. Es automatisiert Aufgaben zum verwalten von Atikeln der abonnierten Feeds und speichert sie in einer lokalen Datenbank um die Artikel auch Offline lesen zu können. Unterstützte Merkmale sind das Durchsuchen der Feeds nach Schlüsselwörtern und Phrasen, makieren ineressanter Artikel und zusammenfassen von Feeds in Gruppen. Sie können intelligente Ordner erstellen, die Artikel mit den von ihnen festgelegten Eigenschaften enthalten. Mit dem intekrierten Browser werden die Artikel Web-Seiten und Links direkt im Programm in Tabs dargestelllt.

        Vienna ist für eine einfache Nutzung konzipiert und besitzt eine optimierte Oberfläche für eine bessere Übersicht und Kontrolle.

        ",0 "hts reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Tags view class for the Tags package. * * @package Joomla.Administrator * @subpackage com_tags * @since 3.1 */ class TagsViewTags extends JViewLegacy { protected $items; protected $pagination; protected $state; protected $assoc; /** * Display the view */ public function display($tpl = null) { $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); TagsHelper::addSubmenu('tags'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode(""\n"", $errors)); return false; } // Preprocess the list of items to find ordering divisions. foreach ($this->items as &$item) { $this->ordering[$item->parent_id][] = $item->id; } // Levels filter. $options = array(); $options[] = JHtml::_('select.option', '1', JText::_('J1')); $options[] = JHtml::_('select.option', '2', JText::_('J2')); $options[] = JHtml::_('select.option', '3', JText::_('J3')); $options[] = JHtml::_('select.option', '4', JText::_('J4')); $options[] = JHtml::_('select.option', '5', JText::_('J5')); $options[] = JHtml::_('select.option', '6', JText::_('J6')); $options[] = JHtml::_('select.option', '7', JText::_('J7')); $options[] = JHtml::_('select.option', '8', JText::_('J8')); $options[] = JHtml::_('select.option', '9', JText::_('J9')); $options[] = JHtml::_('select.option', '10', JText::_('J10')); $this->f_levels = $options; $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 3.1 */ protected function addToolbar() { $state = $this->get('State'); $canDo = TagsHelper::getActions($state->get('filter.parent_id')); $user = JFactory::getUser(); // Get the toolbar object instance $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_TAGS_MANAGER_TAGS'), 'modules.png'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('tag.add'); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('tag.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('tags.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('tags.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolbarHelper::archiveList('tags.archive'); } if ($canDo->get('core.admin')) { JToolbarHelper::checkin('tags.checkin'); } if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'tags.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('tags.trash'); } // Add a batch button if ($user->authorise('core.edit')) { JHtml::_('bootstrap.modal', 'collapseModal'); $title = JText::_('JTOOLBAR_BATCH'); $dhtml = """"; $bar->appendButton('Custom', $dhtml, 'batch'); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_tags'); } JToolbarHelper::help('JHELP_COMPONENTS_TAGS'); JHtmlSidebar::setAction('index.php?option=com_tags&view=tags'); JHtmlSidebar::addFilter( JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) ); JHtmlSidebar::addFilter( JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) ); JHtmlSidebar::addFilter( JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')) ); } /** * Returns an array of fields the table can be sorted by * * @return array Array containing the field name to sort by as the key and display text as value * * @since 3.0 */ protected function getSortFields() { return array( 'a.lft' => JText::_('JGRID_HEADING_ORDERING'), 'a.state' => JText::_('JSTATUS'), 'a.title' => JText::_('JGLOBAL_TITLE'), 'a.access' => JText::_('JGRID_HEADING_ACCESS'), 'language' => JText::_('JGRID_HEADING_LANGUAGE'), 'a.id' => JText::_('JGRID_HEADING_ID') ); } } ",0 "s 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. */ package org.drools.core.base.accumulators; import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.io.Serializable; /** * An implementation of an accumulator capable of counting occurences */ public class CountAccumulateFunction extends AbstractAccumulateFunction { public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { } public void writeExternal(ObjectOutput out) throws IOException { } protected static class CountData implements Externalizable { public long count = 0; public CountData() {} public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { count = in.readLong(); } public void writeExternal(ObjectOutput out) throws IOException { out.writeLong(count); } } /* (non-Javadoc) * @see org.kie.base.accumulators.AccumulateFunction#createContext() */ public CountData createContext() { return new CountData(); } /* (non-Javadoc) * @see org.kie.base.accumulators.AccumulateFunction#init(java.lang.Object) */ public void init(CountData data) { data.count = 0; } /* (non-Javadoc) * @see org.kie.base.accumulators.AccumulateFunction#accumulate(java.lang.Object, java.lang.Object) */ public void accumulate(CountData data, Object value) { data.count++; } /* (non-Javadoc) * @see org.kie.base.accumulators.AccumulateFunction#reverse(java.lang.Object, java.lang.Object) */ public void reverse(CountData data, Object value) { data.count--; } /* (non-Javadoc) * @see org.kie.base.accumulators.AccumulateFunction#getResult(java.lang.Object) */ public Object getResult(CountData data) { return new Long( data.count ); } /* (non-Javadoc) * @see org.kie.base.accumulators.AccumulateFunction#supportsReverse() */ public boolean supportsReverse() { return true; } /** * {@inheritDoc} */ public Class< ? > getResultType() { return Long.class; } } ",0 ">Uses of Class org.deidentifier.arx.gui.view.impl.define.ViewAttributeDefinition (ARX GUI Documentation)
        • Prev
        • Next

        Uses of Class
        org.deidentifier.arx.gui.view.impl.define.ViewAttributeDefinition

        No usage of org.deidentifier.arx.gui.view.impl.define.ViewAttributeDefinition
        • Prev
        • Next
        ",0 " model object 'Query'. * * *

        * The following features are supported: *

          *
        • {@link org.eclipse.bpel4chor.model.pbd.Query#getQueryLanguage Query Language}
        • *
        • {@link org.eclipse.bpel4chor.model.pbd.Query#getOpaque Opaque}
        • *
        • {@link org.eclipse.bpel4chor.model.pbd.Query#getValue Value}
        • *
        *

        * * @see org.eclipse.bpel4chor.model.pbd.PbdPackage#getQuery() * @model * @generated */ public interface Query extends ExtensibleElements { /** * Returns the value of the 'Query Language' attribute. * *

        * If the meaning of the 'Query Language' attribute isn't clear, * there really should be more of a description here... *

        * * @return the value of the 'Query Language' attribute. * @see #setQueryLanguage(String) * @see org.eclipse.bpel4chor.model.pbd.PbdPackage#getQuery_QueryLanguage() * @model * @generated */ String getQueryLanguage(); /** * Sets the value of the '{@link org.eclipse.bpel4chor.model.pbd.Query#getQueryLanguage Query Language}' attribute. * * * @param value the new value of the 'Query Language' attribute. * @see #getQueryLanguage() * @generated */ void setQueryLanguage(String value); /** * Returns the value of the 'Opaque' attribute. * The literals are from the enumeration {@link org.eclipse.bpel4chor.model.pbd.OpaqueBoolean}. * *

        * If the meaning of the 'Opaque' attribute isn't clear, * there really should be more of a description here... *

        * * @return the value of the 'Opaque' attribute. * @see org.eclipse.bpel4chor.model.pbd.OpaqueBoolean * @see #setOpaque(OpaqueBoolean) * @see org.eclipse.bpel4chor.model.pbd.PbdPackage#getQuery_Opaque() * @model * @generated */ OpaqueBoolean getOpaque(); /** * Sets the value of the '{@link org.eclipse.bpel4chor.model.pbd.Query#getOpaque Opaque}' attribute. * * * @param value the new value of the 'Opaque' attribute. * @see org.eclipse.bpel4chor.model.pbd.OpaqueBoolean * @see #getOpaque() * @generated */ void setOpaque(OpaqueBoolean value); /** * Returns the value of the 'Value' attribute. * *

        * If the meaning of the 'Value' attribute isn't clear, * there really should be more of a description here... *

        * * @return the value of the 'Value' attribute. * @see #setValue(String) * @see org.eclipse.bpel4chor.model.pbd.PbdPackage#getQuery_Value() * @model * @generated */ String getValue(); /** * Sets the value of the '{@link org.eclipse.bpel4chor.model.pbd.Query#getValue Value}' attribute. * * * @param value the new value of the 'Value' attribute. * @see #getValue() * @generated */ void setValue(String value); } // Query ",0 " // can be found in the LICENSE file. // // --------------------------------------------------------------------------- // // This file was generated by the CEF translator tool. If making changes by // hand only do so within the body of existing method and function // implementations. See the translator.README.txt file in the tools directory // for more information. // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ #define CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ #pragma once #ifndef BUILDING_CEF_SHARED #pragma message(""Warning: ""__FILE__"" may be accessed DLL-side only"") #else // BUILDING_CEF_SHARED #include ""include/cef_v8.h"" #include ""include/capi/cef_v8_capi.h"" #include ""libcef_dll/cpptoc/cpptoc.h"" // Wrap a C++ class with a C structure. // This class may be instantiated and accessed DLL-side only. class CefV8ValueCppToC : public CefCppToC { public: explicit CefV8ValueCppToC(CefV8Value* cls); }; #endif // BUILDING_CEF_SHARED #endif // CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ ",0 " class SendEmailChangeConfirmation extends Job { protected $newEmail; /** * Create a new job instance. * * @return void */ public function __construct($newEmail) { $this->newEmail = $newEmail; } /** * Execute the job. * * @return void */ public function handle(EmailConfirmationRepository $tokens) { $token = str_random(5); $tokens->store($this->newEmail, $token); Mail::queue('emails.auth.email_change_confirmation', ['new_email' => $this->newEmail, 'token' => $token], function ($m) { $m->to($this->newEmail)->subject('Email Change'); }); } } ",0 "ion 2.0 (“APL v2.0”). If a copy of the APL was not distributed with this file, You can obtain one at http://www.appverse.mobi/licenses/apl_v2.0.pdf. [^] Redistribution and use in source and binary forms, with or without modification, are permitted provided that the conditions of the AppVerse Public License v2.0 are met. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. EXCEPT IN CASE OF WILLFUL MISCONDUCT OR GROSS NEGLIGENCE, IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.appverse.web.framework.backend.core.enterprise.converters; import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; import org.appverse.web.framework.backend.core.beans.AbstractBusinessBean; import org.appverse.web.framework.backend.core.beans.AbstractIntegrationBean; import org.dozer.Mapper; import org.dozer.spring.DozerBeanMapperFactoryBean; public abstract class AbstractDozerB2IBeanConverter implements IB2IBeanConverter { private Class integrationBeanClass; private Class businessBeanClass; private String SCOPE_WITHOUT_DEPENDENCIES = ""default-scope-without-dependencies""; private String SCOPE_COMPLETE = ""default-scope-complete""; private String SCOPE_CUSTOM = ""default-scope-custom""; @Resource protected DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean; public AbstractDozerB2IBeanConverter() { } @Override public IntegrationBean convert(BusinessBean bean) throws Exception { return convert(bean, ConversionType.Complete); } @Override public IntegrationBean convert(BusinessBean businessBean, ConversionType conversionType) throws Exception { return convert(businessBean, getScope(conversionType)); } @Override public IntegrationBean convert(BusinessBean businessBean, String scope) throws Exception { return ((Mapper) dozerBeanMapperFactoryBean.getObject()).map( businessBean, integrationBeanClass, scope); } @Override public void convert(final BusinessBean businessBean, IntegrationBean integrationBean) throws Exception { convert(businessBean, integrationBean, ConversionType.Complete); } @Override public void convert(final BusinessBean businessBean, IntegrationBean integrationBean, ConversionType conversionType) throws Exception { convert(businessBean, integrationBean, getScope(conversionType)); } @Override public void convert(final BusinessBean businessBean, IntegrationBean integrationBean, String scope) throws Exception{ ((Mapper) dozerBeanMapperFactoryBean.getObject()).map(businessBean, integrationBean, scope); } @Override public BusinessBean convert(IntegrationBean bean) throws Exception { return convert(bean, ConversionType.Complete); } @Override public void convert(final IntegrationBean integrationBean, BusinessBean businessBean) throws Exception { convert(integrationBean, businessBean, ConversionType.Complete); } @Override public void convert(final IntegrationBean integrationBean, BusinessBean businessBean, ConversionType conversionType) throws Exception { convert(integrationBean, businessBean, getScope(conversionType)); } @Override public void convert(final IntegrationBean integrationBean, BusinessBean businessBean, String scope) throws Exception { ((Mapper) dozerBeanMapperFactoryBean.getObject()).map(integrationBean, businessBean, scope); } @Override public BusinessBean convert(IntegrationBean integrationBean, ConversionType conversionType) throws Exception { return convert(integrationBean, getScope(conversionType)); } @Override public BusinessBean convert(IntegrationBean integrationBean, String scope) throws Exception { return ((Mapper) dozerBeanMapperFactoryBean.getObject()).map( integrationBean, businessBeanClass, scope); } @Override public List convertBusinessList( List businessBeans) throws Exception { List integrationBeans = new ArrayList(); for (BusinessBean businessBean : businessBeans) { IntegrationBean integrationBean = convert(businessBean, ConversionType.Complete); integrationBeans.add(integrationBean); } return integrationBeans; } @Override public List convertBusinessList( List businessBeans, ConversionType conversionType) throws Exception { return convertBusinessList(businessBeans, getScope(conversionType)); } @Override public List convertBusinessList( List businessBeans, String scope) throws Exception { List integrationBeans = new ArrayList(); for (BusinessBean businessBean : businessBeans) { IntegrationBean integrationBean = ((Mapper) dozerBeanMapperFactoryBean .getObject()).map(businessBean, integrationBeanClass, scope); integrationBeans.add(integrationBean); } return integrationBeans; } @Override public void convertBusinessList(final List businessBeans, List integrationBeans) throws Exception { if (businessBeans.size() != integrationBeans.size()) { throw new ListDiffersSizeException(); } for (int i = 0; i < businessBeans.size(); i++) { convert(businessBeans.get(i), integrationBeans.get(i), ConversionType.Complete); } } @Override public void convertBusinessList(final List businessBeans, List integrationBeans, ConversionType conversionType) throws Exception { convertBusinessList(businessBeans, integrationBeans, getScope(conversionType)); } @Override public void convertBusinessList(final List businessBeans, List integrationBeans, String scope) throws Exception { if (businessBeans.size() != integrationBeans.size()) { throw new ListDiffersSizeException(); } for (int i = 0; i < businessBeans.size(); i++) { ((Mapper) dozerBeanMapperFactoryBean.getObject()).map( businessBeans.get(i), integrationBeans.get(i), scope); } } @Override public List convertIntegrationList( List integrationBeans) throws Exception { List businessBeans = new ArrayList(); for (IntegrationBean integrationBean : integrationBeans) { BusinessBean businessBean = convert(integrationBean, ConversionType.Complete); businessBeans.add(businessBean); } return businessBeans; } @Override public List convertIntegrationList( List integrationBeans, ConversionType conversionType) throws Exception { return convertIntegrationList(integrationBeans, getScope(conversionType)); } @Override public List convertIntegrationList( List integrationBeans, String scope) throws Exception { List businessBeans = new ArrayList(); for (IntegrationBean integrationBean : integrationBeans) { BusinessBean businessBean = ((Mapper) dozerBeanMapperFactoryBean .getObject()).map(integrationBean, businessBeanClass, scope); businessBeans.add(businessBean); } return businessBeans; } @Override public void convertIntegrationList( final List integrationBeans, List businessBeans) throws Exception { if (integrationBeans.size() != businessBeans.size()) { throw new ListDiffersSizeException(); } for (int i = 0; i < integrationBeans.size(); i++) { convert(integrationBeans.get(i), businessBeans.get(i), ConversionType.Complete); } } @Override public void convertIntegrationList( final List integrationBeans, List businessBeans, ConversionType conversionType) throws Exception { convertIntegrationList(integrationBeans, businessBeans, getScope(conversionType)); } @Override public void convertIntegrationList( final List integrationBeans, List businessBeans, String scope) throws Exception { if (integrationBeans.size() != businessBeans.size()) { throw new ListDiffersSizeException(); } for (int i = 0; i < integrationBeans.size(); i++) { ((Mapper) dozerBeanMapperFactoryBean.getObject()).map( integrationBeans.get(i), businessBeans.get(i), scope); } } @Override public String getScope(ConversionType conversionType) { String scope = null; if (conversionType == ConversionType.WithoutDependencies) { scope = SCOPE_WITHOUT_DEPENDENCIES; } else if (conversionType == ConversionType.Custom) { scope = SCOPE_CUSTOM; } else { scope = SCOPE_COMPLETE; } return scope; } public void setBeanClasses(Class businessBeanClass, Class integrationBeanClass) { this.integrationBeanClass = integrationBeanClass; this.businessBeanClass = businessBeanClass; } @Override public void setScopes(String... scopes) { if (scopes.length > 0) { this.SCOPE_COMPLETE = scopes[0]; } if (scopes.length > 1) { this.SCOPE_WITHOUT_DEPENDENCIES = scopes[1]; } if (scopes.length > 2) { this.SCOPE_CUSTOM = scopes[2]; } } } ",0 "vm.de> * * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include ""config.h"" #include void proto_register_docsis_dpvreq(void); void proto_reg_handoff_docsis_dpvreq(void); /* Initialize the protocol and registered fields */ static int proto_docsis_dpvreq = -1; static int hf_docsis_dpvreq_tranid = -1; static int hf_docsis_dpvreq_dschan = -1; static int hf_docsis_dpvreq_flags = -1; static int hf_docsis_dpvreq_us_sf = -1; static int hf_docsis_dpvreq_n = -1; static int hf_docsis_dpvreq_start = -1; static int hf_docsis_dpvreq_end = -1; static int hf_docsis_dpvreq_ts_start = -1; static int hf_docsis_dpvreq_ts_end = -1; /* Initialize the subtree pointers */ static gint ett_docsis_dpvreq = -1; /* Dissection */ static void dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { proto_item *it; proto_tree *dpvreq_tree = NULL; guint16 transid; guint8 dschan; transid = tvb_get_ntohs (tvb, 0); dschan = tvb_get_guint8 (tvb, 2); col_add_fstr (pinfo->cinfo, COL_INFO, ""DOCSIS Path Verify Request: Transaction-Id = %u DS-Ch %d"", transid, dschan); if (tree) { it = proto_tree_add_protocol_format (tree, proto_docsis_dpvreq, tvb, 0, -1, ""DPV Request""); dpvreq_tree = proto_item_add_subtree (it, ett_docsis_dpvreq); proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_tranid, tvb, 0, 2, ENC_BIG_ENDIAN); proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_dschan, tvb, 2, 1, ENC_BIG_ENDIAN); proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_flags, tvb, 3, 1, ENC_BIG_ENDIAN); proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_us_sf, tvb, 4, 4, ENC_BIG_ENDIAN); proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_n, tvb, 8, 2, ENC_BIG_ENDIAN); proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_start, tvb, 10, 1, ENC_BIG_ENDIAN); proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_end, tvb, 11, 1, ENC_BIG_ENDIAN); proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_start, tvb, 12, 4, ENC_BIG_ENDIAN); proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_end, tvb, 16, 4, ENC_BIG_ENDIAN); } } /* Register the protocol with Wireshark */ void proto_register_docsis_dpvreq (void) { static hf_register_info hf[] = { {&hf_docsis_dpvreq_tranid, {""Transaction Id"", ""docsis_dpvreq.tranid"", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} }, {&hf_docsis_dpvreq_dschan, {""Downstream Channel ID"", ""docsis_dpvreq.dschan"", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} }, {&hf_docsis_dpvreq_flags, {""Flags"", ""docsis_dpvreq.flags"", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} }, {&hf_docsis_dpvreq_us_sf, {""Upstream Service Flow ID"", ""docsis_dpvreq.us_sf"", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} }, {&hf_docsis_dpvreq_n, {""N (Measurement avaraging factor)"", ""docsis_dpvreq.n"", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} }, {&hf_docsis_dpvreq_start, {""Start Reference Point"", ""docsis_dpvreq.start"", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} }, {&hf_docsis_dpvreq_end, {""End Reference Point"", ""docsis_dpvreq.end"", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} }, {&hf_docsis_dpvreq_ts_start, {""Timestamp Start"", ""docsis_dpvreq.ts_start"", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} }, {&hf_docsis_dpvreq_ts_end, {""Timestamp End"", ""docsis_dpvreq.ts_end"", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} }, }; static gint *ett[] = { &ett_docsis_dpvreq, }; proto_docsis_dpvreq = proto_register_protocol (""DOCSIS Path Verify Request"", ""DOCSIS DPV-REQ"", ""docsis_dpvreq""); proto_register_field_array (proto_docsis_dpvreq, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); register_dissector (""docsis_dpvreq"", dissect_dpvreq, proto_docsis_dpvreq); } void proto_reg_handoff_docsis_dpvreq (void) { dissector_handle_t docsis_dpvreq_handle; docsis_dpvreq_handle = find_dissector (""docsis_dpvreq""); dissector_add_uint (""docsis_mgmt"", 0x27, docsis_dpvreq_handle); } /* * Editor modelines - http://www.wireshark.org/tools/modelines.html * * Local Variables: * c-basic-offset: 2 * tab-width: 8 * indent-tabs-mode: nil * End: * * ex: set shiftwidth=2 tabstop=8 expandtab: * :indentSize=2:tabSize=8:noTabs=true: */ ",0 "olbar; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; import ngo.music.soundcloudplayer.R; import ngo.music.soundcloudplayer.adapters.SCSongAdapter; import ngo.music.soundcloudplayer.adapters.SCSearchSongAdapter; import ngo.music.soundcloudplayer.boundary.MusicPlayerMainActivity; import ngo.music.soundcloudplayer.boundary.fragment.abstracts.SoundCloudExploreFragment; import ngo.music.soundcloudplayer.controller.SongController; import ngo.music.soundcloudplayer.general.Constants; import ngo.music.soundcloudplayer.service.MusicPlayerService; public class SCSongSearchFragment extends SoundCloudExploreFragment { public SCSongSearchFragment() { // TODO Auto-generated constructor stub super(); query = MusicPlayerMainActivity.query; } @Override protected int getCategory() { // TODO Auto-generated method stub return SEARCH; } } ",0 "e=""button"" class=""navbar-toggle"" data-toggle=""collapse"" data-target=""#myNavbar""> Club Membership ",0 " 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. */ #ifndef ART_RUNTIME_ARCH_ARM_ASM_SUPPORT_ARM_H_ #define ART_RUNTIME_ARCH_ARM_ASM_SUPPORT_ARM_H_ #include ""asm_support.h"" #define FRAME_SIZE_SAVE_ALL_CALLEE_SAVE 112 #define FRAME_SIZE_REFS_ONLY_CALLEE_SAVE 32 #define FRAME_SIZE_REFS_AND_ARGS_CALLEE_SAVE 112 // Flag for enabling R4 optimization in arm runtime // #define ARM_R4_SUSPEND_FLAG #endif // ART_RUNTIME_ARCH_ARM_ASM_SUPPORT_ARM_H_ ",0 "rap the project. * There is no need for developers to write model classes themselves. * Once there are some updates or modified parts in the database, * Please run this class as JavaApplication to update Modal class files. * * @author lihe * */ public class Bootstrap { public static void main(String[] args){ EntityGenerator generator = new EntityGenerator(); try { generator.generateModel(); } catch (IOException e) { e.printStackTrace(); } } } ",0 "ww.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 * */ /** * ezcomNotification persistent object class definition * */ class ezcomNotification extends eZPersistentObject { /** * Construct, use {@link ezcomNotification::create()} to create new objects. * * @param array $row */ public function __construct( $row ) { parent::__construct( $row ); } /** * Fields definition * * @return array */ public static function definition() { static $def = array( 'fields' => array( 'id' => array( 'name' => 'ID', 'datatype' => 'integer', 'default' => 0, 'required' => true ), 'contentobject_id' => array( 'name' => 'ContentObjectID', 'datatype' => 'integer', 'default' => 0, 'required' => true ), 'language_id' => array( 'name' => 'LanguageID', 'datatype' => 'integer', 'default' => 0, 'required' => true ), 'send_time' => array( 'name' => 'SendTime', 'datatype' => 'integer', 'default' => 0, 'required' => true ), 'status' => array( 'name' => 'Status', 'datatype' => 'integer', 'default' => 1, 'required' => true ), 'comment_id' => array( 'name' => 'CommentID', 'datatype' => 'integer', 'default' => 0, 'required' => true ) ), 'keys' => array( 'id' ), 'function_attributes' => array(), 'increment_key' => 'id', 'class_name' => 'ezcomNotification', 'name' => 'ezcomment_notification' ); return $def; } /** * Create new ezcomNotification object * * @static * @param array $row * @return ezcomNotification */ public static function create( $row = array() ) { $object = new self( $row ); return $object; } /** * Fetch notification by given id * * @param int $id * @return null|ezcomNotification */ static function fetch( $id ) { $cond = array( 'id' => $id ); $return = eZPersistentObject::fetchObject( self::definition(), null, $cond ); return $return; } /** * Fetch the list of notification * @param $length: count of the notification to be fetched * @param $status: the status of the notification * @param $offset: offset * @return notification list */ static function fetchNotificationList( $status = 1, $length = null, $offset = 0, $sorts = null ) { $cond = array(); if ( is_null( $status ) ) { $cond = null; } else { $cond['status'] = $status; } $limit = array(); if ( is_null( $length ) ) { $limit = null; } else { $limit['offset'] = $offset; $limit['length'] = $length; } return eZPersistentObject::fetchObjectList( self::definition(), null, $cond, $sorts, $limit ); } /** * clean up the notification quque * @param unknown_type $contentObjectID * @param unknown_type $languageID * @param unknown_type $commentID * @return unknown_type */ public static function cleanUpNotification( $contentObjectID, $language ) { //1. fetch the queue, judge if there is data // } } ?> ",0 "en mentioned separately.) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ package megan.clusteranalysis.commands; import jloda.swing.commands.ICheckBoxCommand; import jloda.util.parse.NexusStreamParser; import megan.clusteranalysis.ClusterViewer; import megan.clusteranalysis.indices.EuclideanDistance; import javax.swing.*; import java.awt.event.ActionEvent; /** * method=Euclidean command * Daniel Huson, 6.2010 */ public class EcologicalIndexEuclideanCommand extends CommandBase implements ICheckBoxCommand { /** * this is currently selected? * * @return selected */ public boolean isSelected() { ClusterViewer viewer = getViewer(); return viewer.getEcologicalIndex().equalsIgnoreCase(EuclideanDistance.NAME); } /** * get the name to be used as a menu label * * @return name */ public String getName() { return ""Use Euclidean""; } /** * get description to be used as a tool-tip * * @return description */ public String getDescription() { return ""Use Euclidean ecological index""; } /** * get icon to be used in menu or button * * @return icon */ public ImageIcon getIcon() { return null; } /** * gets the accelerator key to be used in menu * * @return accelerator key */ public KeyStroke getAcceleratorKey() { return null; } /** * action to be performed * * @param ev */ public void actionPerformed(ActionEvent ev) { execute(""set index="" + EuclideanDistance.NAME + "";""); } /** * gets the command needed to undo this command * * @return undo command */ public String getUndo() { return null; } /** * is the command currently applicable? Used to set enable state of command * * @return true, if command can be applied */ public boolean isApplicable() { return getViewer().getParentViewer() != null && getViewer().getParentViewer().hasComparableData() && getViewer().getParentViewer().getSelectedNodes().size() > 0; } /** * is this a critical command that can only be executed when no other command is running? * * @return true, if critical */ public boolean isCritical() { return true; } /** * parses the given command and executes it * * @param np * @throws java.io.IOException */ public void apply(NexusStreamParser np) throws Exception { } /** * get command-line usage description * * @return usage */ public String getSyntax() { return null; } } ",0 "* It is also available through the world-wide-web at this URL: * http://github.com/nebiros/yasc/raw/master/LICENSE * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to mail@jfalvarez.com so we can send you a copy immediately. * * @category Yasc * @package Yasc * @subpackage Yasc_App * @copyright Copyright (c) 2010 - 2014 Juan Felipe Alvarez Sadarriaga. (http://juan.im) * @version $Id$ * @license http://github.com/nebiros/yasc/raw/master/LICENSE New BSD License */ /** * Configuration. * * @package Yasc * @subpackage Yasc_App * @copyright Copyright (c) 2010 - 2014 Juan Felipe Alvarez Sadarriaga. (http://juan.im) * @license http://github.com/nebiros/yasc/raw/master/LICENSE New BSD License * @author nebiros */ class Yasc_App_Config { /** * * @var array */ protected $_options = array(); /** * * @var bool */ protected $_useViewStream = false; /** * Layout. * * @var string */ protected $_layoutScript = null; /** * */ public function __construct() { $this->_addDefaultPaths(); } /** * * @param array $options * @return Yasc_App_Config */ public function setOptions(Array $options) { $this->_options = $options; return $this; } /** * * @return array */ public function getOptions() { return $this->_options; } /** * * @param mixed $key * @param mixed $default * @return mixed|null */ public function getOption($key, $default = null) { if (true === isset($this->_options[$key])) { return $this->_options[$key]; } return $default; } /** * * @param array $options * @return Yasc_App_Config */ public function addOptions(Array $options) { $this->_options = array_merge($this->_options, $options); return $this; } /** * * @param mixed $key * @param mixed $value * @return Yasc_App_Config */ public function addOption($key, $value = null) { $this->_options[$key] = $value; return $this; } /** * * @param bool $flag * @return Yasc_App_Config */ public function setViewStream($flag = false) { $this->_useViewStream = $flag; return $this; } /** * * @return bool */ public function useViewStream() { return $this->_useViewStream; } /** * * @return array */ public function getViewsPaths() { return Yasc_Autoloader_Manager::getInstance()->getPaths( Yasc_Autoloader_Manager::PATH_TYPE_VIEW); } /** * * @param string $path * @return Yasc_App_Config */ public function setViewsPath($path) { Yasc_Autoloader_Manager::getInstance()->addPath( Yasc_Autoloader_Manager::PATH_TYPE_VIEW_HELPER, $path); return $this; } /** * * @param string $path * @return Yasc_App_Config */ public function addViewsPath($path) { Yasc_Autoloader_Manager::getInstance()->addPath( Yasc_Autoloader_Manager::PATH_TYPE_VIEW, $path); return $this; } /** * * @return string */ public function getLayoutScript() { return $this->_layoutScript; } /** * * @param string $layout * @return Yasc_App_Config */ public function setLayoutScript($layout) { if (false === is_string($layout)) { return false; } $layout = realpath($layout); if (false === is_file($layout)) { throw new Yasc_App_Exception(""Layout file '{$layout}' not found""); } $this->_layoutScript = $layout; // Cause a layout is a view too, we going to add layout script folder // to the views folders. $this->addViewsPath(dirname($this->_layoutScript)); return $this; } /** * * @return array */ public function getViewHelperPaths() { return Yasc_Autoloader_Manager::getInstance()->getPaths( Yasc_Autoloader_Manager::PATH_TYPE_VIEW_HELPER); } /** * * @param string $classPrefix * @return string */ public function getViewHelpersPath($classPrefix = null) { return Yasc_Autoloader_Manager::getInstance()->getPath( Yasc_Autoloader_Manager::PATH_TYPE_VIEW_HELPER, $classPrefix); } /** * * @param string $path * @param string $classPrefix * @return Yasc_App_Config */ public function setViewHelpersPath($path, $classPrefix = null) { Yasc_Autoloader_Manager::getInstance()->setPath( Yasc_Autoloader_Manager::PATH_TYPE_VIEW_HELPER, $path, $classPrefix); return $this; } /** * * @param string $path * @param string $classPrefix * @return Yasc_App_Config */ public function addViewHelpersPath($path, $classPrefix = null) { Yasc_Autoloader_Manager::getInstance()->addPath( Yasc_Autoloader_Manager::PATH_TYPE_VIEW_HELPER, $path, $classPrefix); return $this; } /** * * @return array */ public function getFunctionHelperPaths() { return Yasc_Autoloader_Manager::getInstance()->getPaths( Yasc_Autoloader_Manager::PATH_TYPE_FUNCTION_HELPER); } /** * * @param string $classPrefix * @return string */ public function getFunctionHelpersPath($classPrefix = null) { return Yasc_Autoloader_Manager::getInstance()->getPath( Yasc_Autoloader_Manager::PATH_TYPE_FUNCTION_HELPER, $classPrefix); } /** * * @param string $path * @param string $classPrefix * @return Yasc_App_Config */ public function setFunctionHelpersPath($path, $classPrefix = null) { Yasc_Autoloader_Manager::getInstance()->setPath( Yasc_Autoloader_Manager::PATH_TYPE_FUNCTION_HELPER, $path, $classPrefix); return $this; } /** * * @param string $path * @param string $classPrefix * @return Yasc_App_Config */ public function addFunctionHelpersPath($path, $classPrefix = null) { Yasc_Autoloader_Manager::getInstance()->addPath( Yasc_Autoloader_Manager::PATH_TYPE_FUNCTION_HELPER, $path, $classPrefix); return $this; } /** * * @return array */ public function getModelPaths() { return Yasc_Autoloader_Manager::getInstance()->getPaths( Yasc_Autoloader_Manager::PATH_TYPE_MODEL); } /** * * @param string $path * @param string $classPrefix * @return Yasc_App_Config */ public function setModelsPath($path, $classPrefix = null) { Yasc_Autoloader_Manager::getInstance()->setPath( Yasc_Autoloader_Manager::PATH_TYPE_MODEL, $path, $classPrefix); return $this; } /** * * @param string $path * @param string $classPrefix * @return Yasc_App_Config */ public function addModelsPath($path, $classPrefix = null) { Yasc_Autoloader_Manager::getInstance()->addPath( Yasc_Autoloader_Manager::PATH_TYPE_MODEL, $path, $classPrefix); return $this; } /** * * @return void */ protected function _addDefaultPaths() { $views = realpath(APPLICATION_PATH . ""/views""); $helpers = realpath(APPLICATION_PATH . ""/views/helpers""); $models = realpath(APPLICATION_PATH . ""/models""); // default paths, if they exist. if (true === is_dir($views)) { Yasc_Autoloader_Manager::getInstance()->addPath( Yasc_Autoloader_Manager::PATH_TYPE_VIEW, $views); } if (true === is_dir($helpers)) { Yasc_Autoloader_Manager::getInstance()->addPath( Yasc_Autoloader_Manager::PATH_TYPE_VIEW_HELPER, $helpers, ""Helper""); } if (true === is_dir($models)) { Yasc_Autoloader_Manager::getInstance()->addPath( Yasc_Autoloader_Manager::PATH_TYPE_MODEL, $models, ""Model""); } } } ",0 "f the The Dark Mod Source Code, originally based on the Doom 3 GPL Source Code as published in 2011. The Dark Mod Source Code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. For details, see LICENSE.TXT. Project: The Dark Mod (http://www.thedarkmod.com/) $Revision: 5122 $ (Revision of last commit) $Date: 2011-12-11 19:47:31 +0000 (Sun, 11 Dec 2011) $ (Date of last commit) $Author: greebo $ (Author of last commit) ******************************************************************************/ #ifndef __COMPRESSOR_H__ #define __COMPRESSOR_H__ /* =============================================================================== idCompressor is a layer ontop of idFile which provides lossless data compression. The compressor can be used as a regular file and multiple compressors can be stacked ontop of each other. =============================================================================== */ class idCompressor : public idFile { public: // compressor allocation static idCompressor * AllocNoCompression( void ); static idCompressor * AllocBitStream( void ); static idCompressor * AllocRunLength( void ); static idCompressor * AllocRunLength_ZeroBased( void ); static idCompressor * AllocHuffman( void ); static idCompressor * AllocArithmetic( void ); static idCompressor * AllocLZSS( void ); static idCompressor * AllocLZSS_WordAligned( void ); static idCompressor * AllocLZW( void ); // initialization virtual void Init( idFile *f, bool compress, int wordLength ) = 0; virtual void FinishCompress( void ) = 0; virtual float GetCompressionRatio( void ) const = 0; // common idFile interface virtual const char * GetName( void ) = 0; virtual const char * GetFullPath( void ) = 0; virtual int Read( void *outData, int outLength ) = 0; virtual int Write( const void *inData, int inLength ) = 0; virtual int Length( void ) = 0; virtual ID_TIME_T Timestamp( void ) = 0; virtual int Tell( void ) = 0; virtual void ForceFlush( void ) = 0; virtual void Flush( void ) = 0; virtual int Seek( long offset, fsOrigin_t origin ) = 0; }; #endif /* !__COMPRESSOR_H__ */ ",0 "shLoggerInterface; use Bolt\Storage\Entity; use Bolt\Storage\EntityManager; use Bolt\Translation\Translator as Trans; use Bolt\Users; use Carbon\Carbon; use Psr\Log\LoggerInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; /** * Helper class for ContentType record editor saves. * * Prior to v3.0 this functionality existed in \Bolt\Controllers\Backend::editcontent(). * * @author Gawain Lynch */ class Save { /** @var EntityManager */ protected $em; /** @var Config */ protected $config; /** @var Users */ protected $users; /** @var LoggerInterface */ protected $loggerChange; /** @var LoggerInterface */ protected $loggerSystem; /** @var FlashLoggerInterface */ protected $loggerFlash; /** @var UrlGeneratorInterface */ protected $urlGenerator; /** * Constructor function. * * @param EntityManager $em * @param Config $config * @param Users $users * @param LoggerInterface $loggerChange * @param LoggerInterface $loggerSystem * @param FlashLoggerInterface $loggerFlash * @param UrlGeneratorInterface $urlGenerator */ public function __construct( EntityManager $em, Config $config, Users $users, LoggerInterface $loggerChange, LoggerInterface $loggerSystem, FlashLoggerInterface $loggerFlash, UrlGeneratorInterface $urlGenerator ) { $this->em = $em; $this->config = $config; $this->users = $users; $this->loggerChange = $loggerChange; $this->loggerSystem = $loggerSystem; $this->loggerFlash = $loggerFlash; $this->urlGenerator = $urlGenerator; } /** * Do the save for a POSTed record. * * @param array $formValues * @param array $contenttype The contenttype data * @param integer $id The record ID * @param boolean $new If TRUE this is a new record * @param string $returnTo * @param string $editReferrer * * @throws AccessControlException * * @return Response */ public function action(array $formValues, array $contenttype, $id, $new, $returnTo, $editReferrer) { $contentTypeSlug = $contenttype['slug']; $repo = $this->em->getRepository($contentTypeSlug); // If we have an ID now, this is an existing record if ($id) { $content = $repo->find($id); $oldContent = clone $content; $oldStatus = $content['status']; } else { $content = $repo->create(['contenttype' => $contentTypeSlug, 'status' => $contenttype['default_status']]); $oldContent = null; $oldStatus = 'draft'; } // Don't allow spoofing the ID. if ($content->getId() !== null && (integer) $id !== $content->getId()) { if ($returnTo === 'ajax') { throw new AccessControlException(""Don't try to spoof the id!""); } $this->loggerFlash->error(""Don't try to spoof the id!""); return new RedirectResponse($this->generateUrl('dashboard')); } $this->setPostedValues($content, $formValues, $contenttype); $this->setTransitionStatus($content, $contentTypeSlug, $id, $oldStatus); // Get the associated record change comment $comment = isset($formValues['changelog-comment']) ? $formValues['changelog-comment'] : ''; // Save the record return $this->saveContentRecord($content, $oldContent, $contenttype, $new, $comment, $returnTo, $editReferrer); } /** * Check whether the status is allowed. * * We act as if a status *transition* were requested and fallback to the old * status otherwise. * * @param Entity\Entity $content * @param string $contentTypeSlug * @param integer $id * @param string $oldStatus */ private function setTransitionStatus(Entity\Entity $content, $contentTypeSlug, $id, $oldStatus) { $canTransition = $this->users->isContentStatusTransitionAllowed($oldStatus, $content->getStatus(), $contentTypeSlug, $id); if (!$canTransition) { $content->setStatus($oldStatus); } } /** * Set a Contenttype record values from a HTTP POST. * * @param Entity\Content $content * @param array $formValues * @param array $contentType * * @throws AccessControlException */ private function setPostedValues(Entity\Content $content, $formValues, $contentType) { // Ensure all fields have valid values $formValues = $this->setSuccessfulControlValues($formValues, $contentType['fields']); $formValues = Input::cleanPostedData($formValues); unset($formValues['contenttype']); $user = $this->users->getCurrentUser(); if ($id = $content->getId()) { // Owner is set explicitly, is current user is allowed to do this? if (isset($formValues['ownerid']) && (integer) $formValues['ownerid'] !== $content->getOwnerid()) { if (!$this->users->isAllowed(""contenttype:{$contentType['slug']}:change-ownership:$id"")) { throw new AccessControlException('Changing ownership is not allowed.'); } $content->setOwnerid($formValues['ownerid']); } } else { $content->setOwnerid($user['id']); } // Make sure we have a proper status. if (!in_array($formValues['status'], ['published', 'timed', 'held', 'draft'])) { if ($status = $content->getStatus()) { $formValues['status'] = $status; } else { $formValues['status'] = 'draft'; } } // Set the object values appropriately foreach ($formValues as $name => $value) { if ($name === 'relation' || $name === 'taxonomy') { continue; } else { $content->set($name, empty($value) ? null : $value); } } $this->setPostedRelations($content, $formValues); $this->setPostedTaxonomies($content, $formValues); } /** * Convert POST relationship values to an array of Entity objects keyed by * ContentType. * * @param Entity\Content $content * @param array|null $formValues */ private function setPostedRelations(Entity\Content $content, $formValues) { $related = $this->em->createCollection('Bolt\Storage\Entity\Relations'); $related->setFromPost($formValues, $content); $content->setRelation($related); } /** * Set valid POST taxonomies. * * @param Entity\Content $content * @param array|null $formValues */ private function setPostedTaxonomies(Entity\Content $content, $formValues) { $taxonomies = $this->em->createCollection('Bolt\Storage\Entity\Taxonomy'); $taxonomies->setFromPost($formValues, $content); $content->setTaxonomy($taxonomies); } /** * Commit the record to the database. * * @param Entity\Content $content * @param Entity\Content|null $oldContent * @param array $contentType * @param boolean $new * @param string $comment * @param string $returnTo * @param string $editReferrer * * @return Response */ private function saveContentRecord(Entity\Content $content, $oldContent, array $contentType, $new, $comment, $returnTo, $editReferrer) { // Save the record $repo = $this->em->getRepository($contentType['slug']); // Update the date modified timestamp $content->setDatechanged('now'); $repo->save($content); $id = $content->getId(); // Create the change log entry if configured $this->logChange($contentType, $content->getId(), $content, $oldContent, $comment); // Log the change if ($new) { $this->loggerFlash->success(Trans::__('contenttypes.generic.saved-new', ['%contenttype%' => $contentType['slug']])); $this->loggerSystem->info('Created: ' . $content->getTitle(), ['event' => 'content']); } else { $this->loggerFlash->success(Trans::__('contenttypes.generic.saved-changes', ['%contenttype%' => $contentType['slug']])); $this->loggerSystem->info('Saved: ' . $content->getTitle(), ['event' => 'content']); } /* * We now only get a returnto parameter if we are saving a new * record and staying on the same page, i.e. ""Save {contenttype}"" */ if ($returnTo) { if ($returnTo === 'new') { return new RedirectResponse( $this->generateUrl( 'editcontent', [ 'contenttypeslug' => $contentType['slug'], 'id' => $id, '#' => $returnTo, ] ) ); } elseif ($returnTo === 'saveandnew') { return new RedirectResponse( $this->generateUrl( 'editcontent', [ 'contenttypeslug' => $contentType['slug'], '#' => $returnTo, ] ) ); } elseif ($returnTo === 'ajax') { return $this->createJsonUpdate($content, true); } elseif ($returnTo === 'test') { return $this->createJsonUpdate($content, false); } } // No returnto, so we go back to the 'overview' for this contenttype. // check if a pager was set in the referrer - if yes go back there if ($editReferrer) { return new RedirectResponse($editReferrer); } else { return new RedirectResponse($this->generateUrl('overview', ['contenttypeslug' => $contentType['slug']])); } } /** * Add successful control values to request values, and do needed corrections. * * @see http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2 * * @param array $formValues * @param array $fields * * @return array */ private function setSuccessfulControlValues(array $formValues, $fields) { foreach ($fields as $key => $values) { if (isset($formValues[$key])) { if ($values['type'] === 'float') { // We allow ',' and '.' as decimal point and need '.' internally $formValues[$key] = str_replace(',', '.', $formValues[$key]); } } else { if ($values['type'] === 'select' && isset($values['multiple']) && $values['multiple'] === true) { $formValues[$key] = []; } elseif ($values['type'] === 'checkbox') { $formValues[$key] = 0; } } } return $formValues; } /** * Build a valid AJAX response for in-place saves that account for pre/post * save events. * * @param Entity\Content $content * @param boolean $flush * * @return JsonResponse */ private function createJsonUpdate(Entity\Content $content, $flush) { /* * Flush any buffers from saveConent() dispatcher hooks * and make sure our JSON output is clean. * * Currently occurs due to exceptions being generated in the dispatchers * in \Bolt\Storage::saveContent() * StorageEvents::PRE_SAVE * StorageEvents::POST_SAVE */ if ($flush) { Response::closeOutputBuffers(0, false); } $val = $content->toArray(); if ($val['datechanged'] instanceof Carbon) { $val['datechanged'] = $val['datechanged']->toIso8601String(); } elseif (isset($val['datechanged'])) { $val['datechanged'] = (new Carbon($val['datechanged']))->toIso8601String(); } // Adjust decimal point as some locales use a comma and… JavaScript $lc = localeconv(); $fields = $this->config->get('contenttypes/' . $content->getContenttype() . '/fields'); foreach ($fields as $key => $values) { if ($values['type'] === 'float' && $lc['decimal_point'] === ',') { $val[$key] = str_replace('.', ',', $val[$key]); } } // Unset flashbag for ajax $this->loggerFlash->clear(); return new JsonResponse($val); } /** * Add a change log entry to track the change. * * @param string $contentType * @param integer $contentId * @param Entity\Content $newContent * @param Entity\Content|null $oldContent * @param string|null $comment */ private function logChange($contentType, $contentId, $newContent = null, $oldContent = null, $comment = null) { $type = $oldContent ? 'Update' : 'Insert'; $this->loggerChange->info( $type . ' record', [ 'action' => strtoupper($type), 'contenttype' => $contentType, 'id' => $contentId, 'new' => $newContent ? $newContent->toArray() : null, 'old' => $oldContent ? $oldContent->toArray() : null, 'comment' => $comment, ] ); } /** * Shortcut for {@see UrlGeneratorInterface::generate} * * @param string $name The name of the route * @param array $params An array of parameters * @param bool $referenceType The type of reference to be generated (one of the constants) * * @return string */ private function generateUrl($name, $params = [], $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) { /** @var UrlGeneratorInterface $generator */ $generator = $this->urlGenerator; return $generator->generate($name, $params, $referenceType); } } ",0 "e #include namespace edan { template < //class Self, class Tb_ > class basic_layout_dataset_variant_base { public: std::variant < std::vector, std::vector, std::vector > __data; public: basic_layout_dataset_variant_base() noexcept { } basic_layout_dataset_variant_base(Tb_&& data) noexcept : __data(std::move(data)) { } basic_layout_dataset_variant_base(const Tb_& data) noexcept : __data(data) { } /* basic_layout_dataset_variant_base(std::vector vec) noexcept : __data(vec) { } */ /* auto& operator[](int idx) { std::variant < int, double, std::string > my_variant(__data[]); if(__data.index()==0) { my_variant = std::get<0>(__data)[idx]; return std::get<0>(my_variant); } else if(__data.index()==1) { my_variant = std::get<1>(__data)[idx]; return std::get<1>(my_variant); } else if(__data.index()==2) { my_variant = std::get<2>(__data)[idx]; return std::get<2>(my_variant); } } const auto& operator[](int _idx) const { return std::get<0>(__data)[_idx]; } */ /* basic_layout_dataset_variant_base(const Self& other) noexcept : __data(other.__data) { } basic_layout_dataset_variant_base(const Self&& other) noexcept : __data(std::move(other.__data)) { } Self& operator=(const Self& other) noexcept { __data = other.__data; return *this; } Self& operator=(const Self&& other) noexcept { __data = std::move(other.__data); return *this; } */ // Need to rewrite function auto& data() const noexcept { return __data; } auto& data() noexcept { return __data; } // overloading == operator? // }; } #endif ",0 "his work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package javax.mail.search; import javax.mail.Address; /** * Term that compares two addresses. * * @version $Rev: 920714 $ $Date: 2010-03-09 07:55:49 +0100 (Di, 09. Mär 2010) $ */ public abstract class AddressTerm extends SearchTerm { private static final long serialVersionUID = 2005405551929769980L; /** * The address. */ protected Address address; /** * Constructor taking the address for this term. * @param address the address */ protected AddressTerm(Address address) { this.address = address; } /** * Return the address of this term. * * @return the addre4ss */ public Address getAddress() { return address; } /** * Match to the supplied address. * * @param address the address to match with * @return true if the addresses match */ protected boolean match(Address address) { return this.address.equals(address); } public boolean equals(Object other) { if (this == other) return true; if (other instanceof AddressTerm == false) return false; return address.equals(((AddressTerm) other).address); } public int hashCode() { return address.hashCode(); } } ",0 " * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the ""Classpath"" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.javafx.scene.text; import com.sun.javafx.geom.RectBounds; public interface TextLine { /** * Returns the list of GlyphList in the line. The list is visually orderded. */ public GlyphList[] getRuns(); /** * Returns metrics information about the line as follow: * * bounds().getWidth() - the width of the line. * The width for the line is sum of all run's width in the line, it is not * affect by any wrapping width but it will include any changes caused by * justification. * * bounds().getHeight() - the height of the line. * The height of the line is sum of the max ascent, max descent, and * max line gap of all the fonts in the line. * * bounds.().getMinY() - the ascent of the line (negative). * The ascent of the line is the max ascent of all fonts in the line. * * bounds().getMinX() - the x origin of the line (relative to the layout). * The x origin is defined by TextAlignment of the text layout, always zero * for left-aligned text. */ public RectBounds getBounds(); /** * Returns the left side bearing of the line (negative). */ public float getLeftSideBearing(); /** * Returns the right side bearing of the line (positive). */ public float getRightSideBearing(); /** * Returns the line start offset. */ public int getStart(); /** * Returns the line length in character. */ public int getLength(); } ",0 "t 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. * */ package com.github.wasiqb.coteafs.appium.config.device.android; import lombok.Data; /** * @author Wasiq Bhamla * @since Mar 13, 2021 */ @Data public class AdbSetting { private String host; private int port; private long timeout; }",0 "logicalReplicatesGroups.new)"" >

        1. {{biologicalReplicatesGroupName}}
          1. {{biologicalReplicate}}

        ",0 "javadoc (build 1.6.0_18) on Tue Nov 02 13:16:53 CET 2010 --> com.redhat.rhn.common.filediff Class Hierarchy
        Overview  Package  Class   Tree  Deprecated  Index  Help 
         PREV   NEXT FRAMES    NO FRAMES    

        Hierarchy For Package com.redhat.rhn.common.filediff

        Package Hierarchies:
        All Packages

        Class Hierarchy

        Interface Hierarchy


        Overview  Package  Class   Tree  Deprecated  Index  Help 
         PREV   NEXT FRAMES    NO FRAMES    

        ",0 "attern; import org.fxmisc.flowless.VirtualizedScrollPane; import org.fxmisc.richtext.CodeArea; import org.fxmisc.richtext.LineNumberFactory; import org.fxmisc.richtext.model.StyleSpans; import org.fxmisc.richtext.model.StyleSpansBuilder; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class XMLEditor extends Application { private static final Pattern XML_TAG = Pattern.compile(""(?(]*)(\\h*/?>))"" +""|(?)""); private static final Pattern ATTRIBUTES = Pattern.compile(""(\\w+\\h*)(=)(\\h*\""[^\""]+\"")""); private static final int GROUP_OPEN_BRACKET = 2; private static final int GROUP_ELEMENT_NAME = 3; private static final int GROUP_ATTRIBUTES_SECTION = 4; private static final int GROUP_CLOSE_BRACKET = 5; private static final int GROUP_ATTRIBUTE_NAME = 1; private static final int GROUP_EQUAL_SYMBOL = 2; private static final int GROUP_ATTRIBUTE_VALUE = 3; private static final String sampleCode = String.join(""\n"", new String[] { """", """", ""< orders >"", "" "", "" "", "" "", "" ESPRESSO"", "" 2"", "" false"", "" 1"", "" "", "" "", "" CAPPUCCINO"", "" 1"", "" false"", "" 1"", "" "", "" "", "" LATTE"", "" 2"", "" false"", "" 1"", "" "", "" "", "" MOCHA"", "" 3"", "" true"", "" 1"", "" "", "" "", "" "", """" }); public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) { CodeArea codeArea = new CodeArea(); codeArea.setParagraphGraphicFactory(LineNumberFactory.get(codeArea)); codeArea.textProperty().addListener((obs, oldText, newText) -> { codeArea.setStyleSpans(0, computeHighlighting(newText)); }); codeArea.replaceText(0, 0, sampleCode); Scene scene = new Scene(new StackPane(new VirtualizedScrollPane<>(codeArea)), 600, 400); scene.getStylesheets().add(JavaKeywordsAsync.class.getResource(""xml-highlighting.css"").toExternalForm()); primaryStage.setScene(scene); primaryStage.setTitle(""XML Editor Demo""); primaryStage.show(); } private static StyleSpans> computeHighlighting(String text) { Matcher matcher = XML_TAG.matcher(text); int lastKwEnd = 0; StyleSpansBuilder> spansBuilder = new StyleSpansBuilder<>(); while(matcher.find()) { spansBuilder.add(Collections.emptyList(), matcher.start() - lastKwEnd); if(matcher.group(""COMMENT"") != null) { spansBuilder.add(Collections.singleton(""comment""), matcher.end() - matcher.start()); } else { if(matcher.group(""ELEMENT"") != null) { String attributesText = matcher.group(GROUP_ATTRIBUTES_SECTION); spansBuilder.add(Collections.singleton(""tagmark""), matcher.end(GROUP_OPEN_BRACKET) - matcher.start(GROUP_OPEN_BRACKET)); spansBuilder.add(Collections.singleton(""anytag""), matcher.end(GROUP_ELEMENT_NAME) - matcher.end(GROUP_OPEN_BRACKET)); if(!attributesText.isEmpty()) { lastKwEnd = 0; Matcher amatcher = ATTRIBUTES.matcher(attributesText); while(amatcher.find()) { spansBuilder.add(Collections.emptyList(), amatcher.start() - lastKwEnd); spansBuilder.add(Collections.singleton(""attribute""), amatcher.end(GROUP_ATTRIBUTE_NAME) - amatcher.start(GROUP_ATTRIBUTE_NAME)); spansBuilder.add(Collections.singleton(""tagmark""), amatcher.end(GROUP_EQUAL_SYMBOL) - amatcher.end(GROUP_ATTRIBUTE_NAME)); spansBuilder.add(Collections.singleton(""avalue""), amatcher.end(GROUP_ATTRIBUTE_VALUE) - amatcher.end(GROUP_EQUAL_SYMBOL)); lastKwEnd = amatcher.end(); } if(attributesText.length() > lastKwEnd) spansBuilder.add(Collections.emptyList(), attributesText.length() - lastKwEnd); } lastKwEnd = matcher.end(GROUP_ATTRIBUTES_SECTION); spansBuilder.add(Collections.singleton(""tagmark""), matcher.end(GROUP_CLOSE_BRACKET) - lastKwEnd); } } lastKwEnd = matcher.end(); } spansBuilder.add(Collections.emptyList(), text.length() - lastKwEnd); return spansBuilder.create(); } } ",0 "blic function parse($antrag_id) { $antrag_id = IntVal($antrag_id); if (SITE_CALL_MODE != ""cron"") echo ""- Initiative $antrag_id\n""; if ($antrag_id == 0) { RISTools::report_ris_parser_error(""Fehler BAInitiativeParser"", ""Initiative-ID 0\n"" . print_r(debug_backtrace(), true)); return; } $html_details = RISTools::load_file(RIS_BA_BASE_URL . ""ba_initiativen_details.jsp?Id=$antrag_id""); $html_dokumente = RISTools::load_file(RIS_BA_BASE_URL . ""ba_initiativen_dokumente.jsp?Id=$antrag_id""); //$html_ergebnisse = load_file(RIS_BA_BASE_URL . ""/RII/RII/ris_antrag_ergebnisse.jsp?risid="" . $antrag_id); $daten = new Antrag(); $daten->id = $antrag_id; $daten->datum_letzte_aenderung = new CDbExpression('NOW()'); $daten->typ = Antrag::$TYP_BA_INITIATIVE; $dokumente = []; //$ergebnisse = array(); preg_match(""/.* +(.*)<\/h3/siU"", $html_details, $matches); if (count($matches) == 2) $daten->antrags_nr = Antrag::cleanAntragNr($matches[1]);; $dat_details = explode(""

        BA-Initiativen-Nummer"", $html_details); $dat_details = explode(""
        "", $dat_details[1]); preg_match_all(""/class=\""detail_row\"">.*detail_label\"">(.*)<\/d.*detail_div\"">(.*)<\/div/siU"", $dat_details[0], $matches); $betreff_gefunden = false; for ($i = 0; $i < count($matches[1]); $i++) switch (trim($matches[1][$i])) { case ""Betreff:"": $betreff_gefunden = true; $daten->betreff = html_entity_decode($this->text_simple_clean($matches[2][$i]), ENT_COMPAT, ""UTF-8""); break; case ""Status:"": $daten->status = $this->text_simple_clean($matches[2][$i]); break; case ""Bearbeitung:"": $daten->bearbeitung = trim(strip_tags($matches[2][$i])); break; } if (!$betreff_gefunden) { RISTools::report_ris_parser_error(""Fehler BAInitiativeParser"", ""Kein Betreff\n"" . $html_details); throw new Exception(""Betreff nicht gefunden""); } $dat_details = explode(""
        "", $html_details); $dat_details = explode("""", $dat_details[1]); preg_match_all(""/(.*)<\/span.*detail_div_(left|right|left_long)\"">(.*)<\/div/siU"", $dat_details[0], $matches); for ($i = 0; $i < count($matches[1]); $i++) if ($matches[3][$i] != "" "") switch ($matches[1][$i]) { case ""Zuständiges Referat:"": $daten->referat = $matches[3][$i]; break; case ""Gestellt am:"": $daten->gestellt_am = $this->date_de2mysql($matches[3][$i]); break; case ""Wahlperiode:"": $daten->wahlperiode = $matches[3][$i]; break; case ""Bearbeitungsfrist:"": $daten->bearbeitungsfrist = $this->date_de2mysql($matches[3][$i]); break; case ""Registriert am:"": $daten->registriert_am = $this->date_de2mysql($matches[3][$i]); break; case ""Bezirksausschuss:"": $daten->ba_nr = IntVal($matches[3][$i]); break; case ""Typ:"": $daten->antrag_typ = strip_tags($matches[3][$i]); break; case ""TO aufgenommen am:"": $daten->initiative_to_aufgenommen = $this->date_de2mysql($matches[3][$i]); break; } if ($daten->wahlperiode == """") $daten->wahlperiode = ""?""; preg_match_all(""/
      • .*title=\""([^\""]+)\""[^>]+href=\""(.*)\"".*>(.*)<\/a>/siU"", $html_dokumente, $matches); for ($i = 0; $i < count($matches[1]); $i++) { $dokumente[] = [ ""url"" => $matches[2][$i], ""name"" => $matches[3][$i], ""name_title"" => $matches[1][$i], ]; } /* $dat_ergebnisse = explode("""", $html_ergebnisse); $dat_ergebnisse = explode("""", $dat_ergebnisse[1]); preg_match_all(""
      • 
        
        123
        124
        125
        # File 'lib/ronin/model/has_license.rb', line 123
        
        def license!(name)
          licensed_under(name)
        end

        - (License) licensed_under(name)

        Sets the license of the model.

        Examples:

        licensed_under :mit

        Parameters:

        • name (Symbol, String)

          The name of the license to use.

        Returns:

        • (License)

          The new license of the model.

        Since:

        • 1.3.0

        
        
        114
        115
        116
        # File 'lib/ronin/model/has_license.rb', line 114
        
        def licensed_under(name)
          self.license = Ronin::License.predefined_resource(name)
        end
        Generated on Sat Jun 16 20:51:28 2012 by yard 0.8.2.1 (ruby-1.9.3).
        ",0 "heme. */ /** * Generate Spacing integration * * This file is a core Generate file and should not be edited. * * @package GeneratePress * @author Thomas Usborne * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://www.generatepress.com */ if ( !function_exists('generate_spacing_get_defaults') ) : function generate_spacing_get_defaults() { $generate_spacing_defaults = array( 'header_top' => '40', 'header_right' => '40', 'header_bottom' => '40', 'header_left' => '40', 'menu_item' => '20', 'menu_item_height' => '60', 'sub_menu_item_height' => '10', 'content_top' => '40', 'content_right' => '40', 'content_bottom' => '40', 'content_left' => '40', 'separator' => '20', 'left_sidebar_width' => '25', 'right_sidebar_width' => '25', 'widget_top' => '40', 'widget_right' => '40', 'widget_bottom' => '40', 'widget_left' => '40', 'footer_widget_container_top' => '40', 'footer_widget_container_right' => '0', 'footer_widget_container_bottom' => '40', 'footer_widget_container_left' => '0', 'footer_top' => '20', 'footer_right' => '0', 'footer_bottom' => '20', 'footer_left' => '0', ); return apply_filters( 'generate_spacing_option_defaults', $generate_spacing_defaults ); } endif; if ( !function_exists('generate_spacing_css') ) : function generate_spacing_css() { $spacing_settings = wp_parse_args( get_option( 'generate_spacing_settings', array() ), generate_spacing_get_defaults() ); $space = ' '; // Start the magic $spacing_css = array ( '.inside-header' => array( 'padding-top' => ( isset( $spacing_settings['header_top'] ) ) ? $spacing_settings['header_top'] . 'px' : null, 'padding-right' => ( isset( $spacing_settings['header_right'] ) ) ? $spacing_settings['header_right'] . 'px' : null, 'padding-bottom' => ( isset( $spacing_settings['header_bottom'] ) ) ? $spacing_settings['header_bottom'] . 'px' : null, 'padding-left' => ( isset( $spacing_settings['header_left'] ) ) ? $spacing_settings['header_left'] . 'px' : null, ), '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content' => array( 'padding-top' => ( isset( $spacing_settings['content_top'] ) ) ? $spacing_settings['content_top'] . 'px' : null, 'padding-right' => ( isset( $spacing_settings['content_right'] ) ) ? $spacing_settings['content_right'] . 'px' : null, 'padding-bottom' => ( isset( $spacing_settings['content_bottom'] ) ) ? $spacing_settings['content_bottom'] . 'px' : null, 'padding-left' => ( isset( $spacing_settings['content_left'] ) ) ? $spacing_settings['content_left'] . 'px' : null, ), '.ignore-x-spacing' => array( 'margin-right' => ( isset( $spacing_settings['content_right'] ) ) ? '-' . $spacing_settings['content_right'] . 'px' : null, 'margin-bottom' => ( isset( $spacing_settings['content_bottom'] ) ) ? $spacing_settings['content_bottom'] . 'px' : null, 'margin-left' => ( isset( $spacing_settings['content_left'] ) ) ? '-' . $spacing_settings['content_left'] . 'px' : null, ), '.ignore-xy-spacing' => array( 'margin-top' => ( isset( $spacing_settings['content_top'] ) ) ? '-' . $spacing_settings['content_top'] . 'px' : null, 'margin-right' => ( isset( $spacing_settings['content_right'] ) ) ? '-' . $spacing_settings['content_right'] . 'px' : null, 'margin-bottom' => ( isset( $spacing_settings['content_bottom'] ) ) ? $spacing_settings['content_bottom'] . 'px' : null, 'margin-left' => ( isset( $spacing_settings['content_left'] ) ) ? '-' . $spacing_settings['content_left'] . 'px' : null, ), '.main-navigation .main-nav ul li a, .menu-toggle, .menu-toggle .search-item a, .menu-toggle .search-item-disabled a' => array( 'padding-left' => ( isset( $spacing_settings['menu_item'] ) ) ? $spacing_settings['menu_item'] . 'px' : null, 'padding-right' => ( isset( $spacing_settings['menu_item'] ) ) ? $spacing_settings['menu_item'] . 'px' : null, 'line-height' => ( isset( $spacing_settings['menu_item_height'] ) ) ? $spacing_settings['menu_item_height'] . 'px' : null, ), '.nav-float-right .main-navigation .main-nav ul li a' => array( 'line-height' => ( isset( $spacing_settings['menu_item_height'] ) ) ? $spacing_settings['menu_item_height'] . 'px' : null, ), '.main-navigation .main-nav ul ul li a' => array( 'padding-left' => ( isset( $spacing_settings['menu_item'] ) ) ? $spacing_settings['menu_item'] . 'px' : null, 'padding-right' => ( isset( $spacing_settings['menu_item'] ) ) ? $spacing_settings['menu_item'] . 'px' : null, 'padding-top' => ( isset( $spacing_settings['sub_menu_item_height'] ) ) ? $spacing_settings['sub_menu_item_height'] . 'px' : null, 'padding-bottom' => ( isset( $spacing_settings['sub_menu_item_height'] ) ) ? $spacing_settings['sub_menu_item_height'] . 'px' : null, ), '.main-navigation ul ul' => array( 'top' => ( isset( $spacing_settings['menu_item_height'] ) ) ? $spacing_settings['menu_item_height'] . 'px' : null ), '.navigation-search' => array( 'height' => ( isset( $spacing_settings['menu_item_height'] ) ) ? $spacing_settings['menu_item_height'] . 'px' : null, 'line-height' => '0px' ), '.navigation-search input' => array( 'height' => ( isset( $spacing_settings['menu_item_height'] ) ) ? $spacing_settings['menu_item_height'] . 'px' : null, 'line-height' => '0px' ), '.separate-containers .widget-area .widget' => array( 'padding-top' => ( isset( $spacing_settings['widget_top'] ) ) ? $spacing_settings['widget_top'] . 'px' : null, 'padding-right' => ( isset( $spacing_settings['widget_right'] ) ) ? $spacing_settings['widget_right'] . 'px' : null, 'padding-bottom' => ( isset( $spacing_settings['widget_bottom'] ) ) ? $spacing_settings['widget_bottom'] . 'px' : null, 'padding-left' => ( isset( $spacing_settings['widget_left'] ) ) ? $spacing_settings['widget_left'] . 'px' : null, ), '.footer-widgets' => array( 'padding-top' => ( isset( $spacing_settings['footer_widget_container_top'] ) ) ? $spacing_settings['footer_widget_container_top'] . 'px' : null, 'padding-right' => ( isset( $spacing_settings['footer_widget_container_right'] ) ) ? $spacing_settings['footer_widget_container_right'] . 'px' : null, 'padding-bottom' => ( isset( $spacing_settings['footer_widget_container_bottom'] ) ) ? $spacing_settings['footer_widget_container_bottom'] . 'px' : null, 'padding-left' => ( isset( $spacing_settings['footer_widget_container_left'] ) ) ? $spacing_settings['footer_widget_container_left'] . 'px' : null, ), '.site-info' => array( 'padding-top' => ( isset( $spacing_settings['footer_top'] ) ) ? $spacing_settings['footer_top'] . 'px' : null, 'padding-right' => ( isset( $spacing_settings['footer_right'] ) ) ? $spacing_settings['footer_right'] . 'px' : null, 'padding-bottom' => ( isset( $spacing_settings['footer_bottom'] ) ) ? $spacing_settings['footer_bottom'] . 'px' : null, 'padding-left' => ( isset( $spacing_settings['footer_left'] ) ) ? $spacing_settings['footer_left'] . 'px' : null, ), '.right-sidebar.separate-containers .site-main' => array( 'margin-top' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-right' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-bottom' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-left' => '0px', 'padding' => '0px' ), '.left-sidebar.separate-containers .site-main' => array( 'margin-top' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-right' => '0px', 'margin-bottom' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-left' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'padding' => '0px' ), '.both-sidebars.separate-containers .site-main' => array( 'margin' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'padding' => '0px' ), '.both-right.separate-containers .site-main' => array( 'margin-top' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-right' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-bottom' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-left' => '0px', 'padding' => '0px' ), '.separate-containers .site-main' => array( 'margin-top' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-bottom' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'padding' => '0px' ), '.separate-containers .page-header-image, .separate-containers .page-header-content, .separate-containers .page-header-image-single, .separate-containers .page-header-content-single' => array( 'margin-top' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, ), '.both-left.separate-containers .site-main' => array( 'margin-top' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-right' => '0px', 'margin-bottom' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-left' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'padding' => '0px' ), '.separate-containers .inside-right-sidebar, .inside-left-sidebar' => array( 'margin-top' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'margin-bottom' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, 'padding-top' => '0px', 'padding-bottom' => '0px' ), '.separate-containers .widget, .separate-containers .hentry, .separate-containers .page-header, .widget-area .main-navigation' => array( 'margin-bottom' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] . 'px' : null, ), '.both-left.separate-containers .inside-left-sidebar' => array( 'margin-right' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] / 2 . 'px' : null, 'padding-right' => '0px' ), '.both-left.separate-containers .inside-right-sidebar' => array( 'margin-left' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] / 2 . 'px' : null, 'padding-left' => '0px' ), '.both-right.separate-containers .inside-left-sidebar' => array( 'margin-right' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] / 2 . 'px' : null, 'padding-right' => '0px' ), '.both-right.separate-containers .inside-right-sidebar' => array( 'margin-left' => ( isset( $spacing_settings['separator'] ) ) ? $spacing_settings['separator'] / 2 . 'px' : null, 'padding-left' => '0px' ) ); // Output the above CSS $output = ''; foreach($spacing_css as $k => $properties) { if(!count($properties)) continue; $temporary_output = $k . ' {'; $elements_added = 0; foreach($properties as $p => $v) { if(empty($v)) continue; $elements_added++; $temporary_output .= $p . ': ' . $v . '; '; } $temporary_output .= ""}""; if($elements_added > 0) $output .= $temporary_output; } $output = str_replace(array(""\r"", ""\n""), '', $output); return $output; } /** * Enqueue scripts and styles */ add_action( 'wp_enqueue_scripts', 'generate_spacing_scripts', 50 ); function generate_spacing_scripts() { wp_add_inline_style( 'generate-style', generate_spacing_css() ); } endif;",0 "hp MIT License * @package namesilo.commands */ class NamesiloDomainsDns { /** * @var NamesiloApi */ private $api; /** * Sets the API to use for communication * * @param NamesiloApi $api The API to use for communication */ public function __construct(NamesiloApi $api) { $this->api = $api; } /** * Sets domain to use our default DNS servers. Required for free services * like Host record management, URL forwarding, email forwarding, dynamic * dns and other value added services. * * @param array $vars An array of input params including: * - SLD SLD of the DomainName * - TLD TLD of the DomainName * @return NamesiloResponse */ public function setDefault(array $vars) { return $this->api->submit(""namesilo.domains.dns.setDefault"", $vars); } /** * Sets domain to use custom DNS servers. NOTE: Services like URL forwarding, * Email forwarding, Dynamic DNS will not work for domains using custom * nameservers. * * https://www.namesilo.com/api_reference.php#changeNameServers */ public function setCustom(array $vars) { return $this->api->submit(""changeNameServers"", $vars); } /** * Gets a list of DNS servers associated with the requested domain. * * https://www.namesilo.com/api_reference.php#getDomainInfo */ public function getList(array $vars) { return $this->api->submit(""getDomainInfo"", $vars); } /** * Retrieves DNS host record settings for the requested domain. * * https://www.namesilo.com/api_reference.php#dnsListRecords */ public function getHosts(array $vars) { return $this->api->submit(""dnsListRecords"", $vars); } /** * Sets DNS host records settings for the requested domain. * * https://www.namesilo.com/api_reference.php#dnsAddRecord */ public function setHosts(array $vars) { return $this->api->submit(""dnsAddRecord"", $vars); } /** * Gets email forwarding settings for the requested domain. * * https://www.namesilo.com/api_reference.php#listEmailForwards */ public function getEmailForwarding(array $vars) { return $this->api->submit(""listEmailForwards"", $vars); } /** * Sets email forwarding for a domain name. * * https://www.namesilo.com/api_reference.php#configureEmailForward */ public function setEmailForwarding(array $vars) { return $this->api->submit(""configureEmailForward"", $vars); } } ?>",0 "om.intellij.openapi.fileTypes.impl; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.fileTypes.ExtensionFileNameMatcher; import com.intellij.openapi.fileTypes.FileNameMatcher; import com.intellij.openapi.fileTypes.FileTypeManager; import com.intellij.openapi.util.InvalidDataException; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.containers.MultiMap; import org.jdom.Element; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import java.util.*; import java.util.function.Predicate; import java.util.stream.Collectors; final class RemovedMappingTracker { private static final Logger LOG = Logger.getInstance(RemovedMappingTracker.class); static final class RemovedMapping { private final FileNameMatcher myFileNameMatcher; private final String myFileTypeName; private final boolean myApproved; private RemovedMapping(@NotNull FileNameMatcher matcher, @NotNull String fileTypeName, boolean approved) { myFileNameMatcher = matcher; myFileTypeName = fileTypeName; myApproved = approved; } @NotNull FileNameMatcher getFileNameMatcher() { return myFileNameMatcher; } @NotNull String getFileTypeName() { return myFileTypeName; } boolean isApproved() { return myApproved; } @Override public String toString() { return ""Removed mapping '"" + myFileNameMatcher + ""' -> "" + myFileTypeName; } // must not look at myApproved @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RemovedMapping mapping = (RemovedMapping)o; if (!myFileNameMatcher.equals(mapping.myFileNameMatcher)) return false; return myFileTypeName.equals(mapping.myFileTypeName); } @Override public int hashCode() { int result = myFileNameMatcher.hashCode(); result = 31 * result + myFileTypeName.hashCode(); return result; } } private final MultiMap myRemovedMappings = new MultiMap<>(); @NonNls private static final String ELEMENT_REMOVED_MAPPING = ""removed_mapping""; /** Applied for removed mappings approved by user */ @NonNls private static final String ATTRIBUTE_APPROVED = ""approved""; @NonNls private static final String ATTRIBUTE_TYPE = ""type""; void clear() { myRemovedMappings.clear(); } @NotNull RemovedMapping add(@NotNull FileNameMatcher matcher, @NotNull String fileTypeName, boolean approved) { RemovedMapping mapping = new RemovedMapping(matcher, fileTypeName, approved); List mappings = (List)myRemovedMappings.getModifiable(matcher); boolean found = false; for (int i = 0; i < mappings.size(); i++) { RemovedMapping removedMapping = mappings.get(i); if (removedMapping.getFileTypeName().equals(fileTypeName)) { mappings.set(i, mapping); found = true; break; } } if (!found) { mappings.add(mapping); } return mapping; } void load(@NotNull Element e) { myRemovedMappings.clear(); List removedMappings = readRemovedMappings(e); Set uniques = new LinkedHashSet<>(removedMappings.size()); for (RemovedMapping mapping : removedMappings) { if (!uniques.add(mapping)) { LOG.warn(new InvalidDataException(""Duplicate tag for "" + mapping)); } } for (RemovedMapping mapping : uniques) { myRemovedMappings.putValue(mapping.myFileNameMatcher, mapping); } } @NotNull static List readRemovedMappings(@NotNull Element e) { List children = e.getChildren(ELEMENT_REMOVED_MAPPING); if (children.isEmpty()) { return Collections.emptyList(); } List result = new ArrayList<>(); for (Element mapping : children) { String ext = mapping.getAttributeValue(AbstractFileType.ATTRIBUTE_EXT); FileNameMatcher matcher = ext == null ? FileTypeManager.parseFromString(mapping.getAttributeValue(AbstractFileType.ATTRIBUTE_PATTERN)) : new ExtensionFileNameMatcher(ext); boolean approved = Boolean.parseBoolean(mapping.getAttributeValue(ATTRIBUTE_APPROVED)); String fileTypeName = mapping.getAttributeValue(ATTRIBUTE_TYPE); if (fileTypeName == null) continue; RemovedMapping removedMapping = new RemovedMapping(matcher, fileTypeName, approved); result.add(removedMapping); } return result; } void save(@NotNull Element element) { List removedMappings = new ArrayList<>(myRemovedMappings.values()); removedMappings.sort(Comparator.comparing((RemovedMapping mapping) -> mapping.getFileNameMatcher().getPresentableString()).thenComparing(RemovedMapping::getFileTypeName)); for (RemovedMapping mapping : removedMappings) { Element content = writeRemovedMapping(mapping.myFileTypeName, mapping.myFileNameMatcher, true, mapping.myApproved); if (content != null) { element.addContent(content); } } } void saveRemovedMappingsForFileType(@NotNull Element map, @NotNull String fileTypeName, @NotNull Collection associations, boolean specifyTypeName) { for (FileNameMatcher matcher : associations) { Element content = writeRemovedMapping(fileTypeName, matcher, specifyTypeName, isApproved(matcher, fileTypeName)); if (content != null) { map.addContent(content); } } } boolean hasRemovedMapping(@NotNull FileNameMatcher matcher) { return myRemovedMappings.containsKey(matcher); } private boolean isApproved(@NotNull FileNameMatcher matcher, @NotNull String fileTypeName) { RemovedMapping mapping = ContainerUtil.find(myRemovedMappings.get(matcher), m -> m.getFileTypeName().equals(fileTypeName)); return mapping != null && mapping.isApproved(); } @NotNull List getRemovedMappings() { return new ArrayList<>(myRemovedMappings.values()); } @NotNull List getMappingsForFileType(@NotNull String fileTypeName) { return myRemovedMappings.values().stream() .filter(mapping -> mapping.myFileTypeName.equals(fileTypeName)) .map(mapping -> mapping.myFileNameMatcher) .collect(Collectors.toList()); } @NotNull List removeIf(@NotNull Predicate predicate) { List result = new ArrayList<>(); for (Iterator>> iterator = myRemovedMappings.entrySet().iterator(); iterator.hasNext(); ) { Map.Entry> entry = iterator.next(); Collection mappings = entry.getValue(); mappings.removeIf(mapping -> { boolean toRemove = predicate.test(mapping); if (toRemove) { result.add(mapping); } return toRemove; }); if (mappings.isEmpty()) { iterator.remove(); } } return result; } void approveUnapprovedMappings() { for (RemovedMapping mapping : new ArrayList<>(myRemovedMappings.values())) { if (!mapping.isApproved()) { myRemovedMappings.remove(mapping.getFileNameMatcher(), mapping); myRemovedMappings.putValue(mapping.getFileNameMatcher(), new RemovedMapping(mapping.getFileNameMatcher(), mapping.getFileTypeName(), true)); } } } private static Element writeRemovedMapping(@NotNull String fileTypeName, @NotNull FileNameMatcher matcher, boolean specifyTypeName, boolean approved) { Element mapping = new Element(ELEMENT_REMOVED_MAPPING); if (!AbstractFileType.writePattern(matcher, mapping)) { return null; } if (approved) { mapping.setAttribute(ATTRIBUTE_APPROVED, ""true""); } if (specifyTypeName) { mapping.setAttribute(ATTRIBUTE_TYPE, fileTypeName); } return mapping; } } ",0 "nerationModel interface. */ final public class CsvGenerator { private final List modelList; public CsvGenerator(List modelList) { this.modelList = (List)modelList; } public StringBuilder getContent() { return getContent(""\t"", ""\\t""); } public StringBuilder getContent(String separator, String separatorAsString) { StringBuilder builder = new StringBuilder(); // First line contains the separator. builder.append(""sep="").append(separatorAsString).append(""\n""); // Get the header. if(!modelList.isEmpty()) { builder.append(modelList.get(0).toCsvFormattedHeader(separator)).append(""\n""); } // Get the data. modelList.stream().forEach((model) -> { builder.append(model.toCsvFormattedRow(separator)).append(""\n""); }); return builder; } } ",0 """stylesheet"" type=""text/css"" href=""style.css"" />
        «

        "">103°15'0""W 103°10‘O""W
        An apolis— 5 Raleh 6,7 pad
        Legend
        (D Compressor * Plant ‘ M Standefer Date: 8/27/2014
        Hiland_Gas__system Scale 1 : 41,084

        103°15'0""W 103°10'O""W

        ",0 "1 FarSite Communications Ltd. * www.farsite.co.uk * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * * Author: R.J.Dunlop * * For the most part this file only contains structures and information * that is visible to applications outside the driver. Shared memory * layout etc is internal to the driver and described within farsync.c. * Overlap exists in that the values used for some fields within the * ioctl interface extend into the cards firmware interface so values in * this file may not be changed arbitrarily. */ /* What's in a name * * The project name for this driver is Oscar. The driver is intended to be * used with the FarSite T-Series cards (T2P & T4P) running in the high * speed frame shifter mode. This is sometimes referred to as X.21 mode * which is a complete misnomer as the card continues to support V.24 and * V.35 as well as X.21. * * A short common prefix is useful for routines within the driver to avoid * conflict with other similar drivers and I chosen to use ""fst_"" for this * purpose (FarSite T-series). * * Finally the device driver needs a short network interface name. Since * ""hdlc"" is already in use I've chosen the even less informative ""sync"" * for the present. */ #define FST_NAME ""fst"" /* In debug/info etc */ #define FST_NDEV_NAME ""sync"" /* For net interface */ #define FST_DEV_NAME ""farsync"" /* For misc interfaces */ /* User version number * * This version number is incremented with each official release of the * package and is a simplified number for normal user reference. * Individual files are tracked by the version control system and may * have individual versions (or IDs) that move much faster than the * the release version as individual updates are tracked. */ #define FST_USER_VERSION ""1.04"" /* Ioctl call command values */ #define FSTWRITE (SIOCDEVPRIVATE+10) #define FSTCPURESET (SIOCDEVPRIVATE+11) #define FSTCPURELEASE (SIOCDEVPRIVATE+12) #define FSTGETCONF (SIOCDEVPRIVATE+13) #define FSTSETCONF (SIOCDEVPRIVATE+14) /* FSTWRITE * * Used to write a block of data (firmware etc) before the card is running */ struct fstioc_write { unsigned int size; unsigned int offset; unsigned char data[0]; }; /* FSTCPURESET and FSTCPURELEASE * * These take no additional data. * FSTCPURESET forces the cards CPU into a reset state and holds it there. * FSTCPURELEASE releases the CPU from this reset state allowing it to run, * the reset vector should be setup before this ioctl is run. */ /* FSTGETCONF and FSTSETCONF * * Get and set a card/ports configuration. * In order to allow selective setting of items and for the kernel to * indicate a partial status response the first field ""valid"" is a bitmask * indicating which other fields in the structure are valid. * Many of the field names in this structure match those used in the * firmware shared memory configuration interface and come originally from * the NT header file Smc.h * * When used with FSTGETCONF this structure should be zeroed before use. * This is to allow for possible future expansion when some of the fields * might be used to indicate a different (expanded) structure. */ struct fstioc_info { unsigned int valid; /* Bits of structure that are valid */ unsigned int nports; /* Number of serial ports */ unsigned int type; /* Type index of card */ unsigned int state; /* State of card */ unsigned int index; /* Index of port ioctl was issued on */ unsigned int smcFirmwareVersion; unsigned long kernelVersion; /* What Kernel version we are working with */ unsigned short lineInterface; /* Physical interface type */ unsigned char proto; /* Line protocol */ unsigned char internalClock; /* 1 => internal clock, 0 => external */ unsigned int lineSpeed; /* Speed in bps */ unsigned int v24IpSts; /* V.24 control input status */ unsigned int v24OpSts; /* V.24 control output status */ unsigned short clockStatus; /* lsb: 0=> present, 1=> absent */ unsigned short cableStatus; /* lsb: 0=> present, 1=> absent */ unsigned short cardMode; /* lsb: LED id mode */ unsigned short debug; /* Debug flags */ unsigned char transparentMode; /* Not used always 0 */ unsigned char invertClock; /* Invert clock feature for syncing */ unsigned char startingSlot; /* Time slot to use for start of tx */ unsigned char clockSource; /* External or internal */ unsigned char framing; /* E1, T1 or J1 */ unsigned char structure; /* unframed, double, crc4, f4, f12, */ /* f24 f72 */ unsigned char interface; /* rj48c or bnc */ unsigned char coding; /* hdb3 b8zs */ unsigned char lineBuildOut; /* 0, -7.5, -15, -22 */ unsigned char equalizer; /* short or lon haul settings */ unsigned char loopMode; /* various loopbacks */ unsigned char range; /* cable lengths */ unsigned char txBufferMode; /* tx elastic buffer depth */ unsigned char rxBufferMode; /* rx elastic buffer depth */ unsigned char losThreshold; /* Attenuation on LOS signal */ unsigned char idleCode; /* Value to send as idle timeslot */ unsigned int receiveBufferDelay; /* delay thro rx buffer timeslots */ unsigned int framingErrorCount; /* framing errors */ unsigned int codeViolationCount; /* code violations */ unsigned int crcErrorCount; /* CRC errors */ int lineAttenuation; /* in dB*/ unsigned short lossOfSignal; unsigned short receiveRemoteAlarm; unsigned short alarmIndicationSignal; }; /* ""valid"" bitmask */ #define FSTVAL_NONE 0x00000000 /* Nothing valid (firmware not running). * Slight misnomer. In fact nports, * type, state and index will be set * based on hardware detected. */ #define FSTVAL_OMODEM 0x0000001F /* First 5 bits correspond to the * output status bits defined for * v24OpSts */ #define FSTVAL_SPEED 0x00000020 /* internalClock, lineSpeed, clockStatus */ #define FSTVAL_CABLE 0x00000040 /* lineInterface, cableStatus */ #define FSTVAL_IMODEM 0x00000080 /* v24IpSts */ #define FSTVAL_CARD 0x00000100 /* nports, type, state, index, * smcFirmwareVersion */ #define FSTVAL_PROTO 0x00000200 /* proto */ #define FSTVAL_MODE 0x00000400 /* cardMode */ #define FSTVAL_PHASE 0x00000800 /* Clock phase */ #define FSTVAL_TE1 0x00001000 /* T1E1 Configuration */ #define FSTVAL_DEBUG 0x80000000 /* debug */ #define FSTVAL_ALL 0x00001FFF /* Note: does not include DEBUG flag */ /* ""type"" */ #define FST_TYPE_NONE 0 /* Probably should never happen */ #define FST_TYPE_T2P 1 /* T2P X21 2 port card */ #define FST_TYPE_T4P 2 /* T4P X21 4 port card */ #define FST_TYPE_T1U 3 /* T1U X21 1 port card */ #define FST_TYPE_T2U 4 /* T2U X21 2 port card */ #define FST_TYPE_T4U 5 /* T4U X21 4 port card */ #define FST_TYPE_TE1 6 /* T1E1 X21 1 port card */ /* ""family"" */ #define FST_FAMILY_TXP 0 /* T2P or T4P */ #define FST_FAMILY_TXU 1 /* T1U or T2U or T4U */ /* ""state"" */ #define FST_UNINIT 0 /* Raw uninitialised state following * system startup */ #define FST_RESET 1 /* Processor held in reset state */ #define FST_DOWNLOAD 2 /* Card being downloaded */ #define FST_STARTING 3 /* Released following download */ #define FST_RUNNING 4 /* Processor running */ #define FST_BADVERSION 5 /* Bad shared memory version detected */ #define FST_HALTED 6 /* Processor flagged a halt */ #define FST_IFAILED 7 /* Firmware issued initialisation failed * interrupt */ /* ""lineInterface"" */ #define V24 1 #define X21 2 #define V35 3 #define X21D 4 #define T1 5 #define E1 6 #define J1 7 /* ""proto"" */ #define FST_RAW 4 /* Two way raw packets */ #define FST_GEN_HDLC 5 /* Using ""Generic HDLC"" module */ /* ""internalClock"" */ #define INTCLK 1 #define EXTCLK 0 /* ""v24IpSts"" bitmask */ #define IPSTS_CTS 0x00000001 /* Clear To Send (Indicate for X.21) */ #define IPSTS_INDICATE IPSTS_CTS #define IPSTS_DSR 0x00000002 /* Data Set Ready (T2P Port A) */ #define IPSTS_DCD 0x00000004 /* Data Carrier Detect */ #define IPSTS_RI 0x00000008 /* Ring Indicator (T2P Port A) */ #define IPSTS_TMI 0x00000010 /* Test Mode Indicator (Not Supported)*/ /* ""v24OpSts"" bitmask */ #define OPSTS_RTS 0x00000001 /* Request To Send (Control for X.21) */ #define OPSTS_CONTROL OPSTS_RTS #define OPSTS_DTR 0x00000002 /* Data Terminal Ready */ #define OPSTS_DSRS 0x00000004 /* Data Signalling Rate Select (Not * Supported) */ #define OPSTS_SS 0x00000008 /* Select Standby (Not Supported) */ #define OPSTS_LL 0x00000010 /* Maintenance Test (Not Supported) */ /* ""cardMode"" bitmask */ #define CARD_MODE_IDENTIFY 0x0001 /* * Constants for T1/E1 configuration */ /* * Clock source */ #define CLOCKING_SLAVE 0 #define CLOCKING_MASTER 1 /* * Framing */ #define FRAMING_E1 0 #define FRAMING_J1 1 #define FRAMING_T1 2 /* * Structure */ #define STRUCTURE_UNFRAMED 0 #define STRUCTURE_E1_DOUBLE 1 #define STRUCTURE_E1_CRC4 2 #define STRUCTURE_E1_CRC4M 3 #define STRUCTURE_T1_4 4 #define STRUCTURE_T1_12 5 #define STRUCTURE_T1_24 6 #define STRUCTURE_T1_72 7 /* * Interface */ #define INTERFACE_RJ48C 0 #define INTERFACE_BNC 1 /* * Coding */ #define CODING_HDB3 0 #define CODING_NRZ 1 #define CODING_CMI 2 #define CODING_CMI_HDB3 3 #define CODING_CMI_B8ZS 4 #define CODING_AMI 5 #define CODING_AMI_ZCS 6 #define CODING_B8ZS 7 /* * Line Build Out */ #define LBO_0dB 0 #define LBO_7dB5 1 #define LBO_15dB 2 #define LBO_22dB5 3 /* * Range for long haul t1 > 655ft */ #define RANGE_0_133_FT 0 #define RANGE_0_40_M RANGE_0_133_FT #define RANGE_133_266_FT 1 #define RANGE_40_81_M RANGE_133_266_FT #define RANGE_266_399_FT 2 #define RANGE_81_122_M RANGE_266_399_FT #define RANGE_399_533_FT 3 #define RANGE_122_162_M RANGE_399_533_FT #define RANGE_533_655_FT 4 #define RANGE_162_200_M RANGE_533_655_FT /* * Receive Equaliser */ #define EQUALIZER_SHORT 0 #define EQUALIZER_LONG 1 /* * Loop modes */ #define LOOP_NONE 0 #define LOOP_LOCAL 1 #define LOOP_PAYLOAD_EXC_TS0 2 #define LOOP_PAYLOAD_INC_TS0 3 #define LOOP_REMOTE 4 /* * Buffer modes */ #define BUFFER_2_FRAME 0 #define BUFFER_1_FRAME 1 #define BUFFER_96_BIT 2 #define BUFFER_NONE 3 /* Debug support * * These should only be enabled for development kernels, production code * should define FST_DEBUG=0 in order to exclude the code. * Setting FST_DEBUG=1 will include all the debug code but in a disabled * state, use the FSTSETCONF ioctl to enable specific debug actions, or * FST_DEBUG can be set to prime the debug selection. */ #define FST_DEBUG 0x0000 #if FST_DEBUG extern int fst_debug_mask; /* Bit mask of actions to debug, bits * listed below. Note: Bit 0 is used * to trigger the inclusion of this * code, without enabling any actions. */ #define DBG_INIT 0x0002 /* Card detection and initialisation */ #define DBG_OPEN 0x0004 /* Open and close sequences */ #define DBG_PCI 0x0008 /* PCI config operations */ #define DBG_IOCTL 0x0010 /* Ioctls and other config */ #define DBG_INTR 0x0020 /* Interrupt routines (be careful) */ #define DBG_TX 0x0040 /* Packet transmission */ #define DBG_RX 0x0080 /* Packet reception */ #define DBG_CMD 0x0100 /* Port command issuing */ #define DBG_ASS 0xFFFF /* Assert like statements. Code that * should never be reached, if you see * one of these then I've been an ass */ #endif /* FST_DEBUG */ ",0 " related functionality. */ class Mega_Menu_Nav_Menus { /** * Return the default settings for each menu item * * @since 1.5 */ public static function get_menu_item_defaults() { $defaults = array( 'type' => 'flyout', 'align' => 'bottom-left', 'icon' => 'disabled', 'hide_text' => 'false', 'disable_link' => 'false', 'hide_arrow' => 'false', 'item_align' => 'left', 'panel_columns' => 6, // total number of columns displayed in the panel 'mega_menu_columns' => 1 // for sub menu items, how many columns to span in the panel ); return apply_filters( ""megamenu_menu_item_defaults"", $defaults ); } /** * Constructor * * @since 1.0 */ public function __construct() { add_action( 'admin_init', array( $this, 'register_nav_meta_box' ), 11 ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_menu_page_scripts' ) ); add_action( 'megamenu_save_settings', array($this, 'save') ); add_filter( 'hidden_meta_boxes', array( $this, 'show_mega_menu_metabox' ) ); } /** * By default the mega menu meta box is hidden - show it. * * @since 1.0 * @param array $hidden * @return array */ public function show_mega_menu_metabox( $hidden ) { if ( is_array( $hidden ) && count( $hidden ) > 0 ) { foreach ( $hidden as $key => $value ) { if ( $value == 'mega_menu_meta_box' ) { unset( $hidden[$key] ); } } } return $hidden; } /** * Adds the meta box container * * @since 1.0 */ public function register_nav_meta_box() { global $pagenow; if ( 'nav-menus.php' == $pagenow ) { add_meta_box( 'mega_menu_meta_box', __(""Mega Menu Settings"", ""megamenu""), array( $this, 'metabox_contents' ), 'nav-menus', 'side', 'high' ); } } /** * Enqueue required CSS and JS for Mega Menu * * @since 1.0 */ public function enqueue_menu_page_scripts($hook) { if( 'nav-menus.php' != $hook ) return; // http://wordpress.org/plugins/image-widget/ if ( class_exists( 'Tribe_Image_Widget' ) ) { $image_widget = new Tribe_Image_Widget; $image_widget->admin_setup(); } wp_enqueue_style( 'colorbox', MEGAMENU_BASE_URL . 'js/colorbox/colorbox.css', false, MEGAMENU_VERSION ); wp_enqueue_style( 'mega-menu', MEGAMENU_BASE_URL . 'css/admin-menus.css', false, MEGAMENU_VERSION ); wp_enqueue_script( 'mega-menu', MEGAMENU_BASE_URL . 'js/admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable', 'jquery-ui-accordion'), MEGAMENU_VERSION ); wp_enqueue_script( 'colorbox', MEGAMENU_BASE_URL . 'js/colorbox/jquery.colorbox-min.js', array( 'jquery' ), MEGAMENU_VERSION ); wp_localize_script( 'mega-menu', 'megamenu', array( 'debug_launched' => __(""Launched for Menu ID"", ""megamenu""), 'launch_lightbox' => __(""Mega Menu"", ""megamenu""), 'saving' => __(""Saving"", ""megamenu""), 'nonce' => wp_create_nonce('megamenu_edit'), 'nonce_check_failed' => __(""Oops. Something went wrong. Please reload the page."", ""megamenu"") ) ); do_action(""megamenu_enqueue_admin_scripts""); } /** * Show the Meta Menu settings * * @since 1.0 */ public function metabox_contents() { $menu_id = $this->get_selected_menu_id(); do_action(""megamenu_save_settings""); $this->print_enable_megamenu_options( $menu_id ); } /** * Save the mega menu settings (submitted from Menus Page Meta Box) * * @since 1.0 */ public function save() { if ( isset( $_POST['menu'] ) && $_POST['menu'] > 0 && is_nav_menu( $_POST['menu'] ) && isset( $_POST['megamenu_meta'] ) ) { $submitted_settings = $_POST['megamenu_meta']; if ( ! get_site_option( 'megamenu_settings' ) ) { add_site_option( 'megamenu_settings', $submitted_settings ); } else { $existing_settings = get_site_option( 'megamenu_settings' ); $new_settings = array_merge( $existing_settings, $submitted_settings ); update_site_option( 'megamenu_settings', $new_settings ); } do_action( ""megamenu_after_save_settings"" ); } } /** * Print the custom Meta Box settings * * @param int $menu_id * @since 1.0 */ public function print_enable_megamenu_options( $menu_id ) { $tagged_menu_locations = $this->get_tagged_theme_locations_for_menu_id( $menu_id ); $theme_locations = get_registered_nav_menus(); $saved_settings = get_site_option( 'megamenu_settings' ); if ( ! count( $theme_locations ) ) { echo ""

        "" . __(""This theme does not have any menu locations."", ""megamenu"") . ""

        ""; } else if ( ! count ( $tagged_menu_locations ) ) { echo ""

        "" . __(""This menu is not tagged to a location. Please tag a location to enable the Mega Menu settings."", ""megamenu"") . ""

        ""; } else { ?> settings_table( $location, $saved_settings ); } ?>
        $name ) : ?>

        />
        $name ) { if ( isset( $nav_menu_locations[ $id ] ) && $nav_menu_locations[$id] == $menu_id ) $locations[$id] = $name; } return $locations; } /** * Get the current menu ID. * * Most of this taken from wp-admin/nav-menus.php (no built in functions to do this) * * @since 1.0 * @return int */ public function get_selected_menu_id() { $nav_menus = wp_get_nav_menus( array('orderby' => 'name') ); $menu_count = count( $nav_menus ); $nav_menu_selected_id = isset( $_REQUEST['menu'] ) ? (int) $_REQUEST['menu'] : 0; $add_new_screen = ( isset( $_GET['menu'] ) && 0 == $_GET['menu'] ) ? true : false; // If we have one theme location, and zero menus, we take them right into editing their first menu $page_count = wp_count_posts( 'page' ); $one_theme_location_no_menus = ( 1 == count( get_registered_nav_menus() ) && ! $add_new_screen && empty( $nav_menus ) && ! empty( $page_count->publish ) ) ? true : false; // Get recently edited nav menu $recently_edited = absint( get_user_option( 'nav_menu_recently_edited' ) ); if ( empty( $recently_edited ) && is_nav_menu( $nav_menu_selected_id ) ) $recently_edited = $nav_menu_selected_id; // Use $recently_edited if none are selected if ( empty( $nav_menu_selected_id ) && ! isset( $_GET['menu'] ) && is_nav_menu( $recently_edited ) ) $nav_menu_selected_id = $recently_edited; // On deletion of menu, if another menu exists, show it if ( ! $add_new_screen && 0 < $menu_count && isset( $_GET['action'] ) && 'delete' == $_GET['action'] ) $nav_menu_selected_id = $nav_menus[0]->term_id; // Set $nav_menu_selected_id to 0 if no menus if ( $one_theme_location_no_menus ) { $nav_menu_selected_id = 0; } elseif ( empty( $nav_menu_selected_id ) && ! empty( $nav_menus ) && ! $add_new_screen ) { // if we have no selection yet, and we have menus, set to the first one in the list $nav_menu_selected_id = $nav_menus[0]->term_id; } return $nav_menu_selected_id; } } endif;",0 "_category SET parent_id = '"" . (int)$data['parent_id'] . ""', `top` = '"" . (isset($data['top']) ? (int)$data['top'] : 0) . ""', `column` = '"" . (int)$data['column'] . ""', sort_order = '"" . (int)$data['sort_order'] . ""', status = '"" . (int)$data['status'] . ""', date_modified = NOW(), date_added = NOW()""); $forum_category_id = $this->db->getLastId(); if (isset($data['image'])) { $this->db->query(""UPDATE "" . DB_PREFIX . ""forum_category SET image = '"" . $this->db->escape($data['image']) . ""' WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); } foreach ($data['category_description'] as $language_id => $value) { $this->db->query(""INSERT INTO "" . DB_PREFIX . ""forum_category_description SET forum_category_id = '"" . (int)$forum_category_id . ""', language_id = '"" . (int)$language_id . ""', name = '"" . $this->db->escape($value['name']) . ""', description = '"" . $this->db->escape($value['description']) . ""', meta_title = '"" . $this->db->escape($value['meta_title']) . ""', meta_description = '"" . $this->db->escape($value['meta_description']) . ""', meta_keyword = '"" . $this->db->escape($value['meta_keyword']) . ""'""); } $level = 0; $query = $this->db->query(""SELECT * FROM `"" . DB_PREFIX . ""forum_category_path` WHERE forum_category_id = '"" . (int)$data['parent_id'] . ""' ORDER BY `level` ASC""); foreach ($query->rows as $result) { $this->db->query(""INSERT INTO `"" . DB_PREFIX . ""forum_category_path` SET `forum_category_id` = '"" . (int)$forum_category_id . ""', `path_id` = '"" . (int)$result['path_id'] . ""', `level` = '"" . (int)$level . ""'""); $level++; } $this->cache->delete('category'); return $forum_category_id; } public function editCategory($forum_category_id, $data) { $this->db->query(""UPDATE "" . DB_PREFIX . ""forum_category SET parent_id = '"" . (int)$data['parent_id'] . ""', `top` = '"" . (isset($data['top']) ? (int)$data['top'] : 0) . ""', `column` = '"" . (int)$data['column'] . ""', sort_order = '"" . (int)$data['sort_order'] . ""', status = '"" . (int)$data['status'] . ""', date_modified = NOW() WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); if (isset($data['image'])) { $this->db->query(""UPDATE "" . DB_PREFIX . ""forum_category SET image = '"" . $this->db->escape($data['image']) . ""' WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); } $this->db->query(""DELETE FROM "" . DB_PREFIX . ""forum_category_description WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); foreach ($data['category_description'] as $language_id => $value) { $this->db->query(""INSERT INTO "" . DB_PREFIX . ""forum_category_description SET forum_category_id = '"" . (int)$forum_category_id . ""', language_id = '"" . (int)$language_id . ""', name = '"" . $this->db->escape($value['name']) . ""', description = '"" . $this->db->escape($value['description']) . ""', meta_title = '"" . $this->db->escape($value['meta_title']) . ""', meta_description = '"" . $this->db->escape($value['meta_description']) . ""', meta_keyword = '"" . $this->db->escape($value['meta_keyword']) . ""'""); } // MySQL Hierarchical Data Closure Table Pattern $query = $this->db->query(""SELECT * FROM `"" . DB_PREFIX . ""forum_category_path` WHERE path_id = '"" . (int)$forum_category_id . ""' ORDER BY level ASC""); if ($query->rows) { foreach ($query->rows as $category_path) { // Delete the path below the current one $this->db->query(""DELETE FROM `"" . DB_PREFIX . ""forum_category_path` WHERE forum_category_id = '"" . (int)$category_path['forum_category_id'] . ""' AND level < '"" . (int)$category_path['level'] . ""'""); $path = array(); // Get the nodes new parents $query = $this->db->query(""SELECT * FROM `"" . DB_PREFIX . ""forum_category_path` WHERE forum_category_id = '"" . (int)$data['parent_id'] . ""' ORDER BY level ASC""); foreach ($query->rows as $result) { $path[] = $result['path_id']; } // Get whats left of the nodes current path $query = $this->db->query(""SELECT * FROM `"" . DB_PREFIX . ""forum_category_path` WHERE forum_category_id = '"" . (int)$category_path['forum_category_id'] . ""' ORDER BY level ASC""); foreach ($query->rows as $result) { $path[] = $result['path_id']; } // Combine the paths with a new level $level = 0; foreach ($path as $path_id) { $this->db->query(""REPLACE INTO `"" . DB_PREFIX . ""forum_category_path` SET forum_category_id = '"" . (int)$category_path['forum_category_id'] . ""', `path_id` = '"" . (int)$path_id . ""', level = '"" . (int)$level . ""'""); $level++; } } } else { // Delete the path below the current one $this->db->query(""DELETE FROM `"" . DB_PREFIX . ""forum_category_path` WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); // Fix for records with no paths $level = 0; $query = $this->db->query(""SELECT * FROM `"" . DB_PREFIX . ""forum_category_path` WHERE forum_category_id = '"" . (int)$data['parent_id'] . ""' ORDER BY level ASC""); foreach ($query->rows as $result) { $this->db->query(""INSERT INTO `"" . DB_PREFIX . ""forum_category_path` SET forum_category_id = '"" . (int)$forum_category_id . ""', `path_id` = '"" . (int)$result['path_id'] . ""', level = '"" . (int)$level . ""'""); $level++; } $this->db->query(""REPLACE INTO `"" . DB_PREFIX . ""forum_category_path` SET forum_category_id = '"" . (int)$forum_category_id . ""', `path_id` = '"" . (int)$forum_category_id . ""', level = '"" . (int)$level . ""'""); } $this->cache->delete('category'); } public function deleteCategory($forum_category_id) { $this->db->query(""DELETE FROM "" . DB_PREFIX . ""forum_category_path WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); $query = $this->db->query(""SELECT * FROM "" . DB_PREFIX . ""forum_category_path WHERE path_id = '"" . (int)$forum_category_id . ""'""); foreach ($query->rows as $result) { $this->deleteCategory($result['forum_category_id']); } $this->db->query(""DELETE FROM "" . DB_PREFIX . ""forum_category WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); $this->db->query(""DELETE FROM "" . DB_PREFIX . ""forum_category_description WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); $this->cache->delete('category'); } public function repairCategories($parent_id = 0) { $query = $this->db->query(""SELECT * FROM "" . DB_PREFIX . ""forum_category WHERE parent_id = '"" . (int)$parent_id . ""'""); foreach ($query->rows as $category) { // Delete the path below the current one $this->db->query(""DELETE FROM `"" . DB_PREFIX . ""forum_category_path` WHERE forum_category_id = '"" . (int)$category['forum_category_id'] . ""'""); // Fix for records with no paths $level = 0; $query = $this->db->query(""SELECT * FROM `"" . DB_PREFIX . ""forum_category_path` WHERE forum_category_id = '"" . (int)$parent_id . ""' ORDER BY level ASC""); foreach ($query->rows as $result) { $this->db->query(""INSERT INTO `"" . DB_PREFIX . ""forum_category_path` SET forum_category_id = '"" . (int)$category['forum_category_id'] . ""', `path_id` = '"" . (int)$result['path_id'] . ""', level = '"" . (int)$level . ""'""); $level++; } $this->db->query(""REPLACE INTO `"" . DB_PREFIX . ""forum_category_path` SET forum_category_id = '"" . (int)$category['forum_category_id'] . ""', `path_id` = '"" . (int)$category['forum_category_id'] . ""', level = '"" . (int)$level . ""'""); $this->repairCategories($category['forum_category_id']); } } public function getCategory($forum_category_id) { $query = $this->db->query(""SELECT DISTINCT *, (SELECT GROUP_CONCAT(cd1.name ORDER BY level SEPARATOR '  >  ') FROM "" . DB_PREFIX . ""forum_category_path cp LEFT JOIN "" . DB_PREFIX . ""forum_category_description cd1 ON (cp.path_id = cd1.forum_category_id AND cp.forum_category_id != cp.path_id) WHERE cp.forum_category_id = c.forum_category_id AND cd1.language_id = '"" . (int)$this->config->get('config_language_id') . ""' GROUP BY cp.forum_category_id) AS path, FROM "" . DB_PREFIX . ""forum_category c LEFT JOIN "" . DB_PREFIX . ""forum_category_description cd2 ON (c.forum_category_id = cd2.forum_category_id) WHERE c.forum_category_id = '"" . (int)$forum_category_id . ""' AND cd2.language_id = '"" . (int)$this->config->get('config_language_id') . ""'""); return $query->row; } public function getCategories($data = array()) { $sql = ""SELECT cp.forum_category_id AS forum_category_id, GROUP_CONCAT(cd1.name ORDER BY cp.level SEPARATOR '  >  ') AS name, c1.parent_id, c1.sort_order FROM "" . DB_PREFIX . ""forum_category_path cp LEFT JOIN "" . DB_PREFIX . ""forum_category c1 ON (cp.forum_category_id = c1.forum_category_id) LEFT JOIN "" . DB_PREFIX . ""forum_category c2 ON (cp.path_id = c2.forum_category_id) LEFT JOIN "" . DB_PREFIX . ""forum_category_description cd1 ON (cp.path_id = cd1.forum_category_id) LEFT JOIN "" . DB_PREFIX . ""forum_category_description cd2 ON (cp.forum_category_id = cd2.forum_category_id) WHERE cd1.language_id = '"" . (int)$this->config->get('config_language_id') . ""' AND cd2.language_id = '"" . (int)$this->config->get('config_language_id') . ""'""; if (!empty($data['filter_name'])) { $sql .= "" AND cd2.name LIKE '%"" . $this->db->escape($data['filter_name']) . ""%'""; } $sql .= "" GROUP BY cp.forum_category_id""; $sort_data = array( 'name', 'sort_order' ); if (isset($data['sort']) && in_array($data['sort'], $sort_data)) { $sql .= "" ORDER BY "" . $data['sort']; } else { $sql .= "" ORDER BY sort_order""; } if (isset($data['order']) && ($data['order'] == 'DESC')) { $sql .= "" DESC""; } else { $sql .= "" ASC""; } if (isset($data['start']) || isset($data['limit'])) { if ($data['start'] < 0) { $data['start'] = 0; } if ($data['limit'] < 1) { $data['limit'] = 20; } $sql .= "" LIMIT "" . (int)$data['start'] . "","" . (int)$data['limit']; } $query = $this->db->query($sql); return $query->rows; } public function getCategoryDescriptions($forum_category_id) { $category_description_data = array(); $query = $this->db->query(""SELECT * FROM "" . DB_PREFIX . ""forum_category_description WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); foreach ($query->rows as $result) { $category_description_data[$result['language_id']] = array( 'name' => $result['name'], 'meta_title' => $result['meta_title'], 'meta_description' => $result['meta_description'], 'meta_keyword' => $result['meta_keyword'], 'description' => $result['description'] ); } return $category_description_data; } public function getCategoryPath($forum_category_id) { $query = $this->db->query(""SELECT forum_category_id, path_id, level FROM "" . DB_PREFIX . ""forum_category_path WHERE forum_category_id = '"" . (int)$forum_category_id . ""'""); return $query->rows; } public function getTotalCategories() { $query = $this->db->query(""SELECT COUNT(*) AS total FROM "" . DB_PREFIX . ""forum_category""); return $query->row['total']; } }",0 "_float_filter is not applied construction : use of sprintf via a %d with simple quote */ /*Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty fee, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following three paragraphs appear in all copies of this software. IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE SOFTWARE IS PROVIDED ON AN ""AS-IS"" BASIS AND AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.*/ $handle = @fopen(""/tmp/tainted.txt"", ""r""); if ($handle) { if(($tainted = fgets($handle, 4096)) == false) { $tainted = """"; } fclose($handle); } else { $tainted = """"; } if (filter_var($sanitized, FILTER_VALIDATE_FLOAT)) $tainted = $sanitized ; else $tainted = """" ; $query = sprintf(""$temp = '%d';"", $tainted); $res = eval($query); ?>",0 """text"" ng-model=""current.title"" />
        ",0 "al\Core\ParamConverter\ParamConverterManager; use Drupal\Tests\UnitTestCase; use Symfony\Cmf\Component\Routing\RouteObjectInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; /** * Tests the typed data resolver manager. * * @coversDefaultClass \Drupal\Core\ParamConverter\ParamConverterManager */ class ParamConverterManagerTest extends UnitTestCase { /** * @var \Symfony\Component\DependencyInjection\ContainerBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $container; /** * @var \Drupal\Core\ParamConverter\ParamConverterManager */ protected $manager; /** * {@inheritdoc} */ public static function getInfo() { return array( 'name' => 'Parameter converter manager', 'description' => 'Tests the parameter converter manager.', 'group' => 'Routing', ); } /** * {@inheritdoc} */ public function setUp() { parent::setUp(); $this->container = $this->getMock('Drupal\Core\DependencyInjection\Container'); $this->manager = new ParamConverterManager(); $this->manager->setContainer($this->container); } /** * Tests \Drupal\Core\ParamConverter\ParamConverterManager::addConverter(). * * @dataProvider providerTestAddConverter * * @covers ::addConverter() * @covers ::getConverterIds() */ public function testAddConverter($unsorted, $sorted) { foreach ($unsorted as $data) { $this->manager->addConverter($data['name'], $data['priority']); } // Test that ResolverManager::getTypedDataResolvers() returns the resolvers // in the expected order. foreach ($this->manager->getConverterIds() as $key => $converter) { $this->assertEquals($sorted[$key], $converter); } } /** * Tests \Drupal\Core\ParamConverter\ParamConverterManager::getConverter(). * * @dataProvider providerTestGetConverter * * @covers ::getConverter() */ public function testGetConverter($name, $priority, $class) { $converter = $this->getMockBuilder('Drupal\Core\ParamConverter\ParamConverterInterface') ->setMockClassName($class) ->getMock(); $this->manager->addConverter($name, $priority); $this->container->expects($this->once()) ->method('get') ->with($name) ->will($this->returnValue($converter)); $this->assertInstanceOf($class, $this->manager->getConverter($name)); // Assert that a second call to getConverter() does not use the container. $this->assertInstanceOf($class, $this->manager->getConverter($name)); } /** * Tests \Drupal\Core\ParamConverter\ParamConverterManager::getConverter(). * * @covers ::getConverter() * * @expectedException \InvalidArgumentException */ public function testGetConverterException() { $this->manager->getConverter('undefined.converter'); } /** * Provide data for parameter converter manager tests. * * @return array * An array of arrays, each containing the input parameters for * providerTestResolvers::testAddConverter(). * * @see ParamConverterManagerTest::testAddConverter(). */ public function providerTestAddConverter() { $converters[0]['unsorted'] = array( array('name' => 'raspberry', 'priority' => 10), array('name' => 'pear', 'priority' => 5), array('name' => 'strawberry', 'priority' => 20), array('name' => 'pineapple', 'priority' => 0), array('name' => 'banana', 'priority' => -10), array('name' => 'apple', 'priority' => -10), array('name' => 'peach', 'priority' => 5), ); $converters[0]['sorted'] = array( 'strawberry', 'raspberry', 'pear', 'peach', 'pineapple', 'banana', 'apple' ); $converters[1]['unsorted'] = array( array('name' => 'ape', 'priority' => 0), array('name' => 'cat', 'priority' => -5), array('name' => 'puppy', 'priority' => -10), array('name' => 'llama', 'priority' => -15), array('name' => 'giraffe', 'priority' => 10), array('name' => 'zebra', 'priority' => 10), array('name' => 'eagle', 'priority' => 5), ); $converters[1]['sorted'] = array( 'giraffe', 'zebra', 'eagle', 'ape', 'cat', 'puppy', 'llama' ); return $converters; } /** * Provide data for parameter converter manager tests. * * @return array * An array of arrays, each containing the input parameters for * providerTestResolvers::testGetConverter(). * * @see ParamConverterManagerTest::testGetConverter(). */ public function providerTestGetConverter() { return array( array('ape', 0, 'ApeConverterClass'), array('cat', -5, 'CatConverterClass'), array('puppy', -10, 'PuppyConverterClass'), array('llama', -15, 'LlamaConverterClass'), array('giraffe', 10, 'GiraffeConverterClass'), array('zebra', 10, 'ZebraConverterClass'), array('eagle', 5, 'EagleConverterClass'), ); } /** * @covers ::setRouteParameterConverters() * * @dataProvider providerTestSetRouteParameterConverters */ public function testSetRouteParameterConverters($path, $parameters = NULL, $expected = NULL) { $converter = $this->getMock('Drupal\Core\ParamConverter\ParamConverterInterface'); $converter->expects($this->any()) ->method('applies') ->with($this->anything(), 'id', $this->anything()) ->will($this->returnValue(TRUE)); $this->manager->addConverter('applied'); $this->container->expects($this->any()) ->method('get') ->with('applied') ->will($this->returnValue($converter)); $route = new Route($path); if ($parameters) { $route->setOption('parameters', $parameters); } $collection = new RouteCollection(); $collection->add('test_route', $route); $this->manager->setRouteParameterConverters($collection); foreach ($collection as $route) { $result = $route->getOption('parameters'); if ($expected) { $this->assertSame($expected, $result['id']['converter']); } else { $this->assertNull($result); } } } /** * Provides data for testSetRouteParameterConverters(). */ public function providerTestSetRouteParameterConverters() { return array( array('/test'), array('/test/{id}', array('id' => array()), 'applied'), array('/test/{id}', array('id' => array('converter' => 'predefined')), 'predefined'), ); } /** * @covers ::convert() */ public function testConvert() { $route = new Route('/test/{id}/{literal}/{null}'); $parameters = array( 'id' => array( 'converter' => 'test_convert', ), 'literal' => array(), 'null' => array(), ); $route->setOption('parameters', $parameters); $defaults = array( RouteObjectInterface::ROUTE_OBJECT => $route, RouteObjectInterface::ROUTE_NAME => 'test_route', 'id' => 1, 'literal' => 'this is a literal', 'null' => NULL, ); $expected = $defaults; $expected['id'] = 'something_better!'; $converter = $this->getMock('Drupal\Core\ParamConverter\ParamConverterInterface'); $converter->expects($this->any()) ->method('convert') ->with(1, $this->isType('array'), 'id', $this->isType('array'), $this->isInstanceOf('Symfony\Component\HttpFoundation\Request')) ->will($this->returnValue('something_better!')); $this->manager->addConverter('test_convert'); $this->container->expects($this->once()) ->method('get') ->with('test_convert') ->will($this->returnValue($converter)); $result = $this->manager->convert($defaults, new Request()); $this->assertEquals($expected, $result); } /** * @covers ::convert() */ public function testConvertNoConverting() { $route = new Route('/test'); $defaults = array( RouteObjectInterface::ROUTE_OBJECT => $route, RouteObjectInterface::ROUTE_NAME => 'test_route', ); $expected = $defaults; $result = $this->manager->convert($defaults, new Request()); $this->assertEquals($expected, $result); } /** * @covers ::convert() * * @expectedException \Drupal\Core\ParamConverter\ParamNotConvertedException * @expectedExceptionMessage The ""id"" parameter was not converted for the path ""/test/{id}"" (route name: ""test_route"") */ public function testConvertMissingParam() { $route = new Route('/test/{id}'); $parameters = array( 'id' => array( 'converter' => 'test_convert', ), ); $route->setOption('parameters', $parameters); $defaults = array( RouteObjectInterface::ROUTE_OBJECT => $route, RouteObjectInterface::ROUTE_NAME => 'test_route', 'id' => 1, ); $converter = $this->getMock('Drupal\Core\ParamConverter\ParamConverterInterface'); $converter->expects($this->any()) ->method('convert') ->with(1, $this->isType('array'), 'id', $this->isType('array'), $this->isInstanceOf('Symfony\Component\HttpFoundation\Request')) ->will($this->returnValue(NULL)); $this->manager->addConverter('test_convert'); $this->container->expects($this->once()) ->method('get') ->with('test_convert') ->will($this->returnValue($converter)); $this->manager->convert($defaults, new Request()); } } ",0 "pyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LoginCidadao\OpenIDBundle\Constraints; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use LoginCidadao\OpenIDBundle\Entity\ClientMetadata; class SectorIdentifierValidator extends ConstraintValidator { public function validate($value, Constraint $constraint) { if (!($value instanceof ClientMetadata)) { $this->context->buildViolation('Invalid class')->addViolation(); return; } $redirectUris = $this->parseUris($value->getRedirectUris()); if ($value->getSectorIdentifierUri() !== null) { $sectorIdentifier = parse_url($value->getSectorIdentifierUri()); } else { $sectorIdentifier = null; } $hosts = array(); foreach ($redirectUris as $uri) { @$hosts[$uri['host']] += 1; } if (!$sectorIdentifier && count($hosts) > 1) { $message = 'sector_identifier_uri is required when multiple hosts are used in redirect_uris. (#rfc.section.8.1)'; $this->context->buildViolation($message) ->atPath('sector_identifier_uri') ->setParameter('value', $message) ->addViolation(); } } /** * @param array $uris * @return string[][] */ private function parseUris(array $uris) { return array_map('parse_url', $uris); } } ",0 "rbox implementation * available variables: * $box_width $box_height contain the getlocations_search defaults set in the config */ ?> language; ?>"" lang=""language; ?>"" dir=""dir; ?>""> <?php print $head_title; ?> "">

        ",0 "n redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.exist.security.internal; import org.exist.security.AbstractRealm; import org.exist.security.AbstractAccount; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.exist.config.Configuration; import org.exist.config.ConfigurationException; import org.exist.config.Configurator; import org.exist.config.annotation.ConfigurationClass; import org.exist.config.annotation.ConfigurationFieldAsElement; import org.exist.security.Group; import org.exist.security.PermissionDeniedException; import org.exist.security.SchemaType; import org.exist.security.SecurityManager; import org.exist.security.Account; import org.exist.security.internal.aider.UserAider; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Optional; import java.util.Properties; import org.exist.security.Credential; import org.exist.storage.DBBroker; /** * Represents a user within the database. * * @author Wolfgang Meier * @author {Marco.Tampucci, Massimo.Martinelli} @isti.cnr.it * @author Adam retter */ @ConfigurationClass(""account"") public class AccountImpl extends AbstractAccount { private final static Logger LOG = LogManager.getLogger(AccountImpl.class); public static boolean CHECK_PASSWORDS = true; private final static SecurityProperties securityProperties = new SecurityProperties(); public static SecurityProperties getSecurityProperties() { return securityProperties; } /* static { Properties props = new Properties(); try { props.load(AccountImpl.class.getClassLoader().getResourceAsStream( ""org/exist/security/security.properties"")); } catch(IOException e) { } String option = props.getProperty(""passwords.encoding"", ""md5""); setPasswordEncoding(option); option = props.getProperty(""passwords.check"", ""yes""); CHECK_PASSWORDS = option.equalsIgnoreCase(""yes"") || option.equalsIgnoreCase(""true""); } static public void enablePasswordChecks(boolean check) { CHECK_PASSWORDS = check; } static public void setPasswordEncoding(String encoding) { if(encoding != null) { LOG.equals(""Setting password encoding to "" + encoding); if(encoding.equalsIgnoreCase(""plain"")) { PASSWORD_ENCODING = PLAIN_ENCODING; } else if(encoding.equalsIgnoreCase(""md5"")) { PASSWORD_ENCODING = MD5_ENCODING; } else { PASSWORD_ENCODING = SIMPLE_MD5_ENCODING; } } }*/ @ConfigurationFieldAsElement(""password"") private String password = null; @ConfigurationFieldAsElement(""digestPassword"") private String digestPassword = null; /** * Create a new user with name and password * * @param realm * @param id * @param name * @param password * @throws ConfigurationException */ public AccountImpl(final DBBroker broker, final AbstractRealm realm, final int id, final String name,final String password) throws ConfigurationException { super(broker, realm, id, name); setPassword(password); } public AccountImpl(final DBBroker broker, final AbstractRealm realm, final int id, final String name, final String password, final Group group, final boolean hasDbaRole) throws ConfigurationException { super(broker, realm, id, name); setPassword(password); this.groups.add(group); this.hasDbaRole = hasDbaRole; } public AccountImpl(final DBBroker broker, final AbstractRealm realm, final int id, final String name, final String password, final Group group) throws ConfigurationException { super(broker, realm, id, name); setPassword(password); this.groups.add(group); } /** * Create a new user with name * * @param realm * @param name * The account name * @throws ConfigurationException */ public AccountImpl(final DBBroker broker, final AbstractRealm realm, final String name) throws ConfigurationException { super(broker, realm, Account.UNDEFINED_ID, name); } // /** // * Create a new user with name, password and primary group // * // * @param name // * @param password // * @param primaryGroup // * @throws ConfigurationException // * @throws PermissionDeniedException // */ // public AccountImpl(AbstractRealm realm, int id, String name, String password, String primaryGroup) throws ConfigurationException { // this(realm, id, name, password); // addGroup(primaryGroup); // } public AccountImpl(final DBBroker broker, final AbstractRealm realm, final int id, final Account from_user) throws ConfigurationException, PermissionDeniedException { super(broker, realm, id, from_user.getName()); instantiate(from_user); } private void instantiate(final Account from_user) throws PermissionDeniedException { //copy metadata for(final SchemaType metadataKey : from_user.getMetadataKeys()) { final String metadataValue = from_user.getMetadataValue(metadataKey); setMetadataValue(metadataKey, metadataValue); } //copy umask setUserMask(from_user.getUserMask()); if(from_user instanceof AccountImpl) { final AccountImpl user = (AccountImpl) from_user; groups = new ArrayList<>(user.groups); password = user.password; digestPassword = user.digestPassword; hasDbaRole = user.hasDbaRole; _cred = user._cred; } else if(from_user instanceof UserAider) { final UserAider user = (UserAider) from_user; final String[] groups = user.getGroups(); for (final String group : groups) { addGroup(group); } setPassword(user.getPassword()); digestPassword = user.getDigestPassword(); } else { addGroup(from_user.getDefaultGroup()); //TODO: groups } } public AccountImpl(final DBBroker broker, final AbstractRealm realm, final AccountImpl from_user) throws ConfigurationException { super(broker, realm, from_user.id, from_user.name); //copy metadata for(final SchemaType metadataKey : from_user.getMetadataKeys()) { final String metadataValue = from_user.getMetadataValue(metadataKey); setMetadataValue(metadataKey, metadataValue); } groups = from_user.groups; password = from_user.password; digestPassword = from_user.digestPassword; hasDbaRole = from_user.hasDbaRole; _cred = from_user._cred; //this.realm = realm; //set via super() } public AccountImpl(final AbstractRealm realm, final Configuration configuration) throws ConfigurationException { super(realm, configuration); //this is required because the classes fields are initialized after the super constructor if(this.configuration != null) { this.configuration = Configurator.configure(this, this.configuration); } this.hasDbaRole = this.hasGroup(SecurityManager.DBA_GROUP); } public AccountImpl(final AbstractRealm realm, final Configuration configuration, final boolean removed) throws ConfigurationException { this(realm, configuration); this.removed = removed; } /** * Get the user's password * * @return Description of the Return Value * @deprecated */ @Override public final String getPassword() { return password; } @Override public final String getDigestPassword() { return digestPassword; } @Override public final void setPassword(final String passwd) { _cred = new Password(this, passwd); if(passwd == null) { this.password = null; this.digestPassword = null; } else { this.password = _cred.toString(); this.digestPassword = _cred.getDigest(); } } @Override public void setCredential(final Credential credential) { this._cred = credential; this.password = _cred.toString(); this.digestPassword = _cred.getDigest(); } public final static class SecurityProperties { private final static boolean DEFAULT_CHECK_PASSWORDS = true; private final static String PROP_CHECK_PASSWORDS = ""passwords.check""; private Properties loadedSecurityProperties = null; private Boolean checkPasswords = null; public synchronized boolean isCheckPasswords() { if(checkPasswords == null) { final String property = getProperty(PROP_CHECK_PASSWORDS); if(property == null || property.length() == 0) { checkPasswords = DEFAULT_CHECK_PASSWORDS; } else { checkPasswords = property.equalsIgnoreCase(""yes"") || property.equalsIgnoreCase(""true""); } } return checkPasswords; } public synchronized void enableCheckPasswords(final boolean enable) { this.checkPasswords = enable; } private synchronized String getProperty(final String propertyName) { if(loadedSecurityProperties == null) { loadedSecurityProperties = new Properties(); try(final InputStream is = AccountImpl.class.getResourceAsStream(""security.properties"")) { if(is != null) { loadedSecurityProperties.load(is); } } catch(final IOException ioe) { LOG.error(""Unable to load security.properties, using defaults. "" + ioe.getMessage(), ioe); } } return loadedSecurityProperties.getProperty(propertyName); } } //this method is used by Configurator public final Group insertGroup(final int index, final String name) throws PermissionDeniedException { //if we cant find the group in our own realm, try other realms final Group group = Optional.ofNullable(getRealm().getGroup(name)) .orElse(getRealm().getSecurityManager().getGroup(name)); return insertGroup(index, group); } private Group insertGroup(final int index, final Group group) throws PermissionDeniedException { if(group == null){ return null; } final Account user = getDatabase().getActiveBroker().getCurrentSubject(); group.assertCanModifyGroup(user); if(!groups.contains(group)) { groups.add(index, group); if(SecurityManager.DBA_GROUP.equals(group.getName())) { hasDbaRole = true; } } return group; } } ",0 "mir * @copyright Hüseyin Emre Özdemir * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License 3.0 * @link https://github.com/ozdemirr/mikro-odeme */ class PaymentTypeId { CONST TEK_CEKIM = 1; CONST AYLIK_ABONELIK = 2; CONST HAFTALIK_ABONELIK = 3; CONST IKI_AYLIK_ABONELIK = 4; CONST UC_AYLIK_ABONELIK = 5; CONST ALTI_AYLIK_ABONELIK = 6; CONST AYLIK_DENEMELI = 7; CONST HAFTALIK_DENEMELI = 8; CONST IKI_HAFTALIK_DENEMELI = 9; CONST UC_AYLIK_DENEMELI = 10; CONST ALTI_AYLIK_DENEMELI = 11; CONST OTUZ_GUNLUK = 13; } ",0 " 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 PagSeguro Internet Ltda. * @copyright 2007-2016 PagSeguro Internet Ltda. * @license http://www.apache.org/licenses/LICENSE-2.0 * */ namespace PagSeguro\Parsers\PreApproval\Charge; use PagSeguro\Domains\Requests\Requests; use PagSeguro\Enum\Properties\Current; use PagSeguro\Parsers\Basic; use PagSeguro\Parsers\Item; use PagSeguro\Parsers\Error; use PagSeguro\Parsers\Parser; use PagSeguro\Parsers\PreApproval\Response; use PagSeguro\Resources\Http; /** * Request class */ class Request extends Error implements Parser { use Basic; use Item; /** * @param Requests $request * @param $request * @return array */ public static function getData(Requests $request) { $data = []; $properties = new Current; if (!is_null($request->getCode())) { $data[$properties::PRE_APPROVAL_CODE] = $request->getCode(); } return array_merge( $data, Basic::getData($request, $properties), Item::getData($request, $properties) ); } /** * @param \PagSeguro\Resources\Http $http * @return Response */ public static function success(Http $http) { $xml = simplexml_load_string($http->getResponse()); return (new Response)->setCode(current($xml->transactionCode)) ->setDate(current($xml->date)); } /** * @param \PagSeguro\Resources\Http $http * @return \PagSeguro\Domains\Error */ public static function error(Http $http) { $error = parent::error($http); return $error; } } ",0 "general logic, although this version * has been entirely rewritten * @todo Serialized cache for languages */ class HTMLPurifier_LanguageFactory { /** * Cache of language code information used to load HTMLPurifier_Language objects. * Structure is: $factory->cache[$language_code][$key] = $value * @type array */ public $cache; /** * Valid keys in the HTMLPurifier_Language object. Designates which * variables to slurp out of a message file. * @type array */ public $keys = array('fallback', 'messages', 'errorNames'); /** * Instance to validate language codes. * @type HTMLPurifier_AttrDef_Lang * */ protected $validator; /** * Cached copy of dirname(__FILE__), directory of current file without * trailing slash. * @type string */ protected $dir; /** * Keys whose contents are a hash map and can be merged. * @type array */ protected $mergeable_keys_map = array('messages' => true, 'errorNames' => true); /** * Keys whose contents are a list and can be merged. * @value array lookup */ protected $mergeable_keys_list = array(); /** * Retrieve sole instance of the factory. * @param HTMLPurifier_LanguageFactory $prototype Optional prototype to overload sole instance with, * or bool true to reset to default factory. * @return HTMLPurifier_LanguageFactory */ public static function instance($prototype = null) { static $instance = null; if ($prototype !== null) { $instance = $prototype; } elseif ($instance === null || $prototype == true) { $instance = new HTMLPurifier_LanguageFactory(); $instance->setup(); } return $instance; } /** * Sets up the singleton, much like a constructor * @note Prevents people from getting this outside of the singleton */ public function setup() { $this->validator = new HTMLPurifier_AttrDef_Lang(); $this->dir = HTMLPURIFIER_PREFIX . '/HTMLPurifier'; } /** * Creates a language object, handles class fallbacks * @param HTMLPurifier_Config $config * @param HTMLPurifier_Context $context * @param bool|string $code Code to override configuration with. Private parameter. * @return HTMLPurifier_Language */ public function create($config, $context, $code = false) { // validate language code if ($code === false) { $code = $this->validator->validate( $config->get('Core.Language'), $config, $context ); } else { $code = $this->validator->validate($code, $config, $context); } if ($code === false) { $code = 'en'; // malformed code becomes English } $pcode = str_replace('-', '_', $code); // make valid PHP classname static $depth = 0; // recursion protection if ($code == 'en') { $lang = new HTMLPurifier_Language($config, $context); } else { $class = 'HTMLPurifier_Language_' . $pcode; $file = $this->dir . '/Language/classes/' . $code . '.php'; if (file_exists($file) || class_exists($class, false)) { $lang = new $class($config, $context); } else { // Go fallback $raw_fallback = $this->getFallbackFor($code); $fallback = $raw_fallback ? $raw_fallback : 'en'; $depth++; $lang = $this->create($config, $context, $fallback); if (!$raw_fallback) { $lang->error = true; } $depth--; } } $lang->code = $code; return $lang; } /** * Returns the fallback language for language * @note Loads the original language into cache * @param string $code language code * @return string|bool */ public function getFallbackFor($code) { $this->loadLanguage($code); return $this->cache[$code]['fallback']; } /** * Loads language into the cache, handles message file and fallbacks * @param string $code language code */ public function loadLanguage($code) { static $languages_seen = array(); // recursion guard // abort if we've already loaded it if (isset($this->cache[$code])) { return; } // generate filename $filename = $this->dir . '/Language/messages/' . $code . '.php'; // default fallback : may be overwritten by the ensuing include $fallback = ($code != 'en') ? 'en' : false; // load primary localisation if (!file_exists($filename)) { // skip the include: will rely solely on fallback $filename = $this->dir . '/Language/messages/en.php'; $cache = array(); } else { include $filename; $cache = compact($this->keys); } // load fallback localisation if (!empty($fallback)) { // infinite recursion guard if (isset($languages_seen[$code])) { trigger_error( 'Circular fallback reference in language ' . $code, E_USER_ERROR ); $fallback = 'en'; } $language_seen[$code] = true; // load the fallback recursively $this->loadLanguage($fallback); $fallback_cache = $this->cache[$fallback]; // merge fallback with current language foreach ($this->keys as $key) { if (isset($cache[$key]) && isset($fallback_cache[$key])) { if (isset($this->mergeable_keys_map[$key])) { $cache[$key] = $cache[$key] + $fallback_cache[$key]; } elseif (isset($this->mergeable_keys_list[$key])) { $cache[$key] = array_merge($fallback_cache[$key], $cache[$key]); } } else { $cache[$key] = $fallback_cache[$key]; } } } // save to cache for later retrieval $this->cache[$code] = $cache; return; } } // vim: et sw=4 sts=4 ",0 " 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. */ package br.com.objectos.way.orm.compiler; import java.util.Objects; import javax.lang.model.element.Modifier; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.MethodSpec; /** * @author marcio.endo@objectos.com.br (Marcio Endo) */ class CompanionTypeFactory implements CompanionTypeExe { private final OrmInject inject; private CompanionTypeFactory(OrmInject inject) { this.inject = inject; } public static CompanionTypeFactory of(OrmPojoInfo pojoInfo) { OrmInject inject = pojoInfo.inject(); return new CompanionTypeFactory(inject); } @Override public CompanionType acceptCompanionType(CompanionType type) { ClassName companionTypeClassName = type.className(); return type.addMethod(MethodSpec.methodBuilder(""get"") .addModifiers(Modifier.PUBLIC, Modifier.STATIC) .addParameter(inject.parameterSpec()) .returns(companionTypeClassName) .addStatement(""$T.requireNonNull($L)"", Objects.class, inject.name()) .addStatement(""return new $T($L)"", companionTypeClassName, inject.name()) .build()); } }",0 "enerated by javadoc (1.8.0_151) on Wed Dec 04 18:43:01 MST 2019 --> ConfigurationChangesServiceSupplier (BOM: * : All 2.5.1.Final-SNAPSHOT API)
        Thorntail API, 2.5.1.Final-SNAPSHOT
        • Summary: 
        • Nested | 
        • Field | 
        • Constr | 
        • Method
        • Detail: 
        • Field | 
        • Constr | 
        • Method
        org.wildfly.swarm.config.management

        Interface ConfigurationChangesServiceSupplier<T extends ConfigurationChangesService>

        • Functional Interface:
          This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.


          @FunctionalInterface
          public interface ConfigurationChangesServiceSupplier<T extends ConfigurationChangesService>
        Thorntail API, 2.5.1.Final-SNAPSHOT
        • Summary: 
        • Nested | 
        • Field | 
        • Constr | 
        • Method
        • Detail: 
        • Field | 
        • Constr | 
        • Method

        Copyright © 2019 JBoss by Red Hat. All rights reserved.

        ",0 " * This code was generated automatically by the CG library, manual changes to it * will be lost upon next generation. */ class EntityManager extends \Doctrine\ORM\EntityManager { private $delegate; private $container; /** * Executes a function in a transaction. * * The function gets passed this EntityManager instance as an (optional) parameter. * * {@link flush} is invoked prior to transaction commit. * * If an exception occurs during execution of the function or flushing or transaction commit, * the transaction is rolled back, the EntityManager closed and the exception re-thrown. * * @param callable $func The function to execute transactionally. * @return mixed Returns the non-empty value returned from the closure or true instead */ public function transactional($func) { return $this->delegate->transactional($func); } /** * Performs a rollback on the underlying database connection. */ public function rollback() { return $this->delegate->rollback(); } /** * Removes an entity instance. * * A removed entity will be removed from the database at or before transaction commit * or as a result of the flush operation. * * @param object $entity The entity instance to remove. */ public function remove($entity) { return $this->delegate->remove($entity); } /** * Refreshes the persistent state of an entity from the database, * overriding any local changes that have not yet been persisted. * * @param object $entity The entity to refresh. */ public function refresh($entity) { return $this->delegate->refresh($entity); } /** * Tells the EntityManager to make an instance managed and persistent. * * The entity will be entered into the database at or before transaction * commit or as a result of the flush operation. * * NOTE: The persist operation always considers entities that are not yet known to * this EntityManager as NEW. Do not pass detached entities to the persist operation. * * @param object $object The instance to make managed and persistent. */ public function persist($entity) { return $this->delegate->persist($entity); } /** * Create a new instance for the given hydration mode. * * @param int $hydrationMode * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator */ public function newHydrator($hydrationMode) { return $this->delegate->newHydrator($hydrationMode); } /** * Merges the state of a detached entity into the persistence context * of this EntityManager and returns the managed copy of the entity. * The entity passed to merge will not become associated/managed with this EntityManager. * * @param object $entity The detached entity to merge into the persistence context. * @return object The managed copy of the entity. */ public function merge($entity) { return $this->delegate->merge($entity); } /** * Acquire a lock on the given entity. * * @param object $entity * @param int $lockMode * @param int $lockVersion * @throws OptimisticLockException * @throws PessimisticLockException */ public function lock($entity, $lockMode, $lockVersion = NULL) { return $this->delegate->lock($entity, $lockMode, $lockVersion); } /** * Check if the Entity manager is open or closed. * * @return bool */ public function isOpen() { return $this->delegate->isOpen(); } /** * Checks whether the state of the filter collection is clean. * * @return boolean True, if the filter collection is clean. */ public function isFiltersStateClean() { return $this->delegate->isFiltersStateClean(); } /** * Helper method to initialize a lazy loading proxy or persistent collection. * * This method is a no-op for other objects * * @param object $obj */ public function initializeObject($obj) { return $this->delegate->initializeObject($obj); } /** * Checks whether the Entity Manager has filters. * * @return True, if the EM has a filter collection. */ public function hasFilters() { return $this->delegate->hasFilters(); } /** * Gets the UnitOfWork used by the EntityManager to coordinate operations. * * @return \Doctrine\ORM\UnitOfWork */ public function getUnitOfWork() { return $this->delegate->getUnitOfWork(); } /** * Gets the repository for an entity class. * * @param string $entityName The name of the entity. * @return EntityRepository The repository class. */ public function getRepository($className) { $repository = $this->delegate->getRepository($className); if ($repository instanceof \Symfony\Component\DependencyInjection\ContainerAwareInterface) { $repository->setContainer($this->container); return $repository; } if (null !== $metadata = $this->container->get(""jms_di_extra.metadata.metadata_factory"")->getMetadataForClass(get_class($repository))) { foreach ($metadata->classMetadata as $classMetadata) { foreach ($classMetadata->methodCalls as $call) { list($method, $arguments) = $call; call_user_func_array(array($repository, $method), $this->prepareArguments($arguments)); } } } return $repository; } /** * Gets a reference to the entity identified by the given type and identifier * without actually loading it, if the entity is not yet loaded. * * @param string $entityName The name of the entity type. * @param mixed $id The entity identifier. * @return object The entity reference. */ public function getReference($entityName, $id) { return $this->delegate->getReference($entityName, $id); } /** * Gets the proxy factory used by the EntityManager to create entity proxies. * * @return ProxyFactory */ public function getProxyFactory() { return $this->delegate->getProxyFactory(); } /** * Gets a partial reference to the entity identified by the given type and identifier * without actually loading it, if the entity is not yet loaded. * * The returned reference may be a partial object if the entity is not yet loaded/managed. * If it is a partial object it will not initialize the rest of the entity state on access. * Thus you can only ever safely access the identifier of an entity obtained through * this method. * * The use-cases for partial references involve maintaining bidirectional associations * without loading one side of the association or to update an entity without loading it. * Note, however, that in the latter case the original (persistent) entity data will * never be visible to the application (especially not event listeners) as it will * never be loaded in the first place. * * @param string $entityName The name of the entity type. * @param mixed $identifier The entity identifier. * @return object The (partial) entity reference. */ public function getPartialReference($entityName, $identifier) { return $this->delegate->getPartialReference($entityName, $identifier); } /** * Gets the metadata factory used to gather the metadata of classes. * * @return \Doctrine\ORM\Mapping\ClassMetadataFactory */ public function getMetadataFactory() { return $this->delegate->getMetadataFactory(); } /** * Gets a hydrator for the given hydration mode. * * This method caches the hydrator instances which is used for all queries that don't * selectively iterate over the result. * * @param int $hydrationMode * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator */ public function getHydrator($hydrationMode) { return $this->delegate->getHydrator($hydrationMode); } /** * Gets the enabled filters. * * @return FilterCollection The active filter collection. */ public function getFilters() { return $this->delegate->getFilters(); } /** * Gets an ExpressionBuilder used for object-oriented construction of query expressions. * * Example: * * * $qb = $em->createQueryBuilder(); * $expr = $em->getExpressionBuilder(); * $qb->select('u')->from('User', 'u') * ->where($expr->orX($expr->eq('u.id', 1), $expr->eq('u.id', 2))); * * * @return \Doctrine\ORM\Query\Expr */ public function getExpressionBuilder() { return $this->delegate->getExpressionBuilder(); } /** * Gets the EventManager used by the EntityManager. * * @return \Doctrine\Common\EventManager */ public function getEventManager() { return $this->delegate->getEventManager(); } /** * Gets the database connection object used by the EntityManager. * * @return \Doctrine\DBAL\Connection */ public function getConnection() { return $this->delegate->getConnection(); } /** * Gets the Configuration used by the EntityManager. * * @return \Doctrine\ORM\Configuration */ public function getConfiguration() { return $this->delegate->getConfiguration(); } /** * Returns the ORM metadata descriptor for a class. * * The class name must be the fully-qualified class name without a leading backslash * (as it is returned by get_class($obj)) or an aliased class name. * * Examples: * MyProject\Domain\User * sales:PriceRequest * * @return \Doctrine\ORM\Mapping\ClassMetadata * @internal Performance-sensitive method. */ public function getClassMetadata($className) { return $this->delegate->getClassMetadata($className); } /** * Flushes all changes to objects that have been queued up to now to the database. * This effectively synchronizes the in-memory state of managed objects with the * database. * * If an entity is explicitly passed to this method only this entity and * the cascade-persist semantics + scheduled inserts/removals are synchronized. * * @param object $entity * @throws \Doctrine\ORM\OptimisticLockException If a version check on an entity that * makes use of optimistic locking fails. */ public function flush($entity = NULL) { return $this->delegate->flush($entity); } /** * Finds an Entity by its identifier. * * @param string $entityName * @param mixed $id * @param integer $lockMode * @param integer $lockVersion * * @return object */ public function find($entityName, $id, $lockMode = 0, $lockVersion = NULL) { return $this->delegate->find($entityName, $id, $lockMode, $lockVersion); } /** * Detaches an entity from the EntityManager, causing a managed entity to * become detached. Unflushed changes made to the entity if any * (including removal of the entity), will not be synchronized to the database. * Entities which previously referenced the detached entity will continue to * reference it. * * @param object $entity The entity to detach. */ public function detach($entity) { return $this->delegate->detach($entity); } /** * Create a QueryBuilder instance * * @return QueryBuilder $qb */ public function createQueryBuilder() { return $this->delegate->createQueryBuilder(); } /** * Creates a new Query object. * * @param string $dql The DQL string. * @return \Doctrine\ORM\Query */ public function createQuery($dql = '') { return $this->delegate->createQuery($dql); } /** * Creates a native SQL query. * * @param string $sql * @param ResultSetMapping $rsm The ResultSetMapping to use. * @return NativeQuery */ public function createNativeQuery($sql, \Doctrine\ORM\Query\ResultSetMapping $rsm) { return $this->delegate->createNativeQuery($sql, $rsm); } /** * Creates a Query from a named query. * * @param string $name * @return \Doctrine\ORM\Query */ public function createNamedQuery($name) { return $this->delegate->createNamedQuery($name); } /** * Creates a NativeQuery from a named native query. * * @param string $name * @return \Doctrine\ORM\NativeQuery */ public function createNamedNativeQuery($name) { return $this->delegate->createNamedNativeQuery($name); } /** * Creates a copy of the given entity. Can create a shallow or a deep copy. * * @param object $entity The entity to copy. * @return object The new entity. * @todo Implementation need. This is necessary since $e2 = clone $e1; throws an E_FATAL when access anything on $e: * Fatal error: Maximum function nesting level of '100' reached, aborting! */ public function copy($entity, $deep = false) { return $this->delegate->copy($entity, $deep); } /** * Determines whether an entity instance is managed in this EntityManager. * * @param object $entity * @return boolean TRUE if this EntityManager currently manages the given entity, FALSE otherwise. */ public function contains($entity) { return $this->delegate->contains($entity); } /** * Commits a transaction on the underlying database connection. */ public function commit() { return $this->delegate->commit(); } /** * Closes the EntityManager. All entities that are currently managed * by this EntityManager become detached. The EntityManager may no longer * be used after it is closed. */ public function close() { return $this->delegate->close(); } /** * Clears the EntityManager. All entities that are currently managed * by this EntityManager become detached. * * @param string $entityName if given, only entities of this type will get detached */ public function clear($entityName = NULL) { return $this->delegate->clear($entityName); } /** * Starts a transaction on the underlying database connection. */ public function beginTransaction() { return $this->delegate->beginTransaction(); } public function __construct($objectManager, \Symfony\Component\DependencyInjection\ContainerInterface $container) { $this->delegate = $objectManager; $this->container = $container; } private function prepareArguments(array $arguments) { $processed = array(); foreach ($arguments as $arg) { if ($arg instanceof \Symfony\Component\DependencyInjection\Reference) { $processed[] = $this->container->get((string) $arg, $arg->getInvalidBehavior()); } else if ($arg instanceof \Symfony\Component\DependencyInjection\Parameter) { $processed[] = $this->container->getParameter((string) $arg); } else { $processed[] = $arg; } } return $processed; } }",0 "================== // Constants //================================================================================================== static const float k_fScalePSMoveAPIToMeters = 0.01f; // psmove driver in cm static const float k_fRadiansToDegrees = 180.f / 3.14159265f; static const int k_touchpadTouchMapping = (vr::EVRButtonId)31; static const float k_defaultThumbstickDeadZoneRadius = 0.1f; static const float DEFAULT_HAPTIC_DURATION = 0.f; static const float DEFAULT_HAPTIC_AMPLITUDE = 1.f; static const float DEFAULT_HAPTIC_FREQUENCY = 200.f; /* PSMoveService button IDs*/ enum ePSMButtonID { /* Special-Case System Button (bound to PS button by default) */ k_PSMButtonID_System, /* Common Buttons */ k_PSMButtonID_PS, k_PSMButtonID_Triangle, k_PSMButtonID_Circle, k_PSMButtonID_Cross, k_PSMButtonID_Square, k_PSMButtonID_DPad_Up, k_PSMButtonID_DPad_Down, k_PSMButtonID_DPad_Left, k_PSMButtonID_DPad_Right, /* PSMove Specific Buttons */ k_PSMButtonID_Move, k_PSMButtonID_Select, k_PSMButtonID_Start, /* PSNavi Specific Buttons */ k_PSMButtonID_Shoulder, k_PSMButtonID_Joystick, /* Dualshock4 Specific Buttons */ k_PSMButtonID_Options, k_PSMButtonID_Share, k_PSMButtonID_Touchpad, k_PSMButtonID_LeftJoystick, k_PSMButtonID_RightJoystick, k_PSMButtonID_LeftShoulder, k_PSMButtonID_RightShoulder, /* Emulated Trackpad Buttons */ k_PSMButtonID_EmulatedTrackpadTouched, k_PSMButtonID_EmulatedTrackpadPressed, /* Virtual Controller Specific Buttons */ k_PSMButtonID_Virtual_0, k_PSMButtonID_Virtual_1, k_PSMButtonID_Virtual_2, k_PSMButtonID_Virtual_3, k_PSMButtonID_Virtual_4, k_PSMButtonID_Virtual_5, k_PSMButtonID_Virtual_6, k_PSMButtonID_Virtual_7, k_PSMButtonID_Virtual_8, k_PSMButtonID_Virtual_9, k_PSMButtonID_Virtual_10, k_PSMButtonID_Virtual_11, k_PSMButtonID_Virtual_12, k_PSMButtonID_Virtual_13, k_PSMButtonID_Virtual_14, k_PSMButtonID_Virtual_15, k_PSMButtonID_Virtual_16, k_PSMButtonID_Virtual_17, k_PSMButtonID_Virtual_18, k_PSMButtonID_Virtual_19, k_PSMButtonID_Virtual_20, k_PSMButtonID_Virtual_21, k_PSMButtonID_Virtual_22, k_PSMButtonID_Virtual_23, k_PSMButtonID_Virtual_24, k_PSMButtonID_Virtual_25, k_PSMButtonID_Virtual_26, k_PSMButtonID_Virtual_27, k_PSMButtonID_Virtual_28, k_PSMButtonID_Virtual_29, k_PSMButtonID_Virtual_30, k_PSMButtonID_Virtual_31, k_PSMButtonID_Count }; static const char *k_PSMButtonNames[k_PSMButtonID_Count] = { /* System Button */ ""system"", /* Common Buttons */ ""ps"", ""triangle"", ""circle"", ""cross"", ""square"", ""dpad_up"", ""dpad_down"", ""dpad_right"", ""dpad_left"", /* PSMove Specific Buttons */ ""move"", ""select"", ""start"", /* PSNavi Specific Buttons */ ""shoulder"", ""joystick"", /* Dualshock4 Specific Buttons */ ""options"", ""share"", ""touchpad"", ""joystick_left"", ""joystick_right"", ""shoulder_left"", ""shoulder_right"", /* Emulated Trackpad Buttons */ ""emulated_trackpad_touched"", ""emulated_trackpad_pressed"", /* Virtual Controller Specific Buttons */ ""virtual_button_0"", ""virtual_button_1"", ""virtual_button_2"", ""virtual_button_3"", ""virtual_button_4"", ""virtual_button_5"", ""virtual_button_6"", ""virtual_button_7"", ""virtual_button_8"", ""virtual_button_9"", ""virtual_button_10"", ""virtual_button_11"", ""virtual_button_12"", ""virtual_button_13"", ""virtual_button_14"", ""virtual_button_15"", ""virtual_button_16"", ""virtual_button_17"", ""virtual_button_18"", ""virtual_button_19"", ""virtual_button_20"", ""virtual_button_21"", ""virtual_button_22"", ""virtual_button_23"", ""virtual_button_24"", ""virtual_button_25"", ""virtual_button_26"", ""virtual_button_27"", ""virtual_button_28"", ""virtual_button_29"", ""virtual_button_30"", ""virtual_button_31"" }; static const char *k_PSMButtonPaths[k_PSMButtonID_Count] = { /* System Button */ ""/input/system/click"", /* Common Buttons */ ""/input/ps/click"", ""/input/triangle/click"", ""/input/circle/click"", ""/input/cross/click"", ""/input/square/click"", ""/input/dpad_up/click"", ""/input/dpad_down/click"", ""/input/dpad_right/click"", ""/input/dpad_left/click"", /* PSMove Specific Buttons */ ""/input/move/click"", ""/input/select/click"", ""/input/start/click"", /* PSNavi Specific Buttons */ ""/input/shoulder/click"", ""/input/joystick/click"", /* Dualshock4 Specific Buttons */ ""/input/options/click"", ""/input/share/click"", ""/input/touchpad/click"", ""/input/joystick_left/click"", ""/input/joystick_right/click"", ""/input/shoulder_left/click"", ""/input/shoulder_right/click"", /* Emulated Trackpad Buttons */ ""/input/trackpad/touch"", ""/input/trackpad/click"", /* Virtual Controller Specific Buttons */ ""/input/virtual_button_0/click"", ""/input/virtual_button_1/click"", ""/input/virtual_button_2/click"", ""/input/virtual_button_3/click"", ""/input/virtual_button_4/click"", ""/input/virtual_button_5/click"", ""/input/virtual_button_6/click"", ""/input/virtual_button_7/click"", ""/input/virtual_button_8/click"", ""/input/virtual_button_9/click"", ""/input/virtual_button_10/click"", ""/input/virtual_button_11/click"", ""/input/virtual_button_12/click"", ""/input/virtual_button_13/click"", ""/input/virtual_button_14/click"", ""/input/virtual_button_15/click"", ""/input/virtual_button_16/click"", ""/input/virtual_button_17/click"", ""/input/virtual_button_18/click"", ""/input/virtual_button_19/click"", ""/input/virtual_button_20/click"", ""/input/virtual_button_21/click"", ""/input/virtual_button_22/click"", ""/input/virtual_button_23/click"", ""/input/virtual_button_24/click"", ""/input/virtual_button_25/click"", ""/input/virtual_button_26/click"", ""/input/virtual_button_27/click"", ""/input/virtual_button_28/click"", ""/input/virtual_button_29/click"", ""/input/virtual_button_30/click"", ""/input/virtual_button_31/click"" }; enum ePSMAxisID { /* Common Axes */ k_PSMAxisID_Trigger, /* PSNavi Specific Axes */ k_PSMAxisID_Joystick_X, k_PSMAxisID_Joystick_Y, /* Dualshock4 Specific Axes */ k_PSMAxisID_LeftTrigger, k_PSMAxisID_RightTrigger, k_PSMAxisID_LeftJoystick_X, k_PSMAxisID_LeftJoystick_Y, k_PSMAxisID_RightJoystick_X, k_PSMAxisID_RightJoystick_Y, /* Emulated Trackpad Specific Axes */ k_PSMAxisID_EmulatedTrackpad_X, k_PSMAxisID_EmulatedTrackpad_Y, /* Virtual Controller Specific Axes */ k_PSMAxisID_Virtual_0, k_PSMAxisID_Virtual_1, k_PSMAxisID_Virtual_2, k_PSMAxisID_Virtual_3, k_PSMAxisID_Virtual_4, k_PSMAxisID_Virtual_5, k_PSMAxisID_Virtual_6, k_PSMAxisID_Virtual_7, k_PSMAxisID_Virtual_8, k_PSMAxisID_Virtual_9, k_PSMAxisID_Virtual_10, k_PSMAxisID_Virtual_11, k_PSMAxisID_Virtual_12, k_PSMAxisID_Virtual_13, k_PSMAxisID_Virtual_14, k_PSMAxisID_Virtual_15, k_PSMAxisID_Virtual_16, k_PSMAxisID_Virtual_17, k_PSMAxisID_Virtual_18, k_PSMAxisID_Virtual_19, k_PSMAxisID_Virtual_20, k_PSMAxisID_Virtual_21, k_PSMAxisID_Virtual_22, k_PSMAxisID_Virtual_23, k_PSMAxisID_Virtual_24, k_PSMAxisID_Virtual_25, k_PSMAxisID_Virtual_26, k_PSMAxisID_Virtual_27, k_PSMAxisID_Virtual_28, k_PSMAxisID_Virtual_29, k_PSMAxisID_Virtual_30, k_PSMAxisID_Virtual_31, k_PSMAxisID_Count }; static bool k_PSMAxisTwoSided[k_PSMAxisID_Count] = { /* Common Axes */ false, // trigger /* PSNavi Specific Axes */ true, // joystick x true, // joystick y /* Dualshock4 Specific Axes */ false, // trigger left false, // trigger right true, // joystick left x true, // joystick left y true, // joystick right x true, // joystick right x /* Emulated Trackpad Specific Axes */ true, // emulated trackpad x true, // emulated trackpad y /* Virtual Controller Specific Axes */ false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false, // virtual axis false // virtual axis }; static const char *k_PSMAxisPaths[k_PSMAxisID_Count] = { /* Common Axes */ ""/input/trigger/value"", /* PSNavi Specific Axes */ ""/input/joystick/x"", ""/input/joystick/y"", /* Dualshock4 Specific Axes */ ""/input/trigger_left/value"", ""/input/trigger_right/value"", ""/input/joystick_left/x"", ""/input/joystick_left/y"", ""/input/joystick_right/x"", ""/input/joystick_right/y"", /* Emulated Trackpad Specific Axes */ ""/input/trackpad/x"", ""/input/trackpad/y"", /* Virtual Controller Specific Axes */ ""/input/virtual_axis_0/value"", ""/input/virtual_axis_1/value"", ""/input/virtual_axis_2/value"", ""/input/virtual_axis_3/value"", ""/input/virtual_axis_4/value"", ""/input/virtual_axis_5/value"", ""/input/virtual_axis_6/value"", ""/input/virtual_axis_7/value"", ""/input/virtual_axis_8/value"", ""/input/virtual_axis_9/value"", ""/input/virtual_axis_10/value"", ""/input/virtual_axis_11/value"", ""/input/virtual_axis_12/value"", ""/input/virtual_axis_13/value"", ""/input/virtual_axis_14/value"", ""/input/virtual_axis_15/value"", ""/input/virtual_axis_16/value"", ""/input/virtual_axis_17/value"", ""/input/virtual_axis_18/value"", ""/input/virtual_axis_19/value"", ""/input/virtual_axis_20/value"", ""/input/virtual_axis_21/value"", ""/input/virtual_axis_22/value"", ""/input/virtual_axis_23/value"", ""/input/virtual_axis_24/value"", ""/input/virtual_axis_25/value"", ""/input/virtual_axis_26/value"", ""/input/virtual_axis_27/value"", ""/input/virtual_axis_28/value"", ""/input/virtual_axis_29/value"", ""/input/virtual_axis_30/value"", ""/input/virtual_axis_31/value"" }; enum ePSMHapicID { /* Common Rumble */ k_PSMHapticID_Rumble, /* Dualshock4 Specific Rumble */ k_PSMHapticID_LeftRumble, k_PSMHapticID_RightRumble, k_PSMHapticID_Count }; static const char *k_PSMHapticPaths[k_PSMHapticID_Count] = { /* Common Rumble */ ""/output/haptic"", /* Dualshock4 Specific Rumble */ ""/output/left_rumble"", ""/output/right_rumble"", }; enum eEmulatedTrackpadAction { k_EmulatedTrackpadAction_None, k_EmulatedTrackpadAction_Touch, k_EmulatedTrackpadAction_Press, k_EmulatedTrackpadAction_Left, k_EmulatedTrackpadAction_Up, k_EmulatedTrackpadAction_Right, k_EmulatedTrackpadAction_Down, k_EmulatedTrackpadAction_UpLeft, k_EmulatedTrackpadAction_UpRight, k_EmulatedTrackpadAction_DownLeft, k_EmulatedTrackpadAction_DownRight, k_EmulatedTrackpadAction_Count }; static const int k_max_vr_touchpad_actions = k_EmulatedTrackpadAction_Count; static const char *k_VRTouchpadActionNames[k_max_vr_touchpad_actions] = { ""none"", ""touchpad_touch"", ""touchpad_press"", ""touchpad_left"", ""touchpad_up"", ""touchpad_right"", ""touchpad_down"", ""touchpad_up-left"", ""touchpad_up-right"", ""touchpad_down-left"", ""touchpad_down-right"", }; }",0 " 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. */ package io.undertow.predicate; import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; import io.undertow.server.HttpServerExchange; import io.undertow.util.HttpString; import io.undertow.util.Methods; /** * A predicate that returns true if the request is idempotent * according to the HTTP RFC. * * @author Stuart Douglas */ public class IdempotentPredicate implements Predicate { public static final IdempotentPredicate INSTANCE = new IdempotentPredicate(); private static final Set METHODS; static { Set methods = new HashSet<>(); methods.add(Methods.GET); methods.add(Methods.DELETE); methods.add(Methods.PUT); methods.add(Methods.HEAD); methods.add(Methods.OPTIONS); METHODS = Collections.unmodifiableSet(methods); } @Override public boolean resolve(HttpServerExchange value) { return METHODS.contains(value.getRequestMethod()); } public static class Builder implements PredicateBuilder { @Override public String name() { return ""idempotent""; } @Override public Map> parameters() { return Collections.emptyMap(); } @Override public Set requiredParameters() { return Collections.emptySet(); } @Override public String defaultParameter() { return null; } @Override public Predicate build(Map config) { return INSTANCE; } } } ",0 "ml' %} {{ error3list(formWorker.errors.worker_name) }} {{ error3list(formWorker.errors.worker_sex) }} {{ error3list(formWorker.errors.worker_birthday) }} {{ error3list(formWorker.errors.worker_age) }} {{ error3list(formWorker.errors.worker_phone) }} {{ error3list(formWorker.errors.worker_diploma) }} {{ error3list(formWorker.errors.worker_email) }} {{ error3list(formWorker.errors.worker_address) }} {{ error3list(formWorker.errors.job_name) }} {{ error3list(formWorker.errors.department_name) }} {% endblock errorFalshPositionFixed %} {% block breadcrumb %}
      • 主页
      • 管理
      • 员工管理
      • {% endblock %} {% block nav_list %}{% include ""nav_list2.html"" %}{% endblock %} {% block content %}
        {% if g.user.limits|int == ROLE_ADMIN or g.user.limits|int == ROLE_MANAGER %} {% endif %} {% if searchFlag %} {% set Wor=wor %} {% else %} {% set Wor=wor.items %} {% endif %} {% for w in Wor %} {% set t = w.get_list %} {% if g.user.limits|int == ROLE_ADMIN or g.user.limits|int == ROLE_MANAGER %} {% endif %} {% endfor %}
        员工ID 姓名 性别 生日 联系方式 学历 电子邮箱 住址 就职时间 职务 部门操作
        {{ t[0] }} {{ t[1] }} {{ t[2] }} {{ t[3] }} {{ t[4] }} {{ t[5] }} {{ t[6] }} {{ t[7] }} {{ t[8] }} {{ t[9] }} {{ t[10] }}
        {% if g.user.limits|int == ROLE_ADMIN or g.user.limits|int == ROLE_MANAGER %}
        {% endif %}
        Page {{ page }}
        {% endblock %} {% block ex %} {% if g.user.limits|int == ROLE_ADMIN or g.user.limits|int == ROLE_MANAGER %}
        {{ formWorker.csrf_token }}

        修改界面

        {{ formWorker.worker_name(placeholder=""请输入姓名"",class=""form-control col-xs-10 col-md-10"") }}
        {{ formWorker.worker_sex(placeholder=""请输入性别(男或女)"",class=""form-control col-xs-10 col-md-10"") }}
        {{ formWorker.worker_birthday(placeholder=""请输入生日(1990-01-01)"",class=""form-control col-xs-10 col-md-10"") }}
        {{ formWorker.worker_phone(placeholder=""请输入手机号码"",class=""form-control col-xs-10 col-md-10"") }}
        {{ formWorker.worker_diploma(placeholder=""请输入学历"",class=""form-control col-xs-10 col-md-10"") }}
        {{ formWorker.worker_email(placeholder=""请输入电子邮箱"",class=""form-control col-xs-10 col-md-10"") }}
        {{ formWorker.worker_address(placeholder=""请输入目前住址"",class=""form-control col-xs-10 col-md-10"") }}
        {{ formWorker.job_name(placeholder=""请输入职务名称或者无"",class=""form-control col-xs-10 col-md-10"") }}
        {{ formWorker.department_name(placeholder=""请输入部门名称或者无"",class=""form-control col-xs-10 col-md-10"") }}
        {{ formDelwor.csrf_token }}

        删除

        是否删除

        {{ formDelwor.name(readonly="""",type=""text"", class=""form-control col-xs-12 col-md-12"") }}
        {{ searchForm.csrf_token }}

        搜索

        {{ searchForm.select }}
        {{ searchForm.data(placeholder=""请输入内容"",class=""form-control col-xs-12 col-md-12"") }}
        {{ searchForm.startDate(placeholder=""开始日期"",class=""form-control col-xs-10 col-md-10 "") }}
        {{ searchForm.endDate(placeholder=""截止日期"",class=""form-control col-xs-10 col-md-10 "") }}
        {% endif %} {% endblock ex %} {% block script %} {% if g.user.limits|int == ROLE_ADMIN %} {% endif %} {% endblock script %}",0 "atus=no,menubar=no,scrollbars=yes,resizable=yes"");}
        成語 目空四海
        注音 ㄇㄨˋ ㄎㄨㄥ ㄙˋ ㄏㄞˇ
        漢語拼音 mù kōng sì hǎi
        釋義  義參「目空一切」。見「目空一切」條。
        參考詞語︰目空一切
        注音︰ㄇㄨˋ ㄎㄨㄥ | ㄑ|ㄝˋ
        漢語拼音︰mù kōng yī qiè


        ",0 "on class=""navbar-toggle"" type=""button"" ng-click=""isCollapsed = !isCollapsed""> Toggle navigation sparksensor ",0 "tional.dtd""> NW_WBXML_DictEntry_s
         

        NW_WBXML_DictEntry_s Struct Reference

        struct NW_WBXML_DictEntry_s

        Member Data Documentation

        NW_String_UCS2Buff_t * name

        NW_String_UCS2Buff_t *name

        NW_Byte token

        NW_Byte token

        Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
        All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.

        ",0 " {L_NO_ANNOUNCEMENTS} --> {L_NO_ANNOUNCEMENTS}

        {NEWEST_POST_IMG}{READ_POST_IMG} {announcments_index_row.ATTACH_ICON_IMG} {L_POLL}: {announcments_index_row.TITLE}

        {L_POSTED_BY}: {announcments_index_row.IMG_POSTER_ICON} {announcments_index_row.POSTER}
        {L_FORUM}: {announcments_index_row.FORUM_NAME}  •  {L_IMPORTANT_NEWS}
        {announcments_index_row.MINI_POST_IMG}{announcments_index_row.TIME}
        {announcments_index_row.TOPIC_FOLDER_IMG}
        {announcments_index_row.TEXT}

        {L_ATTACHMENTS}:
        {announcments_index_row.attachment.DISPLAY_ATTACHMENT}
        {L_DOWNLOAD_NOTICE}

        {announcments_index_row.OPEN}{announcments_index_row.L_READ_FULL}{announcments_index_row.CLOSE}  {L_COMMENTS}: {announcments_index_row.REPLIES}  •  {L_POST_REPLY}  •  {L_TOPIC_VIEWS}: {announcments_index_row.TOPIC_VIEWS}
        {$FK_SPACER}

        {L_TOTAL_ANNOUNCEMENTS} {ANNOUNCEMENTS_TOTAL_ANNOUNCEMENTS} • {ANNOUNCEMENTS_PAGE_NUMBER} • {ANNOUNCEMENTS_PAGINATION} • {ANNOUNCEMENTS_PAGE_NUMBER}
        ",0 "utf-8""> myMainScript

        Contents

        MyMainScript

        tic;
        

        Applying unsharpMask on lionCrop

        img = load('../data/lionCrop.mat');
        im=img.imageOrig;
        out=myUnsharpMasking(im,5,1.875,1.9);
        iptsetpref('ImshowAxesVisible','on');
        figure('units','normalized','outerposition',[0 0 1 1])
        subplot(1,2,1);
        imshow(im), colorbar;
        title('Input Image')
        subplot(1,2,2);
        imshow(out), colorbar;
        name = strcat(['../images/output' 'lionCrop']);
        file_name = strcat([name '.png'])
        imwrite(out,file_name);
        title('Output Image');
        
        file_name =
        
        ../images/outputlionCrop.png
        
        

        Applying unsharpMask on superMoonCrop

        img = load('../data/superMoonCrop.mat');
        im=img.imageOrig;
        out=myUnsharpMasking(im,15,1.275,-1);
        iptsetpref('ImshowAxesVisible','on');
        figure('units','normalized','outerposition',[0 0 1 1])
        subplot(1,2,1);
        imshow(im), colorbar;
        title('Input Image')
        subplot(1,2,2);
        imshow(out), colorbar;
        name = strcat(['../images/output' 'superMoonCrop']);
        file_name = strcat([name '.png'])
        imwrite(out,file_name);
        title('Output Image');
        
        toc;
        
        file_name =
        
        ../images/outputsuperMoonCrop.png
        
        Elapsed time is 1.707150 seconds.
        


        Published with MATLAB® 7.7

        ",0 "ction; import ua.pp.shurgent.tfctech.integration.bc.BCStuff; import ua.pp.shurgent.tfctech.integration.bc.ModPipeIconProvider; import ua.pp.shurgent.tfctech.integration.bc.blocks.pipes.handlers.PipeItemsInsertionHandler; import buildcraft.api.core.IIconProvider; import buildcraft.transport.pipes.PipeItemsQuartz; import buildcraft.transport.pipes.events.PipeEventItem; public class PipeItemsSterlingSilver extends PipeItemsQuartz { public PipeItemsSterlingSilver(Item item) { super(item); } @Override public IIconProvider getIconProvider() { return BCStuff.pipeIconProvider; } @Override public int getIconIndex(ForgeDirection direction) { return ModPipeIconProvider.TYPE.PipeItemsSterlingSilver.ordinal(); } public void eventHandler(PipeEventItem.AdjustSpeed event) { super.eventHandler(event); } public void eventHandler(PipeEventItem.Entered event) { event.item.setInsertionHandler(PipeItemsInsertionHandler.INSTANCE); } } ",0 "stributed with this source code. */ namespace eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader; use eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\FilterInterface; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; class SwirlFilterLoader implements LoaderInterface { /** @var FilterInterface */ private $filter; public function __construct(FilterInterface $filter) { $this->filter = $filter; } public function load(ImageInterface $image, array $options = []) { if (!empty($options)) { $this->filter->setOption('degrees', $options[0]); } return $this->filter->apply($image); } } ",0 " Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * MPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with MPlayer; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include #include #include #include #include #include ""config.h"" #include ""mp_msg.h"" #include ""help_mp.h"" #ifdef __FreeBSD__ #include #endif #include ""m_option.h"" #include ""stream.h"" #include ""libmpdemux/demuxer.h"" /// We keep these 2 for the gui atm, but they will be removed. char* cdrom_device=NULL; int dvd_chapter=1; int dvd_last_chapter=0; char* dvd_device=NULL; char *bluray_device=NULL; // Open a new stream (stdin/file/vcd/url) stream_t* open_stream(const char* filename,char** options, int* file_format){ int dummy = DEMUXER_TYPE_UNKNOWN; if (!file_format) file_format = &dummy; // Check if playlist or unknown if (*file_format != DEMUXER_TYPE_PLAYLIST){ *file_format=DEMUXER_TYPE_UNKNOWN; } if(!filename) { mp_msg(MSGT_OPEN,MSGL_ERR,""NULL filename, report this bug\n""); return NULL; } //============ Open STDIN or plain FILE ============ return open_stream_full(filename,STREAM_READ,options,file_format); } ",0 "lHelper; use Drupal\Core\Url; use Drupal\fillpdf\Entity\FillPdfForm; use Drupal\fillpdf\FillPdfLinkManipulatorInterface; use Symfony\Component\HttpFoundation\Request; /** * {@inheritDoc} */ class FillPdfLinkManipulator implements FillPdfLinkManipulatorInterface { /** * @param Request $request The request containing the query string to parse. * @return array * * @todo: Maybe this should return a FillPdfLinkContext object or something? * Guess it depends on how much I end up needing to change it. */ public function parseRequest(Request $request) { // @todo: Use Url::fromRequest when/if it lands in core. See https://www.drupal.org/node/2605530 $path = $request->getUri(); $request_url = $this->createUrlFromString($path); return $this->parseLink($request_url); } /** * @param $url * * @see FillPdfLinkManipulatorInterface::parseUrlString() * * @return \Drupal\Core\Url */ protected function createUrlFromString($url) { $url_parts = UrlHelper::parse($url); $path = $url_parts['path']; $query = $url_parts['query']; $link = Url::fromUri($path, ['query' => $query]); return $link; } /** * {@inheritDoc} */ public function parseLink(Url $link) { $query = $link->getOption('query'); if (!$query) { throw new \InvalidArgumentException('The \Drupal\Core\Url you pass in must have its \'query\' option set.'); } $request_context = [ 'entity_ids' => NULL, 'fid' => NULL, 'sample' => NULL, 'force_download' => FALSE, 'flatten' => TRUE, ]; if (!empty($query['sample'])) { $sample = TRUE; } // Is this just the PDF populated with sample data? $request_context['sample'] = $sample; if (!empty($query['fid'])) { $request_context['fid'] = $query['fid']; } else { throw new \InvalidArgumentException('fid parameter missing from query string; cannot determine how to proceed, so failing.'); } if (!empty($query['entity_type'])) { $request_context['entity_type'] = $query['entity_type']; } $request_context['entity_ids'] = $entity_ids = []; if (!empty($query['entity_id']) || !empty($query['entity_ids'])) { $entity_ids = (!empty($query['entity_id']) ? [$query['entity_id']] : $query['entity_ids']); // Re-key entity IDs so they can be loaded easily with loadMultiple(). // If we have type information, add it to the types array, and remove it // in order to make sure we only store the ID in the entity_ids key. foreach ($entity_ids as $entity_id) { $entity_id_parts = explode(':', $entity_id); if (count($entity_id_parts) == 2) { $entity_type = $entity_id_parts[0]; $entity_id = $entity_id_parts[1]; } elseif (!empty($request_context['entity_type'])) { $entity_type = $request_context['entity_type']; } else { $entity_type = 'node'; } $request_context['entity_ids'] += [ $entity_type => [], ]; $request_context['entity_ids'][$entity_type][$entity_id] = $entity_id; } } else { // Populate defaults. $fillpdf_form = FillPdfForm::load($request_context['fid']); $default_entity_id = $fillpdf_form->default_entity_id->value; if ($default_entity_id) { $default_entity_type = $fillpdf_form->default_entity_type->value; if (empty($default_entity_type)) { $default_entity_type = 'node'; } $request_context['entity_ids'] = [ $default_entity_type => [$default_entity_id => $default_entity_id], ]; } } // We've processed the shorthand forms, so unset them. unset($request_context['entity_id'], $request_context['entity_type']); if (!$query['download'] && (int) $query['download'] == 1) { $request_context['force_download'] = TRUE; } if ($query['flatten'] && (int) $query['flatten'] == 0) { $request_context['flatten'] = FALSE; } return $request_context; } public function parseUrlString($url) { $link = $this->createUrlFromString($url); return $this->parseLink($link); } /** * {@inheritdoc} */ public function generateLink(array $parameters) { $query = []; if (!isset($parameters['fid'])) { throw new \InvalidArgumentException(""The $parameters argument must contain the fid key (the FillPdfForm's ID).""); } $query['fid'] = $parameters['fid']; // Only set the following properties if they're not at their default values. // This makes the resulting Url a bit cleaner. // Structure: // '' => [ // ['', ] // ... // ] // @todo: Create a value object for FillPdfMergeContext and get the defaults here from that $parameter_info = [ 'sample' => ['sample', FALSE], 'force_download' => ['download', FALSE], 'flatten' => ['flatten', TRUE], ]; foreach ($parameter_info as $context_key => $info) { $query_key = $info[0]; $parameter_default = $info[1]; if (isset($parameters[$context_key]) && $parameters[$context_key] != $parameter_default) { $query[$query_key] = $parameters[$context_key]; } } // $query['entity_ids'] contains entity IDs indexed by entity type. // Collapse these into the entity_type:entity_id format. $query['entity_ids'] = []; $entity_info = $parameters['entity_ids']; foreach ($entity_info as $entity_type => $entity_ids) { foreach ($entity_ids as $entity_id) { $query['entity_ids'][] = ""{$entity_type}:{$entity_id}""; } } $fillpdf_link = Url::fromRoute('fillpdf.populate_pdf', [], ['query' => $query]); return $fillpdf_link; } } ",0 "ished by the Free Software Foundation. * * In addition to the permissions in the GNU General Public License, * the authors give you unlimited permission to link the compiled * version of this file into combinations with other programs, * and to distribute those combinations without any restriction * coming from the use of this file. (The General Public License * restrictions do apply in other respects; for example, they cover * modification of the file, and distribution when not linked into * a combined executable.) * * This file is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include ""git/odb.h"" struct git_odb { /** Path to the ""objects"" directory. */ char *path; /** Alternate databases to search. */ git_odb **alternates; }; static int open_alternates(git_odb *db) { unsigned n = 0; db->alternates = malloc(sizeof(*db->alternates) * (n + 1)); if (!db->alternates) return GIT_ERROR; db->alternates[n] = NULL; return GIT_SUCCESS; } int git_odb_open(git_odb **out, const char *objects_dir) { git_odb *db = malloc(sizeof(*db)); if (!db) return GIT_ERROR; db->path = strdup(objects_dir); if (!db->path) { free(db); return GIT_ERROR; } db->alternates = NULL; *out = db; return GIT_SUCCESS; } void git_odb_close(git_odb *db) { if (!db) return; if (db->alternates) { git_odb **alt; for (alt = db->alternates; *alt; alt++) git_odb_close(*alt); free(db->alternates); } free(db->path); free(db); } int git_odb_read( git_obj *out, git_odb *db, const git_oid *id) { attempt: if (!git_odb__read_packed(out, db, id)) return GIT_SUCCESS; if (!git_odb__read_loose(out, db, id)) return GIT_SUCCESS; if (!db->alternates && !open_alternates(db)) goto attempt; out->data = NULL; return GIT_ENOTFOUND; } ",0 "etroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. * * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with RetroArch. * If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include ""../input_config.h"" #include ""../input_driver.h"" #include ""../../tasks/tasks_internal.h"" #include ""../common/udev_common.h"" #include ""../../configuration.h"" #include ""../../verbosity.h"" /* Udev/evdev Linux joypad driver. * More complex and extremely low level, * but only Linux driver which can support joypad rumble. * * Uses udev for device detection + hotplug. * * Code adapted from SDL 2.0's implementation. */ #define UDEV_NUM_BUTTONS 32 #define NUM_AXES 32 #define NUM_HATS 4 #define test_bit(nr, addr) \ (((1UL << ((nr) % (sizeof(long) * CHAR_BIT))) & ((addr)[(nr) / (sizeof(long) * CHAR_BIT)])) != 0) #define NBITS(x) ((((x) - 1) / (sizeof(long) * CHAR_BIT)) + 1) struct udev_joypad { int fd; dev_t device; /* Input state polled. */ uint64_t buttons; int16_t axes[NUM_AXES]; int8_t hats[NUM_HATS][2]; /* Maps keycodes -> button/axes */ uint8_t button_bind[KEY_MAX]; uint8_t axes_bind[ABS_MAX]; struct input_absinfo absinfo[NUM_AXES]; int num_effects; int effects[2]; /* [0] - strong, [1] - weak */ bool has_set_ff[2]; uint16_t strength[2]; uint16_t configured_strength[2]; char ident[255]; char *path; int32_t vid; int32_t pid; }; static struct udev *udev_joypad_fd = NULL; static struct udev_monitor *udev_joypad_mon = NULL; static struct udev_joypad udev_pads[MAX_USERS]; static INLINE int16_t udev_compute_axis(const struct input_absinfo *info, int value) { int range = info->maximum - info->minimum; int axis = (value - info->minimum) * 0xffffll / range - 0x7fffll; if (axis > 0x7fff) return 0x7fff; else if (axis < -0x7fff) return -0x7fff; return axis; } static void udev_poll_pad(struct udev_joypad *pad, unsigned p) { int i, len; struct input_event events[32]; if (pad->fd < 0) return; while ((len = read(pad->fd, events, sizeof(events))) > 0) { len /= sizeof(*events); for (i = 0; i < len; i++) { int code = events[i].code; switch (events[i].type) { case EV_KEY: if (code >= BTN_MISC || (code >= KEY_UP && code <= KEY_DOWN)) { if (events[i].value) BIT64_SET(pad->buttons, pad->button_bind[code]); else BIT64_CLEAR(pad->buttons, pad->button_bind[code]); } break; case EV_ABS: if (code >= ABS_MISC) break; switch (code) { case ABS_HAT0X: case ABS_HAT0Y: case ABS_HAT1X: case ABS_HAT1Y: case ABS_HAT2X: case ABS_HAT2Y: case ABS_HAT3X: case ABS_HAT3Y: { code -= ABS_HAT0X; pad->hats[code >> 1][code & 1] = events[i].value; break; } default: { unsigned axis = pad->axes_bind[code]; pad->axes[axis] = udev_compute_axis(&pad->absinfo[axis], events[i].value); break; } } break; default: break; } } } } static int udev_find_vacant_pad(void) { unsigned i; for (i = 0; i < MAX_USERS; i++) if (udev_pads[i].fd < 0) return i; return -1; } static int udev_open_joystick(const char *path) { unsigned long evbit[NBITS(EV_MAX)] = {0}; unsigned long keybit[NBITS(KEY_MAX)] = {0}; unsigned long absbit[NBITS(ABS_MAX)] = {0}; int fd = open(path, O_RDWR | O_NONBLOCK); if (fd < 0) return fd; if ( (ioctl(fd, EVIOCGBIT(0, sizeof(evbit)), evbit) < 0) || (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) || (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0)) goto error; /* Has to at least support EV_KEY interface. */ if (!test_bit(EV_KEY, evbit)) goto error; return fd; error: close(fd); return -1; } static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char *path) { int i; struct stat st; int ret = 0; const char *buf = NULL; unsigned buttons = 0; unsigned axes = 0; struct udev_device *parent = NULL; struct udev_joypad *pad = (struct udev_joypad*)&udev_pads[p]; unsigned long keybit[NBITS(KEY_MAX)] = {0}; unsigned long absbit[NBITS(ABS_MAX)] = {0}; unsigned long ffbit[NBITS(FF_MAX)] = {0}; settings_t *settings = config_get_ptr(); strlcpy(pad->ident, settings->input.device_names[p], sizeof(pad->ident)); if (ioctl(fd, EVIOCGNAME(sizeof(pad->ident)), pad->ident) < 0) { RARCH_LOG(""[udev]: Failed to get pad name: %s.\n"", pad->ident); return -1; } /* Don't worry about unref'ing the parent. */ parent = udev_device_get_parent_with_subsystem_devtype(dev, ""usb"", ""usb_device""); pad->vid = pad->pid = 0; if ((buf = udev_device_get_sysattr_value(parent, ""idVendor"")) != NULL) pad->vid = strtol(buf, NULL, 16); if ((buf = udev_device_get_sysattr_value(parent, ""idProduct"")) != NULL) pad->pid = strtol(buf, NULL, 16); RARCH_LOG(""[udev]: Plugged pad: %s (%u:%u) on port #%u.\n"", pad->ident, pad->vid, pad->pid, p); if (fstat(fd, &st) < 0) return -1; if ((ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) || (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0)) return -1; /* Go through all possible keycodes, check if they are used, * and map them to button/axes/hat indices. */ for (i = KEY_UP; i <= KEY_DOWN && buttons < UDEV_NUM_BUTTONS; i++) if (test_bit(i, keybit)) pad->button_bind[i] = buttons++; for (i = BTN_MISC; i < KEY_MAX && buttons < UDEV_NUM_BUTTONS; i++) if (test_bit(i, keybit)) pad->button_bind[i] = buttons++; for (i = 0; i < ABS_MISC && axes < NUM_AXES; i++) { /* Skip hats for now. */ if (i == ABS_HAT0X) { i = ABS_HAT3Y; continue; } if (test_bit(i, absbit)) { struct input_absinfo *abs = &pad->absinfo[axes]; if (ioctl(fd, EVIOCGABS(i), abs) < 0) continue; if (abs->maximum > abs->minimum) { pad->axes[axes] = udev_compute_axis(abs, abs->value); pad->axes_bind[i] = axes++; } } } pad->device = st.st_rdev; pad->fd = fd; pad->path = strdup(path); if (!string_is_empty(pad->ident)) { if (!input_autoconfigure_connect( pad->ident, NULL, udev_joypad.ident, p, pad->vid, pad->pid)) input_config_set_device_name(p, pad->ident); ret = 1; } /* Check for rumble features. */ if (ioctl(fd, EVIOCGBIT(EV_FF, sizeof(ffbit)), ffbit) >= 0) { if (test_bit(FF_RUMBLE, ffbit)) RARCH_LOG(""[udev]: Pad #%u (%s) supports force feedback.\n"", p, path); if (ioctl(fd, EVIOCGEFFECTS, &pad->num_effects) >= 0) RARCH_LOG( ""[udev]: Pad #%u (%s) supports %d force feedback effects.\n"", p, path, pad->num_effects); } return ret; } static void udev_check_device(struct udev_device *dev, const char *path) { int ret; int pad, fd; unsigned i; struct stat st; if (stat(path, &st) < 0) return; for (i = 0; i < MAX_USERS; i++) { if (st.st_rdev == udev_pads[i].device) { RARCH_LOG( ""[udev]: Device ID %u is already plugged.\n"", (unsigned)st.st_rdev); return; } } pad = udev_find_vacant_pad(); if (pad < 0) return; fd = udev_open_joystick(path); if (fd < 0) return; ret = udev_add_pad(dev, pad, fd, path); switch (ret) { case -1: RARCH_ERR(""[udev]: Failed to add pad: %s.\n"", path); close(fd); break; case 1: /* Pad was autoconfigured. */ break; case 0: default: break; } } static void udev_free_pad(unsigned pad) { if (udev_pads[pad].fd >= 0) close(udev_pads[pad].fd); if (udev_pads[pad].path) free(udev_pads[pad].path); udev_pads[pad].path = NULL; if (!string_is_empty(udev_pads[pad].ident)) udev_pads[pad].ident[0] = '\0'; memset(&udev_pads[pad], 0, sizeof(udev_pads[pad])); udev_pads[pad].fd = -1; } static void udev_joypad_remove_device(const char *path) { unsigned i; for (i = 0; i < MAX_USERS; i++) { if ( !string_is_empty(udev_pads[i].path) && string_is_equal(udev_pads[i].path, path)) { input_autoconfigure_disconnect(i, udev_pads[i].ident); udev_free_pad(i); break; } } } static void udev_joypad_destroy(void) { unsigned i; for (i = 0; i < MAX_USERS; i++) udev_free_pad(i); if (udev_joypad_mon) udev_monitor_unref(udev_joypad_mon); if (udev_joypad_fd) udev_unref(udev_joypad_fd); udev_joypad_mon = NULL; udev_joypad_fd = NULL; } static void udev_joypad_handle_hotplug(struct udev_device *dev) { const char *val = udev_device_get_property_value(dev, ""ID_INPUT_JOYSTICK""); const char *action = udev_device_get_action(dev); const char *devnode = udev_device_get_devnode(dev); if (!val || !string_is_equal(val, ""1"") || !devnode) goto end; if (string_is_equal(action, ""add"")) { RARCH_LOG(""[udev]: Hotplug add: %s.\n"", devnode); udev_check_device(dev, devnode); } else if (string_is_equal(action, ""remove"")) { RARCH_LOG(""[udev]: Hotplug remove: %s.\n"", devnode); udev_joypad_remove_device(devnode); } end: udev_device_unref(dev); } static bool udev_set_rumble(unsigned i, enum retro_rumble_effect effect, uint16_t strength) { int old_effect; uint16_t old_strength; struct udev_joypad *pad = (struct udev_joypad*)&udev_pads[i]; if (pad->fd < 0) return false; if (pad->num_effects < 2) return false; old_strength = pad->strength[effect]; if (old_strength == strength) return true; old_effect = pad->has_set_ff[effect] ? pad->effects[effect] : -1; if (strength && strength != pad->configured_strength[effect]) { /* Create new or update old playing state. */ struct ff_effect e = {0}; e.type = FF_RUMBLE; e.id = old_effect; switch (effect) { case RETRO_RUMBLE_STRONG: e.u.rumble.strong_magnitude = strength; break; case RETRO_RUMBLE_WEAK: e.u.rumble.weak_magnitude = strength; break; default: return false; } if (ioctl(pad->fd, EVIOCSFF, &e) < 0) { RARCH_ERR(""Failed to set rumble effect on pad #%u.\n"", i); return false; } pad->effects[effect] = e.id; pad->has_set_ff[effect] = true; pad->configured_strength[effect] = strength; } pad->strength[effect] = strength; /* It seems that we can update strength with EVIOCSFF atomically. */ if ((!!strength) != (!!old_strength)) { struct input_event play = {{0}}; play.type = EV_FF; play.code = pad->effects[effect]; play.value = !!strength; if (write(pad->fd, &play, sizeof(play)) < (ssize_t)sizeof(play)) { RARCH_ERR(""[udev]: Failed to play rumble effect #%u on pad #%u.\n"", effect, i); return false; } } return true; } static void udev_joypad_poll(void) { unsigned i; while (udev_joypad_mon && udev_hotplug_available(udev_joypad_mon)) { struct udev_device *dev = udev_monitor_receive_device(udev_joypad_mon); if (dev) udev_joypad_handle_hotplug(dev); } for (i = 0; i < MAX_USERS; i++) udev_poll_pad(&udev_pads[i], i); } static bool udev_joypad_init(void *data) { unsigned i; struct udev_list_entry *devs = NULL; struct udev_list_entry *item = NULL; struct udev_enumerate *enumerate = NULL; (void)data; for (i = 0; i < MAX_USERS; i++) udev_pads[i].fd = -1; udev_joypad_fd = udev_new(); if (!udev_joypad_fd) return false; udev_joypad_mon = udev_monitor_new_from_netlink(udev_joypad_fd, ""udev""); if (udev_joypad_mon) { udev_monitor_filter_add_match_subsystem_devtype( udev_joypad_mon, ""input"", NULL); udev_monitor_enable_receiving(udev_joypad_mon); } enumerate = udev_enumerate_new(udev_joypad_fd); if (!enumerate) goto error; udev_enumerate_add_match_property(enumerate, ""ID_INPUT_JOYSTICK"", ""1""); udev_enumerate_scan_devices(enumerate); devs = udev_enumerate_get_list_entry(enumerate); for (item = devs; item; item = udev_list_entry_get_next(item)) { const char *name = udev_list_entry_get_name(item); struct udev_device *dev = udev_device_new_from_syspath(udev_joypad_fd, name); const char *devnode = udev_device_get_devnode(dev); if (devnode) udev_check_device(dev, devnode); udev_device_unref(dev); } udev_enumerate_unref(enumerate); return true; error: udev_joypad_destroy(); return false; } static bool udev_joypad_button_hat(const void *data, uint16_t joykey, unsigned hat_dir) { const struct udev_joypad *pad = (const struct udev_joypad*)data; unsigned h = GET_HAT(joykey); if (h >= NUM_HATS) return false; switch (hat_dir) { case HAT_LEFT_MASK: return pad->hats[h][0] < 0; case HAT_RIGHT_MASK: return pad->hats[h][0] > 0; case HAT_UP_MASK: return pad->hats[h][1] < 0; case HAT_DOWN_MASK: return pad->hats[h][1] > 0; } return 0; } static bool udev_joypad_button(unsigned port, uint16_t joykey) { const struct udev_joypad *pad = (const struct udev_joypad*)&udev_pads[port]; unsigned hat_dir = GET_HAT_DIR(joykey); if (hat_dir) return udev_joypad_button_hat(pad, joykey, hat_dir); return joykey < UDEV_NUM_BUTTONS && BIT64_GET(pad->buttons, joykey); } static uint64_t udev_joypad_get_buttons(unsigned port) { const struct udev_joypad *pad = (const struct udev_joypad*)&udev_pads[port]; return pad->buttons; } static int16_t udev_joypad_axis(unsigned port, uint32_t joyaxis) { int16_t val = 0; const struct udev_joypad *pad; if (joyaxis == AXIS_NONE) return 0; pad = (const struct udev_joypad*)&udev_pads[port]; if (AXIS_NEG_GET(joyaxis) < NUM_AXES) { val = pad->axes[AXIS_NEG_GET(joyaxis)]; if (val > 0) val = 0; } else if (AXIS_POS_GET(joyaxis) < NUM_AXES) { val = pad->axes[AXIS_POS_GET(joyaxis)]; if (val < 0) val = 0; } return val; } static bool udev_joypad_query_pad(unsigned pad) { return pad < MAX_USERS && udev_pads[pad].fd >= 0; } static const char *udev_joypad_name(unsigned pad) { if (pad >= MAX_USERS || string_is_empty(udev_pads[pad].ident)) return NULL; return udev_pads[pad].ident; } input_device_driver_t udev_joypad = { udev_joypad_init, udev_joypad_query_pad, udev_joypad_destroy, udev_joypad_button, udev_joypad_get_buttons, udev_joypad_axis, udev_joypad_poll, udev_set_rumble, udev_joypad_name, ""udev"", }; ",0 "ED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. Copyright (c) Microsoft Corporation. All rights reserved --> News

        News

        ",0 " href=""#Dogbone%20Fillets"">dogbone fillets.

        Traditional fillet

        Rounding a corner can add strength to your part, as well as make it faster to print. Using makerjs.path.fillet you can round a corner at the junction between two lines, two arcs, or a line and an arc. This function will clip the two paths that you pass it, and will return a new arc path which fits between the clipped ends. The paths must meet at one point, this is how it determines which ends of the paths to clip. You also provide a radius of the fillet. If the fillet cannot be created this function will return null.

        {% highlight javascript %} //fillet between lines var makerjs = require('makerjs'); var model = { paths: { line1: new makerjs.paths.Line([0, 20], [30, 10]), line2: new makerjs.paths.Line([10, 0], [30, 10]) } }; //create a fillet var arc = makerjs.path.fillet(model.paths.line1, model.paths.line2, 2); //add the fillet to the model model.paths.arc = arc; var svg = makerjs.exporter.toSVG(model); document.write(svg); {% endhighlight %} {% highlight javascript %} //fillet between arcs var makerjs = require('makerjs'); var model = { paths: { arc1: new makerjs.paths.Arc([0, 50], 50, 270, 0), arc2: new makerjs.paths.Arc([100, 50], 50, 180, 270) } }; //create a fillet var arc = makerjs.path.fillet(model.paths.arc1, model.paths.arc2, 2); //add the fillet to the model model.paths.arc = arc; var svg = makerjs.exporter.toSVG(model); document.write(svg); {% endhighlight %} {% highlight javascript %} //fillet between line and arc (or arc and line!) var makerjs = require('makerjs'); var model = { paths: { arc: new makerjs.paths.Arc([0, 50], 50, 270, 0), line: new makerjs.paths.Line([50, 50], [50, 0]) } }; //create a fillet var arc2 = makerjs.path.fillet(model.paths.arc, model.paths.line, 2); //add the fillet to the model model.paths.arc2 = arc2; var svg = makerjs.exporter.toSVG(model); document.write(svg); {% endhighlight %} ",0 " java.io.File; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; /** * Created by Moritz on 12.12.2015. */ public class WikidataInterfaceTest { String[] qIds = new String[] {""Q7913892"", ""Q12503"", ""Q3176558"", ""Q36161"", ""Q739925"", ""Q49008"", ""Q12503"", ""Q5156597"", ""Q11567"", ""Q1413083"", ""Q50700"", ""Q50701"", ""Q935944"", ""Q50701"", ""Q935944"", ""Q1144319"", ""Q50700"", ""Q3150667"", ""Q2256802"", ""Q729113"", ""Q21199"", ""Q33456"", ""Q44946"", ""Q230883"", ""Q21199"", ""Q21199"", ""Q50700"", ""Q50700"", ""Q50700"", ""Q50700"", ""Q378201"", ""Q302462"", ""Q3913"", ""Q3913"", ""Q3913"", ""Q12916"", ""Q12916"", ""Q11352"", ""Q2303886"", ""Q526719"", ""Q11348"", ""Q1027788"", ""Q12916"", ""Q12916"", ""Q946764"", ""Q19033"", ""Q126017"", ""Q230963"", ""Q2303886"", ""Q168698"", ""Q917476"", ""Q17285"", ""Q1663694"", ""Q1663694"", ""Q1663694"", ""Q1663694"", ""Q5597315"", ""Q5597315"", ""Q2303886"", ""Q46276"", ""Q2140940"", ""Q36253"", ""Q1096885"", ""Q189569"", ""Q3176558"", ""Q188889"", ""Q188889"", ""Q13824"", ""Q2111"", ""Q174102"", ""Q1440227"", ""Q167"", ""Q1515261"", ""Q1128317"", ""Q111059"", ""Q111059"", ""Q43260"", ""Q3150667"", ""Q43260"", ""Q11567"", ""Q2095069"", ""Q21199"", ""Q21199"", ""Q2303886"", ""Q2303886"", ""Q1137759"", ""Q193796"", ""Q12916"", ""Q6520159"", ""Q11471"", ""Q167"", ""Q12916"", ""Q12916"", ""Q21199"", ""Q21199"", ""Q3686031"", ""Q11471"", ""Q9492"", ""Q12916"", ""Q4440864"", ""Q12916"", ""Q18373"", ""Q2111"", ""Q1289248"", ""Q876346"", ""Q1289248"", ""Q464794"", ""Q193794"", ""Q192826"", ""Q11471"", ""Q929043"", ""Q2518235"", ""Q782566"", ""Q1074380"", ""Q1413083"", ""Q1413083"", ""Q1008943"", ""Q1256787"", ""Q13471665"", ""Q1289248"", ""Q2337858"", ""Q11348"", ""Q11348"", ""Q11348"", ""Q11471"", ""Q2918589"", ""Q1045555"", ""Q21199"", ""Q82580"", ""Q18848"", ""Q18848"", ""Q1952404"", ""Q11703678"", ""Q11703678"", ""Q2303886"", ""Q1096885"", ""Q4440864"", ""Q2362761"", ""Q11471"", ""Q3176558"", ""Q30006"", ""Q11567"", ""Q3258885"", ""Q131030"", ""Q21406831"", ""Q131030"", ""Q186290"", ""Q1591095"", ""Q11348"", ""Q3150667"", ""Q474715"", ""Q379825"", ""Q379825"", ""Q192704"", ""Q44432"", ""Q44432"", ""Q319913"", ""Q12916"", ""Q12916"", ""Q2627460"", ""Q2627460"", ""Q190109"", ""Q83478"", ""Q18848"", ""Q379825"", ""Q844128"", ""Q2608202"", ""Q29539"", ""Q11465"", ""Q176737"", ""Q176737"", ""Q176737"", ""Q1413083"", ""Q1759756"", ""Q900231"", ""Q39297"", ""Q39297"", ""Q39552"", ""Q39297"", ""Q1948412"", ""Q3554818"", ""Q21199"", ""Q12916"", ""Q168698"", ""Q50701"", ""Q11053"", ""Q12916"", ""Q12916"", ""Q12916"", ""Q12503"", ""Q12503"", ""Q176623"", ""Q10290214"", ""Q10290214"", ""Q505735"", ""Q1057607"", ""Q11471"", ""Q1057607"", ""Q5227327"", ""Q6901742"", ""Q159375"", ""Q2858846"", ""Q1134404"", ""Q12916"", ""Q4440864"", ""Q838611"", ""Q44946"", ""Q173817"", ""Q12916"", ""Q21199"", ""Q12916"", ""Q190056"", ""Q10290214"", ""Q10290214"", ""Q506041"", ""Q2858846""}; @Test public void testGetAliases() throws Exception { for (String qid : qIds) { Path file = Paths.get(File.createTempFile(""temp"", Long.toString(System.nanoTime())).getPath()); List aliases = WikidataInterface.getAliases(qid); aliases = aliases.stream().map(a -> ""\"""" + a + ""\"""").collect(Collectors.toList()); Files.write(file, aliases, Charset.forName(""UTF-8"")); } } @Test public void testGetEntities() throws Exception { final ArrayList expected = Lists.newArrayList(""Q12916""); Assert.assertEquals(expected.get(0), WikidataInterface.getEntities(""real number"").get(0)); } }",0 "div id=""wrapper"">

        @name

        @title

        @description

        :media @content

        :footer :analytics ",0 " // // 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. // // See http://ant-eclipse.sourceforge.net for the most recent version // and more information. package prantl.ant.eclipse; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.util.Vector; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Reference; /** * Provides the functionality generating the file .classpath for the supplied * task object. It is expected to be used within the class EclipseTask. * * @see EclipseTask * @since Ant-Eclipse 1.0 * @author Ferdinand Prantl <prantl@users.sourceforge.net> */ final class ClassPathGenerator { /** * Contains a ready-to write information about a binary classpath entry - element * kinds ""lib"" or ""var"". Fields of this class match attributes of the element * classpath. * * @see ClassPathGenerator#writeProcessedBinaryClassPathEntries(XmlWriter, String, * Vector) * @since Ant-Eclipse 1.0 * @author Ferdinand Prantl <prantl@users.sourceforge.net> */ static class ProcessedBinaryClassPathEntry { String kind; String path; boolean exported; String sourcepath; String javadoc_location; } private EclipseTask task; /** * Creates a new instance of the generating object. * * @param parent * The parent task. * @since Ant-Eclipse 1.0 */ ClassPathGenerator(EclipseTask parent) { task = parent; } /** * Generates the file .classpath using the supplied output object. * * @since Ant-Eclipse 1.0 */ void generate() { ClassPathElement classPath = task.getEclipse().getClassPath(); if (classPath == null) { task.log(""There was no description of a classpath found."", Project.MSG_WARN); return; } EclipseOutput output = task.getOutput(); if (output.isClassPathUpToDate()) { task.log(""The classpath definition is up-to-date."", Project.MSG_WARN); return; } task.log(""Writing the classpath definition.""); XmlWriter writer = null; try { writer = new XmlWriter(new OutputStreamWriter(new BufferedOutputStream(output .createClassPath()), ""UTF-8"")); writer.writeXmlDeclaration(""UTF-8""); writer.openElement(""classpath""); checkClassPathEntries(classPath); generateContainerClassPathEntry(writer); generateSourceClassPathEntries(writer); Vector entries = new Vector(); processVariableClassPathEntries(entries, classPath.getVariables()); processLibraryClassPathEntries(entries, classPath.getLibraries()); writeProcessedBinaryClassPathEntries(writer, entries); generateOutputClassPathEntry(writer); writer.closeElement(""classpath""); } catch (UnsupportedEncodingException exception) { throw new BuildException(""Encoder to UTF-8 is not supported."", exception); } catch (IOException exception) { throw new BuildException(""Writing the classpath definition failed."", exception); } finally { if (writer != null) try { writer.close(); } catch (IOException exception1) { throw new BuildException(""Closing the classpath definition failed."", exception1); } } } private void generateContainerClassPathEntry(XmlWriter writer) throws IOException { ClassPathEntryContainerElement container = task.getEclipse().getClassPath() .getContainer(); if (container == null) { task.log(""No container found, a default one added."", Project.MSG_VERBOSE); container = new ClassPathEntryContainerElement(); } container.validate(); String path = container.getPath(); if (path.indexOf('/') < 0 && !path.startsWith(""org.eclipse.jdt.launching.JRE_CONTAINER"")) { task.log(""Prepending the container class name to the container path \"""" + path + ""\""."", Project.MSG_VERBOSE); path = ""org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/"" + path; } task.log(""Adding container \"""" + path + ""\""."", Project.MSG_VERBOSE); openClassPathEntry(writer, ""con"", path); writer.closeDegeneratedElement(); } private void generateSourceClassPathEntries(XmlWriter writer) throws IOException { Vector entries = task.getEclipse().getClassPath().getSources(); if (entries.size() == 0) { task .log(""No source found, the current directory added."", Project.MSG_VERBOSE); entries.addElement(new ClassPathEntrySourceElement()); } for (int i = 0, size = entries.size(); i != size; ++i) { ClassPathEntrySourceElement entry = (ClassPathEntrySourceElement) entries .get(i); entry.validate(); String excluding = entry.getExcluding(); String output = entry.getOutput(); Path path = new Path(task.getProject()); Reference reference = entry.getPathRef(); String[] items = path.list(); if (reference != null) { path.setRefid(reference); items = path.list(); } else { String value = entry.getPath(); if (value.length() == 0) task.log(""Using the current directory as a default source path."", Project.MSG_VERBOSE); items = new String[] { value }; } String baseDirectory = task.getProject().getBaseDir().getAbsolutePath(); for (int j = 0; j != items.length; ++j) { String item = cutBaseDirectory(items[j], baseDirectory); task.log(""Adding sources from \"""" + item + ""\""."", Project.MSG_VERBOSE); openClassPathEntry(writer, ""src"", item); if (excluding != null) writer.appendAttribute(""excluding"", excluding); if (output != null) writer.appendAttribute(""output"", output); writer.closeDegeneratedElement(); } } } private void processVariableClassPathEntries(Vector entries, Vector paths) { processBinaryClassPathEntries(entries, ""var"", paths); } private void processLibraryClassPathEntries(Vector entries, Vector paths) { processBinaryClassPathEntries(entries, ""lib"", paths); } private void processBinaryClassPathEntries(Vector entries, String kind, Vector binaries) { for (int i = 0, size = binaries.size(); i != size; ++i) { ClassPathEntryBinaryElement entry = (ClassPathEntryBinaryElement) binaries .get(i); entry.validate(); Path path = new Path(task.getProject()); Reference reference = entry.getPathRef(); if (reference != null) path.setRefid(reference); else { String value = entry.getPath(); path.setPath(value); } processBinaryClassPathEntries(entries, kind, entry.getExported(), entry .getSource(), entry.getJavadoc(), path.list()); } } private void processBinaryClassPathEntries(Vector entries, String kind, boolean exported, String source, String javadoc_location, String[] items) { String baseDirectory = task.getProject().getBaseDir().getAbsolutePath(); for (int j = 0; j != items.length; ++j) { String item = cutBaseDirectory(items[j], baseDirectory); ProcessedBinaryClassPathEntry element = getProcessedBinaryClassPathEntry( entries, item); if (element == null) { task.log(""Processing binary dependency \"""" + item + ""\"" of the kind \"""" + kind + ""\""."", Project.MSG_VERBOSE); element = new ProcessedBinaryClassPathEntry(); element.kind = kind; element.path = item; element.exported = exported; element.sourcepath = source; element.javadoc_location = javadoc_location; entries.addElement(element); } else { task.log(""Updating binary dependency \"""" + item + ""\"" of the kind \"""" + kind + ""\""."", Project.MSG_VERBOSE); element.kind = kind; element.path = item; element.exported = exported; element.sourcepath = source; element.javadoc_location = javadoc_location; } } } private void writeProcessedBinaryClassPathEntries(XmlWriter writer, Vector entries) throws IOException { for (int i = 0, size = entries.size(); i != size; ++i) { ProcessedBinaryClassPathEntry element = (ProcessedBinaryClassPathEntry) entries .get(i); task.log(""Adding binary dependency \"""" + element.path + ""\"" of the kind \"""" + element.kind + ""\""."", Project.MSG_VERBOSE); openClassPathEntry(writer, element.kind, element.path); if (element.exported) writer.appendAttribute(""exported"", ""true""); if (element.sourcepath != null) writer.appendAttribute(""sourcepath"", element.sourcepath); if (element.javadoc_location != null) { writer.closeOpeningTag(); writer.openElement(""attributes""); writer.openOpeningTag(""attribute""); writer.appendAttribute(""value"", element.javadoc_location); writer.appendAttribute(""name"", ""javadoc_location""); writer.closeDegeneratedElement(); writer.closeElement(""attributes""); writer.closeElement(""classpathentry""); } else writer.closeDegeneratedElement(); } } private void generateOutputClassPathEntry(XmlWriter writer) throws IOException { ClassPathEntryOutputElement output = task.getEclipse().getClassPath().getOutput(); if (output == null) { task .log(""No output found, the current directory added."", Project.MSG_VERBOSE); output = new ClassPathEntryOutputElement(); } output.validate(); String path = cutBaseDirectory(output.getPath(), task.getProject().getBaseDir() .getAbsolutePath()); task.log(""Adding output into \"""" + path + ""\""."", Project.MSG_VERBOSE); openClassPathEntry(writer, ""output"", path); writer.closeDegeneratedElement(); } private void openClassPathEntry(XmlWriter writer, String kind, String path) throws IOException { writer.openOpeningTag(""classpathentry""); writer.appendAttribute(""kind"", kind); writer.appendAttribute(""path"", path); } private String cutBaseDirectory(String path, String base) { if (!path.startsWith(base)) return path; task.log(""Cutting base directory \"""" + base + ""\"" from the path \"""" + path + ""\""."", Project.MSG_VERBOSE); return path.substring(base.length() + 1); } private void checkClassPathEntries(ClassPathElement classPath) { if (task.getEclipse().getMode().getIndex() == EclipseElement.Mode.ASPECTJ && getClassPathEntry(classPath.getVariables(), ""ASPECTJRT_LIB"") == null) { ClassPathEntryVariableElement variable = classPath.createVariable(); variable.setPath(""ASPECTJRT_LIB""); variable.setSource(""ASPECTJRT_SRC""); } } private static ClassPathEntryElement getClassPathEntry(Vector entries, String path) { for (int i = 0, size = entries.size(); i != size; ++i) { ClassPathEntryElement entry = (ClassPathEntryElement) entries.get(i); if (path.equals(entry.getPath())) return entry; } return null; } private static ProcessedBinaryClassPathEntry getProcessedBinaryClassPathEntry( Vector entries, String path) { for (int i = 0, size = entries.size(); i < size; ++i) { ProcessedBinaryClassPathEntry entry = (ProcessedBinaryClassPathEntry) entries .get(i); if (entry.path.equals(path)) return entry; } return null; } } ",0 "'Twig_' => array($vendorDir . '/twig/twig/lib'), 'Symfony\\Component\\Icu\\' => array($vendorDir . '/symfony/icu'), 'Symfony\\Bundle\\SwiftmailerBundle' => array($vendorDir . '/symfony/swiftmailer-bundle'), 'Symfony\\Bundle\\MonologBundle' => array($vendorDir . '/symfony/monolog-bundle'), 'Symfony\\Bundle\\AsseticBundle' => array($vendorDir . '/symfony/assetic-bundle'), 'Symfony\\' => array($vendorDir . '/symfony/symfony/src'), 'Sensio\\Bundle\\GeneratorBundle' => array($vendorDir . '/sensio/generator-bundle'), 'Sensio\\Bundle\\FrameworkExtraBundle' => array($vendorDir . '/sensio/framework-extra-bundle'), 'Sensio\\Bundle\\DistributionBundle' => array($vendorDir . '/sensio/distribution-bundle'), 'Psr\\Log\\' => array($vendorDir . '/psr/log'), 'PHPExcel' => array($vendorDir . '/phpoffice/phpexcel/Classes'), 'Gregwar\\CaptchaBundle' => array($vendorDir . '/gregwar/captcha-bundle'), 'Gregwar\\Captcha' => array($vendorDir . '/gregwar/captcha'), 'Doctrine\\ORM\\' => array($vendorDir . '/doctrine/orm/lib'), 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'), 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib'), 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'), 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib'), 'Doctrine\\Bundle\\DoctrineBundle' => array($vendorDir . '/doctrine/doctrine-bundle'), 'Assetic' => array($vendorDir . '/kriswallsmith/assetic/src'), array($baseDir . '/src') ); ",0 "n 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. */ package com.intellij.debugger.impl; import com.intellij.util.EventDispatcher; import org.jetbrains.annotations.NotNull; /** * Created by IntelliJ IDEA. * User: lex * Date: Jun 4, 2003 * Time: 12:45:56 PM * To change this template use Options | File Templates. */ public abstract class DebuggerStateManager { private final EventDispatcher myEventDispatcher = EventDispatcher.create(DebuggerContextListener.class); @NotNull public abstract DebuggerContextImpl getContext(); public abstract void setState(@NotNull DebuggerContextImpl context, DebuggerSession.State state, DebuggerSession.Event event, String description); //we allow add listeners inside DebuggerContextListener.changeEvent public void addListener(DebuggerContextListener listener){ myEventDispatcher.addListener(listener); } //we allow remove listeners inside DebuggerContextListener.changeEvent public void removeListener(DebuggerContextListener listener){ myEventDispatcher.removeListener(listener); } protected void fireStateChanged(@NotNull DebuggerContextImpl newContext, DebuggerSession.Event event) { myEventDispatcher.getMulticaster().changeEvent(newContext, event); } } ",0 "ref=""../../../../doc/src/boostbook.css"" type=""text/css"">
        Home Libraries People FAQ More

        Function template join_if

        boost::algorithm::join_if — Conditional join algorithm.

        Synopsis

        // In header: <boost/algorithm/string/regex.hpp>
        
        
        template<typename SequenceSequenceT, typename Range1T, typename CharT, 
                 typename RegexTraitsT> 
          range_value< SequenceSequenceT >::type 
          join_if(const SequenceSequenceT & Input, const Range1T & Separator, 
                  const basic_regex< CharT, RegexTraitsT > & Rx, 
                  match_flag_type Flags = match_default);

        Description

        This algorithm joins all strings in a 'list' into one long string. Segments are concatenated by given separator. Only segments that match the given regular expression will be added to the result

        This is a specialization of join_if algorithm.

        Note

        This function provides the strong exception-safety guarantee

        Parameters:

        Flags

        Regex options

        Input

        A container that holds the input strings. It must be a container-of-containers.

        Rx

        A regular expression

        Separator

        A string that will separate the joined segments.

        Returns:

        Concatenated string.

        Copyright © 2002-2004 Pavol Droba

        Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


        ",0 "; main() { char line[MAXLINE]; int found = 0; while (getlinee(line, MAXLINE) > 0) if ( strindex(line, pattern) >= 0) { printf(""%s"", line); found++; } return found; } int getlinee(char s[], int lim) { int c,i; i = 0; while (--lim > 0 && (c = getchar()) != 'q' && c != '\n') s[i++] = c; if (c == '\n') s[i++] = c; s[i] = '\0'; return i; } int strindex(char s[], char t[]) { int i, j, k; for (i = 0; s[i] != '\0'; i++) { for (j=i, k=0; t[k] != '\0' && s[j] == t[k]; j++, k++) if (k > 0 && t[k] == '\0') return i; } return -1; } ",0 "import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.OneToMany; import javax.persistence.OrderBy; import javax.persistence.Table; import org.guess.core.orm.IdEntity; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * 索引对象Entity * @author Joe.zhang * @version 2015-12-08 */ @Entity @Table(name = ""meta_dbindex"") @JsonIgnoreProperties(value = {""hibernateLazyInitializer"",""handler"", ""columns""}) @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class DBIndex extends IdEntity { /** * 数据表 */ @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, targetEntity = DBTable.class) @JoinTable(name = ""meta_table_index"", joinColumns = { @JoinColumn(name = ""index_id"") }, inverseJoinColumns = { @JoinColumn(name = ""table_id"") }) @JsonIgnoreProperties(value = { ""hibernateLazyInitializer"",""handler"",""datasource""}) @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) private Set tables = new HashSet(0); /** * 索引库名 */ @Column(name=""index_name"") private String index_name; /** * 索引表名 */ @Column(name=""type_name"") private String type_name; /** * 索引类别 */ @Column(name=""index_type"") private Integer indexType; /** * 建立者 */ @Column(name=""createby_id"") private Long createbyId; /** * 更新者 */ @Column(name=""updateby_id"") private Long updatebyId; /** * 建立世间 */ @Column(name=""create_date"") private Date createDate; /** * 更新世间 */ @Column(name=""update_date"") private Date updateDate; /** * 备注 */ @Column(name=""remark"") private String remark; @OneToMany(targetEntity = DbColumn.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL,mappedBy=""dbindex"") @OrderBy(""id ASC"") private Set columns; @Column(name=""check_label"") private Integer checkLabel; public Integer getCheckLabel() { return checkLabel; } public void setCheckLabel(Integer checkLabel) { this.checkLabel = checkLabel; } public Set getTables() { return tables; } public void setTables(Set tables) { this.tables = tables; } public String getIndex_name() { return index_name; } public void setIndex_name(String index_name) { this.index_name = index_name; } public String getType_name() { return type_name; } public void setType_name(String type_name) { this.type_name = type_name; } public Integer getIndexType() { return indexType; } public void setIndexType(Integer indexType) { this.indexType = indexType; } public Long getCreatebyId() { return createbyId; } public void setCreatebyId(Long createbyId) { this.createbyId = createbyId; } public Set getColumns() { return columns; } public void setColumns(Set columns) { this.columns = columns; } public Long getUpdatebyId() { return updatebyId; } public void setUpdatebyId(Long updatebyId) { this.updatebyId = updatebyId; } public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } public Date getUpdateDate() { return updateDate; } public void setUpdateDate(Date updateDate) { this.updateDate = updateDate; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } }",0 "nux/sched.h> #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include ""xen-ops.h"" #include ""vdso.h"" /* These are code, but not functions. Defined in entry.S */ extern const char xen_hypervisor_callback[]; extern const char xen_failsafe_callback[]; extern void xen_sysenter_target(void); extern void xen_syscall_target(void); extern void xen_syscall32_target(void); /* Amount of extra memory space we add to the e820 ranges */ phys_addr_t xen_extra_mem_start, xen_extra_mem_size; /* * The maximum amount of extra memory compared to the base size. The * main scaling factor is the size of struct page. At extreme ratios * of base:extra, all the base memory can be filled with page * structures for the extra memory, leaving no space for anything * else. * * 10x seems like a reasonable balance between scaling flexibility and * leaving a practically usable system. */ #define EXTRA_MEM_RATIO (10) static void __init xen_add_extra_mem(unsigned long pages) { unsigned long pfn; u64 size = (u64)pages * PAGE_SIZE; u64 extra_start = xen_extra_mem_start + xen_extra_mem_size; if (!pages) return; e820_add_region(extra_start, size, E820_RAM); sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); memblock_reserve(extra_start, size); xen_extra_mem_size += size; xen_max_p2m_pfn = PFN_DOWN(extra_start + size); for (pfn = PFN_DOWN(extra_start); pfn <= xen_max_p2m_pfn; pfn++) __set_phys_to_machine(pfn, INVALID_P2M_ENTRY); } static unsigned long __init xen_release_chunk(phys_addr_t start_addr, phys_addr_t end_addr) { struct xen_memory_reservation reservation = { .address_bits = 0, .extent_order = 0, .domid = DOMID_SELF }; unsigned long start, end; unsigned long len = 0; unsigned long pfn; int ret; start = PFN_UP(start_addr); end = PFN_DOWN(end_addr); if (end <= start) return 0; printk(KERN_INFO ""xen_release_chunk: looking at area pfn %lx-%lx: "", start, end); for(pfn = start; pfn < end; pfn++) { unsigned long mfn = pfn_to_mfn(pfn); /* Make sure pfn exists to start with */ if (mfn == INVALID_P2M_ENTRY || mfn_to_pfn(mfn) != pfn) continue; set_xen_guest_handle(reservation.extent_start, &mfn); reservation.nr_extents = 1; ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation); WARN(ret != 1, ""Failed to release memory %lx-%lx err=%d\n"", start, end, ret); if (ret == 1) { __set_phys_to_machine(pfn, INVALID_P2M_ENTRY); len++; } } printk(KERN_CONT ""%ld pages freed\n"", len); return len; } static unsigned long __init xen_return_unused_memory(unsigned long max_pfn, const struct e820map *e820) { phys_addr_t max_addr = PFN_PHYS(max_pfn); phys_addr_t last_end = ISA_END_ADDRESS; unsigned long released = 0; int i; /* Free any unused memory above the low 1Mbyte. */ for (i = 0; i < e820->nr_map && last_end < max_addr; i++) { phys_addr_t end = e820->map[i].addr; end = min(max_addr, end); if (last_end < end) released += xen_release_chunk(last_end, end); last_end = max(last_end, e820->map[i].addr + e820->map[i].size); } if (last_end < max_addr) released += xen_release_chunk(last_end, max_addr); printk(KERN_INFO ""released %ld pages of unused memory\n"", released); return released; } static unsigned long __init xen_set_identity(const struct e820entry *list, ssize_t map_size) { phys_addr_t last = xen_initial_domain() ? 0 : ISA_END_ADDRESS; phys_addr_t start_pci = last; const struct e820entry *entry; unsigned long identity = 0; int i; for (i = 0, entry = list; i < map_size; i++, entry++) { phys_addr_t start = entry->addr; phys_addr_t end = start + entry->size; if (start < last) start = last; if (end <= start) continue; /* Skip over the 1MB region. */ if (last > end) continue; if ((entry->type == E820_RAM) || (entry->type == E820_UNUSABLE)) { if (start > start_pci) identity += set_phys_range_identity( PFN_UP(start_pci), PFN_DOWN(start)); /* Without saving 'last' we would gooble RAM too * at the end of the loop. */ last = end; start_pci = end; continue; } start_pci = min(start, start_pci); last = end; } if (last > start_pci) identity += set_phys_range_identity( PFN_UP(start_pci), PFN_DOWN(last)); return identity; } static unsigned long __init xen_get_max_pages(void) { unsigned long max_pages = MAX_DOMAIN_PAGES; domid_t domid = DOMID_SELF; int ret; /* * For the initial domain we use the maximum reservation as * the maximum page. * * For guest domains the current maximum reservation reflects * the current maximum rather than the static maximum. In this * case the e820 map provided to us will cover the static * maximum region. */ if (xen_initial_domain()) { ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid); if (ret > 0) max_pages = ret; } return min(max_pages, MAX_DOMAIN_PAGES); } /** * machine_specific_memory_setup - Hook for machine specific memory setup. **/ char * __init xen_memory_setup(void) { static struct e820entry map[E820MAX] __initdata; static struct e820entry map_raw[E820MAX] __initdata; unsigned long max_pfn = xen_start_info->nr_pages; unsigned long long mem_end; int rc; struct xen_memory_map memmap; unsigned long extra_pages = 0; unsigned long extra_limit; unsigned long identity_pages = 0; int i; int op; max_pfn = min(MAX_DOMAIN_PAGES, max_pfn); mem_end = PFN_PHYS(max_pfn); memmap.nr_entries = E820MAX; set_xen_guest_handle(memmap.buffer, map); op = xen_initial_domain() ? XENMEM_machine_memory_map : XENMEM_memory_map; rc = HYPERVISOR_memory_op(op, &memmap); if (rc == -ENOSYS) { BUG_ON(xen_initial_domain()); memmap.nr_entries = 1; map[0].addr = 0ULL; map[0].size = mem_end; /* 8MB slack (to balance backend allocations). */ map[0].size += 8ULL << 20; map[0].type = E820_RAM; rc = 0; } BUG_ON(rc); memcpy(map_raw, map, sizeof(map)); e820.nr_map = 0; xen_extra_mem_start = mem_end; for (i = 0; i < memmap.nr_entries; i++) { unsigned long long end; /* Guard against non-page aligned E820 entries. */ if (map[i].type == E820_RAM) map[i].size -= (map[i].size + map[i].addr) % PAGE_SIZE; end = map[i].addr + map[i].size; if (map[i].type == E820_RAM && end > mem_end) { /* RAM off the end - may be partially included */ u64 delta = min(map[i].size, end - mem_end); map[i].size -= delta; end -= delta; extra_pages += PFN_DOWN(delta); /* * Set RAM below 4GB that is not for us to be unusable. * This prevents ""System RAM"" address space from being * used as potential resource for I/O address (happens * when 'allocate_resource' is called). */ if (delta && (xen_initial_domain() && end < 0x100000000ULL)) e820_add_region(end, delta, E820_UNUSABLE); } if (map[i].size > 0 && end > xen_extra_mem_start) xen_extra_mem_start = end; /* Add region if any remains */ if (map[i].size > 0) e820_add_region(map[i].addr, map[i].size, map[i].type); } /* Align the balloon area so that max_low_pfn does not get set * to be at the _end_ of the PCI gap at the far end (fee01000). * Note that xen_extra_mem_start gets set in the loop above to be * past the last E820 region. */ if (xen_initial_domain() && (xen_extra_mem_start < (1ULL<<32))) xen_extra_mem_start = (1ULL<<32); /* * In domU, the ISA region is normal, usable memory, but we * reserve ISA memory anyway because too many things poke * about in there. * * In Dom0, the host E820 information can leave gaps in the * ISA range, which would cause us to release those pages. To * avoid this, we unconditionally reserve them here. */ e820_add_region(ISA_START_ADDRESS, ISA_END_ADDRESS - ISA_START_ADDRESS, E820_RESERVED); /* * Reserve Xen bits: * - mfn_list * - xen_start_info * See comment above ""struct start_info"" in */ memblock_reserve(__pa(xen_start_info->mfn_list), xen_start_info->pt_base - xen_start_info->mfn_list); sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); extra_limit = xen_get_max_pages(); if (max_pfn + extra_pages > extra_limit) { if (extra_limit > max_pfn) extra_pages = extra_limit - max_pfn; else extra_pages = 0; } extra_pages += xen_return_unused_memory(xen_start_info->nr_pages, &e820); /* * Clamp the amount of extra memory to a EXTRA_MEM_RATIO * factor the base size. On non-highmem systems, the base * size is the full initial memory allocation; on highmem it * is limited to the max size of lowmem, so that it doesn't * get completely filled. * * In principle there could be a problem in lowmem systems if * the initial memory is also very large with respect to * lowmem, but we won't try to deal with that here. */ extra_limit = min(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)), max_pfn + extra_pages); if (extra_limit >= max_pfn) extra_pages = extra_limit - max_pfn; else extra_pages = 0; xen_add_extra_mem(extra_pages); /* * Set P2M for all non-RAM pages and E820 gaps to be identity * type PFNs. We supply it with the non-sanitized version * of the E820. */ identity_pages = xen_set_identity(map_raw, memmap.nr_entries); printk(KERN_INFO ""Set %ld page(s) to 1-1 mapping.\n"", identity_pages); return ""Xen""; } /* * Set the bit indicating ""nosegneg"" library variants should be used. * We only need to bother in pure 32-bit mode; compat 32-bit processes * can have un-truncated segments, so wrapping around is allowed. */ static void __init fiddle_vdso(void) { #ifdef CONFIG_X86_32 u32 *mask; mask = VDSO32_SYMBOL(&vdso32_int80_start, NOTE_MASK); *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT; mask = VDSO32_SYMBOL(&vdso32_sysenter_start, NOTE_MASK); *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT; #endif } static int __cpuinit register_callback(unsigned type, const void *func) { struct callback_register callback = { .type = type, .address = XEN_CALLBACK(__KERNEL_CS, func), .flags = CALLBACKF_mask_events, }; return HYPERVISOR_callback_op(CALLBACKOP_register, &callback); } void __cpuinit xen_enable_sysenter(void) { int ret; unsigned sysenter_feature; #ifdef CONFIG_X86_32 sysenter_feature = X86_FEATURE_SEP; #else sysenter_feature = X86_FEATURE_SYSENTER32; #endif if (!boot_cpu_has(sysenter_feature)) return; ret = register_callback(CALLBACKTYPE_sysenter, xen_sysenter_target); if(ret != 0) setup_clear_cpu_cap(sysenter_feature); } void __cpuinit xen_enable_syscall(void) { #ifdef CONFIG_X86_64 int ret; ret = register_callback(CALLBACKTYPE_syscall, xen_syscall_target); if (ret != 0) { printk(KERN_ERR ""Failed to set syscall callback: %d\n"", ret); /* Pretty fatal; 64-bit userspace has no other mechanism for syscalls. */ } if (boot_cpu_has(X86_FEATURE_SYSCALL32)) { ret = register_callback(CALLBACKTYPE_syscall32, xen_syscall32_target); if (ret != 0) setup_clear_cpu_cap(X86_FEATURE_SYSCALL32); } #endif /* CONFIG_X86_64 */ } void __init xen_arch_setup(void) { xen_panic_handler_init(); HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments); HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_writable_pagetables); if (!xen_feature(XENFEAT_auto_translated_physmap)) HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_pae_extended_cr3); if (register_callback(CALLBACKTYPE_event, xen_hypervisor_callback) || register_callback(CALLBACKTYPE_failsafe, xen_failsafe_callback)) BUG(); xen_enable_sysenter(); xen_enable_syscall(); #ifdef CONFIG_ACPI if (!(xen_start_info->flags & SIF_INITDOMAIN)) { printk(KERN_INFO ""ACPI in unprivileged domain disabled\n""); disable_acpi(); } #endif memcpy(boot_command_line, xen_start_info->cmd_line, MAX_GUEST_CMDLINE > COMMAND_LINE_SIZE ? COMMAND_LINE_SIZE : MAX_GUEST_CMDLINE); /* Set up idle, making sure it calls safe_halt() pvop */ #ifdef CONFIG_X86_32 boot_cpu_data.hlt_works_ok = 1; #endif disable_cpuidle(); boot_option_idle_override = IDLE_HALT; fiddle_vdso(); #ifdef CONFIG_NUMA numa_off = 1; #endif } ",0 "R=""FFFFFF"">

        MPI_Ibsend

        Starts a nonblocking buffered send

        Synopsis

        int MPI_Ibsend(void *buf, int count, MPI_Datatype datatype, int dest, int tag, 
                       MPI_Comm comm, MPI_Request *request)
        

        Input Parameters

        buf
        initial address of send buffer (choice)
        count
        number of elements in send buffer (integer)
        datatype
        datatype of each send buffer element (handle)
        dest
        rank of destination (integer)
        tag
        message tag (integer)
        comm
        communicator (handle)

        Output Parameter

        request
        communication request (handle)

        Thread and Interrupt Safety

        This routine is thread-safe. This means that this routine may be safely used by multiple threads without the need for any user-provided thread locks. However, the routine is not interrupt safe. Typically, this is due to the use of memory allocation routines such as malloc or other non-MPICH runtime routines that are themselves not interrupt-safe.

        Notes for Fortran

        All MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK) have an additional argument ierr at the end of the argument list. ierr is an integer and has the same meaning as the return value of the routine in C. In Fortran, MPI routines are subroutines, and are invoked with the call statement.

        All MPI objects (e.g., MPI_Datatype, MPI_Comm) are of type INTEGER in Fortran.

        Errors

        All MPI routines (except MPI_Wtime and MPI_Wtick) return an error value; C routines as the value of the function and Fortran routines in the last argument. Before the value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job. The error handler may be changed with MPI_Comm_set_errhandler (for communicators), MPI_File_set_errhandler (for files), and MPI_Win_set_errhandler (for RMA windows). The MPI-1 routine MPI_Errhandler_set may be used but its use is deprecated. The predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarentee that an MPI program can continue past an error; however, MPI implementations will attempt to continue whenever possible.

        MPI_SUCCESS
        No error; MPI routine completed successfully.
        MPI_ERR_COMM
        Invalid communicator. A common error is to use a null communicator in a call (not even allowed in MPI_Comm_rank).
        MPI_ERR_COUNT
        Invalid count argument. Count arguments must be non-negative; a count of zero is often valid.
        MPI_ERR_TYPE
        Invalid datatype argument. May be an uncommitted MPI_Datatype (see MPI_Type_commit).
        MPI_ERR_TAG
        Invalid tag argument. Tags must be non-negative; tags in a receive (MPI_Recv, MPI_Irecv, MPI_Sendrecv, etc.) may also be MPI_ANY_TAG. The largest tag value is available through the the attribute MPI_TAG_UB.
        MPI_ERR_RANK
        Invalid source or destination rank. Ranks must be between zero and the size of the communicator minus one; ranks in a receive (MPI_Recv, MPI_Irecv, MPI_Sendrecv, etc.) may also be MPI_ANY_SOURCE.
        MPI_ERR_BUFFER
        Invalid buffer pointer. Usually a null buffer where one is not valid.

        Location:ibsend.c

        ",0 "ework.impl.GLGraphics; import com.androidgames.framework.math.Vector2; public class SpriteBatcher { final float[] verticesBuffer; int bufferIndex; final Vertices vertices; int numSprites; public SpriteBatcher(GLGraphics glGraphics, int maxSprites) { this.verticesBuffer = new float[maxSprites*4*4]; this.vertices = new Vertices(glGraphics, maxSprites*4, maxSprites*6, false, true); this.bufferIndex = 0; this.numSprites = 0; short[] indices = new short[maxSprites*6]; int len = indices.length; short j = 0; for (int i = 0; i < len; i += 6, j += 4) { indices[i + 0] = (short)(j + 0); indices[i + 1] = (short)(j + 1); indices[i + 2] = (short)(j + 2); indices[i + 3] = (short)(j + 2); indices[i + 4] = (short)(j + 3); indices[i + 5] = (short)(j + 0); } vertices.setIndices(indices, 0, indices.length); } public void beginBatch(Texture texture) { texture.bind(); numSprites = 0; bufferIndex = 0; } public void endBatch() { vertices.setVertices(verticesBuffer, 0, bufferIndex); vertices.bind(); vertices.draw(GL10.GL_TRIANGLES, 0, numSprites * 6); vertices.unbind(); } public void drawSprite(float x, float y, float width, float height, TextureRegion region) { float halfWidth = width / 2; float halfHeight = height / 2; float x1 = x - halfWidth; float y1 = y - halfHeight; float x2 = x + halfWidth; float y2 = y + halfHeight; verticesBuffer[bufferIndex++] = x1; verticesBuffer[bufferIndex++] = y1; verticesBuffer[bufferIndex++] = region.u1; verticesBuffer[bufferIndex++] = region.v2; verticesBuffer[bufferIndex++] = x2; verticesBuffer[bufferIndex++] = y1; verticesBuffer[bufferIndex++] = region.u2; verticesBuffer[bufferIndex++] = region.v2; verticesBuffer[bufferIndex++] = x2; verticesBuffer[bufferIndex++] = y2; verticesBuffer[bufferIndex++] = region.u2; verticesBuffer[bufferIndex++] = region.v1; verticesBuffer[bufferIndex++] = x1; verticesBuffer[bufferIndex++] = y2; verticesBuffer[bufferIndex++] = region.u1; verticesBuffer[bufferIndex++] = region.v1; numSprites++; } public void drawSprite(float x, float y, float width, float height, float angle, TextureRegion region) { float halfWidth = width / 2; float halfHeight = height / 2; float rad = angle * Vector2.TO_RADIANS; float cos = FloatMath.cos(rad); float sin = FloatMath.sin(rad); float x1 = -halfWidth * cos - (-halfHeight) * sin; float y1 = -halfWidth * sin + (-halfHeight) * cos; float x2 = halfWidth * cos - (-halfHeight) * sin; float y2 = halfWidth * sin + (-halfHeight) * cos; float x3 = halfWidth * cos - halfHeight * sin; float y3 = halfWidth * sin + halfHeight * cos; float x4 = -halfWidth * cos - halfHeight * sin; float y4 = -halfWidth * sin + halfHeight * cos; x1 += x; y1 += y; x2 += x; y2 += y; x3 += x; y3 += y; x4 += x; y4 += y; verticesBuffer[bufferIndex++] = x1; verticesBuffer[bufferIndex++] = y1; verticesBuffer[bufferIndex++] = region.u1; verticesBuffer[bufferIndex++] = region.v2; verticesBuffer[bufferIndex++] = x2; verticesBuffer[bufferIndex++] = y2; verticesBuffer[bufferIndex++] = region.u2; verticesBuffer[bufferIndex++] = region.v2; verticesBuffer[bufferIndex++] = x3; verticesBuffer[bufferIndex++] = y3; verticesBuffer[bufferIndex++] = region.u2; verticesBuffer[bufferIndex++] = region.v1; verticesBuffer[bufferIndex++] = x4; verticesBuffer[bufferIndex++] = y4; verticesBuffer[bufferIndex++] = region.u1; verticesBuffer[bufferIndex++] = region.v1; numSprites++; } } ",0 "

        Erkannte Version:


        Schemavalidierung

        Die gewählte ebInterface Instanz entspricht den Vorgaben des ebInterface Schemas.


        Schemavalidierung

        Die gewählte ebInterface Instanz entspricht nicht den Vorgaben des ebInterface Schemas.

        Fehlerdetails:


        Validierung der XML Signatur

        Signatur
        Zertifikat:
        Manifest:

        Schematronvalidierung

        Die gewählte ebInterface Instanz verletzt keine der Schematronregeln


        Schematronvalidierung

        Die gewählte ebInterface Instanz verletzt Schematron Regeln:


        ZUGFeRD-Konvertierung

        ",0 "rg/1999/xhtml""> V8 API Reference Guide for node.js v7.2.1: v8::Maybe< T > Class Template Reference
        V8 API Reference Guide for node.js v7.2.1
        v8::Maybe< T > Class Template Reference

        #include <v8.h>

        Public Member Functions

        V8_INLINE bool IsNothing () const
         
        V8_INLINE bool IsJust () const
         
        V8_INLINE T ToChecked () const
         
        V8_WARN_UNUSED_RESULT V8_INLINE bool To (T *out) const
         
        V8_INLINE T FromJust () const
         
        V8_INLINE T FromMaybe (const T &default_value) const
         
        V8_INLINE bool operator== (const Maybe &other) const
         
        V8_INLINE bool operator!= (const Maybe &other) const
         

        Friends

        template<class U >
        Maybe< U > Nothing ()
         
        template<class U >
        Maybe< U > Just (const U &u)
         

        Detailed Description

        template<class T>
        class v8::Maybe< T >

        A simple Maybe type, representing an object which may or may not have a value, see https://hackage.haskell.org/package/base/docs/Data-Maybe.html.

        If an API method returns a Maybe<>, the API method can potentially fail either because an exception is thrown, or because an exception is pending, e.g. because a previous API call threw an exception that hasn't been caught yet, or because a TerminateExecution exception was thrown. In that case, a ""Nothing"" value is returned.


        The documentation for this class was generated from the following file:
        • deps/v8/include/v8.h

        Generated by   1.8.11
        ",0 "order=""0"" cellspacing=""0"" cellpadding=""0"" height=""48"" width=""100%""> phpQuery [ class tree: phpQuery ] [ index: phpQuery ] [ all elements ]
        Packages:
        phpQuery


        Files:

        Classes:

        Class: phpQueryEvents

        Source Location: /phpQueryEvents.php

        Class Overview


        Event handling class.


        Author(s):

        • Tobiasz Cudnik

        Methods



        Class Details

        [line 9]
        Event handling class.



        Tags:

        author:   Tobiasz Cudnik
        abstract:  


        [ Top ]


        Class Methods


        static method add [line 96]

        static void add( DOMNode|phpQueryObject|string $document, $node, unknown_type $type, unknown_type $data, [unknown_type $callback = null])

        Binds a handler to one or more events (like click) for each matched element.

        Can also bind custom events.




        Tags:

        TODO:   support binding to global events
        TODO:   support '!' (exclusive) events
        TODO:   support more than event in $type (space-separated)
        access:   public


        Parameters:

        DOMNode|phpQueryObject|string   $document  
        unknown_type   $type  
        unknown_type   $data   Optional
        unknown_type   $callback  
           $node  

        [ Top ]

        static method getNode [line 136]

        static void getNode( $documentID, $node)



        Tags:

        access:   protected


        Parameters:

           $documentID  
           $node  

        [ Top ]

        static method issetGlobal [line 148]

        static void issetGlobal( $documentID, $type)



        Tags:

        access:   protected


        Parameters:

           $documentID  
           $type  

        [ Top ]

        static method remove [line 123]

        static void remove( DOMNode|phpQueryObject|string $document, $node, [unknown_type $type = null], [unknown_type $callback = null])

        Enter description here...



        Tags:

        TODO:   support more than event in $type (space-separated)
        TODO:   namespace events
        access:   public


        Parameters:

        DOMNode|phpQueryObject|string   $document  
        unknown_type   $type  
        unknown_type   $callback  
           $node  

        [ Top ]

        static method setNode [line 142]

        static void setNode( $documentID, $node)



        Tags:

        access:   protected


        Parameters:

           $documentID  
           $node  

        [ Top ]

        static method trigger [line 21]

        static void trigger( DOMNode|phpQueryObject|string $document, unknown_type $type, [unknown_type $data = array()], [ $node = null])

        Trigger a type of event on every matched element.



        Tags:

        TODO:   support more than event in $type (space-separated)
        TODO:   exclusive events (with !)
        TODO:   global events (test)
        access:   public


        Parameters:

        DOMNode|phpQueryObject|string   $document  
        unknown_type   $type  
        unknown_type   $data  
           $node  

        [ Top ]


        Documentation generated on Tue, 18 Nov 2008 19:39:26 +0100 by phpDocumentor 1.4.2
        ",0 "ompliance 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. */ package com.codeabovelab.dm.common.utils; import java.util.function.Function; import java.util.function.IntPredicate; import java.util.function.Supplier; import java.util.regex.Matcher; import java.util.regex.Pattern; /** */ public class StringUtils { private StringUtils() { } public static String before(String s, char c) { return beforeOr(s, c, () -> { // we throw exception for preserve old behavior throw new IllegalArgumentException(""String '"" + s + ""' must contains '"" + c + ""'.""); }); } /** * Return part of 's' before 'c' * @param s string which may contain char 'c' * @param c char * @param ifNone supplier of value which is used when 'c' is not present in 's' (null not allowed) * @return part of 's' before 'c' or 'ifNone.get()' */ public static String beforeOr(String s, char c, Supplier ifNone) { int pos = s.indexOf(c); if(pos < 0) { return ifNone.get(); } return s.substring(0, pos); } public static String after(String s, char c) { int pos = s.indexOf(c); if(pos < 0) { throw new IllegalArgumentException(""String '"" + s + ""' must contains '"" + c + ""'.""); } return s.substring(pos + 1); } public static String beforeLast(String s, char c) { int pos = s.lastIndexOf(c); if(pos < 0) { throw new IllegalArgumentException(""String '"" + s + ""' must contains '"" + c + ""'.""); } return s.substring(0, pos); } public static String afterLast(String s, char c) { int pos = s.lastIndexOf(c); if(pos < 0) { throw new IllegalArgumentException(""String '"" + s + ""' must contains '"" + c + ""'.""); } return s.substring(pos + 1); } /** * Split string into two pieces at last appearing of delimiter. * @param s string * @param c delimiter * @return null if string does not contains delimiter */ public static String[] splitLast(String s, char c) { int pos = s.lastIndexOf(c); if(pos < 0) { return null; } return new String[] {s.substring(0, pos), s.substring(pos + 1)}; } /** * Split string into two pieces at last appearing of delimiter. * @param s string * @param delimiter delimiter * @return null if string does not contains delimiter */ public static String[] splitLast(String s, String delimiter) { int pos = s.lastIndexOf(delimiter); if(pos < 0) { return null; } return new String[] {s.substring(0, pos), s.substring(pos + delimiter.length())}; } /** * Return string which contains only chars for which charJudge give true. * @param src source string, may be null * @param charJudge predicate which consume codePoint (not chars) * @return string, null when incoming string is null */ public static String retain(String src, IntPredicate charJudge) { if (src == null) { return null; } final int length = src.length(); StringBuilder sb = new StringBuilder(length); for (int i = 0; i < length; i++) { int cp = src.codePointAt(i); if(charJudge.test(cp)) { sb.appendCodePoint(cp); } } return sb.toString(); } /** * Retain only characters which is {@link #isAz09(int)} * @param src source string, may be null * @return string, null when incoming string is null */ public static String retainAz09(String src) { return retain(src, StringUtils::isAz09); } /** * Retain chars which is acceptable as file name or part of url on most operation systems.

        * It: 'A'-'z', '0'-'9', '_', '-', '.' * @param src source string, may be null * @return string, null when incoming string is null */ public static String retainForFileName(String src) { return retain(src, StringUtils::isAz09); } /** * Test that specified codePoint is an ASCII letter or digit * @param cp codePoint * @return true for specified chars */ public static boolean isAz09(int cp) { return cp >= '0' && cp <= '9' || cp >= 'a' && cp <= 'z' || cp >= 'A' && cp <= 'Z'; } /** * Test that specified codePoint is an ASCII letter, digit or hyphen '-'. * @param cp codePoint * @return true for specified chars */ public static boolean isAz09Hyp(int cp) { return isAz09(cp) || cp == '-'; } /** * Test that specified codePoint is an ASCII letter, digit or hyphen '-', '_', ':', '.'.

        * It common matcher that limit alphabet acceptable for our system IDs. * @param cp codePoint * @return true for specified chars */ public static boolean isId(int cp) { return isAz09(cp) || cp == '-' || cp == '_' || cp == ':' || cp == '.'; } public static boolean isHex(int cp) { return cp >= '0' && cp <= '9' || cp >= 'a' && cp <= 'f' || cp >= 'A' && cp <= 'F'; } /** * Chars which is acceptable as file name or part of url on most operation systems.

        * It: 'A'-'z', '0'-'9', '_', '-', '.' * @param cp codePoint * @return true for specified chars */ public static boolean isForFileName(int cp) { return isAz09(cp) || cp == '-' || cp == '_' || cp == '.'; } /** * Invoke {@link Object#toString()} on specified argument, if arg is null then return null. * @param o * @return null or result of o.toString() */ public static String valueOf(Object o) { return o == null? null : o.toString(); } /** * Test that each char of specified string match for predicate.

        * Note that it method does not support unicode, because it usual applicable only for match letters that placed under 128 code. * @param str string * @param predicate char matcher * @return true if all chars match */ public static boolean match(String str, IntPredicate predicate) { final int len = str.length(); if(len == 0) { return false; } for(int i = 0; i < len; i++) { if(!predicate.test(str.charAt(i))) { return false; } } return true; } /** * Is a match(str, StringUtils::isAz09);. * @param str string * @return true if string match [A-Za-z0-9]* */ public static boolean matchAz09(String str) { return match(str, StringUtils::isAz09); } /** * Is a match(str, StringUtils::isAz09Hyp);. * @param str string * @return true if string match [A-Za-z0-9-]* */ public static boolean matchAz09Hyp(String str) { return match(str, StringUtils::isAz09Hyp); } /** * Is a match(str, StringUtils::isId);. * @param str string * @return true if string match [A-Za-z0-9-_:.]* */ public static boolean matchId(String str) { return match(str, StringUtils::isId); } public static boolean matchHex(String str) { return match(str, StringUtils::isHex); } /** * Replace string with pattern obtaining replacement values through handler function.

        * Note that it differ from usual Pattern behavior when it process replacement for group references, * this code do nothing with replacement. * @param pattern pattern * @param src source string * @param handler function which take matched part of source string and return replacement value, must never return null * @return result string */ public static String replace(Pattern pattern, String src, Function handler) { StringBuilder sb = null; Matcher matcher = pattern.matcher(src); int pos = 0; while(matcher.find()) { if(sb == null) { // replacement can be a very rare operation, and we not need excess string buffer sb = new StringBuilder(); } String expr = matcher.group(); String replacement = handler.apply(expr); sb.append(src, pos, matcher.start()); sb.append(replacement); pos = matcher.end(); } if(sb == null) { return src; } sb.append(src, pos, src.length()); return sb.toString(); } } ",0 "m.net> * * Based on arch/powerpc/platforms/maple/pci.c * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) #define CONFIG_OFFSET_VALID(off) ((off) < 4096) static void volatile __iomem *pa_pxp_cfg_addr(struct pci_controller *hose, u8 bus, u8 devfn, int offset) { return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); } static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) { struct pci_controller *hose; void volatile __iomem *addr; hose = pci_bus_to_host(bus); if (!hose) return PCIBIOS_DEVICE_NOT_FOUND; if (!CONFIG_OFFSET_VALID(offset)) return PCIBIOS_BAD_REGISTER_NUMBER; addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset); /* * Note: the caller has already checked that offset is * suitably aligned and that len is 1, 2 or 4. */ switch (len) { case 1: *val = in_8(addr); break; case 2: *val = in_le16(addr); break; default: *val = in_le32(addr); break; } return PCIBIOS_SUCCESSFUL; } static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) { struct pci_controller *hose; void volatile __iomem *addr; hose = pci_bus_to_host(bus); if (!hose) return PCIBIOS_DEVICE_NOT_FOUND; if (!CONFIG_OFFSET_VALID(offset)) return PCIBIOS_BAD_REGISTER_NUMBER; addr = pa_pxp_cfg_addr(hose, bus->number, devfn, offset); /* * Note: the caller has already checked that offset is * suitably aligned and that len is 1, 2 or 4. */ switch (len) { case 1: out_8(addr, val); (void) in_8(addr); break; case 2: out_le16(addr, val); (void) in_le16(addr); break; default: out_le32(addr, val); (void) in_le32(addr); break; } return PCIBIOS_SUCCESSFUL; } static struct pci_ops pa_pxp_ops = { pa_pxp_read_config, pa_pxp_write_config, }; static void __init setup_pa_pxp(struct pci_controller *hose) { hose->ops = &pa_pxp_ops; hose->cfg_data = ioremap(0xe0000000, 0x10000000); } static int __init add_bridge(struct device_node *dev) { struct pci_controller *hose; pr_debug(""Adding PCI host bridge %s\n"", dev->full_name); hose = pcibios_alloc_controller(dev); if (!hose) return -ENOMEM; hose->first_busno = 0; hose->last_busno = 0xff; setup_pa_pxp(hose); printk(KERN_INFO ""Found PA-PXP PCI host bridge.\n""); /* Interpret the ""ranges"" property */ /* This also maps the I/O region and sets isa_io/mem_base */ pci_process_bridge_OF_ranges(hose, dev, 1); pci_setup_phb_io(hose, 1); return 0; } void __init pas_pcibios_fixup(void) { struct pci_dev *dev = NULL; for_each_pci_dev(dev) pci_read_irq_line(dev); } static void __init pas_fixup_phb_resources(void) { struct pci_controller *hose, *tmp; list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; hose->io_resource.start += offset; hose->io_resource.end += offset; printk(KERN_INFO ""PCI Host %d, io start: %lx; io end: %lx\n"", hose->global_number, hose->io_resource.start, hose->io_resource.end); } } void __init pas_pci_init(void) { struct device_node *np, *root; root = of_find_node_by_path(""/""); if (!root) { printk(KERN_CRIT ""pas_pci_init: can't find root "" ""of device tree\n""); return; } for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) if (np->name && !strcmp(np->name, ""pxp"") && !add_bridge(np)) of_node_get(np); of_node_put(root); pas_fixup_phb_resources(); /* Setup the linkage between OF nodes and PHBs */ pci_devs_phb_init(); /* Use the common resource allocation mechanism */ pci_probe_only = 1; } ",0 "ZI Research Center for Information Technologies * www.fzi.de * * This file is part of N/X. * The initial has been setup as a small diploma thesis (Studienarbeit) at the FZI. * It was be coached by Prof. Werner Zorn and Dipl.-Inform Thomas Gauweiler. * * N/X is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * N/X is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with N/X; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **********************************************************************/ /** * Create a new Set for updating one or several records to the database. * Do not call directly but use the addUpdate method! * @package Database */ class UpdateSet extends SaveSet { /** * standard constructor * @param string Name of the table you want to modify * @param string Where-Condition for SQL-Clause */ function UpdateSet($table, $row_identifier) { SaveSet::SaveSet($table, $row_identifier); } /** * generates and executes the Updatestatement towards the database. */ function execute() { global $db, $errors; if ($this->counter > 0) { $str = ""UPDATE $this->table SET ""; $commaflag = false; for ($i = 0; $i < $this->counter; $i++) { if ($commaflag) $str .= "", ""; $str .= $this->columns[$i] . "" = "" . $this->values[$i]; $commaflag = true; } $str .= "" WHERE $this->row_identifier""; global $debug; if ($debug) echo ""UPDATE: $str
        ""; $query = new query($db, $str); if (trim($db->error()) != ""0:"") $errors .= ""-DBUpdate""; } } } ?>",0 "database table used by the model. * * @var string */ protected $table = 'neighborhoods'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = ['neighborhood']; public $timestamps = false; /* |-------------------------------------------------------------------------- | Model Relations |-------------------------------------------------------------------------- */ /** * Get the postal code of the district. * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function postalCode() { return $this->hasOne('App\PostalCode'); } /* |-------------------------------------------------------------------------- | Model Set and Get Attributes |-------------------------------------------------------------------------- */ /** * get the neighborhood uc first * * @return string */ public function getNeighborhoodUcFirstAttribute() { return ucfirst_tr($this->neighborhood); } } ",0 "tration Bootstrap */ require_once(dirname(__FILE__) . '/admin.php'); if (!is_multisite()) wp_die(__('Multisite support is not enabled.')); require_once(ABSPATH . WPINC . '/http.php'); $title = __('Upgrade Network'); $parent_file = 'upgrade.php'; get_current_screen()->add_help_tab(array( 'id' => 'overview', 'title' => __('Overview'), 'content' => '

        ' . __('Only use this screen once you have updated to a new version of WordPress through Updates/Available Updates (via the Network Administration navigation menu or the Toolbar). Clicking the Upgrade Network button will step through each site in the network, five at a time, and make sure any database updates are applied.') . '

        ' . '

        ' . __('If a version update to core has not happened, clicking this button won’t affect anything.') . '

        ' . '

        ' . __('If this process fails for any reason, users logging in to their sites will force the same update.') . '

        ' )); get_current_screen()->set_help_sidebar( '

        ' . __('For more information:') . '

        ' . '

        ' . __('Documentation on Upgrade Network') . '

        ' . '

        ' . __('Support Forums') . '

        ' ); require_once(ABSPATH . 'wp-admin/admin-header.php'); if (!current_user_can('manage_network')) wp_die(__('You do not have permission to access this page.')); echo '
        '; echo '

        ' . __('Upgrade Network') . '

        '; $action = isset($_GET['action']) ? $_GET['action'] : 'show'; switch ($action) { case ""upgrade"": $n = (isset($_GET['n'])) ? intval($_GET['n']) : 0; if ($n < 5) { global $wp_db_version; update_site_option('wpmu_upgrade_site', $wp_db_version); } $blogs = $wpdb->get_results(""SELECT blog_id FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5"", ARRAY_A); if (empty($blogs)) { echo '

        ' . __('All done!') . '

        '; break; } echo ""
          ""; foreach ((array)$blogs as $details) { switch_to_blog($details['blog_id']); $siteurl = site_url(); $upgrade_url = admin_url('upgrade.php?step=upgrade_db'); restore_current_blog(); echo ""
        • $siteurl
        • ""; $response = wp_remote_get($upgrade_url, array('timeout' => 120, 'httpversion' => '1.1')); if (is_wp_error($response)) wp_die(sprintf(__('Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: %2$s'), $siteurl, $response->get_error_message())); /** * Fires after the Multisite DB upgrade for each site is complete. * * @since MU * * @param array|WP_Error $response The upgrade response array or WP_Error on failure. */ do_action('after_mu_upgrade', $response); /** * Fires after each site has been upgraded. * * @since MU * * @param int $blog_id The id of the blog. */ do_action('wpmu_upgrade_site', $details['blog_id']); } echo ""
        ""; ?>

        "">

        ",0 "he.isis.applib.annotation.ActionLayout; import org.apache.isis.applib.annotation.Mixin; import org.apache.isis.applib.annotation.SemanticsOf; import org.apache.isis.applib.value.Blob; import org.incode.module.document.DocumentModule; import org.incode.module.document.dom.impl.docs.Document; import org.incode.module.document.dom.impl.docs.DocumentSort; import org.incode.module.document.spi.minio.ExternalUrlDownloadService; @Mixin(method=""act"") public class Document_downloadExternalUrlAsBlob { private final Document document; public Document_downloadExternalUrlAsBlob(final Document document) { this.document = document; } public static class ActionDomainEvent extends DocumentModule.ActionDomainEvent { } @Action( semantics = SemanticsOf.SAFE, domainEvent = ActionDomainEvent.class ) @ActionLayout(named = ""Download"") public Blob act() { return externalUrlDownloadService.downloadAsBlob(document); } public boolean hideAct() { return document.getSort() != DocumentSort.EXTERNAL_BLOB; } @Inject ExternalUrlDownloadService externalUrlDownloadService; } ",0 "enerated by javadoc (version 1.7.0_55) on Tue Aug 12 22:14:04 PDT 2014 --> org.creativecommons.nutch (apache-nutch 1.9 API)

        org.creativecommons.nutch

        ",0 "dify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. fab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with fab. If not, see . */ #ifndef _XSTRING_H #define _XSTRING_H #include ""types.h"" #include ""xapi.h"" /// xstrncat // // reallocates *s1, appends s2 onto *s1 // xapi ixstrncat(char ** s1, const char * s2, int s2len); /// xstrcat // // reallocates *s1, appends s2 onto *s1 // xapi ixstrcat(char ** s1, const char * s2); /// xstrcatf // // calculates size required to vprintf, reallocates *s and appends the new string onto *s // xapi ixstrcatf(char ** s, char * fmt, ...); /// xstrdup // // copies s2 to *s1, reallocating *s1 if necessary, deallocating it if it was already allocated // xapi ixstrdup(char ** s1, const char * s2); /// xstrndup // // copies s2 to *s1, reallocating *s1 if necessary, deallocating it if it was already allocated // xapi ixstrndup(char ** s1, const char * s2, const size_t l); /// ixsprintf // // - wfree(*s) // - allocate(*s) // - sprintf(fmt, ...) -> *s // xapi ixsprintf(char ** s, char * fmt, ...); #endif ",0 "tional.dtd""> MLtsyDispatchSatUssdControlEnvelopeError
         

        MLtsyDispatchSatUssdControlEnvelopeError Class Reference

        class MLtsyDispatchSatUssdControlEnvelopeError : public MLtsyDispatchInterface

        Inherits from

        Member Functions Documentation

        HandleUssdControlEnvelopeErrorReqL()

        TInt HandleUssdControlEnvelopeErrorReqL()[pure virtual]

        This API is optional and should only be used if the licensee wishes to including the Dispatcher beneath their own SIM ATK TSY.

        The CTSY Dispatcher shall invoke this function on receiving the ESatTsyEnvelopeError request from the CTSY.

        It is a request call that is completed by invoking CCtsyDispatcherCallback::CallbackSatGetUssdControlSupportedComp()

        This interface is invoked if it has not been possible to construct an envelope for USSD control. This would occur if USSD strings are not supported for call control, and the USSD control request cannot be submitted as an SS control request because it contains characters other than *, #, 0-9.

        Implementation of this interface should handle this error appropriately (such as by continuing the USSD setup process).

        MLtsyDispatchSatGetUssdControlSupported::HandleGetUssdControlSupportedReqL()

        Member Data Documentation

        const TInt KLtsyDispatchSatUssdControlEnvelopeErrorApiId

        const TIntKLtsyDispatchSatUssdControlEnvelopeErrorApiId[static]

        Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
        All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.

        ",0 "->renderAsset('ui/filter-panel', array( 'css_prefix' => $ctype['name'], 'page_url' => $page_url, 'fields' => $fields, 'props_fields' => $props_fields, 'props' => $props, 'filters' => $filters, 'ext_hidden_params' => $ext_hidden_params, 'is_expanded' => $ctype['options']['list_expand_filter'] )); } ?>
        _list""> $field){ ?> isInGroups($field['groups_read'])) { unset($fields[$name]); continue; } ?> class=""is_vip"">  '; continue; } ?>
         
        ""> f_"">

        ""> "">

        setItem($item)->parseTeaser($item[$field['name']]); ?>
        #include #include #include #include #include #include #include #include #include #include #include #include ""../../common.h"" #ifndef ITERATE #define ITERATE 5000000 #endif #ifndef ENTRIES #define ENTRIES 512 #endif static struct affinity a; static int nthr; static int counters[ENTRIES]; static int barrier_wait; static void * thread(void *b) { ck_barrier_mcs_t *barrier = b; ck_barrier_mcs_state_t state; int j, counter; int i = 0; aff_iterate(&a); ck_barrier_mcs_subscribe(barrier, &state); ck_pr_inc_int(&barrier_wait); while (ck_pr_load_int(&barrier_wait) != nthr) ck_pr_stall(); for (j = 0; j < ITERATE; j++) { i = j++ & (ENTRIES - 1); ck_pr_inc_int(&counters[i]); ck_barrier_mcs(barrier, &state); counter = ck_pr_load_int(&counters[i]); if (counter != nthr * (j / ENTRIES + 1)) { ck_error(""FAILED [%d:%d]: %d != %d\n"", i, j - 1, counter, nthr); } } return (NULL); } int main(int argc, char *argv[]) { pthread_t *threads; ck_barrier_mcs_t *barrier; int i; if (argc < 3) { ck_error(""Usage: correct \n""); } nthr = atoi(argv[1]); if (nthr <= 0) { ck_error(""ERROR: Number of threads must be greater than 0\n""); } threads = malloc(sizeof(pthread_t) * nthr); if (threads == NULL) { ck_error(""ERROR: Could not allocate thread structures\n""); } barrier = malloc(sizeof(ck_barrier_mcs_t) * nthr); if (barrier == NULL) { ck_error(""ERROR: Could not allocate barrier structures\n""); } ck_barrier_mcs_init(barrier, nthr); a.delta = atoi(argv[2]); fprintf(stderr, ""Creating threads (barrier)...""); for (i = 0; i < nthr; i++) { if (pthread_create(&threads[i], NULL, thread, barrier)) { ck_error(""ERROR: Could not create thread %d\n"", i); } } fprintf(stderr, ""done\n""); fprintf(stderr, ""Waiting for threads to finish correctness regression...""); for (i = 0; i < nthr; i++) pthread_join(threads[i], NULL); fprintf(stderr, ""done (passed)\n""); return (0); } ",0 "rel=""stylesheet"" href=""easy-mapper.css"">

        LOAD LOCAL IMAGE

        LOAD
        CANCEL

        LINK IMAGE URL

        LINK
        CANCEL

        CODE GENERATED

        SHOW MARKUP AS <A> TAG FORM
        SHOW MARKUP AS IMAGE MAP FORM
        CLOSE

        <A> TAG FORM

        BACK
        CLOSE

        IMAGE MAP FORM

        BACK
        CLOSE

        APP INFORMATION

        ⚠ This app works on IE10+ only. Easy Image Mapper (v1.2.0)
        Author: Inpyo Jeon
        Contact: inpyoj@gmail.com
        Website: GitHub Repository

        CLOSE

        ADD URL LINK

        ADD LINK
        CANCEL
        ↻ REFRESH
        • SOURCE ▾
          • LOCAL
          • URL
        • MEASURE ▾
          • DRAG ✓
          • CLICK ✓
        • UNIT ▾
          • PX ✓
          • % ✓
        • CLEAR
        • GENERATE
        • ?
        ",0 " The information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or its licensors, any * reproduction, modification, use or disclosure of MediaTek Software, and * information contained herein, in whole or in part, shall be strictly * prohibited. * * MediaTek Inc. (C) 2010. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS (""MEDIATEK SOFTWARE"") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON * AN ""AS-IS"" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER * DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE SOFTWARE OF * ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR SUPPLIED WITH THE * MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH THIRD PARTY FOR * ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT * IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER * LICENSES CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE * RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO RECEIVER'S * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. * RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. */ /* * Copyright (c) 2008, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include /* gross */ typedef struct gpioregs gpioregs; struct gpioregs { unsigned out; unsigned in; unsigned int_status; unsigned int_clear; unsigned int_en; unsigned int_edge; unsigned int_pos; unsigned oe; }; static gpioregs GPIO_REGS[] = { { .out = GPIO_OUT_0, .in = GPIO_IN_0, .int_status = GPIO_INT_STATUS_0, .int_clear = GPIO_INT_CLEAR_0, .int_en = GPIO_INT_EN_0, .int_edge = GPIO_INT_EDGE_0, .int_pos = GPIO_INT_POS_0, .oe = GPIO_OE_0, }, { .out = GPIO_OUT_1, .in = GPIO_IN_1, .int_status = GPIO_INT_STATUS_1, .int_clear = GPIO_INT_CLEAR_1, .int_en = GPIO_INT_EN_1, .int_edge = GPIO_INT_EDGE_1, .int_pos = GPIO_INT_POS_1, .oe = GPIO_OE_1, }, { .out = GPIO_OUT_2, .in = GPIO_IN_2, .int_status = GPIO_INT_STATUS_2, .int_clear = GPIO_INT_CLEAR_2, .int_en = GPIO_INT_EN_2, .int_edge = GPIO_INT_EDGE_2, .int_pos = GPIO_INT_POS_2, .oe = GPIO_OE_2, }, { .out = GPIO_OUT_3, .in = GPIO_IN_3, .int_status = GPIO_INT_STATUS_3, .int_clear = GPIO_INT_CLEAR_3, .int_en = GPIO_INT_EN_3, .int_edge = GPIO_INT_EDGE_3, .int_pos = GPIO_INT_POS_3, .oe = GPIO_OE_3, }, { .out = GPIO_OUT_4, .in = GPIO_IN_4, .int_status = GPIO_INT_STATUS_4, .int_clear = GPIO_INT_CLEAR_4, .int_en = GPIO_INT_EN_4, .int_edge = GPIO_INT_EDGE_4, .int_pos = GPIO_INT_POS_4, .oe = GPIO_OE_4, }, }; static gpioregs *find_gpio(unsigned n, unsigned *bit) { if(n > 106) return 0; if(n > 94) { *bit = 1 << (n - 95); return GPIO_REGS + 4; } if(n > 67) { *bit = 1 << (n - 68); return GPIO_REGS + 3; } if(n > 42) { *bit = 1 << (n - 43); return GPIO_REGS + 2; } if(n > 15) { *bit = 1 << (n - 16); return GPIO_REGS + 1; } *bit = 1 << n; return GPIO_REGS + 0; } void gpio_output_enable(unsigned n, unsigned out) { gpioregs *r; unsigned b; unsigned v; if((r = find_gpio(n, &b)) == 0) return; v = readl(r->oe); if(out) { writel(v | b, r->oe); } else { writel(v & (~b), r->oe); } } void gpio_write(unsigned n, unsigned on) { gpioregs *r; unsigned b; unsigned v; if((r = find_gpio(n, &b)) == 0) return; v = readl(r->out); if(on) { writel(v | b, r->out); } else { writel(v & (~b), r->out); } } int gpio_read(unsigned n) { gpioregs *r; unsigned b; if((r = find_gpio(n, &b)) == 0) return 0; return (readl(r->in) & b) ? 1 : 0; } void gpio_dir(int nr, int out) { gpio_output_enable(nr, out); } void gpio_set(int nr, int set) { gpio_write(nr, set); } int gpio_get(int nr) { return gpio_read(nr); } ",0 "g a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * HUBzero is a registered trademark of Purdue University. * * @package hubzero-cms * @author Shawn Rice * @copyright Copyright 2005-2015 HUBzero Foundation, LLC. * @license http://opensource.org/licenses/MIT MIT */ namespace Plugins\Content\Formathtml\Macros; use Plugins\Content\Formathtml\Macro; /** * A wiki macro for embedding links */ class Link extends Macro { /** * Allow macro in partial parsing? * * @var string */ public $allowPartial = true; /** * Returns description of macro, use, and accepted arguments * * @return string */ public function description() { $txt = array(); $txt['wiki'] = ""Embed a link. Examples: {{{ [[Link(/SomePage SomePage)]] }}} ""; $txt['html'] = '

        Embed a link.

        Examples:

        • [[Link(/SomePage SomePage)]]
        '; return $txt['html']; } /** * Generate macro output based on passed arguments * * @return string HTML image tag on success or error message on failure */ public function render() { $content = $this->args; // args will be null if the macro is called without parenthesis. if (!$content) { return ''; } $cls = 'wiki'; // Parse arguments // We expect the 1st argument to be a filename $args = explode(' ', $content); $href = array_shift($args); $title = (count($args) > 0) ? implode(' ', $args) : $href; $title = preg_replace('/\(.*?\)/', '', $title); $title = preg_replace('/^.*?\:/', '', $title); return '' . trim($title) . ''; } } ",0 "enerated by javadoc (1.8.0_60) on Sat Jul 30 19:37:08 CST 2016 --> 类 com.ryougi.iframe.LoginFrame的使用
        • 上一个
        • 下一个

        类的使用
        com.ryougi.iframe.LoginFrame

        没有com.ryougi.iframe.LoginFrame的用法
        • 上一个
        • 下一个
        ",0 "://fsf.org/> * Everyone is permitted to copy and distribute verbatim copies * of this license document, but changing it is not allowed. * * You can view LICENCE file for details. * * @author The Dragonet Team */ package org.dragonet.proxy.network.translator; import java.util.Iterator; import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; import org.spacehq.mc.protocol.data.message.Message; public final class MessageTranslator { public static String translate(Message message) { String ret = message.getFullText(); /* * It is a JSON message? */ try { /* * Do not ask me why, but json strings has colors. * Changing this allows colors in plain texts! yay! */ JSONObject jObject = null; if (message.getFullText().startsWith(""{"") && message.getFullText().endsWith(""}"")) { jObject = new JSONObject(message.getFullText()); } else { jObject = new JSONObject(message.toJsonString()); } /* * Let's iterate! */ ret = handleKeyObject(jObject); } catch (JSONException e) { /* * If any exceptions happens, then: * * The JSON message is buggy or * * It isn't a JSON message * * So, if any exceptions happens, we send the original message */ } return ret; } public static String handleKeyObject(JSONObject jObject) throws JSONException { String chatMessage = """"; Iterator iter = jObject.keys(); while (iter.hasNext()) { String key = iter.next(); try { if (key.equals(""color"")) { String color = jObject.getString(key); if (color.equals(""light_purple"")) { chatMessage = chatMessage + ""§d""; } if (color.equals(""blue"")) { chatMessage = chatMessage + ""§9""; } if (color.equals(""aqua"")) { chatMessage = chatMessage + ""§b""; } if (color.equals(""gold"")) { chatMessage = chatMessage + ""§6""; } if (color.equals(""green"")) { chatMessage = chatMessage + ""§a""; } if (color.equals(""white"")) { chatMessage = chatMessage + ""§f""; } if (color.equals(""yellow"")) { chatMessage = chatMessage + ""§e""; } if (color.equals(""gray"")) { chatMessage = chatMessage + ""§7""; } if (color.equals(""red"")) { chatMessage = chatMessage + ""§c""; } if (color.equals(""black"")) { chatMessage = chatMessage + ""§0""; } if (color.equals(""dark_green"")) { chatMessage = chatMessage + ""§2""; } if (color.equals(""dark_gray"")) { chatMessage = chatMessage + ""§8""; } if (color.equals(""dark_red"")) { chatMessage = chatMessage + ""§4""; } if (color.equals(""dark_blue"")) { chatMessage = chatMessage + ""§1""; } if (color.equals(""dark_aqua"")) { chatMessage = chatMessage + ""§3""; } if (color.equals(""dark_purple"")) { chatMessage = chatMessage + ""§5""; } } if (key.equals(""bold"")) { String bold = jObject.getString(key); if (bold.equals(""true"")) { chatMessage = chatMessage + ""§l""; } } if (key.equals(""italic"")) { String bold = jObject.getString(key); if (bold.equals(""true"")) { chatMessage = chatMessage + ""§o""; } } if (key.equals(""underlined"")) { String bold = jObject.getString(key); if (bold.equals(""true"")) { chatMessage = chatMessage + ""§n""; } } if (key.equals(""strikethrough"")) { String bold = jObject.getString(key); if (bold.equals(""true"")) { chatMessage = chatMessage + ""§m""; } } if (key.equals(""obfuscated"")) { String bold = jObject.getString(key); if (bold.equals(""true"")) { chatMessage = chatMessage + ""§k""; } } if (key.equals(""text"")) { /* * We only need the text message from the JSON. */ String jsonMessage = jObject.getString(key); chatMessage = chatMessage + jsonMessage; continue; } if (jObject.get(key) instanceof JSONArray) { chatMessage += handleKeyArray(jObject.getJSONArray(key)); } if (jObject.get(key) instanceof JSONObject) { chatMessage += handleKeyObject(jObject.getJSONObject(key)); } } catch (JSONException e) { } } return chatMessage; } public static String handleKeyArray(JSONArray jObject) throws JSONException { String chatMessage = """"; JSONObject jsonObject = jObject.toJSONObject(jObject); Iterator iter = jsonObject.keys(); while (iter.hasNext()) { String key = iter.next(); try { /* * We only need the text message from the JSON. */ if (key.equals(""text"")) { String jsonMessage = jsonObject.getString(key); chatMessage = chatMessage + jsonMessage; continue; } if (jsonObject.get(key) instanceof JSONArray) { handleKeyArray(jsonObject.getJSONArray(key)); } if (jsonObject.get(key) instanceof JSONObject) { handleKeyObject(jsonObject.getJSONObject(key)); } } catch (JSONException e) { } } return chatMessage; } } ",0 "Max Media company. This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). Doom 3 Source Code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Doom 3 Source Code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Doom 3 Source Code. If not, see . In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. =========================================================================== */ #ifndef __GAME_MISC_H__ #define __GAME_MISC_H__ /* =============================================================================== idSpawnableEntity A simple, spawnable entity with a model and no functionable ability of it's own. For example, it can be used as a placeholder during development, for marking locations on maps for script, or for simple placed models without any behavior that can be bound to other entities. Should not be subclassed. =============================================================================== */ class idSpawnableEntity : public idEntity { public: CLASS_PROTOTYPE( idSpawnableEntity ); void Spawn( void ); private: }; /* =============================================================================== Potential spawning position for players. The first time a player enters the game, they will be at an 'initial' spot. Targets will be fired when someone spawns in on them. When triggered, will cause player to be teleported to spawn spot. =============================================================================== */ class idPlayerStart : public idEntity { public: CLASS_PROTOTYPE( idPlayerStart ); enum { EVENT_TELEPORTPLAYER = idEntity::EVENT_MAXEVENTS, EVENT_MAXEVENTS }; idPlayerStart( void ); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); virtual bool ClientReceiveEvent( int event, int time, const idBitMsg &msg ); private: int teleportStage; void Event_TeleportPlayer( idEntity *activator ); void Event_TeleportStage( idEntity *player ); void TeleportPlayer( idPlayer *player ); }; /* =============================================================================== Non-displayed entity used to activate triggers when it touches them. Bind to a mover to have the mover activate a trigger as it moves. When target by triggers, activating the trigger will toggle the activator on and off. Check ""start_off"" to have it spawn disabled. =============================================================================== */ class idActivator : public idEntity { public: CLASS_PROTOTYPE( idActivator ); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); virtual void Think( void ); private: bool stay_on; void Event_Activate( idEntity *activator ); }; /* =============================================================================== Path entities for monsters to follow. =============================================================================== */ class idPathCorner : public idEntity { public: CLASS_PROTOTYPE( idPathCorner ); void Spawn( void ); static void DrawDebugInfo( void ); static idPathCorner *RandomPath( const idEntity *source, const idEntity *ignore ); private: void Event_RandomPath( void ); }; /* =============================================================================== Object that fires targets and changes shader parms when damaged. =============================================================================== */ class idDamagable : public idEntity { public: CLASS_PROTOTYPE( idDamagable ); idDamagable( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); void Spawn( void ); void Killed( idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location ); private: int count; int nextTriggerTime; void BecomeBroken( idEntity *activator ); void Event_BecomeBroken( idEntity *activator ); void Event_RestoreDamagable( void ); }; /* =============================================================================== Hidden object that explodes when activated =============================================================================== */ class idExplodable : public idEntity { public: CLASS_PROTOTYPE( idExplodable ); void Spawn( void ); private: void Event_Explode( idEntity *activator ); }; /* =============================================================================== idSpring =============================================================================== */ class idSpring : public idEntity { public: CLASS_PROTOTYPE( idSpring ); void Spawn( void ); virtual void Think( void ); private: idEntity * ent1; idEntity * ent2; int id1; int id2; idVec3 p1; idVec3 p2; idForce_Spring spring; void Event_LinkSpring( void ); }; /* =============================================================================== idForceField =============================================================================== */ class idForceField : public idEntity { public: CLASS_PROTOTYPE( idForceField ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); void Spawn( void ); virtual void Think( void ); private: idForce_Field forceField; void Toggle( void ); void Event_Activate( idEntity *activator ); void Event_Toggle( void ); void Event_FindTargets( void ); }; /* =============================================================================== idAnimated =============================================================================== */ class idAnimated : public idAFEntity_Gibbable { public: CLASS_PROTOTYPE( idAnimated ); idAnimated(); ~idAnimated(); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); void Spawn( void ); virtual bool LoadAF( void ); bool StartRagdoll( void ); virtual bool GetPhysicsToSoundTransform( idVec3 &origin, idMat3 &axis ); private: int num_anims; int current_anim_index; int anim; int blendFrames; jointHandle_t soundJoint; idEntityPtr activator; bool activated; void PlayNextAnim( void ); void Event_Activate( idEntity *activator ); void Event_Start( void ); void Event_StartRagdoll( void ); void Event_AnimDone( int animIndex ); void Event_Footstep( void ); void Event_LaunchMissiles( const char *projectilename, const char *sound, const char *launchjoint, const char *targetjoint, int numshots, int framedelay ); void Event_LaunchMissilesUpdate( int launchjoint, int targetjoint, int numshots, int framedelay ); }; /* =============================================================================== idStaticEntity =============================================================================== */ class idStaticEntity : public idEntity { public: CLASS_PROTOTYPE( idStaticEntity ); idStaticEntity( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); void Spawn( void ); void ShowEditingDialog( void ); virtual void Hide( void ); virtual void Show( void ); void Fade( const idVec4 &to, float fadeTime ); virtual void Think( void ); virtual void WriteToSnapshot( idBitMsgDelta &msg ) const; virtual void ReadFromSnapshot( const idBitMsgDelta &msg ); private: void Event_Activate( idEntity *activator ); int spawnTime; bool active; idVec4 fadeFrom; idVec4 fadeTo; int fadeStart; int fadeEnd; bool runGui; }; /* =============================================================================== idFuncEmitter =============================================================================== */ class idFuncEmitter : public idStaticEntity { public: CLASS_PROTOTYPE( idFuncEmitter ); idFuncEmitter( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); void Spawn( void ); void Event_Activate( idEntity *activator ); virtual void WriteToSnapshot( idBitMsgDelta &msg ) const; virtual void ReadFromSnapshot( const idBitMsgDelta &msg ); private: bool hidden; }; /* =============================================================================== idFuncSmoke =============================================================================== */ class idFuncSmoke : public idEntity { public: CLASS_PROTOTYPE( idFuncSmoke ); idFuncSmoke(); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); virtual void Think( void ); void Event_Activate( idEntity *activator ); private: int smokeTime; const idDeclParticle * smoke; bool restart; }; /* =============================================================================== idFuncSplat =============================================================================== */ class idFuncSplat : public idFuncEmitter { public: CLASS_PROTOTYPE( idFuncSplat ); idFuncSplat( void ); void Spawn( void ); private: void Event_Activate( idEntity *activator ); void Event_Splat(); }; /* =============================================================================== idTextEntity =============================================================================== */ class idTextEntity : public idEntity { public: CLASS_PROTOTYPE( idTextEntity ); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); virtual void Think( void ); private: idStr text; bool playerOriented; }; /* =============================================================================== idLocationEntity =============================================================================== */ class idLocationEntity : public idEntity { public: CLASS_PROTOTYPE( idLocationEntity ); void Spawn( void ); const char * GetLocation( void ) const; private: }; class idLocationSeparatorEntity : public idEntity { public: CLASS_PROTOTYPE( idLocationSeparatorEntity ); void Spawn( void ); private: }; class idVacuumSeparatorEntity : public idEntity { public: CLASS_PROTOTYPE( idVacuumSeparatorEntity ); idVacuumSeparatorEntity( void ); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); void Event_Activate( idEntity *activator ); private: qhandle_t portal; }; class idVacuumEntity : public idEntity { public: CLASS_PROTOTYPE( idVacuumEntity ); void Spawn( void ); private: }; /* =============================================================================== idBeam =============================================================================== */ class idBeam : public idEntity { public: CLASS_PROTOTYPE( idBeam ); idBeam(); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); virtual void Think( void ); void SetMaster( idBeam *masterbeam ); void SetBeamTarget( const idVec3 &origin ); virtual void Show( void ); virtual void WriteToSnapshot( idBitMsgDelta &msg ) const; virtual void ReadFromSnapshot( const idBitMsgDelta &msg ); private: void Event_MatchTarget( void ); void Event_Activate( idEntity *activator ); idEntityPtr target; idEntityPtr master; }; /* =============================================================================== idLiquid =============================================================================== */ class idRenderModelLiquid; class idLiquid : public idEntity { public: CLASS_PROTOTYPE( idLiquid ); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); private: void Event_Touch( idEntity *other, trace_t *trace ); idRenderModelLiquid *model; }; /* =============================================================================== idShaking =============================================================================== */ class idShaking : public idEntity { public: CLASS_PROTOTYPE( idShaking ); idShaking(); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); private: idPhysics_Parametric physicsObj; bool active; void BeginShaking( void ); void Event_Activate( idEntity *activator ); }; /* =============================================================================== idEarthQuake =============================================================================== */ class idEarthQuake : public idEntity { public: CLASS_PROTOTYPE( idEarthQuake ); idEarthQuake(); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); virtual void Think( void ); private: int nextTriggerTime; int shakeStopTime; float wait; float random; bool triggered; bool playerOriented; bool disabled; float shakeTime; void Event_Activate( idEntity *activator ); }; /* =============================================================================== idFuncPortal =============================================================================== */ class idFuncPortal : public idEntity { public: CLASS_PROTOTYPE( idFuncPortal ); idFuncPortal(); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); private: qhandle_t portal; bool state; void Event_Activate( idEntity *activator ); }; /* =============================================================================== idFuncAASPortal =============================================================================== */ class idFuncAASPortal : public idEntity { public: CLASS_PROTOTYPE( idFuncAASPortal ); idFuncAASPortal(); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); private: bool state; void Event_Activate( idEntity *activator ); }; /* =============================================================================== idFuncAASObstacle =============================================================================== */ class idFuncAASObstacle : public idEntity { public: CLASS_PROTOTYPE( idFuncAASObstacle ); idFuncAASObstacle(); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); private: bool state; void Event_Activate( idEntity *activator ); }; /* =============================================================================== idFuncRadioChatter =============================================================================== */ class idFuncRadioChatter : public idEntity { public: CLASS_PROTOTYPE( idFuncRadioChatter ); idFuncRadioChatter(); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); private: float time; void Event_Activate( idEntity *activator ); void Event_ResetRadioHud( idEntity *activator ); }; /* =============================================================================== idPhantomObjects =============================================================================== */ class idPhantomObjects : public idEntity { public: CLASS_PROTOTYPE( idPhantomObjects ); idPhantomObjects(); void Spawn( void ); void Save( idSaveGame *savefile ) const; void Restore( idRestoreGame *savefile ); virtual void Think( void ); private: void Event_Activate( idEntity *activator ); void Event_Throw( void ); void Event_ShakeObject( idEntity *object, int starttime ); int end_time; float throw_time; float shake_time; idVec3 shake_ang; float speed; int min_wait; int max_wait; idEntityPtrtarget; idList targetTime; idList lastTargetPos; }; #endif /* !__GAME_MISC_H__ */ ",0 "org.zstack.header.network.l3.UsedIpInventory; /** * Created by frank on 10/11/2015. */ public class FlatDhcpAcquireDhcpServerIpReply extends MessageReply { private String ip; private String netmask; private String usedIpUuid; private UsedIpInventory usedIp; private IpRangeInventory ipr; public String getNetmask() { return netmask; } public void setNetmask(String netmask) { this.netmask = netmask; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getUsedIpUuid() { return usedIpUuid; } public void setUsedIpUuid(String usedIpUuid) { this.usedIpUuid = usedIpUuid; } public UsedIpInventory getUsedIp() { return usedIp; } public void setUsedIp(UsedIpInventory usedIp) { this.usedIp = usedIp; } public IpRangeInventory getIpr() { return ipr; } public void setIpr(IpRangeInventory ipr) { this.ipr = ipr; } } ",0 "r * @package Pigeon * */ class PigeonServiceProvider extends ServiceProvider { public function register() { // Required for testing //require __DIR__ . '../../../bootstrap/autoload.php'; // Bind the library desired to the interface $this->app->bind('Larablocks\Pigeon\PigeonInterface', 'Larablocks\Pigeon\\'.config('pigeon.library')); // Bind the Pigeon Interface to the facade $this->app->bind('pigeon', 'Larablocks\Pigeon\PigeonInterface'); // Load Pigeon alias for the user if not set in app.php $aliases = config('app.aliases'); if (empty($aliases['Pigeon'])) { AliasLoader::getInstance()->alias('Pigeon', 'Larablocks\Pigeon\Pigeon'); } } public function boot() { $this->publishes([ __DIR__.'/../config/pigeon.php' => config_path('pigeon.php'), ], 'config'); $this->publishes([ __DIR__.'/../views/' => base_path('resources/views'), ], 'views'); } }",0 "enerated by javadoc (version 1.7.0_45) on Thu Oct 02 16:39:51 BST 2014 --> com.hp.hpl.jena.sparql (Apache Jena ARQ)

        com.hp.hpl.jena.sparql

        ",0 "LIST_HEAD(registered_interfaces); pthread_mutex_t list_lock; extern char rstp_queue_name[32]; extern unsigned int checkGlobalConditions(struct rstp_interface *); struct rstp_bridge bridge; // TODO: drop this in favor of LISA's shm mechanism static void init_bridge(void) { unsigned char addr[6] = {0x00,0xE0,0x81,0xB1,0xC0,0x38}; unsigned char defaultPriority[2] = {0x70,0x01}; memcpy(&bridge.BridgeIdentifier.bridge_priority, &defaultPriority, 2); memcpy(&bridge.BridgeIdentifier.bridge_address, addr, 6); memset(&bridge.BridgePriority, 0, sizeof(struct priority_vector)); memcpy(&bridge.BridgePriority.root_bridge_id, &bridge.BridgeIdentifier, sizeof(struct bridge_id)); memcpy(&bridge.BridgePriority.designated_bridge_id, &bridge.BridgeIdentifier, sizeof(struct bridge_id)); bridge.BridgeTimes.MessageAge = 0; bridge.BridgeTimes.MaxAge = 20; bridge.BridgeTimes.ForwardDelay = 15; bridge.BridgeTimes.HelloTime = 2; } static int setup_switch_socket(int fd, char *ifname) { struct sockaddr_sw addr; memset(&addr, 0, sizeof(addr)); addr.ssw_family = AF_SWITCH; strncpy(addr.ssw_if_name, ifname, sizeof(addr.ssw_if_name) - 1); addr.ssw_proto = ETH_P_RSTP; if (bind(fd, (struct sockaddr *)&addr, sizeof(addr))) { perror(""bind""); close(fd); return -1; } fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK); return 0; } #define dec(x) if (x) x = x - 1 void pti_loop(int signum) { struct rstp_interface *entry, *tmp; // Decrement all timers list_for_each_entry_safe(entry, tmp, ®istered_interfaces, lh) { dec(entry->helloWhen); dec(entry->tcWhile); dec(entry->fdWhile); dec(entry->rcvdInfoWhile); dec(entry->rrWhile); dec(entry->rbWhile); dec(entry->mdelayWhile); dec(entry->edgeDelayWhile); dec(entry->txCount); } } void rstpd_register_interface(int if_index) { int i, sock, status; struct ifreq ifr; struct swcfgreq swcfgr; struct rstp_interface *entry, *tmp; struct rstp_configuration rstp; sys_dbg(""Enabling RSTP on interface %d\n"", if_index); /* Open a socket to request interface status information (up/down) */ sock = socket(AF_INET, SOCK_DGRAM, 0); assert(sock>=0); /* get interface name */ if_get_name(if_index, sock, ifr.ifr_name); status = ioctl(sock, SIOCGIFFLAGS, &ifr); assert(status>=0); /* interface is down */ if (!(ifr.ifr_flags & IFF_UP)) { sys_dbg(""interface %s is down.\n"", ifr.ifr_name); close(sock); return; } close(sock); /* Open a switch socket to check if the interface is in the switch */ sock = socket(PF_SWITCH, SOCK_RAW, 0); assert(sock>=0); /* Check if interface is in the switch */ swcfgr.cmd = SWCFG_GETIFTYPE; swcfgr.ifindex = if_index; if (ioctl(sock, SIOCSWCFG, &swcfgr)) { sys_dbg(""interface %s is not in the switch.\n"", ifr.ifr_name); perror(""ioctl""); close(sock); return; } if (swcfgr.ext.switchport != SW_IF_SWITCHED) { sys_dbg(""interface %s is not known by the switch.\n"", ifr.ifr_name); close(sock); return; } /* Check if RSTP is already enabled on that interface */ list_for_each_entry_safe(entry, tmp, ®istered_interfaces, lh) if (if_index == entry->if_index) { sys_dbg(""RSTP already enabled on interface %s.\n"", ifr.ifr_name); close(sock); return; } if (setup_switch_socket(sock, ifr.ifr_name)) return; // Allocate space for RSTP per-port information entry = (struct rstp_interface *) malloc(sizeof(struct rstp_interface)); assert(entry); entry->if_index = if_index; entry->sw_sock_fd = sock; entry->operEdge = 0; entry->PortPathCost = 200000; entry->portId[0] = 0x80 | (if_index >> 8); entry->portId[1] = if_index & 0xff; status = ioctl(entry->sw_sock_fd, SIOCGIFHWADDR, &ifr); memcpy(entry->mac_addr, ifr.ifr_ifru.ifru_hwaddr.sa_data, 6); switch_get_rstp(&rstp); memset(&entry->portPriority, 0, sizeof(struct priority_vector4)); memcpy(&entry->portPriority.root_bridge_id, &bridge.BridgePriority.root_bridge_id, sizeof(struct bridge_id)); memcpy(&entry->portPriority.designated_bridge_id, &bridge.BridgePriority.designated_bridge_id, sizeof(struct bridge_id)); memcpy(&entry->portPriority.designated_port_id, &entry->portId, 2); memset(&entry->designatedPriority, 0, sizeof(struct priority_vector4)); memcpy(&entry->designatedPriority.root_bridge_id, &bridge.BridgePriority.root_bridge_id, sizeof(struct bridge_id)); memcpy(&entry->designatedPriority.designated_bridge_id, &bridge.BridgePriority.designated_bridge_id, sizeof(struct bridge_id)); memcpy(&entry->designatedPriority.designated_port_id, &entry->portId, 2); // Initialize semaphores if (sem_init(&entry->rcvdBPDU, 0, 0) < 0) { close(sock); return; } if (sem_init(&entry->processedBPDU, 0, 1) < 0) { close(sock); return; } // Clear all FSM states for (i = 0; i < 9; i++) { entry->state[i][FUNC] = 0; entry->state[i][EXEC] = NOT_EXECUTED; } pthread_mutex_lock(&list_lock); list_add_tail(&entry->lh, ®istered_interfaces); pthread_mutex_unlock(&list_lock); sys_dbg(""RSTP enabled on interface %d\n"", if_index); } void rstpd_unregister_interface(int if_index) { struct rstp_interface *entry, *tmp; sys_dbg(""Disabling RSTP on interface %d\n"", if_index); list_for_each_entry_safe(entry, tmp, ®istered_interfaces, lh) if (if_index == entry->if_index) { close(entry->sw_sock_fd); list_del(&entry->lh); } } void * signal_handler(void *ptr) { sigset_t signal_set; int sig; sigemptyset(&signal_set); sigaddset(&signal_set, SIGINT); sigaddset(&signal_set, SIGTERM); sigaddset(&signal_set, SIGSEGV); sys_dbg(""[signal handler]: Waiting for SIGINT|SIGTERM|SIGSEGV ...\n""); sigwait(&signal_set, &sig); sys_dbg(""[signal handler]: Caught signal ... \n""); sys_dbg(""[signal handler]: Removing the IPC queue, '%s' ... \n"", rstp_queue_name); if (mq_unlink(rstp_queue_name) < 0) sys_dbg(""[signal handler]: Could not remove IPC queue ...\n""); sys_dbg(""[signal handler]: Exiting \n""); closelog(); exit(EXIT_FAILURE); } void fsm_run(void) { struct rstp_interface *entry, *tmp; // Iterate through all FSMs and execute their current state for (;;) { pthread_mutex_lock(&list_lock); list_for_each_entry_safe(entry, tmp, ®istered_interfaces, lh) { prx_state_table[ entry->state[PRX][FUNC] ](entry); ppm_state_table[ entry->state[PPM][FUNC] ](entry); //bdm_state_table[ entry->state[BDM][FUNC] ](entry); ptx_state_table[ entry->state[PTX][FUNC] ](entry); pim_state_table[ entry->state[PIM][FUNC] ](entry); checkGlobalConditions(entry); prt_state_table[ entry->state[PRT][FUNC] ](entry); pst_state_table[ entry->state[PST][FUNC] ](entry); tcm_state_table[ entry->state[TCM][FUNC] ](entry); } prs_state_table[ prs_func ](); pthread_mutex_unlock(&list_lock); } } int main(int argc, char *argv[]) { sigset_t signal_set; sigset_t alrm_mask; struct sigaction alrm_action; struct itimerval timer; /* All output shall be sent to rsyslogd */ openlog(""rstpd"", LOG_PID, LOG_DAEMON); daemonize(); /* Mask all signals */ sigfillset(&signal_set); sigdelset(&signal_set, SIGALRM); pthread_sigmask(SIG_BLOCK, &signal_set, NULL); //TODO:fix init_bridge(); /* Initialize shared memory area */ switch_init(); /* Set one second timer */ sigemptyset(&alrm_mask); sigaddset(&alrm_mask, SIGALRM); alrm_action.sa_flags = 0; alrm_action.sa_mask = alrm_mask; alrm_action.sa_handler = pti_loop; sigaction(SIGALRM, &alrm_action, NULL); memset(&timer, 0, sizeof(timer)); timer.it_value.tv_sec = 1; timer.it_interval.tv_sec = 1; setitimer(ITIMER_REAL, &timer, NULL); pthread_mutex_init(&list_lock, NULL); /* Start frame receiving thread */ if (pthread_create(&recv_thread, NULL, rstp_recv_loop, NULL) != 0) { sys_dbg(""Could not create receiving thread""); exit(EXIT_FAILURE); } /* Start management thread */ if (pthread_create(&mgmt_thread, NULL, rstp_ipc_listen, NULL) != 0) { sys_dbg(""Could not create management thread""); exit(EXIT_FAILURE); } /* Start signal handler thread */ if (pthread_create(&sig_thread, NULL, signal_handler, NULL) != 0) { perror(""Could not create signal handler thread""); exit(EXIT_FAILURE); } sys_dbg(""Daemon started""); /* Run finite state machines */ fsm_run(); /* Normally, execution never reaches this point */ return EXIT_SUCCESS; } ",0 """5.0"">
        • common->theme_link(); ?>img/slider/revolution/slider01.jpg"" alt="""" width=""1920"" height=""600"">
          Lulusan dijamin Kerja
        • common->theme_link(); ?>img/slider/revolution/slider02.jpg"" alt="""" width=""1920"" height=""600"">
          Fasilitas belajar lengkap
          common->theme_link(); ?>img/slider/revolution/fitur01.png"" class=""img-Construction"" width=""400"" alt="""">
        • common->theme_link(); ?>img/slider/revolution/slider03.jpg"" alt="""" width=""1920"" height=""600"">
          Agen Langsung Cruiseline
          common->theme_link(); ?>img/slider/revolution/fitur02.png"" class=""img-Construction"" width=""400"" alt="""">
        Lulusan Dijamin Siap Kerja

        Dengan dididik dan dilatih oleh instruktur berpengalaman luas di dalam dan luar negeri serta didukung oleh sarana yang lengkap serya kurikulum yang up to date dalam menjamin lulusan bosssignalfx siap kerja.

        Recruitmen Supporting Cruiseline

        Poltenkas Denpasar adalah salah satu kampus yang ditunjuk sebagai Rekruitmen Supporting Partner untuk Royal Carribean Cruiseline, Carnival Cruiseline, dan MSC Cruiseline.

        Pendidikan Berkualitas dengan Harga Terjangkau

        Dengan biaya kuliah yang terjangkau dan transparan. bosssignalfx mampu memberikan pendidikan bermutu tinggi dan tambahan keahlian seperti Fruit Carving, Bar Flair, Barista, Winecology, Banquet Service, Pastry Bakery, Event Organizer, E-Commerce.

        Build Your Future with Us!

        Doctus salutatus est ea, postea doming veritus in nec, sanctus fierent antiopam no pro

        Quod assum persecuti ne eum. Et eam paulo menandri dissentiet. Mei eu altera offendit accusamus. Mel te sint verear deseruisse, cu graece disputando quo. Zril putent mel et, eam quot accusam ea. Quo voluptatibus signiferumque te, in partem argumentum honestatis duo.

        View our profile View our services

        common->theme_link(); ?>img/group.png"" class=""img-responsive"" alt="""" />
        Responsive

        Cu nec salutandi voluptat teros definitionem ad ius, ut eam unumiunanios.

        Clean

        Cu nec salutandi voluptat teros definitionem ad ius, ut eam unumiunanios.

        Bootstrap3

        Cu nec salutandi voluptat teros definitionem ad ius, ut eam unumiunanios.

        Valid code

        Cu nec salutandi voluptat teros definitionem ad ius, ut eam unumiunanios.

        Galeri Kami

        Adhuc doming placerat sea ut, graeci perfecto scriptorem nam

        common->theme_link(); ?>img/gallery/380x380/img13.jpg"" class=""img-fullwidth"" alt="""" />
        common->theme_link(); ?>img/gallery/380x380/img14.jpg"" class=""img-fullwidth"" alt="""" />
        common->theme_link(); ?>img/gallery/380x380/img15.jpg"" class=""img-fullwidth"" alt="""" />
        common->theme_link(); ?>img/gallery/380x380/img16.jpg"" class=""img-fullwidth"" alt="""" />
        common->theme_link(); ?>img/gallery/380x380/img17.jpg"" class=""img-fullwidth"" alt="""" />
        common->theme_link(); ?>img/gallery/380x380/img18.jpg"" class=""img-fullwidth"" alt="""" />
        common->theme_link(); ?>img/gallery/380x380/img19.jpg"" class=""img-fullwidth"" alt="""" />
        common->theme_link(); ?>img/gallery/380x380/img20.jpg"" class=""img-fullwidth"" alt="""" />
        Kemampuan Alumni bosssignalfx Dalam Bekerja Tidak Perlu Diragukan Lagi Karena Selain Cekatan Juga Fast Learner, Saya Mencari Staf Yang Seperti Itu Dan Itulah Yang Dibutuhkan Industri Saat Ini.
        Tusan Aryasa - Housekeeper Estate Como Shambhala Executive common->theme_link(); ?>img/testimoni/tusan.jpg"" class=""img-circle testimoni-avatar"" alt="""" />
        Saya Merekomendasi bosssignalfx Sebagai Tempat Anda Kuliah Perhotelan Karena Terbukti Dari Mahasiswa Yang On The Job Training Di Tempat Kami Menunjukkan Sikap Yang Loyal & Hardworker.
        Sukarmajaya - Executive Chef The Villas, Seminyak common->theme_link(); ?>img/testimoni/sukarmajaya.jpg"" class=""img-circle testimoni-avatar"" alt="""" />
        Dari Berbagai Kampus Yang Mahasiswanya On The Job Trainng Di Tempat Kami bosssignalfx Selalu Memberikan Mahasiswa Yang Terbaik Dalam Hal Disiplin & Teamwork. Thank’s bosssignalfx.
        Ni Made Restiti - Personnel Manager UN'S Hotel & Restaurant, Legian - Kuta common->theme_link(); ?>img/testimoni/restiti.jpg"" class=""img-circle testimoni-avatar"" alt="""" />
        Saya Ucapkan Terima Kasih Yang Banyak Kepada bosssignalfx Yang Telah Memberikan Tenaga Training Handal Dan Cepat Beradaptasi Dengan Pola Kerja High Speed Di Beach Club Kami.
        I Made Dwi Artha Pradnya - Asst. Restaurant Manager Potato Head Beach Club Seminyak- Kuta common->theme_link(); ?>img/testimoni/dwi.jpg"" class=""img-circle testimoni-avatar"" alt="""" />
        bosssignalfx Selalu Mensupport Untuk Tenaga Training Di Hotel Kami, Kami Pilih bosssignalfx Karena Tenaganya Siap Pakai, Disiplin & Memiliki Positive Attitude.
        I Made Wirta - Executive Housekeeper Amarterra Villas Bali By Accor, Nusa Dua common->theme_link(); ?>img/testimoni/wirta.jpg"" class=""img-circle testimoni-avatar"" alt="""" />

        Ayo Daftar Sekarang

        Mari bergabung dengan ratusan alumni lain.

        Daftar Sekarang!
        ",0 "PL v3 or later */ // error mode $error_mode = (isset($error_mode) AND in_array($error_mode, array(""json"", ""moodle""))) ? $error_mode : ""moodle""; // define constants if (!defined('ROOT')) { //define('ROOT', (realpath(dirname( __FILE__ )) . DIRECTORY_SEPARATOR)); define('ROOT', substr(realpath(dirname(__FILE__)), 0, stripos(realpath(dirname(__FILE__)), ""blocks"", 0)) . 'blocks/gismo/'); } //$path_base=substr(realpath(dirname( __FILE__ )),0,stripos(realpath(dirname( __FILE__ )),""blocks"",0)).'blocks/gismo/'; if (!defined('LIB_DIR')) { define('LIB_DIR', ROOT . ""lib"" . DIRECTORY_SEPARATOR); //define('LIB_DIR', $path_base . ""lib"" . DIRECTORY_SEPARATOR); } // include moodle config file require_once realpath(ROOT . "".."" . DIRECTORY_SEPARATOR . "".."" . DIRECTORY_SEPARATOR . ""config.php""); $q = optional_param('q', '', PARAM_TEXT); $srv_data_encoded = required_param('srv_data',PARAM_RAW); // query filter between pages $query = (isset($q)) ? addslashes($q) : ''; // LIBRARIES MANAGEMENT // Please use this section to set server side and cliend side libraries to be included // server side: please note that '.php' extension will be automatically added $server_side_libraries = array(""third_parties"" => array()); // client side: please note that '.js' extension will NOT be automatically added, in order to allow to create file thgat can be parsed by PHP $client_side_libraries = array(""gismo"" => array(""gismo.js.php"", ""top_menu.js.php"", ""left_menu.js.php"", ""time_line.js"", ""gismo_util.js""), ""third_parties"" => array(""jquery/jquery-1.10.0.min.js"", ""jquery-ui-1.10.3/js/jquery-ui-1.10.3.custom.min.js"", ""jqplot.1.0.8r1250/jquery.jqplot.min.js"", ""jqplot.1.0.8r1250/plugins/jqplot.barRenderer.min.js"", ""jqplot.1.0.8r1250/plugins/jqplot.canvasAxisLabelRenderer.min.js"", ""jqplot.1.0.8r1250/plugins/jqplot.canvasAxisTickRenderer.min.js"", ""jqplot.1.0.8r1250/plugins/jqplot.canvasTextRenderer.min.js"", ""jqplot.1.0.8r1250/plugins/jqplot.categoryAxisRenderer.min.js"", ""jqplot.1.0.8r1250/plugins/jqplot.dateAxisRenderer.min.js"", ""jqplot.1.0.8r1250/plugins/jqplot.highlighter.min.js"", ""jqplot.1.0.8r1250/plugins/jqplot.pointLabels.min.js"", ""simpleFadeSlideShow/fadeSlideShow.min.js"" )); // include server-side libraries libraries if (is_array($server_side_libraries) AND count($server_side_libraries) > 0) { foreach ($server_side_libraries as $key => $server_side_libs) { if (is_array($server_side_libs) AND count($server_side_libs) > 0) { foreach ($server_side_libs as $server_side_lib) { $lib_full_path = LIB_DIR . $key . DIRECTORY_SEPARATOR . ""server_side"" . DIRECTORY_SEPARATOR . $server_side_lib . "".php""; if (is_file($lib_full_path) AND is_readable($lib_full_path)) { require_once $lib_full_path; } } } } } // check input data if (!isset($srv_data_encoded)) { block_gismo\GISMOutil::gismo_error('err_srv_data_not_set', $error_mode); exit; } $srv_data = (object) unserialize(base64_decode(urldecode($srv_data_encoded))); // course id if (!property_exists($srv_data, ""course_id"")) { block_gismo\GISMOutil::gismo_error('err_course_not_set', $error_mode); exit; } // block instance id if (!property_exists($srv_data, ""block_instance_id"")) { block_gismo\GISMOutil::gismo_error('err_block_instance_id_not_set', $error_mode); exit; } // check authentication switch ($error_mode) { case ""json"": try { require_login($srv_data->course_id, false, NULL, true, true); } catch (Exception $e) { block_gismo\GISMOutil::gismo_error(""err_authentication"", $error_mode); exit; } break; case ""moodle"": default: require_login(); break; } // extract the course if (!$course = $DB->get_record(""course"", array(""id"" => intval($srv_data->course_id)))) { block_gismo\GISMOutil::gismo_error('err_course_not_set', $error_mode); exit; } // context $context_obj = context_block::instance(intval($srv_data->block_instance_id)); //Get block_gismo settings $gismoconfig = get_config('block_gismo'); if ($gismoconfig->student_reporting === ""false"") { // check authorization require_capability('block/gismo:view', $context_obj); } // get gismo settings $gismo_settings = $DB->get_field(""block_instances"", ""configdata"", array(""id"" => intval($srv_data->block_instance_id))); if (is_null($gismo_settings) OR $gismo_settings === """") { $gismo_settings = get_object_vars(block_gismo\GISMOutil::get_default_options()); } else { $gismo_settings = get_object_vars(unserialize(base64_decode($gismo_settings))); if (is_array($gismo_settings) AND count($gismo_settings) > 0) { foreach ($gismo_settings as $key => $value) { if (is_numeric($value)) { if (strval(intval($value)) === strval($value)) { $gismo_settings[$key] = intval($value); } else if (strval(floatval($value)) === strval($value)) { $gismo_settings[$key] = floatval($value); } } } } // include_hidden_items if (!array_key_exists(""include_hidden_items"", $gismo_settings)) { $gismo_settings[""include_hidden_items""] = 1; } } $block_gismo_config = json_encode($gismo_settings); // actor (teacher or student) $actor = ""student""; if (has_capability(""block/gismo:trackuser"", $context_obj)) { $actor = ""student""; } if (has_capability(""block/gismo:trackteacher"", $context_obj)) { $actor = ""teacher""; } ?> ",0 "t in compliance with the License. * You may obtain a copy of the License at * * https://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. */ package jetbrains.exodus.io; import jetbrains.exodus.core.dataStructures.Pair; import jetbrains.exodus.env.Environment; import jetbrains.exodus.env.EnvironmentConfig; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ServiceLoader; /** * Service provider interface for creation instances of {@linkplain DataReader} and {@linkplain DataWriter}. * {@linkplain DataReader} and {@linkplain DataWriter} are used by {@code Log} implementation to perform basic * operations with {@linkplain Block blocks} ({@code .xd} files) and basic read/write/delete operations. * * Service provider interface is identified by a fully-qualified name of its implementation. When opening an * {@linkplain Environment}, {@linkplain #DEFAULT_READER_WRITER_PROVIDER} is used as default provide name. To use a * custom I/O provider, specify its fully-qualified name as a parameter of {@linkplain EnvironmentConfig#setLogDataReaderWriterProvider}. * * On {@linkplain Environment} creation new instance of {@code DataReaderWriterProvider} is created. * * @see Block * @see DataReader * @see DataWriter * @see EnvironmentConfig#getLogDataReaderWriterProvider * @see EnvironmentConfig#setLogDataReaderWriterProvider * @since 1.3.0 */ public abstract class DataReaderWriterProvider { /** * Fully-qualified name of default {@code DataReaderWriteProvider}. */ public static final String DEFAULT_READER_WRITER_PROVIDER = ""jetbrains.exodus.io.FileDataReaderWriterProvider""; /** * Fully-qualified name of read-only watching {@code DataReaderWriteProvider}. */ public static final String WATCHING_READER_WRITER_PROVIDER = ""jetbrains.exodus.io.WatchingFileDataReaderWriterProvider""; /** * Fully-qualified name of in-memory {@code DataReaderWriteProvider}. */ public static final String IN_MEMORY_READER_WRITER_PROVIDER = ""jetbrains.exodus.io.MemoryDataReaderWriterProvider""; /** * Creates pair of new instances of {@linkplain DataReader} and {@linkplain DataWriter} by specified location. * What is location depends on the implementation of {@code DataReaderWriterProvider}, e.g. for {@code FileDataReaderWriterProvider} * location is a full path on local file system where the database is located. * * @param location identifies the database in this {@code DataReaderWriterProvider} * @return pair of new instances of {@linkplain DataReader} and {@linkplain DataWriter} */ public abstract Pair newReaderWriter(@NotNull final String location); /** * Returns {@code true} if the {@code DataReaderWriterProvider} creates in-memory {@linkplain DataReader} and {@linkplain DataWriter}. * * @return {@code true} if the {@code DataReaderWriterProvider} creates in-memory {@linkplain DataReader} and {@linkplain DataWriter} */ public boolean isInMemory() { return false; } /** * Returns {@code true} if the {@code DataReaderWriterProvider} creates read-only {@linkplain DataWriter}. * * @return {@code true} if the {@code DataReaderWriterProvider} creates read-only {@linkplain DataWriter} */ public boolean isReadonly() { return false; } /** * Callback method which is called when an environment is been opened/created. Can be used in implementation of * the {@code DataReaderWriterProvider} to access directly an {@linkplain Environment} instance, * its {@linkplain Environment#getEnvironmentConfig() config}, etc. Creation of {@code environment} is not * completed when the method is called. * * @param environment {@linkplain Environment} instance which is been opened/created using this * {@code DataReaderWriterProvider} */ public void onEnvironmentCreated(@NotNull final Environment environment) { } /** * Gets a {@code DataReaderWriterProvider} implementation by specified provider name. * * @param providerName fully-qualified name of {@code DataReaderWriterProvider} implementation * @return {@code DataReaderWriterProvider} implementation or {@code null} if the service could not be loaded */ @Nullable public static DataReaderWriterProvider getProvider(@NotNull final String providerName) { ServiceLoader serviceLoader = ServiceLoader.load(DataReaderWriterProvider.class); if (!serviceLoader.iterator().hasNext()) { serviceLoader = ServiceLoader.load(DataReaderWriterProvider.class, DataReaderWriterProvider.class.getClassLoader()); } for (DataReaderWriterProvider provider : serviceLoader) { if (provider.getClass().getCanonicalName().equalsIgnoreCase(providerName)) { return provider; } } return null; } } ",0 "is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package org.b3log.symphony.service; import java.util.List; import java.util.Locale; import javax.inject.Inject; import org.apache.commons.lang.StringUtils; import org.b3log.latke.Keys; import org.b3log.latke.event.Event; import org.b3log.latke.event.EventException; import org.b3log.latke.event.EventManager; import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Logger; import org.b3log.latke.model.User; import org.b3log.latke.repository.RepositoryException; import org.b3log.latke.repository.Transaction; import org.b3log.latke.repository.annotation.Transactional; import org.b3log.latke.service.LangPropsService; import org.b3log.latke.service.ServiceException; import org.b3log.latke.service.annotation.Service; import org.b3log.latke.util.Ids; import org.b3log.symphony.event.EventTypes; import org.b3log.symphony.model.Article; import org.b3log.symphony.model.Comment; import org.b3log.symphony.model.Common; import org.b3log.symphony.model.Liveness; import org.b3log.symphony.model.Notification; import org.b3log.symphony.model.Option; import org.b3log.symphony.model.Pointtransfer; import org.b3log.symphony.model.Reward; import org.b3log.symphony.model.Role; import org.b3log.symphony.model.Tag; import org.b3log.symphony.model.UserExt; import org.b3log.symphony.repository.ArticleRepository; import org.b3log.symphony.repository.CommentRepository; import org.b3log.symphony.repository.NotificationRepository; import org.b3log.symphony.repository.OptionRepository; import org.b3log.symphony.repository.TagArticleRepository; import org.b3log.symphony.repository.TagRepository; import org.b3log.symphony.repository.UserRepository; import org.b3log.symphony.util.Emotions; import org.b3log.symphony.util.Symphonys; import org.json.JSONObject; /** * Comment management service. * * @author Liang Ding * @version 2.12.10.19, Feb 2, 2017 * @since 0.2.0 */ @Service public class CommentMgmtService { /** * Logger. */ private static final Logger LOGGER = Logger.getLogger(CommentMgmtService.class.getName()); /** * Comment repository. */ @Inject private CommentRepository commentRepository; /** * Article repository. */ @Inject private ArticleRepository articleRepository; /** * Option repository. */ @Inject private OptionRepository optionRepository; /** * Tag repository. */ @Inject private TagRepository tagRepository; /** * Tag-Article repository. */ @Inject private TagArticleRepository tagArticleRepository; /** * User repository. */ @Inject private UserRepository userRepository; /** * Notification repository. */ @Inject private NotificationRepository notificationRepository; /** * Event manager. */ @Inject private EventManager eventManager; /** * Language service. */ @Inject private LangPropsService langPropsService; /** * Pointtransfer management service. */ @Inject private PointtransferMgmtService pointtransferMgmtService; /** * Reward management service. */ @Inject private RewardMgmtService rewardMgmtService; /** * Reward query service. */ @Inject private RewardQueryService rewardQueryService; /** * Notification management service. */ @Inject private NotificationMgmtService notificationMgmtService; /** * Liveness management service. */ @Inject private LivenessMgmtService livenessMgmtService; /** * Removes a comment specified with the given comment id. * * @param commentId the given comment id */ @Transactional public void removeComment(final String commentId) { try { final JSONObject comment = commentRepository.get(commentId); if (null == comment) { return; } final String articleId = comment.optString(Comment.COMMENT_ON_ARTICLE_ID); final JSONObject article = articleRepository.get(articleId); article.put(Article.ARTICLE_COMMENT_CNT, article.optInt(Article.ARTICLE_COMMENT_CNT) - 1); // Just clear latest time and commenter name, do not get the real latest comment to update article.put(Article.ARTICLE_LATEST_CMT_TIME, 0); article.put(Article.ARTICLE_LATEST_CMTER_NAME, """"); articleRepository.update(articleId, article); final String commentAuthorId = comment.optString(Comment.COMMENT_AUTHOR_ID); final JSONObject commenter = userRepository.get(commentAuthorId); commenter.put(UserExt.USER_COMMENT_COUNT, commenter.optInt(UserExt.USER_COMMENT_COUNT) - 1); userRepository.update(commentAuthorId, commenter); commentRepository.remove(comment.optString(Keys.OBJECT_ID)); final JSONObject commentCntOption = optionRepository.get(Option.ID_C_STATISTIC_CMT_COUNT); commentCntOption.put(Option.OPTION_VALUE, commentCntOption.optInt(Option.OPTION_VALUE) - 1); optionRepository.update(Option.ID_C_STATISTIC_CMT_COUNT, commentCntOption); notificationRepository.removeByDataId(commentId); } catch (final Exception e) { LOGGER.log(Level.ERROR, ""Removes a comment error [id="" + commentId + ""]"", e); } } /** * A user specified by the given sender id thanks the author of a comment specified by the given comment id. * * @param commentId the given comment id * @param senderId the given sender id * @throws ServiceException service exception */ public void thankComment(final String commentId, final String senderId) throws ServiceException { try { final JSONObject comment = commentRepository.get(commentId); if (null == comment) { return; } if (Comment.COMMENT_STATUS_C_INVALID == comment.optInt(Comment.COMMENT_STATUS)) { return; } final JSONObject sender = userRepository.get(senderId); if (null == sender) { return; } if (UserExt.USER_STATUS_C_VALID != sender.optInt(UserExt.USER_STATUS)) { return; } final String receiverId = comment.optString(Comment.COMMENT_AUTHOR_ID); final JSONObject receiver = userRepository.get(receiverId); if (null == receiver) { return; } if (UserExt.USER_STATUS_C_VALID != receiver.optInt(UserExt.USER_STATUS)) { return; } if (receiverId.equals(senderId)) { throw new ServiceException(langPropsService.get(""thankSelfLabel"")); } final int rewardPoint = Symphonys.getInt(""pointThankComment""); if (rewardQueryService.isRewarded(senderId, commentId, Reward.TYPE_C_COMMENT)) { return; } final String rewardId = Ids.genTimeMillisId(); if (Comment.COMMENT_ANONYMOUS_C_PUBLIC == comment.optInt(Comment.COMMENT_ANONYMOUS)) { final boolean succ = null != pointtransferMgmtService.transfer(senderId, receiverId, Pointtransfer.TRANSFER_TYPE_C_COMMENT_REWARD, rewardPoint, rewardId, System.currentTimeMillis()); if (!succ) { throw new ServiceException(langPropsService.get(""transferFailLabel"")); } } final JSONObject reward = new JSONObject(); reward.put(Keys.OBJECT_ID, rewardId); reward.put(Reward.SENDER_ID, senderId); reward.put(Reward.DATA_ID, commentId); reward.put(Reward.TYPE, Reward.TYPE_C_COMMENT); rewardMgmtService.addReward(reward); final JSONObject notification = new JSONObject(); notification.put(Notification.NOTIFICATION_USER_ID, receiverId); notification.put(Notification.NOTIFICATION_DATA_ID, rewardId); notificationMgmtService.addCommentThankNotification(notification); livenessMgmtService.incLiveness(senderId, Liveness.LIVENESS_THANK); } catch (final RepositoryException e) { LOGGER.log(Level.ERROR, ""Thanks a comment[id="" + commentId + ""] failed"", e); throw new ServiceException(e); } } /** * Adds a comment with the specified request json object. * * @param requestJSONObject the specified request json object, for example,
             * {
             *     ""commentContent"": """",
             *     ""commentAuthorId"": """",
             *     ""commentOnArticleId"": """",
             *     ""commentOriginalCommentId"": """", // optional
             *     ""clientCommentId"": """" // optional,
             *     ""commentAuthorName"": """" // If from client
             *     ""commenter"": {
             *         // User model
             *     },
             *     ""commentIP"": """", // optional, default to """"
             *     ""commentUA"": """", // optional, default to """"
             *     ""commentAnonymous"": int, // optional, default to 0 (public)
             *     ""userCommentViewMode"": int
             * }
             * 
        , see {@link Comment} for more details * * @return generated comment id * @throws ServiceException service exception */ public synchronized String addComment(final JSONObject requestJSONObject) throws ServiceException { final long currentTimeMillis = System.currentTimeMillis(); final JSONObject commenter = requestJSONObject.optJSONObject(Comment.COMMENT_T_COMMENTER); final String commentAuthorId = requestJSONObject.optString(Comment.COMMENT_AUTHOR_ID); final boolean fromClient = requestJSONObject.has(Comment.COMMENT_CLIENT_COMMENT_ID); final String articleId = requestJSONObject.optString(Comment.COMMENT_ON_ARTICLE_ID); final String ip = requestJSONObject.optString(Comment.COMMENT_IP); String ua = requestJSONObject.optString(Comment.COMMENT_UA); final int commentAnonymous = requestJSONObject.optInt(Comment.COMMENT_ANONYMOUS); final int commentViewMode = requestJSONObject.optInt(UserExt.USER_COMMENT_VIEW_MODE); if (currentTimeMillis - commenter.optLong(UserExt.USER_LATEST_CMT_TIME) < Symphonys.getLong(""minStepCmtTime"") && !Role.ROLE_ID_C_ADMIN.equals(commenter.optString(User.USER_ROLE)) && !UserExt.DEFAULT_CMTER_ROLE.equals(commenter.optString(User.USER_ROLE))) { LOGGER.log(Level.WARN, ""Adds comment too frequent [userName={0}]"", commenter.optString(User.USER_NAME)); throw new ServiceException(langPropsService.get(""tooFrequentCmtLabel"")); } final String commenterName = commenter.optString(User.USER_NAME); JSONObject article = null; try { // check if admin allow to add comment final JSONObject option = optionRepository.get(Option.ID_C_MISC_ALLOW_ADD_COMMENT); if (!""0"".equals(option.optString(Option.OPTION_VALUE))) { throw new ServiceException(langPropsService.get(""notAllowAddCommentLabel"")); } final int balance = commenter.optInt(UserExt.USER_POINT); if (Comment.COMMENT_ANONYMOUS_C_ANONYMOUS == commentAnonymous) { final int anonymousPoint = Symphonys.getInt(""anonymous.point""); if (balance < anonymousPoint) { String anonymousEnabelPointLabel = langPropsService.get(""anonymousEnabelPointLabel""); anonymousEnabelPointLabel = anonymousEnabelPointLabel.replace(""${point}"", String.valueOf(anonymousPoint)); throw new ServiceException(anonymousEnabelPointLabel); } } article = articleRepository.get(articleId); if (!fromClient && !TuringQueryService.ROBOT_NAME.equals(commenterName)) { int pointSum = Pointtransfer.TRANSFER_SUM_C_ADD_COMMENT; // Point final String articleAuthorId = article.optString(Article.ARTICLE_AUTHOR_ID); if (articleAuthorId.equals(commentAuthorId)) { pointSum = Pointtransfer.TRANSFER_SUM_C_ADD_SELF_ARTICLE_COMMENT; } if (balance - pointSum < 0) { throw new ServiceException(langPropsService.get(""insufficientBalanceLabel"")); } } } catch (final RepositoryException e) { throw new ServiceException(e); } final int articleAnonymous = article.optInt(Article.ARTICLE_ANONYMOUS); final Transaction transaction = commentRepository.beginTransaction(); try { article.put(Article.ARTICLE_COMMENT_CNT, article.optInt(Article.ARTICLE_COMMENT_CNT) + 1); article.put(Article.ARTICLE_LATEST_CMTER_NAME, commenter.optString(User.USER_NAME)); if (Comment.COMMENT_ANONYMOUS_C_ANONYMOUS == commentAnonymous) { article.put(Article.ARTICLE_LATEST_CMTER_NAME, UserExt.ANONYMOUS_USER_NAME); } article.put(Article.ARTICLE_LATEST_CMT_TIME, currentTimeMillis); final String ret = Ids.genTimeMillisId(); final JSONObject comment = new JSONObject(); comment.put(Keys.OBJECT_ID, ret); String content = requestJSONObject.optString(Comment.COMMENT_CONTENT). replace(""_esc_enter_88250_"", ""
        ""); // Solo client escape comment.put(Comment.COMMENT_AUTHOR_ID, commentAuthorId); comment.put(Comment.COMMENT_ON_ARTICLE_ID, articleId); if (fromClient) { comment.put(Comment.COMMENT_CLIENT_COMMENT_ID, requestJSONObject.optString(Comment.COMMENT_CLIENT_COMMENT_ID)); // Appends original commenter name final String authorName = requestJSONObject.optString(Comment.COMMENT_T_AUTHOR_NAME); content += "" by "" + authorName + """"; } final String originalCmtId = requestJSONObject.optString(Comment.COMMENT_ORIGINAL_COMMENT_ID); comment.put(Comment.COMMENT_ORIGINAL_COMMENT_ID, originalCmtId); if (StringUtils.isNotBlank(originalCmtId)) { final JSONObject originalCmt = commentRepository.get(originalCmtId); final int originalCmtReplyCnt = originalCmt.optInt(Comment.COMMENT_REPLY_CNT); originalCmt.put(Comment.COMMENT_REPLY_CNT, originalCmtReplyCnt + 1); commentRepository.update(originalCmtId, originalCmt); } content = Emotions.toAliases(content); // content = StringUtils.trim(content) + "" ""; https://github.com/b3log/symphony/issues/389 content = content.replace(langPropsService.get(""uploadingLabel"", Locale.SIMPLIFIED_CHINESE), """"); content = content.replace(langPropsService.get(""uploadingLabel"", Locale.US), """"); comment.put(Comment.COMMENT_CONTENT, content); comment.put(Comment.COMMENT_CREATE_TIME, System.currentTimeMillis()); comment.put(Comment.COMMENT_SHARP_URL, ""/article/"" + articleId + ""#"" + ret); comment.put(Comment.COMMENT_STATUS, Comment.COMMENT_STATUS_C_VALID); comment.put(Comment.COMMENT_IP, ip); if (StringUtils.length(ua) > Common.MAX_LENGTH_UA) { LOGGER.log(Level.WARN, ""UA is too long ["" + ua + ""]""); ua = StringUtils.substring(ua, 0, Common.MAX_LENGTH_UA); } comment.put(Comment.COMMENT_UA, ua); comment.put(Comment.COMMENT_ANONYMOUS, commentAnonymous); final JSONObject cmtCntOption = optionRepository.get(Option.ID_C_STATISTIC_CMT_COUNT); final int cmtCnt = cmtCntOption.optInt(Option.OPTION_VALUE); cmtCntOption.put(Option.OPTION_VALUE, String.valueOf(cmtCnt + 1)); articleRepository.update(articleId, article); // Updates article comment count, latest commenter name and time optionRepository.update(Option.ID_C_STATISTIC_CMT_COUNT, cmtCntOption); // Updates global comment count // Updates tag comment count and User-Tag relation final String tagsString = article.optString(Article.ARTICLE_TAGS); final String[] tagStrings = tagsString.split("",""); for (int i = 0; i < tagStrings.length; i++) { final String tagTitle = tagStrings[i].trim(); final JSONObject tag = tagRepository.getByTitle(tagTitle); tag.put(Tag.TAG_COMMENT_CNT, tag.optInt(Tag.TAG_COMMENT_CNT) + 1); tag.put(Tag.TAG_RANDOM_DOUBLE, Math.random()); tagRepository.update(tag.optString(Keys.OBJECT_ID), tag); } // Updates user comment count, latest comment time commenter.put(UserExt.USER_COMMENT_COUNT, commenter.optInt(UserExt.USER_COMMENT_COUNT) + 1); commenter.put(UserExt.USER_LATEST_CMT_TIME, currentTimeMillis); userRepository.update(commenter.optString(Keys.OBJECT_ID), commenter); comment.put(Comment.COMMENT_GOOD_CNT, 0); comment.put(Comment.COMMENT_BAD_CNT, 0); comment.put(Comment.COMMENT_SCORE, 0D); comment.put(Comment.COMMENT_REPLY_CNT, 0); // Adds the comment final String commentId = commentRepository.add(comment); // Updates tag-article relation stat. final List tagArticleRels = tagArticleRepository.getByArticleId(articleId); for (final JSONObject tagArticleRel : tagArticleRels) { tagArticleRel.put(Article.ARTICLE_LATEST_CMT_TIME, currentTimeMillis); tagArticleRel.put(Article.ARTICLE_COMMENT_CNT, article.optInt(Article.ARTICLE_COMMENT_CNT)); tagArticleRepository.update(tagArticleRel.optString(Keys.OBJECT_ID), tagArticleRel); } transaction.commit(); if (!fromClient && Comment.COMMENT_ANONYMOUS_C_PUBLIC == commentAnonymous && Article.ARTICLE_ANONYMOUS_C_PUBLIC == articleAnonymous && !TuringQueryService.ROBOT_NAME.equals(commenterName)) { // Point final String articleAuthorId = article.optString(Article.ARTICLE_AUTHOR_ID); if (articleAuthorId.equals(commentAuthorId)) { pointtransferMgmtService.transfer(commentAuthorId, Pointtransfer.ID_C_SYS, Pointtransfer.TRANSFER_TYPE_C_ADD_COMMENT, Pointtransfer.TRANSFER_SUM_C_ADD_SELF_ARTICLE_COMMENT, commentId, System.currentTimeMillis()); } else { pointtransferMgmtService.transfer(commentAuthorId, articleAuthorId, Pointtransfer.TRANSFER_TYPE_C_ADD_COMMENT, Pointtransfer.TRANSFER_SUM_C_ADD_COMMENT, commentId, System.currentTimeMillis()); } livenessMgmtService.incLiveness(commentAuthorId, Liveness.LIVENESS_COMMENT); } // Event final JSONObject eventData = new JSONObject(); eventData.put(Comment.COMMENT, comment); eventData.put(Common.FROM_CLIENT, fromClient); eventData.put(Article.ARTICLE, article); eventData.put(UserExt.USER_COMMENT_VIEW_MODE, commentViewMode); try { eventManager.fireEventAsynchronously(new Event(EventTypes.ADD_COMMENT_TO_ARTICLE, eventData)); } catch (final EventException e) { LOGGER.log(Level.ERROR, e.getMessage(), e); } return ret; } catch (final RepositoryException e) { if (transaction.isActive()) { transaction.rollback(); } LOGGER.log(Level.ERROR, ""Adds a comment failed"", e); throw new ServiceException(e); } } /** * Updates the specified comment by the given comment id. * * @param commentId the given comment id * @param comment the specified comment * @throws ServiceException service exception */ public void updateComment(final String commentId, final JSONObject comment) throws ServiceException { final Transaction transaction = commentRepository.beginTransaction(); try { String content = comment.optString(Comment.COMMENT_CONTENT); content = Emotions.toAliases(content); content = StringUtils.trim(content) + "" ""; content = content.replace(langPropsService.get(""uploadingLabel"", Locale.SIMPLIFIED_CHINESE), """"); content = content.replace(langPropsService.get(""uploadingLabel"", Locale.US), """"); comment.put(Comment.COMMENT_CONTENT, content); commentRepository.update(commentId, comment); transaction.commit(); } catch (final RepositoryException e) { if (transaction.isActive()) { transaction.rollback(); } LOGGER.log(Level.ERROR, ""Updates a comment[id="" + commentId + ""] failed"", e); throw new ServiceException(e); } } } ",0 "y * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef CHECKHEADER_SLIB_UI_MENU #define CHECKHEADER_SLIB_UI_MENU #include ""definition.h"" #include ""../core/object.h"" #include ""../core/string.h"" #include ""../core/function.h"" #include ""../graphics/bitmap.h"" #include ""event.h"" namespace slib { class Menu; class MenuItem : public Object { SLIB_DECLARE_OBJECT protected: MenuItem(); ~MenuItem(); public: Ref getParent() const; String getText() const; virtual void setText(const String& text); const KeycodeAndModifiers& getShortcutKey() const; virtual void setShortcutKey(const KeycodeAndModifiers& km); const KeycodeAndModifiers& getSecondShortcutKey() const; virtual void setSecondShortcutKey(const KeycodeAndModifiers& km); sl_bool isEnabled() const; virtual void setEnabled(sl_bool flag); sl_bool isChecked() const; virtual void setChecked(sl_bool flag); Ref getIcon() const; virtual void setIcon(const Ref& icon); Ref getCheckedIcon() const; virtual void setCheckedIcon(const Ref& icon); Ref getSubmenu() const; virtual void setSubmenu(const Ref& menu); virtual sl_bool isSeparator() const; static Ref createSeparator(); sl_bool processShortcutKey(const KeycodeAndModifiers& km); public: SLIB_PROPERTY_FUNCTION(void(), Action) protected: WeakRef m_parent; AtomicString m_text; KeycodeAndModifiers m_shortcutKey; KeycodeAndModifiers m_secondShortcutKey; sl_bool m_flagEnabled; sl_bool m_flagChecked; AtomicRef m_icon; AtomicRef m_checkedIcon; AtomicRef m_submenu; }; class MenuItemParam { public: String text; KeycodeAndModifiers shortcutKey; KeycodeAndModifiers secondShortcutKey; sl_bool flagEnabled; sl_bool flagChecked; Ref icon; Ref checkedIcon; Ref submenu; Function action; public: MenuItemParam(); SLIB_DECLARE_CLASS_DEFAULT_MEMBERS(MenuItemParam) }; class Menu : public Object { SLIB_DECLARE_OBJECT protected: Menu(); ~Menu(); public: static Ref create(sl_bool flagPopup = sl_false); static Ref createPopup(); sl_uint32 getMenuItemsCount() const; Ref getMenuItem(sl_uint32 index) const; virtual Ref addMenuItem(const MenuItemParam& param) = 0; virtual Ref insertMenuItem(sl_uint32 index, const MenuItemParam& param) = 0; virtual Ref addSeparator() = 0; virtual Ref insertSeparator(sl_uint32 index) = 0; virtual void removeMenuItem(sl_uint32 index) = 0; virtual void removeMenuItem(const Ref& item) = 0; virtual void show(sl_ui_pos x, sl_ui_pos y) = 0; void show(const UIPoint& pt); Ref addMenuItem(const String& title); Ref addMenuItem(const String& title, const Ref& icon); Ref addMenuItem(const String& title, const Ref& icon, const Ref& checkedIcon); Ref addMenuItem(const String& title, const KeycodeAndModifiers& shortcutKey); Ref addMenuItem(const String& title, const KeycodeAndModifiers& shortcutKey, const Ref& icon); Ref addMenuItem(const String& title, const KeycodeAndModifiers& shortcutKey, const Ref& icon, const Ref& checkedIcon); Ref addSubmenu(Ref& submenu, const String& title); Ref addSubmenu(Ref& submenu, const String& title, const Ref& icon); Ref addSubmenu(Ref& submenu, const String& title, const Ref& icon, const Ref& checkedIcon); sl_bool processShortcutKey(const KeycodeAndModifiers& km); protected: CList< Ref > m_items; }; } #endif ",0 " licenses@systap.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* * Created on Apr 18, 2009 */ package com.bigdata.relation.accesspath; import junit.framework.TestCase2; import com.bigdata.striterator.IChunkedIterator; /** * @author Bryan Thompson * @version $Id$ */ public class TestUnsynchronizedUnboundedChunkBuffer extends TestCase2 { /** * */ public TestUnsynchronizedUnboundedChunkBuffer() { } /** * @param arg0 */ public TestUnsynchronizedUnboundedChunkBuffer(String arg0) { super(arg0); } /** * Test empty iterator. */ public void test_emptyIterator() { final UnsynchronizedUnboundedChunkBuffer buffer = new UnsynchronizedUnboundedChunkBuffer( 3/* chunkCapacity */, String.class); // the iterator is initially empty. assertFalse(buffer.iterator().hasNext()); } /** * Verify that elements are flushed when an iterator is requested so * that they will be visited by the iterator. */ public void test_bufferFlushedByIterator() { final UnsynchronizedUnboundedChunkBuffer buffer = new UnsynchronizedUnboundedChunkBuffer( 3/* chunkCapacity */, String.class); buffer.add(""a""); assertSameIterator(new String[] { ""a"" }, buffer.iterator()); } /** * Verify that the iterator has snapshot semantics. */ public void test_snapshotIterator() { final UnsynchronizedUnboundedChunkBuffer buffer = new UnsynchronizedUnboundedChunkBuffer( 3/* chunkCapacity */, String.class); buffer.add(""a""); buffer.add(""b""); buffer.add(""c""); // visit once. assertSameIterator(new String[] { ""a"", ""b"", ""c"" }, buffer.iterator()); // will visit again. assertSameIterator(new String[] { ""a"", ""b"", ""c"" }, buffer.iterator()); } /** * Verify iterator visits chunks as placed onto the queue. */ public void test_chunkedIterator() { final UnsynchronizedUnboundedChunkBuffer buffer = new UnsynchronizedUnboundedChunkBuffer( 3/* chunkCapacity */, String.class); buffer.add(""a""); buffer.flush(); buffer.add(""b""); buffer.add(""c""); // visit once. assertSameChunkedIterator(new String[][] { new String[] { ""a"" }, new String[] { ""b"", ""c"" } }, buffer.iterator()); } /** * Test class of chunks created by the iterator (the array class should be * taken from the first visited chunk's class). */ // @SuppressWarnings(""unchecked"") public void test_chunkClass() { final UnsynchronizedUnboundedChunkBuffer buffer = new UnsynchronizedUnboundedChunkBuffer( 3/* chunkCapacity */, String.class); buffer.add(""a""); buffer.flush(); buffer.add(""b""); buffer.add(""c""); // visit once. assertSameChunkedIterator(new String[][] { new String[] { ""a"" }, new String[] { ""b"", ""c"" } }, buffer.iterator()); } /** * Verify that the iterator visits the expected chunks in the expected * order. * * @param * @param chunks * @param itr */ protected void assertSameChunkedIterator(final E[][] chunks, final IChunkedIterator itr) { for(E[] chunk : chunks) { assertTrue(itr.hasNext()); final E[] actual = itr.nextChunk(); assertSameArray(chunk, actual); } assertFalse(itr.hasNext()); } } ",0 " * * ------------------------------------------------------------------------- * * Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors) * * GNSS-SDR is a software defined Global Navigation * Satellite Systems receiver * * This file is part of GNSS-SDR. * * GNSS-SDR is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GNSS-SDR is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNSS-SDR. If not, see . * * ------------------------------------------------------------------------- */ #ifndef GNSS_SDR_GPS_L1_CA_H_ #define GNSS_SDR_GPS_L1_CA_H_ #include #include // std::pair #include ""MATH_CONSTANTS.h"" #include ""gnss_frequencies.h"" #define GPS_L1_CA_CN0_ESTIMATION_SAMPLES 20 #define GPS_L1_CA_MINIMUM_VALID_CN0 25 #define GPS_L1_CA_MAXIMUM_LOCK_FAIL_COUNTER 50 #define GPS_L1_CA_CARRIER_LOCK_THRESHOLD 0.85 // Physical constants const double GPS_C_m_s = SPEED_OF_LIGHT; //!< The speed of light, [m/s] const double GPS_C_m_ms = 299792.4580; //!< The speed of light, [m/ms] const double GPS_PI = 3.1415926535898; //!< Pi as defined in IS-GPS-200E const double GPS_TWO_PI = 6.283185307179586;//!< 2Pi as defined in IS-GPS-200E const double OMEGA_EARTH_DOT = DEFAULT_OMEGA_EARTH_DOT; //!< Earth rotation rate, [rad/s] const double GM = 3.986005e14; //!< Universal gravitational constant times the mass of the Earth, [m^3/s^2] const double F = -4.442807633e-10; //!< Constant, [s/(m)^(1/2)] // carrier and code frequencies const double GPS_L1_FREQ_HZ = FREQ1; //!< L1 [Hz] const double GPS_L1_CA_CODE_RATE_HZ = 1.023e6; //!< GPS L1 C/A code rate [chips/s] const double GPS_L1_CA_CODE_LENGTH_CHIPS = 1023.0; //!< GPS L1 C/A code length [chips] const double GPS_L1_CA_CODE_PERIOD = 0.001; //!< GPS L1 C/A code period [seconds] const double GPS_L1_CA_CHIP_PERIOD = 9.7752e-07; //!< GPS L1 C/A chip period [seconds] /*! * \brief Maximum Time-Of-Arrival (TOA) difference between satellites for a receiver operated on Earth surface is 20 ms * * According to the GPS orbit model described in [1] Pag. 32. * It should be taken into account to set the buffer size for the PRN start timestamp in the pseudoranges block. * [1] J. Bao-Yen Tsui, Fundamentals of Global Positioning System Receivers. A Software Approach, John Wiley & Sons, * Inc., Hoboken, NJ, 2nd edition, 2005. */ const double MAX_TOA_DELAY_MS = 20; //#define NAVIGATION_SOLUTION_RATE_MS 1000 // this cannot go here const double GPS_STARTOFFSET_ms = 68.802; //[ms] Initial sign. travel time (this cannot go here) // OBSERVABLE HISTORY DEEP FOR INTERPOLATION const int GPS_L1_CA_HISTORY_DEEP = 500; // NAVIGATION MESSAGE DEMODULATION AND DECODING #define GPS_PREAMBLE {1, 0, 0, 0, 1, 0, 1, 1} const int GPS_CA_PREAMBLE_LENGTH_BITS = 8; const int GPS_CA_PREAMBLE_LENGTH_SYMBOLS = 160; const double GPS_CA_PREAMBLE_DURATION_S = 0.160; const int GPS_CA_TELEMETRY_RATE_BITS_SECOND = 50; //!< NAV message bit rate [bits/s] const int GPS_CA_TELEMETRY_SYMBOLS_PER_BIT = 20; const int GPS_CA_TELEMETRY_RATE_SYMBOLS_SECOND = GPS_CA_TELEMETRY_RATE_BITS_SECOND*GPS_CA_TELEMETRY_SYMBOLS_PER_BIT; //!< NAV message bit rate [symbols/s] const int GPS_WORD_LENGTH = 4; //!< CRC + GPS WORD (-2 -1 0 ... 29) Bits = 4 bytes const int GPS_SUBFRAME_LENGTH = 40; //!< GPS_WORD_LENGTH x 10 = 40 bytes const int GPS_SUBFRAME_BITS = 300; //!< Number of bits per subframe in the NAV message [bits] const int GPS_SUBFRAME_SECONDS = 6; //!< Subframe duration [seconds] const int GPS_SUBFRAME_MS = 6000; //!< Subframe duration [seconds] const int GPS_WORD_BITS = 30; //!< Number of bits per word in the NAV message [bits] // GPS NAVIGATION MESSAGE STRUCTURE // NAVIGATION MESSAGE FIELDS POSITIONS (from IS-GPS-200E Appendix II) // SUBFRAME 1-5 (TLM and HOW) const std::vector > TOW( { {31,17} } ); const std::vector > INTEGRITY_STATUS_FLAG({{23,1}}); const std::vector > ALERT_FLAG({{48,1}}); const std::vector > ANTI_SPOOFING_FLAG({{49,1}}); const std::vector > SUBFRAME_ID({{50,3}}); // SUBFRAME 1 const std::vector> GPS_WEEK({{61,10}}); const std::vector> CA_OR_P_ON_L2({{71,2}}); //* const std::vector> SV_ACCURACY({{73,4}}); const std::vector> SV_HEALTH ({{77,6}}); const std::vector> L2_P_DATA_FLAG ({{91,1}}); const std::vector> T_GD({{197,8}}); const double T_GD_LSB = TWO_N31; const std::vector> IODC({{83,2},{211,8}}); const std::vector> T_OC({{219,16}}); const double T_OC_LSB = TWO_P4; const std::vector> A_F2({{241,8}}); const double A_F2_LSB = TWO_N55; const std::vector> A_F1({{249,16}}); const double A_F1_LSB = TWO_N43; const std::vector> A_F0({{271,22}}); const double A_F0_LSB = TWO_N31; // SUBFRAME 2 const std::vector> IODE_SF2({{61,8}}); const std::vector> C_RS({{69,16}}); const double C_RS_LSB = TWO_N5; const std::vector> DELTA_N({{91,16}}); const double DELTA_N_LSB = PI_TWO_N43; const std::vector> M_0({{107,8},{121,24}}); const double M_0_LSB = PI_TWO_N31; const std::vector> C_UC({{151,16}}); const double C_UC_LSB = TWO_N29; const std::vector> E({{167,8},{181,24}}); const double E_LSB = TWO_N33; const std::vector> C_US({{211,16}}); const double C_US_LSB = TWO_N29; const std::vector> SQRT_A({{227,8},{241,24}}); const double SQRT_A_LSB = TWO_N19; const std::vector> T_OE({{271,16}}); const double T_OE_LSB = TWO_P4; const std::vector> FIT_INTERVAL_FLAG({{271,1}}); const std::vector> AODO({{272,5}}); const int AODO_LSB = 900; // SUBFRAME 3 const std::vector> C_IC({{61,16}}); const double C_IC_LSB = TWO_N29; const std::vector> OMEGA_0({{77,8},{91,24}}); const double OMEGA_0_LSB = PI_TWO_N31; const std::vector> C_IS({{121,16}}); const double C_IS_LSB = TWO_N29; const std::vector> I_0({{137,8},{151,24}}); const double I_0_LSB = PI_TWO_N31; const std::vector> C_RC({{181,16}}); const double C_RC_LSB = TWO_N5; const std::vector> OMEGA({{197,8},{211,24}}); const double OMEGA_LSB = PI_TWO_N31; const std::vector> OMEGA_DOT({{241,24}}); const double OMEGA_DOT_LSB = PI_TWO_N43; const std::vector> IODE_SF3({{271,8}}); const std::vector> I_DOT({{279,14}}); const double I_DOT_LSB = PI_TWO_N43; // SUBFRAME 4-5 const std::vector> SV_DATA_ID({{61,2}}); const std::vector> SV_PAGE({{63,6}}); // SUBFRAME 4 //! \todo read all pages of subframe 4 // Page 18 - Ionospheric and UTC data const std::vector> ALPHA_0({{69,8}}); const double ALPHA_0_LSB = TWO_N30; const std::vector> ALPHA_1({{77,8}}); const double ALPHA_1_LSB = TWO_N27; const std::vector> ALPHA_2({{91,8}}); const double ALPHA_2_LSB = TWO_N24; const std::vector> ALPHA_3({{99,8}}); const double ALPHA_3_LSB = TWO_N24; const std::vector> BETA_0({{107,8}}); const double BETA_0_LSB = TWO_P11; const std::vector> BETA_1({{121,8}}); const double BETA_1_LSB = TWO_P14; const std::vector> BETA_2({{129,8}}); const double BETA_2_LSB = TWO_P16; const std::vector> BETA_3({{137,8}}); const double BETA_3_LSB = TWO_P16; const std::vector> A_1({{151,24}}); const double A_1_LSB = TWO_N50; const std::vector> A_0({{181,24},{211,8}}); const double A_0_LSB = TWO_N30; const std::vector> T_OT({{219,8}}); const double T_OT_LSB = TWO_P12; const std::vector> WN_T({{227,8}}); const double WN_T_LSB = 1; const std::vector> DELTAT_LS({{241,8}}); const double DELTAT_LS_LSB = 1; const std::vector> WN_LSF({{249,8}}); const double WN_LSF_LSB = 1; const std::vector> DN({{257,8}}); const double DN_LSB = 1; const std::vector> DELTAT_LSF({{271,8}}); const double DELTAT_LSF_LSB = 1; // Page 25 - Antispoofing, SV config and SV health (PRN 25 -32) const std::vector> HEALTH_SV25({{229,6}}); const std::vector> HEALTH_SV26({{241,6}}); const std::vector> HEALTH_SV27({{247,6}}); const std::vector> HEALTH_SV28({{253,6}}); const std::vector> HEALTH_SV29({{259,6}}); const std::vector> HEALTH_SV30({{271,6}}); const std::vector> HEALTH_SV31({{277,6}}); const std::vector> HEALTH_SV32({{283,6}}); // SUBFRAME 5 //! \todo read all pages of subframe 5 // page 25 - Health (PRN 1 - 24) const std::vector> T_OA({{69,8}}); const double T_OA_LSB = TWO_P12; const std::vector> WN_A({{77,8}}); const std::vector> HEALTH_SV1({{91,6}}); const std::vector> HEALTH_SV2({{97,6}}); const std::vector> HEALTH_SV3({{103,6}}); const std::vector> HEALTH_SV4({{109,6}}); const std::vector> HEALTH_SV5({{121,6}}); const std::vector> HEALTH_SV6({{127,6}}); const std::vector> HEALTH_SV7({{133,6}}); const std::vector> HEALTH_SV8({{139,6}}); const std::vector> HEALTH_SV9({{151,6}}); const std::vector> HEALTH_SV10({{157,6}}); const std::vector> HEALTH_SV11({{163,6}}); const std::vector> HEALTH_SV12({{169,6}}); const std::vector> HEALTH_SV13({{181,6}}); const std::vector> HEALTH_SV14({{187,6}}); const std::vector> HEALTH_SV15({{193,6}}); const std::vector> HEALTH_SV16({{199,6}}); const std::vector> HEALTH_SV17({{211,6}}); const std::vector> HEALTH_SV18({{217,6}}); const std::vector> HEALTH_SV19({{223,6}}); const std::vector> HEALTH_SV20({{229,6}}); const std::vector> HEALTH_SV21({{241,6}}); const std::vector> HEALTH_SV22({{247,6}}); const std::vector> HEALTH_SV23({{253,6}}); const std::vector> HEALTH_SV24({{259,6}}); #endif /* GNSS_SDR_GPS_L1_CA_H_ */ ",0 " and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GRUB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GRUB. If not, see . */ #include #include #include #include #include #include #include extern grub_uint8_t grub_relocator_forward_start; extern grub_uint8_t grub_relocator_forward_end; extern grub_uint8_t grub_relocator_backward_start; extern grub_uint8_t grub_relocator_backward_end; extern void *grub_relocator_backward_dest; extern void *grub_relocator_backward_src; extern grub_size_t grub_relocator_backward_chunk_size; extern void *grub_relocator_forward_dest; extern void *grub_relocator_forward_src; extern grub_size_t grub_relocator_forward_chunk_size; extern grub_uint8_t grub_relocator16_start; extern grub_uint8_t grub_relocator16_end; extern grub_uint16_t grub_relocator16_cs; extern grub_uint16_t grub_relocator16_ip; extern grub_uint16_t grub_relocator16_ds; extern grub_uint16_t grub_relocator16_es; extern grub_uint16_t grub_relocator16_fs; extern grub_uint16_t grub_relocator16_gs; extern grub_uint16_t grub_relocator16_ss; extern grub_uint16_t grub_relocator16_sp; extern grub_uint32_t grub_relocator16_edx; extern grub_uint8_t grub_relocator32_start; extern grub_uint8_t grub_relocator32_end; extern grub_uint32_t grub_relocator32_eax; extern grub_uint32_t grub_relocator32_ebx; extern grub_uint32_t grub_relocator32_ecx; extern grub_uint32_t grub_relocator32_edx; extern grub_uint32_t grub_relocator32_eip; extern grub_uint32_t grub_relocator32_esp; extern grub_uint32_t grub_relocator32_ebp; extern grub_uint32_t grub_relocator32_esi; extern grub_uint32_t grub_relocator32_edi; extern grub_uint8_t grub_relocator64_start; extern grub_uint8_t grub_relocator64_end; extern grub_uint64_t grub_relocator64_rax; extern grub_uint64_t grub_relocator64_rbx; extern grub_uint64_t grub_relocator64_rcx; extern grub_uint64_t grub_relocator64_rdx; extern grub_uint64_t grub_relocator64_rip; extern grub_uint64_t grub_relocator64_rip_addr; extern grub_uint64_t grub_relocator64_rsp; extern grub_uint64_t grub_relocator64_rsi; extern grub_addr_t grub_relocator64_cr3; #define RELOCATOR_SIZEOF(x) (&grub_relocator##x##_end - &grub_relocator##x##_start) grub_size_t grub_relocator_align = 1; grub_size_t grub_relocator_forward_size; grub_size_t grub_relocator_backward_size; #ifdef __x86_64__ grub_size_t grub_relocator_jumper_size = 12; #else grub_size_t grub_relocator_jumper_size = 7; #endif void grub_cpu_relocator_init (void) { grub_relocator_forward_size = RELOCATOR_SIZEOF(_forward); grub_relocator_backward_size = RELOCATOR_SIZEOF(_backward); } void grub_cpu_relocator_jumper (void *rels, grub_addr_t addr) { grub_uint8_t *ptr; ptr = rels; #ifdef __x86_64__ /* movq imm64, %rax (for relocator) */ *(grub_uint8_t *) ptr = 0x48; ptr++; *(grub_uint8_t *) ptr = 0xb8; ptr++; *(grub_uint64_t *) ptr = addr; ptr += sizeof (grub_uint64_t); #else /* movl imm32, %eax (for relocator) */ *(grub_uint8_t *) ptr = 0xb8; ptr++; *(grub_uint32_t *) ptr = addr; ptr += sizeof (grub_uint32_t); #endif /* jmp $eax/$rax */ *(grub_uint8_t *) ptr = 0xff; ptr++; *(grub_uint8_t *) ptr = 0xe0; ptr++; } void grub_cpu_relocator_backward (void *ptr, void *src, void *dest, grub_size_t size) { grub_relocator_backward_dest = dest; grub_relocator_backward_src = src; grub_relocator_backward_chunk_size = size; grub_memmove (ptr, &grub_relocator_backward_start, RELOCATOR_SIZEOF (_backward)); } void grub_cpu_relocator_forward (void *ptr, void *src, void *dest, grub_size_t size) { grub_relocator_forward_dest = dest; grub_relocator_forward_src = src; grub_relocator_forward_chunk_size = size; grub_memmove (ptr, &grub_relocator_forward_start, RELOCATOR_SIZEOF (_forward)); } grub_err_t grub_relocator32_boot (struct grub_relocator *rel, struct grub_relocator32_state state) { grub_err_t err; void *relst; grub_relocator_chunk_t ch; err = grub_relocator_alloc_chunk_align (rel, &ch, 0, (0xffffffff - RELOCATOR_SIZEOF (32)) + 1, RELOCATOR_SIZEOF (32), 16, GRUB_RELOCATOR_PREFERENCE_NONE); if (err) return err; grub_relocator32_eax = state.eax; grub_relocator32_ebx = state.ebx; grub_relocator32_ecx = state.ecx; grub_relocator32_edx = state.edx; grub_relocator32_eip = state.eip; grub_relocator32_esp = state.esp; grub_relocator32_ebp = state.ebp; grub_relocator32_esi = state.esi; grub_relocator32_edi = state.edi; grub_memmove (get_virtual_current_address (ch), &grub_relocator32_start, RELOCATOR_SIZEOF (32)); err = grub_relocator_prepare_relocs (rel, get_physical_target_address (ch), &relst, NULL); if (err) return err; asm volatile (""cli""); ((void (*) (void)) relst) (); /* Not reached. */ return GRUB_ERR_NONE; } grub_err_t grub_relocator16_boot (struct grub_relocator *rel, struct grub_relocator16_state state) { grub_err_t err; void *relst; grub_relocator_chunk_t ch; err = grub_relocator_alloc_chunk_align (rel, &ch, 0, 0xa0000 - RELOCATOR_SIZEOF (16), RELOCATOR_SIZEOF (16), 16, GRUB_RELOCATOR_PREFERENCE_NONE); if (err) return err; grub_relocator16_cs = state.cs; grub_relocator16_ip = state.ip; grub_relocator16_ds = state.ds; grub_relocator16_es = state.es; grub_relocator16_fs = state.fs; grub_relocator16_gs = state.gs; grub_relocator16_ss = state.ss; grub_relocator16_sp = state.sp; grub_relocator16_edx = state.edx; grub_memmove (get_virtual_current_address (ch), &grub_relocator16_start, RELOCATOR_SIZEOF (16)); err = grub_relocator_prepare_relocs (rel, get_physical_target_address (ch), &relst, NULL); if (err) return err; asm volatile (""cli""); ((void (*) (void)) relst) (); /* Not reached. */ return GRUB_ERR_NONE; } grub_err_t grub_relocator64_boot (struct grub_relocator *rel, struct grub_relocator64_state state, grub_addr_t min_addr, grub_addr_t max_addr) { grub_err_t err; void *relst; grub_relocator_chunk_t ch; err = grub_relocator_alloc_chunk_align (rel, &ch, min_addr, max_addr - RELOCATOR_SIZEOF (64), RELOCATOR_SIZEOF (64), 16, GRUB_RELOCATOR_PREFERENCE_NONE); if (err) return err; grub_relocator64_rax = state.rax; grub_relocator64_rbx = state.rbx; grub_relocator64_rcx = state.rcx; grub_relocator64_rdx = state.rdx; grub_relocator64_rip = state.rip; grub_relocator64_rsp = state.rsp; grub_relocator64_rsi = state.rsi; grub_relocator64_cr3 = state.cr3; grub_memmove (get_virtual_current_address (ch), &grub_relocator64_start, RELOCATOR_SIZEOF (64)); err = grub_relocator_prepare_relocs (rel, get_physical_target_address (ch), &relst, NULL); if (err) return err; asm volatile (""cli""); ((void (*) (void)) relst) (); /* Not reached. */ return GRUB_ERR_NONE; } ",0 "uelasTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('escuelas', function (Blueprint $table) { $table->increments('id'); $table->string('codigo', 10)->unique(); $table->string('nombre', 100); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('escuelas'); } } ",0 "mg src=""i/help/PaymentReversed.png"" alt=""PaymentReversed"" width=""700px"">
        Payment Reversed.
        Choose one of the following from the drop-down box.
        Payment Reverse Reasons Values.
        • Applied to Wrong Account
        • Bank Account Closed
        • Data Entry Error
        • No Acct/Cannot Locate
        • Non-Sufficient Funds
        • Account Details Page
        • Stop Payment
        Clicking the ""Reverse"" button will open a Microsoft Word document which is a letter to the claimant explaining why his payment was reversed and to expect a new invoice with a higher balance.

        Cancel

        Adjustments can be canceled for many reasons and many weeks after being entered. When you cancel a payment, a window pops up to ask why. Its drop-down box offers the same reasons as the reversals.
        Payment Cancel.
        Payment Cancel Reasons Values.
        ",0 "m.net> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ if (isset($_POST['autores_submit'])) { if (empty($_POST['autores_subject']) && $_POST['autores_active'] == 'y') { $smarty->assign('error_msg','y'); $smarty->assign('if_error_autores_subject_empty', 'y'); $error=true; } else if (empty($_POST['autores_msg']) && $_POST['autores_active'] == 'y') { $smarty->assign('error_msg','y'); $smarty->assign('if_error_autores_msg_empty', 'y'); $error=true; } else if(strlen($_POST['autores_subject']) > 50 && $_POST['autores_active'] == 'y') { $smarty->assign('error_msg','y'); $smarty->assign('if_error_autores_subject_to_long', 'y'); $error=true; } else if ( $_POST['autores_sendback_times'] != ""n"" && ($_POST['autores_sendback_times'] < 1 && $_POST['autores_sendback_times'] > 5 )) { $smarty->assign('error_msg','y'); $smarty->assign('if_error_autores_send_times', 'y'); $error=true; } else { save_autoresponder($_SESSION['uid'], $_POST['autores_active'], $_POST['autores_subject'], $_POST['autores_msg'], $_POST['autores_sendback_times']); // activate System-Script run_systemscripts(); } } if (isset($_POST['val_tos_active'])&& is_numeric($_POST['val_tos_active'])) { update_email_options($_SESSION['uid'],""auto_val_tos_active"",$_POST['val_tos_active'], 0); } if(isset($_POST['val_tos_del'])) { val_tos_del($_SESSION['uid'],$_POST['val_tos']); } if(isset($_POST['val_tos_add'])) { if (val_tos_add($_SESSION['uid'], $_POST['val_tos_da'])== 1) { $smarty->assign('error_msg','y'); $smarty->assign('if_submit_email_wrong', 'y'); } } //xheader disable feature if ($_SESSION['p_autores_xheader'] == 1) { if (isset($_GET['xheader']) && is_numeric($_GET['xheader']) && isset($_GET['do']) && $_GET['do']=='del') { $sql=sprintf(""DELETE FROM autoresponder_xheader WHERE email='%d' AND id='%d'"", $db->escapeSimple($_SESSION['uid']), $db->escapeSimple($_GET['xheader'])); $db->query($sql); } if (isset($_POST['xheader_submit'])) { if (!empty($_POST['xheader_name']) && !empty($_POST['xheader_value'])) { $sql=sprintf(""INSERT INTO autoresponder_xheader SET email='%d',xheader='%s',value='%s'"", $db->escapeSimple($_SESSION['uid']), $db->escapeSimple($_POST['xheader_name']), $db->escapeSimple($_POST['xheader_value'])); $db->query($sql); } else { $smarty->assign('error_msg','y'); $smarty->assign('if_xheader_empty', 'y'); } } } //save automatic autoresponder disable feaure if (isset($_POST['autores_datedisable_submit'])) { if ($_POST['autores_datedisable_active'] == 0) { $sql=sprintf(""UPDATE autoresponder_disable SET active='0' WHERE email='%d'"", $db->escapeSimple($_SESSION['uid'])); $result=&$db->query($sql); } elseif (! preg_match('/^([0-9]{2}).([0-9]{2}).([0-9]{4})$/', $_POST['autores_datedisable_date'])) { $smarty->assign('error_msg','y'); $smarty->assign('if_error_autores_date_wrong', 'y'); } elseif (! preg_match('/^([0-9]{2}):([0-9]{2}):([0-9]{2})$/', $_POST['autores_datedisable_time'])) { $smarty->assign('error_msg','y'); $smarty->assign('if_error_autores_time_wrong', 'y'); } elseif (! check_autores_date_disable($_POST['autores_datedisable_date'],$_POST['autores_datedisable_time'])) { $smarty->assign('error_msg','y'); $smarty->assign('if_error_autores_disable_in_past', 'y'); } else { $unix_time=autores_date_format($_POST['autores_datedisable_date'],$_POST['autores_datedisable_time']); $sql=sprintf(""SELECT id FROM autoresponder_disable WHERE email='%d'"", $db->escapeSimple($_SESSION['uid'])); $result=&$db->query($sql); if ($result->numRows() == 1) { $data=$result->fetchrow(DB_FETCHMODE_ASSOC); $sql=sprintf(""UPDATE autoresponder_disable SET a_date=FROM_UNIXTIME('%s'), active='1' WHERE email='%d'"", $db->escapeSimple($unix_time), $db->escapeSimple($_SESSION['uid'])); } else { $sql=sprintf(""INSERT INTO autoresponder_disable SET a_date=FROM_UNIXTIME('%s'),email='%d',active='1'"", $db->escapeSimple($unix_time), $db->escapeSimple($_SESSION['uid'])); } $result=&$db->query($sql); } } $sql=sprintf(""SELECT id,email,active,msg,esubject,times FROM autoresponder WHERE email='%d'"", $db->escapeSimple($_SESSION['uid'])); $result=&$db->query($sql); if ($result->numRows()==1) { $data=$result->fetchrow(DB_FETCHMODE_ASSOC); $active=$data['active']; $msg=$data['msg']; $esubject=$data['esubject']; $id=$data['id']; $times=$data['times']; } elseif(isset($error)) { $active=$_POST['autores_active']; $msg=$_POST['autores_msg']; $esubject=$_POST['autores_subject']; $times=$_POST['autores_sendback_times']; } else { $active='n'; } // outout val_tos $sql=sprintf(""SELECT recip,id FROM autoresponder_recipient WHERE email='%d'"", $db->escapeSimple($_SESSION['uid'])); $result=&$db->query($sql); $table_val_tos = array(); while($data=$result->fetchrow(DB_FETCHMODE_ASSOC)) { array_push($table_val_tos,array( 'recip' => $data['recip'], 'id' => $data['id'])); } //output val_tos_active $val_tos_active = get_email_options($_SESSION['uid'],""auto_val_tos_active"", 0); $smarty->assign('val_tos_active', $val_tos_active); //output autoresponder disabled feature $autores_disable=get_autores_disable($_SESSION['uid']); //output xheader feature if ($_SESSION['p_autores_xheader'] == 1) { $sql=sprintf(""SELECT * FROM autoresponder_xheader WHERE email='%d' ORDER BY xheader"", $db->escapeSimple($_SESSION['uid'])); $result=&$db->query($sql); $table_xheader=array(); while($data=$result->fetchrow(DB_FETCHMODE_ASSOC)) { array_push($table_xheader,array( 'id' => $data['id'], 'xheader' => $data['xheader'], 'value' => $data['value'])); } $smarty->assign('table_xheader',$table_xheader); } if(isset($autores_disable)) $smarty->assign('autores_disable', $autores_disable); else $smarty->assign('autores_disable', false); if(isset($table_val_tos)) $smarty->assign('table_val_tos', $table_val_tos); else $smarty->assign('table_val_tos', false); if(isset($esubject)) $smarty->assign('autores_subject', $esubject); else $smarty->assign('autores_subject', false); if(isset($active)) $smarty->assign('autores_active', $active); else $smarty->assign('autores_active', $active); if(isset($times)) $smarty->assign('autores_sendback_times_value', $times); else $smarty->assign('autores_sendback_times_value', false); if(isset($id)) $smarty->assign('id', $id); else $smarty->assign('id', false); if(isset($msg)) $smarty->assign('autores_msg', $msg); else $smarty->assign('autores_msg', false); if(isset($_SESSION['email'])) $smarty->assign('email', $_SESSION['email']); else $smarty->assign('email', false); ",0 " name=""viewport"" content=""width=device-width, initial-scale=1""> examples | p5.js Skip to content

        < उदाहरण

        example name placeholder

        example description placeholder

        आभार सूची

        वर्तमान में p5.js का नेतृत्व करने वाले Qianqian Ye और evelyn masso हैं| इसकी खोज करने वाले थे Lauren Lee McCarthy p5.js सहयोगियों के एक समुदाय द्वारा विकसित किया गया है और समर्थन करने वाले थे Processing Foundation और NYU ITP पहचान और ग्राफिक डिजाइन करने वाले थे Jerel Johnson. © Info.

         

        ",0 "use Minds\Core\Config; use Minds\Core\Data\ElasticSearch; use Minds\Core\Data\Cassandra; use Minds\Core\Wire\Paywall\PaywallEntityInterface; use Minds\Core\Rewards\Contributions\ContributionValues; class Manager { /** @var Config */ protected $config; /** @var ElasticSearch\Client */ protected $es; /** @var Cassandra\Client */ protected $db; /** @var int */ const SUBSCRIPTION_PERIOD_MONTH = 30; /** @var int */ const SUBSCRIPTION_PERIOD_YEAR = 365; /** @var int */ const REVENUE_SHARE_PCT = 25; public function __construct($config = null, $es = null, $db = null) { $this->config = $config ?? Di::_()->get('Config'); $this->es = $es ?? Di::_()->get('Database\ElasticSearch'); $this->db = $db ?? Di::_()->get('Database\Cassandra\Cql'); } /** * Returns the plus guid * @return string */ public function getPlusGuid(): string { return $this->config->get('plus')['handler']; } /** * Returns the plus support tier urn * @return string */ public function getPlusSupportTierUrn(): string { return $this->config->get('plus')['support_tier_urn']; } /** * Returns the subscription price * @param string $period (month,day) * @return int (cents) */ public function getSubscriptionPrice(string $period): int { /** @var string */ $key = ''; switch ($period) { case 'month': $key = 'monthly'; break; case 'year': $key = 'yearly'; break; default: throw new \Exception(""Subscription can only be month or year""); } return $this->config->get('upgrades')['plus'][$key]['usd'] * 100; } /** * Return sum of revenue for the previous subscriptions period (30 days) * Will return in USD * @param int $asOfTs * @return float */ public function getActiveRevenue($asOfTs = null): float { $revenue = 0; $from = strtotime(self::SUBSCRIPTION_PERIOD_MONTH . "" days ago"", $asOfTs ?? time()); $to = strtotime(""+"" . self::SUBSCRIPTION_PERIOD_MONTH . "" days"", $from); // // Sum the wire takings for the previous 30 days where monthly subscription // $revenue += $this->getRevenue($from, $to, $this->getSubscriptionPrice('month')); // // Sum the wire takings for the previous 30 days where yearly subscription (amortized to month) // $from = strtotime(self::SUBSCRIPTION_PERIOD_YEAR . "" days ago"", $asOfTs ?? time()); $to = strtotime(""+"" . self::SUBSCRIPTION_PERIOD_YEAR . "" days"", $from); $revenue += $this->getRevenue($from, $to, $this->getSubscriptionPrice('year')) / 12; return round($revenue / 100, 2); } /** * Returns the daily revenue for Plus * - Assumptions: * - Subscription is 30 days * - Amoritize the revenue by dividing the revenue * for previous 30 days by 30 * - eg: ($300 per month) / 30 = $10 per day * Will return in USD * @param int $asOfTime * @return int */ public function getDailyRevenue($asOfTs = null): float { return round($this->getActiveRevenue($asOfTs) / self::SUBSCRIPTION_PERIOD_MONTH, 2); } /** * @var int $from * @var int $to * @return int */ protected function getRevenue(int $from, int $to, int $amount): int { $query = new Cassandra\Prepared\Custom(); // ALLOW FILTERING is used to filter by amount. As subscription volume is small // and paritioned by receiver_guid, it should not be an issue $query->query(""SELECT SUM(wei) as wei_sum FROM wire WHERE receiver_guid=? AND method='usd' AND timestamp >= ? AND timestamp < ? AND wei=? ALLOW FILTERING "", [ new \Cassandra\Varint($this->getPlusGuid()), new \Cassandra\Timestamp($from, 0), new \Cassandra\Timestamp($to, 0), new \Cassandra\Varint($amount) ]); try { $result = $this->db->request($query); } catch (\Exception $e) { error_log(print_r($e, true)); return 0; } return (int) $result[0]['wei_sum']; } /** * Return unlocks (deprecated) * @param int $asOfTs * @return iterable */ public function getUnlocks(int $asOfTs): array { return []; } /** * Return the scores of users * @param int $asOfTs * @return iterable */ public function getScores(int $asOfTs): iterable { /** @var array */ $must = []; $must[] = [ 'term' => [ 'support_tier_urn' => $this->getPlusSupportTierUrn(), ], ]; $must[] = [ 'range' => [ '@timestamp' => [ 'gte' => $asOfTs * 1000, 'lt' => strtotime('midnight tomorrow', $asOfTs) * 1000, ] ] ]; $body = [ 'query' => [ 'bool' => [ 'must' => $must, ], ], 'aggs' => [ 'owners' => [ 'terms' => [ 'field' => 'entity_owner_guid.keyword', 'size' => 5000, ], 'aggs' => [ 'actions' => [ 'terms' => [ 'field' => 'action.keyword', 'size' => 5000, ], 'aggs' => [ 'unique_user_actions' => [ 'cardinality' => [ 'field' => 'user_guid.keyword', ], ] ] ] ] ], ] ]; $query = [ 'index' => 'minds-metrics-*', 'body' => $body, 'size' => 0, ]; $prepared = new ElasticSearch\Prepared\Search(); $prepared->query($query); $response = $this->es->request($prepared); $total = array_sum(array_map(function ($bucket) { return $this->sumInteractionScores($bucket); }, $response['aggregations']['owners']['buckets'])); foreach ($response['aggregations']['owners']['buckets'] as $bucket) { $count = $this->sumInteractionScores($bucket); if (!$count) { continue; } $score = [ 'user_guid' => $bucket['key'], 'total' => $total, 'count' => $count, 'sharePct' => $count / $total, ]; yield $score; } } /** * Returns if a post is Minds+ paywalled or not * @param PaywallEntityInterface $entity * @return bool */ public function isPlusEntity(PaywallEntityInterface $entity): bool { if (!$entity->isPayWall()) { return false; } $threshold = $entity->getWireThreshold(); return $threshold['support_tier']['urn'] === $this->getPlusSupportTierUrn(); } /** * Returns the score of owner bucket interactions * @param array $bucket * @return int */ private function sumInteractionScores(array $bucket): int { return array_sum(array_map(function ($bucket) { return $bucket['unique_user_actions']['value'] * ContributionValues::metricKeyToMultiplier($bucket['key']); }, $bucket['actions']['buckets'])); } } ",0 "ile 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. ==============================================================================*/ #ifndef TENSORFLOW_COMPILER_XLA_ARRAY3D_H_ #define TENSORFLOW_COMPILER_XLA_ARRAY3D_H_ #include #include #include #include #include #include #include #include ""tensorflow/compiler/xla/array.h"" #include ""tensorflow/compiler/xla/types.h"" #include ""tensorflow/core/platform/logging.h"" #include ""tensorflow/core/platform/macros.h"" #include ""tensorflow/core/platform/types.h"" namespace xla { // Simple 3D array structure. template class Array3D : public Array { public: Array3D() : Array(std::vector{0, 0, 0}) {} // Creates an array of dimensions n1 x n2 x n3, uninitialized values. Array3D(const int64_t n1, const int64_t n2, const int64_t n3) : Array(std::vector{n1, n2, n3}) {} // Creates an array of dimensions n1 x n2 x n3, initialized to value. Array3D(const int64_t n1, const int64_t n2, const int64_t n3, const T value) : Array(std::vector{n1, n2, n3}, value) {} // Creates an array from the given nested initializer list. The outer // initializer list is the first dimension, and so on. // // For example {{{1, 2}, {3, 4}, {5, 6}, {7, 8}}, // {{9, 10}, {11, 12}, {13, 14}, {15, 16}}, // {{17, 18}, {19, 20}, {21, 22}, {23, 24}}} // results in an array with n1=3, n2=4, n3=2. Array3D(std::initializer_list>> values) : Array(values) {} // Creates an array of a floating-point type (half, bfloat16, float, // or double) from the given nested initializer list of float values. template ::value || std::is_same::value || std::is_same::value || std::is_same::value) && std::is_same::value>::type> Array3D( std::initializer_list>> values) : Array(values) {} int64_t n1() const { return this->dim(0); } int64_t n2() const { return this->dim(1); } int64_t n3() const { return this->dim(2); } }; } // namespace xla #endif // TENSORFLOW_COMPILER_XLA_ARRAY3D_H_ ",0 "x/pagemap.h> #include #include #include #include #include #include /* * Any behaviour which results in changes to the vma->vm_flags needs to * take mmap_sem for writing. Others, which simply traverse vmas, need * to only take it for reading. */ static int madvise_need_mmap_write(int behavior) { switch (behavior) { case MADV_REMOVE: case MADV_WILLNEED: case MADV_DONTNEED: return 0; default: /* be safe, default to 1. list exceptions explicitly */ return 1; } } /* * We can potentially split a vm area into separate * areas, each area with its own behavior. */ static long madvise_behavior(struct vm_area_struct * vma, struct vm_area_struct **prev, unsigned long start, unsigned long end, int behavior) { struct mm_struct * mm = vma->vm_mm; int error = 0; pgoff_t pgoff; unsigned long new_flags = vma->vm_flags; switch (behavior) { case MADV_NORMAL: new_flags = new_flags & ~VM_RAND_READ & ~VM_SEQ_READ; break; case MADV_SEQUENTIAL: new_flags = (new_flags & ~VM_RAND_READ) | VM_SEQ_READ; break; case MADV_RANDOM: new_flags = (new_flags & ~VM_SEQ_READ) | VM_RAND_READ; break; case MADV_DONTFORK: new_flags |= VM_DONTCOPY; break; case MADV_DOFORK: if (vma->vm_flags & VM_IO) { error = -EINVAL; goto out; } new_flags &= ~VM_DONTCOPY; break; case MADV_MERGEABLE: case MADV_UNMERGEABLE: error = ksm_madvise(vma, start, end, behavior, &new_flags); if (error) goto out; break; } if (new_flags == vma->vm_flags) { *prev = vma; goto out; } pgoff = vma->vm_pgoff + ((start - vma->vm_start) >> PAGE_SHIFT); *prev = vma_merge(mm, *prev, start, end, new_flags, vma->anon_vma, vma->vm_file, pgoff, vma_policy(vma)); if (*prev) { vma = *prev; goto success; } *prev = vma; if (start != vma->vm_start) { error = split_vma(mm, vma, start, 1); if (error) goto out; } if (end != vma->vm_end) { error = split_vma(mm, vma, end, 0); if (error) goto out; } success: /* * vm_flags is protected by the mmap_sem held in write mode. */ vma->vm_flags = new_flags; out: if (error == -ENOMEM) error = -EAGAIN; return error; } /* * Schedule all required I/O operations. Do not wait for completion. */ static long madvise_willneed(struct vm_area_struct * vma, struct vm_area_struct ** prev, unsigned long start, unsigned long end) { struct file *file = vma->vm_file; if (!file) return -EBADF; if (file->f_mapping->a_ops->get_xip_mem) { /* no bad return value, but ignore advice */ return 0; } *prev = vma; start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; if (end > vma->vm_end) end = vma->vm_end; end = ((end - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; force_page_cache_readahead(file->f_mapping, file, start, end - start); return 0; } /* * Application no longer needs these pages. If the pages are dirty, * it's OK to just throw them away. The app will be more careful about * data it wants to keep. Be sure to free swap resources too. The * zap_page_range call sets things up for shrink_active_list to actually free * these pages later if no one else has touched them in the meantime, * although we could add these pages to a global reuse list for * shrink_active_list to pick up before reclaiming other pages. * * NB: This interface discards data rather than pushes it out to swap, * as some implementations do. This has performance implications for * applications like large transactional databases which want to discard * pages in anonymous maps after committing to backing store the data * that was kept in them. There is no reason to write this data out to * the swap area if the application is discarding it. * * An interface that causes the system to free clean pages and flush * dirty pages is already available as msync(MS_INVALIDATE). */ static long madvise_dontneed(struct vm_area_struct * vma, struct vm_area_struct ** prev, unsigned long start, unsigned long end) { *prev = vma; if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP)) return -EINVAL; if (unlikely(vma->vm_flags & VM_NONLINEAR)) { struct zap_details details = { .nonlinear_vma = vma, .last_index = ULONG_MAX, }; zap_page_range(vma, start, end - start, &details); } else zap_page_range(vma, start, end - start, NULL); return 0; } /* * Application wants to free up the pages and associated backing store. * This is effectively punching a hole into the middle of a file. * * NOTE: Currently, only shmfs/tmpfs is supported for this operation. * Other filesystems return -ENOSYS. */ static long madvise_remove(struct vm_area_struct *vma, struct vm_area_struct **prev, unsigned long start, unsigned long end) { struct address_space *mapping; loff_t offset, endoff; int error; struct file *f; *prev = NULL; /* tell sys_madvise we drop mmap_sem */ if (vma->vm_flags & (VM_LOCKED|VM_NONLINEAR|VM_HUGETLB)) return -EINVAL; f = vma->vm_file; if (!f || !f->f_mapping || !f->f_mapping->host) { return -EINVAL; } if ((vma->vm_flags & (VM_SHARED|VM_WRITE)) != (VM_SHARED|VM_WRITE)) return -EACCES; mapping = vma->vm_file->f_mapping; offset = (loff_t)(start - vma->vm_start) + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); endoff = (loff_t)(end - vma->vm_start - 1) + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); /* * vmtruncate_range may need to take i_mutex and i_alloc_sem. * We need to explicitly grab a reference because the vma (and * hence the vma's reference to the file) can go away as soon as * we drop mmap_sem. */ get_file(f); up_read(¤t->mm->mmap_sem); error = vmtruncate_range(mapping->host, offset, endoff); fput(f); down_read(¤t->mm->mmap_sem); return error; } #ifdef CONFIG_MEMORY_FAILURE /* * Error injection support for memory error handling. */ static int madvise_hwpoison(unsigned long start, unsigned long end) { int ret = 0; if (!capable(CAP_SYS_ADMIN)) return -EPERM; for (; start < end; start += PAGE_SIZE) { struct page *p; int ret = get_user_pages(current, current->mm, start, 1, 0, 0, &p, NULL); if (ret != 1) return ret; printk(KERN_INFO ""Injecting memory failure for page %lx at %lx\n"", page_to_pfn(p), start); /* Ignore return value for now */ __memory_failure(page_to_pfn(p), 0, 1); put_page(p); } return ret; } #endif static long madvise_vma(struct vm_area_struct *vma, struct vm_area_struct **prev, unsigned long start, unsigned long end, int behavior) { switch (behavior) { case MADV_REMOVE: return madvise_remove(vma, prev, start, end); case MADV_WILLNEED: return madvise_willneed(vma, prev, start, end); case MADV_DONTNEED: return madvise_dontneed(vma, prev, start, end); default: return madvise_behavior(vma, prev, start, end, behavior); } } static int madvise_behavior_valid(int behavior) { switch (behavior) { case MADV_DOFORK: case MADV_DONTFORK: case MADV_NORMAL: case MADV_SEQUENTIAL: case MADV_RANDOM: case MADV_REMOVE: case MADV_WILLNEED: case MADV_DONTNEED: #ifdef CONFIG_KSM case MADV_MERGEABLE: case MADV_UNMERGEABLE: #endif return 1; default: return 0; } } /* * The madvise(2) system call. * * Applications can use madvise() to advise the kernel how it should * handle paging I/O in this VM area. The idea is to help the kernel * use appropriate read-ahead and caching techniques. The information * provided is advisory only, and can be safely disregarded by the * kernel without affecting the correct operation of the application. * * behavior values: * MADV_NORMAL - the default behavior is to read clusters. This * results in some read-ahead and read-behind. * MADV_RANDOM - the system should read the minimum amount of data * on any access, since it is unlikely that the appli- * cation will need more than what it asks for. * MADV_SEQUENTIAL - pages in the given range will probably be accessed * once, so they can be aggressively read ahead, and * can be freed soon after they are accessed. * MADV_WILLNEED - the application is notifying the system to read * some pages ahead. * MADV_DONTNEED - the application is finished with the given range, * so the kernel can free resources associated with it. * MADV_REMOVE - the application wants to free up the given range of * pages and associated backing store. * MADV_DONTFORK - omit this area from child's address space when forking: * typically, to avoid COWing pages pinned by get_user_pages(). * MADV_DOFORK - cancel MADV_DONTFORK: no longer omit this area when forking. * MADV_MERGEABLE - the application recommends that KSM try to merge pages in * this area with pages of identical content from other such areas. * MADV_UNMERGEABLE- cancel MADV_MERGEABLE: no longer merge pages with others. * * return values: * zero - success * -EINVAL - start + len < 0, start is not page-aligned, * ""behavior"" is not a valid value, or application * is attempting to release locked or shared pages. * -ENOMEM - addresses in the specified range are not currently * mapped, or are outside the AS of the process. * -EIO - an I/O error occurred while paging in data. * -EBADF - map exists, but area maps something that isn't a file. * -EAGAIN - a kernel resource was temporarily unavailable. */ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior) { unsigned long end, tmp; struct vm_area_struct * vma, *prev; int unmapped_error = 0; int error = -EINVAL; int write; size_t len; #ifdef CONFIG_MEMORY_FAILURE if (behavior == MADV_HWPOISON) return madvise_hwpoison(start, start+len_in); #endif if (!madvise_behavior_valid(behavior)) return error; write = madvise_need_mmap_write(behavior); if (write) down_write(¤t->mm->mmap_sem); else down_read(¤t->mm->mmap_sem); if (start & ~PAGE_MASK) goto out; len = (len_in + ~PAGE_MASK) & PAGE_MASK; /* Check to see whether len was rounded up from small -ve to zero */ if (len_in && !len) goto out; end = start + len; if (end < start) goto out; error = 0; if (end == start) goto out; /* * If the interval [start,end) covers some unmapped address * ranges, just ignore them, but return -ENOMEM at the end. * - different from the way of handling in mlock etc. */ vma = find_vma_prev(current->mm, start, &prev); if (vma && start > vma->vm_start) prev = vma; for (;;) { /* Still start < end. */ error = -ENOMEM; if (!vma) goto out; /* Here start < (end|vma->vm_end). */ if (start < vma->vm_start) { unmapped_error = -ENOMEM; start = vma->vm_start; if (start >= end) goto out; } /* Here vma->vm_start <= start < (end|vma->vm_end) */ tmp = vma->vm_end; if (end < tmp) tmp = end; /* Here vma->vm_start <= start < tmp <= (end|vma->vm_end). */ error = madvise_vma(vma, &prev, start, tmp, behavior); if (error) goto out; start = tmp; if (prev && start < prev->vm_end) start = prev->vm_end; error = unmapped_error; if (start >= end) goto out; if (prev) vma = prev->vm_next; else /* madvise_remove dropped mmap_sem */ vma = find_vma(current->mm, start); } out: if (write) up_write(¤t->mm->mmap_sem); else up_read(¤t->mm->mmap_sem); return error; } ",0 " MOVE( ""Moving"", ""newTile"" ), FABRICATING( ""Fabricating"" ); private final String verb; private final List< String > dataKeys; private ActionType( String verb, String... dataKeys ) { this.verb = verb; if ( dataKeys != null ) { this.dataKeys = Arrays.asList( dataKeys ); } else { this.dataKeys = Collections.emptyList( ); } } /** * @return the dataKeys */ public List< String > getDataKeys( ) { return dataKeys; } /** * @return the verb */ public String getVerb( ) { return verb; } } ",0 "plain"">

        AHPUiT____.instr1_.gma-demo

        First team feedback session

        Sun, 01 Apr 2012, 11:59 PM

        Mon, 02 Apr 2012, 11:59 PM


        You have received feedback from others. Please see below.

        Question 1: Please rate the estimated contribution of your team members and yourself.  [more]
        Team contribution question

        Comparison of work distribution   [how to interpret, etc..]

        How do I interpret these results?

        • Compare values given under 'My view' to those under 'Team's view'. This tells you whether your perception matches with what the team thinks, particularly regarding your own contribution. You may ignore minor differences.
        • Team's view of your contribution is the average value of the contribution your team members attributed to you, excluding the contribution you attributed to yourself. That means you cannot boost your perceived contribution by claiming a high contribution for yourself or attributing a low contribution to team members.
        • Also note that the team’s view has been scaled up/down so that the sum of values in your view matches the sum of values in team’s view. That way, you can make a direct comparison between your view and the team’s view. As a result, the values you see in team’s view may not match the values your team members see in their results.

        How are these results used in grading?

        TEAMMATES does not calculate grades. It is up to the instructors to use contribution question results in any way they want. However, TEAMMATES recommend that contribution question results are used only as flags to identify teams with contribution imbalances. Once identified, the instructor is recommended to investigate further before taking action.

        How are the contribution numbers calculated?

        Here are the important things to note:
        • The contribution you attributed to yourself is not used when calculating the perceived contribution of you or team members.
        • From the estimates you submit, we try to deduce the answer to this question: In your opinion, if your teammates are doing the project by themselves without you, how do they compare against each other in terms of contribution? This is because we want to deduce your unbiased opinion about your team members’ contributions. Then, we use those values to calculate the average perceived contribution of each team member.
        • When deducing the above, we first adjust the estimates you submitted to remove artificial inflations/deflations. For example, giving everyone [Equal share + 20%] is as same as giving everyone [Equal share] because in both cases all members have done a similar share of work.
        The actual calculation is a bit complex and the finer details can be found here .
        My view: of me: E +10% of others: E +10% , E +10% , E -20%
        Team's view: of me: E +9% of others: E +9% , E +9% , E -18%

        Question 2: Comments about my contribution (shown to other teammates)

        To: You
        From: You
        I was the project lead. I designed the application architecture and managed the project to ensure we deliver the product on time.
        To: Charlie Davis
        From: Charlie Davis
        I am a bit slow compared to my team mates, but the members helped me to catch up.
        • From: AHPUiT+++_.instr1!@gmail.tmt [Mon, 30 Apr 2012, 09:36 PM UTC]

          Well, Being your first team project always takes some time. I hope you had nice experience working with the team.

        To: Francis Gabriel
        From: Francis Gabriel
        I was the designer. I did all the UI work.
        • From: AHPUiT+++_.instr1!@gmail.tmt [Mon, 30 Apr 2012, 09:39 PM UTC]

          Design could have been more interactive.

        To: Gene Hudson
        From: Gene Hudson
        I am the programmer for the team. I did most of the coding.

        Question 3: My comments about this teammate(confidential and only shown to instructor)

        To: Charlie Davis
        From: You
        A bit weak in terms of technical skills. He spent lots of time in picking up the skills. Although a bit slow in development, his attitude is good.
        To: Francis Gabriel
        From: You
        Francis is the designer of the project. He did a good job!
        To: Gene Hudson
        From: You
        Gene is the programmer for our team. She put in a lot of effort in coding a significant portion of the project.

        Question 4: Comments about team dynamics(confidential and only shown to instructor)

        To: Team 2
        From: You
        I had a great time with this team. Thanks for all the support from the members.

        Question 5: My feedback to this teammate(shown anonymously to the teammate)

        To: You
        From: Anonymous student ${participant.hash}
        Thank you AHPUiT Instrúctör WithPlusInEmail for all the hardwork!
        From: Anonymous student ${participant.hash}
        Thank you AHPUiT Instrúctör WithPlusInEmail for all the help in the project.
        From: Anonymous student ${participant.hash}
        Thank you AHPUiT Instrúctör WithPlusInEmail for being such a good team leader!
        To: Charlie Davis
        From: You
        Good try Charlie! Thanks for showing great effort in picking up the skills.
        To: Francis Gabriel
        From: You
        Nice work Francis!
        To: Gene Hudson
        From: You
        Keep up the good work Gene!

        ",0 "ontrols"">

        o($this->notes[0]->title);?>

        notes as $note): ?>
        "" onsubmit=""return confirm('Are you sure?')""> id?>"" name=""id"" /> "" />

        o($note->title)?>

        By o($note->userid.' on '.$note->created)?>
        bbCode($note->note);?>
        ",0 "loud.tosca.model.types.NodeType; import org.springframework.stereotype.Component; /** * Post process a node type. */ @Component public class NodeTypePostProcessor implements IPostProcessor { @Resource private CapabilityDefinitionPostProcessor capabilityDefinitionPostProcessor; @Resource private RequirementDefinitionPostProcessor requirementDefinitionPostProcessor; @Override public void process(NodeType instance) { safe(instance.getCapabilities()).forEach(capabilityDefinitionPostProcessor); safe(instance.getRequirements()).forEach(requirementDefinitionPostProcessor); } }",0 "javadoc (build 1.5.0_22) on Tue May 29 00:11:55 CEST 2012 --> javax.microedition.sensor (leJOS NXJ API documentation) javax.microedition.sensor
        Interfaces 
        Channel
        ChannelInfo
        Condition
        ConditionListener
        Data
        DataListener
        SensorConnection
        SensorInfo
        SensorListener
        Classes 
        AccelerationChannelInfo
        BatteryChannelInfo
        BatterySensorInfo
        ColorChannelInfo
        ColorIndexChannelInfo
        ColorRGBChannelInfo
        GyroChannelInfo
        HeadingChannelInfo
        HiTechnicColorSensorInfo
        HiTechnicCompassSensorInfo
        HiTechnicGyroSensorInfo
        LightChannelInfo
        LightSensorInfo
        LimitCondition
        MeasurementRange
        MindsensorsAccelerationSensorInfo
        NXTActiveCondition
        NXTActiveData
        NXTADSensorInfo
        NXTChannel
        NXTChannelInfo
        NXTData
        NXTSensorConnection
        NXTSensorInfo
        ObjectCondition
        OperatorTest
        RangeCondition
        RCXLightSensorInfo
        RCXTemperatureSensorInfo
        SensorManager
        SensorURL
        SoundChannelInfo
        SoundSensorInfo
        TemperatureChannelInfo
        TiltChannelInfo
        TouchChannelInfo
        TouchSensorInfo
        UltrasonicChannelInfo
        UltrasonicSensorInfo
        Unit
        ",0 "javadoc (build 1.6.0_26) on Sat Jun 21 06:31:07 UTC 2014 --> org.apache.hadoop.fs.http.server (Apache Hadoop Main 2.4.1 API) org.apache.hadoop.fs.http.server ",0 "
      • 上一页
      • {% endif %} {% for page in paginator.iter_pages() %} {% if page %} {% if page != paginator.page %}
      • {{ page }}
      • {% else %}
      • {{ page }}
      • {% endif %} {% else %}
      • ...
      • {% endif %} {% endfor %} {% if paginator.has_next %}
      • 下一页
      • {% endif %} {% endif %} {% endmacro %}",0 "). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ package com.amazonaws.services.elasticfilesystem.model; import com.amazonaws.AmazonServiceException; /** *

        * Returned if the specified FileSystemId does not exist in the * requester's AWS account. *

        */ public class FileSystemNotFoundException extends AmazonServiceException { private static final long serialVersionUID = 1L; private String errorCode; /** * Constructs a new FileSystemNotFoundException with the specified error * message. * * @param message * Describes the error encountered. */ public FileSystemNotFoundException(String message) { super(message); } /** * Sets the value of the ErrorCode property for this object. * * @param errorCode * The new value for the ErrorCode property for this object. */ public void setErrorCode(String errorCode) { this.errorCode = errorCode; } /** * Returns the value of the ErrorCode property for this object. * * @return The value of the ErrorCode property for this object. */ public String getErrorCode() { return this.errorCode; } /** * Sets the value of the ErrorCode property for this object. * * @param errorCode * The new value for the ErrorCode property for this object. * @return Returns a reference to this object so that method calls can be * chained together. */ public FileSystemNotFoundException withErrorCode(String errorCode) { setErrorCode(errorCode); return this; } }",0 "le>menhirlib: Not compatible 👼
        « Up

        menhirlib 20200211 Not compatible 👼

        📅 (2021-12-03 21:53:52 UTC)

        Context

        # Packages matching: installed
        # Name                   # Installed # Synopsis
        base-bigarray            base
        base-threads             base
        base-unix                base
        conf-findutils           1           Virtual package relying on findutils
        conf-gmp                 3           Virtual package relying on a GMP lib system installation
        coq                      8.14.0      Formal proof management system
        dune                     2.9.1       Fast, portable, and opinionated build system
        ocaml                    4.06.1      The OCaml compiler (virtual package)
        ocaml-base-compiler      4.06.1      Official 4.06.1 release
        ocaml-config             1           OCaml Switch Configuration
        ocaml-secondary-compiler 4.08.1-1    OCaml 4.08.1 Secondary Switch Compiler
        ocamlfind                1.9.1       A library manager for OCaml
        ocamlfind-secondary      1.9.1       Adds support for ocaml-secondary-compiler to ocamlfind
        zarith                   1.12        Implements arithmetic and logical operations over arbitrary-precision integers
        # opam file:
        opam-version: "2.0"
        synopsis: "A support library for verified Coq parsers produced by Menhir"
        maintainer: "francois.pottier@inria.fr"
        authors: [
          "Jacques-Henri Jourdan <jacques-henri.jourdan@lri.fr>"
        ]
        homepage: "https://gitlab.inria.fr/fpottier/menhir"
        dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git"
        bug-reports: "jacques-henri.jourdan@lri.fr"
        license: "LGPL-3.0-or-later"
        build: [
          [make "-C" "coq-menhirlib" "-j%{jobs}%"]
        ]
        install: [
          [make "-C" "coq-menhirlib" "install"]
        ]
        depends: [
          "coq" { >= "8.7" & < "8.12" }
        ]
        conflicts: [
          "menhir" { != "20200211" }
        ]
        tags: [
          "date:2020-02-11"
          "logpath:MenhirLib"
        ]
        url {
          src:
            "https://gitlab.inria.fr/fpottier/menhir/-/archive/20200211/archive.tar.gz"
          checksum: [
            "md5=01577e5f15380c35bdaa8fd818204560"
            "sha512=a686c4b047d5236c425afcd7f179964191268ff448b8d18510579d742a7256855049bc4fe568bb8f1b0d6cbfb758d95cd05e621e3410b75245bb799d623725d6"
          ]
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-menhirlib.20200211 coq.8.14.0
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.14.0).
        The following dependencies couldn't be met:
          - coq-menhirlib -> coq < 8.12 -> ocaml < 4.06.0
              base of this switch (use `--unlock-base' to force)
        Your request can't be satisfied:
          - No available version of coq satisfies the constraints
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-menhirlib.20200211
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "7%BC%96%E8%BE%91_wp-config.php * 编辑wp-config.php}Codex页面。MySQL设置具体信息请咨询您的空间提供商。 * * 这个文件被安装程序用于自动生成wp-config.php配置文件, * 您可以手动复制这个文件,并重命名为“wp-config.php”,然后填入相关信息。 * * @package WordPress */ // ** MySQL 设置 - 具体信息来自您正在使用的主机 ** // /** WordPress数据库的名称 */ define('DB_NAME', 'wordpress-example'); /** MySQL数据库用户名 */ define('DB_USER', 'root'); /** MySQL数据库密码 */ define('DB_PASSWORD', 'usbw'); /** MySQL主机 */ define('DB_HOST', 'localhost'); /** 创建数据表时默认的文字编码 */ define('DB_CHARSET', 'utf8mb4'); /** 数据库整理类型。如不确定请勿更改 */ define('DB_COLLATE', ''); /**#@+ * 身份认证密钥与盐。 * * 修改为任意独一无二的字串! * 或者直接访问{@link https://api.wordpress.org/secret-key/1.1/salt/ * WordPress.org密钥生成服务} * 任何修改都会导致所有cookies失效,所有用户将必须重新登录。 * * @since 2.6.0 */ define('AUTH_KEY', '#aW$yz|7k+TH=QYh_@JdBYoTneUk fPE;TQ6Y~>jiJC5Iq5${w^@ll9=IE$b%Bw$'); define('SECURE_AUTH_KEY', 'wm0Kp-9BQOdKzfn+rXFLIcaEFW=2[ETFBr!VMN9rRo@u++K+-WmOv|?JR0K_w(<,Oxb9oxd-||,y,2p%H?r,9yC6J<&59$73b4R!30u`t'); define('LOGGED_IN_SALT', 'c_i}*snL:aL^C`Vc780;^&SVrR_khGCKjhSi01]|+$+|t;8ZmWyo29R?X` O1C_!'); define('NONCE_SALT', '~yOsagc$nT|)z m|4ykEO{hYdd[]/f)<7L5[$3n.WjH$edY+PV7vmy3nnt@_5XAm'); /**#@-*/ /** * WordPress数据表前缀。 * * 如果您有在同一数据库内安装多个WordPress的需求,请为每个WordPress设置 * 不同的数据表前缀。前缀名只能为数字、字母加下划线。 */ $table_prefix = 'wp_'; /** * 开发者专用:WordPress调试模式。 * * 将这个值改为true,WordPress将显示所有用于开发的提示。 * 强烈建议插件开发者在开发环境中启用WP_DEBUG。 */ define('WP_DEBUG', false); /** * zh_CN本地化设置:启用ICP备案号显示 * * 可在设置→常规中修改。 * 如需禁用,请移除或注释掉本行。 */ define('WP_ZH_CN_ICP_NUM', true); /* 好了!请不要再继续编辑。请保存本文件。使用愉快! */ /** WordPress目录的绝对路径。 */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** 设置WordPress变量和包含文件。 */ require_once(ABSPATH . 'wp-settings.php'); ",0 " program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Codenvy, S.A. - initial API and implementation *******************************************************************************/ package org.eclipse.che.plugin.svn.shared; import org.eclipse.che.dto.shared.DTO; import javax.validation.constraints.NotNull; import java.util.List; @DTO public interface InfoResponse { /************************************************************************** * * Subversion command * **************************************************************************/ String getCommand(); void setCommand(@NotNull final String command); InfoResponse withCommand(@NotNull final String command); /************************************************************************** * * Execution output * **************************************************************************/ List getOutput(); void setOutput(@NotNull final List output); InfoResponse withOutput(@NotNull final List output); /************************************************************************** * * Error output * **************************************************************************/ List getErrorOutput(); void setErrorOutput(List errorOutput); InfoResponse withErrorOutput(List errorOutput); /************************************************************************** * * Item list * **************************************************************************/ List getItems(); void setItems(List items); InfoResponse withItems(List items); } ",0 " to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation and // any modifications thereto. Any use, reproduction, disclosure, or // distribution of this software and related documentation without an express // license agreement from NVIDIA Corporation is strictly prohibited. // // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED ""AS IS."". NVIDIA MAKES // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. // // Information and code furnished is believed to be accurate and reliable. // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such // information or for any infringement of patents or other rights of third parties that may // result from its use. No license is granted by implication or otherwise under any patent // or patent rights of NVIDIA Corporation. Details are subject to change without notice. // This code supersedes and replaces all information previously supplied. // NVIDIA Corporation products are not authorized for use as critical // components in life support devices or systems without express written approval of // NVIDIA Corporation. // // Copyright (c) 2008-2014 NVIDIA Corporation. All rights reserved. // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved. // Copyright (c) 2001-2004 NovodeX AG. All rights reserved. #ifndef NV_NSFOUNDATION_NSBASICTEMPLATES_H #define NV_NSFOUNDATION_NSBASICTEMPLATES_H #include ""Ns.h"" namespace nvidia { namespace shdfnd { template struct Equal { bool operator()(const A& a, const A& b) const { return a == b; } }; template struct Less { bool operator()(const A& a, const A& b) const { return a < b; } }; template struct Greater { bool operator()(const A& a, const A& b) const { return a > b; } }; template class Pair { public: F first; S second; Pair() : first(F()), second(S()) { } Pair(const F& f, const S& s) : first(f), second(s) { } Pair(const Pair& p) : first(p.first), second(p.second) { } // CN - fix for /.../NsBasicTemplates.h(61) : warning C4512: 'nvidia::shdfnd::Pair' : assignment operator could // not be generated Pair& operator=(const Pair& p) { first = p.first; second = p.second; return *this; } bool operator==(const Pair& p) const { return first == p.first && second == p.second; } bool operator<(const Pair& p) const { if(first < p.first) return true; else return !(p.first < first) && (second < p.second); } }; template struct LogTwo { static const unsigned int value = LogTwo<(A >> 1)>::value + 1; }; template <> struct LogTwo<1> { static const unsigned int value = 0; }; template struct UnConst { typedef T Type; }; template struct UnConst { typedef T Type; }; template T pointerOffset(void* p, ptrdiff_t offset) { return reinterpret_cast(reinterpret_cast(p) + offset); } template T pointerOffset(const void* p, ptrdiff_t offset) { return reinterpret_cast(reinterpret_cast(p) + offset); } template NV_CUDA_CALLABLE NV_INLINE void swap(T& x, T& y) { const T tmp = x; x = y; y = tmp; } } // namespace shdfnd } // namespace nvidia #endif // #ifndef NV_NSFOUNDATION_NSBASICTEMPLATES_H ",0 "DatabaseTable; import org.apache.log4j.Logger; import java.sql.SQLException; import java.util.UUID; /** * Created by wannes on 12/20/14. */ @DatabaseTable(tableName = ""session_tokens"") public class SessionToken { @DatabaseField(canBeNull = false) private UUID user; @DatabaseField(canBeNull = false) private String address; @DatabaseField(canBeNull = false) private long creationTime; @DatabaseField(id = true) private UUID token; private SessionToken() { } public SessionToken(UUID user, String address) { this.user = user; this.address = address; this.creationTime = System.currentTimeMillis(); this.token = UUID.randomUUID(); try { SessionTokens.dao.create(this); } catch (SQLException ex) { Logger.getLogger(getClass()).error(""Failed to create session token"", ex); } } public UUID getToken() { return token; } public UUID getUser() { return user; } public String getAddress() { return address; } public long getCreationTime() { return creationTime; } public boolean valid() { if (Users.isRelatedService(this.user)) return true; return System.currentTimeMillis() - this.creationTime <= 3600 * 1000; } } ",0 "g.ethereum.core.BlockchainImpl; import org.ethereum.core.Genesis; import org.ethereum.facade.Blockchain; import org.ethereum.manager.WorldManager; import org.junit.After; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.spongycastle.util.encoders.Hex; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; import java.io.File; import java.io.IOException; import java.math.BigInteger; import java.net.URISyntaxException; import java.net.URL; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.util.List; import static org.junit.Assert.*; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(loader = AnnotationConfigContextLoader.class) public class BlockTest { private static final Logger logger = LoggerFactory.getLogger(""test""); @Configuration @ComponentScan(basePackages = ""org.ethereum"") static class ContextConfiguration extends TestContext { } @Autowired WorldManager worldManager; // https://ethereum.etherpad.mozilla.org/12 private String PoC7_GENESIS_HEX_RLP_ENCODED = ""f9012ef90129a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0156df8ef53c723b40f97aff55dd785489cae8b457495916147687746bd5ee077a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008302000080830f4240808080a004994f67dc55b09e814ab7ffc8df3686b4afb2bb53e60eae97ef043fe03fb829c0c0""; private String PoC7_GENESIS_HEX_HASH = ""c9cb614fddd89b3bc6e2f0ed1f8e58e8a0d826612a607a6151be6f39c991a941""; String block_2 = ""f8b5f8b1a0cf4b25b08b39350304fe12a16e4216c01a426f8f3dbf0d392b5b45"" + ""8ffb6a399da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a1"" + ""42fd40d493479476f5eabe4b342ee56b8ceba6ab2a770c3e2198e7a08a22d58b"" + ""a5c65b2bf660a961b075a43f564374d38bfe6cc69823eea574d1d16e80833fe0"" + ""04028609184e72a000830f3aab80845387c60380a00000000000000000000000"" + ""0000000000000000000000000033172b6669131179c0c0""; String block_17 = ""f9016df8d3a0aa142573b355c6f2e8306471c869b0d12d0638cea3f57d39991a"" + ""b1b03ffa40daa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40"" + ""d4934794e559de5527492bcb42ec68d07df0742a98ec3f1ea031c973c20e7a15c319a9ff"" + ""9b0aab5bdc121320767fee71fb2b771ce1c93cf812a01b224ec310c2bfb40fd0e6a668ee"" + ""7c06a5a4a4bfb99620d0fea8f7b43315dd59833f3130118609184e72a000830f01ec8201"" + ""f4845387f36980a00000000000000000000000000000000000000000000000000532c3ae"" + ""9b3503f6f895f893f86d018609184e72a0008201f494f625565ac58ec5dadfce1b8f9fb1"" + ""dd30db48613b8862cf5246d0c80000801ca05caa26abb350e0521a25b8df229806f3777d"" + ""9e262996493846a590c7011697dba07bb7680a256ede4034212b7a1ae6c7caea73190cb0"" + ""7dedb91a07b72f34074e76a00cd22d78d556175604407dc6109797f5c8d990d05f1b352e"" + ""10c71b3dd74bc70f8201f4c0""; String block_32 = ""f8f8f8f4a00a312c2b0a8f125c60a3976b6e508e740e095eb59943988d9bbfb8"" + ""aa43922e31a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4"" + ""934794e559de5527492bcb42ec68d07df0742a98ec3f1ea050188ab86bdf164ac90eb283"" + ""5a04a8930aae5393c3a2ef1166fb95028f9456b88080b840000000000000000000000000"" + ""000000000000000000000000000000000000000000000000000000000000000000000000"" + ""00000000000000000000000000000000833ee248208609184e72a000830eca0080845387"" + ""fd2080a00000000000000000000000000000000000000000000000001f52ebb192c4ea97"" + ""c0c0""; @After public void doReset() { worldManager.reset(); } @Test /* got from go guy */ public void testGenesisFromRLP() { // from RLP encoding byte[] genesisBytes = Hex.decode(PoC7_GENESIS_HEX_RLP_ENCODED); Block genesisFromRLP = new Block(genesisBytes); Block genesis = Genesis.getInstance(); assertEquals(Hex.toHexString(genesis.getHash()), Hex.toHexString(genesisFromRLP.getHash())); assertEquals(Hex.toHexString(genesis.getParentHash()), Hex.toHexString(genesisFromRLP.getParentHash())); assertEquals(Hex.toHexString(genesis.getStateRoot()), Hex.toHexString(genesisFromRLP.getStateRoot())); } @Test public void testGenesisFromNew() { Block genesis = Genesis.getInstance(); logger.info(genesis.toString()); logger.info(""genesis hash: [{}]"", Hex.toHexString(genesis.getHash())); logger.info(""genesis rlp: [{}]"", Hex.toHexString(genesis.getEncoded())); assertEquals(PoC7_GENESIS_HEX_HASH, Hex.toHexString(genesis.getHash())); assertEquals(PoC7_GENESIS_HEX_RLP_ENCODED, Hex.toHexString(genesis.getEncoded())); } @Test /* block without transactions - block#32 in PoC5 cpp-chain */ public void testEmptyBlock() { byte[] payload = Hex.decode(block_32); Block blockData = new Block(payload); logger.info(blockData.toString()); } @Test /* block with single balance transfer transaction - block#17 in PoC5 cpp-chain */ @Ignore public void testSingleBalanceTransfer() { byte[] payload = Hex.decode(block_17); // todo: find out an uptodate block wire Block blockData = new Block(payload); logger.info(blockData.toString()); } @Test /* large block with 5 transactions -block#1 in PoC5 cpp-chain */ public void testBlockWithContractCreation() { byte[] payload = Hex.decode(PoC7_GENESIS_HEX_RLP_ENCODED); Block block = new Block(payload); logger.info(block.toString()); } @Test public void testCalcDifficulty() { Blockchain blockchain = worldManager.getBlockchain(); Block genesis = Genesis.getInstance(); BigInteger difficulty = new BigInteger(1, genesis.calcDifficulty()); logger.info(""Genesis difficulty: [{}]"", difficulty.toString()); assertEquals(new BigInteger(1, Genesis.DIFFICULTY), difficulty); // Storing genesis because the parent needs to be in the DB for calculation. blockchain.add(genesis); Block block1 = new Block(Hex.decode(PoC7_GENESIS_HEX_RLP_ENCODED)); BigInteger calcDifficulty = new BigInteger(1, block1.calcDifficulty()); BigInteger actualDifficulty = new BigInteger(1, block1.getDifficulty()); logger.info(""Block#1 actual difficulty: [{}] "", actualDifficulty.toString()); logger.info(""Block#1 calculated difficulty: [{}] "", calcDifficulty.toString()); assertEquals(actualDifficulty, calcDifficulty); } @Test public void testCalcGasLimit() { BlockchainImpl blockchain = (BlockchainImpl) worldManager.getBlockchain(); Block genesis = Genesis.getInstance(); long gasLimit = blockchain.calcGasLimit(genesis.getHeader()); logger.info(""Genesis gasLimit: [{}] "", gasLimit); assertEquals(Genesis.GAS_LIMIT, gasLimit); // Test with block Block block1 = new Block(Hex.decode(PoC7_GENESIS_HEX_RLP_ENCODED)); long calcGasLimit = blockchain.calcGasLimit(block1.getHeader()); long actualGasLimit = block1.getGasLimit(); blockchain.tryToConnect(block1); logger.info(""Block#1 actual gasLimit [{}] "", actualGasLimit); logger.info(""Block#1 calculated gasLimit [{}] "", calcGasLimit); assertEquals(actualGasLimit, calcGasLimit); } @Ignore @Test public void testScenario1() throws URISyntaxException, IOException { BlockchainImpl blockchain = (BlockchainImpl) worldManager.getBlockchain(); URL scenario1 = ClassLoader .getSystemResource(""blockload/scenario1.dmp""); File file = new File(scenario1.toURI()); List strData = Files.readAllLines(file.toPath(), StandardCharsets.UTF_8); byte[] root = Genesis.getInstance().getStateRoot(); for (String blockRLP : strData) { Block block = new Block( Hex.decode(blockRLP)); logger.info(""sending block.hash: {}"", Hex.toHexString(block.getHash())); blockchain.tryToConnect(block); root = block.getStateRoot(); } logger.info(""asserting root state is: {}"", Hex.toHexString(root)); //expected root: fb8be59e6420892916e3967c60adfdf48836af040db0072ca411d7aaf5663804 assertEquals(Hex.toHexString(root), Hex.toHexString(worldManager.getRepository().getRoot())); } @Ignore @Test public void testScenario2() throws URISyntaxException, IOException { BlockchainImpl blockchain = (BlockchainImpl) worldManager.getBlockchain(); URL scenario1 = ClassLoader .getSystemResource(""blockload/scenario2.dmp""); File file = new File(scenario1.toURI()); List strData = Files.readAllLines(file.toPath(), StandardCharsets.UTF_8); byte[] root = Genesis.getInstance().getStateRoot(); for (String blockRLP : strData) { Block block = new Block( Hex.decode(blockRLP)); logger.info(""sending block.hash: {}"", Hex.toHexString(block.getHash())); blockchain.tryToConnect(block); root = block.getStateRoot(); } logger.info(""asserting root state is: {}"", Hex.toHexString(root)); //expected root: a5e2a18bdbc4ab97775f44852382ff5585b948ccb15b1d69f0abb71e2d8f727d assertEquals(Hex.toHexString(root), Hex.toHexString(worldManager.getRepository().getRoot())); } @Test @Ignore public void testUncleValidGenerationGap() { // TODO fail(""Not yet implemented""); } @Test @Ignore public void testUncleInvalidGenerationGap() { // TODO fail(""Not yet implemented""); } @Test @Ignore public void testUncleInvalidParentGenerationGap() { // TODO fail(""Not yet implemented""); } } ",0 " */ /* */ /* Пример влез: */ /* */ /* Пример излез: */ /******************************************************************************/ int main() { return 0; } ",0 "is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * * @category Peopletag * @package StatusNet * @author Shashi Gowda * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } /** * Subscribe to a peopletag * * This is the action for subscribing to a peopletag. It works more or less like the join action * for groups. * * @category Peopletag * @package StatusNet * @author Shashi Gowda * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ class SubscribepeopletagAction extends Action { var $peopletag = null; var $tagger = null; /** * Prepare to run */ function prepare($args) { parent::prepare($args); if (!common_logged_in()) { // TRANS: Client error displayed when trying to perform an action while not logged in. $this->clientError(_('You must be logged in to unsubscribe from a list.')); return false; } // Only allow POST requests if ($_SERVER['REQUEST_METHOD'] != 'POST') { // TRANS: Client error displayed when trying to use another method than POST. $this->clientError(_('This action only accepts POST requests.')); return false; } // CSRF protection $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.'. ' Try again, please.')); return false; } $tagger_arg = $this->trimmed('tagger'); $tag_arg = $this->trimmed('tag'); $id = intval($this->arg('id')); if ($id) { $this->peopletag = Profile_list::getKV('id', $id); } else { // TRANS: Client error displayed when trying to perform an action without providing an ID. $this->clientError(_('No ID given.'), 404); return false; } if (!$this->peopletag || $this->peopletag->private) { // TRANS: Client error displayed trying to reference a non-existing list. $this->clientError(_('No such list.'), 404); return false; } $this->tagger = Profile::getKV('id', $this->peopletag->tagger); return true; } /** * Handle the request * * On POST, add the current user to the group * * @param array $args unused * * @return void */ function handle($args) { parent::handle($args); $cur = common_current_user(); try { Profile_tag_subscription::add($this->peopletag, $cur); } catch (Exception $e) { // TRANS: Server error displayed subscribing to a list fails. // TRANS: %1$s is a user nickname, %2$s is a list, %3$s is the error message (no period). $this->serverError(sprintf(_('Could not subscribe user %1$s to list %2$s: %3$s'), $cur->nickname, $this->peopletag->tag), $e->getMessage()); } if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); // TRANS: Title of form to subscribe to a list. // TRANS: %1%s is a user nickname, %2$s is a list, %3$s is a tagger nickname. $this->element('title', null, sprintf(_('%1$s subscribed to list %2$s by %3$s'), $cur->nickname, $this->peopletag->tag, $this->tagger->nickname)); $this->elementEnd('head'); $this->elementStart('body'); $lf = new UnsubscribePeopletagForm($this, $this->peopletag); $lf->show(); $this->elementEnd('body'); $this->endHTML(); } else { common_redirect(common_local_url('peopletagsubscribers', array('tagger' => $this->tagger->nickname, 'tag' =>$this->peopletag->tag)), 303); } } } ",0 "dby:SR|Office-PC\\Rafael vti_timecreated:TR|01 Nov 2014 09:09:36 -0000 vti_backlinkinfo:VX| vti_nexttolasttimemodified:TW|14 Aug 2014 12:39:17 -0000 vti_cacheddtm:TX|03 Nov 2015 21:05:11 -0000 vti_filesize:IR|554 vti_cachedneedsrewrite:BR|false vti_cachedhasbots:BR|false vti_cachedhastheme:BR|false vti_cachedhasborder:BR|false vti_charset:SR|utf-8 vti_syncofs_mydatalogger.de\:22/%2fvar/www/vhosts/s16851491.onlinehome-server.info/kaufreund.de:TW|14 Aug 2014 12:39:17 -0000 vti_syncwith_mydatalogger.de\:22/%2fvar/www/vhosts/s16851491.onlinehome-server.info/kaufreund.de:TW|03 Nov 2015 21:05:11 -0000 ",0 "h this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.isis.core.metamodel.facets.properties.property.disabled; import org.apache.isis.applib.annotation.Editing; import org.apache.isis.applib.annotation.Property; import org.apache.isis.applib.annotation.When; import org.apache.isis.applib.annotation.Where; import org.apache.isis.core.metamodel.facetapi.FacetHolder; import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet; import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacetAbstractImpl; public class DisabledFacetForPropertyAnnotation extends DisabledFacetAbstractImpl { public static DisabledFacet create(final Property property, final FacetHolder holder) { if (property == null) { return null; } final Editing editing = property.editing(); final String disabledReason = property.editingDisabledReason(); switch (editing) { case AS_CONFIGURED: // nothing needs to be done here; the DomainObjectFactory (processing @DomainObject annotation) // will install an ImmutableFacetForDomainObjectAnnotation on the domain object and then a // DisabledFacetOnPropertyDerivedFromImmutable facet will be installed. return null; case DISABLED: return new DisabledFacetForPropertyAnnotation(disabledReason, holder); case ENABLED: return null; } return null; } private DisabledFacetForPropertyAnnotation(final String reason, final FacetHolder holder) { super(When.ALWAYS, Where.EVERYWHERE, reason, holder); } } ",0 "ed_time: '2013-04-04T09:15:34.396-07:00' blogger_id: tag:blogger.com,1999:blog-5219665179084602082.post-7455732729975892877 blogger_orig_url: http://david-codes.blogspot.com/2013/04/objectify-and-strange-errors-with-gwt.html ---
        OK, so it turns out Objectify returns non-serializable lists when using the list() method. Using the following method :



        ofy.load().type(Plant.class).list();


        And directly returning the value to GWT client side throws a cryptic serialization exception, where the class that raises the problem is called Proxy$XX where XX are digits.

        That problem is going to be fixed in GWT next version, but meanwhile we have to use the workaround provided in the bug report.",0 "e; use Illuminate\Notifications\Messages\MailMessage; class ForgottenPasswordLink extends Notification implements ShouldQueue { use Queueable; private $token; /** * Create a new notification instance. * * @return void */ public function __construct($token) { parent::__construct(); $this->token = $token; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['mail', 'database']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { $subject = 'SSO Password Reset'; return (new MailMessage) ->from(config('mail.from.address'), 'VATSIM UK Web Services') ->subject($subject) ->view('emails.mship.security.reset_confirmation', ['subject' => $subject, 'recipient' => $notifiable, 'account' => $notifiable, 'token' => route('password.reset', $this->token)]); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return ['token' => $this->token]; } } ",0 "atus=no,menubar=no,scrollbars=yes,resizable=yes"");}
        條目 撮科打哄
        注音 ㄘㄨㄛ ㄎㄜ ㄉㄚˇ ㄏㄨㄥˇ
        漢語拼音 cuō kē dǎ hǒng
        釋義 以詼諧的言詞及有趣的動作引人發笑。明˙湯顯祖˙南柯記˙第六齣:*但是晦氣的人家,便請我撮科打哄;不管有趣的子弟,都與他鑽懶鬧閒。*
        附錄 修訂本參考資料
        ",0 "*/ trait TraitConfigure { /** * Tipo de objeto que genera el historial (Facturas,Presupuestos,Contratos) * @var string */ private $objectType; /** * Identificador unico del objeto dueno de los archivos (14114,DF-23454) * @var string */ private $objectId; public function configure($objectId, $objectType,array $options = []) { $this->objectId = $objectId; $this->objectType = $objectType; } } ",0 "mlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"" lang=""en""> translate.storage.pypo
           Home       Trees       Indices       Help   
        Translate Toolkit
        Package translate :: Package storage :: Module pypo
        [hide private]
        [frames] | no frames]

        Module pypo

        source code

        classes that hold units of .po files (pounit) or entire files (pofile) gettext-style .po (or .pot) files are used in translations for KDE et al (see kbabel)

        Classes [hide private]
          pounit
          pofile
        A .po file containing various units
        Functions [hide private]
         
        escapeforpo(line)
        Escapes a line for po format.
        source code
         
        unescapehandler(escape) source code
         
        wrapline(line)
        Wrap text for po files.
        source code
         
        quoteforpo(text)
        quotes the given text for a PO file, returning quoted and escaped lines
        source code
         
        extractpoline(line)
        Remove quote and unescape line from po file.
        source code
         
        unquotefrompo(postr) source code
         
        is_null(lst) source code
         
        extractstr(string) source code
        Variables [hide private]
          lsep = "\n#: "
        Seperator for #: entries
          po_unescape_map = {"\\r": "\r", "\\t": "\t", '\\"': '"', '\\n'...
          po_escape_map = dict([(value, key) for(key, value) in po_unesc...

        Imports: copy, cStringIO, re, data, multistring, quote, textwrap, pocommon, base, poparser, encodingToUse


        Function Details [hide private]

        escapeforpo(line)

        source code 

        Escapes a line for po format. assumes no occurs in the line.

        Parameters:
        • line - unescaped text

        extractpoline(line)

        source code 

        Remove quote and unescape line from po file.

        Parameters:
        • line - a quoted line from a po file (msgid or msgstr)

        Variables Details [hide private]

        po_unescape_map

        Value:
        {"\\r": "\r", "\\t": "\t", '\\"': '"', '\\n': '\n', '\\\\': '\\'}
        

        po_escape_map

        Value:
        dict([(value, key) for(key, value) in po_unescape_map.items()])
        

           Home       Trees       Indices       Help   
        Translate Toolkit
        Generated by Epydoc 3.0.1 on Tue Apr 12 18:11:55 2011 http://epydoc.sourceforge.net
        ",0 " * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* @test TestVerifySilently.java * @key gc * @bug 8032771 * @summary Test silent verification. * @library /testlibrary * @modules java.base/sun.misc * java.management */ import jdk.test.lib.OutputAnalyzer; import jdk.test.lib.ProcessTools; import java.util.ArrayList; import java.util.Collections; class RunSystemGC { public static void main(String args[]) throws Exception { System.gc(); } } public class TestVerifySilently { private static String[] getTestJavaOpts() { String testVmOptsStr = System.getProperty(""test.java.opts""); if (!testVmOptsStr.isEmpty()) { return testVmOptsStr.split("" ""); } else { return new String[] {}; } } private static OutputAnalyzer runTest(boolean verifySilently) throws Exception { ArrayList vmOpts = new ArrayList(); Collections.addAll(vmOpts, getTestJavaOpts()); Collections.addAll(vmOpts, new String[] {""-XX:+UnlockDiagnosticVMOptions"", ""-XX:+VerifyDuringStartup"", ""-XX:+VerifyBeforeGC"", ""-XX:+VerifyAfterGC"", (verifySilently ? ""-Xlog:gc"":""-Xlog:gc+verify=debug""), RunSystemGC.class.getName()}); ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(vmOpts.toArray(new String[vmOpts.size()])); OutputAnalyzer output = new OutputAnalyzer(pb.start()); System.out.println(""Output:\n"" + output.getOutput()); return output; } public static void main(String args[]) throws Exception { OutputAnalyzer output; output = runTest(false); output.shouldContain(""Verifying""); output.shouldHaveExitValue(0); output = runTest(true); output.shouldNotContain(""Verifying""); output.shouldHaveExitValue(0); } } ",0 "\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} */ class Configuration implements ConfigurationInterface { /** * {@inheritDoc} */ public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $treeBuilder->root('kosssi_my_albums'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for // more information on that topic. return $treeBuilder; } } ",0 "tribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef __ASM_ARCH_PSC_H #define __ASM_ARCH_PSC_H #define DAVINCI_PWR_SLEEP_CNTRL_BASE 0x01C41000 /* Power and Sleep Controller (PSC) Domains */ #define DAVINCI_GPSC_ARMDOMAIN 0 #define DAVINCI_GPSC_DSPDOMAIN 1 #define DAVINCI_LPSC_VPSSMSTR 0 #define DAVINCI_LPSC_VPSSSLV 1 #define DAVINCI_LPSC_TPCC 2 #define DAVINCI_LPSC_TPTC0 3 #define DAVINCI_LPSC_TPTC1 4 #define DAVINCI_LPSC_EMAC 5 #define DAVINCI_LPSC_EMAC_WRAPPER 6 #define DAVINCI_LPSC_USB 9 #define DAVINCI_LPSC_ATA 10 #define DAVINCI_LPSC_VLYNQ 11 #define DAVINCI_LPSC_UHPI 12 #define DAVINCI_LPSC_DDR_EMIF 13 #define DAVINCI_LPSC_AEMIF 14 #define DAVINCI_LPSC_MMC_SD 15 #define DAVINCI_LPSC_McBSP 17 #define DAVINCI_LPSC_I2C 18 #define DAVINCI_LPSC_UART0 19 #define DAVINCI_LPSC_UART1 20 #define DAVINCI_LPSC_UART2 21 #define DAVINCI_LPSC_SPI 22 #define DAVINCI_LPSC_PWM0 23 #define DAVINCI_LPSC_PWM1 24 #define DAVINCI_LPSC_PWM2 25 #define DAVINCI_LPSC_GPIO 26 #define DAVINCI_LPSC_TIMER0 27 #define DAVINCI_LPSC_TIMER1 28 #define DAVINCI_LPSC_TIMER2 29 #define DAVINCI_LPSC_SYSTEM_SUBSYS 30 #define DAVINCI_LPSC_ARM 31 #define DAVINCI_LPSC_SCR2 32 #define DAVINCI_LPSC_SCR3 33 #define DAVINCI_LPSC_SCR4 34 #define DAVINCI_LPSC_CROSSBAR 35 #define DAVINCI_LPSC_CFG27 36 #define DAVINCI_LPSC_CFG3 37 #define DAVINCI_LPSC_CFG5 38 #define DAVINCI_LPSC_GEM 39 #define DAVINCI_LPSC_IMCOP 40 #define DM355_LPSC_TIMER3 5 #define DM355_LPSC_SPI1 6 #define DM355_LPSC_MMC_SD1 7 #define DM355_LPSC_McBSP1 8 #define DM355_LPSC_PWM3 10 #define DM355_LPSC_SPI2 11 #define DM355_LPSC_RTO 12 #define DM355_LPSC_VPSS_DAC 41 /* DM365 */ #define DM365_LPSC_TIMER3 5 #define DM365_LPSC_SPI1 6 #define DM365_LPSC_MMC_SD1 7 #define DM365_LPSC_McBSP1 8 #define DM365_LPSC_PWM3 10 #define DM365_LPSC_SPI2 11 #define DM365_LPSC_RTO 12 #define DM365_LPSC_TIMER4 17 #define DM365_LPSC_SPI0 22 #define DM365_LPSC_SPI3 38 #define DM365_LPSC_SPI4 39 #define DM365_LPSC_EMAC 40 #define DM365_LPSC_VOICE_CODEC 44 #define DM365_LPSC_DAC_CLK 46 #define DM365_LPSC_VPSSMSTR 47 #define DM365_LPSC_MJCP 50 /* * LPSC Assignments */ #define DM646X_LPSC_ARM 0 #define DM646X_LPSC_C64X_CPU 1 #define DM646X_LPSC_HDVICP0 2 #define DM646X_LPSC_HDVICP1 3 #define DM646X_LPSC_TPCC 4 #define DM646X_LPSC_TPTC0 5 #define DM646X_LPSC_TPTC1 6 #define DM646X_LPSC_TPTC2 7 #define DM646X_LPSC_TPTC3 8 #define DM646X_LPSC_PCI 13 #define DM646X_LPSC_EMAC 14 #define DM646X_LPSC_VDCE 15 #define DM646X_LPSC_VPSSMSTR 16 #define DM646X_LPSC_VPSSSLV 17 #define DM646X_LPSC_TSIF0 18 #define DM646X_LPSC_TSIF1 19 #define DM646X_LPSC_DDR_EMIF 20 #define DM646X_LPSC_AEMIF 21 #define DM646X_LPSC_McASP0 22 #define DM646X_LPSC_McASP1 23 #define DM646X_LPSC_CRGEN0 24 #define DM646X_LPSC_CRGEN1 25 #define DM646X_LPSC_UART0 26 #define DM646X_LPSC_UART1 27 #define DM646X_LPSC_UART2 28 #define DM646X_LPSC_PWM0 29 #define DM646X_LPSC_PWM1 30 #define DM646X_LPSC_I2C 31 #define DM646X_LPSC_SPI 32 #define DM646X_LPSC_GPIO 33 #define DM646X_LPSC_TIMER0 34 #define DM646X_LPSC_TIMER1 35 #define DM646X_LPSC_ARM_INTC 45 /* PSC0 defines */ #define DA8XX_LPSC0_TPCC 0 #define DA8XX_LPSC0_TPTC0 1 #define DA8XX_LPSC0_TPTC1 2 #define DA8XX_LPSC0_EMIF25 3 #define DA8XX_LPSC0_SPI0 4 #define DA8XX_LPSC0_MMC_SD 5 #define DA8XX_LPSC0_AINTC 6 #define DA8XX_LPSC0_ARM_RAM_ROM 7 #define DA8XX_LPSC0_SECU_MGR 8 #define DA8XX_LPSC0_UART0 9 #define DA8XX_LPSC0_SCR0_SS 10 #define DA8XX_LPSC0_SCR1_SS 11 #define DA8XX_LPSC0_SCR2_SS 12 #define DA8XX_LPSC0_PRUSS 13 #define DA8XX_LPSC0_ARM 14 #define DA8XX_LPSC0_GEM 15 /* PSC1 defines */ #define DA850_LPSC1_TPCC1 0 #define DA8XX_LPSC1_USB20 1 #define DA8XX_LPSC1_USB11 2 #define DA8XX_LPSC1_GPIO 3 #define DA8XX_LPSC1_UHPI 4 #define DA8XX_LPSC1_CPGMAC 5 #define DA8XX_LPSC1_EMIF3C 6 #define DA8XX_LPSC1_McASP0 7 #define DA830_LPSC1_McASP1 8 #define DA850_LPSC1_SATA 8 #define DA830_LPSC1_McASP2 9 #define DA8XX_LPSC1_SPI1 10 #define DA8XX_LPSC1_I2C 11 #define DA8XX_LPSC1_UART1 12 #define DA8XX_LPSC1_UART2 13 #define DA8XX_LPSC1_LCDC 16 #define DA8XX_LPSC1_PWM 17 #define DA850_LPSC1_MMC_SD1 18 #define DA8XX_LPSC1_ECAP 20 #define DA830_LPSC1_EQEP 21 #define DA850_LPSC1_TPTC2 21 #define DA8XX_LPSC1_SCR_P0_SS 24 #define DA8XX_LPSC1_SCR_P1_SS 25 #define DA8XX_LPSC1_CR_P3_SS 26 #define DA8XX_LPSC1_L3_CBA_RAM 31 /* TNETV107X LPSC Assignments */ #define TNETV107X_LPSC_ARM 0 #define TNETV107X_LPSC_GEM 1 #define TNETV107X_LPSC_DDR2_PHY 2 #define TNETV107X_LPSC_TPCC 3 #define TNETV107X_LPSC_TPTC0 4 #define TNETV107X_LPSC_TPTC1 5 #define TNETV107X_LPSC_RAM 6 #define TNETV107X_LPSC_MBX_LITE 7 #define TNETV107X_LPSC_LCD 8 #define TNETV107X_LPSC_ETHSS 9 #define TNETV107X_LPSC_AEMIF 10 #define TNETV107X_LPSC_CHIP_CFG 11 #define TNETV107X_LPSC_TSC 12 #define TNETV107X_LPSC_ROM 13 #define TNETV107X_LPSC_UART2 14 #define TNETV107X_LPSC_PKTSEC 15 #define TNETV107X_LPSC_SECCTL 16 #define TNETV107X_LPSC_KEYMGR 17 #define TNETV107X_LPSC_KEYPAD 18 #define TNETV107X_LPSC_GPIO 19 #define TNETV107X_LPSC_MDIO 20 #define TNETV107X_LPSC_SDIO0 21 #define TNETV107X_LPSC_UART0 22 #define TNETV107X_LPSC_UART1 23 #define TNETV107X_LPSC_TIMER0 24 #define TNETV107X_LPSC_TIMER1 25 #define TNETV107X_LPSC_WDT_ARM 26 #define TNETV107X_LPSC_WDT_DSP 27 #define TNETV107X_LPSC_SSP 28 #define TNETV107X_LPSC_TDM0 29 #define TNETV107X_LPSC_VLYNQ 30 #define TNETV107X_LPSC_MCDMA 31 #define TNETV107X_LPSC_USB0 32 #define TNETV107X_LPSC_TDM1 33 #define TNETV107X_LPSC_DEBUGSS 34 #define TNETV107X_LPSC_ETHSS_RGMII 35 #define TNETV107X_LPSC_SYSTEM 36 #define TNETV107X_LPSC_IMCOP 37 #define TNETV107X_LPSC_SPARE 38 #define TNETV107X_LPSC_SDIO1 39 #define TNETV107X_LPSC_USB1 40 #define TNETV107X_LPSC_USBSS 41 #define TNETV107X_LPSC_DDR2_EMIF1_VRST 42 #define TNETV107X_LPSC_DDR2_EMIF2_VCTL_RST 43 #define TNETV107X_LPSC_MAX 44 /* PSC register offsets */ #define EPCPR 0x070 #define PTCMD 0x120 #define PTSTAT 0x128 #define PDSTAT 0x200 #define PDCTL 0x300 #define MDSTAT 0x800 #define MDCTL 0xA00 /* PSC module states */ #define PSC_STATE_SWRSTDISABLE 0 #define PSC_STATE_SYNCRST 1 #define PSC_STATE_DISABLE 2 #define PSC_STATE_ENABLE 3 #define MDSTAT_STATE_MASK 0x3f #define PDSTAT_STATE_MASK 0x1f #define MDCTL_FORCE BIT(31) #define PDCTL_NEXT BIT(0) #define PDCTL_EPCGOOD BIT(8) #ifndef __ASSEMBLER__ extern int davinci_psc_is_clk_active(unsigned int ctlr, unsigned int id); extern void davinci_psc_config(unsigned int domain, unsigned int ctlr, unsigned int id, bool enable, u32 flags); #endif #endif /* __ASM_ARCH_PSC_H */ ",0 "lvetica','raleway'; padding:1em 1em; background-color:#2C85AF; color:#FFFFFF; } .direccion{ font-size:12px; font-family: 'helvetica','raleway'; padding:1em 4em; background-color:#2C85AF; color:#FFFFFF; } .rellenotabla{ font-size: 10px; padding:1em 1em; font-family: 'helvetica','raleway'; } .rellenotabla2{ font-size: 10px; padding:1em 3em; font-family: 'helvetica','raleway'; } .textocolspan{ font-size:10px; font-family: 'helvetica','raleway'; background-color:#5AAED0; color:#FFFFFF; text-align:left; padding: 0.5em 1em; text-shadow: 1px 1px #000000; } @font-face { font-family: 'helvetica'; src: url('fonts/helvetica-b.eot'); /* IE9 Compat Modes */ src: url('fonts/helvetica-b.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('fonts/helveticaneue-webfont.woff') format('woff'), /* Modern Browsers */ url('fonts/HELVE6.ttf') format('truetype'), /* Safari, Android, iOS */ url('fonts/Helvetica_Neue_typeface_weights.svg#svgFontName') format('svg'); /* Legacy iOS */ } div.boton_ubicacion{ background-color: #035A9F; color: #FFFFFF; } div.boton_ubicacion:hover{ background-color: #E4E5E6; color: #035A9F; } div#terminales{ display:inline-block; background-color:#2C85AF; color:#FFFFFF; font-family: 'raleway'; font-size:14px;padding:5px 15px; cursor:pointer; cursor: hand; margin-right:-4px; } div#terminales:hover{ background-color: #E4E5E6; color: #035A9F; } div#centros{ display:inline-block; background-color:#2C85AF; color:#FFFFFF; font-family: 'raleway'; font-size:14px; padding:5px 15px; cursor:pointer; cursor: hand; margin-right:-4px; } div#centros:hover{ background-color: #E4E5E6; color: #035A9F; } div#agencias{ display:inline-block; background-color:#2C85AF; color:#FFFFFF; font-family: 'raleway'; font-size:14px; padding:5px 15px; cursor:pointer; cursor: hand; margin-right:-4px; } div#agencias:hover{ background-color: #E4E5E6; color: #035A9F; } div#oxxo{ display:inline-block; background-color:#2C85AF; color:#FFFFFF; font-family: 'raleway'; font-size:14px; padding:5px 15px; cursor:pointer; cursor: hand; margin-right:-4px; } div#oxxo:hover{ background-color: #E4E5E6; color: #035A9F; }
        Terminales y Centrales
        Centros Comerciales
        Agencias de Viajes
        Oxxo

        TERMINALES Y CENTRALES

        SINALOA

        •Mazatlán

        Calle Ferrusquilla s/n Interior
        Edificio central de Autobuses
        Colonia Palos Prietos
        Tel: 01 (669) 981 46 59

        •Plaza San Ignacio

        Carretera Internacional Km. 1205
        Col. Fovisste en Playa Azul
        Tel. 01 (669) 135 12 34

        •Culiacán

        CENTRAL DE AUTOBUSES CULIACÁN
        en sala de primera y sala de segunda.
        Blvd. Rolando Arjona # 2571 Norte y Blvd.
        Culiacan Colonia Desarrollo Urbano 3 Rios.
        Tel. 01 (667) 761 27 61

        •Guamuchil

        Nicolas Bravo y Adolfo Lopez Mateos # 479
        Colonia Morelos
        Tel: 01 (673) 732 67 50

        •Guasave

        Blvd. 16 de Septiembre y 5 de Febrero S/n
        Colonia Tel. 01 (687) 872 98 45

        •Los Mochis

        TERMINAL
        Blvd. Rosendo G. Castro y
        Belisario Dominguez # 620 Sur
        Colonia Bienestar
        Tel: 01 (668) 817 59 07
        CENTRAL DE AUTOBUSES
        Blvd. Rosendo G. Castro y Constitucion # 302 Oriente Col. Bienestar
        Tel: 01 (668) 815 67 84

        CENTROS COMERCIALES

        SINALOA

        •Estadio, Culiacán

        Blvd. Enrique Sáncez Alonso 2402 Nte.
        Col. Desarrollo Urbano Tres Rios
        C.P. 80030
        Tel. 01 (667) 146 61 60

        •Los Mochis

        Blvd. Jiquilpan 1112
        Pte Local B
        Col. Jiquilpan Ahome C.P. 81220
        Tel. 01 (668) 818 28 35

        •Culiacán

        Av. Regional 1330 Norte
        Col. Sector V de la Primera del
        Plan Parcial
        (Tres Tios) C.P. 80000
        Tel. 01 (667) 750 95 42

        •Walmart 68, Culiacán

        Carretera Internacional 2017
        Col. Hacienda del Mar C.P. 82128
        Tel. 01 (669) 940 81 66

        •El Cochi, Mazatlán

        Av. Manuel J. Clouthier 4459
        Col. El Cochi C.P. 82139

        •Soriana Santa Rosa, Mazatlán

        Av. Luis Donaldo Colosio 17301
        Col. Fracc. Valle Dorado C.P. 82165
        Tel. 01 (669) 940 58 34

        AGENCIAS DE VIAJES

        SINALOA

        MUNICIPIO COLONIA DIRECCIÓN TELÉFONO 1 TELÉFONO 2
        Agencia: SERVICIOS Y VIAJES MICHEL
        CULIACAN ALMADA LAZARO CARDENAS N198-G 6677128033 6677128711
        Agencia: ROSEF & TURISMO
        CULIACAN CHAPULTEPEC ALVARO OBREGON 1330 NTE 6677127700 6677127701
        Agencia: AGENCIA DE VIAJES NERY TOURS
        CULIACAN FEDERALISMO BLVD CULIACAN 450-10 6677612992
        Agencia: CULHUACAN TOURS
        CULIACAN LAS QUINTAS PRESA BALSEQUILLOS N 13 6677152606 6677152603
        Agencia: SULLIVAN TURISMO
        CULIACAN VALLADO BLVD EMILIANO ZAPATA N 2151 6677178364 6677176350
        Agencia: AGENCIA MORAGA
        GUAMUCHIL CENTRO AGUSTINA RAMIREZ SUR NO. 671-A 673 7322401
        Agencia: VIAJES LUDACAR
        GUASAVE CENTRO EMILIANO ZAPATA N 45 6878714677 6878714657
        Agencia: SOLEITOURS
        LOS MOCHIS CENTRO CARDENAS PONIENTE N.- 509 6688123030 018009676534
        Agencia: VIAJES TRANVIA
        LOS MOCHIS CENTRO CALLEJON TENOCHTITLAN PTE N.- 399 6688123864
        Agencia: SERVICIOS TURISTICOS CONELVA
        LOS MOCHIS CENTRO AHOME GABRIEL LEYVA SOLANO 357 NTE 6688152484 6688158090
        Agencia: VIAJES COPALA
        MAZATLAN C.C LA GRAN PLAZA APOLO Y REFORMA L -F-4 6699862120
        Agencia: VIAJES MARLOPOS
        MAZATLAN CENTRO AV OLAS ALTAS N 11 6699811993 6699811994
        Agencia: VISTA TOURS MAZATLAN S.A DE C.V
        MAZATLAN LOMAS DE MAZATLAN AV. CAMARON SABALO NO. 51 LOC. 2 Y 3 (669) 9868610
        Agencia: PROMOTOURS EL CID
        MAZATLAN ZONA DORADA AV CAMARON SABALO S/N LOC. 18
        Agencia: AGENCIA DE VIAJES NERY TOURS SUC NOVOLATO
        NAVOLATO CENTRO AV NIÑOS HEROES 484-A 6727271850

        Adquiere tus boletos de autobus TAP en las tiendas Oxxo.

        ",0 "* copy of this software and associated documentation files (the ""Software""), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ def('pTABS', ''); def('REQUEST_ID', 'tp'); class TabbedPane { /*--------------------------------------------------------------------*\ |* CONSTANTS *| \*--------------------------------------------------------------------*/ static $lasKeyIndex = 0; /*--------------------------------------------------------------------*\ |* VARIABLES *| \*--------------------------------------------------------------------*/ public $id; public $label; public $file; public $keyIndex; private $className; /*--------------------------------------------------------------------*\ |* CONSTRUCTOR *| \*--------------------------------------------------------------------*/ public function __construct($id,$label,$file=null,$keyIndex=null) { $this->id = $id; $this->label = $label; $this->file = $file === null ? pTABS.""$id.php"" : $file; $this->keyIndex = $keyIndex === null ? ++self::$lasKeyIndex : $keyIndex; } /*--------------------------------------------------------------------*\ |* DISPLAY *| \*--------------------------------------------------------------------*/ public function tab($group="""") { $cl = get_class($this); return ""
        $this->label
        ""; } public function pane($group="""") { $cl = get_class($this); $content = Filesystem::includeContents($this->file); return """"; } /*--------------------------------------------------------------------*\ |* TABS/PANES *| \*--------------------------------------------------------------------*/ public static function tabs($tabbedPanes,$group="""") { $tabs = """"; foreach ($tabbedPanes as $tp) $tabs .= $tp->tab($group); return $tabs; } public static function panes($tabbedPanes,$group="""",$registerKeys=true) { $panes = """"; $default = isset($_REQUEST[REQUEST_ID])&& isset($tabbedPanes[$_REQUEST[REQUEST_ID]]) ? $tabbedPanes[$_REQUEST[REQUEST_ID]] : current($tabbedPanes); foreach ($tabbedPanes as $tp) $panes .= $tp->pane($group); if ($registerKeys) { $registerKeys = array(); foreach ($tabbedPanes as $t) $registerKeys[$t->keyIndex] = $t->id; } return $panes.self::js($default,$group,$registerKeys); } /*--------------------------------------------------------------------*\ |* JAVASCRIPT *| \*--------------------------------------------------------------------*/ protected static function js($default=null,$group="""",$registerKeys=true) { $class = __CLASS__; $c = $class.$group; ob_start(); ?> ",0 "ation, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\EnvParameterException; /** * This class is used to remove circular dependencies between individual passes. * * @author Johannes M. Schmitt */ class Compiler { private $passConfig; private $log = []; private $loggingFormatter; private $serviceReferenceGraph; public function __construct() { $this->passConfig = new PassConfig(); $this->serviceReferenceGraph = new ServiceReferenceGraph(); } /** * Returns the PassConfig. * * @return PassConfig The PassConfig instance */ public function getPassConfig() { return $this->passConfig; } /** * Returns the ServiceReferenceGraph. * * @return ServiceReferenceGraph The ServiceReferenceGraph instance */ public function getServiceReferenceGraph() { return $this->serviceReferenceGraph; } /** * Returns the logging formatter which can be used by compilation passes. * * @return LoggingFormatter * * @deprecated since version 3.3, to be removed in 4.0. Use the ContainerBuilder::log() method instead. */ public function getLoggingFormatter() { if (null === $this->loggingFormatter) { @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED); $this->loggingFormatter = new LoggingFormatter(); } return $this->loggingFormatter; } /** * Adds a pass to the PassConfig. * * @param CompilerPassInterface $pass A compiler pass * @param string $type The type of the pass * @param int $priority Used to sort the passes */ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/) { if (\func_num_args() >= 3) { $priority = func_get_arg(2); } else { if (__CLASS__ !== \get_class($this)) { $r = new \ReflectionMethod($this, __FUNCTION__); if (__CLASS__ !== $r->getDeclaringClass()->getName()) { @trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED); } } $priority = 0; } $this->passConfig->addPass($pass, $type, $priority); } /** * Adds a log message. * * @param string $string The log message * * @deprecated since version 3.3, to be removed in 4.0. Use the ContainerBuilder::log() method instead. */ public function addLogMessage($string) { @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED); $this->log[] = $string; } /** * @final */ public function log(CompilerPassInterface $pass, $message) { if (false !== strpos($message, ""\n"")) { $message = str_replace(""\n"", ""\n"".\get_class($pass).': ', trim($message)); } $this->log[] = \get_class($pass).': '.$message; } /** * Returns the log. * * @return array Log array */ public function getLog() { return $this->log; } /** * Run the Compiler and process all Passes. */ public function compile(ContainerBuilder $container) { try { foreach ($this->passConfig->getPasses() as $pass) { $pass->process($container); } } catch (\Exception $e) { $usedEnvs = []; $prev = $e; do { $msg = $prev->getMessage(); if ($msg !== $resolvedMsg = $container->resolveEnvPlaceholders($msg, null, $usedEnvs)) { $r = new \ReflectionProperty($prev, 'message'); $r->setAccessible(true); $r->setValue($prev, $resolvedMsg); } } while ($prev = $prev->getPrevious()); if ($usedEnvs) { $e = new EnvParameterException($usedEnvs, $e); } throw $e; } finally { $this->getServiceReferenceGraph()->clear(); } } } ",0 "> tag based on what is being viewed. */ global $page, $paged; wp_title( '|', true, 'right' ); // Add the blog name. bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo "" | $site_description""; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ); ?> "" /> /css/skin.css"" /> "" /> * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to such * as styles, scripts, and meta tags. */ wp_head(); ?> >
        ",0 "ble.net) * @license GNU GPLv3 * @link https://github.com/nooku/nooku-framework for the canonical source repository */ /** * Object Mixable Interface * * @author Johan Janssens * @package Koowa\Library\Object */ interface KObjectMixable { /** * Mixin an object * * When using mixin(), the calling object inherits the methods of the mixed in objects, in a LIFO order. * * @param mixed $identifier An KObjectIdentifier, identifier string or object implementing KObjectMixinInterface * @param array $config An optional associative array of configuration options * @return KObjectMixinInterface * @throws KObjectExceptionInvalidIdentifier If the identifier is not valid * @throws UnexpectedValueException If the mixin does not implement the KObjectMixinInterface */ public function mixin($identifier, $config = array()); /** * Checks if the object or one of it's mixin's inherits from a class. * * @param string|object $class The class to check * @return bool Returns TRUE if the object inherits from the class */ public function inherits($class); /** * Get a list of all the available methods * * This function returns an array of all the methods, both native and mixed in * * @return array An array */ public function getMethods(); }",0 "le 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. package com.google.gerrit.server.restapi.change; import static java.util.stream.Collectors.joining; import com.google.gerrit.extensions.common.Input; import com.google.gerrit.extensions.restapi.BinaryResult; import com.google.gerrit.extensions.restapi.IdString; import com.google.gerrit.extensions.restapi.ResourceConflictException; import com.google.gerrit.extensions.restapi.ResourceNotFoundException; import com.google.gerrit.extensions.restapi.RestModifyView; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.reviewdb.server.ReviewDbUtil; import com.google.gerrit.server.CommentsUtil; import com.google.gerrit.server.change.ChangeResource; import com.google.gerrit.server.notedb.ChangeBundle; import com.google.gerrit.server.notedb.ChangeBundleReader; import com.google.gerrit.server.notedb.ChangeNotes; import com.google.gerrit.server.notedb.NotesMigration; import com.google.gerrit.server.notedb.rebuild.ChangeRebuilder; import com.google.gerrit.server.project.NoSuchChangeException; import com.google.gwtorm.server.OrmException; import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; import java.io.IOException; import java.util.List; import org.eclipse.jgit.errors.ConfigInvalidException; @Singleton public class Rebuild implements RestModifyView { private final Provider db; private final NotesMigration migration; private final ChangeRebuilder rebuilder; private final ChangeBundleReader bundleReader; private final CommentsUtil commentsUtil; private final ChangeNotes.Factory notesFactory; @Inject Rebuild( Provider db, NotesMigration migration, ChangeRebuilder rebuilder, ChangeBundleReader bundleReader, CommentsUtil commentsUtil, ChangeNotes.Factory notesFactory) { this.db = db; this.migration = migration; this.rebuilder = rebuilder; this.bundleReader = bundleReader; this.commentsUtil = commentsUtil; this.notesFactory = notesFactory; } @Override public BinaryResult apply(ChangeResource rsrc, Input input) throws ResourceNotFoundException, IOException, OrmException, ConfigInvalidException, ResourceConflictException { if (!migration.commitChangeWrites()) { throw new ResourceNotFoundException(); } if (!migration.readChanges()) { // ChangeBundle#fromNotes currently doesn't work if reading isn't enabled, // so don't attempt a diff. rebuild(rsrc); return BinaryResult.create(""Rebuilt change successfully""); } // Not the same transaction as the rebuild, so may result in spurious diffs // in the case of races. This should be easy enough to detect by rerunning. ChangeBundle reviewDbBundle = bundleReader.fromReviewDb(ReviewDbUtil.unwrapDb(db.get()), rsrc.getId()); if (reviewDbBundle == null) { throw new ResourceConflictException(""change is missing in ReviewDb""); } rebuild(rsrc); ChangeNotes notes = notesFactory.create(db.get(), rsrc.getChange().getProject(), rsrc.getId()); ChangeBundle noteDbBundle = ChangeBundle.fromNotes(commentsUtil, notes); List diffs = reviewDbBundle.differencesFrom(noteDbBundle); if (diffs.isEmpty()) { return BinaryResult.create(""No differences between ReviewDb and NoteDb""); } return BinaryResult.create( diffs.stream().collect(joining(""\n"", ""Differences between ReviewDb and NoteDb:\n"", ""\n""))); } private void rebuild(ChangeResource rsrc) throws ResourceNotFoundException, OrmException, IOException { try { rebuilder.rebuild(db.get(), rsrc.getId()); } catch (NoSuchChangeException e) { throw new ResourceNotFoundException(IdString.fromDecoded(rsrc.getId().toString()), e); } } } ",0 "xcept 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. */ package edu.ur.ir.researcher; import edu.ur.ir.FileSystem; import edu.ur.ir.FileSystemType; import edu.ur.persistent.CommonPersistent; /** * This is a link in the researcher folder. This * creates a link between a link and a researcher * folder * * @author Sharmila Ranganathan * */ public class ResearcherLink extends CommonPersistent implements FileSystem{ /** Eclipse generated id */ private static final long serialVersionUID = 3144484183634385274L; /** Link */ private String url; /** researcher folder the link belongs to. */ private ResearcherFolder parentFolder; /** Researcher the link belongs to */ private Researcher researcher; /** represents the file system type for this researcher link */ private FileSystemType fileSystemType = FileSystemType.RESEARCHER_LINK; /** * Package protected constructor. */ ResearcherLink(){}; /** * Create a researcher link with a null researcher folder. This means this * is a root researcher link. * * @param linkVersion */ ResearcherLink(Researcher researcher, String link) { setResearcher(researcher); setUrl(link); } /** * Create a link between a folder and link. * * @param link - link to create a link with * @param parentFolder - folder the link is in. */ ResearcherLink(Researcher researcher, ResearcherFolder parentFolder, String link) { if(link == null) { throw new IllegalStateException(""link cannot be null""); } setResearcher(researcher); setUrl(link); setParentFolder(parentFolder); } /** * Returns the path for this linkVersion. * * The path is the path of the parent folder * * @return */ public String getPath() { String path = null; if(parentFolder == null) { path = PATH_SEPERATOR; } else { path = parentFolder.getFullPath(); } return path; } /** * Overridden to string method. * * @see java.lang.Object#toString() */ public String toString() { StringBuffer sb = new StringBuffer(""[ id = ""); sb.append(id); sb.append( "" path = ""); sb.append(getPath()); sb.append( "" parent Folder = ""); sb.append(parentFolder); sb.append("" name = ""); sb.append(name); sb.append("" link = ""); sb.append(url); sb.append(""]""); return sb.toString(); } /** * Get the full path of this linkVersion. If there is * no parent folder the path is just the name of * the link. * * @return the full path. */ public String getFullPath() { return getPath() + getName(); } /** * Hash code for a researcher link. * * @see java.lang.Object#hashCode() */ public int hashCode() { int value = 0; value += parentFolder == null ? 0 : parentFolder.hashCode(); value += getName() == null ? 0 : getName().hashCode(); value += researcher == null ? 0 : researcher.hashCode(); return value; } /** * Equals method for a researcher link. * * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ResearcherLink)) return false; final ResearcherLink other = (ResearcherLink) o; if( (other.getName() != null && !other.getName().equals(getName())) || (other.getName() == null && getName() != null ) ) return false; if( (other.getResearcher() != null && !other.getResearcher().equals(getResearcher())) || (other.getResearcher() == null && getResearcher() != null ) ) return false; if( (other.getFullPath() != null && !other.getFullPath().equals(getFullPath())) || (other.getFullPath() == null && getFullPath() != null ) ) return false; return true; } /** * Returns the name of the link. * * @see edu.ur.simple.type.NameAware#getName() */ public String getName() { return name; } /** * Returns the description of the link. * * @see edu.ur.simple.type.DescriptionAware#getDescription() */ public String getDescription() { return description; } /* (non-Javadoc) * @see edu.ur.ir.FileSystem#getFileSystemType() */ public FileSystemType getFileSystemType() { return fileSystemType; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public ResearcherFolder getParentFolder() { return parentFolder; } public void setParentFolder(ResearcherFolder parentFolder) { this.parentFolder = parentFolder; } public Researcher getResearcher() { return researcher; } public void setResearcher(Researcher researcher) { this.researcher = researcher; } } ",0 "
        'Groups Menu', 'container_class' => 'side-menu-container', 'menu_class' => 'side-menu' )); ?>
        Follow @twitter
        ""> 'content-img'));} ?>
        __('Pages: '), 'next_or_number' => 'number')); ?>
        ', '

        '); ?>
        ",0 "his work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.qpid.proton.engine.impl; import static java.util.Arrays.copyOfRange; import static org.apache.qpid.proton.engine.impl.TransportTestHelper.assertByteArrayContentEquals; import static org.apache.qpid.proton.engine.impl.TransportTestHelper.assertByteBufferContentEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.apache.qpid.proton.engine.TransportException; import java.nio.ByteBuffer; import org.junit.Test; public class TransportOutputAdaptorTest { private final CannedTransportOutputWriter _transportOutputWriter = new CannedTransportOutputWriter(); private final TransportOutput _transportOutput = new TransportOutputAdaptor(_transportOutputWriter, 1024); @Test public void testThatOutputBufferIsReadOnly() { assertTrue(_transportOutput.head().isReadOnly()); } @Test public void testGetOutputBuffer_containsCorrectBytes() { byte[] testBytes = ""testbytes"".getBytes(); _transportOutputWriter.setNextCannedOutput(testBytes); assertEquals(testBytes.length, _transportOutput.pending()); final ByteBuffer outputBuffer = _transportOutput.head(); assertEquals(testBytes.length, outputBuffer.remaining()); byte[] outputBytes = new byte[testBytes.length]; outputBuffer.get(outputBytes); assertByteArrayContentEquals(testBytes, outputBytes); _transportOutput.pop(outputBuffer.position()); final ByteBuffer outputBuffer2 = _transportOutput.head(); assertEquals(0, outputBuffer2.remaining()); } @Test public void testClientConsumesOutputInMultipleChunks() { byte[] testBytes = ""testbytes"".getBytes(); _transportOutputWriter.setNextCannedOutput(testBytes); // sip the first two bytes into a small byte array int chunk1Size = 2; int chunk2Size = testBytes.length - chunk1Size; { final ByteBuffer outputBuffer1 = _transportOutput.head(); byte[] byteArray1 = new byte[chunk1Size]; outputBuffer1.get(byteArray1); assertEquals(chunk2Size, outputBuffer1.remaining()); assertByteArrayContentEquals(copyOfRange(testBytes, 0, chunk1Size), byteArray1); _transportOutput.pop(outputBuffer1.position()); } { final ByteBuffer outputBuffer2 = _transportOutput.head(); int chunk2Offset = chunk1Size; assertByteBufferContentEquals(copyOfRange(testBytes, chunk2Offset, testBytes.length), outputBuffer2); } } @Test public void testClientConsumesOutputInMultipleChunksWithAdditionalTransportWriterOutput() { byte[] initialBytes = ""abcd"".getBytes(); _transportOutputWriter.setNextCannedOutput(initialBytes); // sip the first two bytes into a small byte array int chunk1Size = 2; int initialRemaining = initialBytes.length - chunk1Size; { final ByteBuffer outputBuffer1 = _transportOutput.head(); byte[] byteArray1 = new byte[chunk1Size]; outputBuffer1.get(byteArray1); assertEquals(initialRemaining, outputBuffer1.remaining()); assertByteArrayContentEquals(copyOfRange(initialBytes, 0, chunk1Size), byteArray1); _transportOutput.pop(outputBuffer1.position()); } byte[] additionalBytes = ""wxyz"".getBytes(); _transportOutputWriter.setNextCannedOutput(additionalBytes); { final ByteBuffer outputBuffer2 = _transportOutput.head(); byte[] expectedBytes = ""cdwxyz"".getBytes(); assertByteBufferContentEquals(expectedBytes, outputBuffer2); } } private static final class CannedTransportOutputWriter implements TransportOutputWriter { byte[] _cannedOutput = new byte[0]; @Override public boolean writeInto(ByteBuffer outputBuffer) { int bytesWritten = ByteBufferUtils.pourArrayToBuffer(_cannedOutput, 0, _cannedOutput.length, outputBuffer); if(bytesWritten < _cannedOutput.length) { fail(""Unable to write all "" + _cannedOutput.length + "" bytes of my canned output to the provided output buffer: "" + outputBuffer); } _cannedOutput = new byte[0]; return false; } void setNextCannedOutput(byte[] cannedOutput) { _cannedOutput = cannedOutput; } public void closed(TransportException error) { // do nothing } } } ",0 "enerated by javadoc (1.8.0_162) on Sat Feb 02 18:57:44 CET 2019 --> Uses of Class com.communote.plugins.api.rest.v24.resource.topic.property.PropertyResourceHandler (Communote 3.5 API)
        • Prev
        • Next

        Uses of Class
        com.communote.plugins.api.rest.v24.resource.topic.property.PropertyResourceHandler

        No usage of com.communote.plugins.api.rest.v24.resource.topic.property.PropertyResourceHandler
        • Prev
        • Next

        Copyright © 2019 Communote team. All rights reserved.

        ",0 "an redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * roccat-tools is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with roccat-tools. If not, see . */ #include G_BEGIN_DECLS /*! * \brief asks the user if he want's to save data and exit * * The dialog is modal. * * If cancel is \c TRUE, an additional cancel button is added * * \retval response of dialog can be one of * GTK_RESPONSE_ACCEPT - save data and exit * GTK_RESPONSE_REJECT - exit without saving * GTK_RESPONSE_CANCEL - don't save and don't exit */ gint roccat_save_dialog(GtkWindow *parent, gchar const *text, gboolean cancel); /*! * \brief asks the user if he want's to save data and exit * * The dialog is modal. * * If cancel is \c TRUE, an additional cancel button is added * * \retval response of dialog can be one of * GTK_RESPONSE_ACCEPT - save data and exit * GTK_RESPONSE_REJECT - exit without saving * GTK_RESPONSE_CANCEL - don't save and don't exit */ gint roccat_save_unsaved_dialog(GtkWindow *parent, gboolean cancel); G_END_DECLS #endif ",0 " Anssi Gröhn / entity at iki dot fi. * * This file is part of Moose3D. * * Moose3D is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Moose3D is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Moose3D. If not, see . ******************************************************************************/ ///////////////////////////////////////////////////////////////// #ifdef WIN32 #include ""MooseWindowsWrapper.h"" #endif ///////////////////////////////////////////////////////////////// #include ""MooseAPI.h"" #if defined(MOOSE_APPLE_IPHONE) #include #endif //#include ""MooseGuiSystem.h"" #include ""MooseAVLTree.h"" #include ""MooseCore.h"" #include ""MooseAssetBundle.h"" #include ""MooseGlobals.h"" #include ""MooseIndexArray.h"" #include ""MooseMath.h"" #include ""MooseMathUtils.h"" #include ""MooseMatrix2x2.h"" #include ""MooseMatrix3x3.h"" #include ""MooseMatrix4x4.h"" #include ""MooseOGLConsts.h"" #include ""MooseOGLRenderer.h"" #include ""MooseObjectCounter.h"" #include ""MooseQuaternion.h"" #if !defined(MOOSE_APPLE_IPHONE) #include ""MooseSDLScreen.h"" #endif #include ""MooseOrientable.h"" #include ""MooseDimensional1D.h"" #include ""MooseDimensional2D.h"" #include ""MooseDimensional3D.h"" #include ""MooseOneDirectional.h"" #include ""MoosePositional.h"" #include ""MooseTriangle.h"" #include ""MooseVertex.h"" #include ""MooseTGAImage.h"" #include ""MooseVector2.h"" #include ""MooseVector3.h"" #include ""MooseVector4.h"" #include ""MooseVertexDescriptor.h"" #include ""MooseDefaultEntities.h"" #include ""MooseCollision.h"" #include #include #include #include #include ""MooseMilkshapeLoader.h"" #include ""MooseAmbientLight.h"" #include ""MooseDirectionalLight.h"" #include ""MoosePointLight.h"" #include ""MooseSpotLight.h"" #include ""MooseGraphNode.h"" #include ""MooseGraphEdge.h"" #include ""MooseGraph.h"" #include ""MooseOctree.h"" #include ""MooseSpatialGraph.h"" #include ""MooseSkybox.h"" #include ""MooseRenderQueue.h"" #include ""MooseGameObject.h"" #include #include ""MooseRenderableModel.h"" #include ""MooseRenderableModelShared.h"" #include ""MooseClearBuffers.h"" #include ""MooseBoxRenderable.h"" #include ""MooseSphereRenderable.h"" #include ""MooseLineRenderable.h"" #include ""MooseCapsuleRenderable.h"" #include ""MooseTransform.h"" #include ""MooseTransformGraph.h"" #include ""MooseSpatialGraph.h"" #include ""MooseScene.h"" #include ""MooseParticleSystem.h"" #include ""MooseParticleSystemRenderable.h"" #include ""MooseUpdateable.h"" #if !defined(MOOSE_APPLE_IPHONE) #include ""MooseStateMachine.h"" #endif #include ""MooseModelHelper.h"" #include ""MooseDDSImage.h"" /* These aren't implemented yet.*/ #ifndef __APPLE__ #include ""MooseFFMpeg.h"" #include ""MooseRenderableVideo.h"" #endif #include ""MooseMessageSystem.h"" #include ""MooseAIScript.h"" #include ""MooseCollisionEvent.h"" #include ""MooseModelLoader.h"" #include ""MooseObjLoader.h"" #include #include #include #include #include #include #include #include #include #include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(MOOSE_APPLE_IPHONE) #include #include #include #endif ///////////////////////////////////////////////////////////////// ",0 "forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of ircPlanet nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ if (!($chan = $this->getChannel($chan_name))) { $bot->noticef($user, ""Nobody is on channel %s."", $chan_name); return false; } if (!$chan->isOn($bot->getNumeric())) { $bot->noticef($user, 'I am not on %s.', $chan->getName()); return false; } $reason = assemble($pargs, 2); $users = $this->getChannelUsersByMask($chan_name); foreach ($users as $numeric => $chan_user) { if (!$chan_user->isBot() && $chan_user != $user) { $mask = $chan_user->getHostMask(); $ban = new DB_Ban($chan_reg->getId(), $user->getAccountId(), $mask); $ban->setReason($reason); $chan_reg->addBan($ban); $bot->mode($chan->getName(), ""-o+b $numeric $mask""); $bot->kick($chan->getName(), $numeric, $reason); $chan->addBan($mask); } } $chan_reg->save(); ",0 "al long serialVersionUID = 2715416587055228708L; private Long userAgentOid; private Long systemPositionOid; private String userId; // 被代理人 private String agentUserId; // 指定的代理人 private Date effectiveDate; // 有效开始期 private Date expiredDt; private String isActive; public Long getSystemPositionOid() { return systemPositionOid; } public void setSystemPositionOid(Long systemPositionOid) { this.systemPositionOid = systemPositionOid; } public Long getUserAgentOid() { return userAgentOid; } public void setUserAgentOid(Long userAgentOid) { this.userAgentOid = userAgentOid; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getAgentUserId() { return agentUserId; } public void setAgentUserId(String agentUserId) { this.agentUserId = agentUserId; } public Date getExpiredDt() { return expiredDt; } public void setExpiredDt(Date expiredDt) { this.expiredDt = expiredDt; } public String getIsActive() { return isActive; } public void setIsActive(String isActive) { this.isActive = isActive; } public Date getEffectiveDate() { return effectiveDate; } public void setEffectiveDate(Date effectiveDate) { this.effectiveDate = effectiveDate; } } ",0 " collection of posts related to Ruby on Rails and Ruby. When I changed from my previous IBM platform to the web paradigm and open source, I originally started with PHP but soon moved to rails. No way was I gonna work with the wordpress loop the rest of my life. I knew even at that time that some big users of rails were actually moving to other solutions due to ""scaling"" concerns.

        When I first started to hear about companies moving away from rails it scared me. I took some time off from rails and I focused on javascript for awhile, even python. But I have come back to rails.

        I reasoned that really, how many companies really are going to get THAT big where performance would be a concern? Even Basecamp the company where DHH works still uses rails and quite a few others. And now with the releases of the new Turbolinks 5(see my post) and stimulus, rails is catching up in the javascript department.

        To me...rails gives you SO MUCH...it gives you standards in terms of your site layout, a great community for getting answers to questions/issues, and it incorporates important concepts like REST and engines and templates and databases and javascript integration...all on top of one of the best languages in terms of syntax in the world...ruby. Not to mention the speed with which you can add functionality with Gems..

        My only complaint really from a personal perspective is the ""magic"" of how functionality is implemented...you just feel better when you can see the lower level code....but in fact, almost all modern languages at some level abstract those details away from the coding in the name of development speed...so with rails its just a matter of degree.

        {% for tag in site.tags %} {% assign t = tag | first %} {% assign posts = tag | last %}
          {% for post in posts %} {% if post.tags contains 'rails' %} Posts by Tag : {{ t | downcase }}
        • {{ post.title }} {{ post.date | date: ""%B %-d, %Y"" }}
        • {% endif %} {% endfor %}
        {% endfor %} ",0 "mport com.jme3.bullet.collision.shapes.BoxCollisionShape; import com.jme3.bullet.collision.shapes.CollisionShape; import com.jme3.export.*; import com.jme3.math.Matrix3f; import com.jme3.math.Vector3f; import java.io.IOException; /** * * @author normenhansen */ public class ChildCollisionShape implements Savable { public Vector3f location; public Matrix3f rotation; public CollisionShape shape; public ChildCollisionShape() { } public ChildCollisionShape(Vector3f location, Matrix3f rotation, CollisionShape shape) { this.location = location; this.rotation = rotation; this.shape = shape; } public void write(JmeExporter ex) throws IOException { OutputCapsule capsule = ex.getCapsule(this); capsule.write(location, ""location"", new Vector3f()); capsule.write(rotation, ""rotation"", new Matrix3f()); capsule.write(shape, ""shape"", new BoxCollisionShape(new Vector3f(1, 1, 1))); } public void read(JmeImporter im) throws IOException { InputCapsule capsule = im.getCapsule(this); location = (Vector3f) capsule.readSavable(""location"", new Vector3f()); rotation = (Matrix3f) capsule.readSavable(""rotation"", new Matrix3f()); shape = (CollisionShape) capsule.readSavable(""shape"", new BoxCollisionShape(new Vector3f(1, 1, 1))); } } ",0 " import railo.runtime.ext.function.Function; import railo.runtime.tag.util.DeprecatedUtil; import railo.runtime.type.dt.DateTime; import railo.runtime.type.dt.DateTimeImpl; /** * Implements the CFML Function now * @deprecated removed with no replacement */ public final class NowServer implements Function { /** * @param pc * @return server time * @throws ExpressionException */ public static DateTime call(PageContext pc ) throws ExpressionException { DeprecatedUtil.function(pc,""nowServer""); long now = System.currentTimeMillis(); int railo = pc.getTimeZone().getOffset(now); int server = TimeZone.getDefault().getOffset(now); return new DateTimeImpl(pc,now-(railo-server),false); } }",0 "erification link has expired

        You will need to sign back into your account and request another verification email.

        If you need help, please contact us.

        {% endblock main %}",0 " special exemption to clause 2 (b) * so that the bulk of its code can remain under the MIT license. * This exemption does not extend to derived works not owned by * the Transmission project. * * $Id$ */ #ifndef GTR_UTIL_H #define GTR_UTIL_H #include #include #include #include extern const int mem_K; extern const char * mem_K_str; extern const char * mem_M_str; extern const char * mem_G_str; extern const char * mem_T_str; extern const int disk_K; extern const char * disk_K_str; extern const char * disk_M_str; extern const char * disk_G_str; extern const char * disk_T_str; extern const int speed_K; extern const char * speed_K_str; extern const char * speed_M_str; extern const char * speed_G_str; extern const char * speed_T_str; /* macro to shut up ""unused parameter"" warnings */ #ifndef UNUSED #define UNUSED G_GNUC_UNUSED #endif enum { GTR_UNICODE_UP, GTR_UNICODE_DOWN, GTR_UNICODE_INF, GTR_UNICODE_BULLET }; const char * gtr_get_unicode_string (int); /* return a percent formatted string of either x.xx, xx.x or xxx */ char* tr_strlpercent (char * buf, double x, size_t buflen); /* return a human-readable string for the size given in bytes. */ char* tr_strlsize (char * buf, guint64 size, size_t buflen); /* return a human-readable string for the given ratio. */ char* tr_strlratio (char * buf, double ratio, size_t buflen); /* return a human-readable string for the time given in seconds. */ char* tr_strltime (char * buf, int secs, size_t buflen); /*** **** ***/ /* http://www.legaltorrents.com/some/announce/url --> legaltorrents.com */ void gtr_get_host_from_url (char * buf, size_t buflen, const char * url); gboolean gtr_is_magnet_link (const char * str); gboolean gtr_is_hex_hashcode (const char * str); /*** **** ***/ void gtr_open_uri (const char * uri); void gtr_open_file (const char * path); const char* gtr_get_help_uri (void); /*** **** ***/ /* backwards-compatible wrapper around gtk_widget_set_visible () */ void gtr_widget_set_visible (GtkWidget *, gboolean); void gtr_dialog_set_content (GtkDialog * dialog, GtkWidget * content); /*** **** ***/ GtkWidget * gtr_priority_combo_new (void); #define gtr_priority_combo_get_value(w) gtr_combo_box_get_active_enum (w) #define gtr_priority_combo_set_value(w,val) gtr_combo_box_set_active_enum (w,val) GtkWidget * gtr_combo_box_new_enum (const char * text_1, ...); int gtr_combo_box_get_active_enum (GtkComboBox *); void gtr_combo_box_set_active_enum (GtkComboBox *, int value); /*** **** ***/ void gtr_unrecognized_url_dialog (GtkWidget * parent, const char * url); void gtr_http_failure_dialog (GtkWidget * parent, const char * url, long response_code); void gtr_add_torrent_error_dialog (GtkWidget * window_or_child, int err, const char * filename); /* pop up the context menu if a user right-clicks. if the row they right-click on isn't selected, select it. */ gboolean on_tree_view_button_pressed (GtkWidget * view, GdkEventButton * event, gpointer unused); /* if the click didn't specify a row, clear the selection */ gboolean on_tree_view_button_released (GtkWidget * view, GdkEventButton * event, gpointer unused); /* move a file to the trashcan if GIO is available; otherwise, delete it */ int gtr_file_trash_or_remove (const char * filename); void gtr_paste_clipboard_url_into_entry (GtkWidget * entry); /* Only call gtk_label_set_text () if the new text differs from the old. * This prevents the label from having to recalculate its size * and prevents selected text in the label from being deselected */ void gtr_label_set_text (GtkLabel * lb, const char * text); #endif /* GTR_UTIL_H */ ",0 "ce and binary forms, with or without * modification, are permitted provided that the following * conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of the The National Archives nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2010.03.22 at 11:40:59 AM GMT // package uk.gov.nationalarchives.droid.report.planets.domain; import java.math.BigDecimal; import java.math.BigInteger; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** *

        Java class for YearItemType complex type. * *

        The following schema fragment specifies the expected content contained within this class. * *

         * <complexType name=""YearItemType"">
         *   <complexContent>
         *     <restriction base=""{http://www.w3.org/2001/XMLSchema}anyType"">
         *       <sequence>
         *         <element name=""year"" type=""{http://www.w3.org/2001/XMLSchema}gYear""/>
         *         <element name=""numFiles"" type=""{http://www.w3.org/2001/XMLSchema}integer""/>
         *         <element name=""totalFileSize"" type=""{http://www.w3.org/2001/XMLSchema}decimal""/>
         *       </sequence>
         *     </restriction>
         *   </complexContent>
         * </complexType>
         * 
        * * @deprecated PLANETS XML is now generated using XSLT over normal report xml files. */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = ""YearItemType"", propOrder = { ""year"", ""numFiles"", ""totalFileSize"" }) @Deprecated public class YearItemType { @XmlElement(required = true) @XmlSchemaType(name = ""gYear"") protected XMLGregorianCalendar year; @XmlElement(required = true) protected BigInteger numFiles; @XmlElement(required = true) protected BigDecimal totalFileSize; /** * Gets the value of the year property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getYear() { return year; } /** * Sets the value of the year property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setYear(XMLGregorianCalendar value) { this.year = value; } /** * Gets the value of the numFiles property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getNumFiles() { return numFiles; } /** * Sets the value of the numFiles property. * * @param value * allowed object is * {@link BigInteger } * */ public void setNumFiles(BigInteger value) { this.numFiles = value; } /** * Gets the value of the totalFileSize property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getTotalFileSize() { return totalFileSize; } /** * Sets the value of the totalFileSize property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setTotalFileSize(BigDecimal value) { this.totalFileSize = value; } } ",0 "P3\Modules\ACP3\Newsletter\Controller\Frontend\Index; use ACP3\Core; use ACP3\Modules\ACP3\Newsletter; class Activate extends Core\Controller\AbstractFrontendAction { /** * @var \ACP3\Modules\ACP3\Newsletter\Helper\AccountStatus */ protected $accountStatusHelper; /** * @var \ACP3\Modules\ACP3\Newsletter\Validation\ActivateAccountFormValidation */ protected $activateAccountFormValidation; /** * @var \ACP3\Core\Helpers\Alerts */ private $alertsHelper; /** * Activate constructor. * * @param \ACP3\Core\Controller\Context\FrontendContext $context * @param \ACP3\Core\Helpers\Alerts $alertsHelper * @param \ACP3\Modules\ACP3\Newsletter\Helper\AccountStatus $accountStatusHelper * @param \ACP3\Modules\ACP3\Newsletter\Validation\ActivateAccountFormValidation $activateAccountFormValidation */ public function __construct( Core\Controller\Context\FrontendContext $context, Core\Helpers\Alerts $alertsHelper, Newsletter\Helper\AccountStatus $accountStatusHelper, Newsletter\Validation\ActivateAccountFormValidation $activateAccountFormValidation ) { parent::__construct($context); $this->accountStatusHelper = $accountStatusHelper; $this->activateAccountFormValidation = $activateAccountFormValidation; $this->alertsHelper = $alertsHelper; } /** * @param string $hash */ public function execute($hash) { try { $this->activateAccountFormValidation->validate(['hash' => $hash]); $bool = $this->accountStatusHelper->changeAccountStatus( Newsletter\Helper\AccountStatus::ACCOUNT_STATUS_CONFIRMED, ['hash' => $hash] ); $this->setTemplate($this->alertsHelper->confirmBox($this->translator->t( 'newsletter', $bool !== false ? 'activate_success' : 'activate_error' ), $this->appPath->getWebRoot())); } catch (Core\Validation\Exceptions\ValidationFailedException $e) { $this->setContent($this->alertsHelper->errorBox($e->getMessage())); } } } ",0 "zontal"" role=""form""> <% // 列表头部 %>
        相册名称 ${model.album_name} 图片名称 ${model.name}
        图片 <% if(!strutil.isEmpty(model.image_url)||!strutil.isEmpty(model.image_net_url)){ %> <% } %> ${flyfox.getImage(model)}
        链接地址
        CDN地址
        扩展名 ${model.ext} 宽X高 ${model.width}X${model.height}
        排序 ${model.sort} 状态 <% if(model.status==2) { %> 隐藏 <% } %> <% if(model.status==1) { %> 显示 <% } %>
        是否评论 <% if(model.is_comment==2) { %> 否 <% } %> <% if(model.is_comment==1) { %> 是 <% } %> 是否推荐:2 否 1 是 ${model.is_recommend}
        发布时间 ${model.publish_time} 发布者 ${model.publish_user}
        备注 <% if (strutil.length(model.remark) > 25) { %> ${strutil.subStringTo(model.remark, 0, 25)}... <% } else { %> ${model.remark} <% } %>
        标签 <% if (strutil.length(tags!) > 25) { %> ${strutil.subStringTo(tags!, 0, 25)}... <% } else { %> ${tags!} <% } %>
         
        <%}; %> <% layout(""/pages/template/_layout.html"",{head:headContent,body:bodyContent}){ %> <%} %>",0 "enerated by javadoc (version 1.7.0_55) on Thu Apr 24 20:55:48 UTC 2014 --> Uses of Class org.apache.solr.core.SolrXMLSerializer.SolrXMLDef (Solr 4.8.0 API)
        • Prev
        • Next

        Uses of Class
        org.apache.solr.core.SolrXMLSerializer.SolrXMLDef

        No usage of org.apache.solr.core.SolrXMLSerializer.SolrXMLDef
        • Prev
        • Next

        Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.

        ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.activemq.transport.amqp.client.transport; import java.io.IOException; import java.net.URI; import java.nio.charset.StandardCharsets; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ChannelPipeline; import io.netty.handler.codec.http.DefaultHttpHeaders; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpClientCodec; import io.netty.handler.codec.http.HttpObjectAggregator; import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; import io.netty.handler.codec.http.websocketx.PingWebSocketFrame; import io.netty.handler.codec.http.websocketx.PongWebSocketFrame; import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; import io.netty.handler.codec.http.websocketx.WebSocketFrame; import io.netty.handler.codec.http.websocketx.WebSocketVersion; /** * Transport for communicating over WebSockets */ public class NettyWSTransport extends NettyTcpTransport { private static final Logger LOG = LoggerFactory.getLogger(NettyWSTransport.class); private static final String AMQP_SUB_PROTOCOL = ""amqp""; /** * Create a new transport instance * * @param remoteLocation * the URI that defines the remote resource to connect to. * @param options * the transport options used to configure the socket connection. */ public NettyWSTransport(URI remoteLocation, NettyTransportOptions options) { this(null, remoteLocation, options); } /** * Create a new transport instance * * @param listener * the TransportListener that will receive events from this Transport. * @param remoteLocation * the URI that defines the remote resource to connect to. * @param options * the transport options used to configure the socket connection. */ public NettyWSTransport(NettyTransportListener listener, URI remoteLocation, NettyTransportOptions options) { super(listener, remoteLocation, options); } @Override public void send(ByteBuf output) throws IOException { checkConnected(); int length = output.readableBytes(); if (length == 0) { return; } LOG.trace(""Attempted write of: {} bytes"", length); channel.writeAndFlush(new BinaryWebSocketFrame(output)); } @Override protected ChannelInboundHandlerAdapter createChannelHandler() { return new NettyWebSocketTransportHandler(); } @Override protected void addAdditionalHandlers(ChannelPipeline pipeline) { pipeline.addLast(new HttpClientCodec()); pipeline.addLast(new HttpObjectAggregator(8192)); } @Override protected void handleConnected(Channel channel) throws Exception { LOG.trace(""Channel has become active, awaiting WebSocket handshake! Channel is {}"", channel); } // ----- Handle connection events -----------------------------------------// private class NettyWebSocketTransportHandler extends NettyDefaultHandler { private final WebSocketClientHandshaker handshaker; NettyWebSocketTransportHandler() { handshaker = WebSocketClientHandshakerFactory.newHandshaker( getRemoteLocation(), WebSocketVersion.V13, AMQP_SUB_PROTOCOL, true, new DefaultHttpHeaders(), getMaxFrameSize()); } @Override public void channelActive(ChannelHandlerContext context) throws Exception { handshaker.handshake(context.channel()); super.channelActive(context); } @Override protected void channelRead0(ChannelHandlerContext ctx, Object message) throws Exception { LOG.trace(""New data read: incoming: {}"", message); Channel ch = ctx.channel(); if (!handshaker.isHandshakeComplete()) { handshaker.finishHandshake(ch, (FullHttpResponse) message); LOG.trace(""WebSocket Client connected! {}"", ctx.channel()); // Now trigger super processing as we are really connected. NettyWSTransport.super.handleConnected(ch); return; } // We shouldn't get this since we handle the handshake previously. if (message instanceof FullHttpResponse) { FullHttpResponse response = (FullHttpResponse) message; throw new IllegalStateException( ""Unexpected FullHttpResponse (getStatus="" + response.status() + "", content="" + response.content().toString(StandardCharsets.UTF_8) + ')'); } WebSocketFrame frame = (WebSocketFrame) message; if (frame instanceof TextWebSocketFrame) { TextWebSocketFrame textFrame = (TextWebSocketFrame) frame; LOG.warn(""WebSocket Client received message: "" + textFrame.text()); ctx.fireExceptionCaught(new IOException(""Received invalid frame over WebSocket."")); } else if (frame instanceof BinaryWebSocketFrame) { BinaryWebSocketFrame binaryFrame = (BinaryWebSocketFrame) frame; LOG.trace(""WebSocket Client received data: {} bytes"", binaryFrame.content().readableBytes()); listener.onData(binaryFrame.content()); } else if (frame instanceof PingWebSocketFrame) { LOG.trace(""WebSocket Client received ping, response with pong""); ch.write(new PongWebSocketFrame(frame.content())); } else if (frame instanceof CloseWebSocketFrame) { LOG.trace(""WebSocket Client received closing""); ch.close(); } } } } ",0 "e permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SharedWorkerRepositoryClientImpl_h #define SharedWorkerRepositoryClientImpl_h #include ""core/workers/SharedWorkerRepositoryClient.h"" #include ""wtf/Noncopyable.h"" #include ""wtf/PassOwnPtr.h"" #include ""wtf/PassRefPtr.h"" namespace blink { class WebSharedWorkerRepositoryClient; class SharedWorkerRepositoryClientImpl final : public SharedWorkerRepositoryClient { WTF_MAKE_NONCOPYABLE(SharedWorkerRepositoryClientImpl); public: static PassOwnPtr create(WebSharedWorkerRepositoryClient* client) { return adoptPtr(new SharedWorkerRepositoryClientImpl(client)); } ~SharedWorkerRepositoryClientImpl() override { } void connect(PassRefPtrWillBeRawPtr, PassOwnPtr, const KURL&, const String& name, ExceptionState&) override; void documentDetached(Document*) override; private: explicit SharedWorkerRepositoryClientImpl(WebSharedWorkerRepositoryClient*); WebSharedWorkerRepositoryClient* m_client; }; } // namespace blink #endif // SharedWorkerRepositoryClientImpl_h ",0 "This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Actuate Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.birt.report.designer.data.ui.dataset; import org.eclipse.birt.core.exception.BirtException; import org.eclipse.birt.report.engine.api.EngineConfig; import org.eclipse.birt.report.engine.api.IReportEngine; import org.eclipse.birt.report.engine.api.impl.ReportEngineFactory; public class ReportEngineCreator { /** * create an engine instance * @param config * @return * @throws BirtException */ public static IReportEngine createReportEngine( EngineConfig config ) throws BirtException { return new ReportEngineFactory( ).createReportEngine( config ); } } ",0 "n 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. */ package com.intellij.codeInsight.navigation; import com.intellij.codeInsight.CodeInsightBundle; import com.intellij.codeInsight.daemon.impl.PsiElementListNavigator; import com.intellij.codeInsight.generation.actions.PresentableCodeInsightActionHandler; import com.intellij.codeInsight.navigation.actions.GotoSuperAction; import com.intellij.featureStatistics.FeatureUsageTracker; import com.intellij.ide.util.MethodCellRenderer; import com.intellij.ide.util.PsiNavigationSupport; import com.intellij.idea.ActionsBundle; import com.intellij.openapi.actionSystem.Presentation; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.pom.Navigatable; import com.intellij.psi.*; import com.intellij.psi.impl.FindSuperElementsHelper; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.util.PsiUtil; import com.intellij.util.ArrayUtil; import org.jetbrains.annotations.NotNull; public class JavaGotoSuperHandler implements PresentableCodeInsightActionHandler { @Override public void invoke(@NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile file) { FeatureUsageTracker.getInstance().triggerFeatureUsed(GotoSuperAction.FEATURE_ID); int offset = editor.getCaretModel().getOffset(); PsiElement[] superElements = findSuperElements(file, offset); if (superElements.length == 0) return; if (superElements.length == 1) { PsiElement superElement = superElements[0].getNavigationElement(); final PsiFile containingFile = superElement.getContainingFile(); if (containingFile == null) return; final VirtualFile virtualFile = containingFile.getVirtualFile(); if (virtualFile == null) return; Navigatable descriptor = PsiNavigationSupport.getInstance().createNavigatable(project, virtualFile, superElement.getTextOffset()); descriptor.navigate(true); } else if (superElements[0] instanceof PsiMethod) { boolean showMethodNames = !PsiUtil.allMethodsHaveSameSignature((PsiMethod[])superElements); PsiElementListNavigator.openTargets(editor, (PsiMethod[])superElements, CodeInsightBundle.message(""goto.super.method.chooser.title""), CodeInsightBundle .message(""goto.super.method.findUsages.title"", ((PsiMethod)superElements[0]).getName()), new MethodCellRenderer(showMethodNames)); } else { NavigationUtil.getPsiElementPopup(superElements, CodeInsightBundle.message(""goto.super.class.chooser.title"")) .showInBestPositionFor(editor); } } @NotNull private PsiElement[] findSuperElements(@NotNull PsiFile file, int offset) { PsiElement element = getElement(file, offset); if (element == null) return PsiElement.EMPTY_ARRAY; final PsiElement psiElement = PsiTreeUtil.getParentOfType(element, PsiFunctionalExpression.class, PsiMember.class); if (psiElement instanceof PsiFunctionalExpression) { final PsiMethod interfaceMethod = LambdaUtil.getFunctionalInterfaceMethod(psiElement); if (interfaceMethod != null) { return ArrayUtil.prepend(interfaceMethod, interfaceMethod.findSuperMethods(false)); } } final PsiNameIdentifierOwner parent = PsiTreeUtil.getNonStrictParentOfType(element, PsiMethod.class, PsiClass.class); if (parent == null) { return PsiElement.EMPTY_ARRAY; } return FindSuperElementsHelper.findSuperElements(parent); } protected PsiElement getElement(@NotNull PsiFile file, int offset) { return file.findElementAt(offset); } @Override public boolean startInWriteAction() { return false; } @Override public void update(@NotNull Editor editor, @NotNull PsiFile file, Presentation presentation) { final PsiElement element = getElement(file, editor.getCaretModel().getOffset()); final PsiElement containingElement = PsiTreeUtil.getParentOfType(element, PsiFunctionalExpression.class, PsiMember.class); if (containingElement instanceof PsiClass) { presentation.setText(ActionsBundle.actionText(""GotoSuperClass"")); presentation.setDescription(ActionsBundle.actionDescription(""GotoSuperClass"")); } else { presentation.setText(ActionsBundle.actionText(""GotoSuperMethod"")); presentation.setDescription(ActionsBundle.actionDescription(""GotoSuperMethod"")); } } } ",0 " import android.view.ViewGroup; import android.widget.ImageView; import android.widget.Switch; import android.widget.TextView; import java.util.List; public class DataAdapter extends RecyclerView.Adapter { private List moviesList; public class MyViewHolder extends RecyclerView.ViewHolder { public TextView title, year, genre; public ImageView ivIcon; public Switch aSwitch; public MyViewHolder(View view) { super(view); title = (TextView) view.findViewById(R.id.title); genre = (TextView) view.findViewById(R.id.genre); year = (TextView) view.findViewById(R.id.year); ivIcon = (ImageView) view.findViewById(R.id.ivIcon); aSwitch = (Switch) view.findViewById(R.id.switch1); } } public DataAdapter(List moviesList) { this.moviesList = moviesList; } @Override public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.from(parent.getContext()) .inflate(R.layout.my_row, parent, false); return new MyViewHolder(itemView); } @Override public void onBindViewHolder(MyViewHolder holder, int position) { Data data = moviesList.get(position); holder.title.setText(data.getTitle()); holder.genre.setText(data.getGenre()); holder.year.setText(data.getYear()); holder.ivIcon.setImageBitmap(data.getIvIcon()); holder.aSwitch.setChecked(data.gettoggle()); } @Override public int getItemCount() { return moviesList.size(); } }",0 "enerated by javadoc (version 1.7.0_71) on Sun Jan 11 17:03:54 EET 2015 --> com.github.tilastokeskus.matertis.core.command (Matertis 1.0-SNAPSHOT Test API)

        com.github.tilastokeskus.matertis.core.command

        ",0 "orm yii\widgets\ActiveForm */ ?>
        ['index'], 'method' => 'get', ]); ?> field($model, 'id_imj') ?> field($model, 'id_akun') ?> field($model, 'nomor_imj') ?> field($model, 'tglDikeluarkan_imj') ?> field($model, 'tglPengajuan_imj') ?> field($model, 'kepada_imj') ?> field($model, 'alamat_imj') ?> field($model, 'namaAcara_imj') ?> field($model, 'jalanDitutup_imj') ?> field($model, 'penutupanJalanMaksimal_imj') ?> field($model, 'tglAcara_imj') ?> field($model, 'JamAcara_imj') ?> field($model, 'tglAcaraSelesai_imj') ?> field($model, 'jamAcaraSelesai_imj') ?> field($model, 'tembusan_imj') ?> field($model, 'keterangan_imj') ?>
        'btn btn-primary']) ?> 'btn btn-default']) ?>
        ",0 "le>mathcomp-multinomials: Not compatible 👼
        « Up

        mathcomp-multinomials 1.1 Not compatible 👼

        📅 (2021-11-25 05:11:20 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-num            base        Num library distributed with the OCaml compiler
        base-threads        base
        base-unix           base
        conf-findutils      1           Virtual package relying on findutils
        conf-gmp            3           Virtual package relying on a GMP lib system installation
        coq                 8.13.2      Formal proof management system
        num                 0           The Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.05.0      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.05.0      Official 4.05.0 release
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.9.1       A library manager for OCaml
        zarith              1.12        Implements arithmetic and logical operations over arbitrary-precision integers
        # opam file:
        opam-version: "2.0"
        maintainer: "pierre-yves@strub.nu"
        homepage: "https://github.com/math-comp/multinomials-ssr"
        bug-reports: "https://github.com/math-comp/multinomials-ssr/issues"
        dev-repo: "git+https://github.com/math-comp/multinomials.git"
        license: "CeCILL-B"
        authors: ["Pierre-Yves Strub"]
        build: [
          [make "INSTMODE=global" "config"]
          [make "-j%{jobs}%"]
        ]
        install: [
          [make "install"]
        ]
        remove: ["rm" "-R" "%{lib}%/coq/user-contrib/SsrMultinomials"]
        depends: [
          "ocaml"
          "coq" {>= "8.5"}
          "coq-mathcomp-ssreflect" {>= "1.6" & < "1.8.0~"}
          "coq-mathcomp-algebra" {>= "1.6" & < "1.8.0~"}
          "coq-mathcomp-bigenough" {>= "1.0.0" & < "1.1.0~"}
          "coq-mathcomp-finmap" {>= "1.0.0" & < "1.1.0~"}
        ]
        tags: [
          "keyword:multinomials"
          "keyword:monoid algebra"
          "category:Math/Algebra/Multinomials"
          "category:Math/Algebra/Monoid algebra"
          "date:2016"
          "logpath:SsrMultinomials"
        ]
        synopsis: "A multivariate polynomial library for the Mathematical Components Library"
        flags: light-uninstall
        url {
          src: "https://github.com/math-comp/multinomials/archive/1.1.tar.gz"
          checksum: "md5=e22b275b1687878d2bdc9b6922d9fde5"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-mathcomp-multinomials.1.1 coq.8.13.2
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.13.2).
        The following dependencies couldn't be met:
          - coq-mathcomp-multinomials -> coq-mathcomp-finmap < 1.1.0~ -> coq-mathcomp-ssreflect < 1.8~ -> coq < 8.10~ -> ocaml < 4.03.0
              base of this switch (use `--unlock-base' to force)
        Your request can't be satisfied:
          - No available version of coq satisfies the constraints
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-multinomials.1.1
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "tries = waRequest::post('selected_countries', array(), waRequest::TYPE_ARRAY); $all_countries = waRequest::post('all_countries', 1, waRequest::TYPE_INT); $countries = ''; $allowed_countries = boxberryShippingCountriesAdapter::getAllowedCountries(); if ($all_countries == false && !empty($selected_countries)) { foreach ($selected_countries as $country_code) { if (!isset($allowed_countries[$country_code])) { unset($selected_countries[$country_code]); } } } if ($all_countries || empty($selected_countries) || count($selected_countries) == count($allowed_countries)) { $bxb = waShipping::factory('boxberry'); $this->response['list_saved_countries'] = $bxb->_w('All countries'); } else { $countries = $selected_countries; $saved_countries = boxberryShippingCountriesAdapter::getCountries($selected_countries); $list_saved_countries = array(); foreach ($saved_countries as $country) { $list_saved_countries[] = $country['name']; $this->response['country_codes'][] = $country['iso3letter']; } $this->response['list_saved_countries'] = implode(', ', $list_saved_countries); } $this->response['countries'] = !empty($countries) ? json_encode($countries) : ''; } }",0 "a name=""generator"" content=""rustdoc""> x11::xinput2::Struct_Unnamed7 - Rust

        x11::xinput2

        Struct x11::xinput2::Struct_Unnamed7 [] [src]

        pub struct Struct_Unnamed7 {
            pub mask_len: c_int,
            pub mask: *mut c_uchar,
        }

        Fields

        mask_len
        mask

        Trait Implementations

        impl Clone for Struct_Unnamed7

        fn clone(&self) -> Self

        fn clone_from(&mut self, source: &Self)

        impl Default for Struct_Unnamed7

        fn default() -> Self

        Derived Implementations

        impl Copy for Struct_Unnamed7

        Keyboard Shortcuts

        ?
        Show this help dialog
        S
        Focus the search field
        Move up in search results
        Move down in search results
        Go to active search result

        Search Tricks

        Prefix searches with a type followed by a colon (e.g. fn:) to restrict the search to a given type.

        Accepted types are: fn, mod, struct, enum, trait, type, macro, and const.

        Search functions by type signature (e.g. vec -> usize)

        ",0 "pment Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ package elki.utilities.datastructures; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.Random; import org.junit.Test; /** * Test the Kuhn-Munkres implementation. * * @author Erich Schubert */ public class KuhnMunkresWongTest { @Test public void test1() { int[] assignment = new KuhnMunkresWong().run(KuhnMunkresTest.TEST1); double sum = 0.; for(int i = 0; i < assignment.length; i++) { assertTrue(""Unassigned row "" + i, assignment[i] >= 0); sum += KuhnMunkresTest.TEST1[i][assignment[i]]; } assertEquals(""Assignment not optimal"", 55, sum, 0); } @Test public void test2() { int[] assignment = new KuhnMunkresWong().run(KuhnMunkresTest.TEST2); double sum = 0.; for(int i = 0; i < assignment.length; i++) { assertTrue(""Unassigned row "" + i, assignment[i] >= 0); sum += KuhnMunkresTest.TEST2[i][assignment[i]]; } assertEquals(""Assignment not optimal"", 4, sum, 0); } @Test public void testNonSq() { int[] assignment = new KuhnMunkresWong().run(KuhnMunkresTest.NONSQUARE); double sum = 0.; for(int i = 0; i < assignment.length; i++) { assertTrue(""Unassigned row "" + i, assignment[i] >= 0); sum += KuhnMunkresTest.NONSQUARE[i][assignment[i]]; } assertEquals(""Assignment not optimal"", 637518, sum, 0); } @Test public void testDifficult() { int[] assignment = new KuhnMunkresWong().run(KuhnMunkresTest.DIFFICULT); double sum = 0.; for(int i = 0; i < assignment.length; i++) { assertTrue(""Unassigned row "" + i, assignment[i] >= 0); sum += KuhnMunkresTest.DIFFICULT[i][assignment[i]]; } assertEquals(""Assignment not optimal"", 2.24, sum, 1e-4); } @Test public void testDifficult2() { int[] assignment = new KuhnMunkresWong().run(KuhnMunkresTest.DIFFICULT2); double sum = 0.; for(int i = 0; i < assignment.length; i++) { assertTrue(""Unassigned row "" + i, assignment[i] >= 0); sum += KuhnMunkresTest.DIFFICULT2[i][assignment[i]]; } assertEquals(""Assignment not optimal"", 0.8802, sum, 1e-4); } @Test public void testLarge() { long seed = 0L; Random rnd = new Random(seed); double[][] mat = new double[100][100]; for(int i = 0; i < mat.length; i++) { double[] row = mat[i]; for(int j = 0; j < row.length; j++) { row[j] = Math.abs(rnd.nextDouble()); } } int[] assignment = new KuhnMunkresWong().run(mat); double sum = 0.; for(int i = 0; i < assignment.length; i++) { assertTrue(""Unassigned row "" + i, assignment[i] >= 0); sum += mat[i][assignment[i]]; } if(seed == 0) { if(mat.length == 10 && mat[0].length == 10) { assertEquals(""sum"", 1.467733381753002, sum, 1e-8); // Duration: 0.007970609 } if(mat.length == 100 && mat[0].length == 100) { assertEquals(""sum"", 1.5583906418867581, sum, 1e-8); // Duration: 0.015696813 } if(mat.length == 1000 && mat[0].length == 1000) { assertEquals(""sum"", 1.6527526146559663, sum, 1e-8); // Duration: 0.8892345580000001 } if(mat.length == 10000 && mat[0].length == 10000) { assertEquals(""sum"", 1.669458072091596, sum, 1e-8); // Duration: 3035.95495334 } } } } ",0 "evice-width, initial-scale=1.0, maximum-scale=1"">

        Anda memiliki beberapa versi Blokada terinstal pada perangkat Anda. Apakah Anda ingin menyimpan versi terbaik dan menghapus versi lainnya sekarang?

        ",0 "in compliance with the License. * You may obtain a copy of the License at * * https://raw.githubusercontent.com/nikosgram13/OglofusProtection/master/LICENSE * * 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. */ package me.nikosgram.oglofus.protection; import com.google.common.base.Optional; import com.sk89q.intake.argument.ArgumentException; import com.sk89q.intake.argument.ArgumentParseException; import com.sk89q.intake.argument.CommandArgs; import com.sk89q.intake.parametric.ProvisionException; import me.nikosgram.oglofus.protection.api.ActionResponse; import me.nikosgram.oglofus.protection.api.CommandExecutor; import me.nikosgram.oglofus.protection.api.entity.User; import me.nikosgram.oglofus.protection.api.message.MessageType; import me.nikosgram.oglofus.protection.api.region.ProtectionRank; import me.nikosgram.oglofus.protection.api.region.ProtectionRegion; import me.nikosgram.oglofus.protection.api.region.ProtectionStaff; import org.apache.commons.lang3.ClassUtils; import org.spongepowered.api.entity.player.Player; import org.spongepowered.api.service.user.UserStorage; import org.spongepowered.api.util.command.CommandSource; import javax.annotation.Nullable; import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.UUID; public class OglofusProtectionStaff implements ProtectionStaff { private final List staff = new ArrayList(); private final Map ranks = new HashMap(); private final User owner; private final ProtectionRegion region; private final OglofusSponge sponge; protected OglofusProtectionStaff(ProtectionRegion region, OglofusSponge sponge) { this.region = region; this.sponge = sponge; owner = sponge.getUserManager().getUser(UUID.fromString(sponge.connector.getString( ""oglofus_regions"", ""uuid"", region.getUuid().toString(), ""owner"" ).get())).get(); Map staff = sponge.connector.getStringMap( ""oglofus_regions"", ""uuid"", region.getUuid().toString(), new String[]{""player"", ""rank""} ); for (String uid : staff.keySet()) { UUID uuid = UUID.fromString(uid); this.staff.add(sponge.getUserManager().getUser(uuid).get()); ranks.put(uuid, ProtectionRank.valueOf(staff.get(uid))); } } @Override public UUID getOwnerUuid() { return owner.getUuid(); } @Override public User getOwner() { return owner; } @Override @SuppressWarnings(""unchecked"") public Optional getOwnerAs(Class tClass) { if (ClassUtils.isAssignable(tClass, Player.class)) { return (Optional) sponge.server.getPlayer(owner.getUuid()); } else if (ClassUtils.isAssignable(tClass, User.class)) { UserStorage storage; if ((storage = sponge.game.getServiceManager().provide(UserStorage.class).orNull()) != null) { return (Optional) storage.get(owner.getUuid()).orNull(); } } return Optional.absent(); } @Override @SuppressWarnings(""unchecked"") public Collection getOfficersAs(Class tClass) { List returned = new ArrayList(); if (ClassUtils.isAssignable(tClass, Player.class)) { for (UUID uuid : getOfficersUuid()) { Player player; if ((player = sponge.server.getPlayer(uuid).orNull()) != null) { returned.add((T) player); } } } return returned; } @Override public Collection getOfficersUuid() { List returned = new ArrayList(); for (User user : getOfficers()) { returned.add(user.getUuid()); } return returned; } @Override public Collection getOfficers() { List returned = new ArrayList(); for (User user : this) { if (ranks.get(user.getUuid()).equals(ProtectionRank.Officer)) { returned.add(user); } } return returned; } @Override @SuppressWarnings(""unchecked"") public Collection getMembersAs(Class tClass) { List returned = new ArrayList(); if (ClassUtils.isAssignable(tClass, Player.class)) { for (UUID uuid : getMembersUuid()) { Player player; if ((player = sponge.server.getPlayer(uuid).orNull()) != null) { returned.add((T) player); } } } return returned; } @Override public Collection getMembersUuid() { List returned = new ArrayList(); for (User user : getMembers()) { returned.add(user.getUuid()); } return returned; } @Override public Collection getMembers() { List returned = new ArrayList(); for (User user : this) { if (ranks.get(user.getUuid()).equals(ProtectionRank.Member)) { returned.add(user); } } return returned; } @Override @SuppressWarnings(""unchecked"") public Collection getStaffAs(Class tClass) { List returned = new ArrayList(); if (ClassUtils.isAssignable(tClass, Player.class)) { for (User user : this) { Player player; if ((player = sponge.server.getPlayer(user.getUuid()).orNull()) != null) { returned.add((T) player); } } } return returned; } @Override public Collection getStaffUuid() { Collection returned = new ArrayList(); for (User user : this) { returned.add(user.getUuid()); } return returned; } @Override public boolean isOwner(UUID target) { return owner.getUuid().equals(target); } @Override public boolean isOwner(User target) { return owner.getUuid().equals(target.getUuid()); } @Override public boolean isOfficer(UUID target) { return ranks.containsKey(target) && ranks.get(target).equals(ProtectionRank.Officer); } @Override public boolean isOfficer(User target) { return ranks.containsKey(target.getUuid()) && ranks.get(target.getUuid()).equals(ProtectionRank.Officer); } @Override public boolean isMember(UUID target) { return ranks.containsKey(target) && ranks.get(target).equals(ProtectionRank.Member); } @Override public boolean isMember(User target) { return ranks.containsKey(target.getUuid()) && ranks.get(target.getUuid()).equals(ProtectionRank.Member); } @Override public boolean isStaff(UUID target) { return ranks.containsKey(target); } @Override public boolean isStaff(User target) { return ranks.containsKey(target.getUuid()); } @Override public boolean hasOwnerAccess(UUID target) { return isOwner(target) || sponge.getUserManager().getUser(target).get().hasPermission(""oglofus.protection.bypass.owner""); } @Override public boolean hasOwnerAccess(User target) { return isOwner(target) || target.hasPermission(""oglofus.protection.bypass.owner""); } @Override public boolean hasOfficerAccess(UUID target) { return isOfficer(target) || sponge.getUserManager().getUser(target).get().hasPermission(""oglofus.protection.bypass.officer""); } @Override public boolean hasOfficerAccess(User target) { return isOfficer(target) || target.hasPermission(""oglofus.protection.bypass.officer""); } @Override public boolean hasMemberAccess(UUID target) { return isMember(target) || sponge.getUserManager().getUser(target).get().hasPermission(""oglofus.protection.bypass.officer""); } @Override public boolean hasMemberAccess(User target) { return isMember(target) || target.hasPermission(""oglofus.protection.bypass.member""); } @Override public ProtectionRank getRank(UUID target) { return ranks.containsKey(target) ? ranks.get(target) : ProtectionRank.None; } @Override public ProtectionRank getRank(User target) { return ranks.containsKey(target.getUuid()) ? ranks.get(target.getUuid()) : ProtectionRank.None; } @Override public void broadcast(String message) { broadcast(MessageType.CHAT, message); } @Override public void broadcast(String message, ProtectionRank rank) { broadcast(MessageType.CHAT, message, rank); } @Override public void broadcast(MessageType type, String message) { for (User user : this) { user.sendMessage(type, message); } } @Override public void broadcast(MessageType type, String message, ProtectionRank rank) { switch (rank) { case Member: for (User user : getMembers()) { user.sendMessage(type, message); } break; case Officer: for (User user : getOfficers()) { user.sendMessage(type, message); } break; case Owner: owner.sendMessage(type, message); break; } } @Override public void broadcastRaw(Object message) { for (User user : this) { user.sendMessage(message); } } @Override public void broadcastRaw(Object message, ProtectionRank rank) { switch (rank) { case Member: for (User user : getMembers()) { user.sendMessage(message); } break; case Officer: for (User user : getOfficers()) { user.sendMessage(message); } break; case Owner: owner.sendMessage(message); break; } } @Override public void broadcastRaw(MessageType type, Object message) { throw new UnsupportedOperationException(""Not supported yet.""); } @Override public void broadcastRaw(MessageType type, Object message, ProtectionRank rank) { throw new UnsupportedOperationException(""Not supported yet.""); } @Override public ActionResponse reFlag() { //TODO: make it. return null; } @Override public ActionResponse invite(Object sender, UUID target) { return sponge.getUserManager().invite(sender, target, region); } @Override public ActionResponse invite(CommandExecutor sender, UUID target) { return null; } @Override public ActionResponse invite(Object sender, User target) { return null; } @Override public ActionResponse invite(CommandExecutor sender, User target) { return null; } @Override public ActionResponse invite(UUID target) { return sponge.getUserManager().invite(target, region); } @Override public ActionResponse invite(User target) { return null; } @Override public ActionResponse kick(Object sender, UUID target) { if (sender instanceof CommandSource) { if (sender instanceof Player) { if (region.getProtectionStaff().hasOwnerAccess(((Player) sender).getUniqueId())) { //TODO: call the handler PlayerKickHandler. return kick(target); } return ActionResponse.Failure.setMessage(""access""); } if (((CommandSource) sender).hasPermission(""oglofus.protection.bypass"")) { return kick(target); } return ActionResponse.Failure.setMessage(""access""); } return ActionResponse.Failure.setMessage(""object""); } @Override public ActionResponse kick(CommandExecutor sender, UUID target) { return null; } @Override public ActionResponse kick(Object sender, User target) { return null; } @Override public ActionResponse kick(CommandExecutor sender, User target) { return null; } @Override public ActionResponse kick(UUID target) { //TODO: call the handler PlayerKickHandler. return null; } @Override public ActionResponse kick(User target) { return null; } @Override public ActionResponse promote(Object sender, UUID target) { return null; } @Override public ActionResponse promote(CommandExecutor sender, UUID target) { return null; } @Override public ActionResponse promote(Object sender, User target) { return null; } @Override public ActionResponse promote(CommandExecutor sender, User target) { return null; } @Override public ActionResponse promote(UUID target) { return null; } @Override public ActionResponse promote(User target) { return null; } @Override public ActionResponse demote(Object sender, UUID target) { return null; } @Override public ActionResponse demote(CommandExecutor sender, UUID target) { return null; } @Override public ActionResponse demote(Object sender, User target) { return null; } @Override public ActionResponse demote(CommandExecutor sender, User target) { return null; } @Override public ActionResponse demote(UUID target) { return null; } @Override public ActionResponse demote(User target) { return null; } @Override public ActionResponse changeRank(Object sender, UUID target, ProtectionRank rank) { return null; } @Override public ActionResponse changeRank(CommandExecutor sender, UUID target, ProtectionRank rank) { return null; } @Override public ActionResponse changeRank(Object sender, User target, ProtectionRank rank) { return null; } @Override public ActionResponse changeRank(CommandExecutor sender, User target, ProtectionRank rank) { return null; } @Override public ActionResponse changeRank(UUID target, ProtectionRank rank) { return null; } @Override public ActionResponse changeRank(User target, ProtectionRank rank) { return null; } @Override public Iterator iterator() { return staff.iterator(); } @Override public boolean isProvided() { return false; } @Nullable @Override public User get(CommandArgs arguments, List modifiers) throws ArgumentException, ProvisionException { String name = arguments.next(); Optional user = sponge.getUserManager().getUser(name); if (user.isPresent() && isStaff(user.get())) { return user.get(); } else { throw new ArgumentParseException(String.format(""I can't find the Staff with name '%s'."", name)); } } @Override public List getSuggestions(String prefix) { List returned = new ArrayList(); for (User user : this) { if (user.getName().startsWith(prefix)) { returned.add(user.getName()); } } return returned; } } ",0 "/@Test //public class MetaRelationTest extends AbstractTest { // // public void test001_setMetaAttribute_engineEngine() { // // Root engine = new Root(); // Vertex metaAttribute = engine.setMetaAttribute(); // Vertex metaRelation = engine.setMetaAttribute(Collections.singletonList(engine)); // assert metaRelation.getMeta() == metaAttribute; // assert metaRelation.inheritsFrom(metaAttribute); // } // // public void test002_setMetaAttribute_relation() { // // Root engine = new Root(); // Vertex metaAttribute = engine.setMetaAttribute(); // Vertex metaRelation = engine.setMetaAttribute(Collections.singletonList(engine)); // Vertex car = engine.addInstance(""Car""); // Vertex power = engine.addInstance(""Power"", car); // Vertex color = engine.addInstance(""Color""); // Vertex carColor = engine.addInstance(""carColor"", new Vertex[] { car, color }); // assert carColor.isInstanceOf(metaRelation); // assert power.isInstanceOf(metaAttribute); // } // } ",0 "astian@kde.org> Copyright (c) 1999 Preston Brown Copyright (c) 1997 Matthias Kalle Dalheimer This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KCONFIG_H #define KCONFIG_H #include ""kconfigbase.h"" #include #include #include #include #include class KConfigGroup; class KComponentData; class KEntryMap; class KConfigPrivate; /** * \class KConfig kconfig.h * * \brief The central class of the KDE configuration data system. * * Quickstart: * * Get the default application config object via KGlobal::config(). * * Load a specific configuration file: * \code * KConfig config( ""/etc/kderc"", KConfig::SimpleConfig ); * \endcode * * Load the configuration of a specific component (taking into account * possible custom directories in KStandardDirs): * \code * KConfig config( componentData(), ""pluginrc"" ); * \endcode * * In general it is recommended to use KSharedConfig instead of * creating multiple instances of KConfig to avoid the overhead of * separate objects or concerns about synchronizing writes to disk * even if the configuration object is updated from multiple code paths. * KSharedConfig provides a set of open methods as counterparts for the * KConfig constructors. * * \sa KSharedConfig, KConfigGroup, the techbase HOWTO on KConfig. */ class KDECORE_EXPORT KConfig : public KConfigBase { public: /** * Determines how the system-wide and user's global settings will affect * the reading of the configuration. * * If CascadeConfig is selected, system-wide configuration sources are used * to provide defaults for the settings accessed through this object, or * possibly to override those settings in certain cases. * * IncludeGlobals does the same, but with the global settings sources. * * Note that the main configuration source overrides the cascaded sources, * which override those provided to addConfigSources(), which override the * global sources. The exception is that if a key or group is marked as * being immutable, it will not be overridden. * * Note that all values other than IncludeGlobals and CascadeConfig are * convenience definitions for the basic mode. * Do @em not combine them with anything. */ enum OpenFlag { IncludeGlobals = 0x01, ///< Blend kdeglobals into the config object. CascadeConfig = 0x02, ///< Cascade to system-wide config files. SimpleConfig = 0x00, ///< Just a single config file. NoCascade = IncludeGlobals, ///< Include user's globals, but omit system settings. NoGlobals = CascadeConfig, ///< Cascade to system settings, but omit user's globals. FullConfig = IncludeGlobals|CascadeConfig ///< Fully-fledged config, including globals and cascading to system settings }; Q_DECLARE_FLAGS(OpenFlags, OpenFlag) /** * Creates a KConfig object to manipulate a configuration file for the * current application. * * If an absolute path is specified for @p file, that file will be used * as the store for the configuration settings. If a non-absolute path * is provided, the file will be looked for in the standard directory * specified by resourceType. If no path is provided, a default * configuration file will be used based on the name of the main * application component. * * @p mode determines whether the user or global settings will be allowed * to influence the values returned by this object. See OpenFlags for * more details. * * @note You probably want to use KSharedConfig::openConfig instead. * * @param file the name of the file. If an empty string is passed in * and SimpleConfig is passed in for the OpenFlags, then an in-memory * KConfig object is created which will not write out to file nor which * requires any file in the filesystem at all. * @param mode how global settings should affect the configuration * options exposed by this KConfig object * @param resourceType The standard directory to look for the configuration * file in (see KStandardDirs) * * @sa KSharedConfig::openConfig(const QString&, OpenFlags, const char*) */ explicit KConfig(const QString& file = QString(), OpenFlags mode = FullConfig, const char* resourceType = ""config""); /** * Creates a KConfig object to manipulate the configuration for a specific * component. * * If an absolute path is specified for @p file, that file will be used * as the store for the configuration settings. If a non-absolute path * is provided, the file will be looked for in the standard directory * specified by resourceType. If no path is provided, a default * configuration file will be used based on the component's name. * * @p mode determines whether the user or global settings will be allowed * to influence the values returned by this object. See KConfig::OpenFlags for * more details. * * @note You probably want to use KSharedConfig::openConfig instead. * * @param componentData the component that you wish to load a configuration * file for * @param file overrides the configuration file name if not empty; if it is empty * and SimpleConfig is passed in for the OpenFlags, then an in-memory * KConfig object is created which will not write out to file nor which * requires any file in the filesystem at all. * @param mode how global settings should affect the configuration * options exposed by this KConfig object. * See OpenFlags * @param resourceType The standard directory to look for the configuration * file in * * @sa KSharedConfig::openConfig(const KComponentData&, const QString&, OpenFlags, const char*) */ explicit KConfig(const KComponentData& componentData, const QString& file = QString(), OpenFlags mode = FullConfig, const char* resourceType = ""config""); /** * @internal * * Creates a KConfig object using the specified backend. If the backend can not * be found or loaded, then the standard configuration parser is used as a fallback. * * @param file the file to be parsed * @param backend the backend to load * @param resourceType where to look for the file if an absolute path is not provided * * @since 4.1 */ KConfig(const QString& file, const QString& backend, const char* resourceType = ""config""); virtual ~KConfig(); /** * Returns the component data this configuration is for. */ const KComponentData &componentData() const; // krazy:exclude=constref /** * Returns the filename used to store the configuration. */ QString name() const; /// @reimp void sync(); /// Returns true if sync has any changes to write out. /// @since 4.12 bool isDirty() const; /// @reimp void markAsClean(); /// @{ configuration object state /// @reimp AccessMode accessMode() const; /** * Whether the configuration can be written to. * * If @p warnUser is true and the configuration cannot be * written to (ie: this method returns @c false), a warning * message box will be shown to the user telling them to * contact their system administrator to get the problem fixed. * * The most likely cause for this method returning @c false * is that the user does not have write permission for the * configuration file. * * @param warnUser whether to show a warning message to the user * if the configuration cannot be written to * * @returns true if the configuration can be written to, false * if the configuration cannot be written to */ bool isConfigWritable(bool warnUser); /// @} /** * Copies all entries from this config object to a new config * object that will save itself to @p file. * * The configuration will not actually be saved to @p file * until the returned object is destroyed, or sync() is called * on it. * * Do not forget to delete the returned KConfig object if * @p config was 0. * * @param file the new config object will save itself to * @param config if not 0, copy to the given KConfig object rather * than creating a new one * * @return @p config if it was set, otherwise a new KConfig object */ KConfig* copyTo(const QString &file, KConfig *config = 0) const; /** * Ensures that the configuration file contains a certain update. * * If the configuration file does not contain the update @p id * as contained in @p updateFile, kconf_update is run to update * the configuration file. * * If you install config update files with critical fixes * you may wish to use this method to verify that a critical * update has indeed been performed to catch the case where * a user restores an old config file from backup that has * not been updated yet. * * @param id the update to check * @param updateFile the file containing the update */ void checkUpdate(const QString &id, const QString &updateFile); /** * Updates the state of this object to match the persistent storage. */ void reparseConfiguration(); /// @{ extra config files /** * Adds the list of configuration sources to the merge stack. * * Currently only files are accepted as configuration sources. * * The first entry in @p sources is treated as the most general and will * be overridden by the second entry. The settings in the final entry * in @p sources will override all the other sources provided in the list. * * The settings in @p sources will also be overridden by the sources * provided by any previous calls to addConfigSources(). * * The settings in the global configuration sources will be overridden by * the sources provided to this method (@see IncludeGlobals). * All the sources provided to any call to this method will be overridden * by any files that cascade from the source provided to the constructor * (@see CascadeConfig), which will in turn be * overridden by the source provided to the constructor (either explicitly * or implicity via a KComponentData). * * Note that only the most specific file, ie: the file provided to the * constructor, will be written to by this object. * * The state is automatically updated by this method, so there is no need to call * reparseConfiguration(). * * @param sources A list of extra config sources. */ void addConfigSources(const QStringList &sources); /// @} /// @{ locales /** * Returns the current locale. */ QString locale() const; /** * Sets the locale to @p aLocale. * * The global locale is used by default. * * @note If set to the empty string, @b no locale will be matched. This effectively disables * reading translated entries. * * @return @c true if locale was changed, @c false if the call had no * effect (eg: @p aLocale was already the current locale for this * object) */ bool setLocale(const QString& aLocale); /// @} /// @{ defaults /** * When set, all readEntry calls return the system-wide (default) values * instead of the user's settings. * * This is off by default. * * @param b whether to read the system-wide defaults instead of the * user's settings */ void setReadDefaults(bool b); /** * @returns @c true if the system-wide defaults will be read instead of the * user's settings */ bool readDefaults() const; /// @} /// @{ immutability /// @reimp bool isImmutable() const; /// @} /// @{ global /** * @deprecated * * Forces all following write-operations to be performed on @c kdeglobals, * independent of the @c Global flag in writeEntry(). * * @param force true to force writing to kdeglobals * @see forceGlobal */ #ifndef KDE_NO_DEPRECATED KDE_DEPRECATED void setForceGlobal(bool force); #endif /** * @deprecated * * Returns whether all entries are being written to @c kdeglobals. * * @return @c true if all entries are being written to @c kdeglobals * @see setForceGlobal * @deprecated */ #ifndef KDE_NO_DEPRECATED KDE_DEPRECATED bool forceGlobal() const; #endif /// @} /// @reimp QStringList groupList() const; /** * Returns a map (tree) of entries in a particular group. * * The entries are all returned as strings. * * @param aGroup The group to get entries from. * * @return A map of entries in the group specified, indexed by key. * The returned map may be empty if the group is empty, or not found. * @see QMap */ QMap entryMap(const QString &aGroup=QString()) const; protected: virtual bool hasGroupImpl(const QByteArray &group) const; virtual KConfigGroup groupImpl( const QByteArray &b); virtual const KConfigGroup groupImpl(const QByteArray &b) const; virtual void deleteGroupImpl(const QByteArray &group, WriteConfigFlags flags = Normal); virtual bool isGroupImmutableImpl(const QByteArray& aGroup) const; friend class KConfigGroup; friend class KConfigGroupPrivate; /** Virtual hook, used to add new ""virtual"" functions while maintaining * binary compatibility. Unused in this class. */ virtual void virtual_hook( int id, void* data ); KConfigPrivate *const d_ptr; KConfig(KConfigPrivate &d); private: friend class KConfigTest; QStringList keyList(const QString& aGroup=QString()) const; Q_DISABLE_COPY(KConfig) Q_DECLARE_PRIVATE(KConfig) }; Q_DECLARE_OPERATORS_FOR_FLAGS( KConfig::OpenFlags ) #endif // KCONFIG_H ",0 "ile 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. ==============================================================================*/ // HLO shardings describe how an HLO instruction is split across multiple // computations. #ifndef TENSORFLOW_COMPILER_XLA_SERVICE_HLO_SHARDING_H_ #define TENSORFLOW_COMPILER_XLA_SERVICE_HLO_SHARDING_H_ #include #include #include #include ""absl/types/span.h"" #include ""tensorflow/compiler/xla/array.h"" #include ""tensorflow/compiler/xla/literal.h"" #include ""tensorflow/compiler/xla/protobuf_util.h"" #include ""tensorflow/compiler/xla/shape_tree.h"" #include ""tensorflow/compiler/xla/xla_data.pb.h"" #include ""tensorflow/core/lib/hash/hash.h"" #include ""tensorflow/core/platform/logging.h"" #include ""tensorflow/core/platform/macros.h"" #include ""tensorflow/core/platform/types.h"" namespace xla { // HLO shardings describe how an HLO instruction is split across multiple // computations. class HloSharding { public: // Creates a trivial sharding that replicates a maximal tile across all // devices. static HloSharding Replicate() { return HloSharding(); } // Creates a sharding that emulates device placement; a tile shape equal to // the input shape (one tile) assigned to a single device. static HloSharding AssignDevice(int64 device_id); // Creates a new sharding which splits a shape into tiles amongst the devices // specified by `tile_assignment`. static HloSharding Tile(const Array& tile_assignment) { return HloSharding(tile_assignment); } // Creates a new sharding which splits a one-dimensional input shape into // `num_tiles` tiles. static HloSharding Tile1D(const Shape& input_shape, int64 num_tiles); // Creates a new sharding for a tuple type. The given ShapeTree must have // elements for every leaf shape contained in the tuple. static HloSharding Tuple(const ShapeTree& sub_shardings); // Creates a new sharding for a tuple type. The number of elements in // shardings must match the number of leaf nodes in tuple_shape. For // empty tuples, the shardings array must have one element. static HloSharding Tuple(const Shape& tuple_shape, absl::Span shardings); // Creates a new sharding for a tuple type, with a single input sharding // repeated on each leaf. static HloSharding SingleTuple(const Shape& tuple_shape, const HloSharding& sharding); // If shape is an array, returns sharding, otherwise returns the tuple shaped // sharding with all the leaf nodes having the same input sharding. static HloSharding Single(const Shape& shape, const HloSharding& sharding); // Create a new sharding from a protobuf OpSharding. static StatusOr FromProto(const OpSharding& proto); // Checks whether device is a reserved device number. A reserved device number // has usually a special meaning, with dedicated handling logic. static bool IsReservedDevice(int64 device) { return device < 0; } OpSharding ToProto() const; // Note that this string canonically has outer curly braces, e.g. // ""{replicated}"". string ToString() const; // Validate that this sharding can be applied to a tensor with shape `shape`. Status Validate(const Shape& shape, int64 num_devices) const; // Returns true if the sharding has tuple type. bool IsTuple() const { return tuple_; } // Returns true if the sharding is trivial: replicate on all devices. bool IsReplicated() const { if (!IsTuple()) { return replicated_; } return absl::c_all_of( tuple_elements_, [](const HloSharding& s) { return s.IsReplicated(); }); } // Returns true if the tile size is the same as the input size. bool IsTileMaximal() const { if (!IsTuple()) { return maximal_; } return absl::c_all_of(tuple_elements_, [](const HloSharding& s) { return s.IsTileMaximal(); }); } // Returns true if the sharding defines an operation on the given device. bool UsesDevice(int64 device) const; // Retrieves a histogram of the devices used by the sharding. The returned // map has the device number as key, and the occurrence count as value. // If a sharding does not have a device, it will not be included in the // histogram. The count argument, if not nullptr, will receive the total // number of elements this sharding is made of (one for array, N leaves for // tuples). std::map UsedDevices(int64* count) const; // Returns the tile that should be executed on the given device. // REQUIRES: !IsTuple() std::vector TileIndexForDevice(int64 device) const; // Returns the device that should execute the given tile. // It is an error to call this if is_replicated() is true. // REQUIRES: !IsTuple() int64 DeviceForTileIndex(absl::Span index) const; // Given a device ID, returns the offset within the specified shape of the // tile that should be executed on the given core. This returns the lower // extent of the tile in the input space. // REQUIRES: !IsTuple() std::vector TileOffsetForDevice(const Shape& shape, int64 device) const; // Given a device ID, returns the limit within the specified shape of the // tile that should be executed on the given core. This returns the upper // extent of the tile in the input space. // REQUIRES: !IsTuple() std::vector TileLimitForDevice(const Shape& shape, int64 device) const; // Returns the single device this op operates on. If the sharding does not // span a single device, the return value will be empty. // In order for a sharding to span a single device, every leaf sharding must // be maximal and not replicated, and the used device must match. absl::optional UniqueDevice() const; // Retrieves the unique device or fails with a CHECK. int64 GetUniqueDevice() const; // Returns true if this op only uses a single device. bool HasUniqueDevice() const { return UniqueDevice().has_value(); } // Returns the ShapeTree containing the shardings for each element of this // tuple, if IsTuple, or a ShapeTree with a single element containing this // sharding. Only the leaf elements are populated. This creates a new // ShapeTree object so is not cheap. StatusOr> AsShapeTree(const Shape& shape) const; ShapeTree GetAsShapeTree(const Shape& shape) const { return AsShapeTree(shape).ValueOrDie(); } // Retrieves the sub sharding at a given index, out of a tuple sharding. // REQUIRES: IsTuple() HloSharding GetSubSharding(const Shape& shape, const ShapeIndex& index) const; // If the current sharding is a tuple sharding, return itself as result. // Otherwise returns a tuple sharding for the input shape, with all the leaves // having this object sharding. StatusOr GetTupleSharding(const Shape& shape) const; // Extracts the sharding that is common within the current sharding. // If the current sharding is not a tuple sharding, the current sharding will // be returned. If it is a tuple, and all the tuple elements are common, the // common element will be returned. Otherwise the optional will contain no // value. absl::optional ExtractSingleSharding() const; bool operator==(const HloSharding& other) const { return replicated_ == other.replicated_ && maximal_ == other.maximal_ && tile_assignment_ == other.tile_assignment_ && tuple_elements_ == other.tuple_elements_; } bool operator!=(const HloSharding& other) const { return !(*this == other); } size_t Hash() const; struct Hasher { size_t operator()(const HloSharding& sharding) const { return sharding.Hash(); } }; // Gets the tile assignment tensor. // REQUIRES: !IsReplicated() && !IsTuple() const Array& tile_assignment() const { return tile_assignment_; } // Returns the flattened list of all the leaf shardings in a tuple shape, by // pre-order walk (ShapeTree iterator order). // REQUIRES: IsTuple(). std::vector& tuple_elements() { return tuple_elements_; } const std::vector& tuple_elements() const { return tuple_elements_; } // Gets the tile shape. // REQUIRES: !IsTuple() Shape TileShape(const Shape& shape) const; private: HloSharding() : replicated_(true), maximal_(true), tuple_(false), tile_assignment_({0}) {} // device_id values: // -2: magic number to mean unassigned device, used by spatial partitioning // -1: the id of the host // 0 or positive: the id of a device // NOTE(dimvar): -1 is needed for outside compilation. It can be removed once // we have fully switched to the side-effect tokens. explicit HloSharding(int64 device_id) : replicated_(false), maximal_(true), tuple_(false), tile_assignment_({1}, device_id) {} explicit HloSharding(const Array& tile_assignment) : replicated_(false), maximal_(false), tuple_(false), tile_assignment_(tile_assignment) {} explicit HloSharding(const std::vector& tuple_shardings) : replicated_(false), maximal_(false), tuple_(true), tile_assignment_({0}), tuple_elements_(tuple_shardings) {} // Checks that the number of elements in tuple_elements_ is consistent with // the tuple shape passes as argument. Status CheckLeafCount(const Shape& shape) const; // Internal helper to validate a tuple sharding. Status ValidateTuple(const Shape& shape, int64 num_devices) const; // Internal helper to validate a non-tuple (leaf) sharding. Status ValidateNonTuple(const Shape& shape, int64 num_devices) const; // Returns the number of tuple_elements_ entries to fit the shape. static int64 RequiredLeaves(const Shape& shape); bool replicated_; bool maximal_; bool tuple_; // This field is only used if replicated_ is false. If maximal_ is true, then // the field contains a rank 1 array with a single element, which is the // device the HLO is assigned to. If maximal_ is false, the field contains an // array with the same rank as the corresponding HLO. The dimension sizes of // the array describe the number of ways the HLO is partitioned along each // dimension. The values of the array specify which device each tile of // the HLO is assigned to. The index of each value determines which tile it // takes. // For example, {{{2, 3}}, {{5, 7}}} (whose ToString representation is // ""{devices=[2,1,2]2,3,5,7}""), means that dimension 1 is split two way and // dimension 3 is split 2 way. Core 5, whose index is [2,1,1] will take the // tile that contains the 2nd half of dimension 1 and the 1st half of // dimension 3. Array tile_assignment_; // Only non-empty when tuple_ is true. If a tuple is empty then one entry is // present for the root. This is a flattened list of all the leaf shardings in // a tuple shape, by pre-order walk (ShapeTree iterator order). std::vector tuple_elements_; }; std::ostream& operator<<(std::ostream& out, const HloSharding& sharding); } // namespace xla #endif // TENSORFLOW_COMPILER_XLA_SERVICE_HLO_SHARDING_H_ ",0 "dification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Matthias Mann nor the names of its contributors may * be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package de.matthiasmann.twl; import de.matthiasmann.twl.model.IntegerModel; import de.matthiasmann.twl.model.ListModel; import de.matthiasmann.twl.renderer.Image; import de.matthiasmann.twl.utils.TypeMapping; /** * A wheel widget. * * @param The data type for the wheel items * * @author Matthias Mann */ public class WheelWidget extends Widget { public interface ItemRenderer { public Widget getRenderWidget(Object data); } private final TypeMapping itemRenderer; private final L listener; private final R renderer; private final Runnable timerCB; protected int itemHeight; protected int numVisibleItems; protected Image selectedOverlay; private static final int TIMER_INTERVAL = 30; private static final int MIN_SPEED = 3; private static final int MAX_SPEED = 100; protected Timer timer; protected int dragStartY; protected long lastDragTime; protected long lastDragDelta; protected int lastDragDist; protected boolean hasDragStart; protected boolean dragActive; protected int scrollOffset; protected int scrollAmount; protected ListModel model; protected IntegerModel selectedModel; protected int selected; protected boolean cyclic; public WheelWidget() { this.itemRenderer = new TypeMapping(); this.listener = new L(); this.renderer = new R(); this.timerCB = new Runnable() { public void run() { onTimer(); } }; itemRenderer.put(String.class, new StringItemRenderer()); super.insertChild(renderer, 0); setCanAcceptKeyboardFocus(true); } public WheelWidget(ListModel model) { this(); this.model = model; } public ListModel getModel() { return model; } public void setModel(ListModel model) { removeListener(); this.model = model; addListener(); invalidateLayout(); } public IntegerModel getSelectedModel() { return selectedModel; } public void setSelectedModel(IntegerModel selectedModel) { removeSelectedListener(); this.selectedModel = selectedModel; addSelectedListener(); } public int getSelected() { return selected; } public void setSelected(int selected) { int oldSelected = this.selected; if(oldSelected != selected) { this.selected = selected; if(selectedModel != null) { selectedModel.setValue(selected); } firePropertyChange(""selected"", oldSelected, selected); } } public boolean isCyclic() { return cyclic; } public void setCyclic(boolean cyclic) { this.cyclic = cyclic; } public int getItemHeight() { return itemHeight; } public int getNumVisibleItems() { return numVisibleItems; } public boolean removeItemRenderer(Class clazz) { if(itemRenderer.remove(clazz)) { super.removeAllChildren(); invalidateLayout(); return true; } return false; } public void registerItemRenderer(Class clazz, ItemRenderer value) { itemRenderer.put(clazz, value); invalidateLayout(); } public void scroll(int amount) { scrollInt(amount); scrollAmount = 0; } protected void scrollInt(int amount) { int pos = selected; int half = itemHeight / 2; scrollOffset += amount; while(scrollOffset >= half) { scrollOffset -= itemHeight; pos++; } while(scrollOffset <= -half) { scrollOffset += itemHeight; pos--; } if(!cyclic) { int n = getNumEntries(); if(n > 0) { while(pos >= n) { pos--; scrollOffset += itemHeight; } } while(pos < 0) { pos++; scrollOffset -= itemHeight; } scrollOffset = Math.max(-itemHeight, Math.min(itemHeight, scrollOffset)); } setSelected(pos); if(scrollOffset == 0 && scrollAmount == 0) { stopTimer(); } else { startTimer(); } } public void autoScroll(int dir) { if(dir != 0) { if(scrollAmount != 0 && Integer.signum(scrollAmount) != Integer.signum(dir)) { scrollAmount = dir; } else { scrollAmount += dir; } startTimer(); } } @Override public int getPreferredInnerHeight() { return numVisibleItems * itemHeight; } @Override public int getPreferredInnerWidth() { int width = 0; for(int i=0,n=getNumEntries() ; i 3 && lastDragDelta > 0) { int amount = (int)Math.min(1000, absDist * 100 / lastDragDelta); autoScroll(amount * Integer.signum(lastDragDist)); } hasDragStart = false; dragActive = false; return true; } if(evt.isMouseDragEvent()) { if(hasDragStart) { long time = getTime(); dragActive = true; lastDragDist = dragStartY - evt.getMouseY(); lastDragDelta = Math.max(1, time - lastDragTime); scroll(lastDragDist); dragStartY = evt.getMouseY(); lastDragTime = time; } return true; } if(super.handleEvent(evt)) { return true; } switch(evt.getType()) { case MOUSE_WHEEL: autoScroll(itemHeight * evt.getMouseWheelDelta()); return true; case MOUSE_BTNDOWN: if(evt.getMouseButton() == Event.MOUSE_LBUTTON) { dragStartY = evt.getMouseY(); lastDragTime = getTime(); hasDragStart = true; } return true; case KEY_PRESSED: switch(evt.getKeyCode()) { case Event.KEY_UP: autoScroll(-itemHeight); return true; case Event.KEY_DOWN: autoScroll(+itemHeight); return true; } return false; } return evt.isMouseEvent(); } protected long getTime() { GUI gui = getGUI(); return (gui != null) ? gui.getCurrentTime() : 0; } protected int getNumEntries() { return (model == null) ? 0 : model.getNumEntries(); } protected Widget getItemRenderer(int i) { T item = model.getEntry(i); if(item != null) { ItemRenderer ir = itemRenderer.get(item.getClass()); if(ir != null) { Widget w = ir.getRenderWidget(item); if(w != null) { if(w.getParent() != renderer) { w.setVisible(false); renderer.add(w); } return w; } } } return null; } protected void startTimer() { if(timer != null && !timer.isRunning()) { timer.start(); } } protected void stopTimer() { if(timer != null) { timer.stop(); } } protected void onTimer() { int amount = scrollAmount; int newAmount = amount; if(amount == 0 && !dragActive) { amount = -scrollOffset; } if(amount != 0) { int absAmount = Math.abs(amount); int speed = absAmount * TIMER_INTERVAL / 200; int dir = Integer.signum(amount) * Math.min(absAmount, Math.max(MIN_SPEED, Math.min(MAX_SPEED, speed))); if(newAmount != 0) { newAmount -= dir; } scrollAmount = newAmount; scrollInt(dir); } } @Override protected void layout() { layoutChildFullInnerArea(renderer); } @Override protected void applyTheme(ThemeInfo themeInfo) { super.applyTheme(themeInfo); applyThemeWheel(themeInfo); } protected void applyThemeWheel(ThemeInfo themeInfo) { itemHeight = themeInfo.getParameter(""itemHeight"", 10); numVisibleItems = themeInfo.getParameter(""visibleItems"", 5); selectedOverlay = themeInfo.getImage(""selectedOverlay""); invalidateLayout(); } @Override protected void afterAddToGUI(GUI gui) { super.afterAddToGUI(gui); addListener(); addSelectedListener(); timer = gui.createTimer(); timer.setCallback(timerCB); timer.setDelay(TIMER_INTERVAL); timer.setContinuous(true); } @Override protected void beforeRemoveFromGUI(GUI gui) { timer.stop(); timer = null; removeListener(); removeSelectedListener(); super.beforeRemoveFromGUI(gui); } @Override public void insertChild(Widget child, int index) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } @Override public void removeAllChildren() throws UnsupportedOperationException { throw new UnsupportedOperationException(); } @Override public Widget removeChild(int index) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } private void addListener() { if(model != null) { model.addChangeListener(listener); } } private void removeListener() { if(model != null) { model.removeChangeListener(listener); } } private void addSelectedListener() { if(selectedModel != null) { selectedModel.addCallback(listener); syncSelected(); } } private void removeSelectedListener() { if(selectedModel != null) { selectedModel.removeCallback(listener); } } void syncSelected() { setSelected(selectedModel.getValue()); } void entriesDeleted(int first, int last) { if(selected > first) { if(selected > last) { setSelected(selected - (last-first+1)); } else { setSelected(first); } } invalidateLayout(); } void entriesInserted(int first, int last) { if(selected >= first) { setSelected(selected + (last-first+1)); } invalidateLayout(); } class L implements ListModel.ChangeListener, Runnable { public void allChanged() { invalidateLayout(); } public void entriesChanged(int first, int last) { invalidateLayout(); } public void entriesDeleted(int first, int last) { WheelWidget.this.entriesDeleted(first, last); } public void entriesInserted(int first, int last) { WheelWidget.this.entriesInserted(first, last); } public void run() { syncSelected(); } } class R extends Widget { public R() { setTheme(""""); setClip(true); } @Override protected void paintWidget(GUI gui) { if(model == null) { return; } int width = getInnerWidth(); int x = getInnerX(); int y = getInnerY(); int numItems = model.getNumEntries(); int numDraw = numVisibleItems; int startIdx = selected - numVisibleItems/2; if((numDraw & 1) == 0) { y -= itemHeight / 2; numDraw++; } if(scrollOffset > 0) { y -= scrollOffset; numDraw++; } if(scrollOffset < 0) { y -= itemHeight + scrollOffset; numDraw++; startIdx--; } main: for(int i=0 ; i= numItems) { if(!cyclic) { continue main; } idx -= numItems; } Widget w = getItemRenderer(idx); if(w != null) { w.setSize(width, itemHeight); w.setPosition(x, y + i*itemHeight); w.validateLayout(); paintChild(gui, w); } } } @Override public void invalidateLayout() { } @Override protected void sizeChanged() { } } public static class StringItemRenderer extends Label implements WheelWidget.ItemRenderer { public StringItemRenderer() { setCache(false); } public Widget getRenderWidget(Object data) { setText(String.valueOf(data)); return this; } @Override protected void sizeChanged() { } } } ",0 "enerated by javadoc (1.8.0_45) on Mon Sep 12 21:55:26 IDT 2016 --> com.exlibris.dps.sdk.repository

        com.exlibris.dps.sdk.repository

        Interfaces

        ",0 "iance 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. */ package io.reactivex.internal.operators.maybe; import io.reactivex.*; import io.reactivex.disposables.Disposable; import io.reactivex.internal.disposables.DisposableHelper; /** * Turns an onSuccess into an onComplete, onError and onComplete is relayed as is. * * @param the value type */ public final class MaybeIgnoreElement extends AbstractMaybeWithUpstream { public MaybeIgnoreElement(MaybeSource source) { super(source); } @Override protected void subscribeActual(MaybeObserver observer) { source.subscribe(new IgnoreMaybeObserver(observer)); } static final class IgnoreMaybeObserver implements MaybeObserver, Disposable { final MaybeObserver actual; Disposable d; IgnoreMaybeObserver(MaybeObserver actual) { this.actual = actual; } @Override public void onSubscribe(Disposable d) { if (DisposableHelper.validate(this.d, d)) { this.d = d; actual.onSubscribe(this); } } @Override public void onSuccess(T value) { d = DisposableHelper.DISPOSED; actual.onComplete(); } @Override public void onError(Throwable e) { d = DisposableHelper.DISPOSED; actual.onError(e); } @Override public void onComplete() { d = DisposableHelper.DISPOSED; actual.onComplete(); } @Override public boolean isDisposed() { return d.isDisposed(); } @Override public void dispose() { d.dispose(); d = DisposableHelper.DISPOSED; } } } ",0 "tation. * * @author thomas.jungblut * */ public final class LogisticErrorFunction implements ErrorFunction { @Override public double calculateError(DoubleMatrix y, DoubleMatrix hypothesis) { return (y.multiply(-1d) .multiplyElementWise(MathUtils.logMatrix(hypothesis)).subtract((y .subtractBy(1.0d)).multiplyElementWise(MathUtils.logMatrix(hypothesis .subtractBy(1d))))).sum(); } } ",0 "'improve-docs btn btn-primary'> Improve this Doc  View Source

        angular.isString

        1. - function in module ng

        Determines if a reference is a String.

        Usage

        angular.isString(value);

        Arguments

        Param Type Details
        value *

        Reference to check.

        Returns

        boolean

        True if value is a String.

        ",0 "rt net.ess3.api.InvalidNameException; import net.ess3.api.InvalidWorldException; import org.bukkit.Location; import org.bukkit.Server; import java.io.File; import java.io.IOException; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; import static com.earth2me.essentials.I18n.tl; public class Warps implements IConf, net.ess3.api.IWarps { private static final Logger logger = Logger.getLogger(""Essentials""); private final Map warpPoints = new HashMap(); private final File warpsFolder; private final Server server; public Warps(Server server, File dataFolder) { this.server = server; warpsFolder = new File(dataFolder, ""warps""); if (!warpsFolder.exists()) { warpsFolder.mkdirs(); } reloadConfig(); } @Override public boolean isEmpty() { return warpPoints.isEmpty(); } @Override public Collection getList() { final List keys = new ArrayList(); for (StringIgnoreCase stringIgnoreCase : warpPoints.keySet()) { keys.add(stringIgnoreCase.getString()); } Collections.sort(keys, String.CASE_INSENSITIVE_ORDER); return keys; } @Override public Location getWarp(String warp) throws WarpNotFoundException, InvalidWorldException { EssentialsConf conf = warpPoints.get(new StringIgnoreCase(warp)); if (conf == null) { throw new WarpNotFoundException(); } return conf.getLocation(null, server); } @Override public void setWarp(String name, Location loc) throws Exception { setWarp(null, name, loc); } @Override public void setWarp(IUser user, String name, Location loc) throws Exception { String filename = StringUtil.sanitizeFileName(name); EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name)); if (conf == null) { File confFile = new File(warpsFolder, filename + "".yml""); if (confFile.exists()) { throw new Exception(tl(""similarWarpExist"")); } conf = new EssentialsConf(confFile); warpPoints.put(new StringIgnoreCase(name), conf); } conf.setProperty(null, loc); conf.setProperty(""name"", name); if (user != null) conf.setProperty(""lastowner"", user.getBase().getUniqueId().toString()); try { conf.saveWithError(); } catch (IOException ex) { throw new IOException(tl(""invalidWarpName"")); } } @Override public UUID getLastOwner(String warp) throws WarpNotFoundException { EssentialsConf conf = warpPoints.get(new StringIgnoreCase(warp)); if (conf == null) { throw new WarpNotFoundException(); } UUID uuid = null; try { uuid = UUID.fromString(conf.getString(""lastowner"")); } catch (Exception ex) {} return uuid; } @Override public void removeWarp(String name) throws Exception { EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name)); if (conf == null) { throw new Exception(tl(""warpNotExist"")); } if (!conf.getFile().delete()) { throw new Exception(tl(""warpDeleteError"")); } warpPoints.remove(new StringIgnoreCase(name)); } @Override public final void reloadConfig() { warpPoints.clear(); File[] listOfFiles = warpsFolder.listFiles(); if (listOfFiles.length >= 1) { for (int i = 0; i < listOfFiles.length; i++) { String filename = listOfFiles[i].getName(); if (listOfFiles[i].isFile() && filename.endsWith("".yml"")) { try { EssentialsConf conf = new EssentialsConf(listOfFiles[i]); conf.load(); String name = conf.getString(""name""); if (name != null) { warpPoints.put(new StringIgnoreCase(name), conf); } } catch (Exception ex) { logger.log(Level.WARNING, tl(""loadWarpError"", filename), ex); } } } } } //This is here for future 3.x api support. Not implemented here becasue storage is handled differently @Override public File getWarpFile(String name) throws InvalidNameException { throw new UnsupportedOperationException(""Not supported yet.""); } @Override public int getCount() { return getList().size(); } private static class StringIgnoreCase { private final String string; public StringIgnoreCase(String string) { this.string = string; } @Override public int hashCode() { return getString().toLowerCase(Locale.ENGLISH).hashCode(); } @Override public boolean equals(Object o) { if (o instanceof StringIgnoreCase) { return getString().equalsIgnoreCase(((StringIgnoreCase) o).getString()); } return false; } public String getString() { return string; } } } ",0 "itle>GTL: Référence du fichier gtl_image_raw.h

        Référence du fichier gtl_image_raw.h

        Classe CImageRAW, pour le chargement des images RAW. Plus de détails...

        #include ""gtl_image.h""
        #include <string>

        Aller au code source de ce fichier.

        Namespaces

        namespace  gtl

        Classes

        class  gtl::CImageRAW
         Classe pour le chargement des images RAW. Plus de détails...


        Description détaillée

        Classe CImageRAW, pour le chargement des images RAW.

        Date:
        02/10/2004

        Définition dans le fichier gtl_image_raw.h.


        Généré le Wed Jan 5 23:28:23 2005 pour GTL par 1.3.8
        ",0 "Pragma"" content=""no-cache""> 105年第十四任總統副總統及第九屆立法委員選舉
         區域立法委員選舉 金門縣 選舉區 候選人得票數 
           候選人數:8    應選人數:1  
        註記 號次 姓名 性別 得票數 得票率% 推薦之政黨
          1 洪志恒 647 1.7840
          2 陳滄江 8,367 23.0706 民主進步黨
          3 高丹樺 666 1.8364 軍公教聯盟黨
          4 張中法 670 1.8474
        5 楊鎮浯 16,350 45.0823 中國國民黨
          6 陳仲立 49 0.1351
          7 陳德輝 113 0.3116 台灣工黨
          8 吳成典 9,405 25.9327 新黨
        投開票所數 已送/應送: 68/68 
        註記說明: 當選註記
        同票待抽籤
         資料更新時間:01/16 20:33:06 
        (網頁每3分鐘自動更新一次)
        [中央選舉委員會]
        ",0 "clude #include #include #include #include static int teatime_check_gl_version(uint32_t *major, uint32_t *minor); static int teatime_check_program_errors(GLuint program); static int teatime_check_shader_errors(GLuint shader); #define TEATIME_BREAKONERROR(FN,RC) if ((RC = teatime_check_gl_errors(__LINE__, #FN )) < 0) break #define TEATIME_BREAKONERROR_FB(FN,RC) if ((RC = teatime_check_gl_fb_errors(__LINE__, #FN )) < 0) break teatime_t *teatime_setup() { int rc = 0; teatime_t *obj = calloc(1, sizeof(teatime_t)); if (!obj) { fprintf(stderr, ""Out of memory allocating %zu bytes\n"", sizeof(teatime_t)); return NULL; } do { uint32_t version[2] = { 0, 0}; if (teatime_check_gl_version(&version[0], &version[1]) < 0) { fprintf(stderr, ""Unable to verify OpenGL version\n""); rc = -1; break; } if (version[0] < 3) { fprintf(stderr, ""Minimum Required OpenGL version 3.0. You have %u.%u\n"", version[0], version[1]); rc = -1; break; } /* initialize off-screen framebuffer */ /* * This is the EXT_framebuffer_object OpenGL extension that allows us to * use an offscreen buffer as a target for rendering operations such as * vector calculations, providing full precision and removing unwanted * clamping issues. * we are turning off the traditional framebuffer here apparently. */ glGenFramebuffersEXT(1, &(obj->ofb)); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, obj->ofb); TEATIME_BREAKONERROR(glBindFramebufferEXT, rc); fprintf(stderr, ""Successfully created off-screen framebuffer with id: %d\n"", obj->ofb); /* get the texture size */ obj->maxtexsz = -1; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &(obj->maxtexsz)); fprintf(stderr, ""Maximum Texture size for the GPU: %d\n"", obj->maxtexsz); obj->itexid = obj->otexid = 0; obj->shader = obj->program = 0; } while (0); if (rc < 0) { teatime_cleanup(obj); obj = NULL; } return obj; } void teatime_cleanup(teatime_t *obj) { if (obj) { teatime_delete_program(obj); teatime_delete_textures(obj); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); glDeleteFramebuffersEXT(1, &(obj->ofb)); glFlush(); free(obj); obj = NULL; } } int teatime_set_viewport(teatime_t *obj, uint32_t ilen) { uint32_t texsz = (uint32_t)((long)(sqrt(ilen / 4.0))); if (obj && texsz > 0 && texsz < (GLuint)obj->maxtexsz) { /* viewport mapping 1:1 pixel = texel = data mapping */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0, texsz, 0.0, texsz); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glViewport(0, 0, texsz, texsz); obj->tex_size = texsz; fprintf(stderr, ""Texture size: %u x %u\n"", texsz, texsz); return 0; } else if (obj) { fprintf(stderr, ""Max. texture size is %d. Calculated: %u from input length: %u\n"", obj->maxtexsz, texsz, ilen); } return -EINVAL; } int teatime_create_textures(teatime_t *obj, const uint32_t *input, uint32_t ilen) { if (obj && input && ilen > 0) { int rc = 0; do { uint32_t texsz = (uint32_t)((long)(sqrt(ilen / 4.0))); if (texsz != obj->tex_size) { fprintf(stderr, ""Viewport texture size(%u) != Input texture size (%u)\n"", obj->tex_size, texsz); rc = -EINVAL; break; } glGenTextures(1, &(obj->itexid)); glGenTextures(1, &(obj->otexid)); fprintf(stderr, ""Created input texture with ID: %u\n"", obj->itexid); fprintf(stderr, ""Created output texture with ID: %u\n"", obj->otexid); /** BIND ONE TEXTURE AT A TIME **/ /* the texture target can vary depending on GPU */ glBindTexture(GL_TEXTURE_2D, obj->itexid); TEATIME_BREAKONERROR(glBindTexture, rc); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); /* turn off filtering and set proper wrap mode - this is obligatory for * floating point textures */ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); TEATIME_BREAKONERROR(glTexParameteri, rc); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); TEATIME_BREAKONERROR(glTexParameteri, rc); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); TEATIME_BREAKONERROR(glTexParameteri, rc); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); TEATIME_BREAKONERROR(glTexParameteri, rc); /* create a 2D texture of the same size as the data * internal format: GL_RGBA32UI_EXT * texture format: GL_RGBA_INTEGER * texture type: GL_UNSIGNED_INT */ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32UI_EXT, texsz, texsz, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT, NULL); TEATIME_BREAKONERROR(glTexImage2D, rc); /* transfer data to texture */ #ifdef WIN32 glTexSubImage2D #else glTexSubImage2DEXT #endif (GL_TEXTURE_2D, 0, 0, 0, obj->tex_size, obj->tex_size, GL_RGBA_INTEGER, GL_UNSIGNED_INT, input); #ifdef WIN32 TEATIME_BREAKONERROR(glTexSubImage2D, rc); #else TEATIME_BREAKONERROR(glTexSubImage2DEXT, rc); #endif fprintf(stderr, ""Successfully transferred input data to texture ID: %u\n"", obj->itexid); /* BIND the OUTPUT texture and work on it */ /* the texture target can vary depending on GPU */ glBindTexture(GL_TEXTURE_2D, obj->otexid); TEATIME_BREAKONERROR(glBindTexture, rc); /* turn off filtering and set proper wrap mode - this is obligatory for * floating point textures */ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); TEATIME_BREAKONERROR(glTexParameteri, rc); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); TEATIME_BREAKONERROR(glTexParameteri, rc); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); TEATIME_BREAKONERROR(glTexParameteri, rc); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); TEATIME_BREAKONERROR(glTexParameteri, rc); /* create a 2D texture of the same size as the data * internal format: GL_RGBA32UI_EXT * texture format: GL_RGBA_INTEGER * texture type: GL_UNSIGNED_INT */ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32UI_EXT, texsz, texsz, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT, NULL); TEATIME_BREAKONERROR(glTexImage2D, rc); /* change tex-env to replace instead of the default modulate */ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); TEATIME_BREAKONERROR(glTexEnvi, rc); /* attach texture */ glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, obj->otexid, 0); TEATIME_BREAKONERROR(glFramebufferTexture2DEXT, rc); TEATIME_BREAKONERROR_FB(glFramebufferTexture2DEXT, rc); glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); TEATIME_BREAKONERROR(glDrawBuffer, rc); glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_TEXTURE_2D, obj->otexid, 0); TEATIME_BREAKONERROR(glFramebufferTexture2DEXT, rc); TEATIME_BREAKONERROR_FB(glFramebufferTexture2DEXT, rc); rc = 0; } while (0); return rc; } return -EINVAL; } int teatime_read_textures(teatime_t *obj, uint32_t *output, uint32_t olen) { if (obj && output && olen > 0 && obj->otexid > 0) { int rc = 0; do { uint32_t texsz = (uint32_t)((long)(sqrt(olen / 4.0))); if (texsz != obj->tex_size) { fprintf(stderr, ""Viewport texture size(%u) != Input texture size (%u)\n"", obj->tex_size, texsz); rc = -EINVAL; break; } /* read the texture back */ glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); TEATIME_BREAKONERROR(glReadBuffer, rc); glReadPixels(0, 0, obj->tex_size, obj->tex_size, GL_RGBA_INTEGER, GL_UNSIGNED_INT, output); TEATIME_BREAKONERROR(glReadPixels, rc); fprintf(stderr, ""Successfully read data from the texture\n""); } while (0); return rc; } return -EINVAL; } int teatime_create_program(teatime_t *obj, const char *source) { if (obj && source) { int rc = 0; do { obj->program = glCreateProgram(); TEATIME_BREAKONERROR(glCreateProgram, rc); obj->shader = glCreateShader(GL_FRAGMENT_SHADER_ARB); TEATIME_BREAKONERROR(glCreateShader, rc); glShaderSource(obj->shader, 1, &source, NULL); TEATIME_BREAKONERROR(glShaderSource, rc); glCompileShader(obj->shader); rc = teatime_check_shader_errors(obj->shader); if (rc < 0) break; TEATIME_BREAKONERROR(glCompileShader, rc); glAttachShader(obj->program, obj->shader); TEATIME_BREAKONERROR(glAttachShader, rc); glLinkProgram(obj->program); rc = teatime_check_program_errors(obj->program); if (rc < 0) break; TEATIME_BREAKONERROR(glLinkProgram, rc); obj->locn_input = glGetUniformLocation(obj->program, ""idata""); TEATIME_BREAKONERROR(glGetUniformLocation, rc); obj->locn_output = glGetUniformLocation(obj->program, ""odata""); TEATIME_BREAKONERROR(glGetUniformLocation, rc); obj->locn_key = glGetUniformLocation(obj->program, ""ikey""); TEATIME_BREAKONERROR(glGetUniformLocation, rc); obj->locn_rounds = glGetUniformLocation(obj->program, ""rounds""); TEATIME_BREAKONERROR(glGetUniformLocation, rc); rc = 0; } while (0); return rc; } return -EINVAL; } int teatime_run_program(teatime_t *obj, const uint32_t ikey[4], uint32_t rounds) { if (obj && obj->program > 0) { int rc = 0; do { glUseProgram(obj->program); TEATIME_BREAKONERROR(glUseProgram, rc); glActiveTexture(GL_TEXTURE0); TEATIME_BREAKONERROR(glActiveTexture, rc); glBindTexture(GL_TEXTURE_2D, obj->itexid); TEATIME_BREAKONERROR(glBindTexture, rc); glUniform1i(obj->locn_input, 0); TEATIME_BREAKONERROR(glUniform1i, rc); glActiveTexture(GL_TEXTURE1); TEATIME_BREAKONERROR(glActiveTexture, rc); glBindTexture(GL_TEXTURE_2D, obj->otexid); TEATIME_BREAKONERROR(glBindTexture, rc); glUniform1i(obj->locn_output, 1); TEATIME_BREAKONERROR(glUniform1i, rc); glUniform4uiv(obj->locn_key, 1, ikey); TEATIME_BREAKONERROR(glUniform1uiv, rc); glUniform1ui(obj->locn_rounds, rounds); TEATIME_BREAKONERROR(glUniform1ui, rc); glFinish(); glPolygonMode(GL_FRONT, GL_FILL); /* render */ glBegin(GL_QUADS); glTexCoord2i(0, 0); glVertex2i(0, 0); //glTexCoord2i(obj->tex_size, 0); glTexCoord2i(1, 0); glVertex2i(obj->tex_size, 0); //glTexCoord2i(obj->tex_size, obj->tex_size); glTexCoord2i(1, 1); glVertex2i(obj->tex_size, obj->tex_size); glTexCoord2i(0, 1); //glTexCoord2i(0, obj->tex_size); glVertex2i(0, obj->tex_size); glEnd(); glFinish(); TEATIME_BREAKONERROR_FB(Rendering, rc); TEATIME_BREAKONERROR(Rendering, rc); rc = 0; } while (0); return rc; } return -EINVAL; } void teatime_delete_textures(teatime_t *obj) { if (obj) { if (obj->itexid != 0) { glDeleteTextures(1, &(obj->itexid)); obj->itexid = 0; } if (obj->otexid != 0) { glDeleteTextures(1, &(obj->otexid)); obj->otexid = 0; } } } void teatime_delete_program(teatime_t *obj) { if (obj) { if (obj->shader > 0 && obj->program > 0) { glDetachShader(obj->program, obj->shader); } if (obj->shader > 0) glDeleteShader(obj->shader); if (obj->program > 0) glDeleteProgram(obj->program); obj->shader = 0; obj->program = 0; } } void teatime_print_version(FILE *fp) { const GLubyte *version = NULL; version = glGetString(GL_VERSION); fprintf(fp, ""GL Version: %s\n"", (const char *)version); version = glGetString(GL_SHADING_LANGUAGE_VERSION); fprintf(fp, ""GLSL Version: %s\n"", (const char *)version); version = glGetString(GL_VENDOR); fprintf(fp, ""GL Vendor: %s\n"", (const char *)version); } int teatime_check_gl_version(uint32_t *major, uint32_t *minor) { const GLubyte *version = NULL; version = glGetString(GL_VERSION); if (version) { uint32_t ver[2] = { 0, 0 }; char *endp = NULL; char *endp2 = NULL; errno = 0; ver[0] = strtol((const char *)version, &endp, 10); if (errno == ERANGE || (const void *)endp == (const void *)version) { fprintf(stderr, ""Version string %s cannot be parsed\n"", (const char *)version); return -1; } /* endp[0] = '.' and endp[1] points to minor */ errno = 0; ver[1] = strtol((const char *)&endp[1], &endp2, 10); if (errno == ERANGE || endp2 == &endp[1]) { fprintf(stderr, ""Version string %s cannot be parsed\n"", (const char *)version); return -1; } if (major) *major = ver[0]; if (minor) *minor = ver[1]; return 0; } return -1; } int teatime_check_gl_errors(int line, const char *fn_name) { GLenum err = glGetError(); if (err != GL_NO_ERROR) { const GLubyte *estr = gluErrorString(err); fprintf(stderr, ""%s(): GL Error(%d) on line %d: %s\n"", fn_name, err, line, (const char *)estr); return -1; } return 0; } int teatime_check_gl_fb_errors(int line, const char *fn_name) { GLenum st = (GLenum)glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); switch (st) { case GL_FRAMEBUFFER_COMPLETE_EXT: return 0; case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: fprintf(stderr, ""%s(): GL FB error on line %d: incomplete attachment\n"", fn_name, line); break; case GL_FRAMEBUFFER_UNSUPPORTED_EXT: fprintf(stderr, ""%s(): GL FB error on line %d: unsupported\n"", fn_name, line); break; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: fprintf(stderr, ""%s(): GL FB error on line %d: incomplete missing attachment\n"", fn_name, line); break; case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT: fprintf(stderr, ""%s(): GL FB error on line %d: incomplete dimensions\n"", fn_name, line); break; case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT: fprintf(stderr, ""%s(): GL FB error on line %d: incomplete formats\n"", fn_name, line); break; case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: fprintf(stderr, ""%s(): GL FB error on line %d: incomplete draw buffer\n"", fn_name, line); break; case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: fprintf(stderr, ""%s(): GL FB error on line %d: incomplete read buffer\n"", fn_name, line); break; default: fprintf(stderr, ""%s(): GL FB error on line %d: Unknown. Error Value: %d\n"", fn_name, line, st); break; } return -1; } int teatime_check_program_errors(GLuint program) { GLint ilen = 0; glGetProgramiv(program, GL_INFO_LOG_LENGTH, &ilen); if (ilen > 1) { GLsizei wb = 0; GLchar *buf = calloc(ilen, sizeof(GLchar)); if (!buf) { fprintf(stderr, ""Out of memory allocating %d bytes\n"", ilen); return -ENOMEM; } glGetProgramInfoLog(program, ilen, &wb, buf); buf[wb] = '\0'; fprintf(stderr, ""Program Errors:\n%s\n"", (const char *)buf); free(buf); } return 0; } int teatime_check_shader_errors(GLuint shader) { GLint ilen = 0; glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &ilen); if (ilen > 1) { GLsizei wb = 0; GLchar *buf = calloc(ilen, sizeof(GLchar)); if (!buf) { fprintf(stderr, ""Out of memory allocating %d bytes\n"", ilen); return -ENOMEM; } glGetShaderInfoLog(shader, ilen, &wb, buf); buf[wb] = '\0'; fprintf(stderr, ""Shader Errors:\n%s\n"", (const char *)buf); free(buf); } return 0; } #define TEA_ENCRYPT_SOURCE \ ""#version 130\n"" \ ""#extension GL_EXT_gpu_shader4 : enable\n"" \ ""uniform usampler2D idata;\n"" \ ""uniform uvec4 ikey; \n"" \ ""uniform uint rounds; \n"" \ ""out uvec4 odata; \n"" \ ""void main(void) {\n"" \ "" uvec4 x = texture(idata, gl_TexCoord[0].st);\n"" \ "" uint delta = uint(0x9e3779b9); \n"" \ "" uint sum = uint(0); \n"" \ "" for (uint i = uint(0); i < rounds; ++i) {\n"" \ "" sum += delta; \n"" \ "" x[0] += (((x[1] << 4) + ikey[0]) ^ (x[1] + sum)) ^ ((x[1] >> 5) + ikey[1]);\n"" \ "" x[1] += (((x[0] << 4) + ikey[2]) ^ (x[0] + sum)) ^ ((x[0] >> 5) + ikey[3]);\n"" \ "" x[2] += (((x[3] << 4) + ikey[0]) ^ (x[3] + sum)) ^ ((x[3] >> 5) + ikey[1]);\n"" \ "" x[3] += (((x[2] << 4) + ikey[2]) ^ (x[2] + sum)) ^ ((x[2] >> 5) + ikey[3]);\n"" \ "" }\n"" \ "" odata = x; \n"" \ ""}\n"" #define TEA_DECRYPT_SOURCE \ ""#version 130\n"" \ ""#extension GL_EXT_gpu_shader4 : enable\n"" \ ""uniform usampler2D idata;\n"" \ ""uniform uvec4 ikey; \n"" \ ""uniform uint rounds; \n"" \ ""out uvec4 odata; \n"" \ ""void main(void) {\n"" \ "" uvec4 x = texture(idata, gl_TexCoord[0].st);\n"" \ "" uint delta = uint(0x9e3779b9); \n"" \ "" uint sum = delta * rounds; \n"" \ "" for (uint i = uint(0); i < rounds; ++i) {\n"" \ "" x[1] -= (((x[0] << 4) + ikey[2]) ^ (x[0] + sum)) ^ ((x[0] >> 5) + ikey[3]);\n"" \ "" x[0] -= (((x[1] << 4) + ikey[0]) ^ (x[1] + sum)) ^ ((x[1] >> 5) + ikey[1]);\n"" \ "" x[3] -= (((x[2] << 4) + ikey[2]) ^ (x[2] + sum)) ^ ((x[2] >> 5) + ikey[3]);\n"" \ "" x[2] -= (((x[3] << 4) + ikey[0]) ^ (x[3] + sum)) ^ ((x[3] >> 5) + ikey[1]);\n"" \ "" sum -= delta; \n"" \ "" }\n"" \ "" odata = x; \n"" \ ""}\n"" const char *teatime_encrypt_source() { return TEA_ENCRYPT_SOURCE; } const char *teatime_decrypt_source() { return TEA_DECRYPT_SOURCE; } ",0 " // arrays need to be treated separately (due to PHP bug?) // http://bugs.php.net/bug.php?id=52133 } elseif (is_array($objectOrArray)) { $property = $this->elements[$i]; if (!array_key_exists($property, $objectOrArray)) { $objectOrArray[$property] = $i + 1 < $this->length ? array() : null; } $value =& $objectOrArray[$property]; } else { throw new UnexpectedTypeException($objectOrArray, 'object or array'); } $objectOrArray =& $value; } return $value;",0 "task.get_category_display }} {% endif %} {% if task.text %}
        Message
        {{task.text}}
        {% endif %} {% if task.user %}
        User
        {{task.user.profile.full_name}}
        {% endif %} {% if task.foia %}
        Request
        {{task.foia}} (admin) - MR #{{task.foia.pk}}
        {% elif task.agency %}
        Agency
        {{task.agency}}
        {% elif task.jurisdiction %}
        Jurisdiction
        {{task.jurisdiction}}
        {% endif %}

        ↵ Reply to {{task.user.profile.full_name}} <{{task.user.email}}>

        {% csrf_token %} {{ flag_form.text }}
        {% endblock %} ",0 "/* * Sanitized this header file to fix * 32-64 bit interaction issues between * client-core and device */ struct pvfs2_io_request_t { int32_t async_vfs_io; int32_t buf_index; int32_t count; int32_t __pad1; int64_t offset; struct pvfs2_object_kref refn; enum PVFS_io_type io_type; int32_t readahead_size; }; struct pvfs2_iox_request_t { int32_t buf_index; int32_t count; struct pvfs2_object_kref refn; enum PVFS_io_type io_type; int32_t __pad1; }; struct pvfs2_lookup_request_t { int32_t sym_follow; int32_t __pad1; struct pvfs2_object_kref parent_refn; char d_name[PVFS2_NAME_LEN]; }; struct pvfs2_create_request_t { struct pvfs2_object_kref parent_refn; struct PVFS_sys_attr_s attributes; char d_name[PVFS2_NAME_LEN]; }; struct pvfs2_symlink_request_t { struct pvfs2_object_kref parent_refn; struct PVFS_sys_attr_s attributes; char entry_name[PVFS2_NAME_LEN]; char target[PVFS2_NAME_LEN]; }; struct pvfs2_getattr_request_t { struct pvfs2_object_kref refn; uint32_t mask; uint32_t __pad1; }; struct pvfs2_setattr_request_t { struct pvfs2_object_kref refn; struct PVFS_sys_attr_s attributes; }; struct pvfs2_remove_request_t { struct pvfs2_object_kref parent_refn; char d_name[PVFS2_NAME_LEN]; }; struct pvfs2_mkdir_request_t { struct pvfs2_object_kref parent_refn; struct PVFS_sys_attr_s attributes; char d_name[PVFS2_NAME_LEN]; }; struct pvfs2_readdir_request_t { struct pvfs2_object_kref refn; uint64_t token; int32_t max_dirent_count; int32_t buf_index; }; struct pvfs2_readdirplus_request_t { struct pvfs2_object_kref refn; uint64_t token; int32_t max_dirent_count; uint32_t mask; int32_t buf_index; int32_t __pad1; }; struct pvfs2_rename_request_t { struct pvfs2_object_kref old_parent_refn; struct pvfs2_object_kref new_parent_refn; char d_old_name[PVFS2_NAME_LEN]; char d_new_name[PVFS2_NAME_LEN]; }; struct pvfs2_statfs_request_t { int32_t fs_id; int32_t __pad1; }; struct pvfs2_truncate_request_t { struct pvfs2_object_kref refn; int64_t size; }; struct pvfs2_mmap_ra_cache_flush_request_t { struct pvfs2_object_kref refn; }; struct pvfs2_fs_mount_request_t { char pvfs2_config_server[PVFS_MAX_SERVER_ADDR_LEN]; }; struct pvfs2_fs_umount_request_t { int32_t id; int32_t fs_id; char pvfs2_config_server[PVFS_MAX_SERVER_ADDR_LEN]; }; struct pvfs2_getxattr_request_t { struct pvfs2_object_kref refn; int32_t key_sz; int32_t __pad1; char key[PVFS_MAX_XATTR_NAMELEN]; }; struct pvfs2_setxattr_request_t { struct pvfs2_object_kref refn; struct PVFS_keyval_pair keyval; int32_t flags; int32_t __pad1; }; struct pvfs2_listxattr_request_t { struct pvfs2_object_kref refn; int32_t requested_count; int32_t __pad1; uint64_t token; }; struct pvfs2_removexattr_request_t { struct pvfs2_object_kref refn; int32_t key_sz; int32_t __pad1; char key[PVFS_MAX_XATTR_NAMELEN]; }; struct pvfs2_op_cancel_t { uint64_t op_tag; }; struct pvfs2_fsync_request_t { struct pvfs2_object_kref refn; }; enum pvfs2_param_request_type { PVFS2_PARAM_REQUEST_SET = 1, PVFS2_PARAM_REQUEST_GET = 2 }; enum pvfs2_param_request_op { PVFS2_PARAM_REQUEST_OP_ACACHE_TIMEOUT_MSECS = 1, PVFS2_PARAM_REQUEST_OP_ACACHE_HARD_LIMIT = 2, PVFS2_PARAM_REQUEST_OP_ACACHE_SOFT_LIMIT = 3, PVFS2_PARAM_REQUEST_OP_ACACHE_RECLAIM_PERCENTAGE = 4, PVFS2_PARAM_REQUEST_OP_PERF_TIME_INTERVAL_SECS = 5, PVFS2_PARAM_REQUEST_OP_PERF_HISTORY_SIZE = 6, PVFS2_PARAM_REQUEST_OP_PERF_RESET = 7, PVFS2_PARAM_REQUEST_OP_NCACHE_TIMEOUT_MSECS = 8, PVFS2_PARAM_REQUEST_OP_NCACHE_HARD_LIMIT = 9, PVFS2_PARAM_REQUEST_OP_NCACHE_SOFT_LIMIT = 10, PVFS2_PARAM_REQUEST_OP_NCACHE_RECLAIM_PERCENTAGE = 11, PVFS2_PARAM_REQUEST_OP_STATIC_ACACHE_TIMEOUT_MSECS = 12, PVFS2_PARAM_REQUEST_OP_STATIC_ACACHE_HARD_LIMIT = 13, PVFS2_PARAM_REQUEST_OP_STATIC_ACACHE_SOFT_LIMIT = 14, PVFS2_PARAM_REQUEST_OP_STATIC_ACACHE_RECLAIM_PERCENTAGE = 15, PVFS2_PARAM_REQUEST_OP_CLIENT_DEBUG = 16, PVFS2_PARAM_REQUEST_OP_CCACHE_TIMEOUT_SECS = 17, PVFS2_PARAM_REQUEST_OP_CCACHE_HARD_LIMIT = 18, PVFS2_PARAM_REQUEST_OP_CCACHE_SOFT_LIMIT = 19, PVFS2_PARAM_REQUEST_OP_CCACHE_RECLAIM_PERCENTAGE = 20 }; struct pvfs2_param_request_t { enum pvfs2_param_request_type type; enum pvfs2_param_request_op op; int64_t value; char s_value[PVFS2_MAX_DEBUG_STRING_LEN]; }; enum pvfs2_perf_count_request_type { PVFS2_PERF_COUNT_REQUEST_ACACHE = 1, PVFS2_PERF_COUNT_REQUEST_NCACHE = 2, PVFS2_PERF_COUNT_REQUEST_STATIC_ACACHE = 3, }; struct pvfs2_perf_count_request_t { enum pvfs2_perf_count_request_type type; int32_t __pad1; }; struct pvfs2_fs_key_request_t { int32_t fsid; int32_t __pad1; }; /* typedef pvfs2_upcall_t exposed to client-core (userland) */ typedef struct pvfs2_upcall_s { int32_t type; uint32_t uid; uint32_t gid; int pid; int tgid; /* currently trailer is used only by readx/writex (iox) */ int64_t trailer_size; PVFS2_ALIGN_VAR(char *, trailer_buf); union { struct pvfs2_io_request_t io; struct pvfs2_iox_request_t iox; struct pvfs2_lookup_request_t lookup; struct pvfs2_create_request_t create; struct pvfs2_symlink_request_t sym; struct pvfs2_getattr_request_t getattr; struct pvfs2_setattr_request_t setattr; struct pvfs2_remove_request_t remove; struct pvfs2_mkdir_request_t mkdir; struct pvfs2_readdir_request_t readdir; struct pvfs2_readdirplus_request_t readdirplus; struct pvfs2_rename_request_t rename; struct pvfs2_statfs_request_t statfs; struct pvfs2_truncate_request_t truncate; struct pvfs2_mmap_ra_cache_flush_request_t ra_cache_flush; struct pvfs2_fs_mount_request_t fs_mount; struct pvfs2_fs_umount_request_t fs_umount; struct pvfs2_getxattr_request_t getxattr; struct pvfs2_setxattr_request_t setxattr; struct pvfs2_listxattr_request_t listxattr; struct pvfs2_removexattr_request_t removexattr; struct pvfs2_op_cancel_t cancel; struct pvfs2_fsync_request_t fsync; struct pvfs2_param_request_t param; struct pvfs2_perf_count_request_t perf_count; struct pvfs2_fs_key_request_t fs_key; } req; } pvfs2_upcall_t; #endif /* __UPCALL_H */ ",0 "nce 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. */ package com.gs.fw.common.mithra.test.domain; public class GsDeskDatabaseObject extends GsDeskDatabaseObjectAbstract { } ",0 "t; import net.rlviana.pricegrabber.model.entity.AbstractReadOnlyEntityTest; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.TransactionConfiguration; import org.springframework.transaction.annotation.Transactional; /** * @author ramon */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {JPAPersistenceContext.class}) @TransactionConfiguration(transactionManager = ""transactionManager"", defaultRollback = false) @Transactional public class CurrencyTest extends AbstractReadOnlyEntityTest { private static final Logger LOGGER = LoggerFactory.getLogger(CurrencyTest.class); @Test public void testFindAll() { } @Test public void testFindByCriteria() { } /** * @return * @see net.rlviana.pricegrabber.model.entity.AbstractReadOnlyEntityTest#getEntityPKFindOK() */ @Override protected String getEntityPKFindOK() { return ""EU""; } /** * @return * @see net.rlviana.pricegrabber.model.entity.AbstractReadOnlyEntityTest#getEntityPKFindKO() */ @Override protected String getEntityPKFindKO() { return ""NEU""; } /** * @return * @see net.rlviana.pricegrabber.model.entity.AbstractReadOnlyEntityTest#getTestClass() */ @Override protected Class getTestClass() { return Currency.class; } } ",0 "1 // | Site: http://www.hdphp.com // |----------------------------------------------------------------------------------- // | Author: 向军 // | Copyright (c) 2012-2013, http://houdunwang.com. All Rights Reserved. // |----------------------------------------------------------------------------------- // | License: http://www.apache.org/licenses/LICENSE-2.0 // '----------------------------------------------------------------------------------- /** * 上传处理类 * @package tools_class * @author 后盾向军 */ class Upload { //上传类型 public $ext = array(); //上传文件大小 public $size; //上传路径 public $path; //错误信息 public $error; //缩略图处理 public $thumbOn; //缩略图参数 public $thumb = array(); //是否加水印 public $waterMarkOn; //上传成功文件信息 public $uploadedFile = array(); /** * 构造函数 * @param string $path 上传路径 * @param array $ext 允许的文件类型,传入数组如array('jpg','jpeg','png','doc') * @param array $size 允许上传大小,如array('jpg'=>200000,'rar'=>'39999') 如果不设置系统会依据配置项C(""UPLOAD_EXT_SIZE"")值 * @param bool $waterMarkOn 是否加水印 * @param bool $thumbOn 是否生成缩略图 * @param array $thumb 缩略图处理参数 只接收3个参数 1缩略图宽度 2缩略图高度 3缩略图生成规则 */ public function __construct($path = '', $ext = array(), $size = array(), $waterMarkOn = null, $thumbOn = null, $thumb = array()) { $path = empty($path) ? C(""UPLOAD_PATH"") : $path; //上传路径 $this->path = rtrim(str_replace('\\', '/', $path), '/') . '/'; $_ext = empty($ext) ? array_keys(C(""UPLOAD_EXT_SIZE"")) : $ext; //上传类型 foreach ($_ext as $v) { $this->ext[] = strtoupper($v); } $this->size = $size ? $size : array_change_key_case_d(C(""UPLOAD_EXT_SIZE""), 1); $this->waterMarkOn = is_null($waterMarkOn) ? C(""WATER_ON"") : $waterMarkOn; $this->thumbOn = is_null($thumbOn) ? C(""UPLOAD_THUMB_ON"") : $thumbOn; $this->thumb = $thumb; } /** * 将$_FILES中的文件上传到服务器 * 可以只上传$_FILES中的一个文件 * @param null $fieldName 上传的图片name名 * @return array|bool * * 示例1: * $upload= new Upload(); * $upload->upload(); * 示例2: * $upload= new Upload(); * $upload->upload(""pic""); * */ public function upload($fieldName = null) { if (!$this->checkDir($this->path)) { $this->error = $this->path . '图片上传目录创建失败或不可写'; return false; } $files = $this->format($fieldName); //验证文件 foreach ($files as $v) { $info = pathinfo($v ['name']); $v [""ext""] = isset($info [""extension""]) ? $info['extension'] : ''; $v['filename'] = isset($info['filename']) ? $info['filename'] : ''; if (!$this->checkFile($v)) { continue; } $uploadedFile = $this->save($v); if ($uploadedFile) { $this->uploadedFile [] = $uploadedFile; } } return $this->uploadedFile; } /** * 储存文件 * @param string $file 储存的文件 * @return boolean */ private function save($file) { $is_img = 0; $uploadFileName = mt_rand(1, 9999) . time() . ""."" . $file['ext']; $filePath = $this->path . $uploadFileName; if (in_array(strtolower($file ['ext']), array(""jpeg"", ""jpg"", ""bmp"", ""gif"", ""png"")) && getimagesize($file ['tmp_name'])) { $imgDir = C(""UPLOAD_IMG_DIR"") ? C(""UPLOAD_IMG_DIR"") . ""/"" : """"; $filePath = $this->path . $imgDir . $uploadFileName; if (!$this->checkDir($this->path . $imgDir)) { $this->error = '图片上传目录创建失败或不可写'; return false; } $is_img = 1; } if (!move_uploaded_file($file ['tmp_name'], $filePath)) { $this->error('移动临时文件失败'); return false; } if (!$is_img) { $filePath = ltrim(str_replace(ROOT_PATH, '', $filePath), '/'); $arr = array(""path"" => $filePath, 'fieldname' => $file['fieldname'], 'image' => 0); } else { //处理图像类型文件 $img = new image (); $imgInfo = getimagesize($filePath); //对原图进行缩放 if (C(""UPLOAD_IMG_RESIZE_ON"") && ($imgInfo[0] > C(""UPLOAD_IMG_MAX_WIDTH"") || $imgInfo[1] > C(""UPLOAD_IMG_MAX_HEIGHT""))) { $img->thumb($filePath, $uploadFileName, C(""UPLOAD_IMG_MAX_WIDTH""), C(""UPLOAD_IMG_MAX_HEIGHT""), 5, $this->path); } //生成缩略图 if ($this->thumbOn) { $args = array(); if (empty($this->thumb)) { array_unshift($args, $filePath); } else { array_unshift($args, $filePath, """", """"); $args = array_merge($args, $this->thumb); } $thumbFile = call_user_func_array(array($img, ""thumb""), $args); } //加水印 if ($this->waterMarkOn) { $img->water($filePath); } $filePath = trim(str_replace(ROOT_PATH, '', $filePath), '/'); if ($this->thumbOn) { $thumbFile = trim(str_replace(ROOT_PATH, '', $thumbFile), '/'); $arr = array(""path"" => $filePath, ""thumb"" => $thumbFile, 'fieldname' => $file['fieldname'], 'image' => 1); } else { $arr = array(""path"" => $filePath, 'fieldname' => $file['fieldname'], 'image' => 1); } } $arr['path'] = preg_replace('@\./@', '', $arr['path']); //上传时间 $arr['uptime'] = time(); $info = pathinfo($filePath); $arr['fieldname'] = $file['fieldname']; $arr['basename'] = $info['basename']; $arr['filename'] = $info['filename'];//新文件名 $arr['name'] = $file['filename'];//旧文件名 $arr['size'] = $file['size']; $arr['ext'] = $file['ext']; $dir= str_ireplace(""\\"", ""/"", dirname($arr['path'])); $arr['dir']=substr($dir, ""-1"") == ""/"" ? $dir : $dir . ""/""; return $arr; } //将上传文件整理为标准数组 private function format($fieldName) { if ($fieldName == null) { $files = $_FILES; } else if (isset($_FILES[$fieldName])) { $files[$fieldName] = $_FILES[$fieldName]; } if (!isset($files)) { $this->error = '没有任何文件上传'; return false; } $info = array(); $n = 0; foreach ($files as $name => $v) { if (is_array($v ['name'])) { $count = count($v ['name']); for ($i = 0; $i < $count; $i++) { foreach ($v as $m => $k) { $info [$n] [$m] = $k [$i]; } $info [$n] ['fieldname'] = $name; //字段名 $n++; } } else { $info [$n] = $v; $info [$n] ['fieldname'] = $name; //字段名 $n++; } } return $info; } /** * 验证目录 * @param string $path 目录 * @return bool */ private function checkDir($path) { return Dir::create($path) && is_writeable($path) ? true : false; } private function checkFile($file) { if ($file ['error'] != 0) { $this->error($file ['error']); return false; } $ext = strtoupper($file ['ext']); $ext_size = is_array($this->size) && isset($this->size[$ext]) ? $this->size[$ext] : $this->size; if (!in_array($ext, $this->ext)) { $this->error = '文件类型不允许'; return false; } if (strstr(strtolower($file['type']), ""image"") && !getimagesize($file['tmp_name'])) { $this->error = '上传内容不是一个合法图片'; return false; } if ($file ['size'] > $ext_size) { $this->error = '上传文件大于' . get_size($ext_size); return false; } if (!is_uploaded_file($file ['tmp_name'])) { $this->error = '非法文件'; return false; } return true; } private function error($error) { switch ($error) { case UPLOAD_ERR_INI_SIZE : $this->error = '上传文件超过PHP.INI配置文件允许的大小'; break; case UPLOAD_ERR_FORM_SIZE : $this->error = '文件超过表单限制大小'; break; case UPLOAD_ERR_PARTIAL : $this->error = '文件只上有部分上传'; break; case UPLOAD_ERR_NO_FILE : $this->error = '没有上传文件'; break; case UPLOAD_ERR_NO_TMP_DIR : $this->error = '没有上传临时文件夹'; break; case UPLOAD_ERR_CANT_WRITE : $this->error = '写入临时文件夹出错'; break; } } /** * 返回上传时发生的错误原因 * @return string */ public function getError() { return $this->error; } }",0 "named Project : Detail view of glyphicons-halflings-regular.svg
        [ Index ]

        PHP Cross Reference of Unnamed Project

        title

        Body

        [close]

        /rsc/fonts/bootstrap/ -> glyphicons-halflings-regular.svg (summary)

        [Source view] [Print] [Project Stats]

        (no description)

        File Size: 288 lines (109 kb)
        Included or required:0 times
        Referenced: 0 times
        Includes or requires: 0 files



        Generated: Sat Nov 21 22:13:19 2015 Cross-referenced by PHPXref 0.7.1
        ",0 "
        Image""; ?>
        $naslov""; ?> ""; echo """"; echo """"; echo """"; $datum = $row['PocetakPrikazivanja']; echo """"; echo """"; echo """"; echo """"; $duzina = $row['Duzina']; echo """"; echo """"; echo """"; echo """"; $zanr = $row['Zanr']; echo """"; echo """"; echo """"; echo """"; $reziser = $row['Reziser']; echo """"; echo """"; echo """"; echo """"; $poreklo = $row['Poreklo']; echo """"; echo """"; echo """"; echo """"; ?>
        Ocena ""; for($k=0; $k<10; $k++){ if($k < $ocena) echo """"; else echo """"; } echo """"; ?>
        Originalni naslov$original
        Pocetak prikazivanja$datum
        Duzina trajanja$duzina min
        Zanr$zanr
        Reziser$reziser
        Drzava$poreklo

        ",0 "> {% block meta %} {% if site_settings.logo %}{% endif %} {% endblock meta %} {% block title %}{{ site_settings.site.name }}{% endblock title %} {% block styles %} {#% compress css %#} {% if site_settings.css %} {% endif %} {% if site_settings.background %} {% endif %} {#% endcompress %#} {% endblock %} {% block scripts %} {#% compress js %#} {% if GOOGLE_ANALYTICS_UA %} {% endif %} {#% endcompress %#} {% endblock %} {% url 'localtv_index' as localtv_index %}
        {% block header %} {% include ""localtv/_site_header_small.html"" %} {% endblock %}
        {% block content %} {% endblock %}
        {% include ""localtv/_site_footer.html"" %}
        {# /#container #} {% if ""MSIE 6"" in request.META.HTTP_USER_AGENT or ""MSIE 7"" in request.META.HTTP_USER_AGENT %} {% if not ""chromeframe"" in request.META.HTTP_USER_AGENT %} {% endif %} {% endif %} ",0 "idden_tag() }}

        Descriptive Name: {{ form.descriptive_name(size = 50) }} {% for error in form.descriptive_name.errors %} [{{error}}] {% endfor %}

        Table Name: {{ form.table_name(size = 30) }} {% for error in form.table_name.errors %} [{{error}}] {% endfor %}

        | |

        {% endblock %} ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.flink.streaming.kafka.test.base; import org.apache.flink.api.common.restartstrategy.RestartStrategies; import org.apache.flink.api.java.utils.ParameterTool; import org.apache.flink.streaming.api.TimeCharacteristic; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; /** * The util class for kafka example. */ public class KafkaExampleUtil { public static StreamExecutionEnvironment prepareExecutionEnv(ParameterTool parameterTool) throws Exception { if (parameterTool.getNumberOfParameters() < 5) { System.out.println(""Missing parameters!\n"" + ""Usage: Kafka --input-topic --output-topic "" + ""--bootstrap.servers "" + ""--group.id ""); throw new Exception(""Missing parameters!\n"" + ""Usage: Kafka --input-topic --output-topic "" + ""--bootstrap.servers "" + ""--group.id ""); } StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.getConfig().setRestartStrategy(RestartStrategies.fixedDelayRestart(4, 10000)); env.enableCheckpointing(5000); // create a checkpoint every 5 seconds env.getConfig().setGlobalJobParameters(parameterTool); // make parameters available in the web interface env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime); return env; } } ",0 "essed directly. defined( 'ABSPATH' ) || exit; /** UTILITY **************************************************************/ /** * Return the starred messages slug. Defaults to 'starred'. * * @since 2.3.0 * * @return string */ function bp_get_messages_starred_slug() { /** * Filters the starred message slug. * * @since 2.3.0 * * @param string */ return sanitize_title( apply_filters( 'bp_get_messages_starred_slug', 'starred' ) ); } /** * Function to determine if a message ID is starred. * * @since 2.3.0 * * @param int $mid The message ID. Please note that this isn't the message thread ID. * @param int $user_id The user ID. * @return bool */ function bp_messages_is_message_starred( $mid = 0, $user_id = 0 ) { if ( empty( $user_id ) ) { $user_id = bp_displayed_user_id(); } if ( empty( $mid ) ) { return false; } $starred = array_flip( (array) bp_messages_get_meta( $mid, 'starred_by_user', false ) ); if ( isset( $starred[$user_id] ) ) { return true; } else { return false; } } /** * Output the link or raw URL for starring or unstarring a message. * * @since 2.3.0 * * @param array $args See bp_get_the_message_star_action_link() for full documentation. */ function bp_the_message_star_action_link( $args = array() ) { echo bp_get_the_message_star_action_link( $args ); } /** * Return the link or raw URL for starring or unstarring a message. * * @since 2.3.0 * * @param array $args { * Array of arguments. * @type int $user_id The user ID. Defaults to the logged-in user ID. * @type int $thread_id The message thread ID. Default: 0. If not zero, this takes precedence over * $message_id. * @type int $message_id The individual message ID. If on a single thread page, defaults to the * current message ID in the message loop. * @type bool $url_only Whether to return the URL only. If false, returns link with markup. * Default: false. * @type string $text_unstar Link text for the 'unstar' action. Only applicable if $url_only is false. * @type string $text_star Link text for the 'star' action. Only applicable if $url_only is false. * @type string $title_unstar Link title for the 'unstar' action. Only applicable if $url_only is false. * @type string $title_star Link title for the 'star' action. Only applicable if $url_only is false. * @type string $title_unstar_thread Link title for the 'unstar' action when displayed in a thread loop. * Only applicable if $message_id is set and if $url_only is false. * @type string $title_star_thread Link title for the 'star' action when displayed in a thread loop. * Only applicable if $message_id is set and if $url_only is false. * } * @return string */ function bp_get_the_message_star_action_link( $args = array() ) { // Default user ID. $user_id = bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id(); $r = bp_parse_args( $args, array( 'user_id' => (int) $user_id, 'thread_id' => 0, 'message_id' => (int) bp_get_the_thread_message_id(), 'url_only' => false, 'text_unstar' => __( 'Unstar', 'buddypress' ), 'text_star' => __( 'Star', 'buddypress' ), 'title_unstar' => __( 'Starred', 'buddypress' ), 'title_star' => __( 'Not starred', 'buddypress' ), 'title_unstar_thread' => __( 'Remove all starred messages in this thread', 'buddypress' ), 'title_star_thread' => __( 'Star the first message in this thread', 'buddypress' ), ), 'messages_star_action_link' ); // Check user ID and determine base user URL. switch ( $r['user_id'] ) { // Current user. case bp_loggedin_user_id() : $user_domain = bp_loggedin_user_domain(); break; // Displayed user. case bp_displayed_user_id() : $user_domain = bp_displayed_user_domain(); break; // Empty or other. default : $user_domain = bp_core_get_user_domain( $r['user_id'] ); break; } // Bail if no user domain was calculated. if ( empty( $user_domain ) ) { return ''; } // Define local variables. $retval = $bulk_attr = ''; // Thread ID. if ( (int) $r['thread_id'] > 0 ) { // See if we're in the loop. if ( bp_get_message_thread_id() == $r['thread_id'] ) { // Grab all message ids. $mids = wp_list_pluck( $GLOBALS['messages_template']->thread->messages, 'id' ); // Make sure order is ASC. // Order is DESC when used in the thread loop by default. $mids = array_reverse( $mids ); // Pull up the thread. } else { $thread = new BP_Messages_Thread( $r['thread_id'] ); $mids = wp_list_pluck( $thread->messages, 'id' ); } $is_starred = false; $message_id = 0; foreach ( $mids as $mid ) { // Try to find the first msg that is starred in a thread. if ( true === bp_messages_is_message_starred( $mid ) ) { $is_starred = true; $message_id = $mid; break; } } // No star, so default to first message in thread. if ( empty( $message_id ) ) { $message_id = $mids[0]; } $message_id = (int) $message_id; // Nonce. $nonce = wp_create_nonce( ""bp-messages-star-{$message_id}"" ); if ( true === $is_starred ) { $action = 'unstar'; $bulk_attr = ' data-star-bulk=""1""'; $retval = $user_domain . bp_get_messages_slug() . '/unstar/' . $message_id . '/' . $nonce . '/all/'; } else { $action = 'star'; $retval = $user_domain . bp_get_messages_slug() . '/star/' . $message_id . '/' . $nonce . '/'; } $title = $r[""title_{$action}_thread""]; // Message ID. } else { $message_id = (int) $r['message_id']; $is_starred = bp_messages_is_message_starred( $message_id ); $nonce = wp_create_nonce( ""bp-messages-star-{$message_id}"" ); if ( true === $is_starred ) { $action = 'unstar'; $retval = $user_domain . bp_get_messages_slug() . '/unstar/' . $message_id . '/' . $nonce . '/'; } else { $action = 'star'; $retval = $user_domain . bp_get_messages_slug() . '/star/' . $message_id . '/' . $nonce . '/'; } $title = $r[""title_{$action}""]; } /** * Filters the star action URL for starring / unstarring a message. * * @since 2.3.0 * * @param string $retval URL for starring / unstarring a message. * @param array $r Parsed link arguments. See $args in bp_get_the_message_star_action_link(). */ $retval = esc_url( apply_filters( 'bp_get_the_message_star_action_urlonly', $retval, $r ) ); if ( true === (bool) $r['url_only'] ) { return $retval; } /** * Filters the star action link, including markup. * * @since 2.3.0 * * @param string $retval Link for starring / unstarring a message, including markup. * @param array $r Parsed link arguments. See $args in bp_get_the_message_star_action_link(). */ return apply_filters( 'bp_get_the_message_star_action_link', ' ' . $r['text_' . $action] . '', $r ); } /** * Save or delete star message meta according to a message's star status. * * @since 2.3.0 * * @param array $args { * Array of arguments. * @type string $action The star action. Either 'star' or 'unstar'. Default: 'star'. * @type int $thread_id The message thread ID. Default: 0. If not zero, this takes precedence over * $message_id. * @type int $message_id The indivudal message ID to star or unstar. Default: 0. * @type int $user_id The user ID. Defaults to the logged-in user ID. * @type bool $bulk Whether to mark all messages in a thread as a certain action. Only relevant * when $action is 'unstar' at the moment. Default: false. * } * @return bool */ function bp_messages_star_set_action( $args = array() ) { $r = wp_parse_args( $args, array( 'action' => 'star', 'thread_id' => 0, 'message_id' => 0, 'user_id' => bp_displayed_user_id(), 'bulk' => false ) ); // Set thread ID. if ( ! empty( $r['thread_id'] ) ) { $thread_id = (int) $r['thread_id']; } else { $thread_id = messages_get_message_thread_id( $r['message_id'] ); } if ( empty( $thread_id ) ) { return false; } // Check if user has access to thread. if( ! messages_check_thread_access( $thread_id, $r['user_id'] ) ) { return false; } $is_starred = bp_messages_is_message_starred( $r['message_id'], $r['user_id'] ); // Star. if ( 'star' == $r['action'] ) { if ( true === $is_starred ) { return true; } else { bp_messages_add_meta( $r['message_id'], 'starred_by_user', $r['user_id'] ); return true; } // Unstar. } else { // Unstar one message. if ( false === $r['bulk'] ) { if ( false === $is_starred ) { return true; } else { bp_messages_delete_meta( $r['message_id'], 'starred_by_user', $r['user_id'] ); return true; } // Unstar all messages in a thread. } else { $thread = new BP_Messages_Thread( $thread_id ); $mids = wp_list_pluck( $thread->messages, 'id' ); foreach ( $mids as $mid ) { if ( true === bp_messages_is_message_starred( $mid, $r['user_id'] ) ) { bp_messages_delete_meta( $mid, 'starred_by_user', $r['user_id'] ); } } return true; } } } /** SCREENS **************************************************************/ /** * Screen handler to display a user's ""Starred"" private messages page. * * @since 2.3.0 */ function bp_messages_star_screen() { add_action( 'bp_template_content', 'bp_messages_star_content' ); /** * Fires right before the loading of the ""Starred"" messages box. * * @since 2.3.0 */ do_action( 'bp_messages_screen_star' ); bp_core_load_template( 'members/single/plugins' ); } /** * Screen content callback to display a user's ""Starred"" messages page. * * @since 2.3.0 */ function bp_messages_star_content() { // Add our message thread filter. add_filter( 'bp_after_has_message_threads_parse_args', 'bp_messages_filter_starred_message_threads' ); // Load the message loop template part. bp_get_template_part( 'members/single/messages/messages-loop' ); // Remove our filter. remove_filter( 'bp_after_has_message_threads_parse_args', 'bp_messages_filter_starred_message_threads' ); } /** * Filter message threads by those starred by the logged-in user. * * @since 2.3.0 * * @param array $r Current message thread arguments. * @return array $r Array of starred message threads. */ function bp_messages_filter_starred_message_threads( $r = array() ) { $r['box'] = 'starred'; $r['meta_query'] = array( array( 'key' => 'starred_by_user', 'value' => $r['user_id'] ) ); return $r; } /** ACTIONS **************************************************************/ /** * Action handler to set a message's star status for those not using JS. * * @since 2.3.0 */ function bp_messages_star_action_handler() { if ( ! bp_is_user_messages() ) { return; } if ( false === ( bp_is_current_action( 'unstar' ) || bp_is_current_action( 'star' ) ) ) { return; } if ( ! wp_verify_nonce( bp_action_variable( 1 ), 'bp-messages-star-' . bp_action_variable( 0 ) ) ) { wp_die( ""Oops! That's a no-no!"" ); } // Check capability. if ( ! is_user_logged_in() || ! bp_core_can_edit_settings() ) { return; } // Mark the star. bp_messages_star_set_action( array( 'action' => bp_current_action(), 'message_id' => bp_action_variable(), 'bulk' => (bool) bp_action_variable( 2 ) ) ); // Redirect back to previous screen. $redirect = wp_get_referer() ? wp_get_referer() : bp_displayed_user_domain() . bp_get_messages_slug(); bp_core_redirect( $redirect ); die(); } add_action( 'bp_actions', 'bp_messages_star_action_handler' ); /** * Bulk manage handler to set the star status for multiple messages. * * @since 2.3.0 */ function bp_messages_star_bulk_manage_handler() { if ( empty( $_POST['messages_bulk_nonce' ] ) ) { return; } // Check the nonce. if ( ! wp_verify_nonce( $_POST['messages_bulk_nonce'], 'messages_bulk_nonce' ) ) { return; } // Check capability. if ( ! is_user_logged_in() || ! bp_core_can_edit_settings() ) { return; } $action = ! empty( $_POST['messages_bulk_action'] ) ? $_POST['messages_bulk_action'] : ''; $threads = ! empty( $_POST['message_ids'] ) ? $_POST['message_ids'] : ''; $threads = wp_parse_id_list( $threads ); // Bail if action doesn't match our star actions or no IDs. if ( false === in_array( $action, array( 'star', 'unstar' ), true ) || empty( $threads ) ) { return; } // It's star time! switch ( $action ) { case 'star' : $count = count( $threads ); // If we're starring a thread, we only star the first message in the thread. foreach ( $threads as $thread ) { $thread = new BP_Messages_thread( $thread ); $mids = wp_list_pluck( $thread->messages, 'id' ); bp_messages_star_set_action( array( 'action' => 'star', 'message_id' => $mids[0], ) ); } bp_core_add_message( sprintf( _n( '%s message was successfully starred', '%s messages were successfully starred', $count, 'buddypress' ), $count ) ); break; case 'unstar' : $count = count( $threads ); foreach ( $threads as $thread ) { bp_messages_star_set_action( array( 'action' => 'unstar', 'thread_id' => $thread, 'bulk' => true ) ); } bp_core_add_message( sprintf( _n( '%s message was successfully unstarred', '%s messages were successfully unstarred', $count, 'buddypress' ), $count ) ); break; } // Redirect back to message box. bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' ); die(); } add_action( 'bp_actions', 'bp_messages_star_bulk_manage_handler', 5 ); /** HOOKS ****************************************************************/ /** * Enqueues the dashicons font. * * The dashicons font is used for the star / unstar icon. * * @since 2.3.0 */ function bp_messages_star_enqueue_scripts() { if ( ! bp_is_user_messages() ) { return; } wp_enqueue_style( 'dashicons' ); } add_action( 'bp_enqueue_scripts', 'bp_messages_star_enqueue_scripts' ); /** * Add the ""Add star"" and ""Remove star"" options to the bulk management list. * * @since 2.3.0 */ function bp_messages_star_bulk_management_dropdown() { ?> Looking for: "" + componentType + "" on local port: "" + CommunicationDock.Stem_Broadcast_Port + ""\n\t|-> With packet: "" + packet; } public static LocalHostSeek getInstance() { if (uniqueInstance == null) { synchronized (LocalNetworkSeek.class) { if (uniqueInstance == null) { uniqueInstance = new LocalHostSeek(); } } } return uniqueInstance; } } ",0 "ily: Ahem; font-size: 1em; line-height: 1em; } fieldset, form>div { padding: 0; margin: 10px; border: none; } textarea, div div { color: black; background: lime; padding: 2em; margin: 0; border: none; width: 1em; height: 1em; overflow: hidden; resize: none; }

        Ahem font required for this test

        there should be two identical patterns below

        x
        ",0 "ith 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. package com.google.api.ads.adwords.jaxws.v201809.cm; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * * Returns a list of CampaignSharedSets based on the given selector. * @param selector the selector specifying the query * @return a list of CampaignSharedSet entities that meet the criterion specified * by the selector * @throws ApiException * * *

        Java class for get element declaration. * *

        The following schema fragment specifies the expected content contained within this class. * *

         * <element name=""get"">
         *   <complexType>
         *     <complexContent>
         *       <restriction base=""{http://www.w3.org/2001/XMLSchema}anyType"">
         *         <sequence>
         *           <element name=""selector"" type=""{https://adwords.google.com/api/adwords/cm/v201809}Selector"" minOccurs=""0""/>
         *         </sequence>
         *       </restriction>
         *     </complexContent>
         *   </complexType>
         * </element>
         * 
        * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = """", propOrder = { ""selector"" }) @XmlRootElement(name = ""get"") public class CampaignSharedSetServiceInterfaceget { protected Selector selector; /** * Gets the value of the selector property. * * @return * possible object is * {@link Selector } * */ public Selector getSelector() { return selector; } /** * Sets the value of the selector property. * * @param value * allowed object is * {@link Selector } * */ public void setSelector(Selector value) { this.selector = value; } } ",0 "om.jetbrains.python.codeInsight; import com.intellij.lang.Language; import com.intellij.lang.injection.MultiHostRegistrar; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiComment; import com.intellij.psi.PsiElement; import com.intellij.util.containers.ContainerUtil; import com.jetbrains.python.PyNames; import com.jetbrains.python.psi.*; import com.jetbrains.python.psi.impl.PyCallExpressionNavigator; import one.util.streamex.StreamEx; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; import static com.jetbrains.python.PyStringFormatParser.*; /** * @author vlan */ public final class PyInjectionUtil { public static class InjectionResult { public static final InjectionResult EMPTY = new InjectionResult(false, true); private final boolean myInjected; private final boolean myStrict; public InjectionResult(boolean injected, boolean strict) { myInjected = injected; myStrict = strict; } public boolean isInjected() { return myInjected; } public boolean isStrict() { return myStrict; } public InjectionResult append(@NotNull InjectionResult result) { return new InjectionResult(myInjected || result.isInjected(), myStrict && result.isStrict()); } } public static final List> ELEMENTS_TO_INJECT_IN = ContainerUtil.immutableList(PyStringLiteralExpression.class, PyParenthesizedExpression.class, PyBinaryExpression.class, PyCallExpression.class, PsiComment.class); private PyInjectionUtil() {} /** * Returns the largest expression in the specified context that represents a string literal suitable for language injection, possibly * with concatenation, parentheses, or formatting. */ @Nullable public static PsiElement getLargestStringLiteral(@NotNull PsiElement context) { PsiElement element = null; for (PsiElement current = context; current != null && isStringLiteralPart(current, element); current = current.getParent()) { element = current; } return element; } /** * Registers language injections in the given registrar for the specified string literal element or its ancestor that contains * string concatenations or formatting. */ @NotNull public static InjectionResult registerStringLiteralInjection(@NotNull PsiElement element, @NotNull MultiHostRegistrar registrar, @NotNull Language language) { registrar.startInjecting(language); final InjectionResult result = processStringLiteral(element, registrar, """", """", Formatting.NONE); if (result.isInjected()) { registrar.doneInjecting(); } return result; } private static boolean isStringLiteralPart(@NotNull PsiElement element, @Nullable PsiElement context) { if (element == context || element instanceof PyStringLiteralExpression || element instanceof PsiComment) { return true; } else if (element instanceof PyParenthesizedExpression) { final PyExpression contained = ((PyParenthesizedExpression)element).getContainedExpression(); return contained != null && isStringLiteralPart(contained, context); } else if (element instanceof PyBinaryExpression) { final PyBinaryExpression expr = (PyBinaryExpression)element; final PyExpression left = expr.getLeftExpression(); final PyExpression right = expr.getRightExpression(); if (expr.isOperator(""+"")) { return isStringLiteralPart(left, context) || right != null && isStringLiteralPart(right, context); } else if (expr.isOperator(""%"")) { return right != context && isStringLiteralPart(left, context); } return false; } else if (element instanceof PyCallExpression) { final PyExpression qualifier = getFormatCallQualifier((PyCallExpression)element); return qualifier != null && isStringLiteralPart(qualifier, context); } else if (element instanceof PyReferenceExpression) { final PyCallExpression callExpr = PyCallExpressionNavigator.getPyCallExpressionByCallee(element); return callExpr != null && isStringLiteralPart(callExpr, context); } return false; } @Nullable private static PyExpression getFormatCallQualifier(@NotNull PyCallExpression element) { final PyExpression callee = element.getCallee(); if (callee instanceof PyQualifiedExpression) { final PyQualifiedExpression qualifiedExpr = (PyQualifiedExpression)callee; final PyExpression qualifier = qualifiedExpr.getQualifier(); if (qualifier != null && PyNames.FORMAT.equals(qualifiedExpr.getReferencedName())) { return qualifier; } } return null; } @NotNull private static InjectionResult processStringLiteral(@NotNull PsiElement element, @NotNull MultiHostRegistrar registrar, @NotNull String prefix, @NotNull String suffix, @NotNull Formatting formatting) { final String missingValue = ""missing_value""; if (element instanceof PyStringLiteralExpression) { boolean injected = false; boolean strict = true; final PyStringLiteralExpression expr = (PyStringLiteralExpression)element; for (PyStringElement stringElem : expr.getStringElements()) { final int nodeOffsetInParent = stringElem.getTextOffset() - expr.getTextRange().getStartOffset(); final TextRange contentRange = stringElem.getContentRange(); final int contentStartOffset = contentRange.getStartOffset(); if (formatting != Formatting.NONE || stringElem.isFormatted()) { // Each range is relative to the start of the string element final List subsRanges; if (formatting != Formatting.NONE) { final String content = stringElem.getContent(); subsRanges = StreamEx.of(formatting == Formatting.NEW_STYLE ? parseNewStyleFormat(content) : parsePercentFormat(content)) .select(SubstitutionChunk.class) .map(chunk -> chunk.getTextRange().shiftRight(contentStartOffset)) .toList(); } else { subsRanges = StreamEx.of(((PyFormattedStringElement)stringElem).getFragments()) .map(PsiElement::getTextRangeInParent) .toList(); } if (!subsRanges.isEmpty()) { strict = false; } final TextRange sentinel = TextRange.from(contentRange.getEndOffset(), 0); final List withSentinel = ContainerUtil.append(subsRanges, sentinel); int literalChunkStart = contentStartOffset; int literalChunkEnd; for (int i = 0; i < withSentinel.size(); i++) { final TextRange subRange = withSentinel.get(i); literalChunkEnd = subRange.getStartOffset(); if (literalChunkEnd > literalChunkStart) { final String chunkPrefix; if (i == 0) { chunkPrefix = prefix; } else if (i == 1 && withSentinel.get(0).getStartOffset() == contentStartOffset) { chunkPrefix = missingValue; } else { chunkPrefix = """"; } final String chunkSuffix; if (i < withSentinel.size() - 1) { chunkSuffix = missingValue; } else if (i == withSentinel.size() - 1) { chunkSuffix = suffix; } else { chunkSuffix = """"; } final TextRange chunkRange = TextRange.create(literalChunkStart, literalChunkEnd); registrar.addPlace(chunkPrefix, chunkSuffix, expr, chunkRange.shiftRight(nodeOffsetInParent)); injected = true; } literalChunkStart = subRange.getEndOffset(); } } else { registrar.addPlace(prefix, suffix, expr, contentRange.shiftRight(nodeOffsetInParent)); injected = true; } } return new InjectionResult(injected, strict); } else if (element instanceof PyParenthesizedExpression) { final PyExpression contained = ((PyParenthesizedExpression)element).getContainedExpression(); if (contained != null) { return processStringLiteral(contained, registrar, prefix, suffix, formatting); } } else if (element instanceof PyBinaryExpression) { final PyBinaryExpression expr = (PyBinaryExpression)element; final PyExpression left = expr.getLeftExpression(); final PyExpression right = expr.getRightExpression(); final boolean isLeftString = isStringLiteralPart(left, null); if (expr.isOperator(""+"")) { final boolean isRightString = right != null && isStringLiteralPart(right, null); InjectionResult result = InjectionResult.EMPTY; if (isLeftString) { result = result.append(processStringLiteral(left, registrar, prefix, isRightString ? """" : missingValue, formatting)); } if (isRightString) { result = result.append(processStringLiteral(right, registrar, isLeftString ? """" : missingValue, suffix, formatting)); } return result; } else if (expr.isOperator(""%"")) { return processStringLiteral(left, registrar, prefix, suffix, Formatting.PERCENT); } } else if (element instanceof PyCallExpression) { final PyExpression qualifier = getFormatCallQualifier((PyCallExpression)element); if (qualifier != null) { return processStringLiteral(qualifier, registrar, prefix, suffix, Formatting.NEW_STYLE); } } return InjectionResult.EMPTY; } private enum Formatting { NONE, PERCENT, NEW_STYLE } } ",0 "ved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- /*** * banned.h - list of Microsoft Security Development Lifecycle banned APIs * * Purpose: * This include file contains a list of banned API which should not be used in new code and * removed from legacy code over time * History * 01-Jan-2006 - mikehow - Initial Version * 22-Apr-2008 - mikehow - Updated to SDL 4.1, commented out recommendations and added memcpy * 26-Jan-2009 - mikehow - Updated to SDL 5.0, made the list sane, added compliance levels * 10-Feb-2009 - mikehow - Updated based on feedback from MS Office * 12-May-2009 - jpardue - Updated based on feedback from mikehow (added wmemcpy) * ***/ // IMPORTANT: // Some of these functions are Windows specific, so you may want to add *nix specific banned function calls #ifndef _INC_BANNED # define _INC_BANNED #endif #ifdef _MSC_VER # pragma once # pragma deprecated (strcpy, strcpyA, strcpyW, wcscpy, _tcscpy, _mbscpy, StrCpy, StrCpyA, StrCpyW, lstrcpy, lstrcpyA, lstrcpyW, _tccpy, _mbccpy, _ftcscpy) # pragma deprecated (strcat, strcatA, strcatW, wcscat, _tcscat, _mbscat, StrCat, StrCatA, StrCatW, lstrcat, lstrcatA, lstrcatW, StrCatBuff, StrCatBuffA, StrCatBuffW, StrCatChainW, _tccat, _mbccat, _ftcscat) # pragma deprecated (wvsprintf, wvsprintfA, wvsprintfW, vsprintf, _vstprintf, vswprintf) # pragma deprecated (strncpy, wcsncpy, _tcsncpy, _mbsncpy, _mbsnbcpy, StrCpyN, StrCpyNA, StrCpyNW, StrNCpy, strcpynA, StrNCpyA, StrNCpyW, lstrcpyn, lstrcpynA, lstrcpynW) # pragma deprecated (strncat, wcsncat, _tcsncat, _mbsncat, _mbsnbcat, StrCatN, StrCatNA, StrCatNW, StrNCat, StrNCatA, StrNCatW, lstrncat, lstrcatnA, lstrcatnW, lstrcatn) # pragma deprecated (IsBadWritePtr, IsBadHugeWritePtr, IsBadReadPtr, IsBadHugeReadPtr, IsBadCodePtr, IsBadStringPtr) # pragma deprecated (gets, _getts, _gettws) # pragma deprecated (RtlCopyMemory, CopyMemory) # pragma deprecated (wnsprintf, wnsprintfA, wnsprintfW, sprintfW, sprintfA, wsprintf, wsprintfW, wsprintfA, sprintf, swprintf, _stprintf, _snwprintf, _snprintf, _sntprintf) # pragma deprecated (_vsnprintf, vsnprintf, _vsnwprintf, _vsntprintf, wvnsprintf, wvnsprintfA, wvnsprintfW) # pragma deprecated (strtok, _tcstok, wcstok, _mbstok) # pragma deprecated (makepath, _tmakepath, _makepath, _wmakepath) # pragma deprecated (_splitpath, _tsplitpath, _wsplitpath) # pragma deprecated (scanf, wscanf, _tscanf, sscanf, swscanf, _stscanf, snscanf, snwscanf, _sntscanf) # pragma deprecated (_itoa, _itow, _i64toa, _i64tow, _ui64toa, _ui64tot, _ui64tow, _ultoa, _ultot, _ultow) #if (_SDL_BANNED_LEVEL3) # pragma deprecated (CharToOem, CharToOemA, CharToOemW, OemToChar, OemToCharA, OemToCharW, CharToOemBuffA, CharToOemBuffW) # pragma deprecated (alloca, _alloca) # pragma deprecated (strlen, wcslen, _mbslen, _mbstrlen, StrLen, lstrlen) # pragma deprecated (ChangeWindowMessageFilter) #endif #ifndef PATHCCH_NO_DEPRECATE // Path APIs which assume MAX_PATH instead of requiring the caller to specify // the buffer size have been deprecated. Include and use the PathCch // equivalents instead. # pragma deprecated (PathAddBackslash, PathAddBackslashA, PathAddBackslashW) # pragma deprecated (PathAddExtension, PathAddExtensionA, PathAddExtensionW) # pragma deprecated (PathAppend, PathAppendA, PathAppendW) # pragma deprecated (PathCanonicalize, PathCanonicalizeA, PathCanonicalizeW) # pragma deprecated (PathCombine, PathCombineA, PathCombineW) # pragma deprecated (PathRenameExtension, PathRenameExtensionA, PathRenameExtensionW) #endif // PATHCCH_NO_DEPRECATE #else // _MSC_VER #endif /* _INC_BANNED */ ",0 "-- Generated by javadoc (version 1.7.0_55) on Fri Jun 20 06:34:49 EDT 2014 --> Uses of Class org.apache.solr.handler.dataimport.BinContentStreamDataSource (Solr 4.9.0 API)
        • Prev
        • Next

        Uses of Class
        org.apache.solr.handler.dataimport.BinContentStreamDataSource

        No usage of org.apache.solr.handler.dataimport.BinContentStreamDataSource
        • Prev
        • Next

        Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.

        ",0 " by javadoc (build 1.6.0_24) on Tue Apr 26 20:40:34 CST 2011 --> com.numericalmethod.suanshu.stats.timeseries.linear.multivariate.stationaryprocess.arima (SuanShu 1.3.1 API Documentation) com.numericalmethod.suanshu.stats.timeseries.linear.multivariate.stationaryprocess.arima
        Classes 
        ArimaModel
        ArimaSim
        ArimaxModel
        ",0 "mport com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.util.PsiTreeUtil; import static io.v.vdl.psi.VdlTypes.*; import io.v.vdl.psi.VdlCompositeElementImpl; import io.v.vdl.psi.*; public class VdlTagImpl extends VdlCompositeElementImpl implements VdlTag { public VdlTagImpl(ASTNode node) { super(node); } public void accept(@NotNull VdlVisitor visitor) { visitor.visitTag(this); } public void accept(@NotNull PsiElementVisitor visitor) { if (visitor instanceof VdlVisitor) accept((VdlVisitor)visitor); else super.accept(visitor); } @Override @NotNull public VdlStringLiteral getStringLiteral() { return findNotNullChildByClass(VdlStringLiteral.class); } } ",0 "e colors unsigned char ply_colors[] = { COLOR_TRANSPARENT, // Placeholder for script colors COLOR_BLACK, // Placeholder for script colors 0x01, // White 0x2B, // Red 0x29, // Dark Red 0x1E, // Light Red 0x99, // Green 0x25, // Dark Green 0x51, // Light Green 0xA1, // Blue 0xA1, // Dark Blue 0xA9, // Light Blue / Cyan 0x17, // Grey 0x61, // Dark Grey 0x16, // Light Grey 0x9A, // Yellow 0x6F, // Dark Yellow 0x66, // Light Yellow 0x61, // Transparent Dark Grey COLOR_BLACK, // Magenta }; // Record mode colors unsigned char rec_colors[] = { COLOR_TRANSPARENT, // Placeholder for script colors COLOR_BLACK, // Placeholder for script colors 0x01, // White 0x2B, // Red 0x29, // Dark Red 0x1E, // Light Red 0x99, // Green 0x25, // Dark Green 0x51, // Light Green 0xA1, // Blue 0xA1, // Dark Blue 0xA9, // Light Blue / Cyan 0x17, // Grey 0x61, // Dark Grey 0x16, // Light Grey 0x9A, // Yellow 0x6F, // Dark Yellow 0x66, // Light Yellow 0x61, // Transparent Dark Grey COLOR_BLACK, // Magenta }; ",0 """). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ package com.amazonaws.services.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

        * Describes the source of a CloudFormation stack record (i.e., the export snapshot record). *

        * * @see AWS API Documentation */ @Generated(""com.amazonaws:aws-java-sdk-code-generator"") public class CloudFormationStackRecordSourceInfo implements Serializable, Cloneable, StructuredPojo { /** *

        * The Lightsail resource type (e.g., ExportSnapshotRecord). *

        */ private String resourceType; /** *

        * The name of the record. *

        */ private String name; /** *

        * The Amazon Resource Name (ARN) of the export snapshot record. *

        */ private String arn; /** *

        * The Lightsail resource type (e.g., ExportSnapshotRecord). *

        * * @param resourceType * The Lightsail resource type (e.g., ExportSnapshotRecord). * @see CloudFormationStackRecordSourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

        * The Lightsail resource type (e.g., ExportSnapshotRecord). *

        * * @return The Lightsail resource type (e.g., ExportSnapshotRecord). * @see CloudFormationStackRecordSourceType */ public String getResourceType() { return this.resourceType; } /** *

        * The Lightsail resource type (e.g., ExportSnapshotRecord). *

        * * @param resourceType * The Lightsail resource type (e.g., ExportSnapshotRecord). * @return Returns a reference to this object so that method calls can be chained together. * @see CloudFormationStackRecordSourceType */ public CloudFormationStackRecordSourceInfo withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** *

        * The Lightsail resource type (e.g., ExportSnapshotRecord). *

        * * @param resourceType * The Lightsail resource type (e.g., ExportSnapshotRecord). * @return Returns a reference to this object so that method calls can be chained together. * @see CloudFormationStackRecordSourceType */ public CloudFormationStackRecordSourceInfo withResourceType(CloudFormationStackRecordSourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** *

        * The name of the record. *

        * * @param name * The name of the record. */ public void setName(String name) { this.name = name; } /** *

        * The name of the record. *

        * * @return The name of the record. */ public String getName() { return this.name; } /** *

        * The name of the record. *

        * * @param name * The name of the record. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudFormationStackRecordSourceInfo withName(String name) { setName(name); return this; } /** *

        * The Amazon Resource Name (ARN) of the export snapshot record. *

        * * @param arn * The Amazon Resource Name (ARN) of the export snapshot record. */ public void setArn(String arn) { this.arn = arn; } /** *

        * The Amazon Resource Name (ARN) of the export snapshot record. *

        * * @return The Amazon Resource Name (ARN) of the export snapshot record. */ public String getArn() { return this.arn; } /** *

        * The Amazon Resource Name (ARN) of the export snapshot record. *

        * * @param arn * The Amazon Resource Name (ARN) of the export snapshot record. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudFormationStackRecordSourceInfo withArn(String arn) { setArn(arn); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(""{""); if (getResourceType() != null) sb.append(""ResourceType: "").append(getResourceType()).append("",""); if (getName() != null) sb.append(""Name: "").append(getName()).append("",""); if (getArn() != null) sb.append(""Arn: "").append(getArn()); sb.append(""}""); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CloudFormationStackRecordSourceInfo == false) return false; CloudFormationStackRecordSourceInfo other = (CloudFormationStackRecordSourceInfo) obj; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); return hashCode; } @Override public CloudFormationStackRecordSourceInfo clone() { try { return (CloudFormationStackRecordSourceInfo) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException(""Got a CloneNotSupportedException from Object.clone() "" + ""even though we're Cloneable!"", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.lightsail.model.transform.CloudFormationStackRecordSourceInfoMarshaller.getInstance().marshall(this, protocolMarshaller); } } ",0 "ityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.util.IIcon; // CraftBukkit start import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.play.server.S2FPacketSetSlot; import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting; import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit end public class ContainerPlayer extends Container { public InventoryCrafting craftMatrix = new InventoryCrafting(this, 2, 2); public IInventory craftResult = new InventoryCraftResult(); public boolean isLocalWorld; private final EntityPlayer thePlayer; // CraftBukkit start private CraftInventoryView bukkitEntity = null; private InventoryPlayer player; // CraftBukkit end private static final String __OBFID = ""CL_00001754""; public ContainerPlayer(final InventoryPlayer p_i1819_1_, boolean p_i1819_2_, EntityPlayer p_i1819_3_) { this.isLocalWorld = p_i1819_2_; this.thePlayer = p_i1819_3_; this.craftResult = new InventoryCraftResult(); // CraftBukkit - moved to before InventoryCrafting construction this.craftMatrix = new InventoryCrafting(this, 2, 2, p_i1819_1_.player); // CraftBukkit - pass player this.craftMatrix.resultInventory = this.craftResult; // CraftBukkit - let InventoryCrafting know about its result slot this.player = p_i1819_1_; // CraftBukkit - save player this.addSlotToContainer(new SlotCrafting(p_i1819_1_.player, this.craftMatrix, this.craftResult, 0, 144, 36)); int i; int j; for (i = 0; i < 2; ++i) { for (j = 0; j < 2; ++j) { this.addSlotToContainer(new Slot(this.craftMatrix, j + i * 2, 88 + j * 18, 26 + i * 18)); } } for (i = 0; i < 4; ++i) { final int k = i; this.addSlotToContainer(new Slot(p_i1819_1_, p_i1819_1_.getSizeInventory() - 1 - i, 8, 8 + i * 18) { private static final String __OBFID = ""CL_00001755""; public int getSlotStackLimit() { return 1; } public boolean isItemValid(ItemStack p_75214_1_) { if (p_75214_1_ == null) return false; return p_75214_1_.getItem().isValidArmor(p_75214_1_, k, thePlayer); } @SideOnly(Side.CLIENT) public IIcon getBackgroundIconIndex() { return ItemArmor.func_94602_b(k); } }); } for (i = 0; i < 3; ++i) { for (j = 0; j < 9; ++j) { this.addSlotToContainer(new Slot(p_i1819_1_, j + (i + 1) * 9, 8 + j * 18, 84 + i * 18)); } } for (i = 0; i < 9; ++i) { this.addSlotToContainer(new Slot(p_i1819_1_, i, 8 + i * 18, 142)); } // this.onCraftMatrixChanged(this.craftMatrix); // CraftBukkit - unneeded since it just sets result slot to empty } public void onCraftMatrixChanged(IInventory p_75130_1_) { // CraftBukkit start (Note: the following line would cause an error if called during construction) CraftingManager.getInstance().lastCraftView = getBukkitView(); ItemStack craftResult = CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.thePlayer.worldObj); this.craftResult.setInventorySlotContents(0, craftResult); if (super.crafters.size() < 1) { return; } EntityPlayerMP player = (EntityPlayerMP) super.crafters.get(0); // TODO: Is this _always_ correct? Seems like it. player.playerNetServerHandler.sendPacket(new S2FPacketSetSlot(player.openContainer.windowId, 0, craftResult)); // CraftBukkit end } public void onContainerClosed(EntityPlayer p_75134_1_) { super.onContainerClosed(p_75134_1_); for (int i = 0; i < 4; ++i) { ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i); if (itemstack != null) { p_75134_1_.dropPlayerItemWithRandomChoice(itemstack, false); } } this.craftResult.setInventorySlotContents(0, (ItemStack)null); } public boolean canInteractWith(EntityPlayer p_75145_1_) { return true; } public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) { ItemStack itemstack = null; Slot slot = (Slot)this.inventorySlots.get(p_82846_2_); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (p_82846_2_ == 0) { if (!this.mergeItemStack(itemstack1, 9, 45, true)) { return null; } slot.onSlotChange(itemstack1, itemstack); } else if (p_82846_2_ >= 1 && p_82846_2_ < 5) { if (!this.mergeItemStack(itemstack1, 9, 45, false)) { return null; } } else if (p_82846_2_ >= 5 && p_82846_2_ < 9) { if (!this.mergeItemStack(itemstack1, 9, 45, false)) { return null; } } else if (itemstack.getItem() instanceof ItemArmor && !((Slot)this.inventorySlots.get(5 + ((ItemArmor)itemstack.getItem()).armorType)).getHasStack()) { int j = 5 + ((ItemArmor)itemstack.getItem()).armorType; if (!this.mergeItemStack(itemstack1, j, j + 1, false)) { return null; } } else if (p_82846_2_ >= 9 && p_82846_2_ < 36) { if (!this.mergeItemStack(itemstack1, 36, 45, false)) { return null; } } else if (p_82846_2_ >= 36 && p_82846_2_ < 45) { if (!this.mergeItemStack(itemstack1, 9, 36, false)) { return null; } } else if (!this.mergeItemStack(itemstack1, 9, 45, false)) { return null; } if (itemstack1.stackSize == 0) { slot.putStack((ItemStack)null); } else { slot.onSlotChanged(); } if (itemstack1.stackSize == itemstack.stackSize) { return null; } slot.onPickupFromSlot(p_82846_1_, itemstack1); } return itemstack; } public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_) { return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_); } // CraftBukkit start public CraftInventoryView getBukkitView() { if (bukkitEntity != null) { return bukkitEntity; } CraftInventoryCrafting inventory = new CraftInventoryCrafting(this.craftMatrix, this.craftResult); bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this); return bukkitEntity; } // CraftBukkit end }",0 "rmany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// 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. /// /// Copyright holder is ArangoDB GmbH, Cologne, Germany /// /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// #ifndef ARANGOD_MMFILES_MMFILES_REVISIONS_CACHE_H #define ARANGOD_MMFILES_MMFILES_REVISIONS_CACHE_H 1 #include ""Basics/Common.h"" #include ""Basics/AssocUnique.h"" #include ""Basics/ReadWriteLock.h"" #include ""MMFiles/MMFilesDocumentPosition.h"" #include ""VocBase/voc-types.h"" struct MMFilesMarker; namespace arangodb { class MMFilesRevisionsCache { public: MMFilesRevisionsCache(); ~MMFilesRevisionsCache(); public: void sizeHint(int64_t hint); size_t size(); size_t capacity(); size_t memoryUsage(); void clear(); MMFilesDocumentPosition lookup(TRI_voc_rid_t revisionId) const; MMFilesDocumentPosition insert(TRI_voc_rid_t revisionId, uint8_t const* dataptr, TRI_voc_fid_t fid, bool isInWal, bool shouldLock); void insert(MMFilesDocumentPosition const& position, bool shouldLock); void update(TRI_voc_rid_t revisionId, uint8_t const* dataptr, TRI_voc_fid_t fid, bool isInWal); bool updateConditional(TRI_voc_rid_t revisionId, MMFilesMarker const* oldPosition, MMFilesMarker const* newPosition, TRI_voc_fid_t newFid, bool isInWal); void remove(TRI_voc_rid_t revisionId); MMFilesDocumentPosition fetchAndRemove(TRI_voc_rid_t revisionId); private: mutable arangodb::basics::ReadWriteLock _lock; arangodb::basics::AssocUnique _positions; }; } // namespace arangodb #endif ",0 "-- Generated by javadoc (version 1.7.0) on Fri Feb 01 09:13:22 EST 2013 --> Uses of Class org.drip.analytics.holset.IEPHoliday
        • Prev
        • Next

        Uses of Class
        org.drip.analytics.holset.IEPHoliday

        No usage of org.drip.analytics.holset.IEPHoliday
        • Prev
        • Next
        ",0 " //and we initialize the values of the fields (*queue) = (pQueue *) malloc(sizeof(pQueue)); (*queue)->first = NULL; (*queue)->size = 0; return; } void addPQueue(pQueue **queue, htNode * val, unsigned int priority) { //If the queue is full we don't have to add the specified value. //We output an error message to the console and return. if((*queue)->size == MAX_SZ) { printf(""\nQueue is full.\n""); return; } pQueueNode *aux = (pQueueNode *)malloc(sizeof(pQueueNode)); aux->priority = priority; aux->val = val; //If the queue is empty we add the first value. //We validate twice in case the structure was modified abnormally at runtime (rarely happens). if((*queue)->size == 0 || (*queue)->first == NULL) { aux->next = NULL; (*queue)->first = aux; (*queue)->size = 1; return; } else { //If there are already elements in the queue and the priority of the element //that we want to add is greater than the priority of the first element, //we'll add it in front of the first element. //Be careful, here we need the priorities to be in descending order if(priority<=(*queue)->first->priority) { aux->next = (*queue)->first; (*queue)->first = aux; (*queue)->size++; return; } else { //We're looking for a place to fit the element depending on it's priority pQueueNode * iterator = (*queue)->first; while(iterator->next!=NULL) { //Same as before, descending, we place the element at the begining of the //sequence with the same priority for efficiency even if //it defeats the idea of a queue. if(priority<=iterator->next->priority) { aux->next = iterator->next; iterator->next = aux; (*queue)->size++; return; } iterator = iterator->next; } //If we reached the end and we haven't added the element, //we'll add it at the end of the queue. if(iterator->next == NULL) { aux->next = NULL; iterator->next = aux; (*queue)->size++; return; } } } } void addPQueue_LI(pQueue **queue, htNode * val, int direction, int parental_node)//add node without sorting - for simple LIFO queue { //If the queue is full we don't have to add the specified value. //We output an error message to the console and return. if((*queue)->size == MAX_SZ) { printf(""\nQueue is full.\n""); return; } pQueueNode *aux = (pQueueNode *)malloc(sizeof(pQueueNode)); aux->val = val; aux->val->direction = direction; aux ->val ->parental_node = parental_node; //If the queue is empty we add the first value. //We validate twice in case the structure was modified abnormally at runtime (rarely happens). if((*queue)->size == 0 || (*queue)->first == NULL) { aux->next = NULL; (*queue)->first = aux; (*queue)->size = 1; return; } else { //we make aux last node in queue pQueueNode * iterator = (*queue)->first; while (iterator->next != NULL) iterator = iterator->next; iterator->next = aux; aux->next = NULL; (*queue)->size++; return; } } htNode * getPQueue_FO(pQueue **queue)//FO implementation { htNode * returnValue = NULL; //We get elements from the queue as long as it isn't empty if((*queue)->size>0) { returnValue = (*queue)->first->val; (*queue)->first = (*queue)->first->next; (*queue)->size--; } else { //If the queue is empty we show an error message. //The function will return whatever is in the memory at that time as returnValue. //Or you can define an error value depeding on what you choose to store in the queue. printf(""\nQueue is empty.\n""); } return returnValue; }",0 "a name=""generator"" content=""rustdoc""> script::dom::bindings::codegen::Bindings::CharacterDataBinding::replaceWith - Rust

        script::dom::bindings::codegen::Bindings::CharacterDataBinding

        Function script::dom::bindings::codegen::Bindings::CharacterDataBinding::replaceWith [] [src]

        unsafe extern fn replaceWith(cx: *mut JSContext, _obj: HandleObject, this: *const CharacterData, args: *const JSJitMethodCallArgs) -> u8

        Keyboard Shortcuts

        ?
        Show this help dialog
        S
        Focus the search field
        Move up in search results
        Move down in search results
        Go to active search result

        Search Tricks

        Prefix searches with a type followed by a colon (e.g. fn:) to restrict the search to a given type.

        Accepted types are: fn, mod, struct, enum, trait, type, macro, and const.

        Search functions by type signature (e.g. vec -> usize)

        ",0 "m developed by * Zurmo, Inc. Copyright (C) 2015 Zurmo Inc. * * Zurmo is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the * Free Software Foundation with the addition of the following permission added * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK * IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * Zurmo is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive * Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com. * * The interactive user interfaces in original and modified versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the Zurmo * logo and Zurmo copyright notice. If the display of the logo is not reasonably * feasible for technical reasons, the Appropriate Legal Notices must display the words * ""Copyright Zurmo Inc. 2015. All rights reserved"". ********************************************************************************/ /** * Helper class for working with CampaignItemActivity */ class CampaignItemActivityUtil extends EmailMessageActivityUtil { } ?>",0 "la. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __padthv1_ramp_h #define __padthv1_ramp_h #include #include //------------------------------------------------------------------------- // padthv1_ramp - ramp/smooth parameter changes class padthv1_ramp { public: padthv1_ramp(uint16_t nvalues = 1) { m_nvalues = nvalues; m_value0 = new float [m_nvalues]; m_value1 = new float [m_nvalues]; m_delta = new float [m_nvalues]; for (uint16_t i = 0; i < m_nvalues; ++i) m_value0[i] = m_value1[i] = m_delta[i] = 0.0f; m_frames = 0; } virtual ~padthv1_ramp() { delete [] m_delta; delete [] m_value1; delete [] m_value0; } void reset() { for (uint16_t i = 0; i < m_nvalues; ++i) { m_value0[i] = m_value1[i]; m_value1[i] = evaluate(i); } m_frames = 0; } void process(uint32_t nframes) { if (m_frames > 0) { if (nframes > m_frames) nframes = m_frames; for (uint16_t i = 0; i < m_nvalues; ++i) m_value0[i] += float(nframes) * m_delta[i]; m_frames -= nframes; } else if (probe()) { reset(); m_frames = nframes; const uint32_t MIN_FRAMES = 32; if (m_frames < MIN_FRAMES) m_frames = MIN_FRAMES; for (uint16_t i = 0; i < m_nvalues; ++i) m_delta[i] = (m_value1[i] - m_value0[i]) / float(m_frames); } } float value(uint32_t n, uint16_t i = 0) const { return (n < m_frames ? (m_value0[i] + float(n) * m_delta[i]) : m_value1[i]); } protected: virtual bool probe() const = 0; virtual float evaluate(uint16_t i) = 0; private: uint16_t m_nvalues; float *m_value1; float *m_value0; float *m_delta; uint32_t m_frames; }; //------------------------------------------------------------------------- // padthv1_ramp1 (1 port tracking) class padthv1_ramp1 : public padthv1_ramp { public: padthv1_ramp1(uint16_t nvalues = 1) : padthv1_ramp(nvalues), m_param1(nullptr), m_param1_v(0.0f) {} void reset(float *param1) { m_param1 = param1; m_param1_v = 0.0f; padthv1_ramp::reset(); } protected: virtual bool probe() const { return m_param1 && ::fabsf(*m_param1 - m_param1_v) > 0.001f; } virtual float evaluate(uint16_t) { update(); return m_param1_v; } void update() { if (m_param1) m_param1_v = *m_param1; } float *m_param1; float m_param1_v; }; //------------------------------------------------------------------------- // padthv1_ramp2 (2 port tracking) class padthv1_ramp2 : public padthv1_ramp1 { public: padthv1_ramp2(uint16_t nvalues = 1) : padthv1_ramp1(nvalues), m_param2(nullptr), m_param2_v(0.0f) {} void reset(float *param1, float *param2) { m_param2 = param2; m_param2_v = 0.0f; padthv1_ramp1::reset(param1); } protected: virtual bool probe() const { return padthv1_ramp1::probe() || (m_param2 && ::fabsf(*m_param2 - m_param2_v) > 0.001f); } virtual float evaluate(uint16_t i) { update(); return padthv1_ramp1::evaluate(i) * m_param2_v; } void update() { padthv1_ramp1::update(); if (m_param2) m_param2_v = *m_param2; } float *m_param2; float m_param2_v; }; //------------------------------------------------------------------------- // padthv1_ramp3 (3 port tracking) class padthv1_ramp3 : public padthv1_ramp2 { public: padthv1_ramp3(uint16_t nvalues = 1) : padthv1_ramp2(nvalues), m_param3(nullptr), m_param3_v(0.0f) {} void reset(float *param1, float *param2, float *param3) { m_param3 = param3; m_param3_v = 0.0f; padthv1_ramp2::reset(param1, param2); } protected: virtual bool probe() const { return padthv1_ramp2::probe() || (m_param3 && ::fabsf(*m_param3 - m_param3_v) > 0.001f); } virtual float evaluate(uint16_t i) { update(); return padthv1_ramp2::evaluate(i) * m_param3_v; } void update() { padthv1_ramp2::update(); if (m_param3) m_param3_v = *m_param3; } float *m_param3; float m_param3_v; }; //------------------------------------------------------------------------- // padthv1_ramp4 (4 port tracking) class padthv1_ramp4 : public padthv1_ramp3 { public: padthv1_ramp4(uint16_t nvalues = 1) : padthv1_ramp3(nvalues), m_param4(nullptr), m_param4_v(0.0f) {} void reset(float *param1, float *param2, float *param3, float *param4) { m_param4 = param4; m_param4_v = 0.0f; padthv1_ramp3::reset(param1, param2, param3); } protected: virtual bool probe() const { return padthv1_ramp3::probe() || (m_param4 && ::fabsf(*m_param4 - m_param4_v) > 0.001f); } virtual float evaluate(uint16_t i) { update(); return padthv1_ramp3::evaluate(i) * m_param4_v; } void update() { padthv1_ramp3::update(); if (m_param4) m_param4_v = *m_param4; } float *m_param4; float m_param4_v; }; #endif // __padthv1_ramp_h // end of padthv1_ramp.h ",0 """contents"">Outline
        Page 1
        Page 2
        Page 3
        Page 4
        Page 5
        Page 6
        Page 7
        Page 8
        Page 9
        Page 10
        Page 11
        Page 12
        Page 13
        Page 14
        Page 15
        Page 16
        Page 17
        Page 18
        Page 19
        Page 20
        Page 21
        Page 22
        Page 23
        Page 24
        Page 25
        Page 26
        Page 27
        Page 28
        Page 29
        Page 30
        Page 31
        Page 32
        Page 33
        Page 34
        Page 35
        Page 36
        Page 37
        Page 38
        Page 39
        Page 40
        Page 41
        Page 42
        Page 43
        Page 44
        Page 45
        Page 46
        Page 47
        Page 48
        Page 49
        Page 50
        Page 51
        Page 52
        Page 53
        Page 54
        Page 55
        Page 56
        Page 57
        Page 58
        Page 59
        Page 60
        Page 61
        Page 62
        Page 63
        ",0 "tps://github.com/swagger-api/swagger-codegen */ /** * SendinBlue API * * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * OpenAPI spec version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 */ /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ namespace SendinBlue\Client\Model; use \ArrayAccess; use \SendinBlue\Client\ObjectSerializer; /** * PostSendFailed Class Doc Comment * * @category Class * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class PostSendFailed implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. * * @var string */ protected static $swaggerModelName = 'postSendFailed'; /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerTypes = [ 'code' => 'int', 'message' => 'string', 'unexistingEmails' => 'string[]', 'withoutListEmails' => 'string[]', 'blackListedEmails' => 'string[]' ]; /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerFormats = [ 'code' => 'int64', 'message' => null, 'unexistingEmails' => 'email', 'withoutListEmails' => 'email', 'blackListedEmails' => 'email' ]; /** * Array of property to type mappings. Used for (de)serialization * * @return array */ public static function swaggerTypes() { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization * * @return array */ public static function swaggerFormats() { return self::$swaggerFormats; } /** * Array of attributes where the key is the local name, * and the value is the original name * * @var string[] */ protected static $attributeMap = [ 'code' => 'code', 'message' => 'message', 'unexistingEmails' => 'unexistingEmails', 'withoutListEmails' => 'withoutListEmails', 'blackListedEmails' => 'blackListedEmails' ]; /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ 'code' => 'setCode', 'message' => 'setMessage', 'unexistingEmails' => 'setUnexistingEmails', 'withoutListEmails' => 'setWithoutListEmails', 'blackListedEmails' => 'setBlackListedEmails' ]; /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ 'code' => 'getCode', 'message' => 'getMessage', 'unexistingEmails' => 'getUnexistingEmails', 'withoutListEmails' => 'getWithoutListEmails', 'blackListedEmails' => 'getBlackListedEmails' ]; /** * Array of attributes where the key is the local name, * and the value is the original name * * @return array */ public static function attributeMap() { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses) * * @return array */ public static function setters() { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests) * * @return array */ public static function getters() { return self::$getters; } /** * The original name of the model. * * @return string */ public function getModelName() { return self::$swaggerModelName; } /** * Associative array for storing property values * * @var mixed[] */ protected $container = []; /** * Constructor * * @param mixed[] $data Associated array of property values * initializing the model */ public function __construct(array $data = null) { $this->container['code'] = isset($data['code']) ? $data['code'] : null; $this->container['message'] = isset($data['message']) ? $data['message'] : null; $this->container['unexistingEmails'] = isset($data['unexistingEmails']) ? $data['unexistingEmails'] : null; $this->container['withoutListEmails'] = isset($data['withoutListEmails']) ? $data['withoutListEmails'] : null; $this->container['blackListedEmails'] = isset($data['blackListedEmails']) ? $data['blackListedEmails'] : null; } /** * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { $invalidProperties = []; if ($this->container['code'] === null) { $invalidProperties[] = ""'code' can't be null""; } if ($this->container['message'] === null) { $invalidProperties[] = ""'message' can't be null""; } return $invalidProperties; } /** * Validate all the properties in the model * return true if all passed * * @return bool True if all properties are valid */ public function valid() { return count($this->listInvalidProperties()) === 0; } /** * Gets code * * @return int */ public function getCode() { return $this->container['code']; } /** * Sets code * * @param int $code Response code * * @return $this */ public function setCode($code) { $this->container['code'] = $code; return $this; } /** * Gets message * * @return string */ public function getMessage() { return $this->container['message']; } /** * Sets message * * @param string $message Response message * * @return $this */ public function setMessage($message) { $this->container['message'] = $message; return $this; } /** * Gets unexistingEmails * * @return string[] */ public function getUnexistingEmails() { return $this->container['unexistingEmails']; } /** * Sets unexistingEmails * * @param string[] $unexistingEmails unexistingEmails * * @return $this */ public function setUnexistingEmails($unexistingEmails) { $this->container['unexistingEmails'] = $unexistingEmails; return $this; } /** * Gets withoutListEmails * * @return string[] */ public function getWithoutListEmails() { return $this->container['withoutListEmails']; } /** * Sets withoutListEmails * * @param string[] $withoutListEmails withoutListEmails * * @return $this */ public function setWithoutListEmails($withoutListEmails) { $this->container['withoutListEmails'] = $withoutListEmails; return $this; } /** * Gets blackListedEmails * * @return string[] */ public function getBlackListedEmails() { return $this->container['blackListedEmails']; } /** * Sets blackListedEmails * * @param string[] $blackListedEmails blackListedEmails * * @return $this */ public function setBlackListedEmails($blackListedEmails) { $this->container['blackListedEmails'] = $blackListedEmails; return $this; } /** * Returns true if offset exists. False otherwise. * * @param integer $offset Offset * * @return boolean */ public function offsetExists($offset) { return isset($this->container[$offset]); } /** * Gets offset. * * @param integer $offset Offset * * @return mixed */ public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } /** * Sets value based on offset. * * @param integer $offset Offset * @param mixed $value Value to be set * * @return void */ public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } /** * Unsets offset. * * @param integer $offset Offset * * @return void */ public function offsetUnset($offset) { unset($this->container[$offset]); } /** * Gets the string presentation of the object * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT ); } return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } ",0 "* License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. * */ package org.adaptinet.mimehandlers; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.URLDecoder; import java.security.MessageDigest; import java.util.Enumeration; import java.util.Properties; import java.util.StringTokenizer; import java.util.Vector; import org.adaptinet.http.HTTP; import org.adaptinet.http.Request; import org.adaptinet.http.Response; import org.adaptinet.socket.PropData; import org.adaptinet.transceiver.ITransceiver; public class MimeHTML_HTTP implements MimeBase { private String url = null; private String urlBase = null; private String webBase = null; private String mimeType = null; private String pathName = null; private ITransceiver transceiver = null; private int status = 200; private boolean bAdminPort = false; static private String PLUGIN_ENTRY = ""plugins/plugin?entry=""; static private String PEER_ENTRY = ""peers/peer?entry=""; static private int PLUGIN_ENTRYLEN = 0; static private int PEER_ENTRYLEN = 0; static final String footer = ""
        "" + """" + """" + ""
        "" + ""
        "" + ""25 B Vreeland Rd. Suite 103, Florham Park, NJ"" + "" 07932     973-451-9600   fx 973-439-1745
        "" + ""all materials © Adaptinet Inc. All rights reserved."" + ""contact Adaptinet  | "" + "" support  




        ""; static { PLUGIN_ENTRYLEN = PLUGIN_ENTRY.length(); PEER_ENTRYLEN = PEER_ENTRY.length(); } public MimeHTML_HTTP() { } public void init(String u, ITransceiver s) { transceiver = s; urlBase = s.getHTTPRoot(); webBase = s.getWebRoot(); if (urlBase == null || urlBase.equals(""."")) { urlBase = System.getProperty(""user.dir"", """"); } if (!urlBase.endsWith(File.separator)) urlBase += File.separator; if (webBase == null || webBase.equals(""."")) { webBase = System.getProperty(""user.dir"", """"); } if (!webBase.endsWith(File.separator)) webBase += File.separator; url = u; parseUrl(); } private void parseUrl() { try { pathName = URLDecoder.decode(url, ""UTF-8""); } catch (Exception e) { pathName = url; } if (pathName.endsWith(""/"")) pathName += ""index.html""; if (pathName.startsWith(""/"")) pathName = pathName.substring(1); int dot = pathName.indexOf("".""); if (dot > 0) { String ext = pathName.substring(dot + 1); setMimeForExt(ext); } else mimeType = HTTP.contentTypeHTML; } public String getContentType() { return mimeType; } private void setMimeForExt(String ext) { if (ext.equalsIgnoreCase(""jpg"")) mimeType = HTTP.contentTypeJPEG; else if (ext.equalsIgnoreCase(""htm"") || ext.equalsIgnoreCase(""html"")) mimeType = HTTP.contentTypeHTML; else if (ext.equalsIgnoreCase(""gif"")) mimeType = HTTP.contentTypeGIF; else if (ext.equalsIgnoreCase(""xsl"")) mimeType = HTTP.contentTypeXML; else mimeType = HTTP.contentTypeHTML; } public ByteArrayOutputStream process(ITransceiver transceiver, Request request) { // note: this process has gotten pretty big, really fast // need to revisit the exception handling here, there is a better way File file = null; String monitor = null; long length = 0; try { bAdminPort = (request.getPort() == transceiver.getAdminPort()); status = isAuthorized(request.getUsername(), request.getPassword()); if (!bAdminPort) { // non-admin port are regular html requests... String base = webBase; if (bAdminPort) base = urlBase; file = new File(base + pathName); if (file.isFile() == false || !file.canRead()) throw new FileNotFoundException(); else length = file.length(); } else { if (pathName.equalsIgnoreCase(""configuration.html"")) { if (status == HTTP.UNAUTHORIZED || bAdminPort == false) throw new IllegalAccessException(); monitor = getConfiguration(transceiver); System.out.println(monitor); if (monitor != null) length = monitor.length(); else status = HTTP.NOT_FOUND; } else if (pathName.equalsIgnoreCase(""monitor.html"")) { if (status == HTTP.UNAUTHORIZED || bAdminPort == false) throw new IllegalAccessException(); try { monitor = getMonitor(); length = monitor.length(); } catch (Exception e) { monitor = e.getMessage(); status = HTTP.INTERNAL_SERVER_ERROR; } catch (Throwable t) { monitor = t.getMessage(); status = HTTP.INTERNAL_SERVER_ERROR; } } else if (pathName.equalsIgnoreCase(""plugins.html"")) { if (status == HTTP.UNAUTHORIZED || bAdminPort == false) throw new IllegalAccessException(); monitor = getPlugins(transceiver); if (monitor != null) length = monitor.length(); else status = HTTP.INTERNAL_SERVER_ERROR; } else if (pathName.equalsIgnoreCase(""peers.html"")) { if (status == HTTP.UNAUTHORIZED || bAdminPort == false) throw new IllegalAccessException(); monitor = getPeers(transceiver); if (monitor != null) length = monitor.length(); else status = HTTP.INTERNAL_SERVER_ERROR; } else if (pathName.startsWith(PLUGIN_ENTRY)) { if (status == HTTP.UNAUTHORIZED || bAdminPort == false) throw new IllegalAccessException(); if (pathName.length() > PLUGIN_ENTRYLEN) monitor = getPluginEntry(transceiver, pathName .substring(PLUGIN_ENTRYLEN)); else monitor = getPluginEntry(transceiver, """"); if (monitor != null) length = monitor.length(); else status = HTTP.NOT_FOUND; } else if (pathName.startsWith(PEER_ENTRY)) { if (status == HTTP.UNAUTHORIZED || bAdminPort == false) throw new IllegalAccessException(); if (pathName.length() > PEER_ENTRYLEN) monitor = getPeerEntry(transceiver, pathName .substring(PEER_ENTRYLEN)); else monitor = getPeerEntry(transceiver, """"); if (monitor != null) length = monitor.length(); else status = HTTP.NOT_FOUND; } else if (pathName.startsWith(""setadmin?"")) { if (status == HTTP.UNAUTHORIZED || bAdminPort == false) throw new IllegalAccessException(); monitor = setAdmin(pathName.substring(9), request); length = monitor.length(); } else // files { String base = webBase; if (bAdminPort) base = urlBase; file = new File(base + pathName); if (file.isFile() == false || !file.canRead()) throw new FileNotFoundException(); else length = file.length(); } } } catch (IOException e) { status = HTTP.NOT_FOUND; } catch (IllegalAccessException iae) { status = HTTP.UNAUTHORIZED; } catch (Exception e) { status = HTTP.INTERNAL_SERVER_ERROR; } try { Response resp = new Response(request.getOutStream(), transceiver .getHost(), mimeType); resp.setResponse(new ByteArrayOutputStream()); resp.setStatus(status); resp.writeHeader(length); if (status != HTTP.OK) return null; BufferedOutputStream out = new BufferedOutputStream(request .getOutStream()); if (file != null) { BufferedInputStream in = new BufferedInputStream( new FileInputStream(file)); byte[] bytes = new byte[255]; while (true) { int read = in.read(bytes); if (read < 0) break; out.write(bytes, 0, read); } in.close(); } else if (monitor != null) { out.write(monitor.getBytes()); } out.flush(); } catch (Exception e) { } return null; } public static String getPlugins(ITransceiver transceiver) { try { return PluginXML.getEntries(transceiver); } catch (Exception e) { return null; } } public static String getPeers(ITransceiver transceiver) { try { return PeerXML.getEntries(transceiver); } catch (Exception e) { return null; } } public static String getConfiguration(ITransceiver transceiver) { try { return TransceiverConfiguration.getConfiguration(transceiver); } catch (Exception e) { return null; } } public static String getPluginEntry(ITransceiver transceiver, String entry) { try { return PluginXML.getEntry(transceiver, entry); } catch (Exception e) { return null; } } public static String getPeerEntry(ITransceiver transceiver, String peer) { try { return PeerXML.getEntry(transceiver, peer); } catch (Exception e) { return null; } } public static String getLicenseKey(ITransceiver transceiver) { try { // return // simpleTransform.transform(licensingXML.getLicense(transceiver), // transceiver.getHTTPRoot() + ""/licensing.xsl""); return null; } catch (Exception e) { return null; } } private String setAdmin(String params, Request request) { try { StringTokenizer tokenizer = new StringTokenizer(params, ""&""); int size = tokenizer.countTokens() * 2; String token = null; Properties properties = new Properties(); for (int i = 0; i < size; i += 2) { if (tokenizer.hasMoreTokens()) { token = tokenizer.nextToken(); int loc = token.indexOf('='); properties.setProperty(token.substring(0, loc), token .substring(loc + 1, token.length())); } } String userid = properties.getProperty(""userid""); String current = properties.getProperty(""current""); String password = properties.getProperty(""password""); String confirm = properties.getProperty(""password2""); // check current password here if (isAuthorized(request.getUsername(), current) == HTTP.UNAUTHORIZED) return ""

        The current password is incorrect for user: "" + request.getUsername() + ""

        ""; if (!password.equals(confirm)) return ""

        The password does not match the confirm password

        ""; if (password.equals("""")) return ""

        The password cannot be empty.

        ""; MessageDigest md = MessageDigest.getInstance(""MD5""); String digest = new String(md.digest(password.getBytes())); String userpass = userid + "":"" + digest; String authfile = urlBase + "".xbpasswd""; FileOutputStream fs = new FileOutputStream(authfile); fs.write(userpass.getBytes()); fs.close(); return ""

        Change password success for "" + userid + ""

        ""; } catch (Exception e) { } return ""

        Change password failure.

        ""; } public int getStatus() { return status; } private int isAuthorized(String username, String password) { try { if (!bAdminPort) return HTTP.OK; String authfile = urlBase + "".xbpasswd""; File file = new File(authfile); if (!file.isFile()) return HTTP.OK; BufferedReader br = new BufferedReader(new InputStreamReader( new FileInputStream(file))); String userpass = br.readLine(); br.close(); StringTokenizer st = new StringTokenizer(userpass, "":""); String user = st.hasMoreTokens() ? st.nextToken() : """"; String pass = st.hasMoreTokens() ? st.nextToken() : """"; MessageDigest md = MessageDigest.getInstance(""MD5""); String digest = new String(md.digest(password != null ? password .getBytes() : """".getBytes())); if (user.equals(username) && pass.equals(digest)) return HTTP.OK; } catch (IOException ioe) { } catch (NullPointerException npe) { } catch (Exception e) { e.printStackTrace(); } return HTTP.UNAUTHORIZED; } String getMonitor() { StringBuffer buffer = new StringBuffer(); try { Vector vec = transceiver.requestList(); buffer.append(""Status""); buffer.append(""""); buffer.append(""""); buffer.append(""""); buffer.append(""
        \""\""""); buffer.append(""""); buffer.append(""""); buffer.append(""""); buffer.append(""""); buffer.append(""""); buffer.append(""""); Enumeration e = vec.elements(); while (e.hasMoreElements()) { PropData data = e.nextElement(); buffer.append(""""); buffer.append(""""); buffer.append(""""); buffer.append(""""); buffer.append(""""); } buffer.append(""""); buffer.append(""
        Plugin NameSystem IDStatusControl
        ""); buffer.append(data.getName()); buffer.append(""""); buffer.append(data.getId()); buffer.append(""""); buffer.append(data.getState()); buffer.append(""""); buffer.append(""
        ""); buffer .append(""""); buffer .append(""""); buffer .append(""Force""); buffer.append(""""); buffer.append(data.getId()); buffer.append(""\"">""); buffer.append(""""); buffer.append(data.getName()); buffer.append(""\"">""); buffer.append(""
        ""); buffer.append(footer); buffer.append(""""); buffer.append(""""); } catch (Exception e) { return null; } return buffer.toString(); } } ",0 "('IN_IA') or exit('Access Denied'); global $_W,$_GPC; require_once 'core/inc/core.php'; require_once 'core/inc/define.php'; require_once 'core/inc/user.php'; class Yc_shopModuleSite extends Core { public function doWebShop() { ## 商城统一入口 $this->_exec(__FUNCTION__,true,'shop'); } public function doMobileIndex() { //这个操作被定义用来呈现 功能封面. $this->_exec(__FUNCTION__,false); } }",0 "mpliance 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. */ /** * Service definition for FactCheckTools (v1alpha1). * *

        * *

        * For more information about this service, see the API * Documentation *

        * * @author Google, Inc. */ class Google_Service_FactCheckTools extends Google_Service { /** View your email address. */ const USERINFO_EMAIL = ""https://www.googleapis.com/auth/userinfo.email""; public $claims; public $pages; /** * Constructs the internal representation of the FactCheckTools service. * * @param Google_Client $client The client used to deliver requests. * @param string $rootUrl The root URL used for requests to the service. */ public function __construct(Google_Client $client, $rootUrl = null) { parent::__construct($client); $this->rootUrl = $rootUrl ?: 'https://factchecktools.googleapis.com/'; $this->servicePath = ''; $this->batchPath = 'batch'; $this->version = 'v1alpha1'; $this->serviceName = 'factchecktools'; $this->claims = new Google_Service_FactCheckTools_Resource_Claims( $this, $this->serviceName, 'claims', array( 'methods' => array( 'search' => array( 'path' => 'v1alpha1/claims:search', 'httpMethod' => 'GET', 'parameters' => array( 'languageCode' => array( 'location' => 'query', 'type' => 'string', ), 'maxAgeDays' => array( 'location' => 'query', 'type' => 'integer', ), 'offset' => array( 'location' => 'query', 'type' => 'integer', ), 'pageSize' => array( 'location' => 'query', 'type' => 'integer', ), 'pageToken' => array( 'location' => 'query', 'type' => 'string', ), 'query' => array( 'location' => 'query', 'type' => 'string', ), 'reviewPublisherSiteFilter' => array( 'location' => 'query', 'type' => 'string', ), ), ), ) ) ); $this->pages = new Google_Service_FactCheckTools_Resource_Pages( $this, $this->serviceName, 'pages', array( 'methods' => array( 'create' => array( 'path' => 'v1alpha1/pages', 'httpMethod' => 'POST', 'parameters' => array(), ),'delete' => array( 'path' => 'v1alpha1/{+name}', 'httpMethod' => 'DELETE', 'parameters' => array( 'name' => array( 'location' => 'path', 'type' => 'string', 'required' => true, ), ), ),'get' => array( 'path' => 'v1alpha1/{+name}', 'httpMethod' => 'GET', 'parameters' => array( 'name' => array( 'location' => 'path', 'type' => 'string', 'required' => true, ), ), ),'list' => array( 'path' => 'v1alpha1/pages', 'httpMethod' => 'GET', 'parameters' => array( 'offset' => array( 'location' => 'query', 'type' => 'integer', ), 'organization' => array( 'location' => 'query', 'type' => 'string', ), 'pageSize' => array( 'location' => 'query', 'type' => 'integer', ), 'pageToken' => array( 'location' => 'query', 'type' => 'string', ), 'url' => array( 'location' => 'query', 'type' => 'string', ), ), ),'update' => array( 'path' => 'v1alpha1/{+name}', 'httpMethod' => 'PUT', 'parameters' => array( 'name' => array( 'location' => 'path', 'type' => 'string', 'required' => true, ), ), ), ) ) ); } } ",0 "re\User\FOSUBUserProvider as BaseClass; use Symfony\Component\Security\Core\User\UserInterface; class FOSUBUserProvider extends BaseClass { /** * {@inheritDoc} */ public function connect(UserInterface $user, UserResponseInterface $response) { $property = $this->getProperty($response); $username = $response->getUsername(); $previousUser = $this->userManager->findUserBy(array($property => $username)); var_dump( $property, $response->getProfilePicture(), $response->getRealName(), $response->getNickname(), $response->getUsername(), $previousUser ); //on connect - get the access token and the user ID $service = $response->getResourceOwner()->getName(); //we ""disconnect"" previously connected users if (null !== $previousUser = $this->userManager->findUserBy(array($property => $username,'auth_type'=>$service))) { $previousUser->setAccessToken($response->getAccessToken()); $this->userManager->updateUser($previousUser); } } /** * {@inheritdoc} */ public function loadUserByOAuthUserResponse(UserResponseInterface $response) { $username = $response->getUsername(); $service = $response->getResourceOwner()->getName(); $user = $this->userManager->findUserBy(array($this->getProperty($response) => $username,'auth_type'=>$service)); //when the user is registrating if (null === $user) { $user = $this->userManager->createUser(); $user->setUid($username); $user->setAccessToken($response->getAccessToken()); $user->setAuthType($service); //I have set all requested data with the user's username //modify here with relevant data $user->setUsername($response->getRealName()); $user->setUsernameCanonical($username); $user->setEmail($response->getEmail()); if($service==""facebook""){ $user->setPicture(""https://graph.facebook.com/$username/picture""); }else{ $user->setPicture($response->getProfilePicture()); } $user->setPassword($username); $user->setEnabled(true); $this->userManager->updateUser($user); return $user; } //if user exists - go with the HWIOAuth way $user = parent::loadUserByOAuthUserResponse($response); //update access token $user->setAccessToken($response->getAccessToken()); return $user; } }",0 ". * * * * * * * * * * * * * * * * * * * * */ package com.sun.corba.se.spi.protocol; import org.omg.CORBA.portable.ServantObject; /** * @author Harold Carr */ public interface LocalClientRequestDispatcher { public boolean useLocalInvocation(org.omg.CORBA.Object self); public boolean is_local(org.omg.CORBA.Object self); /** * Returns a Java reference to the servant which should be used for this * request. servant_preinvoke() is invoked by a local stub. * If a ServantObject object is returned, then its servant field * has been set to an object of the expected type (Note: the object may * or may not be the actual servant instance). The local stub may cast * the servant field to the expected type, and then invoke the operation * directly. * * @param self The object reference which delegated to this delegate. * * @param operation a string containing the operation name. * The operation name corresponds to the operation name as it would be * encoded in a GIOP request. * * @param expectedType a Class object representing the expected type of the servant. * The expected type is the Class object associated with the operations * class of the stub's interface (e.g. A stub for an interface Foo, * would pass the Class object for the FooOperations interface). * * @return a ServantObject object. * The method may return a null value if it does not wish to support * this optimization (e.g. due to security, transactions, etc). * The method must return null if the servant is not of the expected type. */ public ServantObject servant_preinvoke(org.omg.CORBA.Object self, String operation, Class expectedType); public void servant_postinvoke(org.omg.CORBA.Object self, ServantObject servant); } // End of file. ",0 "ral Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Disco is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Disco. If not, see . */ package eu.diversify.disco.cloudml; import eu.diversify.disco.population.diversity.TrueDiversity; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Options { private static final String JSON_FILE_NAME = ""[^\\.]*\\.json$""; private static final String DOUBLE_LITERAL = ""((\\+|-)?([0-9]+)(\\.[0-9]+)?)|((\\+|-)?\\.?[0-9]+)""; public static final String ENABLE_GUI = ""-gui""; public static Options fromCommandLineArguments(String... arguments) { Options extracted = new Options(); for (String argument : arguments) { if (isJsonFile(argument)) { extracted.addDeploymentModel(argument); } else if (isDouble(argument)) { extracted.setReference(Double.parseDouble(argument)); } else if (isEnableGui(argument)) { extracted.setGuiEnabled(true); } else { throw new IllegalArgumentException(""Unknown argument: "" + argument); } } return extracted; } private static boolean isJsonFile(String argument) { return argument.matches(JSON_FILE_NAME); } private static boolean isDouble(String argument) { return argument.matches(DOUBLE_LITERAL); } private static boolean isEnableGui(String argument) { return argument.matches(ENABLE_GUI); } private boolean guiEnabled; private final List deploymentModels; private double reference; public Options() { this.guiEnabled = false; this.deploymentModels = new ArrayList(); this.reference = 0.75; } public boolean isGuiEnabled() { return guiEnabled; } public void setGuiEnabled(boolean guiEnabled) { this.guiEnabled = guiEnabled; } public double getReference() { return reference; } public void setReference(double setPoint) { this.reference = setPoint; } public List getDeploymentModels() { return Collections.unmodifiableList(deploymentModels); } public void addDeploymentModel(String pathToModel) { this.deploymentModels.add(pathToModel); } public void launchDiversityController() { final CloudMLController controller = new CloudMLController(new TrueDiversity().normalise()); if (guiEnabled) { startGui(controller); } else { startCommandLine(controller); } } private void startGui(final CloudMLController controller) { java.awt.EventQueue.invokeLater(new Runnable() { @Override public void run() { final Gui gui = new Gui(controller); gui.setReference(reference); gui.setFileToLoad(deploymentModels.get(0)); gui.setVisible(true); } }); } private void startCommandLine(final CloudMLController controller) { final CommandLine commandLine = new CommandLine(controller); for (String deployment : getDeploymentModels()) { commandLine.controlDiversity(deployment, reference); } } } ",0 "'thim_logo']; // The value may be a URL to the image (for the default parameter) // or an attachment ID to the selected image. $logo_src = $logo_id; // For the default value if ( is_numeric( $logo_id ) ) { $imageAttachment = wp_get_attachment_image_src( $logo_id, 'full' ); $logo_src = $imageAttachment[0]; } $sticky_logo_id = $theme_options_data['thim_sticky_logo']; // The value may be a URL to the image (for the default parameter) // or an attachment ID to the selected image. $sticky_logo_src = $sticky_logo_id; // For the default value if ( is_numeric( $sticky_logo_id ) ) { $imageAttachment = wp_get_attachment_image_src( $sticky_logo_id, 'full' ); $sticky_logo_src = $imageAttachment[0]; } ?>
        '' ) { echo $theme_options_data['thim_header_position']; } if ( isset( $theme_options_data['thim_config_height_sticky'] ) && $theme_options_data['thim_config_height_sticky'] <> '' ) { echo ' ' . $theme_options_data['thim_config_height_sticky']; } if ( isset( $theme_options_data['thim_config_att_sticky'] ) && $theme_options_data['thim_config_att_sticky'] <> '' ) { echo ' ' . $theme_options_data['thim_config_att_sticky']; } ?>"" role=""banner""> ""; } ?>
        ""; } ?>
        top_left"">
        top_right"">
        ""; } ?>
        '; } else { echo '

        '; } ?> "" title="" - "" rel=""home""> '; } else { bloginfo( 'name' ); } ?> '; } else { echo '

        '; } ?>
        ""> "" class=""form-control ob-search-input"" autocomplete=""off"" />
        ""; } ?>
        ",0 "n 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. */ package com.jetbrains.edu.learning.stepic; import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.project.Project; import com.intellij.openapi.startup.StartupActivity; import com.jetbrains.edu.learning.courseGeneration.StudyProjectGenerator; import org.jetbrains.annotations.NotNull; import java.util.List; public class StudyCoursesUpdater implements StartupActivity { public static StudyCoursesUpdater getInstance() { final StartupActivity[] extensions = Extensions.getExtensions(StartupActivity.POST_STARTUP_ACTIVITY); for (StartupActivity extension : extensions) { if (extension instanceof StudyCoursesUpdater) { return (StudyCoursesUpdater) extension; } } throw new UnsupportedOperationException(""could not find self""); } @Override public void runActivity(@NotNull final Project project) { final Application application = ApplicationManager.getApplication(); if (application.isUnitTestMode()) { return; } if (checkNeeded()) { application.executeOnPooledThread(new Runnable() { @Override public void run() { final List courses = EduStepicConnector.getCourses(); StudyProjectGenerator.flushCache(courses); } }); } } public static boolean checkNeeded() { final List courses = StudyProjectGenerator.getCoursesFromCache(); return courses.isEmpty(); } } ",0 "javadoc (build 1.6.0_21) on Thu Aug 05 10:04:40 JST 2010 --> All Classes (estraier) All Classes
        Cmd
        Condition
        Database
        DatabaseInformer
        Document
        Result
        ",0 "rt arez.component.DisposeNotifier; import arez.component.Identifiable; import arez.component.internal.ComponentKernel; import java.text.ParseException; import javax.annotation.Generated; import javax.annotation.Nonnull; import org.realityforge.braincheck.Guards; @Generated(""arez.processor.ArezProcessor"") final class Arez_ObservableWithSpecificExceptionModel extends ObservableWithSpecificExceptionModel implements Disposable, Identifiable, DisposeNotifier { private static volatile int $$arezi$$_nextId; private final ComponentKernel $$arezi$$_kernel; @Nonnull private final ObservableValue $$arez$$_time; Arez_ObservableWithSpecificExceptionModel() { super(); final ArezContext $$arezv$$_context = Arez.context(); final int $$arezv$$_id = ++$$arezi$$_nextId; final String $$arezv$$_name = Arez.areNamesEnabled() ? ""ObservableWithSpecificExceptionModel."" + $$arezv$$_id : null; final Component $$arezv$$_component = Arez.areNativeComponentsEnabled() ? $$arezv$$_context.component( ""ObservableWithSpecificExceptionModel"", $$arezv$$_id, $$arezv$$_name, this::$$arezi$$_nativeComponentPreDispose ) : null; this.$$arezi$$_kernel = new ComponentKernel( Arez.areZonesEnabled() ? $$arezv$$_context : null, Arez.areNamesEnabled() ? $$arezv$$_name : null, $$arezv$$_id, Arez.areNativeComponentsEnabled() ? $$arezv$$_component : null, null, Arez.areNativeComponentsEnabled() ? null : this::$$arezi$$_dispose, null, true, false, false ); this.$$arez$$_time = $$arezv$$_context.observable( Arez.areNativeComponentsEnabled() ? $$arezv$$_component : null, Arez.areNamesEnabled() ? $$arezv$$_name + "".time"" : null, Arez.arePropertyIntrospectorsEnabled() ? () -> super.getTime() : null, Arez.arePropertyIntrospectorsEnabled() ? v -> super.setTime( v ) : null ); this.$$arezi$$_kernel.componentConstructed(); this.$$arezi$$_kernel.componentReady(); } private int $$arezi$$_id() { return this.$$arezi$$_kernel.getId(); } @Override @Nonnull public Integer getArezId() { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> ""Method named 'getArezId' invoked on uninitialized component of type 'ObservableWithSpecificExceptionModel'"" ); } if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> ""Method named 'getArezId' invoked on un-constructed component named '"" + ( null == this.$$arezi$$_kernel ? ""?"" : this.$$arezi$$_kernel.getName() ) + ""'"" ); } return $$arezi$$_id(); } private void $$arezi$$_nativeComponentPreDispose() { this.$$arezi$$_kernel.notifyOnDisposeListeners(); } @Override public void addOnDisposeListener(@Nonnull final Object key, @Nonnull final SafeProcedure action) { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> ""Method named 'addOnDisposeListener' invoked on uninitialized component of type 'ObservableWithSpecificExceptionModel'"" ); } this.$$arezi$$_kernel.addOnDisposeListener( key, action ); } @Override public void removeOnDisposeListener(@Nonnull final Object key) { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> ""Method named 'removeOnDisposeListener' invoked on uninitialized component of type 'ObservableWithSpecificExceptionModel'"" ); } if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> ""Method named 'removeOnDisposeListener' invoked on un-constructed component named '"" + ( null == this.$$arezi$$_kernel ? ""?"" : this.$$arezi$$_kernel.getName() ) + ""'"" ); } this.$$arezi$$_kernel.removeOnDisposeListener( key ); } @Override public boolean isDisposed() { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> ""Method named 'isDisposed' invoked on uninitialized component of type 'ObservableWithSpecificExceptionModel'"" ); } if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> ""Method named 'isDisposed' invoked on un-constructed component named '"" + ( null == this.$$arezi$$_kernel ? ""?"" : this.$$arezi$$_kernel.getName() ) + ""'"" ); } return this.$$arezi$$_kernel.isDisposed(); } @Override public void dispose() { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> ""Method named 'dispose' invoked on uninitialized component of type 'ObservableWithSpecificExceptionModel'"" ); } if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> ""Method named 'dispose' invoked on un-constructed component named '"" + ( null == this.$$arezi$$_kernel ? ""?"" : this.$$arezi$$_kernel.getName() ) + ""'"" ); } this.$$arezi$$_kernel.dispose(); } private void $$arezi$$_dispose() { this.$$arez$$_time.dispose(); } @Override public long getTime() throws ParseException { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.isActive(), () -> ""Method named 'getTime' invoked on "" + this.$$arezi$$_kernel.describeState() + "" component named '"" + this.$$arezi$$_kernel.getName() + ""'"" ); } this.$$arez$$_time.reportObserved(); return super.getTime(); } @Override public void setTime(final long time) throws ParseException { if ( Arez.shouldCheckApiInvariants() ) { Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.isActive(), () -> ""Method named 'setTime' invoked on "" + this.$$arezi$$_kernel.describeState() + "" component named '"" + this.$$arezi$$_kernel.getName() + ""'"" ); } this.$$arez$$_time.preReportChanged(); final long $$arezv$$_currentValue = super.getTime(); if ( time != $$arezv$$_currentValue ) { super.setTime( time ); this.$$arez$$_time.reportChanged(); } } @Override public String toString() { if ( Arez.areNamesEnabled() ) { return ""ArezComponent["" + this.$$arezi$$_kernel.getName() + ""]""; } else { return super.toString(); } } } ",0 "oc->name; ?>"">
        title; ?>"">

        "" class=""small-text"" maxlength=""2"" value=""publishDate)); ?>""> / "" class=""small-text"" maxlength=""2"" value=""publishDate)); ?>""> / "" class=""small-text"" maxlength=""4"" value=""publishDate)); ?>"">

        NOTE: If you do not enter a value, the current date will be used'); ?>

        commentsAllowed == true)? 'checked' : ''; ?>>
        downloadable == true)? 'checked' : ''; ?>>
        access == 'private') : ?>

        click here'); ?>

        "">

        ",0 "ved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include ""config.h"" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* * Callback Functions */ /* context alloc */ static void *configure_context(tr_ctx_t *tr_ctx); /* copy argument */ static int configure_cparg(AXP *, uint32_t, int, const char *, size_t, tr_ctx_t *); /* execute */ static int configure_exec(transaction *); /* rollback */ static int configure_rollback(transaction *); /* done */ static int configure_done(transaction *tr, char *buf, int len, int *wrote); /* context free */ static void configure_release(tr_ctx_t *tr_ctx); static int configure_parse(transaction *tr, const char *buf, int len); /* * XML Schema: configure-start-request */ static char *arms_push_conf_module_attr[] = { ""id"", NULL, ""version"", NULL, ""install-order"", NULL, NULL }; static char *arms_push_conf_mdconf_attr[] = { ""id"", NULL, ""commit-order"", NULL, ""encoding"", NULL, NULL }; static struct axp_schema arms_push_conf_start_sreq_body[] = { {ARMS_TAG_MODULE, ""module"", AXP_TYPE_TEXT, arms_push_conf_module_attr, push_default_hook, NULL}, {ARMS_TAG_MDCONF, ""md-config"", AXP_TYPE_TEXT, arms_push_conf_mdconf_attr, push_default_hook, NULL}, {0, NULL, 0, NULL, NULL, NULL} }; static struct axp_schema configure_start_request = { ARMS_TAG_CONFIGURE_SREQ, ""configure-start-request"", AXP_TYPE_CHILD, NULL, push_default_hook, arms_push_conf_start_sreq_body }; /* * Method defineition */ arms_method_t configure_methods = { ARMS_TR_CONFIGURE, /* pm_type */ ""configure"", /* type string */ &configure_start_request, /* schema */ 0, /* pm_flags */ build_generic_res, /* pm_response */ configure_done, /* pm_done */ configure_exec, /* pm_exec */ configure_cparg, /* pm_copyarg */ configure_rollback, /* pm_rollback */ configure_context, /* pm_context */ configure_release, /* pm_release */ configure_parse, /* pm_parse */ }; /* * Method implementations */ struct configure_args { int cur_mod_id; int mod_id[10]; /* XXX enough? */ int err_id[10]; /* XXX enough? */ int errs; int commit_err; int already_running; int syncing; int first; /* fragment */ char request[AXP_BUFSIZE * 3 / 4 + 2 + 1]; /* + 2: modulo bytes */ char *catbuf; int catlen; arms_base64_stream_t base64; }; static int already_running = 0; static int purge_module(uint32_t id, const char *pkg_name, void *udata); static module_cb_tbl_t configure_module_cb = { NULL, purge_module, NULL }; int arms_is_running_configure(arms_context_t *res) { return already_running; } static int purge_module(uint32_t id, const char *pkg_name, void *udata) { arms_config_cb_t config_cb; arms_context_t *res = arms_get_context(); int err = 0; res = udata; config_cb = res->callbacks.config_cb; if (config_cb) { err = (*config_cb) (id, """", """", ARMS_REMOVE_MODULE, NULL, 0, 0, res->udata); } return err; } /* * Context Alloc */ static void * configure_context(tr_ctx_t *tr_ctx) { struct configure_args *arg; arg = CALLOC(1, sizeof(*arg)); if (arg != NULL) { if (already_running) { arg->already_running = already_running; } else { /* only one configure */ already_running = 1; } } else { tr_ctx->result = 413;/*Resource Exhausted*/ } return arg; } /* * Context Free */ static void configure_release(tr_ctx_t *tr_ctx) { struct configure_args *arg = tr_ctx->arg; if (arg) { if (!arg->already_running) { /* clear configure transaction lock. */ already_running = 0; } if (arg->catbuf != NULL) { FREE(arg->catbuf); } FREE(tr_ctx->arg); } } /* * Execute */ static int configure_exec(transaction *tr) { tr_ctx_t *tr_ctx = &tr->tr_ctx; arms_context_t *res = arms_get_context(); struct configure_args *arg = tr_ctx->arg; arms_config_cb_t config_cb; int err = 0; if (arg->already_running) { return 0; } config_cb = res->callbacks.config_cb; libarms_log(ARMS_LOG_IPROTO_CONFIG_COMMIT, ""Execute configure commit""); if (arg->errs) { arg->commit_err = 1; /* XXX DO NEED IMPLEMENT DISCARD callback? */ #if 0 config_cb(arg->cur_mod_id, """" NULL, ARMS_PUSH_DISCARD_CONFIG, NULL, 0, NULL); #endif return 0; } err = config_cb(arg->cur_mod_id, """", """", ARMS_PUSH_EXEC_STORED_CONFIG, NULL, 0, 0, res->udata); if (err == ARMS_EMODSYNC) { arg->commit_err = 0; arg->syncing = 1; return 0; } else if (err != 0) { /* execute failure, rollback immediately */ err = configure_rollback(tr); /* * exec success --> rollbacked=0,commit_err=0,err=0 * rollback success --> rollbacked=1,commit_err=0,err=0 * rollback failed --> rollbacked=1,commit_err=1,err=!0 */ if (err != 0) { arg->commit_err = 1; return err; } } arg->commit_err = 0; return 0; } /* * Rollback */ static int configure_rollback(transaction *tr) { tr_ctx_t *tr_ctx = &tr->tr_ctx; arms_context_t *res = arms_get_context(); struct configure_args *arg = tr_ctx->arg; arms_config_cb_t config_cb; int err; if (tr->rollbacked) { /* already rollbacked. */ return -1; } libarms_log(ARMS_LOG_IPROTO_CONFIG_ROLLBACK, ""Execute configure rollback""); config_cb = res->callbacks.config_cb; arg->commit_err = 0; tr->rollbacked = 1; err = config_cb(arg->cur_mod_id, """", """", ARMS_PUSH_REVERT_CONFIG, NULL, 0, 0, res->udata); libarms_log(ARMS_LOG_DEBUG, ""WAITING FOR ROLLBACK ESTABLISHED""); /* clear send buffer */ tr->len = 0; return err; } /* * Copy argument */ static int configure_cparg(AXP *axp, uint32_t pm_type, int tag, const char *buf, size_t len, tr_ctx_t *tr_ctx) { struct configure_args *arg = tr_ctx->arg; arms_context_t *res = arms_get_context(); uint32_t mod_id; const char *mod_ver = NULL; const char *mod_loc = NULL; arms_config_cb_t config_cb; int flag, err; static int module_added = 0; if (tr_ctx->result == 302) return 0; if (arg->already_running) { tr_ctx->result = 302; return 0; } config_cb = res->callbacks.config_cb; switch (tag) { case ARMS_TAG_START_CPARG: module_added = 1; arg->first = 1; break; case ARMS_TAG_END_CPARG: /* call sync_module if is not included. */ if (module_added) { configure_module_cb.udata = res; init_module_cb(&configure_module_cb); err = sync_module(); if (err < 0) { tr_ctx->result = 411;/*Commit failure*/ return -1; } module_added = 0; } break; case ARMS_TAG_MODULE: mod_id = get_module_id(axp, tag); mod_ver = get_module_ver(axp, tag); /* add module id to 'new' */ err = add_module(mod_id, mod_ver, buf); if (err < 0) { tr_ctx->result = 411;/*Commit failure*/ return -1; } break; case ARMS_TAG_MDCONF: if (module_added) { /* * move module id from 'new' to 'current' */ configure_module_cb.udata = res; init_module_cb(&configure_module_cb); err = sync_module(); if (err < 0) { tr_ctx->result = 411;/*Commit failure*/ return -1; } module_added = 0; } mod_id = get_module_id(axp, tag); if (!arms_module_is_exist(mod_id)) { /* * found, but not found. */ tr_ctx->result = 415;/*System Error*/ return -1; } mod_ver = lookup_module_ver(mod_id); mod_loc = lookup_module_location(mod_id); if (mod_loc == NULL) mod_loc = """"; if (config_cb == NULL) break; if (arms_get_encoding(axp, tag) == ARMS_DATA_BINARY) { /* decode base64 */ len = arms_base64_decode_stream(&arg->base64, arg->request, sizeof(arg->request) - 1, buf, len); arg->request[len] = '\0'; buf = arg->request; } /* * buf, len is prepared. * if res->fragment == 0 and AXP_PARSE_CONTENT, * buffered part of config. */ if (res->fragment == 0) { arg->catbuf = REALLOC(arg->catbuf, arg->catlen + len); if (arg->catbuf == NULL) { /*Resource Exhausted*/ tr_ctx->result = 413; return -1; } memcpy(arg->catbuf + arg->catlen, buf, len); arg->catlen += len; if (tr_ctx->parse_state == AXP_PARSE_CONTENT) { /* wait for next data */ return 0; } /* AXP_PARSE_END */ buf = arg->catbuf; len = arg->catlen; } /* set fragment flag */ flag = 0; if (arg->first) { flag |= ARMS_FRAG_FIRST; arg->first = 0; } /* continued' config */ if (tr_ctx->parse_state == AXP_PARSE_CONTENT) { flag |= ARMS_FRAG_CONTINUE; } /* callback it */ do { int slen; /* call config callback */ if (res->fragment != 0 && len > res->fragment) { slen = res->fragment; } else { slen = len; /* if last fragment */ if (tr_ctx->parse_state == AXP_PARSE_END) { flag |= ARMS_FRAG_FINISHED; /* prepare for next md-config */ arg->first = 1; } } err = (*config_cb) (mod_id, mod_ver, mod_loc, ARMS_PUSH_STORE_CONFIG, buf, slen, flag, res->udata); if (err) { arg->errs++; tr_ctx->result = 410; return -1; } buf += slen; len -= slen; flag &= ~ARMS_FRAG_FIRST; flag |= ARMS_FRAG_CONTINUE; } while(len > 0); if (arg->catbuf != NULL) { /* reset for next module id */ FREE(arg->catbuf); arg->catbuf = NULL; arg->catlen = 0; } break; default: break; } return 0; } /* * Done * * ... */ static int configure_done(transaction *tr, char *buf, int len, int *wrote) { tr_ctx_t *tr_ctx = &tr->tr_ctx; struct configure_args *arg = tr_ctx->arg; int size, total; int r; const char *desc; libarms_log(ARMS_LOG_DEBUG, ""Generate configure-done""); if (arg->commit_err) { if (tr->rollbacked) { r = 508; desc = ""Rollback failure""; } else { r = 411; desc = ""Commit failure""; } } else if (tr->rollbacked) { r = 414; desc = ""Rollbacked""; } else if (arg->syncing) { r = 303; desc = ""Module syncing""; } else { r = 100; desc = ""Success""; } tr->tr_ctx.result = r; total = size = arms_write_begin_message(tr, buf, len); buf += size; len -= size; total += arms_write_end_message(tr, buf, len); *wrote = total; return TR_WRITE_DONE; } extern struct axp_schema arms_generic_done_res_msg[]; /* * configure-done-response parser */ static int configure_parse(transaction *tr, const char *buf, int len) { tr_ctx_t *tr_ctx = &tr->tr_ctx; struct configure_args *arg = tr_ctx->arg; arms_context_t *res = arms_get_context(); AXP *axp; int rcode = 100; int err; /* check result code */ axp = axp_create(arms_generic_done_res_msg, ""US-ASCII"", tr_ctx, 0); MSETPOS(axp); if (axp == NULL) err = 1; else err = axp_parse(axp, buf, len); if (err == 0) { err = axp_refer(axp, ARMS_TAG_RCODE, &rcode); } axp_destroy(axp); if (err != 0) return TR_WANT_RETRY; tr_ctx->res_result = rcode; if (rcode >= 500) { res->result = ARMS_EREBOOT; switch (rcode) { case 501: res->result = ARMS_EDONTRETRY; res->trigger = ""received 501 Out of service""; break; case 502: res->result = ARMS_EPULL; res->trigger = ""received 502 Push failed""; break; case 503: res->result = ARMS_EREBOOT; res->trigger = ""received 503 Need reboot""; break; case 508: /* State Mismatch. */ res->result = ARMS_EPULL; break; } return TR_WANT_STOP; } if (rcode < 100 || rcode >= 200) { /* result code: failure*/ if (tr->rollbacked) { /* * retry to send done-req(rollbacked) * if temporary error */ if (rcode >= 300) { return TR_WANT_RETRY; } /* rollback failure, need to reboot. */ libarms_log(ARMS_LOG_EROLLBACK, ""rollback failure.""); res->result = ARMS_EPULL; res->trigger = ""rollback failure""; return TR_WANT_STOP; } else { /* * failure from server. * rollback configuration. */ return TR_WANT_ROLLBACK; } } /* Success. */ /* force clear rollback flag. */ tr->rollbacked = 0; /* * return ARMS_EREBOOT if ""Module syncing"" */ if (arg->syncing) { res->result = ARMS_EREBOOT; return TR_WANT_STOP; } /* * after configure, send push-confirmation * to notify new ip address, and limit retry of push-confirmation. */ res->result = ARMS_EPUSH; res->retry_inf = 0; return TR_WANT_STOP; } ",0 "ftware; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * Development of this code funded by Astaro AG (http://www.astaro.com/) */ #include #include #include #include #include #include #include #include static unsigned int nft_do_chain_bridge(void *priv, struct sk_buff *skb, const struct nf_hook_state *state) { struct nft_pktinfo pkt; nft_set_pktinfo(&pkt, skb, state); switch (eth_hdr(skb)->h_proto) { case htons(ETH_P_IP): nft_set_pktinfo_ipv4_validate(&pkt, skb); break; case htons(ETH_P_IPV6): nft_set_pktinfo_ipv6_validate(&pkt, skb); break; default: nft_set_pktinfo_unspec(&pkt, skb); break; } return nft_do_chain(&pkt, priv); } static const struct nf_chain_type filter_bridge = { .name = ""filter"", .type = NFT_CHAIN_T_DEFAULT, .family = NFPROTO_BRIDGE, .owner = THIS_MODULE, .hook_mask = (1 << NF_BR_PRE_ROUTING) | (1 << NF_BR_LOCAL_IN) | (1 << NF_BR_FORWARD) | (1 << NF_BR_LOCAL_OUT) | (1 << NF_BR_POST_ROUTING), .hooks = { [NF_BR_PRE_ROUTING] = nft_do_chain_bridge, [NF_BR_LOCAL_IN] = nft_do_chain_bridge, [NF_BR_FORWARD] = nft_do_chain_bridge, [NF_BR_LOCAL_OUT] = nft_do_chain_bridge, [NF_BR_POST_ROUTING] = nft_do_chain_bridge, }, }; static int __init nf_tables_bridge_init(void) { return nft_register_chain_type(&filter_bridge); } static void __exit nf_tables_bridge_exit(void) { nft_unregister_chain_type(&filter_bridge); } module_init(nf_tables_bridge_init); module_exit(nf_tables_bridge_exit); MODULE_LICENSE(""GPL""); MODULE_AUTHOR(""Patrick McHardy ""); MODULE_ALIAS_NFT_CHAIN(AF_BRIDGE, ""filter""); ",0 "Template { public function __construct(Twig_Environment $env) { parent::__construct($env); // line 1 $this->parent = $this->loadTemplate(""@WebProfiler/Profiler/layout.html.twig"", ""@WebProfiler/Collector/twig.html.twig"", 1); $this->blocks = array( 'toolbar' => array($this, 'block_toolbar'), 'menu' => array($this, 'block_menu'), 'panel' => array($this, 'block_panel'), ); } protected function doGetParent(array $context) { return ""@WebProfiler/Profiler/layout.html.twig""; } protected function doDisplay(array $context, array $blocks = array()) { $__internal_885a323ef25a1b959093aeade41483e120e0de4e3d9a6e34cb8e58b6f7319fe2 = $this->env->getExtension(""native_profiler""); $__internal_885a323ef25a1b959093aeade41483e120e0de4e3d9a6e34cb8e58b6f7319fe2->enter($__internal_885a323ef25a1b959093aeade41483e120e0de4e3d9a6e34cb8e58b6f7319fe2_prof = new Twig_Profiler_Profile($this->getTemplateName(), ""template"", ""@WebProfiler/Collector/twig.html.twig"")); $this->parent->display($context, array_merge($this->blocks, $blocks)); $__internal_885a323ef25a1b959093aeade41483e120e0de4e3d9a6e34cb8e58b6f7319fe2->leave($__internal_885a323ef25a1b959093aeade41483e120e0de4e3d9a6e34cb8e58b6f7319fe2_prof); } // line 3 public function block_toolbar($context, array $blocks = array()) { $__internal_0ed5225f2697c099b90f1fc0cf34b6562fea659c5d3d505a723d8ba8a596f87e = $this->env->getExtension(""native_profiler""); $__internal_0ed5225f2697c099b90f1fc0cf34b6562fea659c5d3d505a723d8ba8a596f87e->enter($__internal_0ed5225f2697c099b90f1fc0cf34b6562fea659c5d3d505a723d8ba8a596f87e_prof = new Twig_Profiler_Profile($this->getTemplateName(), ""block"", ""toolbar"")); // line 4 echo "" ""; $context[""time""] = (($this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""templatecount"", array())) ? (sprintf(""%0.0f"", $this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""time"", array()))) : (""n/a"")); // line 5 echo "" ""; ob_start(); // line 6 echo "" ""; echo twig_include($this->env, $context, ""@WebProfiler/Icon/twig.svg""); echo "" ""; // line 7 echo twig_escape_filter($this->env, (isset($context[""time""]) ? $context[""time""] : $this->getContext($context, ""time"")), ""html"", null, true); echo "" ms ""; $context[""icon""] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 10 echo "" ""; // line 11 ob_start(); // line 12 echo ""
        Render Time ""; // line 14 echo twig_escape_filter($this->env, (isset($context[""time""]) ? $context[""time""] : $this->getContext($context, ""time"")), ""html"", null, true); echo "" ms
        Template Calls ""; // line 18 echo twig_escape_filter($this->env, $this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""templatecount"", array()), ""html"", null, true); echo ""
        Block Calls ""; // line 22 echo twig_escape_filter($this->env, $this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""blockcount"", array()), ""html"", null, true); echo ""
        Macro Calls ""; // line 26 echo twig_escape_filter($this->env, $this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""macrocount"", array()), ""html"", null, true); echo ""
        ""; $context[""text""] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 29 echo "" ""; // line 30 echo twig_include($this->env, $context, ""@WebProfiler/Profiler/toolbar_item.html.twig"", array(""link"" => (isset($context[""profiler_url""]) ? $context[""profiler_url""] : $this->getContext($context, ""profiler_url"")))); echo "" ""; $__internal_0ed5225f2697c099b90f1fc0cf34b6562fea659c5d3d505a723d8ba8a596f87e->leave($__internal_0ed5225f2697c099b90f1fc0cf34b6562fea659c5d3d505a723d8ba8a596f87e_prof); } // line 33 public function block_menu($context, array $blocks = array()) { $__internal_e185df5c746139903cb6337f950162fcd4fbfa9902d8e610f7f9b358932fe565 = $this->env->getExtension(""native_profiler""); $__internal_e185df5c746139903cb6337f950162fcd4fbfa9902d8e610f7f9b358932fe565->enter($__internal_e185df5c746139903cb6337f950162fcd4fbfa9902d8e610f7f9b358932fe565_prof = new Twig_Profiler_Profile($this->getTemplateName(), ""block"", ""menu"")); // line 34 echo "" ""; // line 35 echo twig_include($this->env, $context, ""@WebProfiler/Icon/twig.svg""); echo "" Twig ""; $__internal_e185df5c746139903cb6337f950162fcd4fbfa9902d8e610f7f9b358932fe565->leave($__internal_e185df5c746139903cb6337f950162fcd4fbfa9902d8e610f7f9b358932fe565_prof); } // line 40 public function block_panel($context, array $blocks = array()) { $__internal_78c96d8d3b2ff40962666937ec89c012feae4a79819fc33dc91784001f046169 = $this->env->getExtension(""native_profiler""); $__internal_78c96d8d3b2ff40962666937ec89c012feae4a79819fc33dc91784001f046169->enter($__internal_78c96d8d3b2ff40962666937ec89c012feae4a79819fc33dc91784001f046169_prof = new Twig_Profiler_Profile($this->getTemplateName(), ""block"", ""panel"")); // line 41 echo "" ""; if (($this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""templatecount"", array()) == 0)) { // line 42 echo ""

        Twig

        No Twig templates were rendered for this request.

        ""; } else { // line 48 echo ""

        Twig Metrics

        ""; // line 52 echo twig_escape_filter($this->env, sprintf(""%0.0f"", $this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""time"", array())), ""html"", null, true); echo "" ms Render time
        ""; // line 57 echo twig_escape_filter($this->env, $this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""templatecount"", array()), ""html"", null, true); echo "" Template calls
        ""; // line 62 echo twig_escape_filter($this->env, $this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""blockcount"", array()), ""html"", null, true); echo "" Block calls
        ""; // line 67 echo twig_escape_filter($this->env, $this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""macrocount"", array()), ""html"", null, true); echo "" Macro calls

        Render time includes sub-requests rendering time (if any).

        Rendered Templates

        ""; // line 86 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""templates"", array())); foreach ($context['_seq'] as $context[""template""] => $context[""count""]) { // line 87 echo "" ""; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['template'], $context['count'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 92 echo ""
        Template Name Render Count
        ""; // line 88 echo twig_escape_filter($this->env, $context[""template""], ""html"", null, true); echo "" ""; // line 89 echo twig_escape_filter($this->env, $context[""count""], ""html"", null, true); echo ""

        Rendering Call Graph

        ""; // line 98 echo twig_escape_filter($this->env, $this->getAttribute((isset($context[""collector""]) ? $context[""collector""] : $this->getContext($context, ""collector"")), ""htmlcallgraph"", array()), ""html"", null, true); echo ""
        ""; } $__internal_78c96d8d3b2ff40962666937ec89c012feae4a79819fc33dc91784001f046169->leave($__internal_78c96d8d3b2ff40962666937ec89c012feae4a79819fc33dc91784001f046169_prof); } public function getTemplateName() { return ""@WebProfiler/Collector/twig.html.twig""; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 224 => 98, 216 => 92, 207 => 89, 203 => 88, 200 => 87, 196 => 86, 174 => 67, 166 => 62, 158 => 57, 150 => 52, 144 => 48, 136 => 42, 133 => 41, 127 => 40, 116 => 35, 113 => 34, 107 => 33, 98 => 30, 95 => 29, 89 => 26, 82 => 22, 75 => 18, 68 => 14, 64 => 12, 62 => 11, 59 => 10, 53 => 7, 48 => 6, 45 => 5, 42 => 4, 36 => 3, 11 => 1,); } } /* {% extends '@WebProfiler/Profiler/layout.html.twig' %}*/ /* */ /* {% block toolbar %}*/ /* {% set time = collector.templatecount ? '%0.0f'|format(collector.time) : 'n/a' %}*/ /* {% set icon %}*/ /* {{ include('@WebProfiler/Icon/twig.svg') }}*/ /* {{ time }}*/ /* ms*/ /* {% endset %}*/ /* */ /* {% set text %}*/ /*
        */ /* Render Time*/ /* {{ time }} ms*/ /*
        */ /*
        */ /* Template Calls*/ /* {{ collector.templatecount }}*/ /*
        */ /*
        */ /* Block Calls*/ /* {{ collector.blockcount }}*/ /*
        */ /*
        */ /* Macro Calls*/ /* {{ collector.macrocount }}*/ /*
        */ /* {% endset %}*/ /* */ /* {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }}*/ /* {% endblock %}*/ /* */ /* {% block menu %}*/ /* */ /* {{ include('@WebProfiler/Icon/twig.svg') }}*/ /* Twig*/ /* */ /* {% endblock %}*/ /* */ /* {% block panel %}*/ /* {% if collector.templatecount == 0 %}*/ /*

        Twig

        */ /* */ /*
        */ /*

        No Twig templates were rendered for this request.

        */ /*
        */ /* {% else %}*/ /*

        Twig Metrics

        */ /* */ /*
        */ /*
        */ /* {{ '%0.0f'|format(collector.time) }} ms*/ /* Render time*/ /*
        */ /* */ /*
        */ /* {{ collector.templatecount }}*/ /* Template calls*/ /*
        */ /* */ /*
        */ /* {{ collector.blockcount }}*/ /* Block calls*/ /*
        */ /* */ /*
        */ /* {{ collector.macrocount }}*/ /* Macro calls*/ /*
        */ /*
        */ /* */ /*

        */ /* Render time includes sub-requests rendering time (if any).*/ /*

        */ /* */ /*

        Rendered Templates

        */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* {% for template, count in collector.templates %}*/ /* */ /* */ /* */ /* */ /* {% endfor %}*/ /* */ /*
        Template NameRender Count
        {{ template }}{{ count }}
        */ /* */ /*

        Rendering Call Graph

        */ /* */ /*
        */ /* {{ collector.htmlcallgraph }}*/ /*
        */ /* {% endif %}*/ /* {% endblock %}*/ /* */ ",0 " ",0 """ description=""{$Think.config.WEB_DESCRIPTION}"" />
        ",0 "oftware livre; você pode redistribui-lo e/ou modificá-lo dentro dos termos da Licença Pública Geral Menor GNU como publicada pela Fundação do Software Livre (FSF); na versão 2.1 da Licença. Este programa é distribuído na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral Menor GNU em português para maiores detalhes. Você deve ter recebido uma cópia da Licença Pública Geral Menor GNU sob o nome de ""LICENSE.TXT"" junto com este programa, se não, acesse o site HSlife no endereco www.hslife.com.br ou escreva para a Fundação do Software Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. Para mais informações sobre o programa Imobiliária Web e seus autores acesso o endereço www.hslife.com.br, pelo e-mail contato@hslife.com.br ou escreva para Hércules S. S. José, Av. Ministro Lafaeyte de Andrade, 1683 - Bl. 3 Apt 404, Marco II - Nova Iguaçu, RJ, Brasil. ***/ package br.com.hslife.imobiliaria.logic; import java.util.List; import br.com.hslife.imobiliaria.exception.BusinessException; import br.com.hslife.imobiliaria.model.Usuario; public interface IUsuario { public void cadastrar(Usuario usuario) throws BusinessException; public void editar(Usuario usuario) throws BusinessException; public void habilitar(Long id) throws BusinessException; public Usuario buscar(Long id) throws BusinessException; public List buscar(Usuario usuario) throws BusinessException; public List buscarTodos() throws BusinessException; public Usuario buscarPorLogin(String login) throws BusinessException; public List buscarTodosPorLogin(String login) throws BusinessException; } ",0 "2.01 */ /* by Ralf Brown */ /* */ /* File frsymbol.h class FrSymbol */ /* LastEdit: 08nov2015 */ /* */ /* (c) Copyright 1994,1995,1996,1997,1998,2000,2001,2009,2012,2015 */ /* Ralf Brown/Carnegie Mellon University */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU Lesser General Public */ /* License as published by the Free Software Foundation, */ /* version 3. */ /* */ /* This program is distributed in the hope that it will be */ /* useful, but WITHOUT ANY WARRANTY; without even the implied */ /* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR */ /* PURPOSE. See the GNU Lesser General Public License for more */ /* details. */ /* */ /* You should have received a copy of the GNU Lesser General */ /* Public License (file COPYING) and General Public License (file */ /* GPL.txt) along with this program. If not, see */ /* http://www.gnu.org/licenses/ */ /* */ /************************************************************************/ #ifndef __FRSYMBOL_H_INCLUDED #define __FRSYMBOL_H_INCLUDED #ifndef __FRLIST_H_INCLUDED #include ""frlist.h"" #endif #include #if defined(__GNUC__) # pragma interface #endif /**********************************************************************/ /* Optional Demon support */ /**********************************************************************/ typedef bool FrDemonFunc(const FrSymbol *frame, const FrSymbol *slot, const FrSymbol *facet, const FrObject *value, va_list args) ; enum FrDemonType { DT_IfCreated, DT_IfAdded, DT_IfRetrieved, DT_IfMissing, DT_IfDeleted } ; struct FrDemonList ; struct FrDemons { FrDemonList *if_created ; // demons to call just after creating facet FrDemonList *if_added ; // demons to call just before adding filler FrDemonList *if_missing ; // demons to call before attempting inheritance FrDemonList *if_retrieved ; // demons to call just before returning filler FrDemonList *if_deleted ; // demons to call just after deleting filler void *operator new(size_t size) { return FrMalloc(size) ; } void operator delete(void *obj) { FrFree(obj) ; } } ; /**********************************************************************/ /**********************************************************************/ #ifdef FrSYMBOL_RELATION # define if_FrSYMBOL_RELATION(x) x #else # define if_FrSYMBOL_RELATION(x) #endif #ifdef FrSYMBOL_VALUE # define if_FrSYMBOL_VALUE(x) x #else # define if_FrSYMBOL_VALUE(x) #endif #ifdef FrDEMONS # define if_FrDEMONS(x) x #else # define if_FrDEMONS(x) #endif FrSymbol *findSymbol(const char *name) ; class FrSymbol : public FrAtom { private: FrFrame *m_frame ; // in lieu of a full property list, if_FrSYMBOL_RELATION(FrSymbol *m_inv_relation) ;// we have these 2 ptrs if_FrSYMBOL_VALUE(FrObject *m_value) ; if_FrDEMONS(FrDemons *theDemons) ; char m_name[1] ; //__attribute__((bnd_variable_size)) ; private: // methods void setInvRelation(FrSymbol *inv) { (void)inv ; if_FrSYMBOL_RELATION(m_inv_relation = inv) ; } void setDemons(FrDemons *d) { (void)d ; if_FrDEMONS(theDemons = d) ; } void *operator new(size_t size,void *where) { (void)size; return where ; } FrSymbol(const char *symname,int len) // private use for FramepaC only // { memcpy(m_name,(char *)symname,len) ; if_FrSYMBOL_VALUE(m_value = &UNBOUND) ; setFrame(0) ; setInvRelation(0) ; setDemons(0) ; } public: FrSymbol() _fnattr_noreturn ; virtual ~FrSymbol() _fnattr_noreturn ; void *operator new(size_t size) { return FrMalloc(size) ; } void operator delete(void *sym, size_t) { FrFree(sym) ; } virtual FrObjectType objType() const ; virtual const char *objTypeName() const ; virtual FrObjectType objSuperclass() const ; virtual ostream &printValue(ostream &output) const ; virtual char *displayValue(char *buffer) const ; virtual size_t displayLength() const ; virtual void freeObject() {} // can never free a FrSymbol virtual long int intValue() const ; virtual const char *printableName() const ; virtual FrSymbol *coerce2symbol(FrCharEncoding) const { return (FrSymbol*)this ; } virtual bool symbolp() const ; virtual size_t length() const ; virtual int compare(const FrObject *obj) const ; FrSymbol *makeSymbol(const char *nam) const ; FrSymbol *findSymbol(const char *nam) const ; const char *symbolName() const { return m_name ; } static bool nameNeedsQuoting(const char *name) ; FrFrame *symbolFrame() const { return m_frame ; } ostream &printBinding(ostream &output) const ; #ifdef FrSYMBOL_VALUE void setValue(const FrObject *newval) { m_value = (FrObject *)newval; } FrObject *symbolValue() const { return m_value ; } #else void setValue(const FrObject *newval) ; FrObject *symbolValue() const ; #endif /* FrSYMBOL_VALUE */ #ifdef FrDEMONS FrDemons *demons() const { return theDemons ; } bool addDemon(FrDemonType type,FrDemonFunc *func, va_list args = 0) ; bool removeDemon(FrDemonType type, FrDemonFunc *func) ; #else FrDemons *demons() const { return 0 ; } bool addDemon(FrDemonType,FrDemonFunc,va_list=0) { return false ; } bool removeDemon(FrDemonType,FrDemonFunc) { return false ; } #endif /* FrDEMONS */ void setFrame(const FrFrame *fr) { m_frame = (FrFrame *)fr ; } void defineRelation(const FrSymbol *inverse) ; void undefineRelation() ; #ifdef FrSYMBOL_RELATION FrSymbol *inverseRelation() const { return m_inv_relation ; } #else FrSymbol *inverseRelation() const { return 0 ; } #endif /* FrSYMBOL_RELATION */ //functions to support VFrames FrFrame *createFrame() ; FrFrame *createVFrame() ; FrFrame *createInstanceFrame() ; bool isFrame() ; bool isDeletedFrame() ; FrFrame *findFrame() ; int startTransaction() ; int endTransaction(int transaction) ; int abortTransaction(int transaction) ; FrFrame *lockFrame() ; static bool lockFrames(FrList *locklist) ; bool unlockFrame() ; static bool unlockFrames(FrList *locklist) ; bool isLocked() const ; bool emptyFrame() ; bool dirtyFrame() ; int commitFrame() ; int discardFrame() ; int deleteFrame() ; FrFrame *oldFrame(int generation) ; FrFrame *copyFrame(FrSymbol *newframe, bool temporary = false) ; bool renameFrame(FrSymbol *newname) ; FrSlot *createSlot(const FrSymbol *slotname) ; void createFacet(const FrSymbol *slotname, const FrSymbol *facetname) ; void addFiller(const FrSymbol *slotname,const FrSymbol *facet, const FrObject *filler) ; void addValue(const FrSymbol *slotname, const FrObject *filler) ; void addSem(const FrSymbol *slotname, const FrObject *filler) ; void addFillers(const FrSymbol *slotname,const FrSymbol *facet, const FrList *fillers); void addValues(const FrSymbol *slotname, const FrList *fillers) ; void addSems(const FrSymbol *slotname, const FrList *fillers) ; void pushFiller(const FrSymbol *slotname,const FrSymbol *facet, const FrObject *filler) ; FrObject *popFiller(const FrSymbol *slotname, const FrSymbol *facet) ; void replaceFiller(const FrSymbol *slotname, const FrSymbol *facetname, const FrObject *old, const FrObject *newfiller) ; void replaceFiller(const FrSymbol *slotname, const FrSymbol *facetname, const FrObject *old, const FrObject *newfiller, FrCompareFunc cmp) ; void replaceFacet(const FrSymbol *slotname, const FrSymbol *facet, const FrList *newfillers) ; void eraseFrame() ; void eraseCopyFrame() ; void eraseSlot(const char *slotname) ; void eraseSlot(const FrSymbol *slotname) ; void eraseFacet(const FrSymbol *slotname,const FrSymbol *facetname) ; void eraseFiller(const FrSymbol *slotname,const FrSymbol *facetname, const FrObject *filler) ; void eraseFiller(const FrSymbol *slotname,const FrSymbol *facetname, const FrObject *filler,FrCompareFunc cmp) ; void eraseSem(const FrSymbol *slotname, const FrObject *filler) ; void eraseSem(const FrSymbol *slotname, const FrObject *filler, FrCompareFunc cmp) ; void eraseValue(const FrSymbol *slotname, const FrObject *filler) ; void eraseValue(const FrSymbol *slotname, const FrObject *filler, FrCompareFunc cmp) ; // const FrList *getImmedFillers(const FrSymbol *slotname, // const FrSymbol *facet) const ; const FrList *getFillers(const FrSymbol *slotname, const FrSymbol *facet, bool inherit = true) ; FrObject *firstFiller(const FrSymbol *slotname,const FrSymbol *facet, bool inherit = true) ; const FrList *getValues(const FrSymbol *slotname,bool inherit = true) ; FrObject *getValue(const FrSymbol *slotname,bool inherit=true) ; const FrList *getSem(const FrSymbol *slotname,bool inherit = true) ; bool isA_p(FrSymbol *poss_parent) ; bool partOf_p(FrSymbol *poss_container) ; FrList *collectSlots(FrInheritanceType inherit,FrList *allslots=0, bool include_names = false) ; void inheritAll() ; void inheritAll(FrInheritanceType inherit) ; FrList *allSlots() const ; FrList *slotFacets(const FrSymbol *slotname) const ; bool doSlots(bool (*func)(const FrFrame *frame, const FrSymbol *slot, va_list args), va_list args) ; bool doFacets(const FrSymbol *slotname, bool (*func)(const FrFrame *frame, const FrSymbol *slot, const FrSymbol *facet, va_list args), va_list args) ; bool doAllFacets(bool (*func)(const FrFrame *frame, const FrSymbol *slot, const FrSymbol *facet, va_list args), va_list args) ; //overloaded operators int operator == (const char *symname) const { return (FrSymbol *)this == findSymbol(symname) ; } int operator != (const char *symname) const { return (FrSymbol *)this != findSymbol(symname) ; } operator char* () const { return (char*)symbolName() ; } //friends friend class FrSymbolTable ; } ; //---------------------------------------------------------------------- // non-member functions related to class FrSymbol FrSymbol *read_Symbol(istream &input) ; FrSymbol *string_to_Symbol(const char *&input) ; bool verify_Symbol(const char *&input, bool strict = false) ; FrSymbol *makeSymbol(const FrSymbol *sym) ; // copy from another symbol table FrSymbol *gensym(const char *basename = 0, const char *suffix = 0) ; FrSymbol *gensym(const FrSymbol *basename) ; void define_relation(const char *relname,const char *invname) ; void undefine_relation(const char *relname) ; /**********************************************************************/ /* Optional Demon support */ /**********************************************************************/ #ifdef FrDEMONS inline bool add_demon(FrSymbol *sym, FrDemonType type, FrDemonFunc *func,va_list args) { return (sym) ? sym->addDemon(type,func,args) : false ; } inline bool remove_demon(FrSymbol *sym, FrDemonType type, FrDemonFunc *func) { return (sym) ? sym->removeDemon(type,func) : false ; } #endif /* FrDEMONS */ /**********************************************************************/ /* overloaded operators (non-member functions) */ /**********************************************************************/ inline istream &operator >> (istream &input,FrSymbol *&obj) { FramepaC_bgproc() ; obj = read_Symbol(input) ; return input ; } #endif /* !__FRSYMBOL_H_INCLUDED */ // end of file frsymbol.h // ",0 "mportant, usually automatically. “All the work I did this weekend got stomped on last night by the nightly server script.” Compare `*scribble* `__, `*mangle* <../M/mangle.html>`__, `*trash* <../T/trash.html>`__, `*scrog* `__, `*roach* <../R/roach.html>`__. -------------- +--------------------------------------+----------------------------+------------------------------+ | `Prev `__  | `Up <../S.html>`__ |  `Next `__ | +--------------------------------------+----------------------------+------------------------------+ | stir-fried random  | `Home <../index.html>`__ |  Stone Age | +--------------------------------------+----------------------------+------------------------------+ ",0 "t and/or modify * it under the terms of the GNU General Public License version 2 only, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License version 2 for more details (a copy is included * in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ /* * Copyright (c) 2003 Hewlett-Packard Development Company LP. * Developed under the sponsorship of the US Government under * Subcontract No. B514193 * * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * * Copyright (c) 2010, 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ * Lustre is a trademark of Sun Microsystems, Inc. */ /** * This file implements POSIX lock type for Lustre. * Its policy properties are start and end of extent and PID. * * These locks are only done through MDS due to POSIX semantics requiring * e.g. that locks could be only partially released and as such split into * two parts, and also that two adjacent locks from the same process may be * merged into a single wider lock. * * Lock modes are mapped like this: * PR and PW for READ and WRITE locks * NL to request a releasing of a portion of the lock * * These flock locks never timeout. */ #define DEBUG_SUBSYSTEM S_LDLM #include #include #include #include #include #include ""ldlm_internal.h"" /** * list_for_remaining_safe - iterate over the remaining entries in a list * and safeguard against removal of a list entry. * \param pos the &struct list_head to use as a loop counter. pos MUST * have been initialized prior to using it in this macro. * \param n another &struct list_head to use as temporary storage * \param head the head for your list. */ #define list_for_remaining_safe(pos, n, head) \ for (n = pos->next; pos != (head); pos = n, n = pos->next) static inline int ldlm_same_flock_owner(struct ldlm_lock *lock, struct ldlm_lock *new) { return((new->l_policy_data.l_flock.owner == lock->l_policy_data.l_flock.owner) && (new->l_export == lock->l_export)); } static inline int ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new) { return((new->l_policy_data.l_flock.start <= lock->l_policy_data.l_flock.end) && (new->l_policy_data.l_flock.end >= lock->l_policy_data.l_flock.start)); } static inline void ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags) { LDLM_DEBUG(lock, ""%s(mode: %d, flags: 0x%llx)"", __func__, mode, flags); /* Safe to not lock here, since it should be empty anyway */ LASSERT(hlist_unhashed(&lock->l_exp_flock_hash)); list_del_init(&lock->l_res_link); if (flags == LDLM_FL_WAIT_NOREPROC) { /* client side - set a flag to prevent sending a CANCEL */ lock->l_flags |= LDLM_FL_LOCAL_ONLY | LDLM_FL_CBPENDING; /* when reaching here, it is under lock_res_and_lock(). Thus, * need call the nolock version of ldlm_lock_decref_internal */ ldlm_lock_decref_internal_nolock(lock, mode); } ldlm_lock_destroy_nolock(lock); } /** * Process a granting attempt for flock lock. * Must be called under ns lock held. * * This function looks for any conflicts for \a lock in the granted or * waiting queues. The lock is granted if no conflicts are found in * either queue. * * It is also responsible for splitting a lock if a portion of the lock * is released. * * If \a first_enq is 0 (ie, called from ldlm_reprocess_queue): * - blocking ASTs have already been sent * * If \a first_enq is 1 (ie, called from ldlm_lock_enqueue): * - blocking ASTs have not been sent yet, so list of conflicting locks * would be collected and ASTs sent. */ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, int first_enq, enum ldlm_error *err, struct list_head *work_list) { struct ldlm_resource *res = req->l_resource; struct ldlm_namespace *ns = ldlm_res_to_ns(res); struct list_head *tmp; struct list_head *ownlocks = NULL; struct ldlm_lock *lock = NULL; struct ldlm_lock *new = req; struct ldlm_lock *new2 = NULL; enum ldlm_mode mode = req->l_req_mode; int added = (mode == LCK_NL); int overlaps = 0; int splitted = 0; const struct ldlm_callback_suite null_cbs = { }; CDEBUG(D_DLMTRACE, ""flags %#llx owner %llu pid %u mode %u start %llu end %llu\n"", *flags, new->l_policy_data.l_flock.owner, new->l_policy_data.l_flock.pid, mode, req->l_policy_data.l_flock.start, req->l_policy_data.l_flock.end); *err = ELDLM_OK; /* No blocking ASTs are sent to the clients for * Posix file & record locks */ req->l_blocking_ast = NULL; reprocess: if ((*flags == LDLM_FL_WAIT_NOREPROC) || (mode == LCK_NL)) { /* This loop determines where this processes locks start * in the resource lr_granted list. */ list_for_each(tmp, &res->lr_granted) { lock = list_entry(tmp, struct ldlm_lock, l_res_link); if (ldlm_same_flock_owner(lock, req)) { ownlocks = tmp; break; } } } else { int reprocess_failed = 0; lockmode_verify(mode); /* This loop determines if there are existing locks * that conflict with the new lock request. */ list_for_each(tmp, &res->lr_granted) { lock = list_entry(tmp, struct ldlm_lock, l_res_link); if (ldlm_same_flock_owner(lock, req)) { if (!ownlocks) ownlocks = tmp; continue; } /* locks are compatible, overlap doesn't matter */ if (lockmode_compat(lock->l_granted_mode, mode)) continue; if (!ldlm_flocks_overlap(lock, req)) continue; if (!first_enq) { reprocess_failed = 1; continue; } if (*flags & LDLM_FL_BLOCK_NOWAIT) { ldlm_flock_destroy(req, mode, *flags); *err = -EAGAIN; return LDLM_ITER_STOP; } if (*flags & LDLM_FL_TEST_LOCK) { ldlm_flock_destroy(req, mode, *flags); req->l_req_mode = lock->l_granted_mode; req->l_policy_data.l_flock.pid = lock->l_policy_data.l_flock.pid; req->l_policy_data.l_flock.start = lock->l_policy_data.l_flock.start; req->l_policy_data.l_flock.end = lock->l_policy_data.l_flock.end; *flags |= LDLM_FL_LOCK_CHANGED; return LDLM_ITER_STOP; } ldlm_resource_add_lock(res, &res->lr_waiting, req); *flags |= LDLM_FL_BLOCK_GRANTED; return LDLM_ITER_STOP; } if (reprocess_failed) return LDLM_ITER_CONTINUE; } if (*flags & LDLM_FL_TEST_LOCK) { ldlm_flock_destroy(req, mode, *flags); req->l_req_mode = LCK_NL; *flags |= LDLM_FL_LOCK_CHANGED; return LDLM_ITER_STOP; } /* Scan the locks owned by this process that overlap this request. * We may have to merge or split existing locks. */ if (!ownlocks) ownlocks = &res->lr_granted; list_for_remaining_safe(ownlocks, tmp, &res->lr_granted) { lock = list_entry(ownlocks, struct ldlm_lock, l_res_link); if (!ldlm_same_flock_owner(lock, new)) break; if (lock->l_granted_mode == mode) { /* If the modes are the same then we need to process * locks that overlap OR adjoin the new lock. The extra * logic condition is necessary to deal with arithmetic * overflow and underflow. */ if ((new->l_policy_data.l_flock.start > (lock->l_policy_data.l_flock.end + 1)) && (lock->l_policy_data.l_flock.end != OBD_OBJECT_EOF)) continue; if ((new->l_policy_data.l_flock.end < (lock->l_policy_data.l_flock.start - 1)) && (lock->l_policy_data.l_flock.start != 0)) break; if (new->l_policy_data.l_flock.start < lock->l_policy_data.l_flock.start) { lock->l_policy_data.l_flock.start = new->l_policy_data.l_flock.start; } else { new->l_policy_data.l_flock.start = lock->l_policy_data.l_flock.start; } if (new->l_policy_data.l_flock.end > lock->l_policy_data.l_flock.end) { lock->l_policy_data.l_flock.end = new->l_policy_data.l_flock.end; } else { new->l_policy_data.l_flock.end = lock->l_policy_data.l_flock.end; } if (added) { ldlm_flock_destroy(lock, mode, *flags); } else { new = lock; added = 1; } continue; } if (new->l_policy_data.l_flock.start > lock->l_policy_data.l_flock.end) continue; if (new->l_policy_data.l_flock.end < lock->l_policy_data.l_flock.start) break; ++overlaps; if (new->l_policy_data.l_flock.start <= lock->l_policy_data.l_flock.start) { if (new->l_policy_data.l_flock.end < lock->l_policy_data.l_flock.end) { lock->l_policy_data.l_flock.start = new->l_policy_data.l_flock.end + 1; break; } ldlm_flock_destroy(lock, lock->l_req_mode, *flags); continue; } if (new->l_policy_data.l_flock.end >= lock->l_policy_data.l_flock.end) { lock->l_policy_data.l_flock.end = new->l_policy_data.l_flock.start - 1; continue; } /* split the existing lock into two locks */ /* if this is an F_UNLCK operation then we could avoid * allocating a new lock and use the req lock passed in * with the request but this would complicate the reply * processing since updates to req get reflected in the * reply. The client side replays the lock request so * it must see the original lock data in the reply. */ /* XXX - if ldlm_lock_new() can sleep we should * release the lr_lock, allocate the new lock, * and restart processing this lock. */ if (!new2) { unlock_res_and_lock(req); new2 = ldlm_lock_create(ns, &res->lr_name, LDLM_FLOCK, lock->l_granted_mode, &null_cbs, NULL, 0, LVB_T_NONE); lock_res_and_lock(req); if (IS_ERR(new2)) { ldlm_flock_destroy(req, lock->l_granted_mode, *flags); *err = PTR_ERR(new2); return LDLM_ITER_STOP; } goto reprocess; } splitted = 1; new2->l_granted_mode = lock->l_granted_mode; new2->l_policy_data.l_flock.pid = new->l_policy_data.l_flock.pid; new2->l_policy_data.l_flock.owner = new->l_policy_data.l_flock.owner; new2->l_policy_data.l_flock.start = lock->l_policy_data.l_flock.start; new2->l_policy_data.l_flock.end = new->l_policy_data.l_flock.start - 1; lock->l_policy_data.l_flock.start = new->l_policy_data.l_flock.end + 1; new2->l_conn_export = lock->l_conn_export; if (lock->l_export) { new2->l_export = class_export_lock_get(lock->l_export, new2); if (new2->l_export->exp_lock_hash && hlist_unhashed(&new2->l_exp_hash)) cfs_hash_add(new2->l_export->exp_lock_hash, &new2->l_remote_handle, &new2->l_exp_hash); } if (*flags == LDLM_FL_WAIT_NOREPROC) ldlm_lock_addref_internal_nolock(new2, lock->l_granted_mode); /* insert new2 at lock */ ldlm_resource_add_lock(res, ownlocks, new2); LDLM_LOCK_RELEASE(new2); break; } /* if new2 is created but never used, destroy it*/ if (splitted == 0 && new2) ldlm_lock_destroy_nolock(new2); /* At this point we're granting the lock request. */ req->l_granted_mode = req->l_req_mode; if (!added) { list_del_init(&req->l_res_link); /* insert new lock before ownlocks in list. */ ldlm_resource_add_lock(res, ownlocks, req); } if (*flags != LDLM_FL_WAIT_NOREPROC) { /* The only one possible case for client-side calls flock * policy function is ldlm_flock_completion_ast inside which * carries LDLM_FL_WAIT_NOREPROC flag. */ CERROR(""Illegal parameter for client-side-only module.\n""); LBUG(); } /* In case we're reprocessing the requested lock we can't destroy * it until after calling ldlm_add_ast_work_item() above so that laawi() * can bump the reference count on \a req. Otherwise \a req * could be freed before the completion AST can be sent. */ if (added) ldlm_flock_destroy(req, mode, *flags); ldlm_resource_dump(D_INFO, res); return LDLM_ITER_CONTINUE; } struct ldlm_flock_wait_data { struct ldlm_lock *fwd_lock; int fwd_generation; }; static void ldlm_flock_interrupted_wait(void *data) { struct ldlm_lock *lock; lock = ((struct ldlm_flock_wait_data *)data)->fwd_lock; lock_res_and_lock(lock); /* client side - set flag to prevent lock from being put on LRU list */ ldlm_set_cbpending(lock); unlock_res_and_lock(lock); } /** * Flock completion callback function. * * \param lock [in,out]: A lock to be handled * \param flags [in]: flags * \param *data [in]: ldlm_work_cp_ast_lock() will use ldlm_cb_set_arg * * \retval 0 : success * \retval <0 : failure */ int ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) { struct file_lock *getlk = lock->l_ast_data; struct obd_device *obd; struct obd_import *imp = NULL; struct ldlm_flock_wait_data fwd; struct l_wait_info lwi; enum ldlm_error err; int rc = 0; OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT2, 4); if (OBD_FAIL_PRECHECK(OBD_FAIL_LDLM_CP_CB_WAIT3)) { lock_res_and_lock(lock); lock->l_flags |= LDLM_FL_FAIL_LOC; unlock_res_and_lock(lock); OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT3, 4); } CDEBUG(D_DLMTRACE, ""flags: 0x%llx data: %p getlk: %p\n"", flags, data, getlk); LASSERT(flags != LDLM_FL_WAIT_NOREPROC); if (flags & LDLM_FL_FAILED) goto granted; if (!(flags & LDLM_FL_BLOCKED_MASK)) { if (!data) /* mds granted the lock in the reply */ goto granted; /* CP AST RPC: lock get granted, wake it up */ wake_up(&lock->l_waitq); return 0; } LDLM_DEBUG(lock, ""client-side enqueue returned a blocked lock, sleeping""); fwd.fwd_lock = lock; obd = class_exp2obd(lock->l_conn_export); /* if this is a local lock, there is no import */ if (obd) imp = obd->u.cli.cl_import; if (imp) { spin_lock(&imp->imp_lock); fwd.fwd_generation = imp->imp_generation; spin_unlock(&imp->imp_lock); } lwi = LWI_TIMEOUT_INTR(0, NULL, ldlm_flock_interrupted_wait, &fwd); /* Go to sleep until the lock is granted. */ rc = l_wait_event(lock->l_waitq, is_granted_or_cancelled(lock), &lwi); if (rc) { LDLM_DEBUG(lock, ""client-side enqueue waking up: failed (%d)"", rc); return rc; } granted: OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT, 10); if (OBD_FAIL_PRECHECK(OBD_FAIL_LDLM_CP_CB_WAIT4)) { lock_res_and_lock(lock); /* DEADLOCK is always set with CBPENDING */ lock->l_flags |= LDLM_FL_FLOCK_DEADLOCK | LDLM_FL_CBPENDING; unlock_res_and_lock(lock); OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT4, 4); } if (OBD_FAIL_PRECHECK(OBD_FAIL_LDLM_CP_CB_WAIT5)) { lock_res_and_lock(lock); /* DEADLOCK is always set with CBPENDING */ lock->l_flags |= LDLM_FL_FAIL_LOC | LDLM_FL_FLOCK_DEADLOCK | LDLM_FL_CBPENDING; unlock_res_and_lock(lock); OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CP_CB_WAIT5, 4); } lock_res_and_lock(lock); /* * Protect against race where lock could have been just destroyed * due to overlap in ldlm_process_flock_lock(). */ if (ldlm_is_destroyed(lock)) { unlock_res_and_lock(lock); LDLM_DEBUG(lock, ""client-side enqueue waking up: destroyed""); /* * An error is still to be returned, to propagate it up to * ldlm_cli_enqueue_fini() caller. */ return -EIO; } /* ldlm_lock_enqueue() has already placed lock on the granted list. */ ldlm_resource_unlink_lock(lock); /* * Import invalidation. We need to actually release the lock * references being held, so that it can go away. No point in * holding the lock even if app still believes it has it, since * server already dropped it anyway. Only for granted locks too. */ /* Do the same for DEADLOCK'ed locks. */ if (ldlm_is_failed(lock) || ldlm_is_flock_deadlock(lock)) { int mode; if (flags & LDLM_FL_TEST_LOCK) LASSERT(ldlm_is_test_lock(lock)); if (ldlm_is_test_lock(lock) || ldlm_is_flock_deadlock(lock)) mode = getlk->fl_type; else mode = lock->l_granted_mode; if (ldlm_is_flock_deadlock(lock)) { LDLM_DEBUG(lock, ""client-side enqueue deadlock received""); rc = -EDEADLK; } ldlm_flock_destroy(lock, mode, LDLM_FL_WAIT_NOREPROC); unlock_res_and_lock(lock); /* Need to wake up the waiter if we were evicted */ wake_up(&lock->l_waitq); /* * An error is still to be returned, to propagate it up to * ldlm_cli_enqueue_fini() caller. */ return rc ? : -EIO; } LDLM_DEBUG(lock, ""client-side enqueue granted""); if (flags & LDLM_FL_TEST_LOCK) { /* fcntl(F_GETLK) request */ /* The old mode was saved in getlk->fl_type so that if the mode * in the lock changes we can decref the appropriate refcount. */ LASSERT(ldlm_is_test_lock(lock)); ldlm_flock_destroy(lock, getlk->fl_type, LDLM_FL_WAIT_NOREPROC); switch (lock->l_granted_mode) { case LCK_PR: getlk->fl_type = F_RDLCK; break; case LCK_PW: getlk->fl_type = F_WRLCK; break; default: getlk->fl_type = F_UNLCK; } getlk->fl_pid = -(pid_t)lock->l_policy_data.l_flock.pid; getlk->fl_start = (loff_t)lock->l_policy_data.l_flock.start; getlk->fl_end = (loff_t)lock->l_policy_data.l_flock.end; } else { __u64 noreproc = LDLM_FL_WAIT_NOREPROC; /* We need to reprocess the lock to do merges or splits * with existing locks owned by this process. */ ldlm_process_flock_lock(lock, &noreproc, 1, &err, NULL); } unlock_res_and_lock(lock); return rc; } EXPORT_SYMBOL(ldlm_flock_completion_ast); void ldlm_flock_policy_wire_to_local(const union ldlm_wire_policy_data *wpolicy, union ldlm_policy_data *lpolicy) { lpolicy->l_flock.start = wpolicy->l_flock.lfw_start; lpolicy->l_flock.end = wpolicy->l_flock.lfw_end; lpolicy->l_flock.pid = wpolicy->l_flock.lfw_pid; lpolicy->l_flock.owner = wpolicy->l_flock.lfw_owner; } void ldlm_flock_policy_local_to_wire(const union ldlm_policy_data *lpolicy, union ldlm_wire_policy_data *wpolicy) { memset(wpolicy, 0, sizeof(*wpolicy)); wpolicy->l_flock.lfw_start = lpolicy->l_flock.start; wpolicy->l_flock.lfw_end = lpolicy->l_flock.end; wpolicy->l_flock.lfw_pid = lpolicy->l_flock.pid; wpolicy->l_flock.lfw_owner = lpolicy->l_flock.owner; } ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. * */ package org.apache.skywalking.apm.collector.core.data; /** * @author peng-yongsheng */ public interface Operation { String operate(String newValue, String oldValue); Long operate(Long newValue, Long oldValue); Double operate(Double newValue, Double oldValue); Integer operate(Integer newValue, Integer oldValue); Boolean operate(Boolean newValue, Boolean oldValue); byte[] operate(byte[] newValue, byte[] oldValue); } ",0 "* Connects to and configures the MySQL database with dummy data for testing. * * Base code provided by Andrew Gilman * * @package cgwatkin/a3 * @author Cai Gwatkin */ class Model { protected $db; function __construct() { $this->db = new mysqli( DB_HOST, DB_USER, DB_PASS ); if (!$this->db) { throw new MySQLDatabaseException($this->db->connect_error, $this->db->connect_errno); } //---------------------------------------------------------------------------- // Creates the database and populates it with sample data $this->db->query('CREATE DATABASE IF NOT EXISTS '.DB_NAME.';'); if (!$this->db->select_db(DB_NAME)) { throw new MySQLDatabaseException('MySQL database not available'); } $result = $this->db->query('SHOW TABLES LIKE ""user"";'); if ($result->num_rows == 0) { // table doesn't exist // create it and populate with sample data $result = $this->db->query( 'CREATE TABLE user ( id INT unsigned NOT NULL UNIQUE AUTO_INCREMENT, username VARCHAR(256) NOT NULL UNIQUE, pwd VARCHAR(256) NOT NULL, name VARCHAR(256) NOT NULL, PRIMARY KEY (id) );'); if (!$result) { error_log($this->db->error); throw new MySQLDatabaseException('Failed creating table: user'); } // Add sample data, password is hashed on combination of ID and inputted password $pwd1 = password_hash('1'.'admin', PASSWORD_DEFAULT); $pwd2 = password_hash('2'.'TheToolman', PASSWORD_DEFAULT); $pwd3 = password_hash('3'.'maryMARY', PASSWORD_DEFAULT); $pwd4 = password_hash('4'.'joeyJOEY', PASSWORD_DEFAULT); if(!$this->db->query( ""INSERT INTO user VALUES (NULL,'admin','$pwd1','Admin'), (NULL,'TheToolman','$pwd2','Tim Taylor'), (NULL,'mary','$pwd3','Mary'), (NULL,'joey','$pwd4','Joey');"" )) { error_log($this->db->error); throw new MySQLDatabaseException('Failed adding sample data to table: user'); } } $result = $this->db->query('SHOW TABLES LIKE ""product"";'); if ($result->num_rows == 0) { // table doesn't exist // create it and populate with sample data $result = $this->db->query( 'CREATE TABLE product ( id INT UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT, sku CHAR(6) NOT NULL UNIQUE, name VARCHAR(256) NOT NULL, cost DECIMAL(19,2) UNSIGNED NOT NULL, category VARCHAR(40) NOT NULL, stock MEDIUMINT UNSIGNED NOT NULL, PRIMARY KEY (id), INDEX ix_product (category) );'); if (!$result) { error_log($this->db->error); throw new MySQLDatabaseException('Failed creating table: product'); } // Add sample data if(!$this->db->query( ""INSERT INTO product VALUES (NULL,'HMR000','Claw Hammer',5.95,'Hammer',21), (NULL,'HMR001','Ball Pein',8.95,'Hammer',22), (NULL,'HMR002','Club Hammer',6.95,'Hammer',13), (NULL,'SCW000','Slot Screwdriver',9.95,'Screwdriver',13), (NULL,'SCW001','Phillips Screwdriver',14.95,'Screwdriver',28), (NULL,'SCW002','Pozidriv Screwdriver',14.95,'Screwdriver',40), (NULL,'KNF000','Pocket Knife',24.95,'Knife',19), (NULL,'KNF001','Locking Knife',24.95,'Knife',8), (NULL,'KNF002','Craft Knife',12.95,'Knife',21), (NULL,'TPE000','Masking Tape',8.95,'Tape',17), (NULL,'TPE001','Duct Tape',12.95,'Tape',32), (NULL,'TPE002','Electrical Tape',8.95,'Tape',32);"" )) { error_log($this->db->error); throw new MySQLDatabaseException('Failed adding sample data to table: product'); } } //---------------------------------------------------------------------------- } } ",0 "nim.signals.*; import ddf.minim.*; import ddf.minim.analysis.*; import ddf.minim.ugens.*; import ddf.minim.effects.*; import codeanticode.syphon.*; import java.util.HashMap; import java.util.ArrayList; import java.io.File; import java.io.BufferedReader; import java.io.PrintWriter; import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; public class ANTES01 extends PApplet { // ////////// // // WRAP // Syphon/minim/fun000 // // V.00 paraelfestival""ANTES"" // feelGoodSoftwareporGuillermoGonz\u00e1lezIrigoyen // ////////// // //VARIABLES DE CONFIGURACI\u00d3N //Tama\u00f1o de la pantalla , proporciones y tweak boolean pCompleta = false; //salidas a proyector 1024X768 boolean pCambiable= true; int pPantalla = 4; int pP,pW,pH; //Syphon SyphonServer server; String nombreServer = ""ANTES01""; //Audio Minim minim; AudioInput in0; // // ... //LINEA Linea lin,lin1; int[] coloresAntes = { 0xff2693FF, 0xffEF3B63 , 0xffFFFFFB, 0xff000000}; int numColor = 1; boolean hay; int alfa = 255; boolean moverL = false; boolean moverH = false; int xIL = 0; int yIL = 10; int intA = 50; int sepLR = 5; int anchoL = 0; int anchoR = 0; int anchoS = 1; int distMov = 1; //FONDO boolean fondo = true; boolean textura = true; boolean sinCuadricula = true; int R = 85; int G = 85; int B = 85; int A = 10; //CONTROLES boolean sumar = true; int paso = 2; //##SETUP## // public void setup() { //CANVAS pP = (pCompleta == true)? 1 : pPantalla; size(displayWidth/pP, displayHeight/pP, P3D); pW=width;pH=height; frame.setResizable(pCambiable); //SYPHON SERVER server = new SyphonServer(this, nombreServer); //AUDIO minim = new Minim(this); in0 = minim.getLineIn(); // // ... yIL = height/2; lin = new Linea(xIL, yIL, coloresAntes[numColor], alfa); lin1 = new Linea(xIL, yIL-50, coloresAntes[numColor+1], alfa); } //##DRAW## // public void draw() { pW=width; pH=height; if(fondo){ background(coloresAntes[2]); } int normi; pushMatrix(); for(int i = 0; i < pW; i++) { normi=i; if(i>1024||i==1024){ normi = PApplet.parseInt(norm(i,0,1024)); } lin.conectarHorizontal(i, normi, intA, sepLR, anchoL, anchoR, anchoS, coloresAntes[numColor], alfa); } if(moverL==true){ lin.moverVertical(moverL, distMov, moverH); lin1.moverVertical(moverL, distMov, moverH); } popMatrix(); //fondo if(textura){ pushMatrix(); fondodePapel(R,G,B,A,sinCuadricula); popMatrix(); } //SYPHON SERVER server.sendScreen(); } // //##CONTROLES## // public void keyPressed() { char k = key; switch(k) { //////////////////////////////////////////// //////////////////////////////////////////// //controles// case '<': sumar = !sumar; print(""sumar :"",sumar,""\n""); print(""paso :"",paso,""\n""); print(""___________________\n""); break; case '0': break; case '1': fondo=!fondo; print(""fondo :"",fondo,""\n""); print(""___________________\n""); break; case '2': sinCuadricula=!sinCuadricula; print(""sinCuadricula :"",sinCuadricula,""\n""); print(""___________________\n""); break; case '3': textura=!textura; print(""textura :"",textura,""\n""); print(""___________________\n""); break; case 'z': paso--; paso = (paso>255)?255:paso; paso = (paso<0)?0:paso; print(""paso :"",paso,""\n""); print(""___________________\n""); break; case 'x': paso++; paso = (paso>255)?255:paso; paso = (paso<0)?0:paso; print(""paso :"",paso,""\n""); print(""___________________\n""); break; //////////////////////////////////////////// //////////////////////////////////////////// //fondo// case 'q': if(sumar==true) { R+=paso; R = (R>255)?255:R; R = (R<0)?0:R; } else { R-=paso; R = (R>255)?255:R; R = (R<0)?0:R; } print(""Rojo :"",R,""\n""); print(""___________________\n""); break; case 'w': if(sumar==true) { G+=paso; G = (G>255)?255:G; G = (G<0)?0:G; } else { G-=paso; G = (G>255)?255:G; G = (G<0)?0:G; } print(""Verde :"",G,""\n""); print(""___________________\n""); break; case 'e': if(sumar==true) { B+=paso; B = (B>255)?255:B; B = (B<0)?0:B; } else { B-=paso; B = (B>255)?255:B; B = (B<0)?0:B; } print(""Azul :"",B,""\n""); print(""___________________\n""); break; case 'a': if(sumar==true) { A+=paso; A = (A>255)?255:A; A = (A<0)?0:A; } else { A-=paso; A = (A>255)?255:A; A = (A<0)?0:A; } print(""Grano Papel :"",A,""\n""); print(""___________________\n""); break; case 's': break; //////////////////////////////////////////// //////////////////////////////////////////// //Linea// case 'r': numColor+=1; hay = (numColor > coloresAntes.length || numColor == coloresAntes.length)? false : true; numColor = (hay)? numColor : 0; print(""numColor :"",numColor,""\n""); print(""___________________\n""); break; case 't': if(sumar==true) { anchoL+=paso; anchoL = (anchoL>1000)?1000:anchoL; anchoL = (anchoL<0)?0:anchoL; } else { anchoL-=paso; anchoL = (anchoL>1000)?1000:anchoL; anchoL = (anchoL<0)?0:anchoL; } print(""Ancho canal izquierdo :"",anchoL,""\n""); print(""___________________\n""); break; case 'y': if(sumar==true) { anchoR+=paso; anchoR = (anchoR>1000)?1000:anchoR; anchoR = (anchoR<0)?0:anchoR; } else { anchoR-=paso; anchoR = (anchoR>1000)?1000:anchoR; anchoR = (anchoR<0)?0:anchoR; } print(""Ancho canal derecho :"",anchoR,""\n""); print(""___________________\n""); break; case 'f': moverL = !moverL; print(""Mover Linea :"",moverL,""\n""); print(""___________________\n""); break; case 'g': moverH = !moverH; print(""Mover distancia horizontal :"",moverH,""\n""); print(""___________________\n""); break; case 'h': if(sumar==true) { sepLR+=paso; sepLR = (anchoR>1000)?1000:sepLR; sepLR = (anchoR<0)?0:sepLR; } else { sepLR-=paso; sepLR = (anchoR>1000)?1000:sepLR; sepLR = (anchoR<0)?10:anchoR; } print(""Separaci\u00f3n canales :"",sepLR,""\n""); print(""___________________\n""); break; case 'v': if(sumar==true) { intA+=paso; intA = (intA>1000)?1000:intA; intA = (intA<0)?0:intA; } else { intA-=paso; intA = (intA>1000)?1000:intA; intA = (intA<0)?0:intA; } print(""intencidad respuesta input :"",intA,""\n""); print(""___________________\n""); break; case 'b': if(sumar==true) { distMov+=paso; distMov = (distMov>1000)?1000:distMov; distMov = (distMov<0)?0:distMov; } else { distMov-=paso; distMov = (distMov>1000)?1000:distMov; distMov = (distMov<0)?0:distMov; } print(""distMov :"",distMov,""\n""); print(""___________________\n""); break; case 'n': if(sumar==true) { anchoS+=paso; anchoS = (anchoS>1000)?1000:anchoS; anchoS = (anchoS<0)?0:anchoS; } else { anchoS-=paso; anchoS = (anchoS>1000)?1000:anchoS; anchoS = (anchoS<0)?0:anchoS; } print(""distMov :"",anchoS,""\n""); print(""___________________\n""); break; //////////////////////////////////////////// //////////////////////////////////////////// //RESETS 7 8 9// case '9': numColor = 1; alfa = 255; moverL = false; moverH = false; xIL = 0; yIL = 10; intA = 50; sepLR = 5; anchoL = 0; anchoR = 0; anchoS = 1; distMov = 1; fondo = true; textura = true; sinCuadricula = true; R = 85; G = 85; B = 85; A = 10; break; case '8': numColor = 1; alfa = 255; moverL = false; moverH = false; xIL = 0; yIL = 10; intA = 50; sepLR = 5; anchoL = 0; anchoR = 0; anchoS = 1; distMov = 1; break; case '7': fondo = false; textura = true; sinCuadricula = true; R = 85; G = 85; B = 85; A = 10; break; // //DEFAULT default: break; } } // //##FONDO // public void fondodePapel(int R, int G, int B, int A, boolean sinCuadricula) { if(sinCuadricula){ noStroke(); } for (int i = 0; idistancia) { y=0; } } } } static public void main(String[] passedArgs) { String[] appletArgs = new String[] { ""ANTES01"" }; if (passedArgs != null) { PApplet.main(concat(appletArgs, passedArgs)); } else { PApplet.main(appletArgs); } } } ",0 "ense, * version 2.0. If a copy of the MPL was not distributed with this file, You * can obtain one at http://mozilla.org/MPL/2.0/. * * This Source Code Form is ""Incompatible With Secondary Licenses"", as defined * by the Mozilla Public License, version 2.0. */ package com.trollworks.gcs.character; import com.trollworks.toolkit.ui.GraphicsUtilities; import com.trollworks.toolkit.ui.UIUtilities; import com.trollworks.toolkit.ui.print.PrintManager; import com.trollworks.toolkit.utility.units.LengthUnits; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Insets; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; /** A printer page. */ public class Page extends JPanel { private PageOwner mOwner; /** * Creates a new page. * * @param owner The page owner. */ public Page(PageOwner owner) { super(new BorderLayout()); mOwner = owner; setOpaque(true); setBackground(Color.white); PrintManager pageSettings = mOwner.getPageSettings(); Insets insets = mOwner.getPageAdornmentsInsets(this); double[] size = pageSettings != null ? pageSettings.getPageSize(LengthUnits.POINTS) : new double[] { 8.5 * 72.0, 11.0 * 72.0 }; double[] margins = pageSettings != null ? pageSettings.getPageMargins(LengthUnits.POINTS) : new double[] { 36.0, 36.0, 36.0, 36.0 }; setBorder(new EmptyBorder(insets.top + (int) margins[0], insets.left + (int) margins[1], insets.bottom + (int) margins[2], insets.right + (int) margins[3])); Dimension pageSize = new Dimension((int) size[0], (int) size[1]); UIUtilities.setOnlySize(this, pageSize); setSize(pageSize); } @Override protected void paintComponent(Graphics gc) { super.paintComponent(GraphicsUtilities.prepare(gc)); mOwner.drawPageAdornments(this, gc); } } ",0 "s_page = 'hansard_date'; $PAGE->set_hansard_headings(array('date'=>$date)); $URL = new URL($this_page); $db = new ParlDB; $q = $db->query(""SELECT MIN(hdate) AS hdate FROM hansard WHERE hdate > '$date'""); if ($q->rows() > 0 && $q->field(0, 'hdate') != NULL) { $URL->insert( array( 'd'=>$q->field(0, 'hdate') ) ); $title = format_date($q->field(0, 'hdate'), SHORTDATEFORMAT); $nextprevdata['next'] = array ( 'hdate' => $q->field(0, 'hdate'), 'url' => $URL->generate(), 'body' => 'Next day', 'title' => $title ); } $q = $db->query(""SELECT MAX(hdate) AS hdate FROM hansard WHERE hdate < '$date'""); if ($q->rows() > 0 && $q->field(0, 'hdate') != NULL) { $URL->insert( array( 'd'=>$q->field(0, 'hdate') ) ); $title = format_date($q->field(0, 'hdate'), SHORTDATEFORMAT); $nextprevdata['prev'] = array ( 'hdate' => $q->field(0, 'hdate'), 'url' => $URL->generate(), 'body' => 'Previous day', 'title' => $title ); } # $year = substr($date, 0, 4); # $URL = new URL($hansardmajors[1]['page_year']); # $URL->insert(array('y'=>$year)); # $nextprevdata['up'] = array ( # 'body' => ""All of $year"", # 'title' => '', # 'url' => $URL->generate() # ); $DATA->set_page_metadata($this_page, 'nextprev', $nextprevdata); $PAGE->page_start(); $PAGE->stripe_start(); include_once INCLUDESPATH . 'easyparliament/recess.php'; $time = strtotime($date); $dayofweek = date('w', $time); $recess = recess_prettify(date('j', $time), date('n', $time), date('Y', $time), 1); if ($recess[0]) { print '

        The Houses of Parliament are in their ' . $recess[0] . ' at this time.

        '; } elseif ($dayofweek == 0 || $dayofweek == 6) { print '

        The Houses of Parliament do not meet at weekends.

        '; } else { $data = array( 'date' => $date ); foreach (array_keys($hansardmajors) as $major) { $URL = new URL($hansardmajors[$major]['page_all']); $URL->insert(array('d'=>$date)); $data[$major] = array('listurl'=>$URL->generate()); } major_summary($data); } $PAGE->stripe_end(array( array ( 'type' => 'nextprev' ), )); $PAGE->page_end(); } else { header(""Location: http://"" . DOMAIN . ""/""); exit; } ",0 "** * Run the migrations. * * @return void */ public function up() { Schema::create('forum_orders', function (Blueprint $table) { $table->increments('id'); $table->smallInteger('forum_id'); $table->integer('user_id'); $table->string('section', 50)->nullable(); $table->tinyInteger('is_hidden')->default(0); $table->smallInteger('order'); $table->index('forum_id'); $table->index('user_id'); $table->unique(['forum_id', 'user_id']); $table->foreign('forum_id')->references('id')->on('forums')->onDelete('cascade'); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('forum_orders'); } } ",0 "rce.org/licenses/MIT MIT */ namespace Bootstrap\Site\Providers; use Hubzero\Debug\Profiler; use Hubzero\Base\ServiceProvider; /** * Profiler service provider */ class ProfilerServiceProvider extends ServiceProvider { /** * Register the service provider. * * @return void */ public function register() { $this->app['profiler'] = function($app) { if ($app['config']['debug'] || $app['config']['profile']) { return new Profiler($app['client']->name); } return null; }; } } ",0 "CENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_Tool * @subpackage Framework * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /** * @namespace */ namespace Zend\Tool\Project\Provider; /** * @uses \Zend\Tool\Framework\Provider\Pretendable * @uses \Zend\Tool\Project\Exception * @uses \Zend\Tool\Project\Provider\AbstractProvider * @category Zend * @package Zend_Tool * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Application extends AbstractProvider implements \Zend\Tool\Framework\Provider\Pretendable { protected $_specialties = array('ClassNamePrefix'); /** * * @param $classNamePrefix Prefix of classes * @param $force */ public function changeClassNamePrefix($classNamePrefix /* , $force = false */) { $profile = $this->_loadProfile(self::NO_PROFILE_THROW_EXCEPTION); $originalClassNamePrefix = $classNamePrefix; if (substr($classNamePrefix, -1) != '\\') { $classNamePrefix .= '\\'; } $configFileResource = $profile->search('ApplicationConfigFile'); $zc = $configFileResource->getAsZendConfig('production'); if ($zc->appnamespace == $classNamePrefix) { throw new \Zend\Tool\Project\Exception('The requested name ' . $classNamePrefix . ' is already the prefix.'); } // remove the old $configFileResource->removeStringItem('appnamespace', 'production'); $configFileResource->create(); // add the new $configFileResource->addStringItem('appnamespace', $classNamePrefix, 'production', true); $configFileResource->create(); // update the project profile $applicationDirectory = $profile->search('ApplicationDirectory'); $applicationDirectory->setClassNamePrefix($classNamePrefix); $response = $this->_registry->getResponse(); if ($originalClassNamePrefix !== $classNamePrefix) { $response->appendContent( 'Note: the name provided ""' . $originalClassNamePrefix . '"" was' . ' altered to ""' . $classNamePrefix . '"" for correctness.', array('color' => 'yellow') ); } // note to the user $response->appendContent('Note: All existing models will need to be altered to this new namespace by hand', array('color' => 'yellow')); $response->appendContent('application.ini updated with new appnamespace ' . $classNamePrefix); // store profile $this->_storeProfile(); } }",0 " All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Language\Text; /** @var JoomlaupdateViewDefault $this */ ?>

        langKey, $this->updateSourceKey); ?>

        ",0 " * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef CS_HTTPCONNECT_H #define CS_HTTPCONNECT_H #include ""bytestream.h"" // CS_NAMESPACE_BEGIN class HttpConnect : public ByteStream { Q_OBJECT public: enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth }; HttpConnect(QObject *parent=0); ~HttpConnect(); void setAuth(const QString &user, const QString &pass=""""); void connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port); // from ByteStream void close(); qint64 bytesToWrite() const; protected: qint64 writeData(const char *data, qint64 maxSize); signals: void connected(); private slots: void sock_connected(); void sock_connectionClosed(); void sock_delayedCloseFinished(); void sock_readyRead(); void sock_bytesWritten(qint64); void sock_error(int); private: class Private; Private *d; void resetConnection(bool clear=false); }; // CS_NAMESPACE_END #endif ",0 "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. */ package com.google.javascript.jscomp; import com.google.common.base.Function; import com.google.common.base.Preconditions; import com.google.javascript.jscomp.graph.LatticeElement; import java.util.List; /** * Defines a way join a list of LatticeElements. */ interface JoinOp extends Function, L> { /** * An implementation of {@code JoinOp} that makes it easy to join to * lattice elements at a time. */ static abstract class BinaryJoinOp implements JoinOp { @Override public final L apply(List values) { Preconditions.checkArgument(!values.isEmpty()); int size = values.size(); if (size == 1) { return values.get(0); } else if (size == 2) { return apply(values.get(0), values.get(1)); } else { int mid = computeMidPoint(size); return apply( apply(values.subList(0, mid)), apply(values.subList(mid, size))); } } /** * Creates a new lattice that will be the join of two input lattices. * * @return The join of {@code latticeA} and {@code latticeB}. */ abstract L apply(L latticeA, L latticeB); /** * Finds the midpoint of a list. The function will favor two lists of * even length instead of two lists of the same odd length. The list * must be at least length two. * * @param size Size of the list. */ static int computeMidPoint(int size) { int midpoint = size >>> 1; if (size > 4) { /* Any list longer than 4 should prefer an even split point * over the true midpoint, so that [0,6] splits at 2, not 3. */ midpoint &= -2; // (0xfffffffe) clears low bit so midpoint is even } return midpoint; } } } ",0 "le>

        Sanskrit Sandhi Recognizer and Analyzer

        The Sanskrit sandhi splitter (VOWEL SANDHI) was developed as part of M.Phil. research by Sachin Kumar (M.Phil. 2005-2007), and Diwakar Mishra (M.Phil. 2007-2009) under the supervision of Dr. Girish Nath Jha. The coding for this application has been done by Dr. Girish Nath Jha and Diwakar Mishra. The Devanagari input mechanism has been developed in Javascript by Satyendra Kumar Chaube, Dr. Girish Nath Jha and Dharm Singh Rathore.
        Enter Sanskrit text for sandhi processing (संधि-विच्छेद हेतु पाठ्य दें) using adjacent keyboard OR Use our inbuilt iTRANS-Devanagari unicode converter for fast typing
        examples
        Run in debug mode

        Results




        ",0 "nRule implements \PHPStan\Rules\Rule { public function getNodeType(): string { return \PhpParser\Node\Expr\BinaryOp\BooleanOr::class; } /** * @param \PhpParser\Node\Expr\BinaryOp\BooleanOr $node * @param \PHPStan\Analyser\Scope $scope * @return string[] */ public function processNode( \PhpParser\Node $node, \PHPStan\Analyser\Scope $scope ): array { $messages = []; $leftType = ConstantConditionRuleHelper::getBooleanType($scope, $node->left); if ($leftType instanceof ConstantBooleanType) { $messages[] = sprintf( 'Left side of || is always %s.', $leftType->getValue() ? 'true' : 'false' ); } $rightType = ConstantConditionRuleHelper::getBooleanType( $scope->filterByFalseyValue($node->left), $node->right ); if ($rightType instanceof ConstantBooleanType) { $messages[] = sprintf( 'Right side of || is always %s.', $rightType->getValue() ? 'true' : 'false' ); } return $messages; } } ",0 "rt org.dbflute.cbean.coption.*; import org.dbflute.cbean.cvalue.ConditionValue; import org.dbflute.cbean.sqlclause.SqlClause; import org.dbflute.exception.IllegalConditionBeanOperationException; import org.docksidestage.postgresql.dbflute.cbean.cq.ciq.*; import org.docksidestage.postgresql.dbflute.cbean.*; import org.docksidestage.postgresql.dbflute.cbean.cq.*; /** * The base condition-query of product_status. * @author DBFlute(AutoGenerator) */ public class BsProductStatusCQ extends AbstractBsProductStatusCQ { // =================================================================================== // Attribute // ========= protected ProductStatusCIQ _inlineQuery; // =================================================================================== // Constructor // =========== public BsProductStatusCQ(ConditionQuery referrerQuery, SqlClause sqlClause, String aliasName, int nestLevel) { super(referrerQuery, sqlClause, aliasName, nestLevel); } // =================================================================================== // InlineView/OrClause // =================== /** * Prepare InlineView query.
        * {select ... from ... left outer join (select * from product_status) where FOO = [value] ...} *
             * cb.query().queryMemberStatus().inline().setFoo...;
             * 
        * @return The condition-query for InlineView query. (NotNull) */ public ProductStatusCIQ inline() { if (_inlineQuery == null) { _inlineQuery = xcreateCIQ(); } _inlineQuery.xsetOnClause(false); return _inlineQuery; } protected ProductStatusCIQ xcreateCIQ() { ProductStatusCIQ ciq = xnewCIQ(); ciq.xsetBaseCB(_baseCB); return ciq; } protected ProductStatusCIQ xnewCIQ() { return new ProductStatusCIQ(xgetReferrerQuery(), xgetSqlClause(), xgetAliasName(), xgetNestLevel(), this); } /** * Prepare OnClause query.
        * {select ... from ... left outer join product_status on ... and FOO = [value] ...} *
             * cb.query().queryMemberStatus().on().setFoo...;
             * 
        * @return The condition-query for OnClause query. (NotNull) * @throws IllegalConditionBeanOperationException When this condition-query is base query. */ public ProductStatusCIQ on() { if (isBaseQuery()) { throw new IllegalConditionBeanOperationException(""OnClause for local table is unavailable!""); } ProductStatusCIQ inlineQuery = inline(); inlineQuery.xsetOnClause(true); return inlineQuery; } // =================================================================================== // Query // ===== protected ConditionValue _productStatusCode; public ConditionValue xdfgetProductStatusCode() { if (_productStatusCode == null) { _productStatusCode = nCV(); } return _productStatusCode; } protected ConditionValue xgetCValueProductStatusCode() { return xdfgetProductStatusCode(); } public Map xdfgetProductStatusCode_ExistsReferrer_ProductList() { return xgetSQueMap(""productStatusCode_ExistsReferrer_ProductList""); } public String keepProductStatusCode_ExistsReferrer_ProductList(ProductCQ sq) { return xkeepSQue(""productStatusCode_ExistsReferrer_ProductList"", sq); } public Map xdfgetProductStatusCode_NotExistsReferrer_ProductList() { return xgetSQueMap(""productStatusCode_NotExistsReferrer_ProductList""); } public String keepProductStatusCode_NotExistsReferrer_ProductList(ProductCQ sq) { return xkeepSQue(""productStatusCode_NotExistsReferrer_ProductList"", sq); } public Map xdfgetProductStatusCode_SpecifyDerivedReferrer_ProductList() { return xgetSQueMap(""productStatusCode_SpecifyDerivedReferrer_ProductList""); } public String keepProductStatusCode_SpecifyDerivedReferrer_ProductList(ProductCQ sq) { return xkeepSQue(""productStatusCode_SpecifyDerivedReferrer_ProductList"", sq); } public Map xdfgetProductStatusCode_QueryDerivedReferrer_ProductList() { return xgetSQueMap(""productStatusCode_QueryDerivedReferrer_ProductList""); } public String keepProductStatusCode_QueryDerivedReferrer_ProductList(ProductCQ sq) { return xkeepSQue(""productStatusCode_QueryDerivedReferrer_ProductList"", sq); } public Map xdfgetProductStatusCode_QueryDerivedReferrer_ProductListParameter() { return xgetSQuePmMap(""productStatusCode_QueryDerivedReferrer_ProductList""); } public String keepProductStatusCode_QueryDerivedReferrer_ProductListParameter(Object pm) { return xkeepSQuePm(""productStatusCode_QueryDerivedReferrer_ProductList"", pm); } /** * Add order-by as ascend.
        * (商品ステータスコード)product_status_code: {PK, NotNull, bpchar(3)} * @return this. (NotNull) */ public BsProductStatusCQ addOrderBy_ProductStatusCode_Asc() { regOBA(""product_status_code""); return this; } /** * Add order-by as descend.
        * (商品ステータスコード)product_status_code: {PK, NotNull, bpchar(3)} * @return this. (NotNull) */ public BsProductStatusCQ addOrderBy_ProductStatusCode_Desc() { regOBD(""product_status_code""); return this; } protected ConditionValue _productStatusName; public ConditionValue xdfgetProductStatusName() { if (_productStatusName == null) { _productStatusName = nCV(); } return _productStatusName; } protected ConditionValue xgetCValueProductStatusName() { return xdfgetProductStatusName(); } /** * Add order-by as ascend.
        * product_status_name: {NotNull, varchar(50)} * @return this. (NotNull) */ public BsProductStatusCQ addOrderBy_ProductStatusName_Asc() { regOBA(""product_status_name""); return this; } /** * Add order-by as descend.
        * product_status_name: {NotNull, varchar(50)} * @return this. (NotNull) */ public BsProductStatusCQ addOrderBy_ProductStatusName_Desc() { regOBD(""product_status_name""); return this; } protected ConditionValue _displayOrder; public ConditionValue xdfgetDisplayOrder() { if (_displayOrder == null) { _displayOrder = nCV(); } return _displayOrder; } protected ConditionValue xgetCValueDisplayOrder() { return xdfgetDisplayOrder(); } /** * Add order-by as ascend.
        * display_order: {UQ, NotNull, int4(10)} * @return this. (NotNull) */ public BsProductStatusCQ addOrderBy_DisplayOrder_Asc() { regOBA(""display_order""); return this; } /** * Add order-by as descend.
        * display_order: {UQ, NotNull, int4(10)} * @return this. (NotNull) */ public BsProductStatusCQ addOrderBy_DisplayOrder_Desc() { regOBD(""display_order""); return this; } // =================================================================================== // SpecifiedDerivedOrderBy // ======================= /** * Add order-by for specified derived column as ascend. *
             * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
             *     public void query(PurchaseCB subCB) {
             *         subCB.specify().columnPurchaseDatetime();
             *     }
             * }, aliasName);
             * // order by [alias-name] asc
             * cb.addSpecifiedDerivedOrderBy_Asc(aliasName);
             * 
        * @param aliasName The alias name specified at (Specify)DerivedReferrer. (NotNull) * @return this. (NotNull) */ public BsProductStatusCQ addSpecifiedDerivedOrderBy_Asc(String aliasName) { registerSpecifiedDerivedOrderBy_Asc(aliasName); return this; } /** * Add order-by for specified derived column as descend. *
             * cb.specify().derivedPurchaseList().max(new SubQuery<PurchaseCB>() {
             *     public void query(PurchaseCB subCB) {
             *         subCB.specify().columnPurchaseDatetime();
             *     }
             * }, aliasName);
             * // order by [alias-name] desc
             * cb.addSpecifiedDerivedOrderBy_Desc(aliasName);
             * 
        * @param aliasName The alias name specified at (Specify)DerivedReferrer. (NotNull) * @return this. (NotNull) */ public BsProductStatusCQ addSpecifiedDerivedOrderBy_Desc(String aliasName) { registerSpecifiedDerivedOrderBy_Desc(aliasName); return this; } // =================================================================================== // Union Query // =========== public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) { } // =================================================================================== // Foreign Query // ============= protected Map xfindFixedConditionDynamicParameterMap(String property) { return null; } // =================================================================================== // ScalarCondition // =============== public Map xdfgetScalarCondition() { return xgetSQueMap(""scalarCondition""); } public String keepScalarCondition(ProductStatusCQ sq) { return xkeepSQue(""scalarCondition"", sq); } // =================================================================================== // MyselfDerived // ============= public Map xdfgetSpecifyMyselfDerived() { return xgetSQueMap(""specifyMyselfDerived""); } public String keepSpecifyMyselfDerived(ProductStatusCQ sq) { return xkeepSQue(""specifyMyselfDerived"", sq); } public Map xdfgetQueryMyselfDerived() { return xgetSQueMap(""queryMyselfDerived""); } public String keepQueryMyselfDerived(ProductStatusCQ sq) { return xkeepSQue(""queryMyselfDerived"", sq); } public Map xdfgetQueryMyselfDerivedParameter() { return xgetSQuePmMap(""queryMyselfDerived""); } public String keepQueryMyselfDerivedParameter(Object pm) { return xkeepSQuePm(""queryMyselfDerived"", pm); } // =================================================================================== // MyselfExists // ============ protected Map _myselfExistsMap; public Map xdfgetMyselfExists() { return xgetSQueMap(""myselfExists""); } public String keepMyselfExists(ProductStatusCQ sq) { return xkeepSQue(""myselfExists"", sq); } // =================================================================================== // MyselfInScope // ============= public Map xdfgetMyselfInScope() { return xgetSQueMap(""myselfInScope""); } public String keepMyselfInScope(ProductStatusCQ sq) { return xkeepSQue(""myselfInScope"", sq); } // =================================================================================== // Very Internal // ============= // very internal (for suppressing warn about 'Not Use Import') protected String xCB() { return ProductStatusCB.class.getName(); } protected String xCQ() { return ProductStatusCQ.class.getName(); } protected String xCHp() { return HpQDRFunction.class.getName(); } protected String xCOp() { return ConditionOption.class.getName(); } protected String xMap() { return Map.class.getName(); } } ",0 "ontent=""text/html; charset=UTF-8""> com.yahoo.astra.fl.utils Summary
        YUI AS Component DocumentationAll Packages | All Classes | Index | FramesNo Frames
        Package com.yahoo.astra.fl.utilsClasses
         
        ",0 ",INT,INT (/home/pierre/data/eclipse/caja-actions/src/cact/cact-marshal.def:2) */ extern void cact_cclosure_marshal_VOID__BOOLEAN_INT_INT_INT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:POINTER,UINT (/home/pierre/data/eclipse/caja-actions/src/cact/cact-marshal.def:6) */ extern void cact_cclosure_marshal_VOID__POINTER_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); /* VOID:POINTER,STRING (/home/pierre/data/eclipse/caja-actions/src/cact/cact-marshal.def:9) */ extern void cact_cclosure_marshal_VOID__POINTER_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); G_END_DECLS #endif /* __cact_cclosure_marshal_MARSHAL_H__ */ ",0 " ---

        L.mapbox.sanitize(string)

        A HTML sanitization function, with the same effect as the default value of the sanitizer option of L.mapbox.featureLayer, L.mapbox.gridControl, and L.mapbox.legendControl.

        Options Value Description
        text string String of content you wish to sanitize.
        ",0 "er'); $queuesendorderby = $this -> get_option('queuesendorderby'); ?>
        help(__('Specify the number of emails to send per interval. Rather keep the interval short and this number lower to prevent the procedure which sends out the emails to timeout due to too many emails at once.', $this -> plugin_name)); ?> get_option('emailsperinterval'))); ?>"" id="" pre; ?>emailsperinterval"" name=""emailsperinterval"" /> plugin_name); ?>
        plugin_name); ?>
        get_option('schedulecrontype') == ""wp"") ? 'block' : 'none'; ?>;"">
        get_option('scheduleinterval'); ?> plugin_name); ?>

        get_option('servercronstring')) { $servercronstring = substr(md5(rand(1,999)), 0, 12); } $commandurl = home_url() . '/?' . $this -> pre . 'method=docron&auth=' . $servercronstring; $command = 'wget -O /dev/null ""' . $commandurl . '"" > /dev/null 2>&1'; ?> "" />
        get_option('schedulecrontype') == ""server"") ? 'block' : 'none'; ?>;"">

        plugin_name), $command); ?>

        plugin_name); ?>

        plugin_name), ' plugin_name)) . '"" target=""_blank"">EasyCron ', '' . $commandurl . ''); ?>

        plugin_name); ?> plugin_name); ?>
        plugin_name); ?>
        ",0 "rg/1999/xhtml""> nucleo-dynamixel: Member List
        nucleo-dynamixel  0.0.1
        A library for controlling dynamixel servomotors, designed for nucleo stm32
        TIM_HallSensor_InitTypeDef Member List
        • Generated by 1.8.11
        ",0 "ui.h"" #include #include #include #include #include #include #include #include #include #include typedef struct { char *key; loglevel_t level; } loglevel_options_t; const loglevel_options_t log_options[] = { { ""DEBUG"", L_DEBUG }, { ""WARN"", L_WARN }, { ""ERROR"", L_ERROR }, { ""INFO"", L_INFO } }; typedef struct { ti_device_type device; asic_t *device_asic; char *rom_file; int cycles; int print_state; int no_rom_check; loglevel_t log_level; } appContext_t; appContext_t context; appContext_t create_context(void) { appContext_t context; context.device = TI83p; context.rom_file = NULL; context.cycles = -1; context.print_state = 0; context.no_rom_check = 0; context.log_level = L_WARN; return context; } int lcd_changed = 0; void lcd_changed_hook(void *data, ti_bw_lcd_t *lcd) { lcd_changed = 1; } void tui_unicode_to_utf8(char *b, uint32_t c) { if (c<0x80) *b++=c; else if (c<0x800) *b++=192+c/64, *b++=128+c%64; else if (c-0xd800u<0x800) return; else if (c<0x10000) *b++=224+c/4096, *b++=128+c/64%64, *b++=128+c%64; else if (c<0x110000) *b++=240+c/262144, *b++=128+c/4096%64, *b++=128+c/64%64, *b++=128+c%64; } void print_lcd(void *data, ti_bw_lcd_t *lcd) { int cY; int cX; #define LCD_BRAILLE #ifndef LCD_BRAILLE for (cX = 0; cX < 64; cX++) { for (cY = 0; cY < 120; cY++) { printf(""%c"", bw_lcd_read_screen(lcd, cY, cX) ? 'O' : ' '); } printf(""\n""); } #else for (cX = 0; cX < 64; cX += 4) { for (cY = 0; cY < 120; cY += 2) { int a = bw_lcd_read_screen(lcd, cY + 0, cX + 0); int b = bw_lcd_read_screen(lcd, cY + 0, cX + 1); int c = bw_lcd_read_screen(lcd, cY + 0, cX + 2); int d = bw_lcd_read_screen(lcd, cY + 1, cX + 0); int e = bw_lcd_read_screen(lcd, cY + 1, cX + 1); int f = bw_lcd_read_screen(lcd, cY + 1, cX + 2); int g = bw_lcd_read_screen(lcd, cY + 0, cX + 3); int h = bw_lcd_read_screen(lcd, cY + 1, cX + 3); uint32_t byte_value = 0x2800; byte_value += ( (a << 0) | (b << 1) | (c << 2) | (d << 3) | (e << 4) | (f << 5) | (g << 6) | (h << 7)); char buff[5] = {0}; tui_unicode_to_utf8(buff, byte_value); printf(""%s"", buff); } printf(""\n""); } #endif if (context.log_level >= L_INFO) { printf(""C: 0x%02X X: 0x%02X Y: 0x%02X Z: 0x%02X\n"", lcd->contrast, lcd->X, lcd->Y, lcd->Z); printf("" %c%c%c%c O1: 0x%01X 02: 0x%01X\n"", lcd->up ? 'V' : '^', lcd->counter ? '-' : '|', lcd->word_length ? '8' : '6', lcd->display_on ? 'O' : ' ', lcd->op_amp1, lcd->op_amp2); } } void lcd_timer_tick(asic_t *asic, void *data) { ti_bw_lcd_t *lcd = data; if (lcd_changed) { print_lcd(asic, lcd); lcd_changed = 0; } } void setDevice(appContext_t *context, char *target) { if (strcasecmp(target, ""TI73"") == 0) { context->device = TI73; } else if (strcasecmp(target, ""TI83p"") == 0) { context->device = TI83p; } else if (strcasecmp(target, ""TI83pSE"") == 0) { context->device = TI83pSE; } else if (strcasecmp(target, ""TI84p"") == 0) { context->device = TI84p; } else if (strcasecmp(target, ""TI84pSE"") == 0) { context->device = TI84pSE; } else if (strcasecmp(target, ""TI84pCSE"") == 0) { context->device = TI84pCSE; } else { printf(""Incorrect usage. See z80e --help.\n""); exit(1); } } void print_help(void) { printf(""z80e - Emulate z80 calculators\n"" ""Usage: z80e [flags] [rom]\n\n"" ""Flags:\n"" ""\t-d : Selects a device to emulate. Available devices:\n"" ""\t\tTI73, TI83p, TI83pSE, TI84p, TI84pSE, TI84pCSE\n"" ""\t-c : Emulate this number of cycles, then exit. If omitted, the machine will be emulated indefinitely.\n"" ""\t--print-state: Prints the state of the machine on exit.\n"" ""\t--no-rom-check: Skips the check that ensure the provided ROM file is the correct size.\n"" ""\t--debug: Enable the debugger, which is enabled by interrupting the emulator.\n""); } void handleFlag(appContext_t *context, char flag, int *i, char **argv) { char *next; switch (flag) { case 'd': next = argv[++*i]; setDevice(context, next); break; case 'c': next = argv[++*i]; context->cycles = atoi(next); break; default: printf(""Incorrect usage. See z80e --help.\n""); exit(1); break; } } int enable_debug = 0; void handleLongFlag(appContext_t *context, char *flag, int *i, char **argv) { if (strcasecmp(flag, ""device"") == 0) { char *next = argv[++*i]; setDevice(context, next); } else if (strcasecmp(flag, ""print-state"") == 0) { context->print_state = 1; } else if (strcasecmp(flag, ""no-rom-check"") == 0) { context->no_rom_check = 1; } else if (strcasecmp(flag, ""log"") == 0) { char *level = argv[++*i]; int j; for (j = 0; j < sizeof(log_options) / sizeof(loglevel_options_t); ++j) { if (strcasecmp(level, log_options[j].key) == 0) { context->log_level = log_options[j].level; return; } } fprintf(stderr, ""%s is not a valid logging level.\n"", level); exit(1); } else if (strcasecmp(flag, ""debug"") == 0) { enable_debug = 1; } else if (strcasecmp(flag, ""help"") == 0) { print_help(); exit(0); } else { printf(""Incorrect usage. See z80e --help.\n""); exit(1); } } void frontend_log(void *data, loglevel_t level, const char *part, const char *message, va_list args) { vprintf(message, args); printf(""\n""); } void sigint_handler(int sig) { signal(SIGINT, sigint_handler); log_message(context.device_asic->log, L_ERROR, ""sigint"", ""Caught interrupt, stopping emulation""); context.device_asic->stopped = 1; if (!context.device_asic->debugger || context.device_asic->debugger->state == DEBUGGER_ENABLED) { #ifdef CURSES endwin(); #endif exit(0); } fflush(stdout); } int main(int argc, char **argv) { context = create_context(); signal(SIGINT, sigint_handler); disassembler_init(); int i; for (i = 1; i < argc; i++) { char *a = argv[i]; if (*a == '-') { a++; if (*a == '-') { handleLongFlag(&context, a + 1, &i, argv); } else { while (*a) { handleFlag(&context, *a++, &i, argv); } } } else { if (context.rom_file == NULL) { context.rom_file = a; } else { printf(""Incorrect usage. See z80e --help.\n""); return 1; } } } log_t *log = init_log_z80e(frontend_log, 0, context.log_level); asic_t *device = asic_init(context.device, log); context.device_asic = device; if (enable_debug) { device->debugger = init_debugger(device); device->debugger->state = DEBUGGER_ENABLED; } if (context.rom_file == NULL && !enable_debug) { log_message(device->log, L_WARN, ""main"", ""No ROM file specified, starting debugger""); device->debugger = init_debugger(device); device->debugger->state = DEBUGGER_ENABLED; } else { FILE *file = fopen(context.rom_file, ""r""); if (!file) { printf(""Error opening '%s'.\n"", context.rom_file); asic_free(device); return 1; } int length; fseek(file, 0L, SEEK_END); length = ftell(file); fseek(file, 0L, SEEK_SET); if (!context.no_rom_check && length != device->mmu->settings.flash_pages * 0x4000) { printf(""Error: This file does not match the required ROM size of %d bytes, but it is %d bytes (use --no-rom-check to override).\n"", device->mmu->settings.flash_pages * 0x4000, length); fclose(file); asic_free(device); return 1; } length = fread(device->mmu->flash, 0x4000, device->mmu->settings.flash_pages, file); fclose(file); } hook_add_lcd_update(device->hook, NULL, lcd_changed_hook); asic_add_timer(device, 0, 60, lcd_timer_tick, device->cpu->devices[0x10].device); if (device->debugger) { tui_state_t state = { device->debugger }; tui_init(&state); tui_tick(&state); } else { if (context.cycles == -1) { // Run indefinitely while (1) { runloop_tick(device->runloop); if (device->stopped) { break; } nanosleep((struct timespec[]){{0, (1.f / 60.f) * 1000000000}}, NULL); } } else { runloop_tick_cycles(device->runloop, context.cycles); } } if (context.print_state) { print_state(&device->cpu->registers); } asic_free(device); return 0; } ",0 " const pass_t pass; template struct is_und : std::is_same {}; template struct is_pass : std::is_same {}; template struct is_special : std::integral_constant::value || is_pass::value> {}; template class inplace_args; template class inplace_args : private std::tuple { public: using std::tuple::tuple; template typename std::tuple_element>::type const& get() const { return std::get(*this); } }; template inplace_args inplace(Args &&... args) { return inplace_args(std::forward(args)...); } namespace internal { template struct normalize_arg { typedef Arg type; }; template struct normalize_arg> { static_assert(!is_special::value, ""Expected inplace_args to contain valid object type""); typedef Ret type; }; template struct normalize_arg> { typedef Arg & type; }; template using normalize_arg_t = typename normalize_arg::type; template struct normalize_value { typedef void type(normalize_arg_t); }; template<> struct normalize_value { typedef und_t type; }; template struct normalize_value {}; template struct normalize_value { typedef void type(normalize_arg_t...); }; template<> struct normalize_value { typedef void type(); }; } // namespace internal template using get_result_t = typename Arg::result; template using get_reason_t = typename Arg::reason; template using normalize_value_t = typename internal::normalize_value::type; template struct is_value_substitutable : std::integral_constant< bool, std::is_same::value || std::is_same::value > {}; namespace internal { template struct common_value {}; template<> struct common_value<> { typedef und_t type; }; template struct common_value { typedef Type type; }; template struct common_value { typedef typename std::conditional::value, Second, First>::type type; static_assert(is_value_substitutable::value, ""Incompatible types""); }; template struct common_value : common_value::type, Types...> {}; } // namespace internal template using common_value_t = typename internal::common_value::type; } // namespace abb #endif // ABB_VALUE_H ",0 " information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.eventhubs.v2017_04_01.implementation; import java.util.List; import org.joda.time.DateTime; import com.microsoft.azure.management.eventhubs.v2017_04_01.EntityStatus; import com.microsoft.azure.management.eventhubs.v2017_04_01.CaptureDescription; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.ProxyResource; /** * Single item in List or Get Event Hub operation. */ @JsonFlatten public class EventhubInner extends ProxyResource { /** * Current number of shards on the Event Hub. */ @JsonProperty(value = ""properties.partitionIds"", access = JsonProperty.Access.WRITE_ONLY) private List partitionIds; /** * Exact time the Event Hub was created. */ @JsonProperty(value = ""properties.createdAt"", access = JsonProperty.Access.WRITE_ONLY) private DateTime createdAt; /** * The exact time the message was updated. */ @JsonProperty(value = ""properties.updatedAt"", access = JsonProperty.Access.WRITE_ONLY) private DateTime updatedAt; /** * Number of days to retain the events for this Event Hub, value should be * 1 to 7 days. */ @JsonProperty(value = ""properties.messageRetentionInDays"") private Long messageRetentionInDays; /** * Number of partitions created for the Event Hub, allowed values are from * 1 to 32 partitions. */ @JsonProperty(value = ""properties.partitionCount"") private Long partitionCount; /** * Enumerates the possible values for the status of the Event Hub. Possible * values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', * 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'. */ @JsonProperty(value = ""properties.status"") private EntityStatus status; /** * Properties of capture description. */ @JsonProperty(value = ""properties.captureDescription"") private CaptureDescription captureDescription; /** * Get current number of shards on the Event Hub. * * @return the partitionIds value */ public List partitionIds() { return this.partitionIds; } /** * Get exact time the Event Hub was created. * * @return the createdAt value */ public DateTime createdAt() { return this.createdAt; } /** * Get the exact time the message was updated. * * @return the updatedAt value */ public DateTime updatedAt() { return this.updatedAt; } /** * Get number of days to retain the events for this Event Hub, value should be 1 to 7 days. * * @return the messageRetentionInDays value */ public Long messageRetentionInDays() { return this.messageRetentionInDays; } /** * Set number of days to retain the events for this Event Hub, value should be 1 to 7 days. * * @param messageRetentionInDays the messageRetentionInDays value to set * @return the EventhubInner object itself. */ public EventhubInner withMessageRetentionInDays(Long messageRetentionInDays) { this.messageRetentionInDays = messageRetentionInDays; return this; } /** * Get number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. * * @return the partitionCount value */ public Long partitionCount() { return this.partitionCount; } /** * Set number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. * * @param partitionCount the partitionCount value to set * @return the EventhubInner object itself. */ public EventhubInner withPartitionCount(Long partitionCount) { this.partitionCount = partitionCount; return this; } /** * Get enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'. * * @return the status value */ public EntityStatus status() { return this.status; } /** * Set enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'. * * @param status the status value to set * @return the EventhubInner object itself. */ public EventhubInner withStatus(EntityStatus status) { this.status = status; return this; } /** * Get properties of capture description. * * @return the captureDescription value */ public CaptureDescription captureDescription() { return this.captureDescription; } /** * Set properties of capture description. * * @param captureDescription the captureDescription value to set * @return the EventhubInner object itself. */ public EventhubInner withCaptureDescription(CaptureDescription captureDescription) { this.captureDescription = captureDescription; return this; } } ",0 "tion, please view the LICENSE * file that was distributed with this source code. */ namespace Neimheadh\Bundle\CodeManipulationBundle\Model\File; use Symfony\Component\Filesystem\Exception\FileNotFoundException; use Symfony\Component\Filesystem\Exception\IOException; /** * The files models interface. * * @author Neimheadh */ interface FileInterface { /** * Get path. * * @return string */ public function getPath(); /** * Set path. * * @param string $path * The file path. * @return \Neimheadh\Bundle\CodeManipulationBundle\Model\File\FileInterface */ public function setPath(string $path); /** * Get access mode. * * @return string */ public function getAccessMode(); /** * Set access mode. * * @param string $accessMode * The access mode. * @return \Neimheadh\Bundle\CodeManipulationBundle\Model\File\FileInterface */ public function setAccessMode(string $accessMode); /** * Check file access. * * @param bool $read * Force read checking. * @param bool $write * Force write checking. * @throws FileNotFoundException The file doesn't exist. * @throws IOException The file cannot be accessed in read mode (code = 1). * @throws IOException The file cannot be accessed in read mode (code = 2). * @throws IOException Unknown access mode (code = 3). */ public function check(bool $read = false, bool $write = false); /** * Is the file existing? * * @return bool */ public function isExisting(); /** * Is the file readable? * * @return bool */ public function isReadable(); /** * Is the file writable? * * @return bool */ public function isWritable(); /** * Process file line by line. * * @param callable $callback * The callback. * */ public function processLines($callback); /** * Append content in file. * * @param string $content * Amended content. * @param int|null $position * Amend position */ public function amend(string $content, int $position = null); }",0 "ce-width""> ",0 "'username']) ? $search['username'] : ''?>"" name=""username"" class=""input-txt w100"" style=""""> 真实姓名:"" name=""realname"" class=""input-txt w100"" style=""""> 手机号:"" name=""mobile"" class=""input-txt w100"" style="""">
        $v ): $k++?> "">
        ID
        手机号
        注册时间
        操作
        "" > ',this)"" title=""删除"" href=""javascript:;"">删除
        没有数据
        ",0 "his work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.flink.configuration; import org.apache.flink.annotation.PublicEvolving; import org.apache.flink.annotation.docs.ConfigGroup; import org.apache.flink.annotation.docs.ConfigGroups; import org.apache.flink.annotation.docs.Documentation; import org.apache.flink.configuration.description.Description; import static org.apache.flink.configuration.ConfigOptions.key; import static org.apache.flink.configuration.description.LinkElement.link; /** * The set of configuration options relating to security. */ @PublicEvolving @ConfigGroups(groups = { @ConfigGroup(name = ""Kerberos"", keyPrefix = ""security.kerberos""), @ConfigGroup(name = ""ZooKeeper"", keyPrefix = ""zookeeper"") }) public class SecurityOptions { // ------------------------------------------------------------------------ // Kerberos Options // ------------------------------------------------------------------------ public static final ConfigOption KERBEROS_LOGIN_PRINCIPAL = key(""security.kerberos.login.principal"") .noDefaultValue() .withDeprecatedKeys(""security.principal"") .withDescription(""Kerberos principal name associated with the keytab.""); public static final ConfigOption KERBEROS_LOGIN_KEYTAB = key(""security.kerberos.login.keytab"") .noDefaultValue() .withDeprecatedKeys(""security.keytab"") .withDescription(""Absolute path to a Kerberos keytab file that contains the user credentials.""); public static final ConfigOption KERBEROS_LOGIN_USETICKETCACHE = key(""security.kerberos.login.use-ticket-cache"") .defaultValue(true) .withDescription(""Indicates whether to read from your Kerberos ticket cache.""); public static final ConfigOption KERBEROS_LOGIN_CONTEXTS = key(""security.kerberos.login.contexts"") .noDefaultValue() .withDescription(""A comma-separated list of login contexts to provide the Kerberos credentials to"" + "" (for example, `Client,KafkaClient` to use the credentials for ZooKeeper authentication and for"" + "" Kafka authentication)""); // ------------------------------------------------------------------------ // ZooKeeper Security Options // ------------------------------------------------------------------------ public static final ConfigOption ZOOKEEPER_SASL_DISABLE = key(""zookeeper.sasl.disable"") .defaultValue(false); public static final ConfigOption ZOOKEEPER_SASL_SERVICE_NAME = key(""zookeeper.sasl.service-name"") .defaultValue(""zookeeper""); public static final ConfigOption ZOOKEEPER_SASL_LOGIN_CONTEXT_NAME = key(""zookeeper.sasl.login-context-name"") .defaultValue(""Client""); // ------------------------------------------------------------------------ // SSL Security Options // ------------------------------------------------------------------------ /** * Enable SSL for internal (rpc, data transport, blob server) and external (HTTP/REST) communication. * * @deprecated Use {@link #SSL_INTERNAL_ENABLED} and {@link #SSL_REST_ENABLED} instead. */ @Deprecated public static final ConfigOption SSL_ENABLED = key(""security.ssl.enabled"") .defaultValue(false) .withDescription(""Turns on SSL for internal and external network communication."" + ""This can be overridden by 'security.ssl.internal.enabled', 'security.ssl.external.enabled'. "" + ""Specific internal components (rpc, data transport, blob server) may optionally override "" + ""this through their own settings.""); /** * Enable SSL for internal communication (akka rpc, netty data transport, blob server). */ @Documentation.CommonOption(position = Documentation.CommonOption.POSITION_SECURITY) public static final ConfigOption SSL_INTERNAL_ENABLED = key(""security.ssl.internal.enabled"") .defaultValue(false) .withDescription(""Turns on SSL for internal network communication. "" + ""Optionally, specific components may override this through their own settings "" + ""(rpc, data transport, REST, etc).""); /** * Enable SSL for external REST endpoints. */ @Documentation.CommonOption(position = Documentation.CommonOption.POSITION_SECURITY) public static final ConfigOption SSL_REST_ENABLED = key(""security.ssl.rest.enabled"") .defaultValue(false) .withDescription(""Turns on SSL for external communication via the REST endpoints.""); // ----------------- certificates (internal + external) ------------------- /** * The Java keystore file containing the flink endpoint key and certificate. */ public static final ConfigOption SSL_KEYSTORE = key(""security.ssl.keystore"") .noDefaultValue() .withDescription(""The Java keystore file to be used by the flink endpoint for its SSL Key and Certificate.""); /** * Secret to decrypt the keystore file. */ public static final ConfigOption SSL_KEYSTORE_PASSWORD = key(""security.ssl.keystore-password"") .noDefaultValue() .withDescription(""The secret to decrypt the keystore file.""); /** * Secret to decrypt the server key. */ public static final ConfigOption SSL_KEY_PASSWORD = key(""security.ssl.key-password"") .noDefaultValue() .withDescription(""The secret to decrypt the server key in the keystore.""); /** * The truststore file containing the public CA certificates to verify the ssl peers. */ public static final ConfigOption SSL_TRUSTSTORE = key(""security.ssl.truststore"") .noDefaultValue() .withDescription(""The truststore file containing the public CA certificates to be used by flink endpoints"" + "" to verify the peer’s certificate.""); /** * Secret to decrypt the truststore. */ public static final ConfigOption SSL_TRUSTSTORE_PASSWORD = key(""security.ssl.truststore-password"") .noDefaultValue() .withDescription(""The secret to decrypt the truststore.""); // ----------------------- certificates (internal) ------------------------ /** * For internal SSL, the Java keystore file containing the private key and certificate. */ public static final ConfigOption SSL_INTERNAL_KEYSTORE = key(""security.ssl.internal.keystore"") .noDefaultValue() .withDescription(""The Java keystore file with SSL Key and Certificate, "" + ""to be used Flink's internal endpoints (rpc, data transport, blob server).""); /** * For internal SSL, the password to decrypt the keystore file containing the certificate. */ public static final ConfigOption SSL_INTERNAL_KEYSTORE_PASSWORD = key(""security.ssl.internal.keystore-password"") .noDefaultValue() .withDescription(""The secret to decrypt the keystore file for Flink's "" + ""for Flink's internal endpoints (rpc, data transport, blob server).""); /** * For internal SSL, the password to decrypt the private key. */ public static final ConfigOption SSL_INTERNAL_KEY_PASSWORD = key(""security.ssl.internal.key-password"") .noDefaultValue() .withDescription(""The secret to decrypt the key in the keystore "" + ""for Flink's internal endpoints (rpc, data transport, blob server).""); /** * For internal SSL, the truststore file containing the public CA certificates to verify the ssl peers. */ public static final ConfigOption SSL_INTERNAL_TRUSTSTORE = key(""security.ssl.internal.truststore"") .noDefaultValue() .withDescription(""The truststore file containing the public CA certificates to verify the peer "" + ""for Flink's internal endpoints (rpc, data transport, blob server).""); /** * For internal SSL, the secret to decrypt the truststore. */ public static final ConfigOption SSL_INTERNAL_TRUSTSTORE_PASSWORD = key(""security.ssl.internal.truststore-password"") .noDefaultValue() .withDescription(""The password to decrypt the truststore "" + ""for Flink's internal endpoints (rpc, data transport, blob server).""); // ----------------------- certificates (external) ------------------------ /** * For external (REST) SSL, the Java keystore file containing the private key and certificate. */ public static final ConfigOption SSL_REST_KEYSTORE = key(""security.ssl.rest.keystore"") .noDefaultValue() .withDescription(""The Java keystore file with SSL Key and Certificate, "" + ""to be used Flink's external REST endpoints.""); /** * For external (REST) SSL, the password to decrypt the keystore file containing the certificate. */ public static final ConfigOption SSL_REST_KEYSTORE_PASSWORD = key(""security.ssl.rest.keystore-password"") .noDefaultValue() .withDescription(""The secret to decrypt the keystore file for Flink's "" + ""for Flink's external REST endpoints.""); /** * For external (REST) SSL, the password to decrypt the private key. */ public static final ConfigOption SSL_REST_KEY_PASSWORD = key(""security.ssl.rest.key-password"") .noDefaultValue() .withDescription(""The secret to decrypt the key in the keystore "" + ""for Flink's external REST endpoints.""); /** * For external (REST) SSL, the truststore file containing the public CA certificates to verify the ssl peers. */ public static final ConfigOption SSL_REST_TRUSTSTORE = key(""security.ssl.rest.truststore"") .noDefaultValue() .withDescription(""The truststore file containing the public CA certificates to verify the peer "" + ""for Flink's external REST endpoints.""); /** * For external (REST) SSL, the secret to decrypt the truststore. */ public static final ConfigOption SSL_REST_TRUSTSTORE_PASSWORD = key(""security.ssl.rest.truststore-password"") .noDefaultValue() .withDescription(""The password to decrypt the truststore "" + ""for Flink's external REST endpoints.""); // ------------------------ ssl parameters -------------------------------- /** * SSL protocol version to be supported. */ public static final ConfigOption SSL_PROTOCOL = key(""security.ssl.protocol"") .defaultValue(""TLSv1.2"") .withDescription(""The SSL protocol version to be supported for the ssl transport. Note that it doesn’t"" + "" support comma separated list.""); /** * The standard SSL algorithms to be supported. * *

        More options here - http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites */ public static final ConfigOption SSL_ALGORITHMS = key(""security.ssl.algorithms"") .defaultValue(""TLS_RSA_WITH_AES_128_CBC_SHA"") .withDescription(Description.builder() .text(""The comma separated list of standard SSL algorithms to be supported. Read more %s"", link( ""http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites"", ""here"")) .build()); /** * Flag to enable/disable hostname verification for the ssl connections. */ public static final ConfigOption SSL_VERIFY_HOSTNAME = key(""security.ssl.verify-hostname"") .defaultValue(true) .withDescription(""Flag to enable peer’s hostname verification during ssl handshake.""); } ",0 "S"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the LGPL. For more information please see * . */ require_once 'PHPUnit/Framework/TestCase.php'; include_once 'cms/CmsDataPopulator.php'; /** * Base class contains some methods shared by subclass test cases. */ abstract class CmsTestBase extends PHPUnit_Framework_TestCase { /** * This is run before each unit test; it populates the database. */ protected function setUp() { parent::setUp(); CmsDataPopulator::depopulate(); CmsDataPopulator::populate(); } /** * This is run after each unit test. It empties the database. */ protected function tearDown() { CmsDataPopulator::depopulate(); parent::tearDown(); } } ",0 "tring[] args) { // TODO Auto-generated method stub try { final SynchronizedObject1 object = new SynchronizedObject1(); Thread thread1 = new Thread() { @Override public void run() { object.printString(); } }; thread1.setName(""a""); thread1.start(); Thread.sleep(1000); Thread thread2 = new Thread() { @Override public void run() { System.out .println(""thread2启动了,但进入不了printString()方法!只打印1个begin""); System.out .println(""因为printString()方法被a线程锁定并且永远的suspend暂停了!""); object.printString(); } }; thread2.start(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } class SynchronizedObject1 { synchronized public void printString() { System.out.println(""begin""); if (Thread.currentThread().getName().equals(""a"")) { System.out.println(""a线程永远 suspend了!""); Thread.currentThread().suspend(); } System.out.println(""end""); } }",0 "it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef __MSM_MEMORY_DUMP_H #define __MSM_MEMORY_DUMP_H #include enum dump_client_type { MSM_CPU_CTXT = 0, MSM_L1_CACHE, MSM_L2_CACHE, MSM_OCMEM, MSM_TMC_ETFETB, MSM_ETM0_REG, MSM_ETM1_REG, MSM_ETM2_REG, MSM_ETM3_REG, MSM_TMC0_REG, /* TMC_ETR */ MSM_TMC1_REG, /* TMC_ETF */ MSM_LOG_BUF, MSM_LOG_BUF_FIRST_IDX, MAX_NUM_CLIENTS, }; struct msm_client_dump { enum dump_client_type id; unsigned long start_addr; unsigned long end_addr; }; #ifdef CONFIG_MSM_MEMORY_DUMP extern int msm_dump_tbl_register(struct msm_client_dump *client_entry); #else static inline int msm_dump_tbl_register(struct msm_client_dump *entry) { return -EIO; } #endif #if defined(CONFIG_MSM_MEMORY_DUMP) || defined(CONFIG_MSM_MEMORY_DUMP_V2) extern uint32_t msm_dump_table_version(void); #else static inline uint32_t msm_dump_table_version(void) { return 0; } #endif #define MSM_DUMP_MAKE_VERSION(ma, mi) ((ma << 20) | mi) #define MSM_DUMP_MAJOR(val) (val >> 20) #define MSM_DUMP_MINOR(val) (val & 0xFFFFF) #define MAX_NUM_ENTRIES 0x120 enum msm_dump_data_ids { MSM_DUMP_DATA_CPU_CTX = 0x00, MSM_DUMP_DATA_L1_INST_CACHE = 0x60, MSM_DUMP_DATA_L1_DATA_CACHE = 0x80, MSM_DUMP_DATA_ETM_REG = 0xA0, MSM_DUMP_DATA_L2_CACHE = 0xC0, MSM_DUMP_DATA_L3_CACHE = 0xD0, MSM_DUMP_DATA_OCMEM = 0xE0, MSM_DUMP_DATA_MISC = 0xE8, MSM_DUMP_DATA_TMC_ETF = 0xF0, MSM_DUMP_DATA_TMC_REG = 0x100, MSM_DUMP_DATA_LOG_BUF = 0x110, MSM_DUMP_DATA_LOG_BUF_FIRST_IDX = 0x111, MSM_DUMP_DATA_MAX = MAX_NUM_ENTRIES, }; enum msm_dump_table_ids { MSM_DUMP_TABLE_APPS, MSM_DUMP_TABLE_MAX = MAX_NUM_ENTRIES, }; enum msm_dump_type { MSM_DUMP_TYPE_DATA, MSM_DUMP_TYPE_TABLE, }; struct msm_dump_data { uint32_t version; uint32_t magic; char name[32]; uint64_t addr; uint64_t len; uint32_t reserved; }; struct msm_dump_entry { uint32_t id; char name[32]; uint32_t type; uint64_t addr; }; #ifdef CONFIG_MSM_MEMORY_DUMP_V2 extern int msm_dump_data_register(enum msm_dump_table_ids id, struct msm_dump_entry *entry); #else static inline int msm_dump_data_register(enum msm_dump_table_ids id, struct msm_dump_entry *entry) { return -ENOSYS; } #endif #endif ",0 "le>fcsl-pcm: Not compatible 👼

        « Up

        fcsl-pcm 1.1.1 Not compatible 👼

        📅 (2022-01-04 10:12:16 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-num            base        Num library distributed with the OCaml compiler
        base-ocamlbuild     base        OCamlbuild binary and libraries distributed with the OCaml compiler
        base-threads        base
        base-unix           base
        camlp5              7.14        Preprocessor-pretty-printer of OCaml
        conf-findutils      1           Virtual package relying on findutils
        conf-perl           1           Virtual package relying on perl
        coq                 8.5.2       Formal proof management system
        num                 0           The Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.02.3      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.02.3      Official 4.02.3 release
        ocaml-config        1           OCaml Switch Configuration
        # opam file:
        opam-version: "2.0"
        maintainer: "FCSL <fcsl@software.imdea.org>"
        homepage: "http://software.imdea.org/fcsl/"
        bug-reports: "https://github.com/imdea-software/fcsl-pcm/issues"
        dev-repo: "git+https://github.com/imdea-software/fcsl-pcm.git"
        license: "Apache-2.0"
        build: [ make "-j%{jobs}%" ]
        install: [ make "install" ]
        depends: [
          "ocaml"
          "coq" {(>= "8.9" & < "8.12~") | (= "dev")}
          "coq-mathcomp-ssreflect" {(>= "1.10.0" & < "1.11~") | (= "dev")}
        ]
        tags: [
          "keyword:separation logic"
          "keyword:partial commutative monoid"
          "category:Computer Science/Data Types and Data Structures"
          "logpath:fcsl"
          "date:2019-01-06"
        ]
        authors: [
          "Aleksandar Nanevski"
        ]
        synopsis: "Partial Commutative Monoids"
        description: """
        The PCM library provides a formalisation of Partial Commutative Monoids (PCMs),
        a common algebraic structure used in separation logic for verification of
        pointer-manipulating sequential and concurrent programs.
        The library provides lemmas for mechanised and automated reasoning about PCMs
        in the abstract, but also supports concrete common PCM instances, such as heaps,
        histories and mutexes.
        This library relies on extensionality axioms: propositional and
        functional extentionality."""
        url {
          src: "https://github.com/imdea-software/fcsl-pcm/archive/v1.1.1.tar.gz"
               checksum: "sha256=3b52ae8f7dba4987ef2c2fc91480ebbecdbf7195bfc0d6892930f523e3475771"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-fcsl-pcm.1.1.1 coq.8.5.2
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.5.2).
        The following dependencies couldn't be met:
          - coq-fcsl-pcm -> coq >= dev -> ocaml >= 4.05.0
              base of this switch (use `--unlock-base' to force)
        Your request can't be satisfied:
          - No available version of coq satisfies the constraints
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-fcsl-pcm.1.1.1
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "ts reserved. * Distributed under the Terms of Use in http://www.unicode.org/copyright.html. * * Copyright © 2008-2010 Yii Software LLC (http://www.yiiframework.com/license/) */ return array ( 'version' => '4123', 'numberSymbols' => array ( 'decimal' => ',', 'group' => ' ', 'list' => ';', 'percentSign' => '%', 'nativeZeroDigit' => '0', 'patternDigit' => '#', 'plusSign' => '+', 'minusSign' => '-', 'exponential' => 'E', 'perMille' => '‰', 'infinity' => '∞', 'nan' => 'NaN', ), 'decimalFormat' => '#,##0.###', 'scientificFormat' => '#E0', 'percentFormat' => '#,##0%', 'currencyFormat' => '¤#,##0.00', 'currencySymbols' => array ( 'AFN' => 'Af', 'ANG' => 'NAf.', 'AOA' => 'Kz', 'ARA' => '₳', 'ARL' => '$L', 'ARM' => 'm$n', 'ARS' => 'AR$', 'AUD' => 'AU$', 'AWG' => 'Afl.', 'AZN' => 'man.', 'BAM' => 'KM', 'BBD' => 'Bds$', 'BDT' => 'Tk', 'BEF' => 'BF', 'BHD' => 'BD', 'BIF' => 'FBu', 'BMD' => 'BD$', 'BND' => 'BN$', 'BOB' => 'Bs', 'BOP' => '$b.', 'BRL' => 'R$', 'BSD' => 'BS$', 'BTN' => 'Nu.', 'BWP' => 'BWP', 'BZD' => 'BZ$', 'CAD' => 'CA$', 'CDF' => 'CDF', 'CHF' => 'Fr.', 'CLE' => 'Eº', 'CLP' => 'CL$', 'CNY' => 'CN¥', 'COP' => 'CO$', 'CRC' => '₡', 'CUC' => 'CUC$', 'CUP' => 'CU$', 'CVE' => 'CV$', 'CYP' => 'CY£', 'CZK' => 'Kč', 'DEM' => 'DM', 'DJF' => 'Fdj', 'DKK' => 'Dkr', 'DOP' => 'RD$', 'DZD' => 'DA', 'EEK' => 'Ekr', 'EGP' => 'EG£', 'ERN' => 'Nfk', 'ESP' => 'Pts', 'ETB' => 'Br', 'EUR' => '€', 'FIM' => 'mk', 'FJD' => 'FJ$', 'FKP' => 'FK£', 'FRF' => '₣', 'GBP' => '£', 'GHC' => '₵', 'GHS' => 'GH₵', 'GIP' => 'GI£', 'GMD' => 'GMD', 'GNF' => 'FG', 'GRD' => '₯', 'GTQ' => 'GTQ', 'GYD' => 'GY$', 'HKD' => 'HK$', 'HNL' => 'HNL', 'HRK' => 'kn', 'HTG' => 'HTG', 'HUF' => 'Ft', 'IDR' => 'Rp', 'IEP' => 'IR£', 'ILP' => 'I£', 'ILS' => '₪', 'INR' => 'Rs', 'ISK' => 'Ikr', 'ITL' => 'IT₤', 'JMD' => 'J$', 'JOD' => 'JD', 'JPY' => 'JP¥', 'KES' => 'Ksh', 'KMF' => 'CF', 'KRW' => '₩', 'KWD' => 'KD', 'KYD' => 'KY$', 'LAK' => '₭', 'LBP' => 'LB£', 'LKR' => 'SLRs', 'LRD' => 'L$', 'LSL' => 'LSL', 'LTL' => 'Lt', 'LVL' => 'Ls', 'LYD' => 'LD', 'MMK' => 'MMK', 'MNT' => '₮', 'MOP' => 'MOP$', 'MRO' => 'UM', 'MTL' => 'Lm', 'MTP' => 'MT£', 'MUR' => 'MURs', 'MXP' => 'MX$', 'MYR' => 'RM', 'MZM' => 'Mt', 'MZN' => 'MTn', 'NAD' => 'N$', 'NGN' => '₦', 'NIO' => 'C$', 'NLG' => 'fl', 'NOK' => 'Nkr', 'NPR' => 'NPRs', 'NZD' => 'NZ$', 'PAB' => 'B/.', 'PEI' => 'I/.', 'PEN' => 'S/.', 'PGK' => 'PGK', 'PHP' => '₱', 'PKR' => 'PKRs', 'PLN' => 'zł', 'PTE' => 'Esc', 'PYG' => '₲', 'QAR' => 'QR', 'RHD' => 'RH$', 'RON' => 'RON', 'RSD' => 'din.', 'SAR' => 'SR', 'SBD' => 'SI$', 'SCR' => 'SRe', 'SDD' => 'LSd', 'SEK' => 'Skr', 'SGD' => 'S$', 'SHP' => 'SH£', 'SKK' => 'Sk', 'SLL' => 'Le', 'SOS' => 'Ssh', 'SRD' => 'SR$', 'SRG' => 'Sf', 'STD' => 'Db', 'SVC' => 'SV₡', 'SYP' => 'SY£', 'SZL' => 'SZL', 'THB' => '฿', 'TMM' => 'TMM', 'TND' => 'DT', 'TOP' => 'T$', 'TRL' => 'TRL', 'TRY' => 'TL', 'TTD' => 'TT$', 'TWD' => 'NT$', 'TZS' => 'TSh', 'UAH' => '₴', 'UGX' => 'USh', 'USD' => 'US$', 'UYU' => '$U', 'VEF' => 'Bs.F.', 'VND' => '₫', 'VUV' => 'VT', 'WST' => 'WS$', 'XAF' => 'FCFA', 'XCD' => 'EC$', 'XOF' => 'CFA', 'XPF' => 'CFPF', 'YER' => 'YR', 'ZAR' => 'R', 'ZMK' => 'ZK', 'ZRN' => 'NZ', 'ZRZ' => 'ZRZ', 'ZWD' => 'Z$', ), 'monthNames' => array ( 'wide' => array ( 1 => 'Ferikgong', 2 => 'Tlhakole', 3 => 'Mopitlo', 4 => 'Moranang', 5 => 'Motsheganang', 6 => 'Seetebosigo', 7 => 'Phukwi', 8 => 'Phatwe', 9 => 'Lwetse', 10 => 'Diphalane', 11 => 'Ngwanatsele', 12 => 'Sedimonthole', ), 'abbreviated' => array ( 1 => 'Fer', 2 => 'Tlh', 3 => 'Mop', 4 => 'Mor', 5 => 'Mot', 6 => 'See', 7 => 'Phu', 8 => 'Pha', 9 => 'Lwe', 10 => 'Dip', 11 => 'Ngw', 12 => 'Sed', ), ), 'monthNamesSA' => array ( 'narrow' => array ( 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => '10', 11 => '11', 12 => '12', ), ), 'weekDayNames' => array ( 'wide' => array ( 0 => 'Tshipi', 1 => 'Mosopulogo', 2 => 'Labobedi', 3 => 'Laboraro', 4 => 'Labone', 5 => 'Labotlhano', 6 => 'Matlhatso', ), 'abbreviated' => array ( 0 => 'Tsh', 1 => 'Mos', 2 => 'Bed', 3 => 'Rar', 4 => 'Ne', 5 => 'Tla', 6 => 'Mat', ), ), 'weekDayNamesSA' => array ( 'narrow' => array ( 0 => '1', 1 => '2', 2 => '3', 3 => '4', 4 => '5', 5 => '6', 6 => '7', ), ), 'eraNames' => array ( 'abbreviated' => array ( 0 => 'BC', 1 => 'AD', ), 'wide' => array ( 0 => 'BC', 1 => 'AD', ), 'narrow' => array ( 0 => 'BC', 1 => 'AD', ), ), 'dateFormats' => array ( 'full' => 'EEEE, y MMMM dd', 'long' => 'y MMMM d', 'medium' => 'y MMM d', 'short' => 'yy/MM/dd', ), 'timeFormats' => array ( 'full' => 'HH:mm:ss zzzz', 'long' => 'HH:mm:ss z', 'medium' => 'HH:mm:ss', 'short' => 'HH:mm', ), 'dateTimeFormat' => '{1} {0}', 'amName' => 'AM', 'pmName' => 'PM', ); ",0 "name=""description"" content=""Centering grid content"" />

        Free Wall

        Creating dynamic grid layouts.

        Centering grid content

        Add more block

        ",0 " other threads * (but not itself). * Every receiving thread should sum received integers into a per-thread * rx_sum variable. * Every thread should accumulate the same rx_sum, which is: * (ITERS -1) * ITERS * (THREAD_CNT -1) * 0.5 * (see memorywell/test/well_test.c for more details). * * (c) 2018 Sirio Balmelli and Anthony Soenen */ #include #include /* use atomic PSG kill flag as a global error flag */ #include #include #include #include #include #include #define THREAD_CNT 2 #define ITERS 2 /* How many messages each thread should send. * TODO: increase once registration/rcu issue is resolved. */ /* thread() */ void *thread(void* arg) { struct mgrp *group = arg; int pvc[2] = { 0, 0 }; size_t rx_sum = 0, rx_i = 0; size_t message; NB_die_if( pipe(pvc) || fcntl(pvc[0], F_SETFL, fcntl(pvc[0], F_GETFL) | O_NONBLOCK) , """"); NB_die_if( mgrp_subscribe(group, pvc[1]) , """"); /* Don't start broadcasting until everyone is subscribed. * We could use pthread_barrier_t but that's not implemented on macOS, * and anyways messenger()'s mgrp_count uses acquire/release semantics. */ while (mgrp_count(group) != THREAD_CNT && !psg_kill_check()) sched_yield(); /* generate ITERS broadcasts; receive others' broadcasts */ for (size_t i = 0; i < ITERS && !psg_kill_check(); i++) { NB_die_if( mgrp_broadcast(group, pvc[1], &i, sizeof(i)) , """"); while ((mg_recv(pvc[0], &message) > 0) && !psg_kill_check()) { rx_sum += message; rx_i++; sched_yield(); /* prevent deadlock: give other threads a chance to write */ } errno = 0; /* _should_ be EINVAL: don't pollute later prints */ } /* wait for all other senders */ while (rx_i < ITERS * (THREAD_CNT -1) && !psg_kill_check()) { if ((mg_recv(pvc[0], &message) > 0)) { rx_sum += message; rx_i++; } else { sched_yield(); } } die: NB_err_if( mgrp_unsubscribe(group, pvc[1]) , ""fd %d unsubscribe fail"", pvc[1]); if (err_cnt) psg_kill(); if (pvc[0]) { close(pvc[1]); close(pvc[0]); } return (void *)rx_sum; } /* main() */ int main() { int err_cnt = 0; struct mgrp *group = NULL; pthread_t threads[THREAD_CNT]; NB_die_if(!( group = mgrp_new() ), """"); /* run all threads */ for (unsigned int i=0; i < THREAD_CNT; i++) { NB_die_if(pthread_create(&threads[i], NULL, thread, group), """"); } /* test results */ size_t expected = (ITERS -1) * ITERS * (THREAD_CNT -1) * 0.5; for (unsigned int i=0; i < THREAD_CNT; i++) { size_t rx_sum; NB_die_if( pthread_join(threads[i], (void **)&rx_sum) , """"); NB_err_if(rx_sum != expected, ""thread %zu != expected %zu"", rx_sum, expected); } die: mgrp_free(group); err_cnt += psg_kill_check(); /* return any error from any thread */ return err_cnt; } ",0 "e This file contains the definitions for the kernel ctrl CAL module. *******************************************************************************/ /*------------------------------------------------------------------------------ Copyright (c) 2014, Bernecker+Rainer Industrie-Elektronik Ges.m.b.H. (B&R) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------*/ #ifndef _INC_ctrlkcal_H_ #define _INC_ctrlkcal_H_ //------------------------------------------------------------------------------ // includes //------------------------------------------------------------------------------ #include #include //------------------------------------------------------------------------------ // const defines //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // typedef //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // function prototypes //------------------------------------------------------------------------------ #ifdef __cplusplus extern ""C"" { #endif tOplkError ctrlkcal_init(void); void ctrlkcal_exit(void); tOplkError ctrlkcal_process(void); tOplkError ctrlkcal_getCmd(tCtrlCmdType* pCmd_p); void ctrlkcal_sendReturn(UINT16 retval_p); void ctrlkcal_setStatus(UINT16 status_p); UINT16 ctrlkcal_getStatus(void); void ctrlkcal_updateHeartbeat(UINT16 heartbeat_p); tOplkError ctrlkcal_readInitParam(tCtrlInitParam* pInitParam_p); void ctrlkcal_storeInitParam(tCtrlInitParam* pInitParam_p); #ifdef __cplusplus } #endif #endif /* _INC_ctrlkcal_H_ */ ",0 "ject next(); //µÃµ½µ±Ç°¶ÔÏó public Object currentItem(); //ÊÇ·ñµ½Á˽áβ public boolean isDone(); } //ÕýÐòµü´úÆ÷ public class ConcreteIterator implements Iterator { private int currentIndex = 0; //¶¨ÒåÒ»¸ö¾ßÌ弯ºÏ¶ÔÏó private Aggregate aggregate = null; public ConcreteIterator(Aggregate aggregate) { this.aggregate = aggregate; } //ÖØÐ´¸¸Àà·½·¨ @Override public Object first() { currentIndex = 0; return vector.get(currentIndex); } @Override public Object next() { if(currentIndex < aggregate.count()) currentIndex++; return vector.get(currentIndex); } @Override public Object currentItem() { return aggregate.getAt(currentIndex); } @Override public boolean isDone() { return (currentIndex >= aggregate.count()); } } /*¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª*/ //°×Ïä¾ÛºÏÒªÇ󼯺ÏÀàÏòÍâ½çÌṩ·ÃÎÊ×Ô¼ºÄÚ²¿ÔªËØµÄ½Ó¿Ú public interface Aggregat { public Iterator createIterator(); //»ñÈ¡¼¯ºÏÄÚ²¿ÔªËØ×ÜÊý public int count(); //»ñȡָ¶¨Î»ÖÃÔªËØ public Object getAt(int index); } /*¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª*/ //¾ßÌåµÄ¼¯ºÏÀà public class ConcreteAggregat implements Aggregat { private Vector vector = null; public Vector getVector() { return vector; } public void setVector(final Vector vector) { this.vector = vector; } public ConcreteAggregat() { vector = new Vector(); vector.add(""item 1""); vector.add(""item 2""); } //»ñÈ¡¼¯ºÏÄÚ²¿ÔªËØ×ÜÊý @Override public int count() { return vector.size(); } //»ñȡָ¶¨Î»ÖÃÔªËØ @Override public Object getAt(int index) { if(0 <= index && index < vector.size()) return vector[index]; else return null; } //´´½¨Ò»¸ö¾ßÌåµü´úÆ÷¶ÔÏ󣬲¢°Ñ¸Ã¼¯ºÏ¶ÔÏó×ÔÉí½»¸ø¸Ãµü´úÆ÷ @Override public Iterator createIterator() { //ÕâÀï¿ÉÒÔʹÓüòµ¥¹¤³§Ä£Ê½ return new ConcreteIterator(this); } } /*¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª*/ public class Client { public static void main(final String[] args) { Aggregat agg = new ConcreteAggregat(); final Iterator iterator = agg.createIterator(); System.out.println(iterator.first()); while (!iterator.isDone()) { //Item item = (Item)iterator.currentItem(); System.out.println(iterator.next()); } } } ",0 "th 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. * * Copyright (C) 2009-present, TBOOX Open Source Group. * * @author ruki * @file exception.h * */ #ifndef TB_PLATFORM_IMPL_EXCEPTION_H #define TB_PLATFORM_IMPL_EXCEPTION_H /* ////////////////////////////////////////////////////////////////////////////////////// * includes */ #include ""prefix.h"" /* ////////////////////////////////////////////////////////////////////////////////////// * extern */ __tb_extern_c_enter__ /* ////////////////////////////////////////////////////////////////////////////////////// * interfaces */ /* init the exception environment * * @return tb_true or tb_false */ tb_bool_t tb_exception_init_env(tb_noarg_t); // exit the exception environment tb_void_t tb_exception_exit_env(tb_noarg_t); /* ////////////////////////////////////////////////////////////////////////////////////// * extern */ __tb_extern_c_leave__ #endif ",0 "le>multiplier: Not compatible 👼
        « Up

        multiplier 8.6.0 Not compatible 👼

        📅 (2021-12-20 02:39:21 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-num            base        Num library distributed with the OCaml compiler
        base-threads        base
        base-unix           base
        camlp5              7.14        Preprocessor-pretty-printer of OCaml
        conf-findutils      1           Virtual package relying on findutils
        conf-perl           1           Virtual package relying on perl
        coq                 8.8.1       Formal proof management system
        num                 0           The Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.03.0      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.03.0      Official 4.03.0 release
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.9.1       A library manager for OCaml
        # opam file:
        opam-version: "2.0"
        maintainer: "Hugo.Herbelin@inria.fr"
        homepage: "https://github.com/coq-contribs/multiplier"
        license: "LGPL 2.1"
        build: [make "-j%{jobs}%"]
        install: [make "install"]
        remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Multiplier"]
        depends: [
          "ocaml"
          "coq" {>= "8.6" & < "8.7~"}
        ]
        tags: [ "keyword: hardware verification" "keyword: circuit" "category: Computer Science/Architecture" "category: Miscellaneous/Extracted Programs/Hardware" ]
        authors: [ "Christine Paulin" ]
        bug-reports: "https://github.com/coq-contribs/multiplier/issues"
        dev-repo: "git+https://github.com/coq-contribs/multiplier.git"
        synopsis: "Proof of a multiplier circuit"
        flags: light-uninstall
        url {
          src: "https://github.com/coq-contribs/multiplier/archive/v8.6.0.tar.gz"
          checksum: "md5=5f2496fce173169aa55b31104a377874"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-multiplier.8.6.0 coq.8.8.1
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.8.1).
        The following dependencies couldn't be met:
          - coq-multiplier -> coq < 8.7~ -> ocaml < 4.03.0
              base of this switch (use `--unlock-base' to force)
        Your request can't be satisfied:
          - No available version of coq satisfies the constraints
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-multiplier.8.6.0
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "
        {% csrf_token %}
        Edit Page {{ form|as_bootstrap:""horizontal"" }}
        Cancel
        {% endblock content %} ",0 "f the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** * core_text unit tests. * * @package core * @category phpunit * @copyright 2012 Petr Skoda {@link http://skodak.org} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Unit tests for our utf-8 aware text processing. * * @package core * @category phpunit * @copyright 2010 Petr Skoda (http://skodak.org) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class core_text_testcase extends advanced_testcase { /** * Tests the static parse charset method. */ public function test_parse_charset() { $this->assertSame('windows-1250', core_text::parse_charset('Cp1250')); // Does typo3 work? Some encoding moodle does not use. $this->assertSame('windows-1252', core_text::parse_charset('ms-ansi')); } /** * Tests the static convert method. */ public function test_convert() { $utf8 = ""Žluťoučký koníček""; $iso2 = pack(""H*"", ""ae6c75bb6f75e86bfd206b6f6eede8656b""); $win = pack(""H*"", ""8e6c759d6f75e86bfd206b6f6eede8656b""); $this->assertSame($iso2, core_text::convert($utf8, 'utf-8', 'iso-8859-2')); $this->assertSame($utf8, core_text::convert($iso2, 'iso-8859-2', 'utf-8')); $this->assertSame($win, core_text::convert($utf8, 'utf-8', 'win-1250')); $this->assertSame($utf8, core_text::convert($win, 'win-1250', 'utf-8')); $this->assertSame($iso2, core_text::convert($win, 'win-1250', 'iso-8859-2')); $this->assertSame($win, core_text::convert($iso2, 'iso-8859-2', 'win-1250')); $this->assertSame($iso2, core_text::convert($iso2, 'iso-8859-2', 'iso-8859-2')); $this->assertSame($win, core_text::convert($win, 'win-1250', 'cp1250')); $this->assertSame($utf8, core_text::convert($utf8, 'utf-8', 'utf-8')); $utf8 = '言語設定'; $str = pack(""H*"", ""b8c0b8ecc0dfc4ea""); // EUC-JP $this->assertSame($str, core_text::convert($utf8, 'utf-8', 'EUC-JP')); $this->assertSame($utf8, core_text::convert($str, 'EUC-JP', 'utf-8')); $this->assertSame($utf8, core_text::convert($utf8, 'utf-8', 'utf-8')); $str = pack(""H*"", ""1b24423840386c405f446a1b2842""); // ISO-2022-JP $this->assertSame($str, core_text::convert($utf8, 'utf-8', 'ISO-2022-JP')); $this->assertSame($utf8, core_text::convert($str, 'ISO-2022-JP', 'utf-8')); $this->assertSame($utf8, core_text::convert($utf8, 'utf-8', 'utf-8')); $str = pack(""H*"", ""8cbe8cea90dd92e8""); // SHIFT-JIS $this->assertSame($str, core_text::convert($utf8, 'utf-8', 'SHIFT-JIS')); $this->assertSame($utf8, core_text::convert($str, 'SHIFT-JIS', 'utf-8')); $this->assertSame($utf8, core_text::convert($utf8, 'utf-8', 'utf-8')); $utf8 = '简体中文'; $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB2312 $this->assertSame($str, core_text::convert($utf8, 'utf-8', 'GB2312')); $this->assertSame($utf8, core_text::convert($str, 'GB2312', 'utf-8')); $this->assertSame($utf8, core_text::convert($utf8, 'utf-8', 'utf-8')); $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB18030 $this->assertSame($str, core_text::convert($utf8, 'utf-8', 'GB18030')); $this->assertSame($utf8, core_text::convert($str, 'GB18030', 'utf-8')); $this->assertSame($utf8, core_text::convert($utf8, 'utf-8', 'utf-8')); $utf8 = ""Žluťoučký koníček""; $this->assertSame('Zlutoucky konicek', core_text::convert($utf8, 'utf-8', 'ascii')); $this->assertSame($utf8, core_text::convert($utf8.chr(130), 'utf-8', 'utf-8')); $utf8 = ""Der eine stößt den Speer zum Mann""; $this->assertSame('Der eine stoesst den Speer zum Mann', core_text::convert($utf8, 'utf-8', 'ascii')); $iso1 = core_text::convert($utf8, 'utf-8', 'iso-8859-1'); $this->assertSame('Der eine stoesst den Speer zum Mann', core_text::convert($iso1, 'iso-8859-1', 'ascii')); } /** * Tests the static sub string method. */ public function test_substr() { $str = ""Žluťoučký koníček""; $this->assertSame($str, core_text::substr($str, 0)); $this->assertSame('luťoučký koníček', core_text::substr($str, 1)); $this->assertSame('luť', core_text::substr($str, 1, 3)); $this->assertSame($str, core_text::substr($str, 0, 100)); $this->assertSame('če', core_text::substr($str, -3, 2)); $iso2 = pack(""H*"", ""ae6c75bb6f75e86bfd206b6f6eede8656b""); $this->assertSame(core_text::convert('luť', 'utf-8', 'iso-8859-2'), core_text::substr($iso2, 1, 3, 'iso-8859-2')); $this->assertSame(core_text::convert($str, 'utf-8', 'iso-8859-2'), core_text::substr($iso2, 0, 100, 'iso-8859-2')); $this->assertSame(core_text::convert('če', 'utf-8', 'iso-8859-2'), core_text::substr($iso2, -3, 2, 'iso-8859-2')); $win = pack(""H*"", ""8e6c759d6f75e86bfd206b6f6eede8656b""); $this->assertSame(core_text::convert('luť', 'utf-8', 'cp1250'), core_text::substr($win, 1, 3, 'cp1250')); $this->assertSame(core_text::convert($str, 'utf-8', 'cp1250'), core_text::substr($win, 0, 100, 'cp1250')); $this->assertSame(core_text::convert('če', 'utf-8', 'cp1250'), core_text::substr($win, -3, 2, 'cp1250')); $str = pack(""H*"", ""b8c0b8ecc0dfc4ea""); // EUC-JP $s = pack(""H*"", ""b8ec""); // EUC-JP $this->assertSame($s, core_text::substr($str, 1, 1, 'EUC-JP')); $str = pack(""H*"", ""1b24423840386c405f446a1b2842""); // ISO-2022-JP $s = pack(""H*"", ""1b2442386c1b2842""); // ISO-2022-JP $this->assertSame($s, core_text::substr($str, 1, 1, 'ISO-2022-JP')); $str = pack(""H*"", ""8cbe8cea90dd92e8""); // SHIFT-JIS $s = pack(""H*"", ""8cea""); // SHIFT-JIS $this->assertSame($s, core_text::substr($str, 1, 1, 'SHIFT-JIS')); $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB2312 $s = pack(""H*"", ""cce5""); // GB2312 $this->assertSame($s, core_text::substr($str, 1, 1, 'GB2312')); $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB18030 $s = pack(""H*"", ""cce5""); // GB18030 $this->assertSame($s, core_text::substr($str, 1, 1, 'GB18030')); } /** * Tests the static string length method. */ public function test_strlen() { $str = ""Žluťoučký koníček""; $this->assertSame(17, core_text::strlen($str)); $iso2 = pack(""H*"", ""ae6c75bb6f75e86bfd206b6f6eede8656b""); $this->assertSame(17, core_text::strlen($iso2, 'iso-8859-2')); $win = pack(""H*"", ""8e6c759d6f75e86bfd206b6f6eede8656b""); $this->assertSame(17, core_text::strlen($win, 'cp1250')); $str = pack(""H*"", ""b8ec""); // EUC-JP $this->assertSame(1, core_text::strlen($str, 'EUC-JP')); $str = pack(""H*"", ""b8c0b8ecc0dfc4ea""); // EUC-JP $this->assertSame(4, core_text::strlen($str, 'EUC-JP')); $str = pack(""H*"", ""1b2442386c1b2842""); // ISO-2022-JP $this->assertSame(1, core_text::strlen($str, 'ISO-2022-JP')); $str = pack(""H*"", ""1b24423840386c405f446a1b2842""); // ISO-2022-JP $this->assertSame(4, core_text::strlen($str, 'ISO-2022-JP')); $str = pack(""H*"", ""8cea""); // SHIFT-JIS $this->assertSame(1, core_text::strlen($str, 'SHIFT-JIS')); $str = pack(""H*"", ""8cbe8cea90dd92e8""); // SHIFT-JIS $this->assertSame(4, core_text::strlen($str, 'SHIFT-JIS')); $str = pack(""H*"", ""cce5""); // GB2312 $this->assertSame(1, core_text::strlen($str, 'GB2312')); $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB2312 $this->assertSame(4, core_text::strlen($str, 'GB2312')); $str = pack(""H*"", ""cce5""); // GB18030 $this->assertSame(1, core_text::strlen($str, 'GB18030')); $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB18030 $this->assertSame(4, core_text::strlen($str, 'GB18030')); } /** * Tests the static strtolower method. */ public function test_strtolower() { $str = ""Žluťoučký koníček""; $low = 'žluťoučký koníček'; $this->assertSame($low, core_text::strtolower($str)); $iso2 = pack(""H*"", ""ae6c75bb6f75e86bfd206b6f6eede8656b""); $this->assertSame(core_text::convert($low, 'utf-8', 'iso-8859-2'), core_text::strtolower($iso2, 'iso-8859-2')); $win = pack(""H*"", ""8e6c759d6f75e86bfd206b6f6eede8656b""); $this->assertSame(core_text::convert($low, 'utf-8', 'cp1250'), core_text::strtolower($win, 'cp1250')); $str = '言語設定'; $this->assertSame($str, core_text::strtolower($str)); $str = '简体中文'; $this->assertSame($str, core_text::strtolower($str)); $str = pack(""H*"", ""1b24423840386c405f446a1b2842""); // ISO-2022-JP $this->assertSame($str, core_text::strtolower($str, 'ISO-2022-JP')); $str = pack(""H*"", ""8cbe8cea90dd92e8""); // SHIFT-JIS $this->assertSame($str, core_text::strtolower($str, 'SHIFT-JIS')); $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB2312 $this->assertSame($str, core_text::strtolower($str, 'GB2312')); $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB18030 $this->assertSame($str, core_text::strtolower($str, 'GB18030')); // Typo3 has problems with integers. $str = 1309528800; $this->assertSame((string)$str, core_text::strtolower($str)); } /** * Tests the static strtoupper. */ public function test_strtoupper() { $str = ""Žluťoučký koníček""; $up = 'ŽLUŤOUČKÝ KONÍČEK'; $this->assertSame($up, core_text::strtoupper($str)); $iso2 = pack(""H*"", ""ae6c75bb6f75e86bfd206b6f6eede8656b""); $this->assertSame(core_text::convert($up, 'utf-8', 'iso-8859-2'), core_text::strtoupper($iso2, 'iso-8859-2')); $win = pack(""H*"", ""8e6c759d6f75e86bfd206b6f6eede8656b""); $this->assertSame(core_text::convert($up, 'utf-8', 'cp1250'), core_text::strtoupper($win, 'cp1250')); $str = '言語設定'; $this->assertSame($str, core_text::strtoupper($str)); $str = '简体中文'; $this->assertSame($str, core_text::strtoupper($str)); $str = pack(""H*"", ""1b24423840386c405f446a1b2842""); // ISO-2022-JP $this->assertSame($str, core_text::strtoupper($str, 'ISO-2022-JP')); $str = pack(""H*"", ""8cbe8cea90dd92e8""); // SHIFT-JIS $this->assertSame($str, core_text::strtoupper($str, 'SHIFT-JIS')); $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB2312 $this->assertSame($str, core_text::strtoupper($str, 'GB2312')); $str = pack(""H*"", ""bcf2cce5d6d0cec4""); // GB18030 $this->assertSame($str, core_text::strtoupper($str, 'GB18030')); } /** * Test the strrev method. */ public function test_strrev() { $strings = array( ""Žluťoučký koníček"" => ""kečínok ýkčuoťulŽ"", 'ŽLUŤOUČKÝ KONÍČEK' => ""KEČÍNOK ÝKČUOŤULŽ"", '言語設定' => '定設語言', '简体中文' => '文中体简', ""Der eine stößt den Speer zum Mann"" => ""nnaM muz reepS ned tßöts enie reD"" ); foreach ($strings as $before => $after) { // Make sure we can reverse it both ways and that it comes out the same. $this->assertSame($after, core_text::strrev($before)); $this->assertSame($before, core_text::strrev($after)); // Reverse it twice to be doubly sure. $this->assertSame($after, core_text::strrev(core_text::strrev($after))); } } /** * Tests the static strpos method. */ public function test_strpos() { $str = ""Žluťoučký koníček""; $this->assertSame(10, core_text::strpos($str, 'koníč')); } /** * Tests the static strrpos. */ public function test_strrpos() { $str = ""Žluťoučký koníček""; $this->assertSame(11, core_text::strrpos($str, 'o')); } /** * Tests the static specialtoascii method. */ public function test_specialtoascii() { $str = ""Žluťoučký koníček""; $this->assertSame('Zlutoucky konicek', core_text::specialtoascii($str)); } /** * Tests the static encode_mimeheader method. * This also tests method moodle_phpmailer::encodeHeader that calls core_text::encode_mimeheader */ public function test_encode_mimeheader() { global $CFG; require_once($CFG->libdir.'/phpmailer/moodle_phpmailer.php'); $mailer = new moodle_phpmailer(); // Encode short string with non-latin characters. $str = ""Žluťoučký koníček""; $encodedstr = '=?utf-8?B?xb1sdcWlb3XEjWvDvSBrb27DrcSNZWs=?='; $this->assertSame($encodedstr, core_text::encode_mimeheader($str)); $this->assertSame($encodedstr, $mailer->encodeHeader($str)); $this->assertSame('""' . $encodedstr . '""', $mailer->encodeHeader($str, 'phrase')); // Encode short string without non-latin characters. Make sure the quotes are escaped in quoted email headers. $latinstr = 'text""with quotes'; $this->assertSame($latinstr, core_text::encode_mimeheader($latinstr)); $this->assertSame($latinstr, $mailer->encodeHeader($latinstr)); $this->assertSame('""text\\""with quotes""', $mailer->encodeHeader($latinstr, 'phrase')); // Encode long string without non-latin characters. $longlatinstr = 'This is a very long text that still should not be split into several lines in the email headers because '. 'it does not have any non-latin characters. The ""quotes"" and \\backslashes should be escaped only if it\'s a part of email address'; $this->assertSame($longlatinstr, core_text::encode_mimeheader($longlatinstr)); $this->assertSame($longlatinstr, $mailer->encodeHeader($longlatinstr)); $longlatinstrwithslash = preg_replace(['/\\\\/', ""/\""/""], ['\\\\\\', '\\""'], $longlatinstr); $this->assertSame('""' . $longlatinstrwithslash . '""', $mailer->encodeHeader($longlatinstr, 'phrase')); // Encode long string with non-latin characters. $longstr = ""Неопознанная ошибка в файле C:\\tmp\\: \""Не пользуйтесь виндоуз\""""; $encodedlongstr = ""=?utf-8?B?0J3QtdC+0L/QvtC30L3QsNC90L3QsNGPINC+0YjQuNCx0LrQsCDQsiDRhNCw?= =?utf-8?B?0LnQu9C1IEM6XHRtcFw6ICLQndC1INC/0L7Qu9GM0LfRg9C50YLQtdGB?= =?utf-8?B?0Ywg0LLQuNC90LTQvtGD0Lci?=""; $this->assertSame($encodedlongstr, $mailer->encodeHeader($longstr)); $this->assertSame('""' . $encodedlongstr . '""', $mailer->encodeHeader($longstr, 'phrase')); } /** * Tests the static entities_to_utf8 method. */ public function test_entities_to_utf8() { $str = ""Žluťoučký koníček©"&<>§«""; $this->assertSame(""Žluťoučký koníček©\""&<>§«"", core_text::entities_to_utf8($str)); } /** * Tests the static utf8_to_entities method. */ public function test_utf8_to_entities() { $str = ""Žluťoučký koníček©"&<>§«""; $this->assertSame(""Žluťoučký koníček©"&<>§«"", core_text::utf8_to_entities($str)); $this->assertSame(""Žluťoučký koníček©"&<>§«"", core_text::utf8_to_entities($str, true)); $str = ""Žluťoučký koníček©"&<>§«""; $this->assertSame(""Žluťoučký koníček©\""&<>§«"", core_text::utf8_to_entities($str, false, true)); $this->assertSame(""Žluťoučký koníček©\""&<>§«"", core_text::utf8_to_entities($str, true, true)); } /** * Tests the static trim_utf8_bom method. */ public function test_trim_utf8_bom() { $bom = ""\xef\xbb\xbf""; $str = ""Žluťoučký koníček""; $this->assertSame($str.$bom, core_text::trim_utf8_bom($bom.$str.$bom)); } /** * Tests the static get_encodings method. */ public function test_get_encodings() { $encodings = core_text::get_encodings(); $this->assertTrue(is_array($encodings)); $this->assertTrue(count($encodings) > 1); $this->assertTrue(isset($encodings['UTF-8'])); } /** * Tests the static code2utf8 method. */ public function test_code2utf8() { $this->assertSame('Ž', core_text::code2utf8(381)); } /** * Tests the static utf8ord method. */ public function test_utf8ord() { $this->assertSame(ord(''), core_text::utf8ord('')); $this->assertSame(ord('f'), core_text::utf8ord('f')); $this->assertSame(0x03B1, core_text::utf8ord('α')); $this->assertSame(0x0439, core_text::utf8ord('й')); $this->assertSame(0x2FA1F, core_text::utf8ord('𯨟')); $this->assertSame(381, core_text::utf8ord('Ž')); } /** * Tests the static strtotitle method. */ public function test_strtotitle() { $str = ""žluťoučký koníček""; $this->assertSame(""Žluťoučký Koníček"", core_text::strtotitle($str)); } /** * Test strrchr. */ public function test_strrchr() { $str = ""Žluťoučký koníček""; $this->assertSame('koníček', core_text::strrchr($str, 'koní')); $this->assertSame('Žluťoučký ', core_text::strrchr($str, 'koní', true)); $this->assertFalse(core_text::strrchr($str, 'A')); $this->assertFalse(core_text::strrchr($str, 'ç', true)); } } ",0 ">

        New Course

        {% include ""account/mail/form.html"" with form=form %}
        ",0 "traints\UniqueEntity; /** * Documento * * @ORM\Table(name=""documentos"") * @ORM\Entity */ class Documento { /** * @var integer * * @ORM\Column(name=""id"", type=""integer"") * @ORM\Id * @ORM\GeneratedValue(strategy=""AUTO"") */ private $id; /** * @var text * * @ORM\Column(name=""descripcion"", type=""text"",nullable=true) */ private $descripcion; /** * @var \DateTime * * @ORM\Column(name=""fecha_ingreso"", type=""date"") */ private $fechaIngreso; /** * @ORM\ManyToOne(targetEntity=""AppBundle\Entity\Expediente"",inversedBy=""documentos"") * @ORM\JoinColumn(name=""expediente_id"", referencedColumnName=""id"") */ private $expediente; /** * @ORM\ManyToOne(targetEntity=""TipoDocumentoExpediente"",inversedBy=""documentos"") * @ORM\JoinColumn(name=""tipo_documento_expediente_id"", referencedColumnName=""id"") */ private $tipoDocumentoExpediente; /** * @ORM\OneToMany(targetEntity=""AppBundle\Entity\Hoja"", mappedBy=""documento"",cascade={""persist"", ""remove""}) * @ORM\OrderBy({""numero"" = ""ASC""}) */ private $hojas; /** * @var datetime $creado * * @Gedmo\Timestampable(on=""create"") * @ORM\Column(name=""creado"", type=""datetime"") */ private $creado; /** * @var datetime $actualizado * * @Gedmo\Timestampable(on=""update"") * @ORM\Column(name=""actualizado"",type=""datetime"") */ private $actualizado; /** * @var integer $creadoPor * * @Gedmo\Blameable(on=""create"") * @ORM\ManyToOne(targetEntity=""UsuariosBundle\Entity\Usuario"") * @ORM\JoinColumn(name=""creado_por"", referencedColumnName=""id"", nullable=true) */ private $creadoPor; /** * @var integer $actualizadoPor * * @Gedmo\Blameable(on=""update"") * @ORM\ManyToOne(targetEntity=""UsuariosBundle\Entity\Usuario"") * @ORM\JoinColumn(name=""actualizado_por"", referencedColumnName=""id"", nullable=true) */ private $actualizadoPor; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set descripcion * * @param string $descripcion * * @return Documento */ public function setDescripcion($descripcion) { $this->descripcion = $descripcion; return $this; } /** * Get descripcion * * @return string */ public function getDescripcion() { return $this->descripcion; } /** * Set fechaIngreso * * @param \DateTime $fechaIngreso * * @return Documento */ public function setFechaIngreso($fechaIngreso) { $this->fechaIngreso = $fechaIngreso; return $this; } /** * Get fechaIngreso * * @return \DateTime */ public function getFechaIngreso() { return $this->fechaIngreso; } /** * Set orden * * @param integer $orden * * @return Documento */ public function setOrden($orden) { $this->orden = $orden; return $this; } /** * Get orden * * @return integer */ public function getOrden() { return $this->orden; } /** * Constructor */ public function __construct() { $this->hojas = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Set creado * * @param \DateTime $creado * * @return Documento */ public function setCreado($creado) { $this->creado = $creado; return $this; } /** * Get creado * * @return \DateTime */ public function getCreado() { return $this->creado; } /** * Set actualizado * * @param \DateTime $actualizado * * @return Documento */ public function setActualizado($actualizado) { $this->actualizado = $actualizado; return $this; } /** * Get actualizado * * @return \DateTime */ public function getActualizado() { return $this->actualizado; } /** * Set expediente * * @param \AppBundle\Entity\Expediente $expediente * * @return Documento */ public function setExpediente(\AppBundle\Entity\Expediente $expediente = null) { $this->expediente = $expediente; return $this; } /** * Get expediente * * @return \AppBundle\Entity\Expediente */ public function getExpediente() { return $this->expediente; } /** * Add hoja * * @param \AppBundle\Entity\Hoja $hoja * * @return Documento */ public function addHoja(\AppBundle\Entity\Hoja $hoja) { $this->hojas[] = $hoja; return $this; } /** * Remove hoja * * @param \AppBundle\Entity\Hoja $hoja */ public function removeHoja(\AppBundle\Entity\Hoja $hoja) { $this->hojas->removeElement($hoja); } /** * Get hojas * * @return \Doctrine\Common\Collections\Collection */ public function getHojas() { return $this->hojas; } /** * Set creadoPor * * @param \UsuariosBundle\Entity\Usuario $creadoPor * * @return Documento */ public function setCreadoPor(\UsuariosBundle\Entity\Usuario $creadoPor = null) { $this->creadoPor = $creadoPor; return $this; } /** * Get creadoPor * * @return \UsuariosBundle\Entity\Usuario */ public function getCreadoPor() { return $this->creadoPor; } /** * Set actualizadoPor * * @param \UsuariosBundle\Entity\Usuario $actualizadoPor * * @return Documento */ public function setActualizadoPor(\UsuariosBundle\Entity\Usuario $actualizadoPor = null) { $this->actualizadoPor = $actualizadoPor; return $this; } /** * Get actualizadoPor * * @return \UsuariosBundle\Entity\Usuario */ public function getActualizadoPor() { return $this->actualizadoPor; } /** * Set tipoDocumentoExpediente * * @param \AppBundle\Entity\TipoDocumentoExpediente $tipoDocumentoExpediente * * @return Documento */ public function setTipoDocumentoExpediente(\AppBundle\Entity\TipoDocumentoExpediente $tipoDocumentoExpediente = null) { $this->tipoDocumentoExpediente = $tipoDocumentoExpediente; return $this; } /** * Get tipoDocumentoExpediente * * @return \AppBundle\Entity\TipoDocumentoExpediente */ public function getTipoDocumentoExpediente() { return $this->tipoDocumentoExpediente; } } ",0 "s. // Copyright (C) 2001-2013 Oliver Burn // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //////////////////////////////////////////////////////////////////////////////// package com.puppycrawl.tools.checkstyle.checks.coding; import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; import java.io.File; import org.junit.Test; /** * Test fixture for the UnnecessaryParenthesesCheck. * * @author Eric K. Roe */ public class UnnecessaryParenthesesCheckTest extends BaseCheckTestSupport { private static final String TEST_FILE = ""coding"" + File.separator + ""InputUnnecessaryParentheses.java""; @Test public void testDefault() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(UnnecessaryParenthesesCheck.class); final String[] expected = { ""4:22: Unnecessary parentheses around assignment right-hand side."", ""4:29: Unnecessary parentheses around expression."", ""4:31: Unnecessary parentheses around identifier 'i'."", ""4:46: Unnecessary parentheses around assignment right-hand side."", ""5:15: Unnecessary parentheses around assignment right-hand side."", ""6:14: Unnecessary parentheses around identifier 'x'."", ""6:17: Unnecessary parentheses around assignment right-hand side."", ""7:15: Unnecessary parentheses around assignment right-hand side."", ""8:14: Unnecessary parentheses around identifier 'x'."", ""8:17: Unnecessary parentheses around assignment right-hand side."", ""11:22: Unnecessary parentheses around assignment right-hand side."", ""11:30: Unnecessary parentheses around identifier 'i'."", ""11:46: Unnecessary parentheses around assignment right-hand side."", ""15:17: Unnecessary parentheses around literal '0'."", ""25:11: Unnecessary parentheses around assignment right-hand side."", ""29:11: Unnecessary parentheses around assignment right-hand side."", ""31:11: Unnecessary parentheses around assignment right-hand side."", ""33:11: Unnecessary parentheses around assignment right-hand side."", ""34:16: Unnecessary parentheses around identifier 'a'."", ""35:14: Unnecessary parentheses around identifier 'a'."", ""35:20: Unnecessary parentheses around identifier 'b'."", ""35:26: Unnecessary parentheses around literal '600'."", ""35:40: Unnecessary parentheses around literal '12.5f'."", ""35:56: Unnecessary parentheses around identifier 'arg2'."", ""36:14: Unnecessary parentheses around string \""this\""."", ""36:25: Unnecessary parentheses around string \""that\""."", ""37:11: Unnecessary parentheses around assignment right-hand side."", ""37:14: Unnecessary parentheses around string \""this is a really, really...\""."", ""39:16: Unnecessary parentheses around return value."", ""43:21: Unnecessary parentheses around literal '1'."", ""43:26: Unnecessary parentheses around literal '13.5'."", ""44:22: Unnecessary parentheses around literal 'true'."", ""45:17: Unnecessary parentheses around identifier 'b'."", ""49:17: Unnecessary parentheses around assignment right-hand side."", ""51:11: Unnecessary parentheses around assignment right-hand side."", ""53:16: Unnecessary parentheses around return value."", ""63:13: Unnecessary parentheses around expression."", ""67:16: Unnecessary parentheses around expression."", ""72:19: Unnecessary parentheses around expression."", ""73:23: Unnecessary parentheses around literal '4000'."", ""78:19: Unnecessary parentheses around assignment right-hand side."", ""80:11: Unnecessary parentheses around assignment right-hand side."", ""80:16: Unnecessary parentheses around literal '3'."", ""81:27: Unnecessary parentheses around assignment right-hand side."", }; verify(checkConfig, getPath(TEST_FILE), expected); } @Test public void test15Extensions() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(UnnecessaryParenthesesCheck.class); final String[] expected = {}; verify(checkConfig, getPath(""Input15Extensions.java""), expected); } } ",0 "ction; use Illuminate\Redis\Connections\PhpRedisClusterConnection; class PhpRedisConnector { /** * Create a new clustered Predis connection. * * @param array $config * @param array $options * @return \Illuminate\Redis\Connections\PhpRedisConnection */ public function connect(array $config, array $options) { return new PhpRedisConnection($this->createClient(array_merge( $config, $options, Arr::pull($config, 'options', []) ))); } /** * Create a new clustered Predis connection. * * @param array $config * @param array $clusterOptions * @param array $options * @return \Illuminate\Redis\Connections\PhpRedisClusterConnection */ public function connectToCluster(array $config, array $clusterOptions, array $options) { $options = array_merge($options, $clusterOptions, Arr::pull($config, 'options', [])); return new PhpRedisClusterConnection($this->createRedisClusterInstance( array_map([$this, 'buildClusterConnectionString'], $config), $options )); } /** * Build a single cluster seed string from array. * * @param array $server * @return string */ protected function buildClusterConnectionString(array $server) { return $server['host'].':'.$server['port'].'?'.http_build_query(Arr::only($server, [ 'database', 'password', 'prefix', 'read_timeout', ])); } /** * Create the Redis client instance. * * @param array $config * @return \Redis */ protected function createClient(array $config) { return tap(new Redis, function ($client) use ($config) { $this->establishConnection($client, $config); if (! empty($config['password'])) { $client->auth($config['password']); } if (! empty($config['database'])) { $client->select($config['database']); } if (! empty($config['prefix'])) { $client->setOption(Redis::OPT_PREFIX, $config['prefix']); } if (! empty($config['read_timeout'])) { $client->setOption(Redis::OPT_READ_TIMEOUT, $config['read_timeout']); } }); } /** * Establish a connection with the Redis host. * * @param \Redis $client * @param array $config * @return void */ protected function establishConnection($client, array $config) { $client->{($config['persistent'] ?? false) === true ? 'pconnect' : 'connect'}( $config['host'], $config['port'], Arr::get($config, 'timeout', 0) ); } /** * Create a new redis cluster instance. * * @param array $servers * @param array $options * @return \RedisCluster */ protected function createRedisClusterInstance(array $servers, array $options) { return new RedisCluster( null, array_values($servers), $options['timeout'] ?? 0, $options['read_timeout'] ?? 0, isset($options['persistent']) && $options['persistent'] ); } } ",0 "ile; import java.io.IOException; public class PreviewImageCanvas extends JPanel { private BufferedImage image; public PreviewImageCanvas() { image = null; } public Dimension getPreferredSize() { return new Dimension(512, 512); } public void paintComponent(Graphics g) { super.paintComponent(g); if (this.image != null) { g.drawImage(this.image, 0, 0, 512, 512, this); } } public void loadImage(String imageLocation) throws IOException { this.image = ImageIO.read(new File(imageLocation)); repaint(); } public BufferedImage getImage() { return this.image; } public void setImage(BufferedImage image) { this.image = image; repaint(); } } ",0 "> Talk Shoppe

        Managing PartnerLiana Morgado

        Liana Morgado began her career in 1999 as a Strategic Planner at McCann-Erickson in Los Angeles. She quickly learned that her favorite part of the job was the time she spent talking to consumers. With three years of planning under her belt, she took on a challenging position of Research Director at Look-Look Inc. There, she spent four exciting years exploring the lives and minds of youth culture. Most notably, she worked on a year-long project for Volkswagen to inspire the next generation of Volkswagen vehicles. Her task was to immerse a team of German engineers and designers in the American culture so that they could better design vehicles that “hit home” with American car buyers. In 2006 Liana changed gears and moved on to Hall & Partners where she was fortunate to work with some of the best and brightest brands in the world: Cisco, Disney, Honda, PepsiCo, Sony, Taco Bell, and Target just to name a few. With 12 years of market research experience, Liana ventured out on her own to start Talk Shoppe.


        Past clients

        ",0 "ade available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ package org.eclipse.smarthome.core.library.types; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; import org.eclipse.smarthome.core.types.Command; import org.eclipse.smarthome.core.types.PrimitiveType; import org.eclipse.smarthome.core.types.State; public class DateTimeType implements PrimitiveType, State, Command { public final static SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat(""yyyy-MM-dd'T'HH:mm:ss""); protected Calendar calendar; public DateTimeType() { this(Calendar.getInstance()); } public DateTimeType(Calendar calendar) { this.calendar = calendar; } public DateTimeType(String calendarValue) { Date date = null; try { date = DATE_FORMATTER.parse(calendarValue); } catch (ParseException fpe) { throw new IllegalArgumentException(calendarValue + "" is not in a valid format."", fpe); } if (date != null) { calendar = Calendar.getInstance(); calendar.setTime(date); } } public Calendar getCalendar() { return calendar; } public static DateTimeType valueOf(String value) { return new DateTimeType(value); } public String format(String pattern) { try { return String.format(pattern, calendar); } catch (NullPointerException npe) { return DATE_FORMATTER.format(calendar.getTime()); } } public String format(Locale locale, String pattern) { return String.format(locale, pattern, calendar); } @Override public String toString() { return DATE_FORMATTER.format(calendar.getTime()); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((calendar == null) ? 0 : calendar.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; DateTimeType other = (DateTimeType) obj; if (calendar == null) { if (other.calendar != null) return false; } else if (!calendar.equals(other.calendar)) return false; return true; } } ",0 "all() { $db_config = Kohana::$config->load('database'); $default = $db_config->get('default'); self::$table_prefix = $default['table_prefix']; self::_sql(); } private static function _sql() { $db = Database::instance('default'); $create = "" CREATE TABLE IF NOT EXISTS `"".self::$table_prefix.""facebook_settings` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `key` varchar(100) NOT NULL DEFAULT '', `value` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uniq_key` (`key`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; ""; $db->query(NULL, $create, true); // Insert Default Settings Keys // Use ORM to prevent issues with unique keys // Facebook Application ID / API Key $setting = ORM::factory('facebook_setting') ->where('key', '=', 'application_id') ->find(); $setting->key = 'application_id'; $setting->save(); // Facebook Application Secret $setting = ORM::factory('facebook_setting') ->where('key', '=', 'application_secret') ->find(); $setting->key = 'application_secret'; $setting->save(); // Access token for offline access to Facebook $setting = ORM::factory('facebook_setting') ->where('key', '=', 'access_token') ->find(); $setting->key = 'access_token'; $setting->save(); // Unique ID on Facebook of the user Authorizing the Facebook Application $setting = ORM::factory('facebook_setting') ->where('key', '=', 'access_user_id') ->find(); $setting->key = 'access_user_id'; $setting->save(); // Name of the user Authorizing the Facebook Application $setting = ORM::factory('facebook_setting') ->where('key', '=', 'access_name') ->find(); $setting->key = 'access_name'; $setting->save(); } }",0 " AGESA * @e sub-project: FCH * @e \$Revision: 63425 $ @e \$Date: 2011-12-22 11:24:10 -0600 (Thu, 22 Dec 2011) $ * */ /* ***************************************************************************** * * Copyright 2008 - 2012 ADVANCED MICRO DEVICES, INC. All Rights Reserved. * * AMD is granting you permission to use this software (the Materials) * pursuant to the terms and conditions of your Software License Agreement * with AMD. This header does *NOT* give you permission to use the Materials * or any rights under AMD's intellectual property. Your use of any portion * of these Materials shall constitute your acceptance of those terms and * conditions. If you do not agree to the terms and conditions of the Software * License Agreement, please do not use any portion of these Materials. * * CONFIDENTIALITY: The Materials and all other information, identified as * confidential and provided to you by AMD shall be kept confidential in * accordance with the terms and conditions of the Software License Agreement. * * LIMITATION OF LIABILITY: THE MATERIALS AND ANY OTHER RELATED INFORMATION * PROVIDED TO YOU BY AMD ARE PROVIDED ""AS IS"" WITHOUT ANY EXPRESS OR IMPLIED * WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO WARRANTIES OF * MERCHANTABILITY, NONINFRINGEMENT, TITLE, FITNESS FOR ANY PARTICULAR PURPOSE, * OR WARRANTIES ARISING FROM CONDUCT, COURSE OF DEALING, OR USAGE OF TRADE. * IN NO EVENT SHALL AMD OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES WHATSOEVER * (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS * INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF AMD'S NEGLIGENCE, * GROSS NEGLIGENCE, THE USE OF OR INABILITY TO USE THE MATERIALS OR ANY OTHER * RELATED INFORMATION PROVIDED TO YOU BY AMD, EVEN IF AMD HAS BEEN ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME JURISDICTIONS PROHIBIT THE * EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, * THE ABOVE LIMITATION MAY NOT APPLY TO YOU. * * AMD does not assume any responsibility for any errors which may appear in * the Materials or any other related information provided to you by AMD, or * result from use of the Materials or any related information. * * You agree that you will not reverse engineer or decompile the Materials. * * NO SUPPORT OBLIGATION: AMD is not obligated to furnish, support, or make any * further information, software, technical information, know-how, or show-how * available to you. Additionally, AMD retains the right to modify the * Materials at any time, without notice, and is not obligated to provide such * modified Materials to you. * * U.S. GOVERNMENT RESTRICTED RIGHTS: The Materials are provided with * ""RESTRICTED RIGHTS."" Use, duplication, or disclosure by the Government is * subject to the restrictions as set forth in FAR 52.227-14 and * DFAR252.227-7013, et seq., or its successor. Use of the Materials by the * Government constitutes acknowledgement of AMD's proprietary rights in them. * * EXPORT ASSURANCE: You agree and certify that neither the Materials, nor any * direct product thereof will be exported directly or indirectly, into any * country prohibited by the United States Export Administration Act and the * regulations thereunder, without the required authorization from the U.S. * government nor will be used for any purpose prohibited by the same. **************************************************************************** */ #include ""FchPlatform.h"" #define FILECODE (0xB003) // // Declaration of local functions // VOID ConfigureAzaliaPinCmd ( IN FCH_DATA_BLOCK *FchDataPtr, IN UINT32 BAR0, IN UINT8 ChannelNum ); VOID ConfigureAzaliaSetConfigD4Dword ( IN CODEC_ENTRY *TempAzaliaCodecEntryPtr, IN UINT32 ChannelNumDword, IN UINT32 BAR0, IN AMD_CONFIG_PARAMS *StdHeader ); /** * FchInitMidAzalia - Config Azalia controller after PCI * emulation * * * * @param[in] FchDataPtr Fch configuration structure pointer. * */ VOID FchInitMidAzalia ( IN VOID *FchDataPtr ) { UINT8 Index; BOOLEAN EnableAzalia; UINT32 PinRouting; UINT8 ChannelNum; UINT8 AzaliaTempVariableByte; UINT16 AzaliaTempVariableWord; UINT32 BAR0; FCH_DATA_BLOCK *LocalCfgPtr; AMD_CONFIG_PARAMS *StdHeader; LocalCfgPtr = (FCH_DATA_BLOCK *) FchDataPtr; StdHeader = LocalCfgPtr->StdHeader; EnableAzalia = FALSE; ChannelNum = 0; AzaliaTempVariableByte = 0; AzaliaTempVariableWord = 0; BAR0 = 0; if ( LocalCfgPtr->Azalia.AzaliaEnable == AzDisable) { return; } else { RwPci ((((0x14<<3)+2) << 16) + 0x04, AccessWidth8, (UINT32)~BIT1, (UINT32)BIT1, StdHeader); if ( LocalCfgPtr->Azalia.AzaliaSsid != 0 ) { RwPci ((((0x14<<3)+2) << 16) + 0x2C, AccessWidth32, 0x00, LocalCfgPtr->Azalia.AzaliaSsid, StdHeader); } ReadPci ((((0x14<<3)+2) << 16) + 0x10, AccessWidth32, &BAR0, StdHeader); if ( BAR0 != 0 ) { if ( BAR0 != 0xFFFFFFFF ) { BAR0 &= ~(0x03FFF); EnableAzalia = TRUE; } } } if ( EnableAzalia ) { // // Get SDIN Configuration // if ( LocalCfgPtr->Azalia.AzaliaConfig.AzaliaSdin0 == 2 ) { RwMem (ACPI_MMIO_BASE + GPIO_BASE + FCH_GPIO_REG167, AccessWidth8, 0, 0x3E); RwMem (ACPI_MMIO_BASE + IOMUX_BASE + FCH_GPIO_REG167, AccessWidth8, 0, 0x00); } else { RwMem (ACPI_MMIO_BASE + GPIO_BASE + FCH_GPIO_REG167, AccessWidth8, 0, 0x0); RwMem (ACPI_MMIO_BASE + IOMUX_BASE + FCH_GPIO_REG167, AccessWidth8, 0, 0x01); } if ( LocalCfgPtr->Azalia.AzaliaConfig.AzaliaSdin1 == 2 ) { RwMem (ACPI_MMIO_BASE + GPIO_BASE + FCH_GPIO_REG168, AccessWidth8, 0, 0x3E); RwMem (ACPI_MMIO_BASE + IOMUX_BASE + FCH_GPIO_REG168, AccessWidth8, 0, 0x00); } else { RwMem (ACPI_MMIO_BASE + GPIO_BASE + FCH_GPIO_REG168, AccessWidth8, 0, 0x0); RwMem (ACPI_MMIO_BASE + IOMUX_BASE + FCH_GPIO_REG168, AccessWidth8, 0, 0x01); } if ( LocalCfgPtr->Azalia.AzaliaConfig.AzaliaSdin2 == 2 ) { RwMem (ACPI_MMIO_BASE + GPIO_BASE + FCH_GPIO_REG169, AccessWidth8, 0, 0x3E); RwMem (ACPI_MMIO_BASE + IOMUX_BASE + FCH_GPIO_REG169, AccessWidth8, 0, 0x00); } else { RwMem (ACPI_MMIO_BASE + GPIO_BASE + FCH_GPIO_REG169, AccessWidth8, 0, 0x0); RwMem (ACPI_MMIO_BASE + IOMUX_BASE + FCH_GPIO_REG169, AccessWidth8, 0, 0x01); } if ( LocalCfgPtr->Azalia.AzaliaConfig.AzaliaSdin3 == 2 ) { RwMem (ACPI_MMIO_BASE + GPIO_BASE + FCH_GPIO_REG170, AccessWidth8, 0, 0x3E); RwMem (ACPI_MMIO_BASE + IOMUX_BASE + FCH_GPIO_REG170, AccessWidth8, 0, 0x00); } else { RwMem (ACPI_MMIO_BASE + GPIO_BASE + FCH_GPIO_REG170, AccessWidth8, 0, 0x0); RwMem (ACPI_MMIO_BASE + IOMUX_BASE + FCH_GPIO_REG170, AccessWidth8, 0, 0x01); } Index = 11; do { ReadMem ( BAR0 + 0x08, AccessWidth8, &AzaliaTempVariableByte); AzaliaTempVariableByte |= BIT0; WriteMem (BAR0 + 0x08, AccessWidth8, &AzaliaTempVariableByte); FchStall (1000, StdHeader); ReadMem (BAR0 + 0x08, AccessWidth8, &AzaliaTempVariableByte); Index--; } while ((! (AzaliaTempVariableByte & BIT0)) && (Index > 0) ); if ( Index == 0 ) { return; } FchStall (1000, StdHeader); ReadMem ( BAR0 + 0x0E, AccessWidth16, &AzaliaTempVariableWord); if ( AzaliaTempVariableWord & 0x0F ) { // //at least one azalia codec found // //PinRouting = LocalCfgPtr->Azalia.AZALIA_CONFIG.AzaliaSdinPin; //new structure need make up PinRouting //need adjust later!!! // PinRouting = 0; PinRouting = (UINT32 )LocalCfgPtr->Azalia.AzaliaConfig.AzaliaSdin3; PinRouting <<= 8; PinRouting |= (UINT32 )LocalCfgPtr->Azalia.AzaliaConfig.AzaliaSdin2; PinRouting <<= 8; PinRouting |= (UINT32 )LocalCfgPtr->Azalia.AzaliaConfig.AzaliaSdin1; PinRouting <<= 8; PinRouting |= (UINT32 )LocalCfgPtr->Azalia.AzaliaConfig.AzaliaSdin0; do { if ( ( ! (PinRouting & BIT0) ) && (PinRouting & BIT1) ) { ConfigureAzaliaPinCmd (LocalCfgPtr, BAR0, ChannelNum); } PinRouting >>= 8; ChannelNum++; } while ( ChannelNum != 4 ); } else { // //No Azalia codec found // if ( LocalCfgPtr->Azalia.AzaliaEnable != AzEnable ) { EnableAzalia = FALSE; ///set flag to disable Azalia } } } if ( EnableAzalia ) { if ( LocalCfgPtr->Azalia.AzaliaSnoop == 1 ) { RwPci ((((0x14<<3)+2) << 16) + 0x42, AccessWidth8, 0xFF, BIT1 + BIT0, StdHeader); } } else { // //disable Azalia controller // RwPci ((((0x14<<3)+2) << 16) + 0x04, AccessWidth16, 0, 0, StdHeader); RwMem (ACPI_MMIO_BASE + PMIO_BASE + 0xEB , AccessWidth8, (UINT32)~BIT0, 0); RwMem (ACPI_MMIO_BASE + PMIO_BASE + 0xEB , AccessWidth8, (UINT32)~BIT0, 0); } } /** * Pin Config for ALC880, ALC882 and ALC883. * * * */ CODEC_ENTRY AzaliaCodecAlc882Table[] = { {0x14, 0x01014010}, {0x15, 0x01011012}, {0x16, 0x01016011}, {0x17, 0x01012014}, {0x18, 0x01A19030}, {0x19, 0x411111F0}, {0x1a, 0x01813080}, {0x1b, 0x411111F0}, {0x1C, 0x411111F0}, {0x1d, 0x411111F0}, {0x1e, 0x01441150}, {0x1f, 0x01C46160}, {0xff, 0xffffffff} }; /** * Pin Config for ALC0262. * * * */ CODEC_ENTRY AzaliaCodecAlc262Table[] = { {0x14, 0x01014010}, {0x15, 0x411111F0}, {0x16, 0x411111F0}, {0x18, 0x01A19830}, {0x19, 0x02A19C40}, {0x1a, 0x01813031}, {0x1b, 0x02014C20}, {0x1c, 0x411111F0}, {0x1d, 0x411111F0}, {0x1e, 0x0144111E}, {0x1f, 0x01C46150}, {0xff, 0xffffffff} }; /** * Pin Config for ALC0269. * * * */ CODEC_ENTRY AzaliaCodecAlc269Table[] = { {0x12, 0x99A308F0}, {0x14, 0x99130010}, {0x15, 0x0121101F}, {0x16, 0x99036120}, {0x18, 0x01A19850}, {0x19, 0x99A309F0}, {0x1a, 0x01813051}, {0x1b, 0x0181405F}, {0x1d, 0x40134601}, {0x1e, 0x01442130}, {0x11, 0x99430140}, {0x20, 0x0030FFFF}, {0xff, 0xffffffff} }; /** * Pin Config for ALC0861. * * * */ CODEC_ENTRY AzaliaCodecAlc861Table[] = { {0x01, 0x8086C601}, {0x0B, 0x01014110}, {0x0C, 0x01813140}, {0x0D, 0x01A19941}, {0x0E, 0x411111F0}, {0x0F, 0x02214420}, {0x10, 0x02A1994E}, {0x11, 0x99330142}, {0x12, 0x01451130}, {0x1F, 0x411111F0}, {0x20, 0x411111F0}, {0x23, 0x411111F0}, {0xff, 0xffffffff} }; /** * Pin Config for ALC0889. * * * */ CODEC_ENTRY AzaliaCodecAlc889Table[] = { {0x11, 0x411111F0}, {0x14, 0x01014010}, {0x15, 0x01011012}, {0x16, 0x01016011}, {0x17, 0x01013014}, {0x18, 0x01A19030}, {0x19, 0x411111F0}, {0x1a, 0x411111F0}, {0x1b, 0x411111F0}, {0x1C, 0x411111F0}, {0x1d, 0x411111F0}, {0x1e, 0x01442150}, {0x1f, 0x01C42160}, {0xff, 0xffffffff} }; /** * Pin Config for ADI1984. * * * */ CODEC_ENTRY AzaliaCodecAd1984Table[] = { {0x11, 0x0221401F}, {0x12, 0x90170110}, {0x13, 0x511301F0}, {0x14, 0x02A15020}, {0x15, 0x50A301F0}, {0x16, 0x593301F0}, {0x17, 0x55A601F0}, {0x18, 0x55A601F0}, {0x1A, 0x91F311F0}, {0x1B, 0x014511A0}, {0x1C, 0x599301F0}, {0xff, 0xffffffff} }; /** * FrontPanel Config table list * * * */ CODEC_ENTRY FrontPanelAzaliaCodecTableList[] = { {0x19, 0x02A19040}, {0x1b, 0x02214020}, {0xff, 0xffffffff} }; /** * Current HD Audio support codec list * * * */ CODEC_TBL_LIST AzaliaCodecTableList[] = { {0x010ec0880, &AzaliaCodecAlc882Table[0]}, {0x010ec0882, &AzaliaCodecAlc882Table[0]}, {0x010ec0883, &AzaliaCodecAlc882Table[0]}, {0x010ec0885, &AzaliaCodecAlc882Table[0]}, {0x010ec0889, &AzaliaCodecAlc889Table[0]}, {0x010ec0262, &AzaliaCodecAlc262Table[0]}, {0x010ec0269, &AzaliaCodecAlc269Table[0]}, {0x010ec0861, &AzaliaCodecAlc861Table[0]}, {0x011d41984, &AzaliaCodecAd1984Table[0]}, { (UINT32) 0x0FFFFFFFF, (CODEC_ENTRY*) (UINTN)0x0FFFFFFFF} }; /** * ConfigureAzaliaPinCmd - Configuration HD Audio PIN Command * * * @param[in] FchDataPtr Fch configuration structure pointer. * @param[in] BAR0 HD Audio BAR0 base address. * @param[in] ChannelNum Channel Number. * */ VOID ConfigureAzaliaPinCmd ( IN FCH_DATA_BLOCK *FchDataPtr, IN UINT32 BAR0, IN UINT8 ChannelNum ) { UINT32 AzaliaTempVariable; UINT32 ChannelNumDword; CODEC_TBL_LIST *TempAzaliaOemCodecTablePtr; CODEC_ENTRY *TempAzaliaCodecEntryPtr; if ( (FchDataPtr->Azalia.AzaliaPinCfg) != 1 ) { return; } ChannelNumDword = ChannelNum << 28; AzaliaTempVariable = 0xF0000; AzaliaTempVariable |= ChannelNumDword; WriteMem (BAR0 + 0x60, AccessWidth32, &AzaliaTempVariable); FchStall (600, FchDataPtr->StdHeader); ReadMem (BAR0 + 0x64, AccessWidth32, &AzaliaTempVariable); if ( ((FchDataPtr->Azalia.AzaliaOemCodecTablePtr) == NULL) || ((FchDataPtr->Azalia.AzaliaOemCodecTablePtr) == ((CODEC_TBL_LIST*) (UINTN)0xFFFFFFFF))) { TempAzaliaOemCodecTablePtr = (CODEC_TBL_LIST*) (&AzaliaCodecTableList[0]); } else { TempAzaliaOemCodecTablePtr = (CODEC_TBL_LIST*) FchDataPtr->Azalia.AzaliaOemCodecTablePtr; } while ( TempAzaliaOemCodecTablePtr->CodecId != 0xFFFFFFFF ) { if ( TempAzaliaOemCodecTablePtr->CodecId == AzaliaTempVariable ) { break; } else { ++TempAzaliaOemCodecTablePtr; } } if ( TempAzaliaOemCodecTablePtr->CodecId != 0xFFFFFFFF ) { TempAzaliaCodecEntryPtr = (CODEC_ENTRY*) TempAzaliaOemCodecTablePtr->CodecTablePtr; if ( ((FchDataPtr->Azalia.AzaliaOemCodecTablePtr) == NULL) || ((FchDataPtr->Azalia.AzaliaOemCodecTablePtr) == ((CODEC_TBL_LIST*) (UINTN)0xFFFFFFFF)) ) { TempAzaliaCodecEntryPtr = (CODEC_ENTRY*) (TempAzaliaCodecEntryPtr); } ConfigureAzaliaSetConfigD4Dword (TempAzaliaCodecEntryPtr, ChannelNumDword, BAR0, FchDataPtr->StdHeader); if ( FchDataPtr->Azalia.AzaliaFrontPanel != 1 ) { if ( (FchDataPtr->Azalia.AzaliaFrontPanel == 2) || (FchDataPtr->Azalia.FrontPanelDetected == 1) ) { if ( ((FchDataPtr->Azalia.AzaliaOemFpCodecTablePtr) == NULL) || ((FchDataPtr->Azalia.AzaliaOemFpCodecTablePtr) == (VOID*) (UINTN)0xFFFFFFFF) ) { TempAzaliaCodecEntryPtr = (CODEC_ENTRY*) (&FrontPanelAzaliaCodecTableList[0]); } else { TempAzaliaCodecEntryPtr = (CODEC_ENTRY*) FchDataPtr->Azalia.AzaliaOemFpCodecTablePtr; } ConfigureAzaliaSetConfigD4Dword (TempAzaliaCodecEntryPtr, ChannelNumDword, BAR0, FchDataPtr->StdHeader); } } } } /** * ConfigureAzaliaSetConfigD4Dword - Configuration HD Audio Codec table * * * @param[in] TempAzaliaCodecEntryPtr HD Audio Codec table structure pointer. * @param[in] ChannelNumDword HD Audio Channel Number. * @param[in] BAR0 HD Audio BAR0 base address. * @param[in] StdHeader * */ VOID ConfigureAzaliaSetConfigD4Dword ( IN CODEC_ENTRY *TempAzaliaCodecEntryPtr, IN UINT32 ChannelNumDword, IN UINT32 BAR0, IN AMD_CONFIG_PARAMS *StdHeader ) { UINT8 TempByte1; UINT8 TempByte2; UINT8 Index; UINT32 TempDword1; UINT32 TempDword2; TempDword1 = 0; TempDword2 = 0; while ( (TempAzaliaCodecEntryPtr->Nid) != 0xFF ) { TempByte1 = 0x20; if ( (TempAzaliaCodecEntryPtr->Nid) == 0x1 ) { TempByte1 = 0x24; } TempDword1 = TempAzaliaCodecEntryPtr->Nid; TempDword1 &= 0xff; TempDword1 <<= 20; TempDword1 |= ChannelNumDword; TempDword1 |= (0x700 << 8); for ( Index = 4; Index > 0; Index-- ) { do { ReadMem (BAR0 + 0x68, AccessWidth32, &TempDword2); } while ( (TempDword2 & BIT0) != 0 ); TempByte2 = (UINT8) (( (TempAzaliaCodecEntryPtr->Byte40) >> ((4 - Index) * 8 ) ) & 0xff); TempDword1 = (TempDword1 & 0xFFFF0000) + ((TempByte1 - Index) << 8) + TempByte2; WriteMem (BAR0 + 0x60, AccessWidth32, &TempDword1); FchStall (60, StdHeader); } ++TempAzaliaCodecEntryPtr; } } ",0 " | | ========== | | | | Copyright (c) 2003-2009 OpenX Limited | | For contact details, see: http://www.openx.org/ | | | | This program is free software; you can redistribute it and/or modify | | it under the terms of the GNU General Public License as published by | | the Free Software Foundation; either version 2 of the License, or | | (at your option) any later version. | | | | This program is distributed in the hope that it will be useful, | | but WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | GNU General Public License for more details. | | | | You should have received a copy of the GNU General Public License | | along with this program; if not, write to the Free Software | | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | +---------------------------------------------------------------------------+ $Id: BasePublisherService.php 79311 2011-11-03 21:18:14Z chris.nutting $ */ /** * @package OpenX * @author Andriy Petlyovanyy * */ // Require Publisher Service Implementation require_once MAX_PATH . '/www/api/v2/xmlrpc/PublisherServiceImpl.php'; /** * Base Publisher Service * */ class BasePublisherService { /** * Reference to Publisher Service implementation. * * @var PublisherServiceImpl $_oPublisherServiceImp */ var $_oPublisherServiceImp; /** * This method initialises Service implementation object field. * */ function BasePublisherService() { $this->_oPublisherServiceImp = new PublisherServiceImpl(); } } ?>",0 "YZ[\\]^_`abcdefgh"", ""\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghi"", ""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghij"", ""$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijk"", ""%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijkl"", ""&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklm"", ""'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmn"", ""()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmno"", "")*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnop"", ""*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopq"", ""+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqr"", "",-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrs"", ""-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrst"", ""./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstu"", ""/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuv"", ""0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvw"", ""123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwx"", ""23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxy"", ""3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz"", ""456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{"", ""56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|"", ""6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}"", ""789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"", ""89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"", ""9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"""", "":;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#"", "";<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$"", ""<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%"", ""=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&"", "">?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'"", ""?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'("", ""@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()"", ""ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*"", ""BCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+"", ""CDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,"", ""DEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-"", ""EFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-."", ""FGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./"", ""GHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0"", ""HIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./01"", ""IJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./012"", ""JKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123"", ""KLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./01234"", ""LMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./012345"", ""MNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456"", ""NOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./01234567"", ""OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./012345678"", ""PQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789"", ""QRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:"", ""RSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;"", ""STUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<"", ""TUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<="", ""UVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>"", ""VWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?"", ""WXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@"", ""XYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@A"", ""YZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@AB"", ""Z[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABC"", ""[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCD"", ""\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDE"", ""]^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEF"", ""^_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFG"", ""_`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH"", ""`abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI"", ""abcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ"", ""bcdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK"", ""cdefghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL"", ""defghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM"", ""efghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"", ""fghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO"", ""ghijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP"", ""hijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ"", ""ijklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR"", ""jklmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS"", ""klmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST"", ""lmnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU"", ""mnopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV"", ""nopqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"", ""opqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX"", ""pqrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY"", ""qrstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"", ""rstuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ["", ""stuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\"", ""tuvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]"", ""uvwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^"", ""vwxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"", ""wxyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`"", ""xyz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`a"", ""yz{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`ab"", ""z{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abc"", ""{|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcd"", ""|}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcde"", ""}~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdef"", ""~!\""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefg"" }; ",0 "javadoc (build 1.6.0_26) on Sat May 18 22:50:45 CEST 2013 --> Uses of Class net.iubris.polaris.locator.utils.LocationUtils
        Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
         PREV   NEXT FRAMES    NO FRAMES    

        Uses of Class
        net.iubris.polaris.locator.utils.LocationUtils

        No usage of net.iubris.polaris.locator.utils.LocationUtils


        Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
         PREV   NEXT FRAMES    NO FRAMES    

        ",0 "pt 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. */ package ru.elifantiev.yandex.oauth; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Intent; import android.net.Uri; import ru.elifantiev.yandex.oauth.tokenstorage.AccessTokenStorage; abstract public class OAuthActivity extends Activity { /** * Intent's Extra holding auth result */ public static final String EXTRA_AUTH_RESULT = ""ru.elifantiev.yandex.oauth.AUTH_RESULT_EXTRA""; /** * Intent's Extra holding error message (in case of error) */ public static final String EXTRA_AUTH_RESULT_ERROR = ""ru.elifantiev.yandex.oauth.AUTH_RESULT_ERROR_EXTRA""; /** * An action, which will be used to start activity, which must handle an authentication result. * Must not be the same, as OAuthActivity. * Intent's data field contains Uri 'oauth://{appId}' where appId is application Id returned with getAppId method. */ public static final String ACTION_AUTH_RESULT = ""ru.elifantiev.yandex.oauth.AUTH_RESULT""; public static final int AUTH_RESULT_OK = 0; public static final int AUTH_RESULT_ERROR = 1; @Override protected void onResume() { authorize(); super.onResume(); //To change body of overridden methods use File | Settings | File Templates. } protected void authorize() { Uri data = getIntent().getData(); if (data != null) { AuthSequence .newInstance(getServer(), getAppId()) .continueSequence(data, getContinuationHandler()); } else AuthSequence .newInstance(getServer(), getAppId()) .start(getClientId(), getRequiredPermissions(), this); } /** * This method must return PermissionsScope object declaring permission, required to current application * @return PermissionsScope instance */ abstract protected PermissionsScope getRequiredPermissions(); /** * Client ID by OAuth specification * @return OAuth client ID */ abstract protected String getClientId(); /** * This method must return an unique string ID of an application * It is usually an application's package name * This will be used to separate different application OAuth calls and token storage * @return Unique ID of calling application */ abstract protected String getAppId(); /** * Method to declare a server, which will handle OAuth calls * @return URL of target server */ abstract protected Uri getServer(); /** * Implementation of AccessTokenStorage to use for store application's access token * Now implemented: * - SharedPreferencesStorage - uses shared preferences to store token * - EncryptedSharedPreferencesStorage - uses shared preferences but token is encrypted with 3DES and user-supplied key * @return Token storage to use */ abstract protected AccessTokenStorage getTokenStorage(); protected AsyncContinuationHandler getContinuationHandler() { return new AsyncContinuationHandler(getClientId(), getDefaultStatusHandler()); } protected AuthStatusHandler getDefaultStatusHandler() { return new AuthStatusHandler() { public void onResult(AuthResult result) { Intent callHome = new Intent(ACTION_AUTH_RESULT); callHome.setData(Uri.parse(AuthSequence.OAUTH_SCHEME + ""://"" + getAppId())); if(result.isSuccess()) { getTokenStorage().storeToken(result.getToken(), getAppId()); callHome.putExtra(EXTRA_AUTH_RESULT, AUTH_RESULT_OK); } else { callHome .putExtra(EXTRA_AUTH_RESULT, AUTH_RESULT_ERROR) .putExtra(EXTRA_AUTH_RESULT_ERROR, result.getError()); } try { startActivity(callHome); } catch (ActivityNotFoundException e) { // ignore } finish(); } }; } } ",0 "rg/1999/xhtml""> GNU Radio 3.6.4.2 C++ API: gr_file_descriptor_source Class Reference
        GNU Radio 3.6.4.2 C++ API
        gr_file_descriptor_source Class Reference

        Read stream from file descriptor. More...

        #include <gr_file_descriptor_source.h>

        Inheritance diagram for gr_file_descriptor_source:

        List of all members.

        Public Member Functions

         ~gr_file_descriptor_source ()
        int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
         just like gr_block::general_work, only this arranges to call consume_each for you

        Protected Member Functions

         gr_file_descriptor_source (size_t itemsize, int fd, bool repeat)
        int read_items (char *buf, int nitems)
        int handle_residue (char *buf, int nbytes_read)
        void flush_residue ()

        Friends

        GR_CORE_API
        gr_file_descriptor_source_sptr 
        gr_make_file_descriptor_source (size_t itemsize, int fd, bool repeat)

        Detailed Description

        Read stream from file descriptor.


        Constructor & Destructor Documentation

        gr_file_descriptor_source::gr_file_descriptor_source ( size_t  itemsize,
        int  fd,
        bool  repeat 
        ) [protected]

        Member Function Documentation

        int gr_file_descriptor_source::handle_residue ( char *  buf,
        int  nbytes_read 
        ) [protected]
        int gr_file_descriptor_source::read_items ( char *  buf,
        int  nitems 
        ) [protected]
        int gr_file_descriptor_source::work ( int  noutput_items,
        gr_vector_const_void_star &  input_items,
        gr_vector_void_star &  output_items 
        ) [virtual]

        just like gr_block::general_work, only this arranges to call consume_each for you

        The user must override work to define the signal processing code

        Reimplemented from gr_sync_block.


        Friends And Related Function Documentation

        GR_CORE_API gr_file_descriptor_source_sptr gr_make_file_descriptor_source ( size_t  itemsize,
        int  fd,
        bool  repeat 
        ) [friend]

        The documentation for this class was generated from the following file:
        ",0 ") exit; // Exit if accessed directly global $woocommerce; if ( ! WC()->cart->coupons_enabled() ) return; $info_message = apply_filters( 'woocommerce_checkout_coupon_message', __( 'Have a coupon?', 'woocommerce' ) ); $info_message .= ' ' . __( 'Click here to enter your code', 'woocommerce' ) . ''; ?>

        "" id=""coupon_code"" value="""" />

        "" />

        ",0 " class Backend { public function __construct() { // Backend controllers. $this->apearanceController = Modules\Appearance\Controller::getInstance(); $this->calendarController = Modules\Calendar\Controller::getInstance(); $this->customerController = Modules\Customers\Controller::getInstance(); $this->notificationsController = Modules\Notifications\Controller::getInstance(); $this->paymentController = Modules\Payments\Controller::getInstance(); $this->serviceController = Modules\Services\Controller::getInstance(); $this->smsController = Modules\Sms\Controller::getInstance(); $this->settingsController = Modules\Settings\Controller::getInstance(); $this->staffController = Modules\Staff\Controller::getInstance(); $this->couponsController = Modules\Coupons\Controller::getInstance(); $this->customFieldsController = Modules\CustomFields\Controller::getInstance(); $this->appointmentsController = Modules\Appointments\Controller::getInstance(); $this->debugController = Modules\Debug\Controller::getInstance(); // Frontend controllers that work via admin-ajax.php. $this->bookingController = Frontend\Modules\Booking\Controller::getInstance(); $this->customerProfileController = Frontend\Modules\CustomerProfile\Controller::getInstance(); if ( ! Lib\Config::isPaymentDisabled( Lib\Entities\Payment::TYPE_AUTHORIZENET ) ) { $this->authorizeNetController = Frontend\Modules\AuthorizeNet\Controller::getInstance(); } if ( ! Lib\Config::isPaymentDisabled( Lib\Entities\Payment::TYPE_PAYULATAM ) ) { $this->payulatamController = Frontend\Modules\PayuLatam\Controller::getInstance(); } if ( ! Lib\Config::isPaymentDisabled( Lib\Entities\Payment::TYPE_STRIPE ) ) { $this->stripeController = Frontend\Modules\Stripe\Controller::getInstance(); } $this->wooCommerceController = Frontend\Modules\WooCommerce\Controller::getInstance(); add_action( 'admin_menu', array( $this, 'addAdminMenu' ) ); add_action( 'wp_loaded', array( $this, 'init' ) ); add_action( 'admin_init', array( $this, 'addTinyMCEPlugin' ) ); } public function init() { if ( ! session_id() ) { @session_start(); } } public function addTinyMCEPlugin() { new Modules\TinyMce\Plugin(); } public function addAdminMenu() { /** @var \WP_User $current_user */ global $current_user; // Translated submenu pages. $calendar = __( 'Calendar', 'bookly' ); $appointments = __( 'Appointments', 'bookly' ); $staff_members = __( 'Staff Members', 'bookly' ); $services = __( 'Services', 'bookly' ); $sms = __( 'SMS Notifications', 'bookly' ); $notifications = __( 'Email Notifications', 'bookly' ); $customers = __( 'Customers', 'bookly' ); $payments = __( 'Payments', 'bookly' ); $appearance = __( 'Appearance', 'bookly' ); $settings = __( 'Settings', 'bookly' ); $coupons = __( 'Coupons', 'bookly' ); $custom_fields = __( 'Custom Fields', 'bookly' ); if ( $current_user->has_cap( 'administrator' ) || Lib\Entities\Staff::query()->where( 'wp_user_id', $current_user->ID )->count() ) { if ( function_exists( 'add_options_page' ) ) { $dynamic_position = '80.0000001' . mt_rand( 1, 1000 ); // position always is under `Settings` add_menu_page( 'Bookly', 'Bookly', 'read', 'ab-system', '', plugins_url( 'resources/images/menu.png', __FILE__ ), $dynamic_position ); add_submenu_page( 'ab-system', $calendar, $calendar, 'read', 'ab-calendar', array( $this->calendarController, 'index' ) ); add_submenu_page( 'ab-system', $appointments, $appointments, 'manage_options', 'ab-appointments', array( $this->appointmentsController, 'index' ) ); do_action( 'bookly_render_menu_after_appointments' ); if ( $current_user->has_cap( 'administrator' ) ) { add_submenu_page( 'ab-system', $staff_members, $staff_members, 'manage_options', Modules\Staff\Controller::page_slug, array( $this->staffController, 'index' ) ); } else { if ( get_option( 'ab_settings_allow_staff_members_edit_profile' ) == 1 ) { add_submenu_page( 'ab-system', __( 'Profile', 'bookly' ), __( 'Profile', 'bookly' ), 'read', Modules\Staff\Controller::page_slug, array( $this->staffController, 'index' ) ); } } add_submenu_page( 'ab-system', $services, $services, 'manage_options', Modules\Services\Controller::page_slug, array( $this->serviceController, 'index' ) ); add_submenu_page( 'ab-system', $customers, $customers, 'manage_options', Modules\Customers\Controller::page_slug, array( $this->customerController, 'index' ) ); add_submenu_page( 'ab-system', $notifications, $notifications, 'manage_options', 'ab-notifications', array( $this->notificationsController, 'index' ) ); add_submenu_page( 'ab-system', $sms, $sms, 'manage_options', Modules\Sms\Controller::page_slug, array( $this->smsController, 'index' ) ); add_submenu_page( 'ab-system', $payments, $payments, 'manage_options', 'ab-payments', array( $this->paymentController, 'index' ) ); add_submenu_page( 'ab-system', $appearance, $appearance, 'manage_options', 'ab-appearance', array( $this->apearanceController, 'index' ) ); add_submenu_page( 'ab-system', $custom_fields, $custom_fields, 'manage_options', 'ab-custom-fields', array( $this->customFieldsController, 'index' ) ); add_submenu_page( 'ab-system', $coupons, $coupons, 'manage_options', 'ab-coupons', array( $this->couponsController, 'index' ) ); add_submenu_page( 'ab-system', $settings, $settings, 'manage_options', Modules\Settings\Controller::page_slug, array( $this->settingsController, 'index' ) ); if ( isset ( $_GET['page'] ) && $_GET['page'] == 'ab-debug' ) { add_submenu_page( 'ab-system', 'Debug', 'Debug', 'manage_options', 'ab-debug', array( $this->debugController, 'index' ) ); } global $submenu; do_action( 'bookly_admin_menu', 'ab-system' ); unset ( $submenu['ab-system'][0] ); } } } }",0 " open the template in the editor. */ package com.power.text.Run; import static com.power.text.dialogs.WebSearch.squerry; import java.awt.Desktop; import java.awt.Toolkit; import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.StringSelection; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import javax.swing.JOptionPane; import static com.power.text.Main.searchbox; /** * * @author thecarisma */ public class WikiSearch { public static void wikisearch(){ String searchqueryw = searchbox.getText(); searchqueryw = searchqueryw.replace(' ', '-'); String squeryw = squerry.getText(); squeryw = squeryw.replace(' ', '-'); if ("""".equals(searchqueryw)){ searchqueryw = squeryw ; } else {} String url = ""https://www.wikipedia.org/wiki/"" + searchqueryw ; try { URI uri = new URL(url).toURI(); Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) desktop.browse(uri); } catch (URISyntaxException | IOException e) { /* * I know this is bad practice * but we don't want to do anything clever for a specific error */ JOptionPane.showMessageDialog(null, e.getMessage()); // Copy URL to the clipboard so the user can paste it into their browser StringSelection stringSelection = new StringSelection(url); Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard(); clpbrd.setContents(stringSelection, null); // Notify the user of the failure System.out.println(""This program just tried to open a webpage."" + ""\n"" + ""The URL has been copied to your clipboard, simply paste into your browser to accessWebpage: "" + url); } } } ",0 ". * It is also available through the world-wide-web at this URL: * http://firal.org/licenses/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to firal-dev@googlegroups.com so we can send you a copy immediately. * * @category Firal * @package Firal_Di * @copyright Copyright (c) 2009-2010 Firal (http://firal.org/) * @license http://firal.org/licenses/new-bsd New BSD License */ /** * An event * * @category Firal * @package Firal_Di * @copyright Copyright (c) 2009-2010 Firal (http://firal.org/) * @license http://firal.org/licenses/new-bsd New BSD License */ class Default_DiContainer extends Firal_Di_Container_ContainerAbstract { /** * Get the user service * * @return Default_Service_User */ public function getUserService() { if (!isset($this->_storage['userService'])) { $this->_storage['userService'] = new Default_Service_User($this->getUserMapper()); } return $this->_storage['userService']; } /** * Get the user mapper * * @return Default_Model_Mapper_UserInterface */ public function getUserMapper() { if (!isset($this->_storage['userMapper'])) { $this->_storage['userMapper'] = new Default_Model_Mapper_UserCache( new Default_Model_Mapper_User(), $this->_config['mapper']['cache'] ); } return $this->_storage['userMapper']; } /** * Get the config service * * @return Default_Service_Config */ public function getConfigService() { if (!isset($this->_storage['configService'])) { $this->_storage['configService'] = new Default_Service_Config($this->getConfigMapper()); } return $this->_storage['configService']; } /** * Get the config mapper * * @return Default_Model_Mapper_ConfigInterface */ public function getConfigMapper() { if (!isset($this->_storage['configMapper'])) { $this->_storage['configMapper'] = new Default_Model_Mapper_ConfigCache( new Default_Model_Mapper_Config(), $this->_config['mapper']['cache'] ); } return $this->_storage['configMapper']; } } ",0 "estContextCountry implements ContextPartBuilder { private $defaultCountryCode = 'DE'; /** * @param mixed[] $inputDataSet * @return string */ public function getValue(array $inputDataSet) : string { if (isset($inputDataSet[Country::CONTEXT_CODE])) { return (string) $inputDataSet[Country::CONTEXT_CODE]; } return $this->defaultCountryCode; } public function getCode() : string { return Country::CONTEXT_CODE; } } ",0 "oka */ #include #include #include ""prowiz.h"" static int depack_fuchs(HIO_HANDLE *in, FILE *out) { uint8 *tmp; uint8 max_pat; /*int ssize;*/ uint8 data[1080]; unsigned smp_len[16]; unsigned loop_start[16]; unsigned pat_size; unsigned i; memset(smp_len, 0, 16 * 4); memset(loop_start, 0, 16 * 4); memset(data, 0, 1080); hio_read(data, 1, 10, in); /* read/write title */ /*ssize =*/ hio_read32b(in); /* read all sample data size */ /* read/write sample sizes */ for (i = 0; i < 16; i++) { smp_len[i] = hio_read16b(in); data[42 + i * 30] = smp_len[i] >> 9; data[43 + i * 30] = smp_len[i] >> 1; } /* read/write volumes */ for (i = 0; i < 16; i++) { data[45 + i * 30] = hio_read16b(in); } /* read/write loop start */ for (i = 0; i < 16; i++) { loop_start[i] = hio_read16b(in); data[46 + i * 30] = loop_start[i] >> 1; } /* write replen */ for (i = 0; i < 16; i++) { int loop_size; loop_size = smp_len[i] - loop_start[i]; if (loop_size == 0 || loop_start[i] == 0) { data[49 + i * 30] = 1; } else { data[48 + i * 30] = loop_size >> 9; data[49 + i * 30] = loop_size >> 1; } } /* fill replens up to 31st sample wiz $0001 */ for (i = 16; i < 31; i++) { data[49 + i * 30] = 1; } /* that's it for the samples ! */ /* now, the pattern list */ /* read number of pattern to play */ data[950] = hio_read16b(in); data[951] = 0x7f; /* read/write pattern list */ for (max_pat = i = 0; i < 40; i++) { uint8 pat = hio_read16b(in); data[952 + i] = pat; if (pat > max_pat) { max_pat = pat; } } /* write ptk's ID */ if (fwrite(data, 1, 1080, out) != 1080) { return -1; } write32b(out, PW_MOD_MAGIC); /* now, the pattern data */ /* bypass the ""SONG"" ID */ hio_read32b(in); /* read pattern data size */ pat_size = hio_read32b(in); /* Sanity check */ if (pat_size <= 0 || pat_size > 0x20000) return -1; /* read pattern data */ tmp = (uint8 *)malloc(pat_size); if (hio_read(tmp, 1, pat_size, in) != pat_size) { free(tmp); return -1; } /* convert shits */ for (i = 0; i < pat_size; i += 4) { /* convert fx C arg back to hex value */ if ((tmp[i + 2] & 0x0f) == 0x0c) { int x = tmp[i + 3]; tmp[i + 3] = 10 * (x >> 4) + (x & 0xf); } } /* write pattern data */ fwrite(tmp, pat_size, 1, out); free(tmp); /* read/write sample data */ hio_read32b(in); /* bypass ""INST"" Id */ for (i = 0; i < 16; i++) { if (smp_len[i] != 0) pw_move_data(out, in, smp_len[i]); } return 0; } static int test_fuchs (uint8 *data, char *t, int s) { int i; int ssize, hdr_ssize; #if 0 /* test #1 */ if (i < 192) { Test = BAD; return; } start = i - 192; #endif if (readmem32b(data + 192) != 0x534f4e47) /* SONG */ return -1; /* all sample size */ hdr_ssize = readmem32b(data + 10); if (hdr_ssize <= 2 || hdr_ssize >= 65535 * 16) return -1; /* samples descriptions */ ssize = 0; for (i = 0; i < 16; i++) { uint8 *d = data + i * 2; int len = readmem16b(d + 14); int start = readmem16b(d + 78); /* volumes */ if (d[46] > 0x40) return -1; if (len < start) return -1; ssize += len; } if (ssize <= 2 || ssize > hdr_ssize) return -1; /* get highest pattern number in pattern list */ /*max_pat = 0;*/ for (i = 0; i < 40; i++) { int pat = data[i * 2 + 113]; if (pat > 40) return -1; /*if (pat > max_pat) max_pat = pat;*/ } #if 0 /* input file not long enough ? */ max_pat++; max_pat *= 1024; PW_REQUEST_DATA (s, k + 200); #endif pw_read_title(NULL, t, 0); return 0; } const struct pw_format pw_fchs = { ""Fuchs Tracker"", test_fuchs, depack_fuchs }; ",0 " is a very simple form sending a username and password.
        * It demonstrates how you can integrate the image script into your code.
        * By creating a new instance of the class and passing the user entered code as the only parameter, you can then immediately call $obj->checkCode() which will return true if the code is correct, or false otherwise.
        * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or any later version.

        * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details.

        * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

        * * Any modifications to the library should be indicated clearly in the source code * to inform users that the changes are not a part of the original software.

        * * If you found this script useful, please take a quick moment to rate it.
        * http://www.hotscripts.com/rate/49400.html Thanks. * * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA * @link http://www.phpcaptcha.org/latest.zip Download Latest Version * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation * @copyright 2007 Drew Phillips * @author drew010 * @version 1.0.3.1 (March 23, 2008) * @package Securimage * */ ?> Securimage Test Form
        Username:

        Password:

        "">

        check($_POST['code']); if($valid == true) { echo ""
        Thanks, you entered the correct code.
        ""; } else { echo ""
        Sorry, the code you entered was invalid. Go back to try again.
        ""; } } ?> ",0 "GNU/GPL v.3 or later. */ // защита от прямого доступа defined('_JEXEC') or die('@-_-@'); jimport('joomla.form.formfield'); class JFormFieldCallbackUrl extends JFormField { /** * The form field type. * * @var string * @since 1.6 */ public $type = 'CallbackUrl'; /** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $task = !empty($this->element['value']) ? '?option=com_slogin&task=check&plugin=' . (string) $this->element['value'] : ''; $readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly=""readonly""' : ''; $class = $this->element['class'] ? ' class=""' . (string) $this->element['class'] . '""' : ''; $CallbackUrl = JURI::root().$task; if(substr($CallbackUrl, -1, 1) == '/'){ $CallbackUrl = substr($CallbackUrl, 0, -1); } $html = 'name . '"" id=""' . $this->id . '""' . ' value=""'.$CallbackUrl.'"" size=""70%"" '. $class . $readonly .' />'; return $html; } }",0 "blic License * Please see the LICENSE included with this distribution for details. * * WARNING: This is generated code. Modify at your own risk and without support. */ #import #import ""Bridge.h"" #import ""TiToJS.h"" #import ""TiEvaluator.h"" #import ""TiProxy.h"" #import ""KrollContext.h"" #import ""KrollObject.h"" #import ""TiModule.h"" #include #ifdef KROLL_COVERAGE # import ""KrollCoverage.h"" @interface TiTodoSampleObject : KrollCoverageObject { #else @interface TiTodoSampleObject : KrollObject { #endif @private NSMutableDictionary *modules; TiHost *host; id pageContext; NSMutableDictionary *dynprops; } -(id)initWithContext:(KrollContext*)context_ host:(TiHost*)host_ context:(id)context baseURL:(NSURL*)baseURL_; -(id)addModule:(NSString*)name module:(TiModule*)module; -(TiModule*)moduleNamed:(NSString*)name context:(id)context; @end extern NSString * TiTodoSample$ModuleRequireFormat; @interface KrollBridge : Bridge { @private NSURL * currentURL; KrollContext *context; NSDictionary *preload; NSMutableDictionary *modules; TiTodoSampleObject *_titodosample; KrollObject* console; BOOL shutdown; BOOL evaluationError; //NOTE: Do NOT treat registeredProxies like a mutableDictionary; mutable dictionaries copy keys, //CFMutableDictionaryRefs only retain keys, which lets them work with proxies properly. CFMutableDictionaryRef registeredProxies; NSCondition *shutdownCondition; OSSpinLock proxyLock; } - (void)boot:(id)callback url:(NSURL*)url_ preload:(NSDictionary*)preload_; - (void)evalJSWithoutResult:(NSString*)code; - (id)evalJSAndWait:(NSString*)code; - (BOOL)evaluationError; - (void)fireEvent:(id)listener withObject:(id)obj remove:(BOOL)yn thisObject:(TiProxy*)thisObject; - (id)preloadForKey:(id)key name:(id)name; - (KrollContext*)krollContext; + (NSArray *)krollBridgesUsingProxy:(id)proxy; + (BOOL)krollBridgeExists:(KrollBridge *)bridge; + (KrollBridge *)krollBridgeForThreadName:(NSString *)threadName; + (NSArray *)krollContexts; -(void)enqueueEvent:(NSString*)type forProxy:(TiProxy *)proxy withObject:(id)obj; -(void)registerProxy:(id)proxy krollObject:(KrollObject *)ourKrollObject; -(int)forceGarbageCollectNow; @end ",0 " Boost.Geometry (aka GGL, Generic Geometry Library)
          
        home Directory Reference

        Directories

        directory  travis
         

        April 2, 2011

        Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
        Copyright © 2008-2011 Bruno Lalande, Paris, France
        Copyright © 2009-2010 Mateusz Loskot, London, UK
        Documentation is generated by Doxygen
        ",0 "marty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array ( 'has_nocache_code' => false, 'version' => '3.1.28', 'unifunc' => 'content_572397c4638617_08448648', 'file_dependency' => array ( '323cb364cb7db1b3e0e77127bc5abfbab64cb3f3' => array ( 0 => 'C:\\xampp\\htdocs\\monitoring\\application\\views\\admin\\parent\\list.tpl', 1 => 1461950156, 2 => 'file', ), ), 'includes' => array ( 'file:admin/master_layout.tpl' => 1, 'file:admin/nav_bar.tpl' => 1, 'file:admin/parent/breadcum.tpl' => 1, 'file:admin/parent/sidebar.tpl' => 1, 'file:admin/top_notif.tpl' => 1, ), ),false)) { function content_572397c4638617_08448648 ($_smarty_tpl) { if (!is_callable('smarty_function_base_url')) require_once 'C:\\xampp\\htdocs\\monitoring\\application\\third_party\\smarty\\libs\\plugins\\function.base_url.php'; $_smarty_tpl->ext->_inheritance->init($_smarty_tpl, true); ?> ext->_inheritance->processBlock($_smarty_tpl, 0, 'navbar', array ( 0 => 'block_1862572397c45d6b79_68289653', 1 => false, 3 => 0, 2 => 0, )); ?> ext->_inheritance->processBlock($_smarty_tpl, 0, 'breadcrumb', array ( 0 => 'block_7431572397c45de882_92110023', 1 => false, 3 => 0, 2 => 0, )); ?> ext->_inheritance->processBlock($_smarty_tpl, 0, 'sidebar', array ( 0 => 'block_11828572397c45e6585_97163777', 1 => false, 3 => 0, 2 => 0, )); ?> ext->_inheritance->processBlock($_smarty_tpl, 0, 'content', array ( 0 => 'block_13405572397c45ea406_61986431', 1 => false, 3 => 0, 2 => 0, )); ?> ext->_inheritance->endChild($_smarty_tpl); $_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, ""file:admin/master_layout.tpl"", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 2, false); } /* {block 'navbar'} file:admin\parent\list.tpl */ function block_1862572397c45d6b79_68289653($_smarty_tpl, $_blockParentStack) { ?> smarty->ext->_subtemplate->render($_smarty_tpl, ""file:admin/nav_bar.tpl"", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('active'=>'parents'), 0, false); ?> smarty->ext->_subtemplate->render($_smarty_tpl, ""file:admin/parent/breadcum.tpl"", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('active'=>'home'), 0, false); ?> smarty->ext->_subtemplate->render($_smarty_tpl, ""file:admin/parent/sidebar.tpl"", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('active'=>'list'), 0, false); ?>
        smarty->ext->_subtemplate->render($_smarty_tpl, ""file:admin/top_notif.tpl"", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); ?>

        Parent List

        tpl_vars['parents']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $__foreach_parent_0_saved_item = isset($_smarty_tpl->tpl_vars['parent']) ? $_smarty_tpl->tpl_vars['parent'] : false; $__foreach_parent_0_saved_key = isset($_smarty_tpl->tpl_vars['key']) ? $_smarty_tpl->tpl_vars['key'] : false; $_smarty_tpl->tpl_vars['parent'] = new Smarty_Variable(); $__foreach_parent_0_total = $_smarty_tpl->smarty->ext->_foreach->count($_from); if ($__foreach_parent_0_total) { $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable(); foreach ($_from as $_smarty_tpl->tpl_vars['key']->value => $_smarty_tpl->tpl_vars['parent']->value) { $__foreach_parent_0_saved_local_item = $_smarty_tpl->tpl_vars['parent']; ?> tpl_vars['parent'] = $__foreach_parent_0_saved_local_item; } } if ($__foreach_parent_0_saved_item) { $_smarty_tpl->tpl_vars['parent'] = $__foreach_parent_0_saved_item; } if ($__foreach_parent_0_saved_key) { $_smarty_tpl->tpl_vars['key'] = $__foreach_parent_0_saved_key; } ?>
        Name Email Status Action
        tpl_vars['parent']->value->full_name;?> tpl_vars['parent']->value->email;?> tpl_vars['parent']->value->status == 1) { echo 'Active'; } else { echo 'Non-Active'; }?> 'admin/parent','src'=>$_smarty_tpl->tpl_vars['parent']->value->id),$_smarty_tpl);?> "" class=""btn btn-success btn-xs"">Detail 'admin/parent/edit','src'=>$_smarty_tpl->tpl_vars['parent']->value->id),$_smarty_tpl);?> "" class=""btn btn-primary btn-xs"">Edit 'admin/parent/delete','src'=>$_smarty_tpl->tpl_vars['parent']->value->id),$_smarty_tpl);?> "" class=""btn btn-danger btn-xs"" onclick=""return confirm('Are you sure?')"">Hapus
        . ******************************************************************************/ package au.edu.anu.datacommons.doi; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.StringWriter; import java.net.URI; import javax.ws.rs.core.UriBuilder; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import javax.xml.bind.Unmarshaller; import org.datacite.schema.kernel_4.Resource; import org.datacite.schema.kernel_4.Resource.Creators; import org.datacite.schema.kernel_4.Resource.Creators.Creator; import org.datacite.schema.kernel_4.Resource.Creators.Creator.CreatorName; import org.datacite.schema.kernel_4.Resource.Identifier; import org.datacite.schema.kernel_4.Resource.Titles; import org.datacite.schema.kernel_4.Resource.Titles.Title; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.sun.jersey.test.framework.JerseyTest; public class DoiClientTest extends JerseyTest { private static final Logger LOGGER = LoggerFactory.getLogger(DoiClientTest.class); private DoiClient doiClient; private String sampleDoi = ""10.5072/13/50639BFE25F18""; private static JAXBContext context; private Marshaller marshaller; private Unmarshaller unmarshaller; public DoiClientTest() { super(""au.edu.anu.datacommons.doi""); // LOGGER.trace(""In Constructor""); // WebResource webResource = resource(); // DoiConfig doiConfig = new DoiConfigImpl(webResource.getURI().toString(), appId); // doiClient = new DoiClient(doiConfig); doiClient = new DoiClient(); } @BeforeClass public static void setUpBeforeClass() throws Exception { context = JAXBContext.newInstance(Resource.class); } @AfterClass public static void tearDownAfterClass() throws Exception { } @Before public void setUp() throws Exception { super.setUp(); marshaller = context.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, ""http://datacite.org/schema/kernel-2.2 http://schema.datacite.org/meta/kernel-2.2/metadata.xsd""); } @After public void tearDown() throws Exception { super.tearDown(); } @Ignore public void testMint() { try { doiClient.mint(""https://datacommons.anu.edu.au:8443/DataCommons/item/anudc:3320"", generateSampleResource()); String respStr = doiClient.getDoiResponseAsString(); LOGGER.trace(respStr); } catch (Exception e) { failOnException(e); } } @Ignore public void testUpdate() { try { Resource res = new Resource(); Creators creators = new Creators(); Creator creator = new Creator(); CreatorName creatorName = new CreatorName(); creatorName.setValue(""Creator 1""); creator.setCreatorName(creatorName); creators.getCreator().add(creator); res.setCreators(creators); Titles titles = new Titles(); Title title = new Title(); title.setValue(""Title 1""); titles.getTitle().add(title); res.setTitles(titles); res.setPublisher(""Publisher 1""); res.setPublicationYear(""1987""); Identifier id = new Identifier(); id.setValue(sampleDoi); id.setIdentifierType(""DOI""); res.setIdentifier(id); doiClient.update(sampleDoi, null, res); Resource newRes = doiClient.getMetadata(sampleDoi); String resAsStr = getResourceAsString(newRes); LOGGER.trace(resAsStr); } catch (Exception e) { failOnException(e); } } @Ignore public void testDeactivate() { try { doiClient.deactivate(sampleDoi); assertTrue(doiClient.getDoiResponseAsString().indexOf(""AbsolutePath:"" + resource().getURI().toString() + ""deactivate.xml/"") != -1); // assertTrue(doiClient.getDoiResponseAsString().indexOf(""QueryParam:app_id=TEST"" + appId) != -1); assertTrue(doiClient.getDoiResponseAsString().indexOf(""QueryParam:doi="" + sampleDoi) != -1); } catch (Exception e) { failOnException(e); } } @Ignore public void testActivate() { try { doiClient.activate(sampleDoi); assertTrue(doiClient.getDoiResponseAsString().indexOf(""AbsolutePath:"" + resource().getURI().toString() + ""activate.xml/"") != -1); // assertTrue(doiClient.getDoiResponseAsString().indexOf(""QueryParam:app_id=TEST"" + appId) != -1); assertTrue(doiClient.getDoiResponseAsString().indexOf(""QueryParam:doi="" + sampleDoi) != -1); } catch (Exception e) { failOnException(e); } } @Test public void testGetDoiMetaData() { try { Resource res = doiClient.getMetadata(sampleDoi); StringWriter strW = new StringWriter(); marshaller.marshal(res, strW); // assertTrue(doiClient.getDoiResponseAsString().indexOf(""AbsolutePath:"" + resource().getURI().toString() + ""xml.xml/"") != -1); // assertTrue(doiClient.getDoiResponseAsString().indexOf(""QueryParam:doi="" + sampleDoi) != -1); } catch (Exception e) { failOnException(e); } } private Resource generateSampleResource() { Resource metadata = new Resource(); Titles titles = new Titles(); Title title1 = new Title(); title1.setValue(""Some title without a type""); titles.getTitle().add(title1); metadata.setTitles(titles); Creators creators = new Creators(); metadata.setCreators(creators); Creator creator = new Creator(); CreatorName creatorName = new CreatorName(); creatorName.setValue(""Smith, John""); creator.setCreatorName(creatorName); metadata.getCreators().getCreator().add(creator); metadata.setPublisher(""Some random publisher""); metadata.setPublicationYear(""2010""); return metadata; } private String getResourceAsString(Resource res) throws JAXBException { StringWriter strW = new StringWriter(); marshaller.marshal(res, strW); return strW.toString(); } private void failOnException(Throwable e) { LOGGER.error(e.getMessage(), e); fail(e.getMessage()); } } ",0 "le>mathcomp-odd-order: Not compatible 👼
        « Up

        mathcomp-odd-order 1.6.1 Not compatible 👼

        📅 (2021-11-05 07:20:37 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-threads        base
        base-unix           base
        camlp5              7.14        Preprocessor-pretty-printer of OCaml
        conf-findutils      1           Virtual package relying on findutils
        conf-perl           1           Virtual package relying on perl
        coq                 8.9.1       Formal proof management system
        num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.09.1      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.09.1      Official release 4.09.1
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.9.1       A library manager for OCaml
        # opam file:
        opam-version: "2.0"
        name: "coq-mathcomp-odd-order"
        version: "1.6.1"
        maintainer: "Mathematical Components <mathcomp-dev@sympa.inria.fr>"
        homepage: "http://ssr.msr-inria.inria.fr/"
        bug-reports: "Mathematical Components <mathcomp-dev@sympa.inria.fr>"
        license: "CeCILL-B"
        build: [ 
          [make "-C" "mathcomp/odd_order" "-j" "%{jobs}%"]
        ]
        install: [ make "-C" "mathcomp/odd_order" "install" ]
        depends: [
          "ocaml"
          "coq-mathcomp-algebra" {= "1.6.1"}
          "coq-mathcomp-character" {= "1.6.1"}
          "coq-mathcomp-field" {= "1.6.1"}
          "coq-mathcomp-field-extra" {= "1.6.1"}
          "coq-mathcomp-fingroup" {= "1.6.1"}
          "coq-mathcomp-solvable" {= "1.6.1"}
          "coq-mathcomp-ssreflect" {= "1.6.1"}
        ]
        tags: [ "keyword:finite groups" "keyword:Feit Thompson theorem" "keyword:small scale reflection" "keyword:mathematical components" "keyword:odd order theorem" ]
        authors: [ "Jeremy Avigad <>" "Andrea Asperti <>" "Stephane Le Roux <>" "Yves Bertot <>" "Laurence Rideau <>" "Enrico Tassi <>" "Ioana Pasca <>" "Georges Gonthier <>" "Sidi Ould Biha <>" "Cyril Cohen <>" "Francois Garillot <>" "Alexey Solovyev <>" "Russell O'Connor <>" "Laurent Théry <>" "Assia Mahboubi <>" ]
        synopsis: "The formal proof of the Feit-Thompson theorem"
        description: """
        The formal proof of the Feit-Thompson theorem.
        From mathcomp Require Import all_ssreflect all_fingroup all_solvable PFsection14.
        Check Feit_Thompson.
           : forall (gT : finGroupType) (G : {group gT}), odd #|G| -> solvable G
        From mathcomp Require Import all_ssreflect all_fingroup 
                                     all_solvable stripped_odd_order_theorem.
        Check stripped_Odd_Order.
           : forall (T : Type) (mul : T -> T -> T) (one : T) (inv : T -> T)
                 (G : T -> Type) (n : natural),
               group_axioms T mul one inv ->
               group T mul one inv G ->
               finite_of_order T G n -> odd n -> solvable_group T mul one inv G"""
        url {
          src:
            "https://github.com/math-comp/math-comp/archive/mathcomp-odd-order.1.6.1.tar.gz"
          checksum: "md5=2303f60bbca5eaa24bef7af5d47694b9"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-mathcomp-odd-order.1.6.1 coq.8.9.1
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.9.1).
        The following dependencies couldn't be met:
          - coq-mathcomp-odd-order -> coq-mathcomp-ssreflect = 1.6.1 -> coq < 8.7~ -> ocaml < 4.06.0
              base of this switch (use `--unlock-base' to force)
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-odd-order.1.6.1
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "015, Microchip Technology Germany II GmbH & Co. KG * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This file is licensed under GPLv2. */ /* * Authors: * Andrey Shvetsov * Christian Gromm * Sebastian Graf */ #ifndef __MOST_CORE_H__ #define __MOST_CORE_H__ #include struct kobject; struct module; /** * Interface type */ enum most_interface_type { ITYPE_LOOPBACK = 1, ITYPE_I2C, ITYPE_I2S, ITYPE_TSI, ITYPE_HBI, ITYPE_MEDIALB_DIM, ITYPE_MEDIALB_DIM2, ITYPE_USB, ITYPE_PCIE }; /** * Channel direction. */ enum most_channel_direction { MOST_CH_RX = 1 << 0, MOST_CH_TX = 1 << 1, }; /** * Channel data type. */ enum most_channel_data_type { MOST_CH_CONTROL = 1 << 0, MOST_CH_ASYNC = 1 << 1, MOST_CH_ISOC = 1 << 2, MOST_CH_SYNC = 1 << 5, }; enum mbo_status_flags { /* MBO was processed successfully (data was send or received )*/ MBO_SUCCESS = 0, /* The MBO contains wrong or missing information. */ MBO_E_INVAL, /* MBO was completed as HDM Channel will be closed */ MBO_E_CLOSE, }; /** * struct most_channel_capability - Channel capability * @direction: Supported channel directions. * The value is bitwise OR-combination of the values from the * enumeration most_channel_direction. Zero is allowed value and means * ""channel may not be used"". * @data_type: Supported channel data types. * The value is bitwise OR-combination of the values from the * enumeration most_channel_data_type. Zero is allowed value and means * ""channel may not be used"". * @num_buffer_packet: Maximum number of buffers supported by this channel * for packet data types (Async,Control,QoS) * @buffer_size_packet: Maximum buffer size supported by this channel * for packet data types (Async,Control,QoS) * @num_buffer_streaming: Maximum number of buffers supported by this channel * for streaming data types (Sync,AV Packetized) * @buffer_size_streaming: Maximum buffer size supported by this channel * for streaming data types (Sync,AV Packetized) * @name_suffix: Optional suffix providean by an HDM that is attached to the * regular channel name. * * Describes the capabilities of a MostCore channel like supported Data Types * and directions. This information is provided by an HDM for the MostCore. * * The Core creates read only sysfs attribute files in * /sys/devices/virtual/most/mostcore/devices/mdev-#/mdev#-ch#/ with the * following attributes: * -available_directions * -available_datatypes * -number_of_packet_buffers * -number_of_stream_buffers * -size_of_packet_buffer * -size_of_stream_buffer * where content of each file is a string with all supported properties of this * very channel attribute. */ struct most_channel_capability { u16 direction; u16 data_type; u16 num_buffers_packet; u16 buffer_size_packet; u16 num_buffers_streaming; u16 buffer_size_streaming; const char *name_suffix; }; /** * struct most_channel_config - stores channel configuration * @direction: direction of the channel * @data_type: data type travelling over this channel * @num_buffers: number of buffers * @buffer_size: size of a buffer for AIM. * Buffer size may be cutted down by HDM in a configure callback * to match to a given interface and channel type. * @extra_len: additional buffer space for internal HDM purposes like padding. * May be set by HDM in a configure callback if needed. * @subbuffer_size: size of a subbuffer * @packets_per_xact: number of MOST frames that are packet inside one USB * packet. This is USB specific * * Describes the configuration for a MostCore channel. This information is * provided from the MostCore to a HDM (like the Medusa PCIe Interface) as a * parameter of the ""configure"" function call. */ struct most_channel_config { enum most_channel_direction direction; enum most_channel_data_type data_type; u16 num_buffers; u16 buffer_size; u16 extra_len; u16 subbuffer_size; u16 packets_per_xact; }; /* * struct mbo - MOST Buffer Object. * @context: context for core completion handler * @priv: private data for HDM * * public: documented fields that are used for the communications * between MostCore and HDMs * * @list: list head for use by the mbo's current owner * @ifp: (in) associated interface instance * @hdm_channel_id: (in) HDM channel instance * @virt_address: (in) kernel virtual address of the buffer * @bus_address: (in) bus address of the buffer * @buffer_length: (in) buffer payload length * @processed_length: (out) processed length * @status: (out) transfer status * @complete: (in) completion routine * * The MostCore allocates and initializes the MBO. * * The HDM receives MBO for transfer from MostCore with the call to enqueue(). * The HDM copies the data to- or from the buffer depending on configured * channel direction, set ""processed_length"" and ""status"" and completes * the transfer procedure by calling the completion routine. * * At the end the MostCore deallocates the MBO or recycles it for further * transfers for the same or different HDM. * * Directions of usage: * The core driver should never access any MBO fields (even if marked * as ""public"") while the MBO is owned by an HDM. The ownership starts with * the call of enqueue() and ends with the call of its complete() routine. * * II. * Every HDM attached to the core driver _must_ ensure that it returns any MBO * it owns (due to a previous call to enqueue() by the core driver) before it * de-registers an interface or gets unloaded from the kernel. If this direction * is violated memory leaks will occur, since the core driver does _not_ track * MBOs it is currently not in control of. * */ struct mbo { void *context; void *priv; struct list_head list; struct most_interface *ifp; int *num_buffers_ptr; u16 hdm_channel_id; void *virt_address; dma_addr_t bus_address; u16 buffer_length; u16 processed_length; enum mbo_status_flags status; void (*complete)(struct mbo *); }; /** * Interface instance description. * * Describes one instance of an interface like Medusa PCIe or Vantage USB. * This structure is allocated and initialized in the HDM. MostCore may not * modify this structure. * * @interface Interface type. \sa most_interface_type. * @description PRELIMINARY. * Unique description of the device instance from point of view of the * interface in free text form (ASCII). * It may be a hexadecimal presentation of the memory address for the MediaLB * IP or USB device ID with USB properties for USB interface, etc. * @num_channels Number of channels and size of the channel_vector. * @channel_vector Properties of the channels. * Array index represents channel ID by the driver. * @configure Callback to change data type for the channel of the * interface instance. May be zero if the instance of the interface is not * configurable. Parameter channel_config describes direction and data * type for the channel, configured by the higher level. The content of * @enqueue Delivers MBO to the HDM for processing. * After HDM completes Rx- or Tx- operation the processed MBO shall * be returned back to the MostCore using completion routine. * The reason to get the MBO delivered from the MostCore after the channel * is poisoned is the re-opening of the channel by the application. * In this case the HDM shall hold MBOs and service the channel as usual. * The HDM must be able to hold at least one MBO for each channel. * The callback returns a negative value on error, otherwise 0. * @poison_channel Informs HDM about closing the channel. The HDM shall * cancel all transfers and synchronously or asynchronously return * all enqueued for this channel MBOs using the completion routine. * The callback returns a negative value on error, otherwise 0. * @request_netinfo: triggers retrieving of network info from the HDM by * means of ""Message exchange over MDP/MEP"" * The call of the function request_netinfo with the parameter on_netinfo as * NULL prohibits use of the previously obtained function pointer. * @priv Private field used by mostcore to store context information. */ struct most_interface { struct module *mod; enum most_interface_type interface; const char *description; int num_channels; struct most_channel_capability *channel_vector; int (*configure)(struct most_interface *iface, int channel_idx, struct most_channel_config *channel_config); int (*enqueue)(struct most_interface *iface, int channel_idx, struct mbo *mbo); int (*poison_channel)(struct most_interface *iface, int channel_idx); void (*request_netinfo)(struct most_interface *iface, int channel_idx, void (*on_netinfo)(struct most_interface *iface, unsigned char link_stat, unsigned char *mac_addr)); void *priv; }; /** * struct most_aim - identifies MOST device driver to mostcore * @name: Driver name * @probe_channel: function for core to notify driver about channel connection * @disconnect_channel: callback function to disconnect a certain channel * @rx_completion: completion handler for received packets * @tx_completion: completion handler for transmitted packets * @context: context pointer to be used by mostcore */ struct most_aim { const char *name; int (*probe_channel)(struct most_interface *iface, int channel_idx, struct most_channel_config *cfg, struct kobject *parent, char *name); int (*disconnect_channel)(struct most_interface *iface, int channel_idx); int (*rx_completion)(struct mbo *mbo); int (*tx_completion)(struct most_interface *iface, int channel_idx); void *context; }; /** * most_register_interface - Registers instance of the interface. * @iface: Pointer to the interface instance description. * * Returns a pointer to the kobject of the generated instance. * * Note: HDM has to ensure that any reference held on the kobj is * released before deregistering the interface. */ struct kobject *most_register_interface(struct most_interface *iface); /** * Deregisters instance of the interface. * @intf_instance Pointer to the interface instance description. */ void most_deregister_interface(struct most_interface *iface); void most_submit_mbo(struct mbo *mbo); /** * most_stop_enqueue - prevents core from enqueing MBOs * @iface: pointer to interface * @channel_idx: channel index */ void most_stop_enqueue(struct most_interface *iface, int channel_idx); /** * most_resume_enqueue - allow core to enqueue MBOs again * @iface: pointer to interface * @channel_idx: channel index * * This clears the enqueue halt flag and enqueues all MBOs currently * in wait fifo. */ void most_resume_enqueue(struct most_interface *iface, int channel_idx); int most_register_aim(struct most_aim *aim); int most_deregister_aim(struct most_aim *aim); struct mbo *most_get_mbo(struct most_interface *iface, int channel_idx, struct most_aim *); void most_put_mbo(struct mbo *mbo); int channel_has_mbo(struct most_interface *iface, int channel_idx, struct most_aim *aim); int most_start_channel(struct most_interface *iface, int channel_idx, struct most_aim *); int most_stop_channel(struct most_interface *iface, int channel_idx, struct most_aim *); #endif /* MOST_CORE_H_ */ ",0 "mpliance 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. */ #import ""ZXReader.h"" @class ZXBinaryBitmap, ZXDecodeHints, ZXResult; /** * This implementation can detect and decode a MaxiCode in an image. */ @interface ZXMaxiCodeReader : NSObject @end ",0 "enerated by javadoc (1.8.0_151) on Thu Feb 08 09:04:06 MST 2018 --> org.wildfly.swarm.spi.api.cdi (BOM: * : All 2018.2.0 API)
        WildFly Swarm API, 2018.2.0

        Package org.wildfly.swarm.spi.api.cdi

        WildFly Swarm API, 2018.2.0

        Copyright © 2018 JBoss by Red Hat. All rights reserved.

        ",0 "849150053suicide.jpg ---

        नई दिल्ली: मध्य प्रदेश में कर्ज में डूबे किसान के खुदकुशी करने का एक और सनसनीखेज मामला सामने आया है. इस बार नीमच जिले में प्रधानमंत्री कार्यालय से इच्छामृत्यु की गुहार लगाने वाले किसान ने साहूकारों के कर्ज व प्रताड़ना का वीडियो बनाया और फिर जहर खाकर जान दे दी.

        जानकारी के अनुसार, मनासा विकासखंड के अल्हेड़ गांव में रहने वाले 34 वर्षीय किसान विनोद पाटीदार बेहोशी की हालत में खेत में पड़ा मिला. परिजन उसे तुरंत नजदीक के सामुदायिक स्वास्थ्य केंद्र लेकर पहुंचे.

        हालत नाजुक देखते हुए डॉक्टरों ने उसे जिला अस्पताल रेफर कर दिया. वहां भी हालत में सुधार नहीं हुआ तो परिजन बेहतर इलाज के लिए अहमदाबाद रवाना हुए, लेकिन रास्ते में ही विनोद ने दम तोड़ दिया.

        अंतिम संस्कार के पहले परिजनों ने विनोद का मोबाइल फोन देखा तो उसमें वीडियो नजर आया. यह वीडियो खुदकुशी करने के पहले का बताया जा रहा है. इस वीडियो में किसान ने पांच साहूकारों के नाम लेते हुए कहा कि कर्ज की रकम लौटाने के बावजूद ये साहूकार उसे प्रताड़ित कर रह ज्यादा रकम की डिमांड कर रहे हैं. उसके ट्रैक्‍टर और जमीन पर भी साहूकारों के कब्जा करने का जिक्र वीडियो में किया गया है. बताया जा रहा है परेशान होकर 4 जनवरी को किसान विनोद पाटीदार ने एक शिकायत पीएमओ दिल्‍ली को भी भेजी थी जिसमें उसने पीएमओ से इच्‍छा मृत्‍यु की इजाजत मांगी थी.

        किसान की खुदकुशी से जुड़े कई पहलू सामने आने के बाद आला अफसर खुलकर कुछ भी बोलने से बच रहे है. उनका कहना है कि सारे सबूतों और परिजनों के बयानों के आधार पर दोषियों के खिलाफ कार्रवाई की जाएगी.

        ",0 " Exp $ * * Copyright (C) 2000, 2001 by Martin Pool * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* | Welcome to Arco AM/PM Mini-Market. We | would like to advise our customers | that any individual who offers to | pump gas, wash windows or solicit | products is not employed by or | associated with this facility. We | discourage any contact with these | individuals and ask that you report | any problems to uniformed personal | inside. Thankyou for shopping at | Arco, and have a nice day. */ #include #include #include #include ""librsync.h"" /* * TODO: (Suggestion by tridge) Add a function which outputs a * complete text description of a job, including only the fields * relevant to the current encoding function. */ /** \brief Translate from rs_result to human-readable messages. */ char const *rs_strerror(rs_result r) { switch (r) { case RS_DONE: return ""OK""; case RS_RUNNING: return ""still running""; case RS_BLOCKED: return ""blocked waiting for input or output buffers""; case RS_BAD_MAGIC: return ""bad magic number at start of stream""; case RS_INPUT_ENDED: return ""unexpected end of input""; case RS_CORRUPT: return ""stream corrupt""; case RS_UNIMPLEMENTED: return ""unimplemented case""; case RS_MEM_ERROR: return ""out of memory""; case RS_IO_ERROR: return ""IO error""; case RS_SYNTAX_ERROR: return ""bad command line syntax""; case RS_INTERNAL_ERROR: return ""library internal error""; default: return ""unexplained problem""; } } ",0 "ute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.sonar.api.ce.posttask; /** * @since 5.5 */ public interface CeTask { /** * Id of the Compute Engine task. *

        * This is the id under which the processing of the project analysis report has been added to the Compute Engine * queue. * */ String getId(); /** * Indicates whether the Compute Engine task ended successfully or not. */ Status getStatus(); enum Status { SUCCESS, FAILED } } ",0 "(Techie/Stskeeps) * Copyright (C) 2000 Lucas Madar [bahamut team] * * See file AUTHORS in IRC package for additional names of * the programmers. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef STANDALONE #include ""struct.h"" #include ""common.h"" #include ""sys.h"" #include ""numeric.h"" #include ""msg.h"" #include ""channel.h"" #include ""version.h"" #endif #include #include #include #include #include #ifdef _WIN32 #include #endif #include #ifndef STANDALONE #include ""h.h"" #include ""proto.h"" ID_Copyright(""(C) Carsten Munk 2000""); #endif static inline char *int_to_base64(long); static inline long base64_to_int(char *); Link *Servers = NULL; char *base64enc(long i) { if (i < 0) return (""0""); return int_to_base64(i); } long base64dec(char *b64) { if (b64) return base64_to_int(b64); else return 0; } int numeric_collides(long numeric) { Link *lp; if (!numeric) return 0; for (lp = Servers; lp; lp = lp->next) if (numeric == lp->value.cptr->serv->numeric) return 1; return 0; } void add_server_to_table(aClient *what) { Link *ptr; if (IsServer(what) || IsMe(what)) { ptr = make_link(); ptr->value.cptr = what; ptr->flags = what->serv->numeric; ptr->next = Servers; Servers = ptr; } } void remove_server_from_table(aClient *what) { Link **curr; Link *tmp; Link *lp = Servers; for (; lp && (lp->value.cptr == what); lp = lp->next); for (;;) { for (curr = &Servers; (tmp = *curr); curr = &tmp->next) if (tmp->value.cptr == what) { *curr = tmp->next; free_link(tmp); break; } if (lp) break; } } aClient *find_server_by_numeric(long value) { Link *lp; for (lp = Servers; lp; lp = lp->next) if (lp->value.cptr->serv->numeric == value) return (lp->value.cptr); return NULL; } aClient *find_server_by_base64(char *b64) { if (b64) return find_server_by_numeric(base64dec(b64)); else return NULL; } char *find_server_id(aClient *which) { return (base64enc(which->serv->numeric)); } aClient *find_server_quick_search(char *name) { Link *lp; for (lp = Servers; lp; lp = lp->next) if (!match(name, lp->value.cptr->name)) return (lp->value.cptr); return NULL; } aClient *find_server_quick_straight(char *name) { Link *lp; for (lp = Servers; lp; lp = lp->next) if (!strcmp(name, lp->value.cptr->name)) return (lp->value.cptr); return NULL; } aClient *find_server_quickx(char *name, aClient *cptr) { if (name) cptr = (aClient *)find_server_quick_search(name); return cptr; } aClient *find_server_b64_or_real(char *name) { Link *lp; long namebase64; if (!name) return NULL; if (strlen(name) < 3) { namebase64 = base64dec(name); for (lp = Servers; lp; lp = lp->next) if (lp->value.cptr->serv->numeric == namebase64) return (lp->value.cptr); } else return find_server_quick_straight(name); return NULL; } /* ':' and '#' and '&' and '+' and '@' must never be in this table. */ /* these tables must NEVER CHANGE! >) */ char int6_to_base64_map[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '}' }; char base64_to_int6_map[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; static inline char *int_to_base64(long val) { /* 32/6 == max 6 bytes for representation, * +1 for the null, +1 for byte boundaries */ static char base64buf[8]; long i = 7; base64buf[i] = '\0'; /* Temporary debugging code.. remove before 2038 ;p. * This might happen in case of 64bit longs (opteron/ia64), * if the value is then too large it can easily lead to * a buffer underflow and thus to a crash. -- Syzop */ if (val > 2147483647L) { abort(); } do { base64buf[--i] = int6_to_base64_map[val & 63]; } while (val >>= 6); return base64buf + i; } static inline long base64_to_int(char *b64) { int v = base64_to_int6_map[(u_char)*b64++]; if (!b64) return 0; while (*b64) { v <<= 6; v += base64_to_int6_map[(u_char)*b64++]; } return v; } void ns_stats(aClient *cptr) { Link *lp; aClient *sptr; for (lp = Servers; lp; lp = lp->next) { sptr = lp->value.cptr; sendto_one(cptr, "":%s NOTICE %s :*** server=%s numeric=%i b64=%s [%s]"", me.name, cptr->name, sptr->name, sptr->serv->numeric, find_server_id(sptr), find_server_b64_or_real(find_server_id(sptr)) == sptr ? ""SANE"" : ""INSANE""); } } ",0 " the LICENSE file. #ifndef GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_ #define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_ #include #include ""base/basictypes.h"" #include ""base/containers/hash_tables.h"" #include ""base/memory/ref_counted.h"" #include ""base/memory/scoped_ptr.h"" #include ""base/observer_list.h"" #include ""gpu/gpu_export.h"" #if defined(ANGLE_DX11) #include ""third_party/angle_dx11/include/GLSLANG/ShaderLang.h"" #else #include ""third_party/angle/include/GLSLANG/ShaderLang.h"" #endif namespace gpu { namespace gles2 { // Translates a GLSL ES 2.0 shader to desktop GLSL shader, or just // validates GLSL ES 2.0 shaders on a true GLSL ES implementation. class ShaderTranslatorInterface { public: enum GlslImplementationType { kGlsl, kGlslES }; enum GlslBuiltInFunctionBehavior { kGlslBuiltInFunctionOriginal, kGlslBuiltInFunctionEmulated }; struct VariableInfo { VariableInfo() : type(0), size(0) { } VariableInfo(int _type, int _size, std::string _name) : type(_type), size(_size), name(_name) { } bool operator==( const ShaderTranslatorInterface::VariableInfo& other) const { return type == other.type && size == other.size && strcmp(name.c_str(), other.name.c_str()) == 0; } int type; int size; std::string name; // name in the original shader source. }; // Mapping between variable name and info. typedef base::hash_map VariableMap; // Mapping between hashed name and original name. typedef base::hash_map NameMap; // Initializes the translator. // Must be called once before using the translator object. virtual bool Init( ShShaderType shader_type, ShShaderSpec shader_spec, const ShBuiltInResources* resources, GlslImplementationType glsl_implementation_type, GlslBuiltInFunctionBehavior glsl_built_in_function_behavior) = 0; // Translates the given shader source. // Returns true if translation is successful, false otherwise. virtual bool Translate(const char* shader) = 0; // The following functions return results from the last translation. // The results are NULL/empty if the translation was unsuccessful. // A valid info-log is always returned irrespective of whether translation // was successful or not. virtual const char* translated_shader() const = 0; virtual const char* info_log() const = 0; virtual const VariableMap& attrib_map() const = 0; virtual const VariableMap& uniform_map() const = 0; virtual const NameMap& name_map() const = 0; // Return a string that is unique for a specfic set of options that would // possibly effect compilation. virtual std::string GetStringForOptionsThatWouldEffectCompilation() const = 0; protected: virtual ~ShaderTranslatorInterface() {} }; // Implementation of ShaderTranslatorInterface class GPU_EXPORT ShaderTranslator : public base::RefCounted, NON_EXPORTED_BASE(public ShaderTranslatorInterface) { public: class DestructionObserver { public: DestructionObserver(); virtual ~DestructionObserver(); virtual void OnDestruct(ShaderTranslator* translator) = 0; private: DISALLOW_COPY_AND_ASSIGN(DestructionObserver); }; ShaderTranslator(); // Overridden from ShaderTranslatorInterface. virtual bool Init( ShShaderType shader_type, ShShaderSpec shader_spec, const ShBuiltInResources* resources, GlslImplementationType glsl_implementation_type, GlslBuiltInFunctionBehavior glsl_built_in_function_behavior) OVERRIDE; // Overridden from ShaderTranslatorInterface. virtual bool Translate(const char* shader) OVERRIDE; // Overridden from ShaderTranslatorInterface. virtual const char* translated_shader() const OVERRIDE; virtual const char* info_log() const OVERRIDE; // Overridden from ShaderTranslatorInterface. virtual const VariableMap& attrib_map() const OVERRIDE; virtual const VariableMap& uniform_map() const OVERRIDE; virtual const NameMap& name_map() const OVERRIDE; virtual std::string GetStringForOptionsThatWouldEffectCompilation() const OVERRIDE; void AddDestructionObserver(DestructionObserver* observer); void RemoveDestructionObserver(DestructionObserver* observer); private: friend class base::RefCounted; virtual ~ShaderTranslator(); void ClearResults(); int GetCompileOptions() const; ShHandle compiler_; ShBuiltInResources compiler_options_; scoped_ptr translated_shader_; scoped_ptr info_log_; VariableMap attrib_map_; VariableMap uniform_map_; NameMap name_map_; bool implementation_is_glsl_es_; bool needs_built_in_function_emulation_; ObserverList destruction_observers_; DISALLOW_COPY_AND_ASSIGN(ShaderTranslator); }; } // namespace gles2 } // namespace gpu #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_ ",0 " * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * MultiHandler.java * Copyright (C) 2017 University of Waikato, Hamilton, NZ */ package adams.core.logging; import java.util.logging.Handler; import java.util.logging.LogRecord; /** * Combines multiple handlers. * * @author FracPete (fracpete at waikato dot ac dot nz) * @version $Revision$ */ public class MultiHandler extends AbstractLogHandler { /** the logging handlers to use. */ protected Handler[] m_Handlers; /** * Initializes the members. */ @Override protected void initialize() { super.initialize(); setHandlers(new Handler[0]); } /** * Sets the handlers to use. * * @param value the handlers */ public void setHandlers(Handler[] value) { m_Handlers = value; reset(); } /** * Returns the current handlers. * * @return the handlers */ public Handler[] getHandlers() { return m_Handlers; } /** * Adds the specified handler. * * @param value the handler */ public void addHandler(Handler value) { Handler[] handlers; int i; handlers = new Handler[m_Handlers.length + 1]; for (i = 0; i < m_Handlers.length; i++) handlers[i] = m_Handlers[i]; handlers[handlers.length - 1] = value; m_Handlers = handlers; } /** * Removes the specified handler. * * @param index the handler index */ public void removeHandler(int index) { Handler[] handlers; int i; int n; handlers = new Handler[m_Handlers.length - 1]; n = 0; for (i = 0; i < m_Handlers.length; i++) { if (i == index) continue; handlers[n] = m_Handlers[i]; n++; } m_Handlers = handlers; } /** * Flush any buffered output. */ @Override public void flush() { super.flush(); if (m_Handlers != null) { for (Handler h : m_Handlers) h.flush(); } } /** * Close the Handler and free all associated resources. *

        * The close method will perform a flush and then close the * Handler. After close has been called this Handler * should no longer be used. Method calls may either be silently * ignored or may throw runtime exceptions. * * @exception SecurityException if a security manager exists and if * the caller does not have LoggingPermission(""control""). */ @Override public void close() throws SecurityException { if (m_Handlers != null) { for (Handler h : m_Handlers) h.close(); } super.close(); } /** * Publish a LogRecord. *

        * The logging request was made initially to a Logger object, * which initialized the LogRecord and forwarded it here. *

        * The Handler is responsible for formatting the message, when and * if necessary. The formatting should include localization. * * @param record description of the log event. A null record is * silently ignored and is not published */ @Override protected void doPublish(LogRecord record) { for (Handler h: m_Handlers) h.publish(record); } /** * Compares the handler with itself. * * @param o the other handler * @return less than 0, equal to 0, or greater than 0 if the * handler is less, equal to, or greater than this one */ public int compareTo(Handler o) { int result; MultiHandler other; int i; result = super.compareTo(o); if (result == 0) { other = (MultiHandler) o; result = new Integer(getHandlers().length).compareTo(other.getHandlers().length); if (result == 0) { for (i = 0; i < getHandlers().length; i++) { if ((getHandlers()[i] instanceof AbstractLogHandler) && (other.getHandlers()[i] instanceof AbstractLogHandler)) result = ((AbstractLogHandler) getHandlers()[i]).compareTo(other.getHandlers()[i]); else result = new Integer(getHandlers()[i].hashCode()).compareTo(other.getHandlers()[i].hashCode()); if (result != 0) break; } } } return result; } } ",0 "======================================= * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * ===================================================================== */ #include #include ""gigaset.h"" void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb) { } EXPORT_SYMBOL_GPL(gigaset_skb_sent); void gigaset_skb_rcvd(struct bc_state *bcs, struct sk_buff *skb) { } EXPORT_SYMBOL_GPL(gigaset_skb_rcvd); void gigaset_isdn_rcv_err(struct bc_state *bcs) { } EXPORT_SYMBOL_GPL(gigaset_isdn_rcv_err); int gigaset_isdn_icall(struct at_state_t *at_state) { return ICALL_IGNORE; } void gigaset_isdn_connD(struct bc_state *bcs) { } void gigaset_isdn_hupD(struct bc_state *bcs) { } void gigaset_isdn_connB(struct bc_state *bcs) { } void gigaset_isdn_hupB(struct bc_state *bcs) { } void gigaset_isdn_start(struct cardstate *cs) { } void gigaset_isdn_stop(struct cardstate *cs) { } int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid) { return 1; } void gigaset_isdn_unregdev(struct cardstate *cs) { } void gigaset_isdn_regdrv(void) { pr_info(""no ISDN subsystem interface\n""); } void gigaset_isdn_unregdrv(void) { } ",0 "filters find the relevant Entries and return these Entries * data as XML so that XSLT can be applied on it to create your website. In Symphony, * there are four Datasource types provided, Section, Author, Navigation and Dynamic * XML. Section is the mostly commonly used Datasource, which allows the filtering * and searching for Entries in a Section to be returned as XML. Navigation datasources * expose the Symphony Navigation structure of the Pages in the installation. Authors * expose the Symphony Authors that are registered as users of the backend. Finally, * the Dynamic XML datasource allows XML pages to be retrieved. This is especially * helpful for working with Restful XML API's. Datasources are saved through the * Symphony backend, which uses a Datasource template defined in * `TEMPLATE . /datasource.tpl`. */ class DataSource { /** * A constant that represents if this filter is an AND filter in which * an Entry must match all these filters. This filter is triggered when * the filter string contains a ` + `. * * @since Symphony 2.3.2 * @var integer */ const FILTER_AND = 1; /** * A constant that represents if this filter is an OR filter in which an * entry can match any or all of these filters * * @since Symphony 2.3.2 * @var integer */ const FILTER_OR = 2; /** * Holds all the environment variables which include parameters set by * other Datasources or Events. * @var array */ protected $_env = array(); /** * If true, this datasource only will be outputting parameters from the * Entries, and no actual content. * @var boolean */ protected $_param_output_only; /** * An array of datasource dependancies. These are datasources that must * run first for this datasource to be able to execute correctly * @var array */ protected $_dependencies = array(); /** * When there is no entries found by the Datasource, this parameter will * be set to true, which will inject the default Symphony 'No records found' * message into the datasource's result * @var boolean */ protected $_force_empty_result = false; /** * When there is a negating parameter, this parameter will * be set to true, which will inject the default Symphony 'Results Negated' * message into the datasource's result * @var boolean */ protected $_negate_result = false; /** * Constructor for the datasource sets the parent, if `$process_params` is set, * the `$env` variable will be run through `Datasource::processParameters`. * * @see toolkit.Datasource#processParameters() * @param array $env * The environment variables from the Frontend class which includes * any params set by Symphony or Events or by other Datasources * @param boolean $process_params * If set to true, `Datasource::processParameters` will be called. By default * this is true * @throws FrontendPageNotFoundException */ public function __construct(array $env = null, $process_params = true) { // Support old the __construct (for the moment anyway). // The old signature was array/array/boolean // The new signature is array/boolean $arguments = func_get_args(); if (count($arguments) == 3 && is_bool($arguments[1]) && is_bool($arguments[2])) { $env = $arguments[0]; $process_params = $arguments[1]; } if ($process_params) { $this->processParameters($env); } } /** * This function is required in order to edit it in the datasource editor page. * Do not overload this function if you are creating a custom datasource. It is only * used by the datasource editor. If this is set to false, which is default, the * Datasource's `about()` information will be displayed. * * @return boolean * True if the Datasource can be edited, false otherwise. Defaults to false */ public function allowEditorToParse() { return false; } /** * This function is required in order to identify what section this Datasource is for. It * is used in the datasource editor. It must remain intact. Do not overload this function in * custom events. Other datasources may return a string here defining their datasource * type when they do not query a section. * * @return mixed */ public function getSource() { return null; } /** * Accessor function to return this Datasource's dependencies * * @return array */ public function getDependencies() { return $this->_dependencies; } /** * Returns an associative array of information about a datasource. * * @return array */ public function about() { return array(); } /** * @deprecated This function has been renamed to `execute` as of * Symphony 2.3.1, please use `execute()` instead. This function will * be removed in Symphony 2.5 * @see execute() */ public function grab(array &$param_pool = null) { return $this->execute($param_pool); } /** * The meat of the Datasource, this function includes the datasource * type's file that will preform the logic to return the data for this datasource * It is passed the current parameters. * * @param array $param_pool * The current parameter pool that this Datasource can use when filtering * and finding Entries or data. * @return XMLElement * The XMLElement to add into the XML for a page. */ public function execute(array &$param_pool = null) { $result = new XMLElement($this->dsParamROOTELEMENT); try { $result = $this->execute($param_pool); } catch (FrontendPageNotFoundException $e) { // Work around. This ensures the 404 page is displayed and // is not picked up by the default catch() statement below FrontendPageNotFoundExceptionHandler::render($e); } catch (Exception $e) { $result->appendChild(new XMLElement('error', $e->getMessage())); return $result; } if ($this->_force_empty_result) { $result = $this->emptyXMLSet(); } if ($this->_negate_result) { $result = $this->negateXMLSet(); } return $result; } /** * By default, all Symphony filters are considering to be AND filters, that is * they are all used and Entries must match each filter to be included. It is * possible to use OR filtering in a field by using an + to separate the values. * eg. If the filter is test1 + test2, this will match any entries where this field * is test1 OR test2. This function is run on each filter (ie. each field) in a * datasource * * @param string $value * The filter string for a field. * @return integer * DataSource::FILTER_OR or DataSource::FILTER_AND */ public function __determineFilterType($value) { return (preg_match('/\s+\+\s+/', $value) ? DataSource::FILTER_AND : DataSource::FILTER_OR); } /** * If there is no results to return this function calls `Datasource::__noRecordsFound` * which appends an XMLElement to the current root element. * * @param XMLElement $xml * The root element XMLElement for this datasource. By default, this will * the handle of the datasource, as defined by `$this->dsParamROOTELEMENT` * @return XMLElement */ public function emptyXMLSet(XMLElement $xml = null) { if (is_null($xml)) { $xml = new XMLElement($this->dsParamROOTELEMENT); } $xml->appendChild($this->__noRecordsFound()); return $xml; } /** * If the datasource has been negated this function calls `Datasource::__negateResult` * which appends an XMLElement to the current root element. * * @param XMLElement $xml * The root element XMLElement for this datasource. By default, this will * the handle of the datasource, as defined by `$this->dsParamROOTELEMENT` * @return XMLElement */ public function negateXMLSet(XMLElement $xml = null) { if (is_null($xml)) { $xml = new XMLElement($this->dsParamROOTELEMENT); } $xml->appendChild($this->__negateResult()); return $xml; } /** * Returns an error XMLElement with 'No records found' text * * @return XMLElement */ public function __noRecordsFound() { return new XMLElement('error', __('No records found.')); } /** * Returns an error XMLElement with 'Result Negated' text * * @return XMLElement */ public function __negateResult() { $error = new XMLElement('error', __(""Data source not executed, forbidden parameter was found.""), array( 'forbidden-param' => $this->dsParamNEGATEPARAM )); return $error; } /** * This function will iterates over the filters and replace any parameters with their * actual values. All other Datasource variables such as sorting, ordering and * pagination variables are also set by this function * * @param array $env * The environment variables from the Frontend class which includes * any params set by Symphony or Events or by other Datasources * @throws FrontendPageNotFoundException */ public function processParameters(array $env = null) { if ($env) { $this->_env = $env; } if ((isset($this->_env) && is_array($this->_env)) && isset($this->dsParamFILTERS) && is_array($this->dsParamFILTERS) && !empty($this->dsParamFILTERS)) { foreach ($this->dsParamFILTERS as $key => $value) { $value = stripslashes($value); $new_value = $this->__processParametersInString($value, $this->_env); // If a filter gets evaluated to nothing, eg. ` + ` or ``, then remove // the filter. RE: #1759 if (strlen(trim($new_value)) == 0 || !preg_match('/\w+/', $new_value)) { unset($this->dsParamFILTERS[$key]); } else { $this->dsParamFILTERS[$key] = $new_value; } } } if (isset($this->dsParamORDER)) { $this->dsParamORDER = $this->__processParametersInString($this->dsParamORDER, $this->_env); } if (isset($this->dsParamSORT)) { $this->dsParamSORT = $this->__processParametersInString($this->dsParamSORT, $this->_env); } if (isset($this->dsParamSTARTPAGE)) { $this->dsParamSTARTPAGE = $this->__processParametersInString($this->dsParamSTARTPAGE, $this->_env); if ($this->dsParamSTARTPAGE == '') { $this->dsParamSTARTPAGE = '1'; } } if (isset($this->dsParamLIMIT)) { $this->dsParamLIMIT = $this->__processParametersInString($this->dsParamLIMIT, $this->_env); } if ( isset($this->dsParamREQUIREDPARAM) && strlen(trim($this->dsParamREQUIREDPARAM)) > 0 && $this->__processParametersInString(trim($this->dsParamREQUIREDPARAM), $this->_env, false) == '' ) { $this->_force_empty_result = true; // don't output any XML $this->dsParamPARAMOUTPUT = null; // don't output any parameters $this->dsParamINCLUDEDELEMENTS = null; // don't query any fields in this section return; } if ( isset($this->dsParamNEGATEPARAM) && strlen(trim($this->dsParamNEGATEPARAM)) > 0 && $this->__processParametersInString(trim($this->dsParamNEGATEPARAM), $this->_env, false) != '' ) { $this->_negate_result = true; // don't output any XML $this->dsParamPARAMOUTPUT = null; // don't output any parameters $this->dsParamINCLUDEDELEMENTS = null; // don't query any fields in this section return; } $this->_param_output_only = ((!isset($this->dsParamINCLUDEDELEMENTS) || !is_array($this->dsParamINCLUDEDELEMENTS) || empty($this->dsParamINCLUDEDELEMENTS)) && !isset($this->dsParamGROUP)); if (isset($this->dsParamREDIRECTONEMPTY) && $this->dsParamREDIRECTONEMPTY == 'yes' && $this->_force_empty_result) { throw new FrontendPageNotFoundException; } } /** * This function will parse a string (usually a URL) and fully evaluate any * parameters (defined by {$param}) to return the absolute string value. * * @since Symphony 2.3 * @param string $url * The string (usually a URL) that contains the parameters (or doesn't) * @return string * The parsed URL */ public function parseParamURL($url = null) { if (!isset($url)) { return null; } // urlencode parameters $params = array(); if (preg_match_all('@{([^}]+)}@i', $url, $matches, PREG_SET_ORDER)) { foreach ($matches as $m) { $params[$m[1]] = array( 'param' => preg_replace('/:encoded$/', null, $m[1]), 'encode' => preg_match('/:encoded$/', $m[1]) ); } } foreach ($params as $key => $info) { $replacement = $this->__processParametersInString($info['param'], $this->_env, false); if ($info['encode'] == true) { $replacement = urlencode($replacement); } $url = str_replace(""{{$key}}"", $replacement, $url); } return $url; } /** * This function will replace any parameters in a string with their value. * Parameters are defined by being prefixed by a `$` character. In certain * situations, the parameter will be surrounded by `{}`, which Symphony * takes to mean, evaluate this parameter to a value, other times it will be * omitted which is usually used to indicate that this parameter exists * * @param string $value * The string with the parameters that need to be evaluated * @param array $env * The environment variables from the Frontend class which includes * any params set by Symphony or Events or by other Datasources * @param boolean $includeParenthesis * Parameters will sometimes not be surrounded by `{}`. If this is the case * setting this parameter to false will make this function automatically add * them to the parameter. By default this is true, which means all parameters * in the string already are surrounded by `{}` * @param boolean $escape * If set to true, the resulting value will passed through `urlencode` before * being returned. By default this is `false` * @return string * The string with all parameters evaluated. If a parameter is not found, it will * not be replaced and remain in the `$value`. */ public function __processParametersInString($value, array $env, $includeParenthesis = true, $escape = false) { if (trim($value) == '') { return null; } if (!$includeParenthesis) { $value = '{'.$value.'}'; } if (preg_match_all('@{([^}]+)}@i', $value, $matches, PREG_SET_ORDER)) { foreach ($matches as $match) { list($source, $cleaned) = $match; $replacement = null; $bits = preg_split('/:/', $cleaned, -1, PREG_SPLIT_NO_EMPTY); foreach ($bits as $param) { if ($param{0} != '$') { $replacement = $param; break; } $param = trim($param, '$'); $replacement = Datasource::findParameterInEnv($param, $env); if (is_array($replacement)) { $replacement = array_map(array('Datasource', 'escapeCommas'), $replacement); if (count($replacement) > 1) { $replacement = implode(',', $replacement); } else { $replacement = end($replacement); } } if (!empty($replacement)) { break; } } if ($escape == true) { $replacement = urlencode($replacement); } $value = str_replace($source, $replacement, $value); } } return $value; } /** * Using regexp, this escapes any commas in the given string * * @param string $string * The string to escape the commas in * @return string */ public static function escapeCommas($string) { return preg_replace('/(?zchinese: Not compatible 👼

        « Up

        zchinese 8.9.0 Not compatible 👼

        📅 (2022-02-15 19:37:57 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-threads        base
        base-unix           base
        camlp5              7.14        Preprocessor-pretty-printer of OCaml
        conf-findutils      1           Virtual package relying on findutils
        conf-perl           2           Virtual package relying on perl
        coq                 8.7.1+1     Formal proof management system
        num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.06.1      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.06.1      Official 4.06.1 release
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.9.3       A library manager for OCaml
        # opam file:
        opam-version: "2.0"
        maintainer: "Hugo.Herbelin@inria.fr"
        homepage: "https://github.com/coq-contribs/zchinese"
        license: "Unknown"
        build: [make "-j%{jobs}%"]
        install: [make "install"]
        remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ZChinese"]
        depends: [
          "ocaml"
          "coq" {>= "8.9" & < "8.10~"}
        ]
        tags: [
          "keyword: number theory"
          "keyword: chinese remainder"
          "keyword: primality"
          "keyword: prime numbers"
          "category: Mathematics/Arithmetic and Number Theory/Number theory"
          "category: Miscellaneous/Extracted Programs/Arithmetic"
        ]
        authors: [
          "Valérie Ménissier-Morain"
        ]
        bug-reports: "https://github.com/coq-contribs/zchinese/issues"
        dev-repo: "git+https://github.com/coq-contribs/zchinese.git"
        synopsis: "A proof of the Chinese Remainder Lemma"
        description: """
        This is a rewriting of the contribution chinese-lemma using Zarith"""
        flags: light-uninstall
        url {
          src: "https://github.com/coq-contribs/zchinese/archive/v8.9.0.tar.gz"
          checksum: "md5=a5fddf5409ff7b7053a84bbf9491b8fc"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-zchinese.8.9.0 coq.8.7.1+1
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.7.1+1).
        The following dependencies couldn't be met:
          - coq-zchinese -> coq >= 8.9
        Your request can't be satisfied:
          - No available version of coq satisfies the constraints
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-zchinese.8.9.0
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "w3.org/1999/xhtml""> Search — Paver 1.2.1 documentation

        Search

        Please activate JavaScript to enable the search functionality.

        From here you can search these documents. Enter your search words into the box below and click ""search"". Note that the search function will automatically search for all of the words. Pages containing fewer words won't appear in the result list.

        © Copyright 2008, SitePen, Inc.. Last updated on Jun 02, 2013. Created using Sphinx 1.2b1.
        ",0 " processor for the stream sources, containing a SourceOperator. * * @param The type of source data. */ public class SourceProcessor extends StreamProcessor> { public SourceProcessor(SourceOperator operator) { super(operator); } @Override public void process(Record record) { throw new UnsupportedOperationException(""SourceProcessor should not process record""); } public void fetch() { operator.fetch(); } @Override public void close() {} } ",0 "***********************************/ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * * Neither the name of VMware, Inc. nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ #include #include /* This is a tool whose sole purpose is to provide an in-memory image * of an initialized dynamorio.dll, so we can query it with a debugger. * * If you launch this executable through a debugger, use -debugbreak; * otherwise, use -loop and then attach. * * example usage: * ./cdb -g -c ""ln 7004e660; ln 77f830e7; q"" c:\\derek\\dr\\tools\\DRload.exe -debugbreak c:\\derek\\dr\\builds\\11087\\exports\\x86_win32_rel\\dynamorio.dll | grep '|' * => * (7004deb8) dynamorio!shared_code+0x7a8 | (7004edc4) dynamorio!features * (77f830c2) ntdll!RtlIsDosDeviceName_U+0x25 | (77faebf2) ntdll!RtlpAllocateHeapUsageEntry */ typedef int (*int_func_t) (); typedef void (*void_func_t) (); int usage(char *exec) { fprintf(stderr, ""Usage: %s [-help] [-debugbreak] [-loop] [-key] [-no_init]\n"" "" [-call_to_offset ] [-find_safe_offset] [-no_resolve]\n"" "" [-map ] [-base ] \n"", exec); return 1; } int help(char *exec) { usage(exec); fprintf(stderr, "" -help : print this message\n""); fprintf(stderr, "" -debugbreak : for launching under a debugger, trigger a "" ""debugbreak once dll is loaded\n""); fprintf(stderr, "" -loop : for attaching a debugger, loop infinitely once dll is"" "" loaded\n""); fprintf(stderr, "" -key : for attaching a debugger, wait for keypress once dll is"" "" loaded\n""); fprintf(stderr, "" -no_init : don't call dynamorio init function after dll is"" "" loaded (use for non-dr dll)\n""); fprintf(stderr, "" -call_to_offset : once dll is loaded call this "" ""offset to the dll base""); fprintf(stderr, "" -find_safe_offset : if -call_to_offset is set, finds the first"" ""return instr in\n the same mem region as the supplied offset and calls"" ""it instead.""); fprintf(stderr, "" -no_resolve : pass DONT_RESOLVE_DLL_REFERENCES to the ldr when"" "" loading the dll\n (prevents dependent dlls from being loaded)\n""); fprintf(stderr, "" -map : map filename at address\n""); fprintf(stderr, "" -base
        : maps dynamorio.dll at address\n""); fprintf(stderr, "" -preferred : makes -base usable for other dlls\n""); fprintf(stderr, "" : path to dll to load\n""); return 0; } int map_file(const char *filename, void *addr, int image) { HANDLE map; PBYTE view; /* Must specify FILE_SHARE_READ to open if -persist_lock_file is in use */ HANDLE file = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (file == NULL) { int err = GetLastError(); printf(""Error %d opening %s\n"", err, filename); return 0; } /* FIXME: to map as image also need to adjust file and mapping to be executable */ map = CreateFileMapping(file, NULL, image ? SEC_IMAGE : PAGE_READONLY, 0, 0, NULL); if (map == NULL) { int err = GetLastError(); CloseHandle(file); printf(""Error %d mapping %s\n"", err, filename); return 0; } view = MapViewOfFileEx(map, FILE_MAP_READ, 0, 0, 0, addr); if (view == NULL) { int err = GetLastError(); CloseHandle(map); CloseHandle(file); printf(""Error %d mapping view of %s\n"", err, filename); return 0; } return 1; } int main(int argc, char *argv[]) { char *DRpath; HANDLE dll; int_func_t init_func; void_func_t take_over_func; int res = 0; BOOL debugbreak = FALSE; BOOL infinite = FALSE; BOOL keypress = FALSE; BOOL initialize_dr = TRUE; BOOL use_dont_resolve = FALSE; int arg_offs = 1; void *force_base = NULL; void *preferred_base = NULL; int call_offset = -1; BOOL find_safe_offset = FALSE; /* Link user32.dll for easier running under dr */ do { if (argc > 1000) MessageBeep(0); } while (0); if (argc < 2) return usage(argv[0]); while (argv[arg_offs][0] == '-') { if (strcmp(argv[arg_offs], ""-help"") == 0) { return help(argv[0]); } else if (strcmp(argv[arg_offs], ""-debugbreak"") == 0) { debugbreak = TRUE; arg_offs += 1; } else if (strcmp(argv[arg_offs], ""-loop"") == 0) { infinite = TRUE; arg_offs += 1; } else if (strcmp(argv[arg_offs], ""-key"") == 0) { keypress = TRUE; arg_offs += 1; } else if (strcmp(argv[arg_offs], ""-no_init"") == 0) { initialize_dr = FALSE; arg_offs += 1; } else if (strcmp(argv[arg_offs], ""-call_to_offset"") == 0) { int len; arg_offs += 1; if (argc - (arg_offs) < 1) return usage(argv[0]); len = sscanf(argv[arg_offs], ""%08x"", &call_offset); if (len != 1 || call_offset == -1) return usage(argv[0]); arg_offs += 1; } else if (strcmp(argv[arg_offs], ""-find_safe_offset"") == 0) { find_safe_offset = TRUE; arg_offs += 1; } else if (strcmp(argv[arg_offs], ""-no_resolve"") == 0) { use_dont_resolve = TRUE; arg_offs += 1; } else if (strcmp(argv[arg_offs], ""-map"") == 0) { void *addr = NULL; int len; arg_offs += 1; if (argc - (arg_offs+1) < 1) return usage(argv[0]); len = sscanf(argv[arg_offs+1], ""%08x"", &addr); if (len != 1 || addr == NULL) return usage(argv[0]); map_file(argv[arg_offs], addr, 0 /* mapped */); arg_offs += 2; } else if (strcmp(argv[arg_offs], ""-base"") == 0) { int len; arg_offs += 1; if (argc - (arg_offs) < 1) return usage(argv[0]); len = sscanf(argv[arg_offs], ""%08x"", &force_base); if (len != 1 || force_base == NULL) return usage(argv[0]); arg_offs += 1; } else if (strcmp(argv[arg_offs], ""-preferred"") == 0) { int len; arg_offs += 1; if (argc - (arg_offs) < 1) return usage(argv[0]); len = sscanf(argv[arg_offs], ""%08x"", &preferred_base); if (len != 1 || preferred_base == NULL) return usage(argv[0]); arg_offs += 1; } else return usage(argv[0]); if (argc - arg_offs < 1) return usage(argv[0]); } DRpath = argv[arg_offs]; if (force_base != NULL) { /* add load blocks at the expected base addresses */ void *base; if (preferred_base != NULL) base = preferred_base; else /* assume DR dll */ base = (void *)0x71000000; VirtualAllocEx(GetCurrentProcess(), base, 0x1000, MEM_RESERVE, PAGE_NOACCESS); if (preferred_base == NULL) { /* also do debug build base */ base = (void*)0x15000000; VirtualAllocEx(GetCurrentProcess(), base, 0x1000, MEM_RESERVE, PAGE_NOACCESS); } base = force_base; /* to ensure we fill all cavities we loop through */ while (base > (void*)0x10000) { base = (void*)((int)base - 0x10000); VirtualAllocEx(GetCurrentProcess(), base, 0x1000, MEM_RESERVE, PAGE_NOACCESS); } #if 0 map_file(DRpath, force_base, 1 /* image */); /* FIXME: note that the DLL will not be relocated! */ /* we can't really initialize */ #endif } if (use_dont_resolve) { dll = LoadLibraryExA(DRpath, NULL, DONT_RESOLVE_DLL_REFERENCES); } else { dll = LoadLibraryA(DRpath); } if (dll == NULL) { int err = GetLastError(); printf(""Error %d loading %s\n"", err, DRpath); return 1; } if (initialize_dr) { init_func = (int_func_t) GetProcAddress(dll, ""dynamorio_app_init""); take_over_func = (void_func_t) GetProcAddress(dll, ""dynamorio_app_take_over""); if (init_func == NULL || take_over_func == NULL) { printf(""Error finding DR init routines\n""); res = 1; goto done; } res = (*init_func)(); /* FIXME: ASSERT(res) */ (*take_over_func)(); res = 0; } if (call_offset != -1) { unsigned char *call_location = (char *)dll+call_offset; if (find_safe_offset) { MEMORY_BASIC_INFORMATION mbi; if (VirtualQuery(call_location, &mbi, sizeof(mbi)) != sizeof(mbi) || mbi.State == MEM_FREE || mbi.State == MEM_RESERVE) { printf(""Call offset invalid, leaving as is\n""); } else { /* find safe place to call, we just look for 0xc3 though could in theory * use other types of rets too */ unsigned char *test; for (test = call_location; test < (char *)mbi.BaseAddress+mbi.RegionSize; test++) { if (*test == 0xc3 /* plain ret */) { printf(""Found safe call target at offset 0x%08x\n"", test - (char *)dll); call_location = test; break; } } if (call_location != test) { printf(""Unable to find safe call target\n""); } } } printf(""Calling base(0x%08x) + offset(0x%08x) = 0x%08x\n"", dll, call_location-(char *)dll, call_location); (*(int (*) ())(call_location))(); } done: if (keypress) { printf(""press any key or attach a debugger...\n""); fflush(stdout); getchar(); } if (debugbreak) { __debugbreak(); } if (infinite) { while (1) ; } return res; } ",0 "copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\Filter; use Traversable; class StringToUpper extends AbstractUnicode { /** * @var array */ protected $options = array( 'encoding' => null, ); /** * Constructor * * @param string|array|Traversable $encodingOrOptions OPTIONAL */ public function __construct($encodingOrOptions = null) { if ($encodingOrOptions !== null) { if (!static::isOptions($encodingOrOptions)) { $this->setEncoding($encodingOrOptions); } else { $this->setOptions($encodingOrOptions); } } } /** * Defined by Zend\Filter\FilterInterface * * Returns the string $value, converting characters to uppercase as necessary * * If the value provided is non-scalar, the value will remain unfiltered * * @param string $value * @return string|mixed */ public function filter($value) { if (!is_scalar($value)) { return $value; } $value = (string) $value; if ($this->options['encoding'] !== null) { return mb_strtoupper($value, $this->options['encoding']); } return strtoupper($value); } } ",0 ". */ /* * Copyright 1999-2002,2004 The Apache Software Foundation. * * 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. */ package com.sun.org.apache.xerces.internal.impl.dv.util; /** * format validation * * This class encodes/decodes hexadecimal data * * @xerces.internal * * @author Jeffrey Rodriguez */ public final class HexBin { static private final int BASELENGTH = 128; static private final int LOOKUPLENGTH = 16; static final private byte [] hexNumberTable = new byte[BASELENGTH]; static final private char [] lookUpHexAlphabet = new char[LOOKUPLENGTH]; static { for (int i = 0; i < BASELENGTH; i++ ) { hexNumberTable[i] = -1; } for ( int i = '9'; i >= '0'; i--) { hexNumberTable[i] = (byte) (i-'0'); } for ( int i = 'F'; i>= 'A'; i--) { hexNumberTable[i] = (byte) ( i-'A' + 10 ); } for ( int i = 'f'; i>= 'a'; i--) { hexNumberTable[i] = (byte) ( i-'a' + 10 ); } for(int i = 0; i<10; i++ ) { lookUpHexAlphabet[i] = (char)('0'+i); } for(int i = 10; i<=15; i++ ) { lookUpHexAlphabet[i] = (char)('A'+i -10); } } /** * Encode a byte array to hex string * * @param binaryData array of byte to encode * @return return encoded string */ static public String encode(byte[] binaryData) { if (binaryData == null) return null; int lengthData = binaryData.length; int lengthEncode = lengthData * 2; char[] encodedData = new char[lengthEncode]; int temp; for (int i = 0; i < lengthData; i++) { temp = binaryData[i]; if (temp < 0) temp += 256; encodedData[i*2] = lookUpHexAlphabet[temp >> 4]; encodedData[i*2+1] = lookUpHexAlphabet[temp & 0xf]; } return new String(encodedData); } /** * Decode hex string to a byte array * * @param encoded encoded string * @return return array of byte to encode */ static public byte[] decode(String encoded) { if (encoded == null) return null; int lengthData = encoded.length(); if (lengthData % 2 != 0) return null; char[] binaryData = encoded.toCharArray(); int lengthDecode = lengthData / 2; byte[] decodedData = new byte[lengthDecode]; byte temp1, temp2; char tempChar; for( int i = 0; i adapter); // Writes info about paired Bluetooth devices on this system. void WriteBluetoothProto(metrics::SystemProfileProto* system_profile_proto); metrics::PerfProvider perf_provider_; // Bluetooth Adapter instance for collecting information about paired devices. scoped_refptr adapter_; // Whether the user count was registered at the last log initialization. bool registered_user_count_at_log_initialization_; // The user count at the time that a log was last initialized. Contains a // valid value only if |registered_user_count_at_log_initialization_| is // true. uint64 user_count_at_log_initialization_; // Hardware class (e.g., hardware qualification ID). This class identifies // the configured system components such as CPU, WiFi adapter, etc. std::string hardware_class_; base::WeakPtrFactory weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProvider); }; #endif // CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ ",0 "or modify it under * the terms of the GNU General Public License, either version 2 * of the License, or any later version. * * For the full copyright and license information, please read the * LICENSE.txt file that was distributed with this source code. * * The TYPO3 project - inspiring people to share! */ /** * Abstract implementation of a log writer * * @author Ingo Renner */ abstract class AbstractWriter implements \TYPO3\CMS\Core\Log\Writer\WriterInterface { /** * Constructs this log writer * * @param array $options Configuration options - depends on the actual log writer * @throws \InvalidArgumentException */ public function __construct(array $options = array()) { foreach ($options as $optionKey => $optionValue) { $methodName = 'set' . ucfirst($optionKey); if (method_exists($this, $methodName)) { $this->{$methodName}($optionValue); } else { throw new \InvalidArgumentException('Invalid log writer option ""' . $optionKey . '"" for log writer of type ""' . get_class($this) . '""', 1321696152); } } } } ",0 "=device-width, initial-scale=1.0"">
        ",0 "m / Lightning MultiCom SA - and its licensors, all rights reserved * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2 */ /** * WARNING: * Do not make changes to this file as it will be over-written when you upgrade CB. * To localize you need to create your own CB language plugin and make changes there. */ defined('CBLIB') or die(); return array( // 66 language strings from file plug_cbconditional/cbconditional.xml 'TAB_CONDITION_PREFERENCES_21582b' => 'Tab condition preferences', 'SELECT_CONDITIONAL_DISPLAY_FOR_THIS_TAB_244679' => 'Select conditional display for this tab.', 'NORMAL_CB_SETTINGS_a0f77c' => 'Normal CB settings', 'TAB_CONDITIONAL_46ba5c' => 'Tab conditional', 'IF_bfa9de' => 'If...', 'SELECT_FIELD_TO_MATCH_VALUE_AGAINST_IN_DETERMINING_c94841' => 'Select field to match value against in determining this tabs display.', 'FIELD_6f16a5' => 'Field', 'VALUE_689202' => 'Value', 'VIEW_ACCESS_LEVELS_c06927' => 'View Access Levels', 'USERGROUPS_6ad0aa' => 'Usergroups', 'FIELDS_a4ca5e' => 'Fields', 'VALUE_f14e9e' => 'Value...', 'INPUT_SUBSTITUTION_SUPPORTED_VALUE_TO_MATCH_AGAINS_4be26b' => 'Input substitution supported value to match against. In addition to user substitutions you can access $_REQUEST, $_GET, and $_POST substitutions as [request_VARIABLE],[post_VARIABLE], and [get_VARIABLE] (e.g. [get_task]).', 'ENABLE_OR_DISABLE_TRANSLATION_OF_LANGUAGE_STRINGS__8263a9' => 'Enable or disable translation of language strings in value.', 'TRANSLATE_VALUE_22a4e1' => 'Translate Value', 'HAS_7bac0f' => 'Has...', 'SELECT_THE_VIEW_ACCESS_LEVELS_TO_MATCH_AGAINST_THE_1c9be8' => 'Select the view access levels to match against the user. The user only needs to have one of the selected view access levels to match.', 'SELECT_THE_USERGROUPS_TO_MATCH_AGAINST_THE_USER_TH_dc4e06' => 'Select the usergroups to match against the user. The user only needs to have one of the selected usergroups to match.', 'IS_9149c7' => 'Is...', 'SELECT_OPERATOR_TO_COMPARE_FIELD_VALUE_AGAINST_INP_43ce0f' => 'Select operator to compare field value against input value.', 'OPERATOR_e1b3ec' => 'Operator', 'EQUAL_TO_c1d440' => 'Equal To', 'NOT_EQUAL_TO_9ac8c0' => 'Not Equal To', 'GREATER_THAN_728845' => 'Greater Than', 'LESS_THAN_45ed1c' => 'Less Than', 'GREATER_THAN_OR_EQUAL_TO_93301c' => 'Greater Than or Equal To', 'LESS_THAN_OR_EQUAL_TO_3181f2' => 'Less Than or Equal To', 'EMPTY_ce2c8a' => 'Empty', 'NOT_EMPTY_f49248' => 'Not Empty', 'DOES_CONTAIN_396955' => 'Does Contain', 'DOES_NOT_CONTAIN_ef739c' => 'Does Not Contain', 'IS_REGEX_44846d' => 'Is REGEX', 'IS_NOT_REGEX_4bddfd' => 'Is Not REGEX', 'TO_4a384a' => 'To...', 'INPUT_SUBSTITUTION_SUPPORTED_VALUE_TO_MATCH_AGAINS_07c86e' => 'Input substitution supported value to match against field value. In addition to user substitutions you can access $_REQUEST, $_GET, and $_POST substitutions as [request_VARIABLE],[post_VARIABLE], and [get_VARIABLE] (e.g. [get_task]).', 'THEN_c1325f' => 'Then...', 'SELECT_HOW_TO_HANDLE_THIS_TABS_DISPLAY_BASED_ON_FI_ff33e1' => 'Select how to handle this tabs display based on field value match.', 'FOR_0ba2b3' => 'For...', 'ENABLE_OR_DISABLE_CONDITIONAL_USAGE_ON_REGISTRATIO_cb622e' => 'Enable or disable conditional usage on registration.', 'REGISTRATION_0f98b7' => 'Registration', 'ENABLE_OR_DISABLE_CONDITIONAL_USAGE_ON_PROFILE_EDI_5bfd08' => 'Enable or disable conditional usage on profile edit.', 'PROFILE_EDIT_24f0eb' => 'Profile Edit', 'ENABLE_OR_DISABLE_CONDITIONAL_USAGE_ON_PROFILE_VIE_b815a1' => 'Enable or disable conditional usage on profile view.', 'PROFILE_VIEW_307f0e' => 'Profile View', 'FIELD_CONDITION_PREFERENCES_757bb6' => 'Field condition preferences', 'SELECT_CONDITIONAL_DISPLAY_FOR_THIS_FIELD_329dc4' => 'Select conditional display for this field.', 'FIELD_CONDITIONAL_OTHERS_453f6f' => 'Field conditional others', 'FIELD_CONDITIONAL_SELF_281138' => 'Field conditional self', 'SELECT_FIELD_TO_MATCH_VALUE_AGAINST_IN_DETERMINING_7d601b' => 'Select field to match value against in determining this fields display.', 'SELECT_FIELD_24af14' => '--- Select Field ---', 'SELECT_FIELDS_TO_SHOW_IF_VALUE_IS_MATCHED_f63533' => 'Select fields to show if value is matched.', 'SELECT_FIELDS_5be58c' => '--- Select Fields ---', 'SELECT_FIELDS_TO_HIDE_IF_VALUE_IS_MATCHED_e0a204' => 'Select fields to hide if value is matched.', 'FIELD_OPTIONS_9b3c51' => 'Field Options', 'SELECT_FIELD_OPTIONS_TO_SHOW_IF_VALUE_IS_MATCHED_459bc1' => 'Select field options to show if value is matched.', 'SELECT_FIELD_OPTIONS_837903' => '--- Select Field Options ---', 'SELECT_FIELD_OPTIONS_TO_HIDE_IF_VALUE_IS_MATCHED_01f5ab' => 'Select field options to hide if value is matched.', 'SELECT_HOW_TO_HANDLE_THIS_FIELDS_DISPLAY_BASED_ON__32d89f' => 'Select how to handle this fields display based on field value match.', 'ENABLE_OR_DISABLE_CONDITIONAL_USAGE_ON_USERLISTS_S_15983a' => 'Enable or disable conditional usage on userlists searching.', 'USERLISTS_SEARCH_fad6c1' => 'Userlists Search', 'ENABLE_OR_DISABLE_CONDITIONAL_USAGE_ON_USERLISTS_V_a02f8c' => 'Enable or disable conditional usage on userlists view.', 'USERLISTS_VIEW_72449c' => 'Userlists View', 'ENABLE_OR_DISABLE_USAGE_OF_CONDITIONS_IN_BACKEND_0b15b5' => 'Enable or disable usage of conditions in Backend.', 'BACKEND_2e427c' => 'Backend', 'ENABLE_OR_DISABLE_RESET_OF_FIELD_VALUES_TO_BLANK_I_278676' => 'Enable or disable reset of field values to blank if condition is not met.', 'RESET_526d68' => 'Reset', ); ",0 "mation, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace ApiPlatform\Doctrine\Odm\Filter; use ApiPlatform\Doctrine\Common\PropertyHelperTrait; use ApiPlatform\Doctrine\Odm\PropertyHelperTrait as MongoDbOdmPropertyHelperTrait; use Doctrine\ODM\MongoDB\Aggregation\Builder; use Doctrine\Persistence\ManagerRegistry; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; /** * {@inheritdoc} * * Abstract class for easing the implementation of a filter. * * @experimental * * @author Alan Poulain */ abstract class AbstractFilter implements FilterInterface { use MongoDbOdmPropertyHelperTrait; use PropertyHelperTrait; protected $managerRegistry; protected $logger; protected $properties; protected $nameConverter; public function __construct(ManagerRegistry $managerRegistry, LoggerInterface $logger = null, array $properties = null, NameConverterInterface $nameConverter = null) { $this->managerRegistry = $managerRegistry; $this->logger = $logger ?? new NullLogger(); $this->properties = $properties; $this->nameConverter = $nameConverter; } /** * {@inheritdoc} */ public function apply(Builder $aggregationBuilder, string $resourceClass, string $operationName = null, array &$context = []) { foreach ($context['filters'] as $property => $value) { $this->filterProperty($this->denormalizePropertyName($property), $value, $aggregationBuilder, $resourceClass, $operationName, $context); } } /** * Passes a property through the filter. * * @param mixed $value */ abstract protected function filterProperty(string $property, $value, Builder $aggregationBuilder, string $resourceClass, string $operationName = null, array &$context = []); protected function getManagerRegistry(): ManagerRegistry { return $this->managerRegistry; } protected function getProperties(): ?array { return $this->properties; } protected function getLogger(): LoggerInterface { return $this->logger; } /** * Determines whether the given property is enabled. */ protected function isPropertyEnabled(string $property, string $resourceClass): bool { if (null === $this->properties) { // to ensure sanity, nested properties must still be explicitly enabled return !$this->isPropertyNested($property, $resourceClass); } return \array_key_exists($property, $this->properties); } protected function denormalizePropertyName($property) { if (!$this->nameConverter instanceof NameConverterInterface) { return $property; } return implode('.', array_map([$this->nameConverter, 'denormalize'], explode('.', (string) $property))); } protected function normalizePropertyName($property) { if (!$this->nameConverter instanceof NameConverterInterface) { return $property; } return implode('.', array_map([$this->nameConverter, 'normalize'], explode('.', (string) $property))); } } ",0 ") { Thread t1 = new Thread(new SleepRunner()); Thread t2 = new Thread(new SleepRunner1()); t1.start(); t2.start(); } } class SleepRunner implements Runnable { public void run() { try { Thread.sleep(1); } catch (InterruptedException e) { throw new RuntimeException(e); } for (int i = 0; i < 1000; ++i) System.out.println(""Sleep "" + i); } } class SleepRunner1 implements Runnable { public void run() { for (int i = 0; i < 1000; ++i) System.out.println(""Normal "" + i); } }",0 "ou can get and set it's configuration, and * force it to sync immediately. Ta get an instance of the class for a given {@link TimeSync}, use * {@link TimeSync#get(android.content.Context, Class)}. */ public final class TimeSyncProxy { private Context context; private String name; private TimeSync listener; TimeSyncProxy(Context context, String name) { this.context = context; this.name = name; listener = TimeSyncParser.parseListeners(context).get(name); } /** * Syncs immediately. This is useful for a response to a user action. Use this sparingly, as * frequent syncs defeat the purpose of using this library. */ public void sync() { TimeSyncService.sync(context, name); } /** * Syncs sometime in the near future, randomizing per device. This is useful in response to a * server message, using GCM for example, so that the server is not overwhelmed with all devices * trying to sync at once. */ public void syncInexact() { TimeSyncService.syncInexact(context, name); } /** * Gets the current configuration for the {@link TimeSync}. * * @return the configuration * @see TimeSync.Config */ public TimeSync.Config config() { return listener.config(); } /** * Modifies the current configuration for the {@link TimeSync}. * * @param edits the edits * @see TimeSync#edit(TimeSync.Edit...) */ public void edit(Iterable edits) { listener.edit(edits); TimeSyncService.update(context, name); } /** * Modifies the current configuration for the {@link TimeSync}. * * @param edits the edits * @see TimeSync#edit(TimeSync.Edit...) */ public void edit(TimeSync.Edit... edits) { edit(Arrays.asList(edits)); } } ",0 "rg/1999/xhtml""> oRTP: /Users/huyheo/Documents/Linphone/linphone-iphone/submodules/linphone/oRTP/src Directory Reference
        src Directory Reference

        Files

        file  avprofile.c
         
        file  b64.c
         
        file  dll_entry.c
         
        file  event.c
         
        file  jitterctl.c
         
        file  jitterctl.h [code]
         
        file  logging.c
         
        file  netsim.c
         
        file  ortp-config-win32.h [code]
         
        file  ortp.c
         
        file  ortp_srtp.c
         
        file  payloadtype.c
         
        file  port.c
         
        file  posixtimer.c
         
        file  rtcp.c
         
        file  rtcpparse.c
         
        file  rtpparse.c
         
        file  rtpprofile.c
         
        file  rtpsession.c
         
        file  rtpsession_inet.c
         
        file  rtpsession_priv.h [code]
         
        file  rtpsignaltable.c
         
        file  rtptimer.c
         
        file  rtptimer.h [code]
         
        file  scheduler.c
         
        file  scheduler.h [code]
         
        file  sessionset.c
         
        file  str_utils.c
         
        file  stun.c
         
        file  stun_udp.c
         
        file  telephonyevents.c
         
        file  utils.c
         
        file  utils.h [code]
         
        file  winrttimer.h [code]
         
        file  zrtp.c
         

        Generated on Wed Jul 31 2013 14:43:09 for oRTP by   1.8.3.1
        ",0 " content=""text/html; charset=utf-8"">

        Blokada DNS 說明

        此內容已被移動。 您將會立刻被重新導向

        ",0 " Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #pragma once #if HAS_SPI_TFT || HAS_FSMC_TFT #error ""Sorry! TFT displays are not available for HAL/TEENSY35_36."" #endif ",0 "rg/1999/xhtml""> ToPS: tops::GeneralizedHiddenMarkovModel Class Reference
        tops::GeneralizedHiddenMarkovModel Class Reference

        This is a class representing Hidden semi-Markov Models. More...

        #include <GeneralizedHiddenMarkovModel.hpp>

        Inheritance diagram for tops::GeneralizedHiddenMarkovModel:

        List of all members.

        Public Member Functions

        virtual double forward (const Sequence &s, Matrix &alpha) const
         Forward algorithm.
        virtual double backward (const Sequence &s, Matrix &beta) const
         Backward algorithm.
        virtual double viterbi (const Sequence &s, Sequence &path, Matrix &gamma) const
         Viterbi algorithm.
        virtual void choosePath (const Sequence &s, Sequence &path)
         Choose a path given a sequence_length.
        virtual double _viterbi (const Sequence &s, Sequence &path, Matrix &gamma) const
         Inefficient Viterbi algorithm.
        virtual Sequence & chooseObservation (Sequence &h, int i, int state) const
         Choose the observation given a state.
        virtual int chooseState (int state) const
         Choose a state.
        virtual int chooseFirstState () const
         Choose the initial state.
        virtual DiscreteIIDModelPtr getInitialProbabilities () const
         Choose the initial state.
        virtual std::string getStateName (int state) const
         Get state name.
        virtual AlphabetPtr getStateNames () const
         Get the state names.
        virtual std::string model_name () const
         returns the model name
        virtual std::string str () const
         returns the string representation of the model

        Detailed Description

        This is a class representing Hidden semi-Markov Models.

        Definition at line 45 of file GeneralizedHiddenMarkovModel.hpp.


        The documentation for this class was generated from the following files:

        Generated on Thu Jun 28 2012 14:40:27 for ToPS by   1.8.0
        ",0 "y 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. */ namespace JMS\Serializer\Annotation; /** * @Annotation * @Target(""CLASS"") */ class Discriminator { /** @var array */ public $map; /** @var string */ public $field = 'type'; /** @var boolean */ public $disabled = false; /** @var boolean */ public $xmlAttribute = false; } ",0 "this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ #ifndef APACHE_HTRACE_HTABLE_H #define APACHE_HTRACE_HTABLE_H /** * @file htable.h * * Interfaces for a hash table that uses probing. * * This is an internal header, not intended for external use. */ #include #include #include #define HTABLE_MIN_SIZE 4 struct htable; /** * An HTable hash function. * * @param key The key. * @param capacity The total capacity. * * @return The hash slot. Must be less than the capacity. */ typedef uint32_t (*htable_hash_fn_t)(const void *key, uint32_t capacity); /** * An HTable equality function. Compares two keys. * * @param a First key. * @param b Second key. * * @return nonzero if the keys are equal. */ typedef int (*htable_eq_fn_t)(const void *a, const void *b); /** * Allocate a new hash table. * * @param capacity The minimum suggested starting capacity. * @param hash_fun The hash function to use in this hash table. * @param eq_fun The equals function to use in this hash table. * * @return The new hash table on success; NULL on OOM. */ struct htable *htable_alloc(uint32_t capacity, htable_hash_fn_t hash_fun, htable_eq_fn_t eq_fun); typedef void (*visitor_fn_t)(void *ctx, void *key, void *val); /** * Visit all of the entries in the hash table. * * @param htable The hash table. * @param fun The callback function to invoke on each key and value. * @param ctx Context pointer to pass to the callback. */ void htable_visit(struct htable *htable, visitor_fn_t fun, void *ctx); /** * Free the hash table. * * It is up the calling code to ensure that the keys and values inside the * table are de-allocated, if that is necessary. * * @param htable The hash table. */ void htable_free(struct htable *htable); /** * Add an entry to the hash table. * * @param htable The hash table. * @param key The key to add. This cannot be NULL. * @param fun The value to add. This cannot be NULL. * * @return 0 on success; * EINVAL if we're trying to insert a NULL key or value. * ENOMEM if there is not enough memory to add the element. * EFBIG if the hash table has too many entries to fit in 32 * bits. */ int htable_put(struct htable *htable, void *key, void *val); /** * Get an entry from the hash table. * * @param htable The hash table. * @param key The key to find. * * @return NULL if there is no such entry; the entry otherwise. */ void *htable_get(const struct htable *htable, const void *key); /** * Get an entry from the hash table and remove it. * * @param htable The hash table. * @param key The key for the entry find and remove. * @param found_key (out param) NULL if the entry was not found; the found key * otherwise. * @param found_val (out param) NULL if the entry was not found; the found * value otherwise. */ void htable_pop(struct htable *htable, const void *key, void **found_key, void **found_val); /** * Get the number of entries used in the hash table. * * @param htable The hash table. * * @return The number of entries used in the hash table. */ uint32_t htable_used(const struct htable *htable); /** * Get the capacity of the hash table. * * @param htable The hash table. * * @return The capacity of the hash table. */ uint32_t htable_capacity(const struct htable *htable); /** * Hash a string. * * @param str The string. * @param max Maximum hash value * * @return A number less than max. */ uint32_t ht_hash_string(const void *str, uint32_t max); /** * Compare two strings. * * @param a The first string. * @param b The second string. * * @return 1 if the strings are identical; 0 otherwise. */ int ht_compare_string(const void *a, const void *b); #endif // vim: ts=4:sw=4:tw=79:et ",0 "ne; import org.webbuilder.utils.script.engine.DynamicScriptEngineFactory; import org.webbuilder.utils.script.engine.ExecuteResult; import org.webbuilder.web.po.script.DynamicScript; import javax.annotation.Resource; import java.util.Map; /** * Created by 浩 on 2015-10-29 0029. */ @Service public class DynamicScriptExecutor { @Resource private DynamicScriptService dynamicScriptService; public ExecuteResult exec(String id, Map param) throws Exception { DynamicScript data = dynamicScriptService.selectByPk(id); if (data == null) { ExecuteResult result = new ExecuteResult(); result.setResult(String.format(""script %s not found!"", id)); result.setSuccess(false); return result; } DynamicScriptEngine engine = DynamicScriptEngineFactory.getEngine(data.getType()); return engine.execute(id, param); } } ",0 ".w3.org/1999/xhtml""> statsmodels.tsa.vector_ar.var_model.VARResults.pvalues — statsmodels 0.9.0 documentation

        statsmodels.tsa.vector_ar.var_model.VARResults.pvalues

        VARResults.pvalues()[source]

        Two-sided p-values for model coefficients from Student t-distribution

        © Copyright 2009-2017, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers. Created using Sphinx 1.7.4.
        ",0 " 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. */ package com.orientechnologies.orient.core.sql.method.misc; import com.orientechnologies.orient.core.command.OCommandContext; import com.orientechnologies.orient.core.db.record.OIdentifiable; /** * Returns the value's Java type. * * @author Luca Garulli */ public class OSQLMethodJavaType extends OAbstractSQLMethod { public static final String NAME = ""javatype""; public OSQLMethodJavaType() { super(NAME); } @Override public Object execute(Object iThis, OIdentifiable iCurrentRecord, OCommandContext iContext, Object ioResult, Object[] iParams) { if (ioResult == null) { return null; } return ioResult.getClass().getName(); } } ",0 "his work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.giraph.benchmark; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; import org.apache.commons.cli.PosixParser; import org.apache.giraph.GiraphConfiguration; import org.apache.giraph.examples.MinimumDoubleCombiner; import org.apache.giraph.graph.EdgeListVertex; import org.apache.giraph.graph.GiraphJob; import org.apache.giraph.io.PseudoRandomVertexInputFormat; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.DoubleWritable; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; import org.apache.log4j.Logger; import java.io.IOException; /** * Single-source shortest paths benchmark. */ public class ShortestPathsBenchmark implements Tool { /** Class logger */ private static final Logger LOG = Logger.getLogger(ShortestPathsBenchmark.class); /** Configuration */ private Configuration conf; /** * Vertex implementation */ public static class ShortestPathsBenchmarkVertex extends EdgeListVertex { @Override public void compute(Iterable messages) throws IOException { ShortestPathsComputation.computeShortestPaths(this, messages); } } @Override public Configuration getConf() { return conf; } @Override public void setConf(Configuration conf) { this.conf = conf; } @Override public final int run(final String[] args) throws Exception { Options options = new Options(); options.addOption(""h"", ""help"", false, ""Help""); options.addOption(""v"", ""verbose"", false, ""Verbose""); options.addOption(""w"", ""workers"", true, ""Number of workers""); options.addOption(""V"", ""aggregateVertices"", true, ""Aggregate vertices""); options.addOption(""e"", ""edgesPerVertex"", true, ""Edges per vertex""); options.addOption(""c"", ""vertexClass"", true, ""Vertex class (0 for HashMapVertex, 1 for EdgeListVertex)""); options.addOption(""nc"", ""noCombiner"", false, ""Don't use a combiner""); HelpFormatter formatter = new HelpFormatter(); if (args.length == 0) { formatter.printHelp(getClass().getName(), options, true); return 0; } CommandLineParser parser = new PosixParser(); CommandLine cmd = parser.parse(options, args); if (cmd.hasOption('h')) { formatter.printHelp(getClass().getName(), options, true); return 0; } if (!cmd.hasOption('w')) { LOG.info(""Need to choose the number of workers (-w)""); return -1; } if (!cmd.hasOption('V')) { LOG.info(""Need to set the aggregate vertices (-V)""); return -1; } if (!cmd.hasOption('e')) { LOG.info(""Need to set the number of edges "" + ""per vertex (-e)""); return -1; } int workers = Integer.parseInt(cmd.getOptionValue('w')); GiraphJob job = new GiraphJob(getConf(), getClass().getName()); if (!cmd.hasOption('c') || (Integer.parseInt(cmd.getOptionValue('c')) == 1)) { job.getConfiguration().setVertexClass(ShortestPathsBenchmarkVertex.class); } else { job.getConfiguration().setVertexClass( HashMapVertexShortestPathsBenchmark.class); } LOG.info(""Using class "" + job.getConfiguration().get(GiraphConfiguration.VERTEX_CLASS)); job.getConfiguration().setVertexInputFormatClass( PseudoRandomVertexInputFormat.class); if (!cmd.hasOption(""nc"")) { job.getConfiguration().setVertexCombinerClass( MinimumDoubleCombiner.class); } job.getConfiguration().setWorkerConfiguration(workers, workers, 100.0f); job.getConfiguration().setLong( PseudoRandomVertexInputFormat.AGGREGATE_VERTICES, Long.parseLong(cmd.getOptionValue('V'))); job.getConfiguration().setLong( PseudoRandomVertexInputFormat.EDGES_PER_VERTEX, Long.parseLong(cmd.getOptionValue('e'))); boolean isVerbose = false; if (cmd.hasOption('v')) { isVerbose = true; } if (job.run(isVerbose)) { return 0; } else { return -1; } } /** * Execute the benchmark. * * @param args Typically the command line arguments. * @throws Exception Any exception from the computation. */ public static void main(final String[] args) throws Exception { System.exit(ToolRunner.run(new ShortestPathsBenchmark(), args)); } } ",0 "oreThing\CommonMark\Strikethrough; use League\CommonMark\Delimiter\Delimiter; use League\CommonMark\Inline\Element\Text; use League\CommonMark\Inline\Parser\AbstractInlineParser; use League\CommonMark\InlineParserContext; use League\CommonMark\Util\RegexHelper; class StrikethroughParser extends AbstractInlineParser { /** * @return string[] */ public function getCharacters() { return ['~']; } /** * @param InlineParserContext $inlineContext * * @return bool */ public function parse(InlineParserContext $inlineContext) { $character = $inlineContext->getCursor()->getCharacter(); if ($character !== '~') { return false; } $numDelims = 0; $cursor = $inlineContext->getCursor(); $charBefore = $cursor->peek(-1); if ($charBefore === null) { $charBefore = ""\n""; } while ($cursor->peek($numDelims) === '~') { ++$numDelims; } // Skip single delims if ($numDelims === 1) { return false; } $cursor->advanceBy($numDelims); $charAfter = $cursor->getCharacter(); if ($charAfter === null) { $charAfter = ""\n""; } $afterIsWhitespace = preg_match('/\pZ|\s/u', $charAfter); $afterIsPunctuation = preg_match(RegexHelper::REGEX_PUNCTUATION, $charAfter); $beforeIsWhitespace = preg_match('/\pZ|\s/u', $charBefore); $beforeIsPunctuation = preg_match(RegexHelper::REGEX_PUNCTUATION, $charBefore); $leftFlanking = $numDelims > 0 && !$afterIsWhitespace && !($afterIsPunctuation && !$beforeIsWhitespace && !$beforeIsPunctuation); $rightFlanking = $numDelims > 0 && !$beforeIsWhitespace && !($beforeIsPunctuation && !$afterIsWhitespace && !$afterIsPunctuation); if ($character === '_') { $canOpen = $leftFlanking && (!$rightFlanking || $beforeIsPunctuation); $canClose = $rightFlanking && (!$leftFlanking || $afterIsPunctuation); } else { $canOpen = $leftFlanking; $canClose = $rightFlanking; } $node = new Text($cursor->getPreviousText(), [ 'delim' => true ]); $inlineContext->getContainer()->appendChild($node); // Add entry to stack to this opener $delimiter = new Delimiter($character, $numDelims, $node, $canOpen, $canClose); $inlineContext->getDelimiterStack()->push($delimiter); return true; } } ",0 "dblock %} {% block content %}
        {% if user_errors %}
        {{ user_errors }}
        {% elif profile_errors %}
        {{ profile_errors }}
        {% endif %}
        {% csrf_token %} Sign Up
        {% endblock %} ",0 "nsitional.dtd""> Docs for page Updated.php

        /Gdata/App/Extension/Updated.php

        Description
        Description | Classes | Includes

        Zend Framework

        LICENSE

        This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

        • version: $Id: Updated.php 20096 2010-01-06 02:05:09Z bkarwin $
        • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
        • license: New BSD License
        Classes
        Description | Classes | Includes
        Class Description
        Zend_Gdata_App_Extension_Updated Represents the atom:updated element
        Includes
        Description | Classes | Includes
        require_once ('Zend/Gdata/App/Extension.php') (line 27)

        Documentation generated on Wed, 25 Aug 2010 03:44:25 +0400 by phpDocumentor 1.4.2

        ",0 " {% raw %}

        L.mapbox.legendControl(options)

        Extends: L.Control

        A map control that shows legends added to maps in Mapbox. Legends are auto-detected from active layers.

        Options Value Description
        options optional object An options object. Beyond the default options for map controls, this object has one special parameter: sanitizer: A function that accepts a string, and returns a sanitized result for HTML display. The default will remove dangerous script content, and is recommended.

        Example:

        var map = L.mapbox.map('map').setView([38, -77], 5);
        map.addControl(L.mapbox.legendControl());
        

        Returns: a L.mapbox.legendControl object.

        legendControl.addLegend(legend)

        Adds a legend to the legendControl.

        Options Value Description
        legend required string A string which may contain HTML. It will be sanitized by the legendControl's sanitizer option.

        legendControl.removeLegend(legend)

        Removes a legend from the legendControl.

        Options Value Description
        legend required string legend data to remove.
        {% endraw %}",0 "ryClass=""Brasa\RecursoHumanoBundle\Repository\RhuProyeccionRepository"") */ class RhuProyeccion { /** * @ORM\Id * @ORM\Column(name=""codigo_proyeccion_pk"", type=""integer"") * @ORM\GeneratedValue(strategy=""AUTO"") */ private $codigoProyeccionPk; /** * @ORM\Column(name=""fecha_desde"", type=""date"", nullable=true) */ private $fechaDesde; /** * @ORM\Column(name=""fecha_hasta"", type=""date"", nullable=true) */ private $fechaHasta; /** * @ORM\Column(name=""codigo_empleado_fk"", type=""integer"", nullable=true) */ private $codigoEmpleadoFk; /** * @ORM\Column(name=""codigo_contrato_fk"", type=""integer"", nullable=true) */ private $codigoContratoFk; /** * @ORM\Column(name=""dias"", type=""integer"") */ private $dias = 0; /** * @ORM\Column(name=""dias_ausentismo"", type=""integer"") */ private $diasAusentismo = 0; /** * @ORM\Column(name=""vr_salario"", type=""float"") */ private $vrSalario = 0; /** * @ORM\Column(name=""vr_vacaciones"", type=""float"") */ private $vrVacaciones = 0; /** * @ORM\Column(name=""dias_prima"", type=""integer"") */ private $diasPrima = 0; /** * @ORM\Column(name=""fecha_desde_prima"", type=""date"", nullable=true) */ private $fechaDesdePrima; /** * @ORM\Column(name=""vr_primas"", type=""float"") */ private $vrPrimas = 0; /** * @ORM\Column(name=""vr_primas_real"", type=""float"") */ private $vrPrimasReal = 0; /** * @ORM\Column(name=""vr_salario_promedio_primas"", type=""float"") */ private $vrSalarioPromedioPrimas = 0; /** * @ORM\Column(name=""vr_salario_promedio_primas_real"", type=""float"") */ private $vrSalarioPromedioPrimasReal = 0; /** * @ORM\Column(name=""porcentaje_primas"", type=""float"") */ private $porcentajePrimas = 0; /** * @ORM\Column(name=""diferencia_primas"", type=""float"") */ private $vrDiferenciaPrimas = 0; /** * @ORM\Column(name=""dias_ausentismo_primas"", type=""integer"") */ private $diasAusentismoPrimas = 0; /** * @ORM\Column(name=""dias_cesantias"", type=""integer"") */ private $diasCesantias = 0; /** * @ORM\Column(name=""fecha_desde_cesantias"", type=""date"", nullable=true) */ private $fechaDesdeCesantias; /** * @ORM\Column(name=""vr_cesantias"", type=""float"") */ private $vrCesantias = 0; /** * @ORM\Column(name=""vr_cesantias_real"", type=""float"") */ private $vrCesantiasReal = 0; /** * @ORM\Column(name=""vr_intereses_cesantias"", type=""float"") */ private $vrInteresesCesantias = 0; /** * @ORM\Column(name=""vr_intereses_cesantias_real"", type=""float"") */ private $vrInteresesCesantiasReal = 0; /** * @ORM\Column(name=""vr_diferencia_intereses_cesantias"", type=""float"") */ private $vrDiferenciaInteresesCesantias = 0; /** * @ORM\Column(name=""vr_salario_promedio_cesantias"", type=""float"") */ private $vrSalarioPromedioCesantias = 0; /** * @ORM\Column(name=""vr_salario_promedio_cesantias_real"", type=""float"") */ private $vrSalarioPromedioCesantiasReal = 0; /** * @ORM\Column(name=""porcentaje_cesantias"", type=""float"") */ private $porcentajeCesantias = 0; /** * @ORM\Column(name=""diferencia_cesantias"", type=""float"") */ private $vrDiferenciaCesantias = 0; /** * @ORM\ManyToOne(targetEntity=""RhuEmpleado"", inversedBy=""proyeccionesEmpleadoRel"") * @ORM\JoinColumn(name=""codigo_empleado_fk"", referencedColumnName=""codigo_empleado_pk"") */ protected $empleadoRel; /** * @ORM\ManyToOne(targetEntity=""RhuContrato"", inversedBy=""proyeccionesContratoRel"") * @ORM\JoinColumn(name=""codigo_contrato_fk"", referencedColumnName=""codigo_contrato_pk"") */ protected $contratoRel; /** * Get codigoProyeccionPk * * @return integer */ public function getCodigoProyeccionPk() { return $this->codigoProyeccionPk; } /** * Set fechaDesde * * @param \DateTime $fechaDesde * * @return RhuProyeccion */ public function setFechaDesde($fechaDesde) { $this->fechaDesde = $fechaDesde; return $this; } /** * Get fechaDesde * * @return \DateTime */ public function getFechaDesde() { return $this->fechaDesde; } /** * Set fechaHasta * * @param \DateTime $fechaHasta * * @return RhuProyeccion */ public function setFechaHasta($fechaHasta) { $this->fechaHasta = $fechaHasta; return $this; } /** * Get fechaHasta * * @return \DateTime */ public function getFechaHasta() { return $this->fechaHasta; } /** * Set codigoEmpleadoFk * * @param integer $codigoEmpleadoFk * * @return RhuProyeccion */ public function setCodigoEmpleadoFk($codigoEmpleadoFk) { $this->codigoEmpleadoFk = $codigoEmpleadoFk; return $this; } /** * Get codigoEmpleadoFk * * @return integer */ public function getCodigoEmpleadoFk() { return $this->codigoEmpleadoFk; } /** * Set codigoContratoFk * * @param integer $codigoContratoFk * * @return RhuProyeccion */ public function setCodigoContratoFk($codigoContratoFk) { $this->codigoContratoFk = $codigoContratoFk; return $this; } /** * Get codigoContratoFk * * @return integer */ public function getCodigoContratoFk() { return $this->codigoContratoFk; } /** * Set dias * * @param integer $dias * * @return RhuProyeccion */ public function setDias($dias) { $this->dias = $dias; return $this; } /** * Get dias * * @return integer */ public function getDias() { return $this->dias; } /** * Set diasAusentismo * * @param integer $diasAusentismo * * @return RhuProyeccion */ public function setDiasAusentismo($diasAusentismo) { $this->diasAusentismo = $diasAusentismo; return $this; } /** * Get diasAusentismo * * @return integer */ public function getDiasAusentismo() { return $this->diasAusentismo; } /** * Set vrSalario * * @param float $vrSalario * * @return RhuProyeccion */ public function setVrSalario($vrSalario) { $this->vrSalario = $vrSalario; return $this; } /** * Get vrSalario * * @return float */ public function getVrSalario() { return $this->vrSalario; } /** * Set vrVacaciones * * @param float $vrVacaciones * * @return RhuProyeccion */ public function setVrVacaciones($vrVacaciones) { $this->vrVacaciones = $vrVacaciones; return $this; } /** * Get vrVacaciones * * @return float */ public function getVrVacaciones() { return $this->vrVacaciones; } /** * Set diasPrima * * @param integer $diasPrima * * @return RhuProyeccion */ public function setDiasPrima($diasPrima) { $this->diasPrima = $diasPrima; return $this; } /** * Get diasPrima * * @return integer */ public function getDiasPrima() { return $this->diasPrima; } /** * Set fechaDesdePrima * * @param \DateTime $fechaDesdePrima * * @return RhuProyeccion */ public function setFechaDesdePrima($fechaDesdePrima) { $this->fechaDesdePrima = $fechaDesdePrima; return $this; } /** * Get fechaDesdePrima * * @return \DateTime */ public function getFechaDesdePrima() { return $this->fechaDesdePrima; } /** * Set vrPrimas * * @param float $vrPrimas * * @return RhuProyeccion */ public function setVrPrimas($vrPrimas) { $this->vrPrimas = $vrPrimas; return $this; } /** * Get vrPrimas * * @return float */ public function getVrPrimas() { return $this->vrPrimas; } /** * Set vrSalarioPromedioPrimas * * @param float $vrSalarioPromedioPrimas * * @return RhuProyeccion */ public function setVrSalarioPromedioPrimas($vrSalarioPromedioPrimas) { $this->vrSalarioPromedioPrimas = $vrSalarioPromedioPrimas; return $this; } /** * Get vrSalarioPromedioPrimas * * @return float */ public function getVrSalarioPromedioPrimas() { return $this->vrSalarioPromedioPrimas; } /** * Set vrSalarioPromedioPrimasReal * * @param float $vrSalarioPromedioPrimasReal * * @return RhuProyeccion */ public function setVrSalarioPromedioPrimasReal($vrSalarioPromedioPrimasReal) { $this->vrSalarioPromedioPrimasReal = $vrSalarioPromedioPrimasReal; return $this; } /** * Get vrSalarioPromedioPrimasReal * * @return float */ public function getVrSalarioPromedioPrimasReal() { return $this->vrSalarioPromedioPrimasReal; } /** * Set porcentajePrimas * * @param float $porcentajePrimas * * @return RhuProyeccion */ public function setPorcentajePrimas($porcentajePrimas) { $this->porcentajePrimas = $porcentajePrimas; return $this; } /** * Get porcentajePrimas * * @return float */ public function getPorcentajePrimas() { return $this->porcentajePrimas; } /** * Set vrDiferenciaPrimas * * @param float $vrDiferenciaPrimas * * @return RhuProyeccion */ public function setVrDiferenciaPrimas($vrDiferenciaPrimas) { $this->vrDiferenciaPrimas = $vrDiferenciaPrimas; return $this; } /** * Get vrDiferenciaPrimas * * @return float */ public function getVrDiferenciaPrimas() { return $this->vrDiferenciaPrimas; } /** * Set diasCesantias * * @param integer $diasCesantias * * @return RhuProyeccion */ public function setDiasCesantias($diasCesantias) { $this->diasCesantias = $diasCesantias; return $this; } /** * Get diasCesantias * * @return integer */ public function getDiasCesantias() { return $this->diasCesantias; } /** * Set fechaDesdeCesantias * * @param \DateTime $fechaDesdeCesantias * * @return RhuProyeccion */ public function setFechaDesdeCesantias($fechaDesdeCesantias) { $this->fechaDesdeCesantias = $fechaDesdeCesantias; return $this; } /** * Get fechaDesdeCesantias * * @return \DateTime */ public function getFechaDesdeCesantias() { return $this->fechaDesdeCesantias; } /** * Set vrCesantias * * @param float $vrCesantias * * @return RhuProyeccion */ public function setVrCesantias($vrCesantias) { $this->vrCesantias = $vrCesantias; return $this; } /** * Get vrCesantias * * @return float */ public function getVrCesantias() { return $this->vrCesantias; } /** * Set vrInteresesCesantias * * @param float $vrInteresesCesantias * * @return RhuProyeccion */ public function setVrInteresesCesantias($vrInteresesCesantias) { $this->vrInteresesCesantias = $vrInteresesCesantias; return $this; } /** * Get vrInteresesCesantias * * @return float */ public function getVrInteresesCesantias() { return $this->vrInteresesCesantias; } /** * Set vrSalarioPromedioCesantias * * @param float $vrSalarioPromedioCesantias * * @return RhuProyeccion */ public function setVrSalarioPromedioCesantias($vrSalarioPromedioCesantias) { $this->vrSalarioPromedioCesantias = $vrSalarioPromedioCesantias; return $this; } /** * Get vrSalarioPromedioCesantias * * @return float */ public function getVrSalarioPromedioCesantias() { return $this->vrSalarioPromedioCesantias; } /** * Set vrSalarioPromedioCesantiasReal * * @param float $vrSalarioPromedioCesantiasReal * * @return RhuProyeccion */ public function setVrSalarioPromedioCesantiasReal($vrSalarioPromedioCesantiasReal) { $this->vrSalarioPromedioCesantiasReal = $vrSalarioPromedioCesantiasReal; return $this; } /** * Get vrSalarioPromedioCesantiasReal * * @return float */ public function getVrSalarioPromedioCesantiasReal() { return $this->vrSalarioPromedioCesantiasReal; } /** * Set porcentajeCesantias * * @param float $porcentajeCesantias * * @return RhuProyeccion */ public function setPorcentajeCesantias($porcentajeCesantias) { $this->porcentajeCesantias = $porcentajeCesantias; return $this; } /** * Get porcentajeCesantias * * @return float */ public function getPorcentajeCesantias() { return $this->porcentajeCesantias; } /** * Set vrDiferenciaCesantias * * @param float $vrDiferenciaCesantias * * @return RhuProyeccion */ public function setVrDiferenciaCesantias($vrDiferenciaCesantias) { $this->vrDiferenciaCesantias = $vrDiferenciaCesantias; return $this; } /** * Get vrDiferenciaCesantias * * @return float */ public function getVrDiferenciaCesantias() { return $this->vrDiferenciaCesantias; } /** * Set empleadoRel * * @param \Brasa\RecursoHumanoBundle\Entity\RhuEmpleado $empleadoRel * * @return RhuProyeccion */ public function setEmpleadoRel(\Brasa\RecursoHumanoBundle\Entity\RhuEmpleado $empleadoRel = null) { $this->empleadoRel = $empleadoRel; return $this; } /** * Get empleadoRel * * @return \Brasa\RecursoHumanoBundle\Entity\RhuEmpleado */ public function getEmpleadoRel() { return $this->empleadoRel; } /** * Set contratoRel * * @param \Brasa\RecursoHumanoBundle\Entity\RhuContrato $contratoRel * * @return RhuProyeccion */ public function setContratoRel(\Brasa\RecursoHumanoBundle\Entity\RhuContrato $contratoRel = null) { $this->contratoRel = $contratoRel; return $this; } /** * Get contratoRel * * @return \Brasa\RecursoHumanoBundle\Entity\RhuContrato */ public function getContratoRel() { return $this->contratoRel; } /** * Set vrPrimasReal * * @param float $vrPrimasReal * * @return RhuProyeccion */ public function setVrPrimasReal($vrPrimasReal) { $this->vrPrimasReal = $vrPrimasReal; return $this; } /** * Get vrPrimasReal * * @return float */ public function getVrPrimasReal() { return $this->vrPrimasReal; } /** * Set vrCesantiasReal * * @param float $vrCesantiasReal * * @return RhuProyeccion */ public function setVrCesantiasReal($vrCesantiasReal) { $this->vrCesantiasReal = $vrCesantiasReal; return $this; } /** * Get vrCesantiasReal * * @return float */ public function getVrCesantiasReal() { return $this->vrCesantiasReal; } /** * Set vrInteresesCesantiasReal * * @param float $vrInteresesCesantiasReal * * @return RhuProyeccion */ public function setVrInteresesCesantiasReal($vrInteresesCesantiasReal) { $this->vrInteresesCesantiasReal = $vrInteresesCesantiasReal; return $this; } /** * Get vrInteresesCesantiasReal * * @return float */ public function getVrInteresesCesantiasReal() { return $this->vrInteresesCesantiasReal; } /** * Set vrDiferenciaInteresesCesantias * * @param float $vrDiferenciaInteresesCesantias * * @return RhuProyeccion */ public function setVrDiferenciaInteresesCesantias($vrDiferenciaInteresesCesantias) { $this->vrDiferenciaInteresesCesantias = $vrDiferenciaInteresesCesantias; return $this; } /** * Get vrDiferenciaInteresesCesantias * * @return float */ public function getVrDiferenciaInteresesCesantias() { return $this->vrDiferenciaInteresesCesantias; } /** * Set diasAusentismoPrimas * * @param integer $diasAusentismoPrimas * * @return RhuProyeccion */ public function setDiasAusentismoPrimas($diasAusentismoPrimas) { $this->diasAusentismoPrimas = $diasAusentismoPrimas; return $this; } /** * Get diasAusentismoPrimas * * @return integer */ public function getDiasAusentismoPrimas() { return $this->diasAusentismoPrimas; } } ",0 "enerated by javadoc (1.8.0_151) on Tue Oct 30 00:52:57 MST 2018 --> LdapRealmSupplier (BOM: * : All 2.2.1.Final API)
        • Summary: 
        • Nested | 
        • Field | 
        • Constr | 
        • Method
        • Detail: 
        • Field | 
        • Constr | 
        • Method
        org.wildfly.swarm.config.elytron

        Interface LdapRealmSupplier<T extends LdapRealm>

        • Functional Interface:
          This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.


          @FunctionalInterface
          public interface LdapRealmSupplier<T extends LdapRealm>
          • Method Detail

            • get

              LdapRealm get()
              Constructed instance of LdapRealm resource
              Returns:
              The instance
        • Summary: 
        • Nested | 
        • Field | 
        • Constr | 
        • Method
        • Detail: 
        • Field | 
        • Constr | 
        • Method

        Copyright © 2018 JBoss by Red Hat. All rights reserved.

        ",0 " #include ""sw/device/lib/crypto/drivers/otbn.h"" #include #include #include #include ""sw/device/lib/base/bitfield.h"" #include ""sw/device/lib/base/mmio.h"" #include ""hw/top_earlgrey/sw/autogen/top_earlgrey.h"" #include ""otbn_regs.h"" // Generated. #define ASSERT_ERR_BIT_MATCH(enum_val, autogen_val) \ static_assert(enum_val == 1 << (autogen_val), \ ""OTBN register bit doesn't match autogen value.""); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsBadDataAddr, OTBN_ERR_BITS_BAD_DATA_ADDR_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsBadInsnAddr, OTBN_ERR_BITS_BAD_INSN_ADDR_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsCallStack, OTBN_ERR_BITS_CALL_STACK_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsIllegalInsn, OTBN_ERR_BITS_ILLEGAL_INSN_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsLoop, OTBN_ERR_BITS_LOOP_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsImemIntgViolation, OTBN_ERR_BITS_IMEM_INTG_VIOLATION_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsDmemIntgViolation, OTBN_ERR_BITS_DMEM_INTG_VIOLATION_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsRegIntgViolation, OTBN_ERR_BITS_REG_INTG_VIOLATION_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsBusIntgViolation, OTBN_ERR_BITS_BUS_INTG_VIOLATION_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsIllegalBusAccess, OTBN_ERR_BITS_ILLEGAL_BUS_ACCESS_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsLifecycleEscalation, OTBN_ERR_BITS_LIFECYCLE_ESCALATION_BIT); ASSERT_ERR_BIT_MATCH(kOtbnErrBitsFatalSoftware, OTBN_ERR_BITS_FATAL_SOFTWARE_BIT); const size_t kOtbnDMemSizeBytes = OTBN_DMEM_SIZE_BYTES; const size_t kOtbnIMemSizeBytes = OTBN_IMEM_SIZE_BYTES; enum { kBase = TOP_EARLGREY_OTBN_BASE_ADDR }; /** * Ensures that `offset_bytes` and `len` are valid for a given `mem_size`. */ static otbn_error_t check_offset_len(uint32_t offset_bytes, size_t num_words, size_t mem_size) { if (offset_bytes + num_words * sizeof(uint32_t) < num_words * sizeof(uint32_t) || offset_bytes + num_words * sizeof(uint32_t) > mem_size) { return kOtbnErrorBadOffsetLen; } return kOtbnErrorOk; } void otbn_execute(void) { mmio_region_write32(mmio_region_from_addr(kBase), OTBN_CMD_REG_OFFSET, kOtbnCmdExecute); } bool otbn_is_busy() { uint32_t status = mmio_region_read32(mmio_region_from_addr(kBase), OTBN_STATUS_REG_OFFSET); return status != kOtbnStatusIdle && status != kOtbnStatusLocked; } void otbn_get_err_bits(otbn_err_bits_t *err_bits) { *err_bits = mmio_region_read32(mmio_region_from_addr(kBase), OTBN_ERR_BITS_REG_OFFSET); } otbn_error_t otbn_imem_write(uint32_t offset_bytes, const uint32_t *src, size_t num_words) { OTBN_RETURN_IF_ERROR( check_offset_len(offset_bytes, num_words, kOtbnIMemSizeBytes)); mmio_region_t otbn_base = mmio_region_from_addr(kBase); for (size_t i = 0; i < num_words; ++i) { mmio_region_write32( otbn_base, OTBN_IMEM_REG_OFFSET + offset_bytes + i * sizeof(uint32_t), src[i]); } return kOtbnErrorOk; } otbn_error_t otbn_dmem_write(uint32_t offset_bytes, const uint32_t *src, size_t num_words) { OTBN_RETURN_IF_ERROR( check_offset_len(offset_bytes, num_words, kOtbnDMemSizeBytes)); mmio_region_t otbn_base = mmio_region_from_addr(kBase); for (size_t i = 0; i < num_words; ++i) { mmio_region_write32( otbn_base, OTBN_DMEM_REG_OFFSET + offset_bytes + i * sizeof(uint32_t), src[i]); } return kOtbnErrorOk; } otbn_error_t otbn_dmem_read(uint32_t offset_bytes, uint32_t *dest, size_t num_words) { OTBN_RETURN_IF_ERROR( check_offset_len(offset_bytes, num_words, kOtbnDMemSizeBytes)); mmio_region_t otbn_base = mmio_region_from_addr(kBase); for (size_t i = 0; i < num_words; ++i) { dest[i] = mmio_region_read32( otbn_base, OTBN_DMEM_REG_OFFSET + offset_bytes + i * sizeof(uint32_t)); } return kOtbnErrorOk; } void otbn_zero_dmem(void) { mmio_region_t otbn_base = mmio_region_from_addr(kBase); for (size_t i = 0; i < kOtbnDMemSizeBytes; i += sizeof(uint32_t)) { mmio_region_write32(otbn_base, OTBN_DMEM_REG_OFFSET + i, 0u); } } otbn_error_t otbn_set_ctrl_software_errs_fatal(bool enable) { // Only one bit in the CTRL register so no need to read current value. uint32_t new_ctrl; if (enable) { new_ctrl = 1; } else { new_ctrl = 0; } mmio_region_t otbn_base = mmio_region_from_addr(kBase); mmio_region_write32(otbn_base, OTBN_CTRL_REG_OFFSET, new_ctrl); if (mmio_region_read32(otbn_base, OTBN_CTRL_REG_OFFSET) != new_ctrl) { return kOtbnErrorUnavailable; } return kOtbnErrorOk; } ",0 "ww.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_QT_MACNOTIFICATIONHANDLER_H #define BITCOIN_QT_MACNOTIFICATIONHANDLER_H #include /** Macintosh-specific notification handler (supports UserNotificationCenter). */ class MacNotificationHandler : public QObject { Q_OBJECT public: /** shows a macOS 10.8+ UserNotification in the UserNotificationCenter */ void showNotification(const QString &title, const QString &text); /** check if OS can handle UserNotifications */ bool hasUserNotificationCenterSupport(); static MacNotificationHandler *instance(); }; #endif // BITCOIN_QT_MACNOTIFICATIONHANDLER_H ",0 "t is paths from circleci glob. Basically a space separated list of file paths. $in = $argv[1]; if (!is_string($in)) { die('Only a string is allowed'); } // Break out the individual paths. $paths = explode(' ', $in); $regexContents = ''; foreach ($paths as $i => $path) { // Use just the test name. Full file paths don't work in a filter expression. $name = pathinfo($path, PATHINFO_FILENAME); $regexContents .= preg_quote($name); if ($i !== count($paths) - 1) { $regexContents .= '|'; } } $regex = ""/^(.*\\\)?($regexContents)/""; // Output the regex. echo $regex; ",0 "ytope.h"" #ifdef INCLUDE_971_INFRASTRUCTURE #include ""frc971/control_loops/drivetrain/drivetrain.q.h"" #endif //INCLUDE_971_INFRASTRUCTURE #include ""frc971/control_loops/state_feedback_loop.h"" #include ""frc971/control_loops/drivetrain/drivetrain_config.h"" namespace frc971 { namespace control_loops { namespace drivetrain { class PolyDrivetrain { public: enum Gear { HIGH, LOW, SHIFTING_UP, SHIFTING_DOWN }; PolyDrivetrain(const DrivetrainConfig &dt_config); int controller_index() const { return loop_->controller_index(); } bool IsInGear(Gear gear) { return gear == LOW || gear == HIGH; } // Computes the speed of the motor given the hall effect position and the // speed of the robot. double MotorSpeed(const constants::ShifterHallEffect &hall_effect, double shifter_position, double velocity); // Computes the states of the shifters for the left and right drivetrain sides // given a requested state. void UpdateGears(Gear requested_gear); // Computes the next state of a shifter given the current state and the // requested state. Gear UpdateSingleGear(Gear requested_gear, Gear current_gear); void SetGoal(double wheel, double throttle, bool quickturn, bool highgear); #ifdef INCLUDE_971_INFRASTRUCTURE void SetPosition( const ::frc971::control_loops::DrivetrainQueue::Position *position); #else //INCLUDE_971_INFRASTRUCTURE void SetPosition( const DrivetrainPosition *position); #endif //INCLUDE_971_INFRASTRUCTURE double FilterVelocity(double throttle); double MaxVelocity(); void Update(); #ifdef INCLUDE_971_INFRASTRUCTURE void SendMotors(::frc971::control_loops::DrivetrainQueue::Output *output); #else //INCLUDE_971_INFRASTRUCTURE void SendMotors(DrivetrainOutput *output); #endif //INCLUDE_971_INFRASTRUCTURE private: StateFeedbackLoop<7, 2, 3> kf_; const ::aos::controls::HPolytope<2> U_Poly_; ::std::unique_ptr> loop_; const double ttrust_; double wheel_; double throttle_; bool quickturn_; int stale_count_; double position_time_delta_; Gear left_gear_; Gear right_gear_; #ifdef INCLUDE_971_INFRASTRUCTURE ::frc971::control_loops::DrivetrainQueue::Position last_position_; ::frc971::control_loops::DrivetrainQueue::Position position_; #else //INCLUDE_971_INFRASTRUCTURE DrivetrainPosition last_position_; DrivetrainPosition position_; #endif //INCLUDE_971_INFRASTRUCTURE int counter_; DrivetrainConfig dt_config_; }; } // namespace drivetrain } // namespace control_loops } // namespace frc971 #endif // FRC971_CONTROL_LOOPS_DRIVETRAIN_POLYDRIVETRAIN_H_ ",0 " and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Contact: admin@mcviral.net */ package net.mcviral.dev.plugins.comjail.events; import org.bukkit.ChatColor; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.plugin.Plugin; import net.mcviral.dev.plugins.comjail.main.JailController; public class TeleportEvent implements Listener{ @SuppressWarnings(""unused"") private Plugin plugin; private JailController jailcontroller; public TeleportEvent(Plugin mplugin, JailController mjailcontroller){ plugin = mplugin; jailcontroller = mjailcontroller; } @EventHandler(priority = EventPriority.HIGHEST) public void onPlayerTeleport(PlayerTeleportEvent event){ if (jailcontroller.isJailed(event.getPlayer().getUniqueId())){ if (!event.getPlayer().hasPermission(""jail.override"")){ event.setCancelled(true); event.getPlayer().sendMessage(""["" + ChatColor.BLUE + ""GUARD"" + ChatColor.WHITE + ""] "" + ChatColor.RED + ""You are jailed, you may not teleport.""); } } } } ",0 "odel.GLMGam.information — statsmodels v0.10.0 documentation

        statsmodels.gam.generalized_additive_model.GLMGam.information

        method

        GLMGam.information(params, scale=None)

        Fisher information matrix.

        © Copyright 2009-2018, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers. Created using Sphinx 2.1.2.
        ",0 "r"" title=""Manuel Rego Casasnovas"" href=""mailto:rego@igalia.com"">

        Test passes if there are 3 filled squares with the same size, and green is overlapping yellow which is overlapping blue.

        G
        Y
        B
        ",0 "der the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.sal.binding.generator.impl; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.io.File; import java.util.Arrays; import java.util.List; import org.junit.Test; import org.opendaylight.yangtools.sal.binding.generator.api.BindingGenerator; import org.opendaylight.yangtools.sal.binding.model.api.Type; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl; public class ControllerTest { @Test public void controllerAugmentationTest() throws Exception { File cn = new File(getClass().getResource(""/controller-models/controller-network.yang"").toURI()); File co = new File(getClass().getResource(""/controller-models/controller-openflow.yang"").toURI()); File ietfInetTypes = new File(getClass().getResource(""/ietf/ietf-inet-types.yang"").toURI()); final SchemaContext context = new YangParserImpl().parseFiles(Arrays.asList(cn, co, ietfInetTypes)); assertNotNull(""Schema Context is null"", context); final BindingGenerator bindingGen = new BindingGeneratorImpl(true); final List genTypes = bindingGen.generateTypes(context); assertNotNull(genTypes); assertTrue(!genTypes.isEmpty()); } } ",0 "achi Vantara : http://www.pentaho.com * ******************************************************************************* * * 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. * ******************************************************************************/ package org.pentaho.di.job.entries.evaluatetablecontent; import static org.mockito.Matchers.anyInt; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.sql.Connection; import java.sql.Driver; import java.sql.DriverManager; import java.sql.DriverPropertyInfo; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.logging.Logger; import org.mockito.stubbing.Answer; public class MockDriver implements Driver { private static final List drivers = new ArrayList(); public static synchronized void registerInstance() throws SQLException { MockDriver driver = new MockDriver(); DriverManager.registerDriver( driver ); drivers.add( driver ); } public static synchronized void deregeisterInstances() throws SQLException { for ( Driver driver : drivers ) { DriverManager.deregisterDriver( driver ); } drivers.clear(); } public MockDriver() { } @Override public boolean acceptsURL( String url ) throws SQLException { return true; } @Override public Connection connect( String url, Properties info ) throws SQLException { Connection conn = mock( Connection.class ); Statement stmt = mock( Statement.class ); ResultSet rs = mock( ResultSet.class ); ResultSetMetaData md = mock( ResultSetMetaData.class ); when( stmt.getMaxRows() ).thenReturn( 5 ); when( stmt.getResultSet() ).thenReturn( rs ); when( stmt.executeQuery( anyString() ) ).thenReturn( rs ); when( rs.getMetaData() ).thenReturn( md ); when( rs.getLong( anyInt() ) ).thenReturn( 5L ); when( rs.next() ).thenAnswer( new Answer() { private int count = 0; public Boolean answer( org.mockito.invocation.InvocationOnMock invocation ) throws Throwable { return count++ == 0; } } ); when( md.getColumnCount() ).thenReturn( 1 ); when( md.getColumnName( anyInt() ) ).thenReturn( ""count"" ); when( md.getColumnType( anyInt() ) ).thenReturn( java.sql.Types.INTEGER ); when( conn.createStatement() ).thenReturn( stmt ); return conn; } @Override public int getMajorVersion() { return 0; } @Override public int getMinorVersion() { return 0; } @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { return null; } @Override public DriverPropertyInfo[] getPropertyInfo( String url, Properties info ) throws SQLException { // TODO Auto-generated method stub return null; } @Override public boolean jdbcCompliant() { // TODO Auto-generated method stub return false; } } ",0 "sumption * * @ORM\Table() * @ORM\Entity * @ORM\HasLifecycleCallbacks() */ class Consumption { /** * @var integer * * @ORM\Column(name=""id"", type=""integer"") * @ORM\Id * @ORM\GeneratedValue(strategy=""AUTO"") */ private $id; /** * @var integer * * @ORM\Column(name=""category_id"", type=""integer"") */ private $categoryId; /** * @var string * * @ORM\Column(name=""name"", type=""string"", length=255) * @Assert\NotBlank(message=""consumption.name.not_blank"") */ private $name; /** * @var string * * @ORM\Column(name=""value"", type=""decimal"", scale=1) * @Assert\NotBlank(message=""consumption.value.not_blank"") */ private $value; /** * @var \DateTime * * @ORM\Column(name=""created_at"", type=""datetime"") */ private $createdAt; /** * @var * * @ORM\ManyToOne(targetEntity=""Category"") * @ORM\JoinColumn(name=""category_id"", referencedColumnName=""id"", onDelete=""CASCADE"") */ private $category; /** * @var integer * * @ORM\Column(name=""user_id"", type=""integer"") */ private $userId; /** * @var string * * @ORM\ManyToOne(targetEntity=""Flatmate\UserBundle\Entity\User"") * @ORM\JoinColumn(name=""user_id"", referencedColumnName=""id"", onDelete=""CASCADE"") */ private $user; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set categoryId * * @param integer $categoryId * @return Consumption */ public function setCategoryId($categoryId) { $this->categoryId = $categoryId; return $this; } /** * Set category * * @param $category * @return $this */ public function setCategory($category) { $this->category = $category; return $this; } /** * Get categoryId * * @return integer */ public function getCategoryId() { return $this->categoryId; } /** * Get category * * @return mixed */ public function getCategory() { return $this->category; } /** * Set name * * @param string $name * @return Consumption */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set value * * @param string $value * @return Consumption */ public function setValue($value) { $this->value = $value; return $this; } /** * Get value * * @return string */ public function getValue() { return $this->value; } /** * Set createdAt * * @param \DateTime $createdAt * @return Consumption */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get createdAt * * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * Set Created At value at current time * * @ORM\PrePersist */ public function setCreatedAtNow() { $this->createdAt = new \DateTime(); } /** * Get User ID * * @return integer */ public function getUserId() { return $this->userId; } /** * Set User ID * * @param $userId */ public function setUserId($userId) { $this->userId = $userId; } /** * Get User * * @return string */ public function getUser() { return $this->user; } /** * Set User * * @param User */ public function setUser($user) { $this->user = $user; } } ",0 " Rozycki * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ #include #include #include #include #define PCI_ACCESS_READ 0 #define PCI_ACCESS_WRITE 1 #define PCI_CFG_TYPE0_REG_SHF 0 #define PCI_CFG_TYPE0_FUNC_SHF 8 #define PCI_CFG_TYPE1_REG_SHF 0 #define PCI_CFG_TYPE1_FUNC_SHF 8 #define PCI_CFG_TYPE1_DEV_SHF 11 #define PCI_CFG_TYPE1_BUS_SHF 16 static int gt64xxx_pci0_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 * data) { unsigned char busnum = bus->number; u32 intr; if ((busnum == 0) && (devfn >= PCI_DEVFN(31, 0))) return -1; GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT | GT_INTRCAUSE_TARABORT0_BIT)); GT_WRITE(GT_PCI0_CFGADDR_OFS, (busnum << GT_PCI0_CFGADDR_BUSNUM_SHF) | (devfn << GT_PCI0_CFGADDR_FUNCTNUM_SHF) | ((where / 4) << GT_PCI0_CFGADDR_REGNUM_SHF) | GT_PCI0_CFGADDR_CONFIGEN_BIT); if (access_type == PCI_ACCESS_WRITE) { if (busnum == 0 && PCI_SLOT(devfn) == 0) { GT_WRITE(GT_PCI0_CFGDATA_OFS, *data); } else __GT_WRITE(GT_PCI0_CFGDATA_OFS, *data); } else { if (busnum == 0 && PCI_SLOT(devfn) == 0) { *data = GT_READ(GT_PCI0_CFGDATA_OFS); } else *data = __GT_READ(GT_PCI0_CFGDATA_OFS); } intr = GT_READ(GT_INTRCAUSE_OFS); if (intr & (GT_INTRCAUSE_MASABORT0_BIT | GT_INTRCAUSE_TARABORT0_BIT)) { GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT | GT_INTRCAUSE_TARABORT0_BIT)); return -1; } return 0; } static int gt64xxx_pci0_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) { u32 data = 0; if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, &data)) return PCIBIOS_DEVICE_NOT_FOUND; if (size == 1) *val = (data >> ((where & 3) << 3)) & 0xff; else if (size == 2) *val = (data >> ((where & 3) << 3)) & 0xffff; else *val = data; return PCIBIOS_SUCCESSFUL; } static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) { u32 data = 0; if (size == 4) data = val; else { if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, &data)) return PCIBIOS_DEVICE_NOT_FOUND; if (size == 1) data = (data & ~(0xff << ((where & 3) << 3))) | (val << ((where & 3) << 3)); else if (size == 2) data = (data & ~(0xffff << ((where & 3) << 3))) | (val << ((where & 3) << 3)); } if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where, &data)) return PCIBIOS_DEVICE_NOT_FOUND; return PCIBIOS_SUCCESSFUL; } struct pci_ops gt64xxx_pci0_ops = { .read = gt64xxx_pci0_pcibios_read, .write = gt64xxx_pci0_pcibios_write }; ",0 "e; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Tue Mar 4 13:50:34 EST 2014 */ #include ""codelet-rdft.h"" #ifdef HAVE_FMA /* Generated by: ../../../genfft/gen_r2cb.native -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -sign 1 -n 16 -name r2cbIII_16 -dft-III -include r2cbIII.h */ /* * This function contains 66 FP additions, 36 FP multiplications, * (or, 46 additions, 16 multiplications, 20 fused multiply/add), * 55 stack variables, 9 constants, and 32 memory accesses */ #include ""r2cbIII.h"" static void r2cbIII_16(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) { DK(KP668178637, +0.668178637919298919997757686523080761552472251); DK(KP1_662939224, +1.662939224605090474157576755235811513477121624); DK(KP198912367, +0.198912367379658006911597622644676228597850501); DK(KP1_961570560, +1.961570560806460898252364472268478073947867462); DK(KP707106781, +0.707106781186547524400844362104849039284835938); DK(KP1_414213562, +1.414213562373095048801688724209698078569671875); DK(KP414213562, +0.414213562373095048801688724209698078569671875); DK(KP1_847759065, +1.847759065022573512256366378793576573644833252); DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); { INT i; for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(64, rs), MAKE_VOLATILE_STRIDE(64, csr), MAKE_VOLATILE_STRIDE(64, csi)) { E TA, TD, Tv, TG, TE, TF; { E TK, TP, T7, T13, TW, TH, Tj, TC, To, Te, TX, TS, T12, Tt, TB; { E T4, Tf, T3, TU, Tz, T5, Tg, Th; { E T1, T2, Tx, Ty; T1 = Cr[0]; T2 = Cr[WS(csr, 7)]; Tx = Ci[0]; Ty = Ci[WS(csi, 7)]; T4 = Cr[WS(csr, 4)]; Tf = T1 - T2; T3 = T1 + T2; TU = Ty - Tx; Tz = Tx + Ty; T5 = Cr[WS(csr, 3)]; Tg = Ci[WS(csi, 4)]; Th = Ci[WS(csi, 3)]; } { E Tb, Tk, Ta, TR, Tn, Tc, Tq, Tr; { E T8, T9, Tl, Tm; T8 = Cr[WS(csr, 2)]; { E Tw, T6, TV, Ti; Tw = T4 - T5; T6 = T4 + T5; TV = Th - Tg; Ti = Tg + Th; TK = Tw - Tz; TA = Tw + Tz; TP = T3 - T6; T7 = T3 + T6; T13 = TV + TU; TW = TU - TV; TH = Tf + Ti; Tj = Tf - Ti; T9 = Cr[WS(csr, 5)]; } Tl = Ci[WS(csi, 2)]; Tm = Ci[WS(csi, 5)]; Tb = Cr[WS(csr, 1)]; Tk = T8 - T9; Ta = T8 + T9; TR = Tl - Tm; Tn = Tl + Tm; Tc = Cr[WS(csr, 6)]; Tq = Ci[WS(csi, 1)]; Tr = Ci[WS(csi, 6)]; } TC = Tk + Tn; To = Tk - Tn; { E Tp, Td, TQ, Ts; Tp = Tb - Tc; Td = Tb + Tc; TQ = Tr - Tq; Ts = Tq + Tr; Te = Ta + Td; TX = Ta - Td; TS = TQ - TR; T12 = TR + TQ; Tt = Tp - Ts; TB = Tp + Ts; } } } { E T10, TT, TY, TZ; R0[0] = KP2_000000000 * (T7 + Te); R0[WS(rs, 4)] = KP2_000000000 * (T13 - T12); T10 = TP - TS; TT = TP + TS; TY = TW - TX; TZ = TX + TW; { E T11, T14, TI, TL, Tu; T11 = T7 - Te; T14 = T12 + T13; R0[WS(rs, 5)] = KP1_847759065 * (FNMS(KP414213562, TT, TY)); R0[WS(rs, 1)] = KP1_847759065 * (FMA(KP414213562, TY, TT)); R0[WS(rs, 6)] = KP1_414213562 * (T14 - T11); R0[WS(rs, 2)] = KP1_414213562 * (T11 + T14); TD = TB - TC; TI = TC + TB; TL = To - Tt; Tu = To + Tt; { E TO, TJ, TN, TM; R0[WS(rs, 7)] = -(KP1_847759065 * (FNMS(KP414213562, TZ, T10))); R0[WS(rs, 3)] = KP1_847759065 * (FMA(KP414213562, T10, TZ)); TO = FMA(KP707106781, TI, TH); TJ = FNMS(KP707106781, TI, TH); TN = FMA(KP707106781, TL, TK); TM = FNMS(KP707106781, TL, TK); Tv = FMA(KP707106781, Tu, Tj); TG = FNMS(KP707106781, Tu, Tj); R1[WS(rs, 3)] = KP1_961570560 * (FMA(KP198912367, TO, TN)); R1[WS(rs, 7)] = -(KP1_961570560 * (FNMS(KP198912367, TN, TO))); R1[WS(rs, 5)] = KP1_662939224 * (FNMS(KP668178637, TJ, TM)); R1[WS(rs, 1)] = KP1_662939224 * (FMA(KP668178637, TM, TJ)); } } } } TE = FNMS(KP707106781, TD, TA); TF = FMA(KP707106781, TD, TA); R1[WS(rs, 2)] = -(KP1_662939224 * (FNMS(KP668178637, TG, TF))); R1[WS(rs, 6)] = -(KP1_662939224 * (FMA(KP668178637, TF, TG))); R1[WS(rs, 4)] = -(KP1_961570560 * (FMA(KP198912367, Tv, TE))); R1[0] = KP1_961570560 * (FNMS(KP198912367, TE, Tv)); } } } static const kr2c_desc desc = { 16, ""r2cbIII_16"", {46, 16, 20, 0}, &GENUS }; void X(codelet_r2cbIII_16) (planner *p) { X(kr2c_register) (p, r2cbIII_16, &desc); } #else /* HAVE_FMA */ /* Generated by: ../../../genfft/gen_r2cb.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 16 -name r2cbIII_16 -dft-III -include r2cbIII.h */ /* * This function contains 66 FP additions, 32 FP multiplications, * (or, 54 additions, 20 multiplications, 12 fused multiply/add), * 40 stack variables, 9 constants, and 32 memory accesses */ #include ""r2cbIII.h"" static void r2cbIII_16(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) { DK(KP1_961570560, +1.961570560806460898252364472268478073947867462); DK(KP390180644, +0.390180644032256535696569736954044481855383236); DK(KP1_111140466, +1.111140466039204449485661627897065748749874382); DK(KP1_662939224, +1.662939224605090474157576755235811513477121624); DK(KP707106781, +0.707106781186547524400844362104849039284835938); DK(KP1_414213562, +1.414213562373095048801688724209698078569671875); DK(KP765366864, +0.765366864730179543456919968060797733522689125); DK(KP1_847759065, +1.847759065022573512256366378793576573644833252); DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); { INT i; for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(64, rs), MAKE_VOLATILE_STRIDE(64, csr), MAKE_VOLATILE_STRIDE(64, csi)) { E T7, TW, T13, Tj, TD, TK, TP, TH, Te, TX, T12, To, Tt, Tx, TS; E Tw, TT, TY; { E T3, Tf, TC, TV, T6, Tz, Ti, TU; { E T1, T2, TA, TB; T1 = Cr[0]; T2 = Cr[WS(csr, 7)]; T3 = T1 + T2; Tf = T1 - T2; TA = Ci[0]; TB = Ci[WS(csi, 7)]; TC = TA + TB; TV = TB - TA; } { E T4, T5, Tg, Th; T4 = Cr[WS(csr, 4)]; T5 = Cr[WS(csr, 3)]; T6 = T4 + T5; Tz = T4 - T5; Tg = Ci[WS(csi, 4)]; Th = Ci[WS(csi, 3)]; Ti = Tg + Th; TU = Tg - Th; } T7 = T3 + T6; TW = TU + TV; T13 = TV - TU; Tj = Tf - Ti; TD = Tz + TC; TK = Tz - TC; TP = T3 - T6; TH = Tf + Ti; } { E Ta, Tk, Tn, TR, Td, Tp, Ts, TQ; { E T8, T9, Tl, Tm; T8 = Cr[WS(csr, 2)]; T9 = Cr[WS(csr, 5)]; Ta = T8 + T9; Tk = T8 - T9; Tl = Ci[WS(csi, 2)]; Tm = Ci[WS(csi, 5)]; Tn = Tl + Tm; TR = Tl - Tm; } { E Tb, Tc, Tq, Tr; Tb = Cr[WS(csr, 1)]; Tc = Cr[WS(csr, 6)]; Td = Tb + Tc; Tp = Tb - Tc; Tq = Ci[WS(csi, 1)]; Tr = Ci[WS(csi, 6)]; Ts = Tq + Tr; TQ = Tr - Tq; } Te = Ta + Td; TX = Ta - Td; T12 = TR + TQ; To = Tk - Tn; Tt = Tp - Ts; Tx = Tp + Ts; TS = TQ - TR; Tw = Tk + Tn; } R0[0] = KP2_000000000 * (T7 + Te); R0[WS(rs, 4)] = KP2_000000000 * (T13 - T12); TT = TP + TS; TY = TW - TX; R0[WS(rs, 1)] = FMA(KP1_847759065, TT, KP765366864 * TY); R0[WS(rs, 5)] = FNMS(KP765366864, TT, KP1_847759065 * TY); { E T11, T14, TZ, T10; T11 = T7 - Te; T14 = T12 + T13; R0[WS(rs, 2)] = KP1_414213562 * (T11 + T14); R0[WS(rs, 6)] = KP1_414213562 * (T14 - T11); TZ = TP - TS; T10 = TX + TW; R0[WS(rs, 3)] = FMA(KP765366864, TZ, KP1_847759065 * T10); R0[WS(rs, 7)] = FNMS(KP1_847759065, TZ, KP765366864 * T10); } { E TJ, TN, TM, TO, TI, TL; TI = KP707106781 * (Tw + Tx); TJ = TH - TI; TN = TH + TI; TL = KP707106781 * (To - Tt); TM = TK - TL; TO = TL + TK; R1[WS(rs, 1)] = FMA(KP1_662939224, TJ, KP1_111140466 * TM); R1[WS(rs, 7)] = FNMS(KP1_961570560, TN, KP390180644 * TO); R1[WS(rs, 5)] = FNMS(KP1_111140466, TJ, KP1_662939224 * TM); R1[WS(rs, 3)] = FMA(KP390180644, TN, KP1_961570560 * TO); } { E Tv, TF, TE, TG, Tu, Ty; Tu = KP707106781 * (To + Tt); Tv = Tj + Tu; TF = Tj - Tu; Ty = KP707106781 * (Tw - Tx); TE = Ty + TD; TG = Ty - TD; R1[0] = FNMS(KP390180644, TE, KP1_961570560 * Tv); R1[WS(rs, 6)] = FNMS(KP1_662939224, TF, KP1_111140466 * TG); R1[WS(rs, 4)] = -(FMA(KP390180644, Tv, KP1_961570560 * TE)); R1[WS(rs, 2)] = FMA(KP1_111140466, TF, KP1_662939224 * TG); } } } } static const kr2c_desc desc = { 16, ""r2cbIII_16"", {54, 20, 12, 0}, &GENUS }; void X(codelet_r2cbIII_16) (planner *p) { X(kr2c_register) (p, r2cbIII_16, &desc); } #endif /* HAVE_FMA */ ",0 "t under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include #include #include #include #include #include /* Libra SDIO function device */ static struct sdio_func *libra_sdio_func; static struct mmc_host *libra_mmc_host; static int libra_mmc_host_index; /* SDIO Card ID / Device ID */ static unsigned short libra_sdio_card_id; /* completion variables */ struct completion gCard_rem_event_var; EXPORT_SYMBOL(gCard_rem_event_var); struct completion gShutdown_event_var; EXPORT_SYMBOL(gShutdown_event_var); static suspend_handler_t *libra_suspend_hldr; static resume_handler_t *libra_resume_hldr; static notify_card_removal_t *libra_notify_card_removal_hdlr; static shutdown_handler_t *libra_sdio_shutdown_hdlr; int libra_enable_sdio_irq_in_chip(struct sdio_func *func, u8 enable) { unsigned char reg = 0; int err = 0; sdio_claim_host(func); /* Read the value into reg */ libra_sdiocmd52(func, SDIO_CCCR_IENx, ®, 0, &err); if (err) printk(KERN_ERR ""%s: Could not read SDIO_CCCR_IENx register "" ""err=%d\n"", __func__, err); if (libra_mmc_host) { if (enable) { reg |= 1 << func->num; reg |= 1; } else { reg &= ~(1 << func->num); } libra_sdiocmd52(func, SDIO_CCCR_IENx, ®, 1, &err); if (err) printk(KERN_ERR ""%s: Could not enable/disable irq "" ""err=%d\n"", __func__, err); } sdio_release_host(func); return err; } EXPORT_SYMBOL(libra_enable_sdio_irq_in_chip); /** * libra_sdio_configure() - Function to configure the SDIO device param * @libra_sdio_rxhandler Rx handler * @func_drv_fn Function driver function for special setup * @funcdrv_timeout Function Enable timeout * @blksize Block size * * Configure SDIO device, enable function and set block size */ int libra_sdio_configure(sdio_irq_handler_t libra_sdio_rxhandler, void (*func_drv_fn)(int *status), unsigned int funcdrv_timeout, unsigned int blksize) { int err_ret = 0; struct sdio_func *func = libra_sdio_func; if (libra_sdio_func == NULL) { printk(KERN_ERR ""%s: Error SDIO card not detected\n"", __func__); goto cfg_error; } sdio_claim_host(func); /* Currently block sizes are set here. */ func->max_blksize = blksize; if (sdio_set_block_size(func, blksize)) { printk(KERN_ERR ""%s: Unable to set the block size.\n"", __func__); sdio_release_host(func); goto cfg_error; } /* Function driver specific configuration. */ if (func_drv_fn) { (*func_drv_fn)(&err_ret); if (err_ret) { printk(KERN_ERR ""%s: function driver provided configure function error=%d\n"", __func__, err_ret); sdio_release_host(func); goto cfg_error; } } /* We set this based on the function card. */ func->enable_timeout = funcdrv_timeout; err_ret = sdio_enable_func(func); if (err_ret != 0) { printk(KERN_ERR ""%s: Unable to enable function %d\n"", __func__, err_ret); sdio_release_host(func); goto cfg_error; } if (sdio_claim_irq(func, libra_sdio_rxhandler)) { sdio_disable_func(func); printk(KERN_ERR ""%s: Unable to claim irq.\n"", __func__); sdio_release_host(func); goto cfg_error; } libra_enable_sdio_irq_in_chip(func, 0); sdio_release_host(func); return 0; cfg_error: return -1; } EXPORT_SYMBOL(libra_sdio_configure); int libra_sdio_configure_suspend_resume( suspend_handler_t *libra_sdio_suspend_hdlr, resume_handler_t *libra_sdio_resume_hdlr) { libra_suspend_hldr = libra_sdio_suspend_hdlr; libra_resume_hldr = libra_sdio_resume_hdlr; return 0; } EXPORT_SYMBOL(libra_sdio_configure_suspend_resume); /* * libra_sdio_deconfigure() - Function to reset the SDIO device param */ void libra_sdio_deconfigure(struct sdio_func *func) { if (NULL == libra_sdio_func) return; sdio_claim_host(func); sdio_release_irq(func); sdio_disable_func(func); sdio_release_host(func); } EXPORT_SYMBOL(libra_sdio_deconfigure); int libra_enable_sdio_irq(struct sdio_func *func, u8 enable) { if (libra_mmc_host && libra_mmc_host->ops && libra_mmc_host->ops->enable_sdio_irq) { libra_mmc_host->ops->enable_sdio_irq(libra_mmc_host, enable); return 0; } printk(KERN_ERR ""%s: Could not enable disable irq\n"", __func__); return -EINVAL; } EXPORT_SYMBOL(libra_enable_sdio_irq); int libra_disable_sdio_irq_capability(struct sdio_func *func, u8 disable) { if (libra_mmc_host) { if (disable) libra_mmc_host->caps &= ~MMC_CAP_SDIO_IRQ; else libra_mmc_host->caps |= MMC_CAP_SDIO_IRQ; return 0; } printk(KERN_ERR ""%s: Could not change sdio capabilities to polling\n"", __func__); return -EINVAL; } EXPORT_SYMBOL(libra_disable_sdio_irq_capability); /* * libra_sdio_release_irq() - Function to release IRQ */ void libra_sdio_release_irq(struct sdio_func *func) { if (NULL == libra_sdio_func) return; sdio_release_irq(func); } EXPORT_SYMBOL(libra_sdio_release_irq); /* * libra_sdio_disable_func() - Function to disable sdio func */ void libra_sdio_disable_func(struct sdio_func *func) { if (NULL == libra_sdio_func) return; sdio_disable_func(func); } EXPORT_SYMBOL(libra_sdio_disable_func); /* * Return the SDIO Function device */ struct sdio_func *libra_getsdio_funcdev(void) { return libra_sdio_func; } EXPORT_SYMBOL(libra_getsdio_funcdev); /* * Set function driver as the private data for the function device */ void libra_sdio_setprivdata(struct sdio_func *sdio_func_dev, void *padapter) { if (NULL == libra_sdio_func) return; sdio_set_drvdata(sdio_func_dev, padapter); } EXPORT_SYMBOL(libra_sdio_setprivdata); /* * Return private data of the function device. */ void *libra_sdio_getprivdata(struct sdio_func *sdio_func_dev) { return sdio_get_drvdata(sdio_func_dev); } EXPORT_SYMBOL(libra_sdio_getprivdata); /* * Function driver claims the SDIO device */ void libra_claim_host(struct sdio_func *sdio_func_dev, pid_t *curr_claimed, pid_t current_pid, atomic_t *claim_count) { if (NULL == libra_sdio_func) return; if (*curr_claimed == current_pid) { atomic_inc(claim_count); return; } /* Go ahead and claim the host if not locked by anybody. */ sdio_claim_host(sdio_func_dev); *curr_claimed = current_pid; atomic_inc(claim_count); } EXPORT_SYMBOL(libra_claim_host); /* * Function driver releases the SDIO device */ void libra_release_host(struct sdio_func *sdio_func_dev, pid_t *curr_claimed, pid_t current_pid, atomic_t *claim_count) { if (NULL == libra_sdio_func) return; if (*curr_claimed != current_pid) { /* Dont release */ return; } atomic_dec(claim_count); if (atomic_read(claim_count) == 0) { *curr_claimed = 0; sdio_release_host(sdio_func_dev); } } EXPORT_SYMBOL(libra_release_host); void libra_sdiocmd52(struct sdio_func *sdio_func_dev, unsigned int addr, u8 *byte_var, int write, int *err_ret) { if (write) sdio_writeb(sdio_func_dev, byte_var[0], addr, err_ret); else byte_var[0] = sdio_readb(sdio_func_dev, addr, err_ret); } EXPORT_SYMBOL(libra_sdiocmd52); u8 libra_sdio_readsb(struct sdio_func *func, void *dst, unsigned int addr, int count) { return sdio_readsb(func, dst, addr, count); } EXPORT_SYMBOL(libra_sdio_readsb); int libra_sdio_memcpy_fromio(struct sdio_func *func, void *dst, unsigned int addr, int count) { return sdio_memcpy_fromio(func, dst, addr, count); } EXPORT_SYMBOL(libra_sdio_memcpy_fromio); int libra_sdio_writesb(struct sdio_func *func, unsigned int addr, void *src, int count) { return sdio_writesb(func, addr, src, count); } EXPORT_SYMBOL(libra_sdio_writesb); int libra_sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, void *src, int count) { return sdio_memcpy_toio(func, addr, src, count); } EXPORT_SYMBOL(libra_sdio_memcpy_toio); int libra_detect_card_change(void) { if (libra_mmc_host) { if (!strcmp(libra_mmc_host->class_dev.class->name, ""mmc_host"") && (libra_mmc_host_index == libra_mmc_host->index)) { mmc_detect_change(libra_mmc_host, 0); return 0; } } printk(KERN_ERR ""%s: Could not trigger card change\n"", __func__); return -EINVAL; } EXPORT_SYMBOL(libra_detect_card_change); int libra_sdio_enable_polling(void) { if (libra_mmc_host) { if (!strcmp(libra_mmc_host->class_dev.class->name, ""mmc_host"") && (libra_mmc_host_index == libra_mmc_host->index)) { libra_mmc_host->caps |= MMC_CAP_NEEDS_POLL; mmc_detect_change(libra_mmc_host, 0); return 0; } } printk(KERN_ERR ""%s: Could not trigger SDIO scan\n"", __func__); return -1; } EXPORT_SYMBOL(libra_sdio_enable_polling); void libra_sdio_set_clock(struct sdio_func *func, unsigned int clk_freq) { struct mmc_host *host = func->card->host; host->ios.clock = clk_freq; host->ops->set_ios(host, &host->ios); } EXPORT_SYMBOL(libra_sdio_set_clock); /* * API to get SDIO Device Card ID */ void libra_sdio_get_card_id(struct sdio_func *func, unsigned short *card_id) { if (card_id) *card_id = libra_sdio_card_id; } EXPORT_SYMBOL(libra_sdio_get_card_id); /* * SDIO Probe */ static int libra_sdio_probe(struct sdio_func *func, const struct sdio_device_id *sdio_dev_id) { libra_mmc_host = func->card->host; libra_mmc_host_index = libra_mmc_host->index; libra_sdio_func = func; libra_sdio_card_id = sdio_dev_id->device; printk(KERN_INFO ""%s: success with block size of %d device_id=0x%x\n"", __func__, func->cur_blksize, sdio_dev_id->device); /* Turn off SDIO polling from now on */ libra_mmc_host->caps &= ~MMC_CAP_NEEDS_POLL; return 0; } static void libra_sdio_remove(struct sdio_func *func) { if (libra_notify_card_removal_hdlr) libra_notify_card_removal_hdlr(); libra_sdio_func = NULL; printk(KERN_INFO ""%s : Module removed.\n"", __func__); } #ifdef CONFIG_PM static int libra_sdio_suspend(struct device *dev) { struct sdio_func *func = dev_to_sdio_func(dev); int ret = 0; ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); if (ret) { printk(KERN_ERR ""%s: Error Host doesn't support the keep power capability\n"" , __func__); return ret; } if (libra_suspend_hldr) { /* Disable SDIO IRQ when driver is being suspended */ libra_enable_sdio_irq(func, 0); ret = libra_suspend_hldr(func); if (ret) { printk(KERN_ERR ""%s: Libra driver is not able to suspend\n"" , __func__); /* Error - Restore SDIO IRQ */ libra_enable_sdio_irq(func, 1); return ret; } } return sdio_set_host_pm_flags(func, MMC_PM_WAKE_SDIO_IRQ); } static int libra_sdio_resume(struct device *dev) { struct sdio_func *func = dev_to_sdio_func(dev); if (libra_resume_hldr) { libra_resume_hldr(func); /* Restore SDIO IRQ */ libra_enable_sdio_irq(func, 1); } return 0; } #else #define libra_sdio_suspend 0 #define libra_sdio_resume 0 #endif static void libra_sdio_shutdown(struct device *dev) { if (libra_sdio_shutdown_hdlr) { libra_sdio_shutdown_hdlr(); printk(KERN_INFO ""%s : Notified shutdown event to Libra driver.\n"", __func__); } } int libra_sdio_register_shutdown_hdlr( shutdown_handler_t *libra_shutdown_hdlr) { libra_sdio_shutdown_hdlr = libra_shutdown_hdlr; return 0; } EXPORT_SYMBOL(libra_sdio_register_shutdown_hdlr); int libra_sdio_notify_card_removal( notify_card_removal_t *libra_sdio_notify_card_removal_hdlr) { libra_notify_card_removal_hdlr = libra_sdio_notify_card_removal_hdlr; return 0; } EXPORT_SYMBOL(libra_sdio_notify_card_removal); static struct sdio_device_id libra_sdioid[] = { {.class = 0, .vendor = LIBRA_MAN_ID, .device = LIBRA_REV_1_0_CARD_ID}, {.class = 0, .vendor = VOLANS_MAN_ID, .device = VOLANS_REV_2_0_CARD_ID}, {} }; static const struct dev_pm_ops libra_sdio_pm_ops = { .suspend = libra_sdio_suspend, .resume = libra_sdio_resume, }; static struct sdio_driver libra_sdiofn_driver = { .name = ""libra_sdiofn"", .id_table = libra_sdioid, .probe = libra_sdio_probe, .remove = libra_sdio_remove, .drv.pm = &libra_sdio_pm_ops, .drv.shutdown = libra_sdio_shutdown, }; static int __init libra_sdioif_init(void) { libra_sdio_func = NULL; libra_mmc_host = NULL; libra_mmc_host_index = -1; libra_suspend_hldr = NULL; libra_resume_hldr = NULL; libra_notify_card_removal_hdlr = NULL; libra_sdio_shutdown_hdlr = NULL; sdio_register_driver(&libra_sdiofn_driver); printk(KERN_INFO ""%s: Loaded Successfully\n"", __func__); return 0; } static void __exit libra_sdioif_exit(void) { unsigned int attempts = 0; if (!libra_detect_card_change()) { do { ++attempts; msleep(500); } while (libra_sdio_func != NULL && attempts < 3); } if (libra_sdio_func != NULL) printk(KERN_ERR ""%s: Card removal not detected\n"", __func__); sdio_unregister_driver(&libra_sdiofn_driver); libra_sdio_func = NULL; libra_mmc_host = NULL; libra_mmc_host_index = -1; printk(KERN_INFO ""%s: Unloaded Successfully\n"", __func__); } module_init(libra_sdioif_init); module_exit(libra_sdioif_exit); MODULE_LICENSE(""GPL v2""); MODULE_VERSION(""1.0""); MODULE_DESCRIPTION(""WLAN SDIODriver""); ",0 "please view the LICENSE * file that was distributed with this source code. */ namespace PHPExiftool\Driver\Tag\DICOM; use JMS\Serializer\Annotation\ExclusionPolicy; use PHPExiftool\Driver\AbstractTag; /** * @ExclusionPolicy(""all"") */ class ContentTime extends AbstractTag { protected $Id = '0008,0033'; protected $Name = 'ContentTime'; protected $FullName = 'DICOM::Main'; protected $GroupName = 'DICOM'; protected $g0 = 'DICOM'; protected $g1 = 'DICOM'; protected $g2 = 'Image'; protected $Type = '?'; protected $Writable = false; protected $Description = 'Content Time'; } ",0 "me='css/jquery.bootstrap-touchspin.min.css')}}""> {% endblock %} {% block scripts %} {{super()}} {% endblock %} {% block content %} {{super()}}

        Import

        Supported import formats and options

        Suunto Ambit Moveslink v1.2+

        Please find *.sml files in your %AppData%/Suunto/Moveslink2 directory.

        Suunto Ambit Moveslink v1.1

        Please find *.xml files in your %AppData%/Suunto/Moveslink2 directory.

        GPX v1.1

        GPX format v1.1 with serveral extensions supported. File format extension *.gpx. Pauses will be introduced for every new track and track segment.

        Pause detection

        Info Files can also be uploaded when compressed with gzip.
        Note that file format detection is based on filenames and thus files should not be renamed manually before uploading.

        {% endblock %} ",0 "s 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. */ package org.kie.workbench.common.dmn.client.editors.expressions.types.function.supplementary.pmml; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Optional; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.kie.soup.commons.util.Sets; import org.kie.workbench.common.dmn.api.definition.model.Definitions; import org.kie.workbench.common.dmn.api.definition.model.Import; import org.kie.workbench.common.dmn.api.definition.model.ImportDMN; import org.kie.workbench.common.dmn.api.definition.model.ImportPMML; import org.kie.workbench.common.dmn.api.editors.included.DMNImportTypes; import org.kie.workbench.common.dmn.api.editors.included.PMMLDocumentMetadata; import org.kie.workbench.common.dmn.api.editors.included.PMMLIncludedModel; import org.kie.workbench.common.dmn.api.editors.included.PMMLModelMetadata; import org.kie.workbench.common.dmn.api.editors.included.PMMLParameterMetadata; import org.kie.workbench.common.dmn.api.property.dmn.LocationURI; import org.kie.workbench.common.dmn.client.editors.included.imports.IncludedModelsPageStateProviderImpl; import org.kie.workbench.common.dmn.client.graph.DMNGraphUtils; import org.kie.workbench.common.dmn.client.service.DMNClientServicesProxy; import org.kie.workbench.common.stunner.core.client.service.ServiceCallback; import org.kie.workbench.common.stunner.core.diagram.Diagram; import org.kie.workbench.common.stunner.core.diagram.Metadata; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.uberfire.backend.vfs.Path; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyListOf; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) public class PMMLDocumentMetadataProviderTest { @Mock private DMNGraphUtils graphUtils; @Mock private DMNClientServicesProxy clientServicesProxy; @Mock private IncludedModelsPageStateProviderImpl stateProvider; @Mock private Path dmnModelPath; @Captor private ArgumentCaptor> pmmlIncludedModelsArgumentCaptor; @Captor private ArgumentCaptor>> callbackArgumentCaptor; private Definitions definitions; private PMMLDocumentMetadataProvider provider; @Before public void setup() { this.definitions = new Definitions(); this.provider = new PMMLDocumentMetadataProvider(graphUtils, clientServicesProxy, stateProvider); final Diagram diagram = mock(Diagram.class); final Metadata metadata = mock(Metadata.class); when(stateProvider.getDiagram()).thenReturn(Optional.of(diagram)); when(diagram.getMetadata()).thenReturn(metadata); when(metadata.getPath()).thenReturn(dmnModelPath); when(graphUtils.getDefinitions(diagram)).thenReturn(definitions); } @Test @SuppressWarnings(""unchecked"") public void testLoadPMMLIncludedDocumentsDMNModelPath() { provider.loadPMMLIncludedDocuments(); verify(clientServicesProxy).loadPMMLDocumentsFromImports(eq(dmnModelPath), anyListOf(PMMLIncludedModel.class), any(ServiceCallback.class)); } @Test @SuppressWarnings(""unchecked"") public void testLoadPMMLIncludedDocumentsPMMLIncludedModels() { final Import dmn = new ImportDMN(""dmn"", new LocationURI(""dmn-location""), DMNImportTypes.DMN.getDefaultNamespace()); final Import pmml = new ImportPMML(""pmml"", new LocationURI(""pmml-location""), DMNImportTypes.PMML.getDefaultNamespace()); dmn.getName().setValue(""dmn""); pmml.getName().setValue(""pmml""); definitions.getImport().add(dmn); definitions.getImport().add(pmml); provider.loadPMMLIncludedDocuments(); verify(clientServicesProxy).loadPMMLDocumentsFromImports(any(Path.class), pmmlIncludedModelsArgumentCaptor.capture(), any(ServiceCallback.class)); final List actualIncludedModels = pmmlIncludedModelsArgumentCaptor.getValue(); assertThat(actualIncludedModels).hasSize(1); final PMMLIncludedModel pmmlIncludedModel = actualIncludedModels.get(0); assertThat(pmmlIncludedModel.getModelName()).isEqualTo(""pmml""); assertThat(pmmlIncludedModel.getPath()).isEqualTo(""pmml-location""); assertThat(pmmlIncludedModel.getImportType()).isEqualTo(DMNImportTypes.PMML.getDefaultNamespace()); } @Test public void testGetPMMLDocumentNames() { final List pmmlDocuments = new ArrayList<>(); pmmlDocuments.add(new PMMLDocumentMetadata(""path1"", ""zDocument1"", DMNImportTypes.PMML.getDefaultNamespace(), Collections.emptyList())); pmmlDocuments.add(new PMMLDocumentMetadata(""path2"", ""aDocument2"", DMNImportTypes.PMML.getDefaultNamespace(), Collections.emptyList())); final ServiceCallback> callback = loadPMMLIncludedDocuments(); callback.onSuccess(pmmlDocuments); final List documentNames = provider.getPMMLDocumentNames(); assertThat(documentNames).containsSequence(""aDocument2"", ""zDocument1""); } private ServiceCallback> loadPMMLIncludedDocuments() { provider.loadPMMLIncludedDocuments(); verify(clientServicesProxy).loadPMMLDocumentsFromImports(any(Path.class), anyListOf(PMMLIncludedModel.class), callbackArgumentCaptor.capture()); return callbackArgumentCaptor.getValue(); } @Test public void testGetPMMLDocumentModelNames() { final List pmmlDocuments = new ArrayList<>(); pmmlDocuments.add(new PMMLDocumentMetadata(""path"", ""document"", DMNImportTypes.PMML.getDefaultNamespace(), asList(new PMMLModelMetadata(""zModel1"", Collections.emptySet()), new PMMLModelMetadata(""aModel2"", Collections.emptySet())))); final ServiceCallback> callback = loadPMMLIncludedDocuments(); callback.onSuccess(pmmlDocuments); final List modelNames = provider.getPMMLDocumentModels(""document""); assertThat(modelNames).containsSequence(""aModel2"", ""zModel1""); assertThat(provider.getPMMLDocumentModels(""unknown"")).isEmpty(); } @Test public void testGetPMMLDocumentModelParameterNames() { final List pmmlDocuments = new ArrayList<>(); pmmlDocuments.add(new PMMLDocumentMetadata(""path"", ""document"", DMNImportTypes.PMML.getDefaultNamespace(), singletonList(new PMMLModelMetadata(""model"", new Sets.Builder() .add(new PMMLParameterMetadata(""zParameter1"")) .add(new PMMLParameterMetadata(""aParameter2"")) .build())))); final ServiceCallback> callback = loadPMMLIncludedDocuments(); callback.onSuccess(pmmlDocuments); final List modelNames = provider.getPMMLDocumentModelParameterNames(""document"", ""model""); assertThat(modelNames).containsSequence(""aParameter2"", ""zParameter1""); assertThat(provider.getPMMLDocumentModelParameterNames(""unknown"", ""unknown"")).isEmpty(); } } ",0 "ReferenceElementErrorInfo.h"" company=""Jordan Robinson""> // Copyright (c) 2013 Jordan Robinson. All rights reserved. // // The use of this software is governed by the Microsoft Public License // which is included with this distribution. // //------------------------------------------------------------------------------ #pragma once #include ""BloombergTypes/ElementPtr.h"" namespace BEmu { class Name; namespace ReferenceDataRequest { class ReferenceElementString; class ReferenceElementInt; class ReferenceElementErrorInfo : public ElementPtr { private: boost::shared_ptr _source, _category, _message, _subCategory; boost::shared_ptr _code; public: ReferenceElementErrorInfo(); ~ReferenceElementErrorInfo(); virtual Name name() const; virtual size_t numValues() const; virtual size_t numElements() const; virtual SchemaElementDefinition elementDefinition() const; virtual bool isNull() const; virtual bool isArray() const; virtual bool isComplexType() const; virtual const char* getElementAsString(const char* name) const; virtual int getElementAsInt32(const char* name) const; virtual boost::shared_ptr getElement(const char* name) const; virtual bool hasElement(const char* name, bool excludeNullElements = false) const; virtual std::ostream& print(std::ostream& stream, int level = 0, int spacesPerLevel = 4) const; }; } }",0 "et=UTF-8""> R%egrave%glement (CE) n o %nbsp%48/2006 de la Commission du 12 janvier 2006 fixant les restitutions applicables %agrave% l'exportation des c%eacute%r%eacute%ales, des farines et des gruaux et semoules de froment ou de seigle

        Règlement (CE) no 48/2006 de la Commission

        du 12 janvier 2006

        fixant les restitutions applicables à l'exportation des céréales, des farines et des gruaux et semoules de froment ou de seigle

        LA COMMISSION DES COMMUNAUTÉS EUROPÉENNES,

        vu le traité instituant la Communauté européenne,

        vu le règlement (CE) no 1784/2003 du Conseil du 29 septembre 2003 portant organisation commune des marchés dans le secteur des céréales [1], et notamment son article 13, paragraphe 3,

        considérant ce qui suit:

        (1) Aux termes de l'article 13 du règlement (CE) no 1784/2003, la différence entre les cours ou les prix des produits visés à l'article 1er dudit règlement et les prix de ces produits dans la Communauté peut être couverte par une restitution à l'exportation.

        (2) Les restitutions doivent être fixées en prenant en considération les éléments visés à l'article 1er du règlement (CE) no 1501/95 de la Commission du 29 juin 1995 établissant certaines modalités d'application du règlement (CEE) no 1766/92 du Conseil en ce qui concerne l'octroi des restitutions à l'exportation ainsi que les mesures à prendre, en cas de perturbation, dans le secteur des céréales [2].

        (3) En ce qui concerne les farines, les gruaux et les semoules de froment ou de seigle, la restitution applicable à ces produits doit être calculée en tenant compte de la quantité de céréales nécessaire à la fabrication des produits considérés. Ces quantités ont été fixées dans le règlement (CE) no 1501/95.

        (4) La situation du marché mondial ou les exigences spécifiques de certains marchés peuvent rendre nécessaire la différenciation de la restitution pour certains produits, suivant leur destination.

        (5) La restitution doit être fixée une fois par mois. Elle peut être modifiée dans l'intervalle.

        (6) L'application de ces modalités à la situation actuelle des marchés dans le secteur des céréales, et notamment aux cours ou prix de ces produits dans la Communauté et sur le marché mondial, conduit à fixer la restitution aux montants repris en annexe.

        (7) Les mesures prévues au présent règlement sont conformes à l'avis du comité de gestion des céréales,

        A ARRÊTÉ LE PRÉSENT RÈGLEMENT:

        Article premier

        Les restitutions à l'exportation, en l'état, des produits visés à l'article 1er, points a), b) et c), du règlement (CE) no 1784/2003, à l'exception du malt, sont fixées aux montants repris en annexe.

        Article 2

        Le présent règlement entre en vigueur le 13 janvier 2006.

        Le présent règlement est obligatoire dans tous ses éléments et directement applicable dans tout État membre.

        Fait à Bruxelles, le 12 janvier 2006.

        Par la Commission

        Mariann Fischer Boel

        Membre de la Commission

        [1] JO L 270 du 21.10.2003, p. 78. Règlement modifié par le règlement (CE) no 1154/2005 de la Commission (JO L 187 du 19.7.2005, p. 11).

        [2] JO L 147 du 30.6.1995, p. 7. Règlement modifié en dernier lieu par le règlement (CE) no 777/2004 (JO L 123 du 27.4.2004, p. 50).

        --------------------------------------------------

        ANNEXE

        du règlement de la Commission du 12 janvier 2006 fixant les restitutions applicables à l'exportation des céréales, des farines et des gruaux et semoules de froment ou de seigle

        NB: Les codes des produits ainsi que les codes des destinations série ""A"" sont définis au règlement (CEE) no 3846/87 de la Commission (JO L 366 du 24.12.1987, p. 1), modifié.

        C01 : Tous pays tiers à l'exclusion de l'Albanie, de la Bulgarie, de la Roumanie, de la Croatie, de la Bosnie-et-Herzégovine, de la Serbie-et-Monténégro, de l'ancienne République yougoslave de Macédoine, du Liechtenstein et de la Suisse.

        Code des produits | Destination | Unité de mesure | Montant des restitutions |

        1001 10 00 9200 | — | EUR/t | — |

        1001 10 00 9400 | A00 | EUR/t | 0 |

        1001 90 91 9000 | — | EUR/t | — |

        1001 90 99 9000 | A00 | EUR/t | 0 |

        1002 00 00 9000 | A00 | EUR/t | 0 |

        1003 00 10 9000 | — | EUR/t | — |

        1003 00 90 9000 | A00 | EUR/t | 0 |

        1004 00 00 9200 | — | EUR/t | — |

        1004 00 00 9400 | A00 | EUR/t | 0 |

        1005 10 90 9000 | — | EUR/t | — |

        1005 90 00 9000 | A00 | EUR/t | 0 |

        1007 00 90 9000 | — | EUR/t | — |

        1008 20 00 9000 | — | EUR/t | — |

        1101 00 11 9000 | — | EUR/t | — |

        1101 00 15 9100 | C01 | EUR/t | 12,33 |

        1101 00 15 9130 | C01 | EUR/t | 11,52 |

        1101 00 15 9150 | C01 | EUR/t | 10,62 |

        1101 00 15 9170 | C01 | EUR/t | 9,81 |

        1101 00 15 9180 | C01 | EUR/t | 9,18 |

        1101 00 15 9190 | — | EUR/t | — |

        1101 00 90 9000 | — | EUR/t | — |

        1102 10 00 9500 | A00 | EUR/t | 0 |

        1102 10 00 9700 | A00 | EUR/t | 0 |

        1102 10 00 9900 | — | EUR/t | — |

        1103 11 10 9200 | A00 | EUR/t | 0 |

        1103 11 10 9400 | A00 | EUR/t | 0 |

        1103 11 10 9900 | — | EUR/t | — |

        1103 11 90 9200 | A00 | EUR/t | 0 |

        1103 11 90 9800 | — | EUR/t | — |

        --------------------------------------------------

        ",0 " the LICENSE file. #ifndef CHROME_FRAME_EXTRA_SYSTEM_APIS_H_ #define CHROME_FRAME_EXTRA_SYSTEM_APIS_H_ #include #include class __declspec(uuid(""54A8F188-9EBD-4795-AD16-9B4945119636"")) IWebBrowserEventsService : public IUnknown { public: STDMETHOD(FireBeforeNavigate2Event)(VARIANT_BOOL* cancel) = 0; STDMETHOD(FireNavigateComplete2Event)(VOID) = 0; STDMETHOD(FireDownloadBeginEvent)(VOID) = 0; STDMETHOD(FireDownloadCompleteEvent)(VOID) = 0; STDMETHOD(FireDocumentCompleteEvent)(VOID) = 0; }; class __declspec(uuid(""{87CC5D04-EAFA-4833-9820-8F986530CC00}"")) IWebBrowserEventsUrlService : public IUnknown { public: STDMETHOD(GetUrlForEvents)(BSTR* url) = 0; }; class __declspec(uuid(""{3050F804-98B5-11CF-BB82-00AA00BDCE0B}"")) IWebBrowserPriv : public IUnknown { public: STDMETHOD(NavigateWithBindCtx)(VARIANT* uri, VARIANT* flags, VARIANT* target_frame, VARIANT* post_data, VARIANT* headers, IBindCtx* bind_ctx, LPOLESTR url_fragment); STDMETHOD(OnClose)(); }; class IWebBrowserPriv2Common : public IUnknown { public: STDMETHOD(NavigateWithBindCtx2)(IUri* uri, VARIANT* flags, VARIANT* target_frame, VARIANT* post_data, VARIANT* headers, IBindCtx* bind_ctx, LPOLESTR url_fragment); }; class IWebBrowserPriv2CommonIE9 : public IUnknown { public: STDMETHOD(NavigateWithBindCtx2)(IUri* uri, VARIANT* flags, VARIANT* target_frame, VARIANT* post_data, VARIANT* headers, IBindCtx* bind_ctx, LPOLESTR url_fragment, DWORD unused1); }; interface __declspec(uuid(""3050f801-98b5-11cf-bb82-00aa00bdce0b"")) IDocObjectService : public IUnknown { STDMETHOD(FireBeforeNavigate2)(IDispatch* dispatch, LPCTSTR url, DWORD flags, LPCTSTR frame_name, BYTE* post_data, DWORD post_data_len, LPCTSTR headers, BOOL play_nav_sound, BOOL* cancel) = 0; STDMETHOD(FireNavigateComplete2)(IHTMLWindow2* html_window2, DWORD flags) = 0; STDMETHOD(FireDownloadBegin)() = 0; STDMETHOD(FireDownloadComplete)() = 0; STDMETHOD(FireDocumentComplete)(IHTMLWindow2* html_window2, DWORD flags) = 0; STDMETHOD(UpdateDesktopComponent)(IHTMLWindow2* html_window2) = 0; STDMETHOD(GetPendingUrl)(BSTR* pending_url) = 0; STDMETHOD(ActiveElementChanged)(IHTMLElement* html_element) = 0; STDMETHOD(GetUrlSearchComponent)(BSTR* search) = 0; STDMETHOD(IsErrorUrl)(LPCTSTR url, BOOL* is_error) = 0; }; interface __declspec(uuid(""f62d9369-75ef-4578-8856-232802c76468"")) ITridentService2 : public IUnknown { STDMETHOD(FireBeforeNavigate2)(IDispatch* dispatch, LPCTSTR url, DWORD flags, LPCTSTR frame_name, BYTE* post_data, DWORD post_data_len, LPCTSTR headers, BOOL play_nav_sound, BOOL* cancel) = 0; STDMETHOD(FireNavigateComplete2)(IHTMLWindow2*, uint32); STDMETHOD(FireDownloadBegin)(VOID); STDMETHOD(FireDownloadComplete)(VOID); STDMETHOD(FireDocumentComplete)(IHTMLWindow2*, uint32); STDMETHOD(UpdateDesktopComponent)(IHTMLWindow2*); STDMETHOD(GetPendingUrl)(uint16**); STDMETHOD(ActiveElementChanged)(IHTMLElement*); STDMETHOD(GetUrlSearchComponent)(uint16**); STDMETHOD(IsErrorUrl)(uint16 const*, int32*); STDMETHOD(AttachMyPics)(VOID *, VOID**); STDMETHOD(ReleaseMyPics)(VOID*); STDMETHOD(IsGalleryMeta)(int32, VOID*); STDMETHOD(EmailPicture)(uint16*); STDMETHOD(FireNavigateError)(IHTMLWindow2*, uint16*, uint16*, uint32, int*); STDMETHOD(FirePrintTemplateEvent)(IHTMLWindow2*, int32); STDMETHOD(FireUpdatePageStatus)(IHTMLWindow2*, uint32, int32); STDMETHOD(FirePrivacyImpactedStateChange)(int32 privacy_violated); STDMETHOD(InitAutoImageResize)(VOID); STDMETHOD(UnInitAutoImageResize)(VOID); }; #define TLEF_RELATIVE_INCLUDE_CURRENT (0x01) #define TLEF_RELATIVE_BACK (0x10) #define TLEF_RELATIVE_FORE (0x20) #endif ",0 "le>area-method: Not compatible 👼
        « Up

        area-method 8.5.0 Not compatible 👼

        📅 (2022-02-04 18:52:19 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-threads        base
        base-unix           base
        conf-findutils      1           Virtual package relying on findutils
        conf-gmp            4           Virtual package relying on a GMP lib system installation
        coq                 8.13.1      Formal proof management system
        num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.07.1      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.07.1      Official release 4.07.1
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.9.3       A library manager for OCaml
        zarith              1.12        Implements arithmetic and logical operations over arbitrary-precision integers
        # opam file:
        opam-version: "2.0"
        maintainer: "matej.kosik@inria.fr"
        homepage: "https://github.com/coq-contribs/area-method"
        license: "Proprietary"
        build: [make "-j%{jobs}%"]
        install: [make "install"]
        remove: ["rm" "-R" "%{lib}%/coq/user-contrib/AreaMethod"]
        depends: [
          "ocaml"
          "coq" {>= "8.5" & < "8.6~"}
        ]
        tags: [ "keyword:geometry" "keyword:chou gao zhang area method" "keyword:decision procedure" "category:Mathematics/Geometry/AutomatedDeduction" "date:2004-2010" ]
        authors: [ "Julien Narboux <>" ]
        bug-reports: "https://github.com/coq-contribs/area-method/issues"
        dev-repo: "git+https://github.com/coq-contribs/area-method.git"
        synopsis: "The Chou, Gao and Zhang area method"
        description: """
        This contribution is the implementation of the Chou, Gao and Zhang's area method decision procedure for euclidean plane geometry.
        This development contains a partial formalization of the book "Machine Proofs in Geometry, Automated Production of Readable Proofs for Geometry Theorems" by Chou, Gao and Zhang.
        The examples shown automatically (there are more than 100 examples) includes the Ceva, Desargues, Menelaus, Pascal, Centroïd, Pappus, Gauss line, Euler line, Napoleon theorems.
        Changelog
        2.1 : remove some not needed assumptions in some elimination lemmas (2010)
        2.0 : extension implementation to Euclidean geometry (2009-2010)
        1.0 : first implementation for affine geometry (2004)"""
        flags: light-uninstall
        url {
          src: "https://github.com/coq-contribs/area-method/archive/v8.5.0.tar.gz"
          checksum: "md5=ba9772aa2056aa4bc9ccc051a9a76a7f"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-area-method.8.5.0 coq.8.13.1
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.13.1).
        The following dependencies couldn't be met:
          - coq-area-method -> coq < 8.6~ -> ocaml < 4.06.0
              base of this switch (use `--unlock-base' to force)
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-area-method.8.5.0
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "onstructor @main(Messages(""signIn.title""), None, neo4jURI) {
        @Messages(""signIn.input.legend"") @helper.form(action = routes.SignInController.submit()) { @helper.CSRF.formField @b3.text( signInForm(""userName""), '_hiddenLabel -> Messages(""signIn.input.userName""), 'placeholder -> Messages(""signIn.input.userName""), 'class -> ""form-control input-lg"") @b3.password( signInForm(""password""), '_hiddenLabel -> Messages(""signIn.input.password""), 'placeholder -> Messages(""signIn.input.password""), 'class -> ""form-control input-lg"") @b3.checkbox( signInForm(""rememberMe""), '_text -> Messages(""signIn.input.rememberMe""), 'checked -> true) @b3.submit('class -> ""btn btn-lg btn-primary btn-block"") { @Messages(""signIn.input.submit"") } @*
        *@ @*
        *@ @**@ @*
        *@ @*
        *@ }
        } ",0 "tation\XmlElement; class DocumentLineDocument { /** * @Type(""string"") * @XmlElement(cdata = false, namespace = ""urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"") * @SerializedName(""LineID"") */ public string $lineId; public static function create(string $lineId): self { $self = new self(); $self->lineId = $lineId; return $self; } } ",0 "nner; import java.util.SortedMap; import org.jooq.lambda.tuple.Tuple2; import com.evanbyrne.vending_machine_kata.coin.Cents; import com.evanbyrne.vending_machine_kata.coin.Coin; import com.evanbyrne.vending_machine_kata.coin.CoinCollection; import com.evanbyrne.vending_machine_kata.coin.CoinFactory; import com.evanbyrne.vending_machine_kata.inventory.IInventoryService; import com.evanbyrne.vending_machine_kata.inventory.InventoryProduct; /** * Manages console input and output. */ public class Console { /** * Get change display for terminal output. * * @param Change. * @return Formatted message. */ public String getChangeDisplay(final CoinCollection change) { final ArrayList display = new ArrayList(); final LinkedHashMap coinMap = new LinkedHashMap(); display.add(""THANK YOU""); for(final Coin coin : change.getList()) { if(coinMap.containsKey(coin)) { coinMap.put(coin, coinMap.get(coin) + 1); } else { coinMap.put(coin, 1); } } if(!coinMap.isEmpty()) { final ArrayList displayReturn = new ArrayList(); for(final Map.Entry entry : coinMap.entrySet()) { final String name = entry.getKey().name().toLowerCase(); final int count = entry.getValue(); displayReturn.add(String.format(""%s (x%d)"", name, count)); } display.add(""RETURN: "" + String.join("", "", displayReturn)); } return String.join(""\n"", display); } /** * Get product listing display for terminal output. * * @param Sorted map of all inventory. * @return Formatted message. */ public String getProductDisplay(final SortedMap inventory) { if(!inventory.isEmpty()) { final ArrayList display = new ArrayList(); for(final Map.Entry entry : inventory.entrySet()) { final String centsString = Cents.toString(entry.getValue().getCents()); final String name = entry.getValue().getName(); final String key = entry.getKey(); display.add(String.format(""%s\t%s\t%s"", key, centsString, name)); } return String.join(""\n"", display); } return ""No items in vending machine.""; } /** * Prompt user for payment. * * Loops until payment >= selected product cost. * * @param Scanner. * @param A product representing their selection. * @return Payment. */ public CoinCollection promptForPayment(final Scanner scanner, final InventoryProduct selection) { final CoinCollection paid = new CoinCollection(); Coin insert; String input; do { System.out.println(""PRICE: "" + Cents.toString(selection.getCents())); do { System.out.print(String.format(""INSERT COIN (%s): "", Cents.toString(paid.getTotal()))); input = scanner.nextLine(); insert = CoinFactory.getByName(input); if(insert == null) { System.out.println(""Invalid coin. This machine accepts: quarter, dime, nickel.""); } } while(insert == null); paid.addCoin(insert); } while(paid.getTotal() < selection.getCents()); return paid; } /** * Prompt for product selection. * * Loops until a valid product has been selected. * * @param Scanner * @param An implementation of IInventoryService. * @return A tuple with the product key and product. */ public Tuple2 promptForSelection(final Scanner scanner, final IInventoryService inventoryService) { InventoryProduct selection; String input; do { System.out.print(""SELECT: ""); input = scanner.nextLine(); selection = inventoryService.getProduct(input); if( selection == null ) { System.out.println(""Invalid selection.""); } } while(selection == null); return new Tuple2(input, selection); } } ",0 """viewport"" content=""width=device-width, initial-scale=1""> Megan Balcom's Page
        Megan's Work

        Job Duties


        IT Infrastructure Intern
        Louisville Gas and Electric and Kentucky Utilities

        • Responsible for generating monthly metrics report using various sources (CMDB, SiteScan, capital expenditures, annual server refresh, energy efficiency report, KPI)
        • Conducted monthly audit of devices in data centers and weekly walkthrough monitoring devices alarms and weekly monitoring of PDU readings
        • Created new iteration of documentation instructions for how to complete the monthly report

        Copyright © Megan's github.io 2016

        ",0 "ación de Roles""; $miembrosGrupo = elgg_get_miembros_grupo_investigacion($grupo); $params['title'] = $title; $params['grupo'] = array( 'nombre' => $grupo->name, 'guid' => $grupo->guid, 'rol_user' => $rol, ); $params['ajax']=$ajax; $params['buttons'] = array(); $params['miembros'] = $miembrosGrupo; $content= elgg_view('grupo_investigacion/profile/header', $params); $content.=elgg_view('grupo_investigacion/roles/admin_roles', $params); $vars = array('content' => $content); $body = elgg_view_layout('one_sidebar', $vars); echo elgg_view_page($title, $body); /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ ",0 "eb-96 22:21:50 GMT CodeWarrior for CS100

        Setting Up CodeWarrior for CS100

        CodeWarrior can be run on your own personal Macintosh. Copies of CodeWarrior 8 can be purchased from the Campus Store. The CodeWarrior installed in the CIT labs is just like the one you would install on your Mac, except for a few things we have added -- the CSLib library and the CS100 Basic project stationery.

        Note: These additions were built using CodeWarrior version 8, so it is possible that they will not work with earlier versions of CodeWarrior (although we have heard from people that they do).

        Once you have retrieved the CS100 Additions folder, install the additions as follows:

        • Open the CS100 Additions folder. Inside it there is a SimpleText file containing instructions similar to these. There are two folders called INTO MacOS Support and INTO (Project Stationery). The folder structure in the CS100 Additions folder is meant to mirror the folder structure inside the Metrowerks CodeWarrior folder of your copy of CodeWarrior, to make it easy to follow these instructions.

        • Open your CodeWarrior8 or CW 8 Gold folder. Open the Metrowerks CodeWarrior folder inside it.

        • Open the INTO MacOS Support folder in the CS100 additions. Move the CS100 Support folder into the MacOS Support folder in your Metrowerks CodeWarrior folder.

        • Open the INTO (Project Stationery) folder. Move the CS100 Basic 68K.mu file into the (Project Stationery) folder in your Metrowerks CodeWarrior folder.

        • Open the INTO Proj. Stat. Support folder in the INTO (Project Stationery) folder. Move the .c file into the Project Stationery Support folder in the (Project Stationery) folder of your CodeWarrior.

        When you open a new project with CodeWarrior, you should now be able to select the CS100 Basic 68K stationery. This will include the CSLib library, which should also now be available to you.
        Click here to get the CS100 Additions folder.

        CS100 Additions Folder


        Other Machines

        If you have a copy of CodeWarrior for a computer other than the Mac, you may still be able to set up the CS100 environment. However, the course staff will not be able support this.
        1. Build the CSLib library. Get the source code for by anonymous FTP from Addison-Wesley. Follow the instructions on page 670 in the Roberts textbook (Appendix B, Library Sources). Compile the source code on your machine using CodeWarrior. (To create the CSLib library for CS100 we only compiled the genlib, simpio, string, random, and exception parts of the library; we left out the graphics stuff. If everything seems to work for your machine, feel free to compile all of it.) Put the compiled library and the library header files into the support directory for your CodeWarrior.

        2. Make the CS100 Basic project stationery. Our project stationery is based on the ANSI project stationery, with the CSLib library added. Put your project stationery in the project stationery directory of your CodeWarrior.

        CS100 Spring 1996
        pierce@cs.cornell.edu
        ",0 "href=""/"">WSJ Sections close

        --> --> --> -->
        Advertisement
        Copyright WSJ
        ",0 ". * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package org.eclipse.xtext.formatting2.regionaccess.internal; import static org.eclipse.xtext.formatting2.regionaccess.HiddenRegionPartAssociation.*; import java.util.Collections; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.formatting2.debug.TextRegionAccessToString; import org.eclipse.xtext.formatting2.regionaccess.IEObjectRegion; import org.eclipse.xtext.formatting2.regionaccess.IHiddenRegion; import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion; import org.eclipse.xtext.formatting2.regionaccess.ITextRegionAccess; import org.eclipse.xtext.formatting2.regionaccess.ITextRegionDiffBuilder; import org.eclipse.xtext.formatting2.regionaccess.ITextSegment; import org.eclipse.xtext.serializer.ISerializationContext; import org.eclipse.xtext.serializer.acceptor.ISequenceAcceptor; import org.eclipse.xtext.util.ITextRegion; import com.google.common.base.Preconditions; import com.google.common.base.Throwables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; /** * @author Moritz Eysholdt - Initial contribution and API */ public class StringBasedTextRegionAccessDiffBuilder implements ITextRegionDiffBuilder { private final static Logger LOG = Logger.getLogger(StringBasedTextRegionAccessDiffBuilder.class); protected interface Insert { public IHiddenRegion getInsertFirst(); public IHiddenRegion getInsertLast(); } protected static class MoveSource extends Rewrite { private MoveTarget target = null; public MoveSource(IHiddenRegion first, IHiddenRegion last) { super(first, last); } public MoveTarget getTarget() { return target; } } protected static class MoveTarget extends Rewrite implements Insert { private final MoveSource source; public MoveTarget(IHiddenRegion insertAt, MoveSource source) { super(insertAt, insertAt); this.source = source; this.source.target = this; } @Override public IHiddenRegion getInsertFirst() { return this.source.originalFirst; } @Override public IHiddenRegion getInsertLast() { return this.source.originalLast; } } protected static class Remove extends Rewrite { public Remove(IHiddenRegion originalFirst, IHiddenRegion originalLast) { super(originalFirst, originalLast); } } protected static class Replace1 extends Rewrite implements Insert { private final IHiddenRegion modifiedFirst; private final IHiddenRegion modifiedLast; public Replace1(IHiddenRegion originalFirst, IHiddenRegion originalLast, IHiddenRegion modifiedFirst, IHiddenRegion modifiedLast) { super(originalFirst, originalLast); this.modifiedFirst = modifiedFirst; this.modifiedLast = modifiedLast; } @Override public IHiddenRegion getInsertFirst() { return this.modifiedFirst; } @Override public IHiddenRegion getInsertLast() { return this.modifiedLast; } } protected static class Preserve extends Rewrite implements Insert { public Preserve(IHiddenRegion first, IHiddenRegion last) { super(first, last); } @Override public IHiddenRegion getInsertFirst() { return this.originalFirst; } @Override public IHiddenRegion getInsertLast() { return this.originalLast; } @Override public boolean isDiff() { return false; } } public abstract static class Rewrite implements Comparable { protected IHiddenRegion originalFirst; protected IHiddenRegion originalLast; public Rewrite(IHiddenRegion originalFirst, IHiddenRegion originalLast) { super(); this.originalFirst = originalFirst; this.originalLast = originalLast; } public boolean isDiff() { return true; } @Override public int compareTo(Rewrite o) { return Integer.compare(originalFirst.getOffset(), o.originalFirst.getOffset()); } } protected static class Replace2 extends Rewrite implements Insert { private final TextRegionAccessBuildingSequencer sequencer; public Replace2(IHiddenRegion originalFirst, IHiddenRegion originalLast, TextRegionAccessBuildingSequencer sequencer) { super(originalFirst, originalLast); this.sequencer = sequencer; } @Override public IHiddenRegion getInsertFirst() { return sequencer.getRegionAccess().regionForRootEObject().getPreviousHiddenRegion(); } @Override public IHiddenRegion getInsertLast() { return sequencer.getRegionAccess().regionForRootEObject().getNextHiddenRegion(); } } private final ITextRegionAccess original; private List rewrites = Lists.newArrayList(); private Map changes = Maps.newHashMap(); public StringBasedTextRegionAccessDiffBuilder(ITextRegionAccess base) { super(); this.original = base; } protected void checkOriginal(ITextSegment segment) { Preconditions.checkNotNull(segment); Preconditions.checkArgument(original == segment.getTextRegionAccess()); } protected List createList() { List sorted = Lists.newArrayList(rewrites); Collections.sort(sorted); List result = Lists.newArrayListWithExpectedSize(sorted.size() * 2); IHiddenRegion last = original.regionForRootEObject().getPreviousHiddenRegion(); for (Rewrite rw : sorted) { int lastOffset = last.getOffset(); int rwOffset = rw.originalFirst.getOffset(); if (rwOffset == lastOffset) { result.add(rw); last = rw.originalLast; } else if (rwOffset > lastOffset) { result.add(new Preserve(last, rw.originalFirst)); result.add(rw); last = rw.originalLast; } else { LOG.error(""Error, conflicting document modifications.""); } } IHiddenRegion end = original.regionForRootEObject().getNextHiddenRegion(); if (last.getOffset() < end.getOffset()) { result.add(new Preserve(last, end)); } return result; } @Override public StringBasedTextRegionAccessDiff create() { StringBasedTextRegionAccessDiffAppender appender = createAppender(); IEObjectRegion root = original.regionForRootEObject(); appender.copyAndAppend(root.getPreviousHiddenRegion(), PREVIOUS); appender.copyAndAppend(root.getPreviousHiddenRegion(), CONTAINER); List rws = createList(); IHiddenRegion last = null; for (Rewrite rw : rws) { boolean diff = rw.isDiff(); if (diff) { appender.beginDiff(); } if (rw instanceof Insert) { Insert ins = (Insert) rw; IHiddenRegion f = ins.getInsertFirst(); IHiddenRegion l = ins.getInsertLast(); appender.copyAndAppend(f, NEXT); if (f != l) { appender.copyAndAppend(f.getNextSemanticRegion(), l.getPreviousSemanticRegion()); } appender.copyAndAppend(l, PREVIOUS); } if (diff) { appender.endDiff(); } if (rw.originalLast != last) { appender.copyAndAppend(rw.originalLast, CONTAINER); } last = rw.originalLast; } appender.copyAndAppend(root.getNextHiddenRegion(), NEXT); StringBasedTextRegionAccessDiff result = appender.finish(); AbstractEObjectRegion newRoot = result.regionForEObject(root.getSemanticElement()); result.setRootEObject(newRoot); return result; } protected StringBasedTextRegionAccessDiffAppender createAppender() { return new StringBasedTextRegionAccessDiffAppender(original, changes); } @Override public ITextRegionAccess getOriginalTextRegionAccess() { return original; } @Override public boolean isModified(ITextRegion region) { int offset = region.getOffset(); int endOffset = offset + region.getLength(); for (Rewrite action : rewrites) { int rwOffset = action.originalFirst.getOffset(); int rwEndOffset = action.originalLast.getEndOffset(); if (rwOffset <= offset && offset < rwEndOffset) { return true; } if (rwOffset < endOffset && endOffset <= rwEndOffset) { return true; } } return false; } @Override public void move(IHiddenRegion insertAt, IHiddenRegion substituteFirst, IHiddenRegion substituteLast) { checkOriginal(insertAt); checkOriginal(substituteFirst); checkOriginal(substituteLast); MoveSource source = new MoveSource(substituteFirst, substituteLast); MoveTarget target = new MoveTarget(insertAt, source); rewrites.add(source); rewrites.add(target); } @Override public void remove(IHiddenRegion first, IHiddenRegion last) { checkOriginal(first); checkOriginal(last); rewrites.add(new Remove(first, last)); } @Override public void remove(ISemanticRegion region) { remove(region.getPreviousHiddenRegion(), region.getNextHiddenRegion()); } @Override public void replace(IHiddenRegion originalFirst, IHiddenRegion originalLast, IHiddenRegion modifiedFirst, IHiddenRegion modifiedLast) { checkOriginal(originalFirst); checkOriginal(originalLast); rewrites.add(new Replace1(originalFirst, originalLast, modifiedFirst, modifiedLast)); } @Override public void replace(IHiddenRegion originalFirst, IHiddenRegion originalLast, ITextRegionAccess acc) { checkOriginal(originalFirst); checkOriginal(originalLast); IEObjectRegion substituteRoot = acc.regionForRootEObject(); IHiddenRegion substituteFirst = substituteRoot.getPreviousHiddenRegion(); IHiddenRegion substituteLast = substituteRoot.getNextHiddenRegion(); replace(originalFirst, originalLast, substituteFirst, substituteLast); } @Override public void replace(ISemanticRegion region, String newText) { Preconditions.checkNotNull(newText); checkOriginal(region); changes.put(region, newText); } @Override public ISequenceAcceptor replaceSequence(IHiddenRegion originalFirst, IHiddenRegion originalLast, ISerializationContext ctx, EObject root) { checkOriginal(originalFirst); checkOriginal(originalLast); TextRegionAccessBuildingSequencer sequenceAcceptor = new TextRegionAccessBuildingSequencer(); rewrites.add(new Replace2(originalFirst, originalLast, sequenceAcceptor)); return sequenceAcceptor.withRoot(ctx, root); } @Override public String toString() { try { StringBasedTextRegionAccessDiff regions = create(); return new TextRegionAccessToString().withRegionAccess(regions).toString(); } catch (Throwable t) { return t.getMessage() + ""\n"" + Throwables.getStackTraceAsString(t); } } }",0 "lass BatchSpec extends ObjectBehavior { function it_is_initializable() { $this->shouldHaveType('Money\Provider\Batch'); $this->shouldHaveType('Money\Provider'); } function it_should_have_providers(Provider $provider) { $this->hasProvider($provider)->shouldReturn(false); $this->addProvider($provider); $this->hasProvider($provider)->shouldReturn(true); } function it_should_be_able_to_get_a_rate(Provider $provider1, Provider $provider2) { $rate = 1.25; $baseCurrency = new Currency('EUR'); $counterCurrency = new Currency('USD'); $e = new UnsupportedCurrency($baseCurrency); $provider1->getRate($baseCurrency, $counterCurrency)->willThrow($e); $provider2->getRate($baseCurrency, $counterCurrency)->willReturn($rate); $this->addProvider($provider1); $this->addProvider($provider2); $this->getRate($baseCurrency, $counterCurrency)->shouldReturn($rate); } function it_should_throw_an_exception_when_called_without_providers() { $baseCurrency = new Currency('EUR'); $counterCurrency = new Currency('USD'); $this->shouldThrow('RuntimeException')->duringGetRate($baseCurrency, $counterCurrency); } function it_should_throw_an_exception_when_all_provider_fails(Provider $provider1, Provider $provider2) { $rate = 1.25; $baseCurrency = new Currency('EUR'); $counterCurrency = new Currency('USD'); $e = new UnsupportedCurrency($baseCurrency); $provider1->getRate($baseCurrency, $counterCurrency)->willThrow($e); $provider2->getRate($baseCurrency, $counterCurrency)->willThrow($e); $this->addProvider($provider1); $this->addProvider($provider2); $this->shouldThrow($e)->duringGetRate($baseCurrency, $counterCurrency); } function it_should_throw_an_exception_when_rate_cannot_be_determined(Provider $provider) { $rate = 1.25; $baseCurrency = new Currency('EUR'); $counterCurrency = new Currency('USD'); $provider->getRate($baseCurrency, $counterCurrency)->willReturn(null); $this->addProvider($provider); $this->shouldThrow('RuntimeException')->duringGetRate($baseCurrency, $counterCurrency); } } ",0 "icense""). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ namespace Aws\S3\Sync; use \FilesystemIterator as FI; use Aws\Common\Model\MultipartUpload\AbstractTransfer; use Aws\S3\Model\Acp; use Guzzle\Common\Event; use Guzzle\Service\Command\CommandInterface; class UploadSyncBuilder extends AbstractSyncBuilder { /** @var string|Acp Access control policy to set on each object */ protected $acp = 'private'; /** @var int */ protected $multipartUploadSize; /** * Set the path that contains files to recursively upload to Amazon S3 * * @param string $path Path that contains files to upload * * @return self */ public function uploadFromDirectory($path) { $this->baseDir = $path; $this->sourceIterator = $this->filterIterator(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator( $path, FI::SKIP_DOTS | FI::UNIX_PATHS | FI::FOLLOW_SYMLINKS ))); return $this; } /** * Set a glob expression that will match files to upload to Amazon S3 * * @param string $glob Glob expression * * @return self * @link http://www.php.net/manual/en/function.glob.php */ public function uploadFromGlob($glob) { $this->sourceIterator = $this->filterIterator( new \GlobIterator($glob, FI::SKIP_DOTS | FI::UNIX_PATHS | FI::FOLLOW_SYMLINKS) ); return $this; } /** * Set a canned ACL to apply to each uploaded object * * @param string $acl Canned ACL for each upload * * @return self */ public function setAcl($acl) { $this->acp = $acl; return $this; } /** * Set an Access Control Policy to apply to each uploaded object * * @param Acp $acp Access control policy * * @return self */ public function setAcp(Acp $acp) { $this->acp = $acp; return $this; } /** * Set the multipart upload size threshold. When the size of a file exceeds this value, the file will be uploaded * using a multipart upload. * * @param int $size Size threshold * * @return self */ public function setMultipartUploadSize($size) { $this->multipartUploadSize = $size; return $this; } protected function specificBuild() { $sync = new UploadSync(array( 'client' => $this->client, 'bucket' => $this->bucket, 'iterator' => $this->sourceIterator, 'source_converter' => $this->sourceConverter, 'target_converter' => $this->targetConverter, 'concurrency' => $this->concurrency, 'multipart_upload_size' => $this->multipartUploadSize, 'acl' => $this->acp )); return $sync; } protected function getTargetIterator() { return $this->createS3Iterator(); } protected function getDefaultSourceConverter() { return new KeyConverter($this->baseDir, $this->keyPrefix . $this->delimiter, $this->delimiter); } protected function getDefaultTargetConverter() { return new KeyConverter('s3://' . $this->bucket . '/', '', DIRECTORY_SEPARATOR); } protected function addDebugListener(AbstractSync $sync, $resource) { $sync->getEventDispatcher()->addListener(UploadSync::BEFORE_TRANSFER, function (Event $e) use ($resource) { $c = $e['command']; if ($c instanceof CommandInterface) { $uri = $c['Body']->getUri(); $size = $c['Body']->getSize(); fwrite($resource, ""Uploading {$uri} -> {$c['Key']} ({$size} bytes)\n""); return; } // Multipart upload $body = $c->getSource(); $totalSize = $body->getSize(); $progress = 0; fwrite($resource, ""Beginning multipart upload: "" . $body->getUri() . ' -> '); fwrite($resource, $c->getState()->getFromId('Key') . "" ({$totalSize} bytes)\n""); $c->getEventDispatcher()->addListener( AbstractTransfer::BEFORE_PART_UPLOAD, function ($e) use (&$progress, $totalSize, $resource) { $command = $e['command']; $size = $command['Body']->getContentLength(); $percentage = number_format(($progress / $totalSize) * 100, 2); fwrite($resource, ""- Part {$command['PartNumber']} ({$size} bytes, {$percentage}%)\n""); $progress .= $size; } ); }); } } ",0 " * * Project: Corsaro - Reporting * * Version: 1.69 * * Description: Arrows Oriented Modeling * * Copyright (C): 2015 Rodolfo Calzetti * * License GNU LESSER GENERAL PUBLIC LICENSE Version 3 * * Contact: https://github.com/cambusa * * postmaster@rudyz.net * ****************************************************************************/ include_once ""_config.php""; include_once $tocambusa.""sysconfig.php""; include_once $tocambusa.""rypaper/rypaper.php""; include_once $tocambusa.""ryquiver/quiversex.php""; if(isset($_POST[""sessionid""])) $sessionid=$_POST[""sessionid""]; else $sessionid=""""; if(isset($_POST[""env""])) $env=$_POST[""env""]; else $env=""""; if(isset($_POST[""pdf""])) $pdf=intval($_POST[""pdf""]); else $pdf=0; if(isset($_POST[""keys""])) $keys=$_POST[""keys""]; else $keys=array(); $paged=1; $landscape=1; $format=""A4""; // APRO IL DATABASE $maestro=maestro_opendb($env, false); if(qv_validatesession($maestro, $sessionid, ""quiver"")){ $PAPER->setformat('{""headerheight"":20,""paged"":'.$paged.',""pdf"":'.$pdf.',""landscape"":'.$landscape.',""format"":""'.$format.'"",""environ"":""'.$temp_environ.'""}'); function myheader(){ global $cust_header; global $PAPER; $PAPER->write(""
        "".$cust_header.""
        ""); $PAPER->write(""
        "".$PAPER->timereport().""
        ""); $PAPER->write(""
        TIPI MOTIVO
        ""); }; $PAPER->header=""myheader""; // INIZIO DEL DOCUMENTO $PAPER->begindocument(); // INIZIO TABELLA $PAPER->begintable( '[ {""d"":""Nome"",""w"":40,""t"":""""}, {""d"":""Descrizione"",""w"":90,""t"":""""}, {""d"":""Vista"",""w"":40,""t"":""""}, {""d"":""Tabella"",""w"":40,""t"":""""}, {""d"":""Gestione"",""w"":20,""t"":""""}, {""d"":""Estensione"",""w"":40,""t"":""""} ]' ); // QUERY REPERIMENTO DATI $in=""""; foreach($keys as $key => $SYSID){ if($in!="""") $in.="",""; $in.=""'$SYSID'""; } // ESEGUO LA QUERY maestro_query($maestro, ""SELECT * FROM QVMOTIVETYPES WHERE SYSID IN ($in)"", $r); for($i=0; $i0) $FIELDNAME=$PAPER->getvalue($d, 0, ""FIELDNAME""); else $FIELDNAME=""""; $PAPER->tablerow($PAPER->getvalue($r, $i, ""NAME""), $PAPER->getvalue($r, $i, ""DESCRIPTION""), $PAPER->getvalue($r, $i, ""VIEWNAME""), $PAPER->getvalue($r, $i, ""TABLENAME""), $PAPER->cboolean($r[$i][""DELETABLE""]), $FIELDNAME ); for($j=1; $jtablerow("""", ""...................."", ""...................."", ""...................."", ""...."", $PAPER->getvalue($d, $j, ""FIELDNAME"")); } } // FINE TABELLA $PAPER->endtable(); // FINE DEL DOCUMENTO $PAPER->enddocument(); // RESTITUISCO IL PERCORSO DEL DOCUMENTO print $PAPER->pathfile; } // CHIUDO IL DATABASE maestro_closedb($maestro); ?>",0 "her.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; public abstract class AirshipsBlock extends Block { public AirshipsBlock(Material material) { super(material); } public AirshipsBlock() { this(Material.rock); } @Override public String getUnlocalizedName() { return String.format(""tile.%s%s"", Reference.MOD_ID.toLowerCase() + "":"", getUnwrappedUnlocalizedName(super.getUnlocalizedName())); } @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { blockIcon = iconRegister.registerIcon(String.format(""%s"", getUnwrappedUnlocalizedName(this.getUnlocalizedName()))); } protected String getUnwrappedUnlocalizedName(String unlocalizedName) { return unlocalizedName.substring(unlocalizedName.indexOf(""."") + 1); } } ",0 "--> Posterior Predictive - Distributions for Clojure
        • Docs »
        • Posterior Predictive

        Posterior Predictive

        The posterior predictive is implemented as the composition of posterior and marginalization operations.

        Here are some examples...

        Normal Normal

        λ> (def data (sample (normal 3 1) 100))
        #'λ/data
        
        λ> (posterior-predictive data (normal :mu 1) (normal 0 5))
        #distributions.core.Normal{:mean 2.833833314407506, :variance 506/501}
        

        Poisson Gamma

        λ> (def data (sample (poisson 10) 100))
        #'λ/data
        
        λ> (posterior-predictive data (poisson :rate) (gamma 2 0.1))
        #distributions.core.NegativeBinomial{:failures 962, :probability 0.990108803165183}
        

        Dirichlet Process

        λ> (posterior-predictive [1.1 2.2 2.2] :G (dirichlet-process 10 (normal 0 1)))
        #distributions.core.Mixture{:components [#distributions.core.DiscreteReal{:locations (1.1 2.2), :probabilities (1/3 2/3)} #distributions.core.Normal{:mean 0, :variance 1}], :probabilities (1/11 10/11)}
        
        ",0 " com.facebook.imagepipeline.nativecode Details - Fresco API | Fresco

        package

        com.facebook.imagepipeline.nativecode

        Classes | Description

        +Generated by Doclava. +
        ",0 "oject_task(plc_t p) { // /**************start editing here***************************/ BYTE one, two, three; one = resolve(p, BOOL_DI, 1); two = fe(p, BOOL_DI, 2); three = re(p, BOOL_DI, 3); /* contact(p,BOOL_DQ,1,one); contact(p,BOOL_DQ,2,two); contact(p,BOOL_DQ,3,three); */ if (one) set(p, BOOL_TIMER, 0); if (three) reset(p, BOOL_TIMER, 0); if (two) down_timer(p, 0); return 0; /***************end of editable portion***********************/ } int project_init() { /*********************same here******************************/ return 0; } ",0 "nents/angular/angular.min.js"">
        {{todo.$value[orderAttr]}} {{todo.$error.data.message}} Click to revert.
        ",0 "startIndex > endIndex) { return -1; } int mid = startIndex + (endIndex - startIndex) / 2; if (num == arr[mid]) { return mid; } else if (num > arr[mid]) { return binarySearch(arr, num, mid + 1, endIndex); } else { return binarySearch(arr, num, startIndex, mid - 1); } } public static void main(String[] args) { Scanner s = new Scanner(System.in); int size = s.nextInt(); int[] arr = new int[size]; for (int i = 0; i < arr.length; i++) { arr[i] = s.nextInt(); } int num = s.nextInt(); int position = binarySearch(arr, num, 0, size - 1); if (position == -1) { System.out.println(""The number is not present in the array""); } else { System.out.println(""The position of number in array is : "" + position); } s.close(); } } ",0 "ing */ public function getId() : string; /** * @return Training */ public function getTraining() : Training; /** * @return SequenceNumber */ public function getSequenceNumber() : SequenceNumber; /** * @return GridSize */ public function getGridSize() : GridSize; /** * @return DateTime */ public function getStartedAt(); /** * @return Difficulty */ public function getDifficulty() : Difficulty; /** * @return int|null */ public function getSolutionAccuracy(); /** * @return bool */ public function isSolved() : bool; /** * @return bool */ public function isSolvedPerfectly() : bool; }",0 " CSS Test: 'object-fit: scale-down' on embed element, with a PNG image and with various 'object-position' values


        ",0 "enerated by javadoc (1.8.0_151) on Fri Apr 06 09:47:28 MST 2018 --> Uses of Interface org.wildfly.swarm.config.io.worker.OutboundBindAddressConsumer (BOM: * : All 2018.4.2 API)
        • Prev
        • Next

        Uses of Interface
        org.wildfly.swarm.config.io.worker.OutboundBindAddressConsumer

        • Prev
        • Next

        Copyright © 2018 JBoss by Red Hat. All rights reserved.

        ",0 "u can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * */ #ifndef __INTEL_MID_OTG_H #define __INTEL_MID_OTG_H #include #include #include #include struct intel_mid_otg_xceiv; /* This is a common data structure for Intel MID platform to * save values of the OTG state machine */ struct otg_hsm { /* Input */ int a_bus_resume; int a_bus_suspend; int a_conn; int a_sess_vld; int a_srp_det; int a_vbus_vld; int b_bus_resume; int b_bus_suspend; int b_conn; int b_se0_srp; int b_ssend_srp; int b_sess_end; int b_sess_vld; int id; /* id values */ #define ID_B 0x05 #define ID_A 0x04 #define ID_ACA_C 0x03 #define ID_ACA_B 0x02 #define ID_ACA_A 0x01 int power_up; int adp_change; int test_device; /* Internal variables */ int a_set_b_hnp_en; int b_srp_done; int b_hnp_enable; int hnp_poll_enable; /* Timeout indicator for timers */ int a_wait_vrise_tmout; int a_wait_bcon_tmout; int a_aidl_bdis_tmout; int a_bidl_adis_tmout; int a_bidl_adis_tmr; int a_wait_vfall_tmout; int b_ase0_brst_tmout; int b_bus_suspend_tmout; int b_srp_init_tmout; int b_srp_fail_tmout; int b_srp_fail_tmr; int b_adp_sense_tmout; int tst_maint_tmout; int tst_noadp_tmout; /* Informative variables */ int a_bus_drop; int a_bus_req; int a_clr_err; int b_bus_req; int a_suspend_req; int b_bus_suspend_vld; /* Output */ int drv_vbus; int loc_conn; int loc_sof; /* Others */ int vbus_srp_up; int ulpi_error; int ulpi_polling; /* Test Mode */ int otg_srp_reqd; int otg_hnp_reqd; int otg_vbus_off; int in_test_mode; }; /* must provide ULPI access function to read/write registers implemented in * ULPI address space */ struct iotg_ulpi_access_ops { int (*read)(struct intel_mid_otg_xceiv *iotg, u8 reg, u8 *val); int (*write)(struct intel_mid_otg_xceiv *iotg, u8 reg, u8 val); }; #define OTG_A_DEVICE 0x0 #define OTG_B_DEVICE 0x1 /* * the Intel MID (Langwell/Penwell) otg transceiver driver needs to interact * with device and host drivers to implement the USB OTG related feature. More * function members are added based on usb_phy data structure for this * purpose. */ struct intel_mid_otg_xceiv { struct usb_phy otg; struct otg_hsm hsm; /* base address */ void __iomem *base; /* ops to access ulpi */ struct iotg_ulpi_access_ops ulpi_ops; /* atomic notifier for interrupt context */ struct atomic_notifier_head iotg_notifier; /* hnp poll lock */ spinlock_t hnp_poll_lock; #ifdef CONFIG_USB_SUSPEND struct wake_lock wake_lock; #endif /* start/stop USB Host function */ int (*start_host)(struct intel_mid_otg_xceiv *iotg); int (*stop_host)(struct intel_mid_otg_xceiv *iotg); /* start/stop USB Peripheral function */ int (*start_peripheral)(struct intel_mid_otg_xceiv *iotg); int (*stop_peripheral)(struct intel_mid_otg_xceiv *iotg); /* start/stop ADP sense/probe function */ int (*set_adp_probe)(struct intel_mid_otg_xceiv *iotg, bool enabled, int dev); int (*set_adp_sense)(struct intel_mid_otg_xceiv *iotg, bool enabled); /* start/stop HNP Polling function */ int (*start_hnp_poll)(struct intel_mid_otg_xceiv *iotg); int (*stop_hnp_poll)(struct intel_mid_otg_xceiv *iotg); #ifdef CONFIG_PM /* suspend/resume USB host function */ int (*suspend_host)(struct intel_mid_otg_xceiv *iotg); int (*suspend_noirq_host)(struct intel_mid_otg_xceiv *iotg); int (*resume_host)(struct intel_mid_otg_xceiv *iotg); int (*resume_noirq_host)(struct intel_mid_otg_xceiv *iotg); int (*suspend_peripheral)(struct intel_mid_otg_xceiv *iotg, pm_message_t message); int (*resume_peripheral)(struct intel_mid_otg_xceiv *iotg); /* runtime suspend/resume */ int (*runtime_suspend_host)(struct intel_mid_otg_xceiv *iotg); int (*runtime_resume_host)(struct intel_mid_otg_xceiv *iotg); int (*runtime_suspend_peripheral)(struct intel_mid_otg_xceiv *iotg); int (*runtime_resume_peripheral)(struct intel_mid_otg_xceiv *iotg); #endif }; static inline struct intel_mid_otg_xceiv *otg_to_mid_xceiv(struct usb_phy *otg) { return container_of(otg, struct intel_mid_otg_xceiv, otg); } #define MID_OTG_NOTIFY_CONNECT 0x0001 #define MID_OTG_NOTIFY_DISCONN 0x0002 #define MID_OTG_NOTIFY_HSUSPEND 0x0003 #define MID_OTG_NOTIFY_HRESUME 0x0004 #define MID_OTG_NOTIFY_CSUSPEND 0x0005 #define MID_OTG_NOTIFY_CRESUME 0x0006 #define MID_OTG_NOTIFY_HOSTADD 0x0007 #define MID_OTG_NOTIFY_HOSTREMOVE 0x0008 #define MID_OTG_NOTIFY_CLIENTADD 0x0009 #define MID_OTG_NOTIFY_CLIENTREMOVE 0x000a #define MID_OTG_NOTIFY_CRESET 0x000b #define MID_OTG_NOTIFY_TEST_SRP_REQD 0x0101 #define MID_OTG_NOTIFY_TEST_VBUS_OFF 0x0102 #define MID_OTG_NOTIFY_TEST 0x0103 #define MID_OTG_NOTIFY_TEST_MODE_START 0x0104 #define MID_OTG_NOTIFY_TEST_MODE_STOP 0x0105 static inline int intel_mid_otg_register_notifier(struct intel_mid_otg_xceiv *iotg, struct notifier_block *nb) { return atomic_notifier_chain_register(&iotg->iotg_notifier, nb); } static inline void intel_mid_otg_unregister_notifier(struct intel_mid_otg_xceiv *iotg, struct notifier_block *nb) { atomic_notifier_chain_unregister(&iotg->iotg_notifier, nb); } #endif /* __INTEL_MID_OTG_H */ ",0 "te; import biz.dealnote.messenger.R; import biz.dealnote.messenger.link.internal.OwnerLinkSpanFactory; /** * Created by admin on 17.06.2017. * phoenix */ public class FormatUtil { public static Spannable formatCommunityBanInfo(Context context, int adminId, String adminName, long endDate, OwnerLinkSpanFactory.ActionListener adminClickListener){ String endDateString; if(endDate == 0){ endDateString = context.getString(R.string.forever).toLowerCase(); } else { Date date = new Date(endDate * 1000); String formattedDate = DateFormat.getDateInstance().format(date); String formattedTime = DateFormat.getTimeInstance().format(date); endDateString = context.getString(R.string.until_date_time, formattedDate, formattedTime); } String adminLink = OwnerLinkSpanFactory.genOwnerLink(adminId, adminName); String fullInfoText = context.getString(R.string.ban_admin_and_date_text, adminLink, endDateString); return OwnerLinkSpanFactory.withSpans(fullInfoText, true, false, adminClickListener); } }",0 """). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ package com.amazonaws.services.cloudsearchv2.model.transform; import javax.xml.stream.events.XMLEvent; import javax.annotation.Generated; import com.amazonaws.services.cloudsearchv2.model.*; import com.amazonaws.transform.Unmarshaller; import com.amazonaws.transform.StaxUnmarshallerContext; import com.amazonaws.transform.SimpleTypeStaxUnmarshallers.*; /** * UpdateDomainEndpointOptionsResult StAX Unmarshaller */ @Generated(""com.amazonaws:aws-java-sdk-code-generator"") public class UpdateDomainEndpointOptionsResultStaxUnmarshaller implements Unmarshaller { public UpdateDomainEndpointOptionsResult unmarshall(StaxUnmarshallerContext context) throws Exception { UpdateDomainEndpointOptionsResult updateDomainEndpointOptionsResult = new UpdateDomainEndpointOptionsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return updateDomainEndpointOptionsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression(""DomainEndpointOptions"", targetDepth)) { updateDomainEndpointOptionsResult.setDomainEndpointOptions(DomainEndpointOptionsStatusStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return updateDomainEndpointOptionsResult; } } } } private static UpdateDomainEndpointOptionsResultStaxUnmarshaller instance; public static UpdateDomainEndpointOptionsResultStaxUnmarshaller getInstance() { if (instance == null) instance = new UpdateDomainEndpointOptionsResultStaxUnmarshaller(); return instance; } } ",0 "ributors as noted in the AUTHORS file. This file is part of CZMQ, the high-level C binding for 0MQ: http://czmq.zeromq.org. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ========================================================================= */ #ifndef ZPROC_H_INCLUDED #define ZPROC_H_INCLUDED #ifdef __cplusplus extern ""C"" { #endif // @warning THE FOLLOWING @INTERFACE BLOCK IS AUTO-GENERATED BY ZPROJECT // @warning Please edit the model at ""api/zproc.xml"" to make changes. // @interface // This is a draft class, and may change without notice. It is disabled in // stable builds by default. If you use this in applications, please ask // for it to be pushed to stable state. Use --enable-drafts to enable. // Self test of this class. CZMQ_EXPORT void zproc_test (bool verbose); #ifdef CZMQ_BUILD_DRAFT_API // *** Draft method, for development use, may change without warning *** // Returns CZMQ version as a single 6-digit integer encoding the major // version (x 10000), the minor version (x 100) and the patch. CZMQ_EXPORT int zproc_czmq_version (void); // *** Draft method, for development use, may change without warning *** // Returns true if the process received a SIGINT or SIGTERM signal. // It is good practice to use this method to exit any infinite loop // processing messages. CZMQ_EXPORT bool zproc_interrupted (void); // *** Draft method, for development use, may change without warning *** // Returns true if the underlying libzmq supports CURVE security. CZMQ_EXPORT bool zproc_has_curve (void); // *** Draft method, for development use, may change without warning *** // Return current host name, for use in public tcp:// endpoints. // If the host name is not resolvable, returns NULL. // Caller owns return value and must destroy it when done. CZMQ_EXPORT char * zproc_hostname (void); // *** Draft method, for development use, may change without warning *** // Move the current process into the background. The precise effect // depends on the operating system. On POSIX boxes, moves to a specified // working directory (if specified), closes all file handles, reopens // stdin, stdout, and stderr to the null device, and sets the process to // ignore SIGHUP. On Windows, does nothing. Returns 0 if OK, -1 if there // was an error. CZMQ_EXPORT void zproc_daemonize (const char *workdir); // *** Draft method, for development use, may change without warning *** // Drop the process ID into the lockfile, with exclusive lock, and // switch the process to the specified group and/or user. Any of the // arguments may be null, indicating a no-op. Returns 0 on success, // -1 on failure. Note if you combine this with zsys_daemonize, run // after, not before that method, or the lockfile will hold the wrong // process ID. CZMQ_EXPORT void zproc_run_as (const char *lockfile, const char *group, const char *user); // *** Draft method, for development use, may change without warning *** // Configure the number of I/O threads that ZeroMQ will use. A good // rule of thumb is one thread per gigabit of traffic in or out. The // default is 1, sufficient for most applications. If the environment // variable ZSYS_IO_THREADS is defined, that provides the default. // Note that this method is valid only before any socket is created. CZMQ_EXPORT void zproc_set_io_threads (size_t io_threads); // *** Draft method, for development use, may change without warning *** // Configure the number of sockets that ZeroMQ will allow. The default // is 1024. The actual limit depends on the system, and you can query it // by using zsys_socket_limit (). A value of zero means ""maximum"". // Note that this method is valid only before any socket is created. CZMQ_EXPORT void zproc_set_max_sockets (size_t max_sockets); // *** Draft method, for development use, may change without warning *** // Set network interface name to use for broadcasts, particularly zbeacon. // This lets the interface be configured for test environments where required. // For example, on Mac OS X, zbeacon cannot bind to 255.255.255.255 which is // the default when there is no specified interface. If the environment // variable ZSYS_INTERFACE is set, use that as the default interface name. // Setting the interface to ""*"" means ""use all available interfaces"". CZMQ_EXPORT void zproc_set_biface (const char *value); // *** Draft method, for development use, may change without warning *** // Return network interface to use for broadcasts, or """" if none was set. CZMQ_EXPORT const char * zproc_biface (void); // *** Draft method, for development use, may change without warning *** // Set log identity, which is a string that prefixes all log messages sent // by this process. The log identity defaults to the environment variable // ZSYS_LOGIDENT, if that is set. CZMQ_EXPORT void zproc_set_log_ident (const char *value); // *** Draft method, for development use, may change without warning *** // Sends log output to a PUB socket bound to the specified endpoint. To // collect such log output, create a SUB socket, subscribe to the traffic // you care about, and connect to the endpoint. Log traffic is sent as a // single string frame, in the same format as when sent to stdout. The // log system supports a single sender; multiple calls to this method will // bind the same sender to multiple endpoints. To disable the sender, call // this method with a null argument. CZMQ_EXPORT void zproc_set_log_sender (const char *endpoint); // *** Draft method, for development use, may change without warning *** // Enable or disable logging to the system facility (syslog on POSIX boxes, // event log on Windows). By default this is disabled. CZMQ_EXPORT void zproc_set_log_system (bool logsystem); // *** Draft method, for development use, may change without warning *** // Log error condition - highest priority CZMQ_EXPORT void zproc_log_error (const char *format, ...) CHECK_PRINTF (1); // *** Draft method, for development use, may change without warning *** // Log warning condition - high priority CZMQ_EXPORT void zproc_log_warning (const char *format, ...) CHECK_PRINTF (1); // *** Draft method, for development use, may change without warning *** // Log normal, but significant, condition - normal priority CZMQ_EXPORT void zproc_log_notice (const char *format, ...) CHECK_PRINTF (1); // *** Draft method, for development use, may change without warning *** // Log informational message - low priority CZMQ_EXPORT void zproc_log_info (const char *format, ...) CHECK_PRINTF (1); // *** Draft method, for development use, may change without warning *** // Log debug-level message - lowest priority CZMQ_EXPORT void zproc_log_debug (const char *format, ...) CHECK_PRINTF (1); #endif // CZMQ_BUILD_DRAFT_API // @end #ifdef __cplusplus } #endif #endif ",0 " disjunction of string matches. * Instead of filtering on ""column ~= filter"", filters on (columns[0] ~= filter or ... or columns[n - 1] ~= filter). * * @author jtremeaux */ public class OrStringFilterColumn extends StringFilterColumn { private String[] columns; public OrStringFilterColumn(String column, String filter, String... columns) { super(column, filter); this.columns = columns; } @Override public String getPredicate() { List predicates = new ArrayList<>(); for (String c : columns) { StringFilterColumn f = new StringFilterColumn(c, filter) { @Override public String getParamName() { return ""filtercolumn_"" + OrStringFilterColumn.this.hashCode(); } }; predicates.add(f.getPredicate()); } return ""("" + StringUtils.join(predicates, "" or "") + "")""; } } ",0 "e org.wahlzeit.servlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; /** * A null servlet. */ public class NullServlet extends AbstractServlet { /** * */ private static final long serialVersionUID = 42L; // any one does; class never serialized /** * */ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { displayNullPage(request, response); } /** * */ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { displayNullPage(request, response); } } ",0 "tdio.h> #include #include #include #include #include #include #include static char x86_stack_ids[][8] = { [ REGULAR_INT_STACK ] = ""INT"", [ STACKFAULT_STACK ] = ""#SF"", [ DEBUG_STACK ] = ""#DB"", [ NMI_STACK ] = ""NMI"", [ DOUBLEFAULT_STACK ] = ""#DF"", [ MCE_STACK ] = ""#MC"", [ EXCEPTION_STACK ] = ""EXC"", }; extern u8 _ist_stacks_start, _ist_stacks_end, _stack_start, _stack_end; static unsigned long *in_exception_stack(unsigned long stack, unsigned *usedp, char **idp) { unsigned k; unsigned long stacks_start = ((unsigned long)&_ist_stacks_start) + IRQ_STACK_SIZE; /* * Iterate over all exception stacks, and figure out whether * 'stack' is in one of them: * IST stack 0 is the regular interrupt stack. */ for (k = STACKFAULT_STACK; k < N_EXCEPTION_STACKS; k++) { unsigned long end = stacks_start - IRQ_STACK_SIZE; stacks_start -= IRQ_STACK_SIZE; /* * Is 'stack' above this exception frame's end? * If yes then skip to the next frame. */ if (stack <= end) continue; /* * Is 'stack' above this exception frame's start address? * If yes then we found the right frame. */ if (stack <= end - IRQ_STACK_SIZE) { /* * Make sure we only iterate through an exception * stack once. If it comes up for the second time * then there's something wrong going on - just * break out and return NULL: */ if (*usedp & (1U << k)) break; *usedp |= 1U << k; *idp = x86_stack_ids[k]; return (unsigned long *)end; } } return NULL; } static inline int in_irq_stack(unsigned long *stack, unsigned long *irq_stack, unsigned long *irq_stack_end) { return (stack <= irq_stack && stack > irq_stack_end); } /* * x86-64 can have up to three kernel stacks: * process stack * interrupt stack * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack */ void dump_trace(struct arch_regs *regs, unsigned long *stack, unsigned long bp, const struct stacktrace_ops *ops, void *data) { unsigned long irq_stack_start = (unsigned long)&_ist_stacks_start; unsigned long *irq_stack_end = (unsigned long *)(irq_stack_start + IRQ_STACK_SIZE); unsigned long *execution_stack_end = (unsigned long *)&_stack_end; unsigned used = 0; unsigned long dummy; if (!stack) { if (regs) stack = (unsigned long *)regs->rsp; else stack = &dummy; } if (!bp) { bp = stack_frame(regs); if (!bp) get_bp(bp); } /* * Print function call entries in all stacks, starting at the * current stack address. If the stacks consist of nested * exceptions */ for (;;) { char *id; unsigned long *estack_end; estack_end = in_exception_stack((unsigned long)stack, &used, &id); if (estack_end) { if (ops->stack(data, id) < 0) break; bp = ops->walk_stack(stack, bp, ops, data, estack_end); ops->stack(data, """"); /* * We link to the next stack via the * second-to-last pointer (index -2 to end) in the * exception stack: */ stack = (unsigned long *) estack_end[-2]; continue; } if (irq_stack_end) { unsigned long *irq_stack; irq_stack = (unsigned long *)(irq_stack_end + (0x1000UL - 64) / sizeof(*irq_stack)); if (in_irq_stack(stack, irq_stack, irq_stack_end)) { if (ops->stack(data, ""IRQ"") < 0) break; bp = ops->walk_stack(stack, bp, ops, data, irq_stack_end); /* * We link to the next stack (which would be * the process stack normally) the last * pointer (index -1 to end) in the IRQ stack: */ stack = (unsigned long *) (irq_stack_end[-1]); irq_stack_end = NULL; ops->stack(data, ""EOI""); continue; } } if (execution_stack_end) { unsigned long *irq_stack; irq_stack = (unsigned long *)((u64)execution_stack_end + (0x2000UL - 64) / sizeof(*irq_stack)); if (in_irq_stack(stack, irq_stack, execution_stack_end)) { if (regs) ops->address(data, regs->rip, 1); if (ops->stack(data, ""EXEC"") < 0) break; bp = ops->walk_stack(stack, bp, ops, data, execution_stack_end); /* * We link to the next stack (which would be * the process stack normally) the last * pointer (index -1 to end) in the IRQ stack: */ stack = (unsigned long *) (execution_stack_end[-1]); execution_stack_end = NULL; ops->stack(data, ""EOI""); continue; } } break; } } void show_stack_log_lvl(struct arch_regs *regs, unsigned long *sp, unsigned long bp, char *log_lvl) { unsigned long *irq_stack_end; unsigned long *irq_stack; unsigned long *stack; int i; irq_stack = (unsigned long *)&_ist_stacks_start; irq_stack_end = (unsigned long *)((unsigned long)irq_stack + 0x1000UL); /* * Debugging aid: ""show_stack(NULL, NULL);"" prints the * back trace for this cpu: */ if (sp == NULL) { sp = (unsigned long *)&sp; } extern int kstack_depth_to_print; stack = sp; for (i = 0; i < kstack_depth_to_print; i++) { if (stack >= irq_stack && stack <= irq_stack_end) { if (stack == irq_stack_end) { stack = (unsigned long *) (irq_stack_end[-1]); vmm_printf("" ""); } } else { if (i && ((i % STACKSLOTS_PER_LINE) == 0)) vmm_printf(""\n""); vmm_printf("" %016lx"", *stack++); //touch_nmi_watchdog(); } } vmm_printf(""\n""); show_trace_log_lvl(regs, sp, bp, log_lvl); } /* Prints also some state that isn't saved in the pt_regs */ void __show_regs(struct arch_regs *regs, int all) { //unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L, fs, gs, shadowgs; //unsigned long d0, d1, d2, d3, d6, d7; unsigned int fsindex, gsindex; unsigned int ds, cs, es; vmm_printf(""RIP: %04lx:[<%016lx>] "", regs->cs & 0xffff, regs->rip); vmm_printf(""RSP: %04lx:%016lx EFLAGS: %08lx\n"", regs->ss, regs->rsp, regs->rflags); vmm_printf(""RAX: %016lx RBX: %016lx RCX: %016lx\n"", regs->rax, regs->rbx, regs->rcx); vmm_printf(""RDX: %016lx RSI: %016lx RDI: %016lx\n"", regs->rdx, regs->rsi, regs->rdi); vmm_printf(""RBP: %016lx R08: %016lx R09: %016lx\n"", regs->rbp, regs->r8, regs->r9); vmm_printf(""R10: %016lx R11: %016lx R12: %016lx\n"", regs->r10, regs->r11, regs->r12); vmm_printf(""R13: %016lx R14: %016lx R15: %016lx\n"", regs->r13, regs->r14, regs->r15); asm(""movl %%ds,%0"" : ""=r"" (ds)); asm(""movl %%cs,%0"" : ""=r"" (cs)); asm(""movl %%es,%0"" : ""=r"" (es)); asm(""movl %%fs,%0"" : ""=r"" (fsindex)); asm(""movl %%gs,%0"" : ""=r"" (gsindex)); #if 0 fs = rdmsrl(MSR_FS_BASE); gs = rdmsrl(MSR_GS_BASE); shadowgs = rdmsrl(MSR_KERNEL_GS_BASE); if (!all) return; cr0 = read_cr0(); cr2 = read_cr2(); cr3 = read_cr3(); cr4 = read_cr4(); vmm_printf(""FS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n"", fs, fsindex, gs, gsindex, shadowgs); vmm_printf(""CS: %04x DS: %04x ES: %04x CR0: %016lx\n"", cs, ds, es, cr0); vmm_printf(""CR2: %016lx CR3: %016lx CR4: %016lx\n"", cr2, cr3, cr4); #endif } void show_regs(struct arch_regs *regs) { //int i; unsigned long sp; //unsigned int code_prologue = code_bytes * 43 / 64; //unsigned int code_len = code_bytes; //unsigned char c; //u8 *ip; sp = regs->rsp; __show_regs(regs, 1); vmm_printf(""Stack:\n""); show_stack_log_lvl(regs, (unsigned long *)sp, 0, 0); #if 0 vmm_printf(""Code: ""); ip = (u8 *)regs->rip - code_prologue; if (ip < (u8 *)VMM_PAGE_OFFSET) { /* try starting at IP */ ip = (u8 *)regs->rip; code_len = code_len - code_prologue + 1; } #endif } ",0 "MenuRemote('116');""> ",0 " * * OpenNI 2.x Alpha * * Copyright (C) 2012 PrimeSense Ltd. * * * * This file is part of OpenNI. * * * * 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. * * * *****************************************************************************/ #ifndef _ONI_ENUMS_H_ #define _ONI_ENUMS_H_ namespace kinect { /** Possible failure values */ typedef enum { STATUS_OK = 0, STATUS_ERROR = 1, STATUS_NOT_IMPLEMENTED = 2, STATUS_NOT_SUPPORTED = 3, STATUS_BAD_PARAMETER = 4, STATUS_OUT_OF_FLOW = 5, STATUS_NO_DEVICE = 6, STATUS_TIME_OUT = 102, } Status; /** The source of the stream */ typedef enum { SENSOR_IR = 1, SENSOR_COLOR = 2, SENSOR_DEPTH = 3, } SensorType; /** All available formats of the output of a stream */ typedef enum { // Depth PIXEL_FORMAT_DEPTH_1_MM = 100, PIXEL_FORMAT_DEPTH_100_UM = 101, PIXEL_FORMAT_SHIFT_9_2 = 102, PIXEL_FORMAT_SHIFT_9_3 = 103, // Color PIXEL_FORMAT_RGB888 = 200, PIXEL_FORMAT_YUV422 = 201, PIXEL_FORMAT_GRAY8 = 202, PIXEL_FORMAT_GRAY16 = 203, PIXEL_FORMAT_JPEG = 204, } PixelFormat; typedef enum { DEVICE_STATE_OK = 0, DEVICE_STATE_ERROR = 1, DEVICE_STATE_NOT_READY = 2, DEVICE_STATE_EOF = 3 } DeviceState; typedef enum { IMAGE_REGISTRATION_OFF = 0, IMAGE_REGISTRATION_DEPTH_TO_COLOR = 1, } ImageRegistrationMode; static const int TIMEOUT_NONE = 0; static const int TIMEOUT_FOREVER = -1; } // namespace openni #endif // _ONI_ENUMS_H_ ",0 "- /.box-header -->
        @endsection",0 "in 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. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.logging.v2.model; /** * Specifies a location in a source code file. * *

        This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: * https://developers.google.com/api-client-library/java/google-http-java-client/json *

        * * @author Google, Inc. */ @SuppressWarnings(""javadoc"") public final class SourceLocation extends com.google.api.client.json.GenericJson { /** * Source file name. Depending on the runtime environment, this might be a simple name or a fully- * qualified name. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String file; /** * Human-readable name of the function or method being invoked, with optional context such as the * class or package name. This information is used in contexts such as the logs viewer, where a * file and line number are less meaningful. The format can vary by language. For example: * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String functionName; /** * Line within the source file. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long line; /** * Source file name. Depending on the runtime environment, this might be a simple name or a fully- * qualified name. * @return value or {@code null} for none */ public java.lang.String getFile() { return file; } /** * Source file name. Depending on the runtime environment, this might be a simple name or a fully- * qualified name. * @param file file or {@code null} for none */ public SourceLocation setFile(java.lang.String file) { this.file = file; return this; } /** * Human-readable name of the function or method being invoked, with optional context such as the * class or package name. This information is used in contexts such as the logs viewer, where a * file and line number are less meaningful. The format can vary by language. For example: * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). * @return value or {@code null} for none */ public java.lang.String getFunctionName() { return functionName; } /** * Human-readable name of the function or method being invoked, with optional context such as the * class or package name. This information is used in contexts such as the logs viewer, where a * file and line number are less meaningful. The format can vary by language. For example: * qual.if.ied.Class.method (Java), dir/package.func (Go), function (Python). * @param functionName functionName or {@code null} for none */ public SourceLocation setFunctionName(java.lang.String functionName) { this.functionName = functionName; return this; } /** * Line within the source file. * @return value or {@code null} for none */ public java.lang.Long getLine() { return line; } /** * Line within the source file. * @param line line or {@code null} for none */ public SourceLocation setLine(java.lang.Long line) { this.line = line; return this; } @Override public SourceLocation set(String fieldName, Object value) { return (SourceLocation) super.set(fieldName, value); } @Override public SourceLocation clone() { return (SourceLocation) super.clone(); } } ",0 "ration and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** Commercial Usage ** ** Licensees holding valid Qt Commercial licenses may use this file in ** accordance with the Qt Commercial License Agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Nokia. ** ** GNU Lesser General Public License Usage ** ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. ** **************************************************************************/ #ifndef OPENWITHDIALOG_H #define OPENWITHDIALOG_H #include #include ""ui_openwithdialog.h"" namespace Core { class ICore; namespace Internal { // Present the user with a file name and a list of available // editor kinds to choose from. class OpenWithDialog : public QDialog, public Ui::OpenWithDialog { Q_OBJECT public: OpenWithDialog(const QString &fileName, QWidget *parent); void setEditors(const QStringList &); QString editor() const; void setCurrentEditor(int index); private slots: void currentItemChanged(QListWidgetItem *, QListWidgetItem *); private: void setOkButtonEnabled(bool); }; } // namespace Internal } // namespace Core #endif // OPENWITHDIALOG_H ",0 "ivate $downloadDir; /** * Relative to web/ */ const RELATIVE_DOWNLOAD_DIR = ""downloads""; /** * @param $baseDir */ public function __construct ($baseDir) { $this->downloadDir = rtrim($baseDir, ""/"") . ""/web/"" . self::RELATIVE_DOWNLOAD_DIR; } /** * Returns a list of all downloads * * @return Download[] */ public function getAllDownloads () { try { $directoryIterator = new \DirectoryIterator($this->downloadDir); $downloads = []; foreach ($directoryIterator as $file) { if (!$file->isFile()) { continue; } // skip hidden files if (""."" === $file->getBasename()[0]) { continue; } $downloads[$file->getFilename()] = new Download($file, self::RELATIVE_DOWNLOAD_DIR); } ksort($downloads); return $downloads; } catch (\UnexpectedValueException $e) { return []; } } } ",0 "enerated by javadoc (1.8.0_131) on Sat Oct 28 21:24:43 CEST 2017 --> Uses of Class fr.cryptohash.CubeHashCore (burstcoin 1.3.6cg API)
        • Prev
        • Next

        Uses of Class
        fr.cryptohash.CubeHashCore

        • Prev
        • Next

        Copyright © 2017. All rights reserved.

        ",0 " http://www.gambio.de Copyright (c) 2013 Gambio GmbH Released under the GNU General Public License (Version 2) [http://www.gnu.org/licenses/gpl-2.0.html] -------------------------------------------------------------- */ class PayoneCheckoutCreditRiskContentView extends ContentView { protected $_payone; public function PayoneCheckoutCreditRiskContentView() { $this->set_content_template('module/checkout_payone_cr.html'); $this->_payone = new GMPayOne(); } function get_html() { $config = $this->_payone->getConfig(); if($_SERVER['REQUEST_METHOD'] == 'POST') { header('Content-Type: text/plain'); if(isset($_POST['confirm'])) { // A/B testing: only perform scoring every n-th time $do_score = true; if($config['credit_risk']['abtest']['active'] == 'true') { $ab_value = max(1, (int)$config['credit_risk']['abtest']['value']); $score_count = (int)gm_get_conf('PAYONE_CONSUMERSCORE_ABCOUNTER'); $do_score = ($score_count % $ab_value) == 0; gm_set_conf('PAYONE_CONSUMERSCORE_ABCOUNTER', $score_count + 1); } if($do_score) { $score = $this->_payone->scoreCustomer($_SESSION['billto']); } else { $score = false; } if($score instanceof Payone_Api_Response_Consumerscore_Valid) { switch((string)$score->getScore()) { case 'G': $_SESSION['payone_cr_result'] = 'green'; break; case 'Y': $_SESSION['payone_cr_result'] = 'yellow'; break; case 'R': $_SESSION['payone_cr_result'] = 'red'; break; default: $_SESSION['payone_cr_result'] = $config['credit_risk']['newclientdefault']; } $_SESSION['payone_cr_hash'] = $this->_payone->getAddressHash($_SESSION['billto']); } else { // could not get a score value $_SESSION['payone_cr_result'] = $config['credit_risk']['newclientdefault']; $_SESSION['payone_cr_hash'] = $this->_payone->getAddressHash($_SESSION['billto']); } if($config['credit_risk']['timeofcheck'] == 'before') { xtc_redirect(GM_HTTP_SERVER.DIR_WS_CATALOG.FILENAME_CHECKOUT_PAYMENT); } else { xtc_redirect(GM_HTTP_SERVER.DIR_WS_CATALOG.FILENAME_CHECKOUT_CONFIRMATION); } } else if(isset($_POST['noconfirm'])) { if($config['credit_risk']['timeofcheck'] == 'before') { xtc_redirect(GM_HTTP_SERVER.DIR_WS_CATALOG.FILENAME_CHECKOUT_PAYMENT.'?p1crskip=1'); } else { xtc_redirect(GM_HTTP_SERVER.DIR_WS_CATALOG.FILENAME_CHECKOUT_CONFIRMATION.'?p1crskip=1'); } } } $this->set_content_data('notice', $config['credit_risk']['notice']['text']); $this->set_content_data('confirmation', $config['credit_risk']['confirmation']['text']); $t_html_output = $this->build_html(); return $t_html_output; } } ",0 "enerated by javadoc (version 1.7.0_51) on Thu Apr 28 18:37:57 UTC 2016 --> Uses of Class org.apache.cassandra.cql3.restrictions.MultiColumnRestriction.IN (apache-cassandra API)
        • Prev
        • Next

        Uses of Class
        org.apache.cassandra.cql3.restrictions.MultiColumnRestriction.IN

        • Prev
        • Next

        Copyright © 2016 The Apache Software Foundation

        ",0 " file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #pragma once // Third Party Headers: #include ""lldb/API/SBValue.h"" #include // In-house headers: #include ""MIUtilString.h"" //++ //============================================================================ // Details: MI debug session variable object. The static functionality in *this // class manages a map container of *these variable objects. //-- class CMICmnLLDBDebugSessionInfoVarObj { // Enums: public: //++ ---------------------------------------------------------------------- // Details: Enumeration of a variable type that is not a composite type //-- enum varFormat_e { // CODETAG_SESSIONINFO_VARFORMAT_ENUM // *** Order is import here *** eVarFormat_Invalid = 0, eVarFormat_Binary, eVarFormat_Octal, eVarFormat_Decimal, eVarFormat_Hex, eVarFormat_Natural, eVarFormat_count // Always last one }; //++ ---------------------------------------------------------------------- // Details: Enumeration of a variable type by composite or internal type //-- enum varType_e { eVarType_InValid = 0, eVarType_Composite, // i.e. struct eVarType_Internal, // i.e. int eVarType_count // Always last one }; // Statics: public: static varFormat_e GetVarFormatForString(const CMIUtilString &vrStrFormat); static varFormat_e GetVarFormatForChar(char vcFormat); static CMIUtilString GetValueStringFormatted(const lldb::SBValue &vrValue, const varFormat_e veVarFormat); static void VarObjAdd(const CMICmnLLDBDebugSessionInfoVarObj &vrVarObj); static void VarObjDelete(const CMIUtilString &vrVarName); static bool VarObjGet(const CMIUtilString &vrVarName, CMICmnLLDBDebugSessionInfoVarObj &vrwVarObj); static void VarObjUpdate(const CMICmnLLDBDebugSessionInfoVarObj &vrVarObj); static void VarObjIdInc(); static MIuint VarObjIdGet(); static void VarObjIdResetToZero(); static void VarObjClear(); static void VarObjSetFormat(varFormat_e eDefaultFormat); // Methods: public: /* ctor */ CMICmnLLDBDebugSessionInfoVarObj(); /* ctor */ CMICmnLLDBDebugSessionInfoVarObj( const CMIUtilString &vrStrNameReal, const CMIUtilString &vrStrName, const lldb::SBValue &vrValue); /* ctor */ CMICmnLLDBDebugSessionInfoVarObj( const CMIUtilString &vrStrNameReal, const CMIUtilString &vrStrName, const lldb::SBValue &vrValue, const CMIUtilString &vrStrVarObjParentName); /* ctor */ CMICmnLLDBDebugSessionInfoVarObj( const CMICmnLLDBDebugSessionInfoVarObj &vrOther); /* ctor */ CMICmnLLDBDebugSessionInfoVarObj( CMICmnLLDBDebugSessionInfoVarObj &vrOther); /* ctor */ CMICmnLLDBDebugSessionInfoVarObj( CMICmnLLDBDebugSessionInfoVarObj &&vrOther); // CMICmnLLDBDebugSessionInfoVarObj & operator=(const CMICmnLLDBDebugSessionInfoVarObj &vrOther); CMICmnLLDBDebugSessionInfoVarObj & operator=(CMICmnLLDBDebugSessionInfoVarObj &&vrwOther); // const CMIUtilString &GetName() const; const CMIUtilString &GetNameReal() const; const CMIUtilString &GetValueFormatted() const; lldb::SBValue &GetValue(); const lldb::SBValue &GetValue() const; varType_e GetType() const; bool SetVarFormat(const varFormat_e veVarFormat); const CMIUtilString &GetVarParentName() const; void UpdateValue(); // Overridden: public: // From CMICmnBase /* dtor */ virtual ~CMICmnLLDBDebugSessionInfoVarObj(); // Typedefs: private: typedef std::map MapKeyToVarObj_t; typedef std::pair MapPairKeyToVarObj_t; // Statics: private: static CMIUtilString GetStringFormatted(const MIuint64 vnValue, const char *vpStrValueNatural, varFormat_e veVarFormat); // Methods: private: bool CopyOther(const CMICmnLLDBDebugSessionInfoVarObj &vrOther); bool MoveOther(CMICmnLLDBDebugSessionInfoVarObj &vrwOther); // Attributes: private: static const char *ms_aVarFormatStrings[]; static const char *ms_aVarFormatChars[]; static MapKeyToVarObj_t ms_mapVarIdToVarObj; static MIuint ms_nVarUniqueId; static varFormat_e ms_eDefaultFormat; // overrides ""natural"" format // // *** Update the copy move constructors and assignment operator *** varFormat_e m_eVarFormat; varType_e m_eVarType; CMIUtilString m_strName; lldb::SBValue m_SBValue; CMIUtilString m_strNameReal; CMIUtilString m_strFormattedValue; CMIUtilString m_strVarObjParentName; // *** Update the copy move constructors and assignment operator *** }; ",0 "\ActiveForm */ ?>
        field($model, 'status')->textInput() ?>
        isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
        ",0 "stion; import com.github.mikhailerofeev.scholarm.local.entities.QuestionImpl; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.google.inject.Inject; import java.io.*; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import java.util.Set; /** * @author m-erofeev * @since 22.08.14 */ public class QuestionsManager { private final Application application; private List questions; private Long maxId; @Inject public QuestionsManager(Application application) { this.application = application; } public List getQuestions(Set questionThemesAndSubthemesNames) { List ret = new ArrayList<>(); for (QuestionImpl question : questions) { if (questionThemesAndSubthemesNames.contains(question.getThemeName())) { ret.add(question); } } return ret; } @Inject public synchronized void init() { System.out.println(""init QuestionsManager""); System.out.println(""our dir: "" + application.getApplicationContext().getFilesDir()); maxId = 0L; File dataFile = getDataFile(); if (!dataFile.exists()) { System.out.println(dataFile.getAbsolutePath() + "" not exists""); if (!tryToLoadAssets()) { questions = new ArrayList<>(); } return; } FileReader fileReader; try { fileReader = new FileReader(dataFile); } catch (FileNotFoundException e) { throw new RuntimeException(e); } readQuestions(fileReader); } private void readQuestions(Reader fileReader) { Type type = new TypeToken>() { }.getType(); questions = new Gson().fromJson(fileReader, type); for (QuestionImpl question : questions) { if (maxId < question.getId()) { maxId = question.getId(); } } } private boolean tryToLoadAssets() { if (application.getAssets() == null) { return false; } try { Reader inputStreamReader = new InputStreamReader(application.getAssets().open(""database.json"")); readQuestions(inputStreamReader); } catch (IOException e) { e.printStackTrace(); return false; } return true; } public synchronized void addQuestions(List questionsToAdd) { for (QuestionImpl question : questionsToAdd) { question.setId(maxId++); this.questions.add(question); } File dataFile = getDataFile(); dataFile.delete(); try { if (!dataFile.createNewFile()) { throw new RuntimeException(""can't create file""); } String questionsStr = new Gson().toJson(this.questions); FileWriter writer = new FileWriter(dataFile); writer.append(questionsStr); writer.close(); } catch (IOException e) { throw new RuntimeException(e); } } private File getDataFile() { File filesDir = application.getApplicationContext().getFilesDir(); return new File(filesDir.getAbsolutePath() + ""database.json""); } } ",0 "edistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef INCLUDED_TCP_CONNECTION_H #define INCLUDED_TCP_CONNECTION_H #include #include #include #include #include namespace gr { namespace blocks { class tcp_connection { private: boost::asio::ip::tcp::socket d_socket; std::vector d_buf; block* d_block; bool d_no_delay; tcp_connection(boost::asio::io_service& io_service, int MTU = 10000, bool no_delay = false); public: typedef boost::shared_ptr sptr; static sptr make(boost::asio::io_service& io_service, int MTU = 10000, bool no_delay = false); boost::asio::ip::tcp::socket& socket() { return d_socket; }; void start(gr::block* block); void send(pmt::pmt_t vector); void handle_read(const boost::system::error_code& error, size_t bytes_transferred); void handle_write(boost::shared_ptr txbuf, const boost::system::error_code& error, size_t bytes_transferred) { } }; } /* namespace blocks */ } /* namespace gr */ #endif /* INCLUDED_TCP_CONNECTION_H */ ",0 "le>tarski-geometry: Not compatible 👼
        « Up

        tarski-geometry 8.7.0 Not compatible 👼

        📅 (2021-10-21 07:12:33 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-num            base        Num library distributed with the OCaml compiler
        base-threads        base
        base-unix           base
        camlp5              7.14        Preprocessor-pretty-printer of OCaml
        conf-findutils      1           Virtual package relying on findutils
        conf-perl           1           Virtual package relying on perl
        coq                 8.8.1       Formal proof management system
        num                 0           The Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.05.0      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.05.0      Official 4.05.0 release
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.9.1       A library manager for OCaml
        # opam file:
        opam-version: "2.0"
        maintainer: "Hugo.Herbelin@inria.fr"
        homepage: "https://github.com/coq-contribs/tarski-geometry"
        license: "GPL"
        build: [make "-j%{jobs}%"]
        install: [make "install"]
        remove: ["rm" "-R" "%{lib}%/coq/user-contrib/TarskiGeometry"]
        depends: [
          "ocaml"
          "coq" {>= "8.7" & < "8.8~"}
        ]
        tags: [ "keyword: geometry" "keyword: Tarski's geometry" "keyword: congruence" "keyword: between property" "keyword: orthogonality" "category: Mathematics/Geometry/General" "date: 2006-03" ]
        authors: [ "Julien Narboux <Julien.Narboux@dpt-info.u-strasbg.fr> [http://dpt-info.u-strasbg.fr/~narboux/]" ]
        bug-reports: "https://github.com/coq-contribs/tarski-geometry/issues"
        dev-repo: "git+https://github.com/coq-contribs/tarski-geometry.git"
        synopsis: "Tarski's geometry"
        description: """
        http://dpt-info.u-strasbg.fr/~narboux/tarski.html
        This is a formalization of geometry using a simplified version of Tarski's axiom system. The development contains a formalization of the chapters 1-8 of the book "Metamathematische Methoden in der Geometrie" by W. Schwabhäuser, W. Szmielew and A. Tarski.
        This includes between properties, congruence properties,
          midpoint, perpendicular lines, point reflection, orthogonality ...
        This development aims to be a low level complement for Frédérique Guilhot's development about high-school geometry.
        For more information see:
        Mechanical Theorem Proving in Tarski's geometry in the post-proceeding of ADG 2006, F. Botana and T. Recio (Eds.), LNAI 4869, pages 139-156, 2007."""
        flags: light-uninstall
        url {
          src:
            "https://github.com/coq-contribs/tarski-geometry/archive/v8.7.0.tar.gz"
          checksum: "md5=e7ef6439d7b26dbeb3dea11929f1e536"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-tarski-geometry.8.7.0 coq.8.8.1
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.8.1).
        The following dependencies couldn't be met:
          - coq-tarski-geometry -> coq < 8.8~ -> ocaml < 4.03.0
              base of this switch (use `--unlock-base' to force)
        Your request can't be satisfied:
          - No available version of coq satisfies the constraints
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-tarski-geometry.8.7.0
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "enerated by javadoc (1.8.0_66) on Sat Nov 28 10:51:55 EST 2015 --> VariableQuantumIndexWriter (MG4J (big) 5.4.1)
        • Summary: 
        • Nested | 
        • Field | 
        • Constr | 
        • Method
        • Detail: 
        • Field | 
        • Constr | 
        • Method
        it.unimi.di.big.mg4j.index

        Interface VariableQuantumIndexWriter

        • All Known Implementing Classes:
          BitStreamHPIndexWriter, SkipBitStreamIndexWriter


          public interface VariableQuantumIndexWriter
          An index writer supporting variable quanta.

          This interface provides an additional newInvertedList(long, double, long, long) method that accepts additional information. That information is used to compute the correct quantum size for a specific list. This approach makes it possible to specify a target fraction of the index that will be used to store skipping information.

          • Method Summary

            All Methods Instance Methods Abstract Methods 
            Modifier and Type Method and Description
            long newInvertedList(long predictedFrequency, double skipFraction, long predictedSize, long predictedPositionsSize)
            Starts a new inverted list.
          • Method Detail

            • newInvertedList

              long newInvertedList(long predictedFrequency,
                                   double skipFraction,
                                   long predictedSize,
                                   long predictedPositionsSize)
                            throws IOException
              Starts a new inverted list. The previous inverted list, if any, is actually written to the underlying bit stream.

              This method provides additional information that will be used to compute the correct quantum for the skip structure of the inverted list.

              Parameters:
              predictedFrequency - the predicted frequency of the inverted list; this might just be an approximation.
              skipFraction - the fraction of the inverted list that will be dedicated to skipping structures.
              predictedSize - the predicted size of the part of the inverted list that stores terms and counts.
              predictedPositionsSize - the predicted size of the part of the inverted list that stores positions.
              Returns:
              the position (in bits) of the underlying bit stream where the new inverted list starts.
              Throws:
              IllegalStateException - if too few records were written for the previous inverted list.
              IOException
              See Also:
              IndexWriter.newInvertedList()
        • Summary: 
        • Nested | 
        • Field | 
        • Constr | 
        • Method
        • Detail: 
        • Field | 
        • Constr | 
        • Method
        ",0 "le>presburger: Not compatible
        « Up

        presburger 8.8.0 Not compatible

        (2020-02-26 23:22:14 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-threads        base
        base-unix           base
        conf-findutils      1           Virtual package relying on findutils
        conf-m4             1           Virtual package relying on m4
        coq                 8.10.0      Formal proof management system
        num                 1.3         The legacy Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.09.0      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.09.0      Official release 4.09.0
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.8.1       A library manager for OCaml
        # opam file:
        opam-version: "2.0"
        maintainer: "Hugo.Herbelin@inria.fr"
        homepage: "https://github.com/coq-contribs/presburger"
        license: "LGPL 2.1"
        build: [make "-j%{jobs}%"]
        install: [make "install"]
        remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Presburger"]
        depends: [
          "ocaml"
          "coq" {>= "8.8" & < "8.9~"}
        ]
        tags: [ "keyword: Integers" "keyword: Arithmetic" "keyword: Decision Procedure" "keyword: Presburger" "category: Mathematics/Logic/Foundations" "category: Mathematics/Arithmetic and Number Theory/Miscellaneous" "category: Computer Science/Decision Procedures and Certified Algorithms/Decision procedures" "date: March 2002" ]
        authors: [ "Laurent Théry" ]
        bug-reports: "https://github.com/coq-contribs/presburger/issues"
        dev-repo: "git+https://github.com/coq-contribs/presburger.git"
        synopsis: "Presburger's algorithm"
        description: """
        A formalization of Presburger's algorithm as stated in
        the initial paper by Presburger."""
        flags: light-uninstall
        url {
          src: "https://github.com/coq-contribs/presburger/archive/v8.8.0.tar.gz"
          checksum: "md5=a1b064cf124b40bae0df70e22630d2d6"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-presburger.8.8.0 coq.8.10.0
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.10.0).
        The following dependencies couldn't be met:
          - coq-presburger -> coq < 8.9~ -> ocaml < 4.06.0
              base of this switch (use `--unlock-base' to force)
        Your request can't be satisfied:
          - No available version of coq satisfies the constraints
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-presburger.8.8.0
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub. © Guillaume Claret.

        ",0 "eiler */ public class FTypeAtomBuilder extends QTAtomBuilder { /** * @see FTypeAtom#majBrand */ private int majBrand = 0; /** * @see FTypeAtom#minVersion */ private int minVersion = 0; /** * @see FTypeAtom#compBrands */ private Collection compBrands; /** * Constructs a FTypeAtomBuilder. * @param size the size of the FTypeAtom in the file * @param type the type of the atom, should be set to 'ftyp' */ public FTypeAtomBuilder(int size, int type) { super(size, type); } /** * Returns a new FTypeAtom. * @return a new FTypeAtom */ public FTypeAtom build() { return new FTypeAtom(size,type,majBrand,minVersion,compBrands); } /** * Sets the major brand. * @see FTypeAtom#majBrand * @param majBrand the major brand * @return a reference to this object */ public FTypeAtomBuilder withMajBrand(int majBrand) { this.majBrand = majBrand; return this; } /** * Sets the minor version. * @see FTypeAtom#minVersion * @param minVersion the minor version * @return a reference to this object */ public FTypeAtomBuilder withMinVersion(int minVersion) { this.minVersion = minVersion; return this; } /** * Sets the compatible brands. * @param compBrands a collection of compatible brands * @return a reference to this object */ public FTypeAtomBuilder withCompBrands(Collection compBrands) { this.compBrands = compBrands; return this; } } ",0 "javadoc (build 1.6.0_24) on Mon Apr 01 21:56:35 EDT 2013 --> Groupable (ATG Java API)
        Overview  Package   Class  Tree  Deprecated  Index  Help 
         PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
        SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

        atg.search.routing.command.search
        Interface Groupable

        All Known Implementing Classes:
        CategoryDocument, Result

        public interface Groupable

        Groupable results can be grouped by property or by document. A groupable result should implement this interface. This interface allows for common merge code. It is not used outside of merge


        Field Summary
        static java.lang.String CLASS_VERSION
                  Class version string
         
        Method Summary
         atg.search.routing.command.search.InternalAnswerGroup createNewAnswerGroup()
                  Returns a new internal answer group for this result.
         int getAnswerGroup()
                  Returns the answer group for this result
         java.lang.String getContentId()
                  Returns the content id of the partition that this result came from
         Document getDocument()
                  Returns the associated document
         int getOriginalAnswerGroup()
                  Returns the original answer group, prior to the merge
         float getScore()
                  Returns the result's score.
         java.lang.String getSortProp()
                  When the request specified group-by-property, this returns the sort property
         void setAnswerGroup(int pAnswerGroup)
                  Sets this result's answer group
         void setContentId(java.lang.String pContentId)
                  Sets the content id of the partition that this result came from
         void setId(int pId)
                  An optional result id.
         void setScore(float pScore)
                  Sets the score.
         

        Field Detail

        CLASS_VERSION

        static final java.lang.String CLASS_VERSION
        Class version string

        See Also:
        Constant Field Values
        Method Detail

        createNewAnswerGroup

        atg.search.routing.command.search.InternalAnswerGroup createNewAnswerGroup()
        Returns a new internal answer group for this result. Only used internally.

        Returns:
        a new internal answer group

        getSortProp

        java.lang.String getSortProp()
        When the request specified group-by-property, this returns the sort property

        Returns:
        sort property

        getAnswerGroup

        int getAnswerGroup()
        Returns the answer group for this result

        Returns:
        the answer group for this result

        setAnswerGroup

        void setAnswerGroup(int pAnswerGroup)
        Sets this result's answer group

        Parameters:
        pAnswerGroup - the answer group

        getOriginalAnswerGroup

        int getOriginalAnswerGroup()
        Returns the original answer group, prior to the merge

        Returns:
        the original answer group, prior to the merge

        getDocument

        Document getDocument()
        Returns the associated document

        Returns:
        the associated document

        setId

        void setId(int pId)
        An optional result id. Not all groupable results use this

        Parameters:
        pId -

        getScore

        float getScore()
        Returns the result's score.

        Returns:
        the score

        setScore

        void setScore(float pScore)
        Sets the score. Scores are rounded during merge.

        Parameters:
        pScore - the score

        getContentId

        java.lang.String getContentId()
        Returns the content id of the partition that this result came from

        Returns:
        the content id of the partition that this result came from

        setContentId

        void setContentId(java.lang.String pContentId)
        Sets the content id of the partition that this result came from

        Parameters:
        pContentId - the content id of the partition that this result came from

        Overview  Package   Class  Tree  Deprecated  Index  Help 
         PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
        SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

        ",0 "re_once __DIR__ . '/admin.php'; require_once __DIR__ . '/includes/credits.php'; $title = __( 'Credits' ); list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); require_once ABSPATH . 'wp-admin/admin-header.php'; $credits = wp_credits(); ?>
        "" src="""" />

        worldwide team of passionate individuals. Get involved in WordPress.' ), __( 'https://wordpress.org/about/' ), __( 'https://make.wordpress.org/' ) ); ?>

        Get involved in WordPress.' ), __( 'https://make.wordpress.org/' ) ); ?>

        '; require_once ABSPATH . 'wp-admin/admin-footer.php'; exit; } ?>



        __construct()->prepare('SELECT SUM(d.precio_compra) as ""compra"", DATE_FORMAT(i.fecha_hora, ""%Y"") as ""anio"" FROM ingreso i,detalle_ingreso d WHERE d.idingreso = i.idingreso AND i.fecha_hora BETWEEN CAST(:fecha_buscada AS DATE) AND SYSDATE()'); $sql_ingreso_total->bindParam("":fecha_buscada"",$fecha_buscada); $sql_ingreso_total->execute(); $result_ingreso_total = $sql_ingreso_total->fetch(PDO::FETCH_ASSOC); $response[""ingreso_total""] = intval($result_ingreso_total[""compra""]); /*----------total de ingresos--------------*/ /*----------todos los años de ingresos--------------*/ $sql_ingreso_anios =$db->__construct()->prepare('SELECT SUM(d.precio_compra) as ""compra"", DATE_FORMAT(i.fecha_hora, ""%Y"") as ""anio"", DATE_FORMAT(i.fecha_hora,""%M"") as ""mes"" FROM ingreso i,detalle_ingreso d WHERE d.idingreso = i.idingreso AND i.fecha_hora BETWEEN CAST(:fecha_buscada AS DATE) AND SYSDATE() GROUP BY DATE_FORMAT(i.fecha_hora,""%Y"")' ); $sql_ingreso_anios->bindParam("":fecha_buscada"",$fecha_buscada); $sql_ingreso_anios->execute(); $result_ingreso_anios = $sql_ingreso_anios->fetchAll(PDO::FETCH_ASSOC); $array_ingresos_anios = array(); foreach ($result_ingreso_anios as $key) { $response2[""name""] = $key[""anio""]; $response2[""y""] = intval($key[""compra""]); $response2[""drilldown""] = $key[""anio""]; array_push($array_ingresos_anios , $response2); } $response[""ingresos_anios""] = ($array_ingresos_anios); /*----------todos los años de ingresos--------------*/ /*----------todos los meses por año--------------*/ $sql_ingresos_meses =$db->__construct()->prepare('SELECT SUM(d.precio_compra) as ""compra"",DATE_FORMAT(i.fecha_hora, ""%Y"") as ""anio"", DATE_FORMAT(i.fecha_hora,""%M"") as ""mes"",DATE_FORMAT(i.fecha_hora, ""%D"") as ""dia"" FROM ingreso i,detalle_ingreso d WHERE d.idingreso = i.idingreso AND DATE_FORMAT(i.fecha_hora,""%Y"") BETWEEN DATE_FORMAT(:fecha_buscada,""%Y"") AND DATE_FORMAT(SYSDATE(), ""%Y"") GROUP BY DATE_FORMAT(i.fecha_hora,""%Y,%M"") ORDER BY DATE_FORMAT(i.fecha_hora,""%M"") DESC' ); $sql_ingresos_meses->bindParam("":fecha_buscada"",$fecha_buscada); $sql_ingresos_meses->execute(); $result_ingresos_meses = $sql_ingresos_meses->fetchAll(PDO::FETCH_ASSOC); $array_ingresos_meses_por_anio = array(); foreach ($result_ingreso_anios as $key0) { $array_data = array(); $response4[""id""] = $key0[""anio""]; $response4[""name""] = $key0[""anio""]; foreach ($result_ingresos_meses as $key1) { if ($key0[""anio""]==$key1[""anio""]) { for ($i=0; $i < count($meses) ; $i++) { if ($key1[""mes""] == $meses[$i]) { $mes_espanol = $meses_es[$i]; } } $response3[""name""] = $mes_espanol; $response3[""y""] = intval($key1[""compra""]); $response3[""drilldown""] = ($mes_espanol.""_"".$key1[""anio""]); array_push($array_data, $response3 ); } } $response4[""data""] = $array_data; array_push($array_ingresos_meses_por_anio, $response4); $response[""ingresos_meses_por_anio""] = $array_ingresos_meses_por_anio; } $sql_ingresos_dias =$db->__construct()->prepare('SELECT SUM(d.precio_compra) as ""compra"",DATE_FORMAT(i.fecha_hora, ""%Y"") as ""anio"", DATE_FORMAT(i.fecha_hora,""%M"") as ""mes"", DATE_FORMAT(i.fecha_hora, ""%D"") as ""dia"" FROM ingreso i,detalle_ingreso d WHERE d.idingreso = i.idingreso AND DATE_FORMAT(i.fecha_hora,""%Y,%M"") BETWEEN DATE_FORMAT(:fecha_buscada,""%Y,%M"") AND DATE_FORMAT(SYSDATE(), ""%Y,%M"") GROUP BY DATE_FORMAT(i.fecha_hora,""%D"") ORDER BY DATE_FORMAT(i.fecha_hora,""%M"") DESC' ); $sql_ingresos_dias->bindParam("":fecha_buscada"",$fecha_buscada); $sql_ingresos_dias->execute(); $result_ingresos_dias = $sql_ingresos_dias->fetchAll(PDO::FETCH_ASSOC); $array_ingresos_dias_por_mes = array(); foreach ($result_ingresos_meses as $key_mes) { $array_data_dias = array(); for ($i=0; $i < count($meses) ; $i++) { if ($key_mes[""mes""] == $meses[$i]) { $mes_espanol = $meses_es[$i]; } } $response5[""id""] = ($mes_espanol.""_"".$key_mes['anio']); $response5[""name""] = $mes_espanol; foreach ($result_ingresos_dias as $key_dia) { if ($key_mes[""anio""]==$key_dia[""anio""] && $key_mes[""mes""]==$key_dia[""mes""]) { $response6[""name""] = $key_dia[""dia""]; $response6[""y""] = intval($key_dia[""compra""]); array_push($array_data_dias, $response6 ); } } $response5[""data""] = $array_data_dias; array_push($array_ingresos_dias_por_mes, $response5); $response[""ingresos_dias_por_mes""] = $array_ingresos_dias_por_mes; } /* {id:""November_2016"",name:""November"",data:[{name:""Lunes"",y:100},{name:""Miercoles"",y:100}]} */ $json_encode = json_encode($response); print_r($json_encode); /*----------todos los meses por año--------------*/ }else { } ?> ",0 "lass=""homeTitle pull-left"">Books Library

        {{book.name}}

        {{'by ' + book.author.name}}

        {{book.genre.category}}{{', ' + book.genre.name}}

        {{book.published | date}}{{', ' + convertPublishedDate(book.published)}}

        {{' ' + book.likes + ' '}} Likes

        ",0 "enerated by javadoc (1.8.0_151) on Fri Jun 22 04:34:22 MST 2018 --> Uses of Interface org.wildfly.swarm.config.undertow.server.host.HTTPInvokerSettingSupplier (BOM: * : All 2.0.0.Final API)
        • Prev
        • Next

        Uses of Interface
        org.wildfly.swarm.config.undertow.server.host.HTTPInvokerSettingSupplier

        • Prev
        • Next

        Copyright © 2018 JBoss by Red Hat. All rights reserved.

        ",0 """en-GB"" xmlns=""http://www.w3.org/1999/xhtml""> Number

        This page pertains to UD version 2.

        Number: number

        Values: Plur Sing

        Number is usually an inflectional feature of nouns and other parts of speech (pronouns, adposition, determiners, verbs and cases markers) that mark agreement with nouns.

        Sing: singular number

        A singular noun denotes one person, animal or thing.

        Examples

        • kaːm “a camel”

        Plur: plural number

        A plural noun denotes several persons, animals or things.

        Examples

        • jhalaka “clothes”

        Number in other languages: [arr] [bej] [bg] [bm] [cs] [cy] [en] [ess] [eu] [fi] [fr] [ga] [gub] [hu] [hy] [it] [myv] [orv] [pcm] [pt] [ru] [sl] [sv] [tpn] [tr] [tt] [u] [uk] [urb] [urj]

        © 2014–2021 Universal Dependencies contributors. Site powered by Annodoc and brat

        .
        ",0 "/------ mixin-layer for dealing with Overrides and New Modifier //------ offhand, I wonder why we can't let j2j map these modifiers //------ to nothing, instead of letting PJ do some of this mapping // it would make more sense for PJ and Mixin to have similar // output. public class ModOverrides { public void reduce2java( AstProperties props ) { // Step 1: the overrides modifier should not be present, UNLESS // there is a SoUrCe property. It's an error otherwise. if ( props.getProperty( ""SoUrCe"" ) == null ) { AstNode.error( tok[0], ""overrides modifier should not be present"" ); return; } // Step 2: it's OK to be present. If so, the reduction is to // print the white-space in front for pretty-printing props.print( getComment() ); } } ",0 "munities in Spain together for two days. ---
        Codemotion
        Madrid / Spain Nov 21-22
        {% include menu-en.html topbarClass=""sticky"" %}

        Thanks.

        We set up a date, and you guys came and exceeded our craziest expectations. We are now resting and brainstorming ideas to make it better in 2015; meanwhile, you can follow us on Twitter or on our Youtube channel.

        +1,925
        Attendees
        35
        Communities
        120
        Talks
        14
        Workshops

        Codemotion gets all the IT communities in Spain together for two days. We take an entire university building to present the best of each technology and get you far away from your comfort zone.


        Where

        Universidad San Pablo CEU, Campus de Montepríncipe (Boadilla del Monte, Madrid) View in map

        The parking has a limited capacity, and there will be many of us. We recommend to take the public transport, which is surprisingly easy:

        Metro ligero: L3 (direction Puerta de Boadilla, drop at MontePríncipe)

        Bus: 571, 573, 574

        We have hired a bus service connecting directly to Plaza de España just in case.

        THIS IS NOT THE SAME AS ""CAMPUS DE MONCLOA"". Please double-check your GPS instructions.

        {% include schema.html %} ",0 "BJECT Q_PROPERTY( QString name READ name CONSTANT) Q_PROPERTY( QString url READ url CONSTANT) // delet in further public: explicit DataObject(const QString &name, const QString &url, QObject *parent = 0); QString name()const; QString url()const; private: QString m_name; QString m_url; }; typedef QList DataList; #endif // DATAOBJECT_H ",0 "chment published: false meta: _wp_attached_file: 2011/08/CC-Global-Summit-2011-logo.png _wp_attachment_metadata: a:6:{s:5:""width"";s:3:""728"";s:6:""height"";s:3:""178"";s:14:""hwstring_small"";s:23:""height='31' width='128'"";s:4:""file"";s:38:""2011/08/CC-Global-Summit-2011-logo.png"";s:5:""sizes"";a:2:{s:9:""thumbnail"";a:3:{s:4:""file"";s:38:""CC-Global-Summit-2011-logo-150x150.png"";s:5:""width"";s:3:""150"";s:6:""height"";s:3:""150"";}s:6:""medium"";a:3:{s:4:""file"";s:37:""CC-Global-Summit-2011-logo-300x73.png"";s:5:""width"";s:3:""300"";s:6:""height"";s:2:""73"";}}s:10:""image_meta"";a:10:{s:8:""aperture"";s:1:""0"";s:6:""credit"";s:0:"""";s:6:""camera"";s:0:"""";s:7:""caption"";s:0:"""";s:17:""created_timestamp"";s:1:""0"";s:9:""copyright"";s:0:"""";s:12:""focal_length"";s:1:""0"";s:3:""iso"";s:1:""0"";s:13:""shutter_speed"";s:1:""0"";s:5:""title"";s:0:"""";}} author: login: janepark email: janepark@creativecommons.org display_name: Jane Park first_name: Jane last_name: Park --- ",0 "le>unimath-ktheory: Not compatible 👼
        « Up

        unimath-ktheory 0.1.0 Not compatible 👼

        📅 (2021-10-28 03:36:04 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-threads        base
        base-unix           base
        conf-findutils      1           Virtual package relying on findutils
        coq                 8.10.1      Formal proof management system
        num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.06.1      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.06.1      Official 4.06.1 release
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.9.1       A library manager for OCaml
        # opam file:
        opam-version: "2.0"
        maintainer: "opam@clarus.me"
        homepage: "https://github.com/UniMath/UniMath"
        dev-repo: "git+https://github.com/UniMath/UniMath.git"
        bug-reports: "https://github.com/UniMath/UniMath/issues"
        license: "Kind of MIT"
        authors: ["The UniMath Development Team"]
        build: [
          ["coq_makefile" "-f" "Make" "-o" "Makefile"]
          [make "-j%{jobs}%"]
        ]
        install: [
          [make "install"]
        ]
        depends: [
          "ocaml"
          "coq" {>= "8.5.0" & < "8.6"}
          "coq-unimath-category-theory"
          "coq-unimath-foundations"
        ]
        synopsis: "Aims to formalize a substantial body of mathematics using the univalent point of view"
        extra-files: ["Make" "md5=ba645952ced22f5cf37e29da5175d432"]
        url {
          src: "https://github.com/UniMath/UniMath/archive/v0.1.tar.gz"
          checksum: "md5=1ed57c1028e227a309f428a6dc5f0866"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-unimath-ktheory.0.1.0 coq.8.10.1
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.10.1).
        The following dependencies couldn't be met:
          - coq-unimath-ktheory -> coq < 8.6 -> ocaml < 4.06.0
              base of this switch (use `--unlock-base' to force)
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-unimath-ktheory.0.1.0
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "erved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and the Apache License 2.0 which both accompany this distribution, * and are available at http://www.eclipse.org/legal/epl-v10.html * and http://www.apache.org/licenses/LICENSE-2.0 * * Contributors: * Oliver Kopp - initial API and implementation *******************************************************************************/ /** * This package contains the REST resources * * Mostly, they produces Viewables, where a JSP and the current resource is * passed As the JSP itself handles plain Java objects and not Responses, the * resources have also methods returning POJOs. This might be ugly design, but * was quick to implement. * * The package structure is mirrored in src/main/webapp/jsp to ease finding the * JSPs belonging to a resource. * * The resources are not in line with the resource model of the TOSCA * container. Especially, we do not employ HATEOAS here. */ package org.eclipse.winery.repository.resources; ",0 "le>metacoq: Not compatible 👼
        « Up

        metacoq 1.0~beta1+8.12 Not compatible 👼

        📅 (2022-01-29 07:47:20 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-num            base        Num library distributed with the OCaml compiler
        base-threads        base
        base-unix           base
        camlp5              7.14        Preprocessor-pretty-printer of OCaml
        conf-findutils      1           Virtual package relying on findutils
        conf-perl           2           Virtual package relying on perl
        coq                 8.5.0       Formal proof management system
        num                 0           The Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.04.2      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.04.2      Official 4.04.2 release
        ocaml-config        1           OCaml Switch Configuration
        # opam file:
        opam-version: "2.0"
        maintainer: "matthieu.sozeau@inria.fr"
        homepage: "https://metacoq.github.io/metacoq"
        dev-repo: "git+https://github.com/MetaCoq/metacoq.git#coq-8.12"
        bug-reports: "https://github.com/MetaCoq/metacoq/issues"
        authors: ["Abhishek Anand <aa755@cs.cornell.edu>"
                  "Simon Boulier <simon.boulier@inria.fr>"
                  "Cyril Cohen <cyril.cohen@inria.fr>"
                  "Yannick Forster <forster@ps.uni-saarland.de>"
                  "Fabian Kunze <fkunze@fakusb.de>"
                  "Gregory Malecha <gmalecha@gmail.com>"
                  "Matthieu Sozeau <matthieu.sozeau@inria.fr>"
                  "Nicolas Tabareau <nicolas.tabareau@inria.fr>"
                  "Théo Winterhalter <theo.winterhalter@inria.fr>"
        ]
        license: "MIT"
        depends: [
          "ocaml" {>= "4.07.1"}
          "coq" {>= "8.12" & < "8.13~"}
          "coq-metacoq-template" {= version}
          "coq-metacoq-checker" {= version}
          "coq-metacoq-pcuic" {= version}
          "coq-metacoq-safechecker" {= version}
          "coq-metacoq-erasure" {= version}
          "coq-metacoq-translations" {= version}
        ]
        synopsis: "A meta-programming framework for Coq"
        description: """
        MetaCoq is a meta-programming framework for Coq.
        The meta-package includes the template-coq library, unverified checker for Coq,
        PCUIC development including a verified translation from Coq to PCUIC, 
        safe checker and erasure for PCUIC and example translations. 
        See individual packages for more detailed descriptions.
        """
        url {
          src: "https://github.com/MetaCoq/metacoq/archive/v1.0-beta1-8.12.tar.gz"
          checksum: "sha256=19fc4475ae81677018e21a1e20503716a47713ec8b2081e7506f5c9390284c7a"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-metacoq.1.0~beta1+8.12 coq.8.5.0
        Return code
        5120
        Output
        [NOTE] Package coq is already installed (current version is 8.5.0).
        The following dependencies couldn't be met:
          - coq-metacoq -> ocaml >= 4.07.1
              base of this switch (use `--unlock-base' to force)
        No solution found, exiting
        

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        opam remove -y coq; opam install -y --show-action --unlock-base coq-metacoq.1.0~beta1+8.12
        Return code
        0

        Install dependencies

        Command
        true
        Return code
        0
        Duration
        0 s

        Install 🚀

        Command
        true
        Return code
        0
        Duration
        0 s

        Installation size

        No files were installed.

        Uninstall 🧹

        Command
        true
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "rg/1999/xhtml""> MagicMirror: Member List
        MagicMirror  0.1
        testing::internal2::TypeWithoutFormatter< T, kTypeKind > Member List

        This is the complete list of members for testing::internal2::TypeWithoutFormatter< T, kTypeKind >, including all inherited members.

        PrintValue(const T &value,::std::ostream *os) (defined in testing::internal2::TypeWithoutFormatter< T, kTypeKind >)testing::internal2::TypeWithoutFormatter< T, kTypeKind >inlinestatic
        PrintValue(const T &value,::std::ostream *os) (defined in testing::internal2::TypeWithoutFormatter< T, kTypeKind >)testing::internal2::TypeWithoutFormatter< T, kTypeKind >inlinestatic

        Generated on Tue Aug 25 2015 01:03:00 for MagicMirror by   1.8.9.1
        ",0 "ation, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Profiler; use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; /** * Profile. * * @author Fabien Potencier */ class Profile { private $token; /** * @var DataCollectorInterface[] */ private $collectors = array(); private $ip; private $method; private $url; private $time; /** * @var Profile */ private $parent; /** * @var Profile[] */ private $children = array(); /** * Constructor. * * @param string $token The token */ public function __construct($token) { $this->token = $token; } /** * Returns the parent profile. * * @return Profile The parent profile */ public function getParent() { return $this->parent; } /** * Sets the parent token * * @param Profile $parent The parent Profile */ public function setParent( Profile $parent ) { $this->parent = $parent; } /** * Returns the parent token. * * @return null|string The parent token */ public function getParentToken() { return $this->parent ? $this->parent->getToken() : null; } /** * Gets the token. * * @return string The token */ public function getToken() { return $this->token; } /** * Sets the token. * * @param string $token The token */ public function setToken( $token ) { $this->token = $token; } /** * Returns the IP. * * @return string The IP */ public function getIp() { return $this->ip; } /** * Sets the IP. * * @param string $ip */ public function setIp($ip) { $this->ip = $ip; } /** * Returns the request method. * * @return string The request method */ public function getMethod() { return $this->method; } public function setMethod($method) { $this->method = $method; } /** * Returns the URL. * * @return string The URL */ public function getUrl() { return $this->url; } public function setUrl($url) { $this->url = $url; } /** * Returns the time. * * @return string The time */ public function getTime() { if (null === $this->time) { return 0; } return $this->time; } public function setTime($time) { $this->time = $time; } /** * Finds children profilers. * * @return Profile[] An array of Profile */ public function getChildren() { return $this->children; } /** * Sets children profiler. * * @param Profile[] $children An array of Profile */ public function setChildren(array $children) { $this->children = array(); foreach ($children as $child) { $this->addChild($child); } } /** * Adds the child token * * @param Profile $child The child Profile */ public function addChild(Profile $child) { $this->children[] = $child; $child->setParent($this); } /** * Gets a Collector by name. * * @param string $name A collector name * * @return DataCollectorInterface A DataCollectorInterface instance * * @throws \InvalidArgumentException if the collector does not exist */ public function getCollector($name) { if (!isset($this->collectors[$name])) { throw new \InvalidArgumentException(sprintf('Collector ""%s"" does not exist.', $name)); } return $this->collectors[$name]; } /** * Gets the Collectors associated with this profile. * * @return DataCollectorInterface[] */ public function getCollectors() { return $this->collectors; } /** * Sets the Collectors associated with this profile. * * @param DataCollectorInterface[] $collectors */ public function setCollectors(array $collectors) { $this->collectors = array(); foreach ($collectors as $collector) { $this->addCollector($collector); } } /** * Adds a Collector. * * @param DataCollectorInterface $collector A DataCollectorInterface instance */ public function addCollector(DataCollectorInterface $collector) { $this->collectors[$collector->getName()] = $collector; } /** * Returns true if a Collector for the given name exists. * * @param string $name A collector name * * @return bool */ public function hasCollector($name) { return isset($this->collectors[$name]); } public function __sleep() { return array('token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time'); } } ",0 "********************************/ /* Copyright (c) 2002-2010 */ /* Inclusive Design Institute */ /* http://atutor.ca */ /* This program is free software. You can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ /* as published by the Free Software Foundation. */ /************************************************************************/ // $Id$ define('AT_INCLUDE_PATH', '../../../../include/'); require(AT_INCLUDE_PATH.'vitals.inc.php'); admin_authenticate(AT_ADMIN_PRIV_FORUMS); if (isset($_POST['cancel'])) { $msg->addFeedback('CANCELLED'); header('Location: '.AT_BASE_HREF.'mods/_standard/forums/admin/forums.php'); exit; } else if (isset($_POST['add_forum'])) { $missing_fields = array(); if (empty($_POST['title'])) { $missing_fields[] = _AT('title'); } if (empty($_POST['courses'])) { $missing_fields[] = _AT('courses'); } if ($missing_fields) { $missing_fields = implode(', ', $missing_fields); $msg->addError(array('EMPTY_FIELDS', $missing_fields)); } $_POST['edit'] = intval($_POST['edit']); if (!($msg->containsErrors())) { //add forum $sql = ""INSERT INTO %sforums (title, description, mins_to_edit) VALUES ('%s','%s', %d)""; $result = queryDB($sql, array(TABLE_PREFIX, $_POST['title'], $_POST['description'], $_POST['edit'])); $forum_id = at_insert_id(); global $sqlout; write_to_log(AT_ADMIN_LOG_INSERT, 'forums', $result, $sqlout); //for each course, add an entry to the forums_courses table foreach ($_POST['courses'] as $course) { $sql = ""INSERT INTO %sforums_courses VALUES (%d,%d)""; $result = queryDB($sql, array(TABLE_PREFIX, $forum_id, $course)); global $sqlout; write_to_log(AT_ADMIN_LOG_INSERT, 'forums_courses', $result, $sqlout); } $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY'); if($course ==""0""){ $msg->addFeedback('FORUM_POSTING'); } header('Location: '.AT_BASE_HREF.'mods/_standard/forums/admin/forums.php'); exit; } } $onload = 'document.form.title.focus();'; $sql = ""SELECT course_id, title FROM %scourses ORDER BY title""; $rows_titles = queryDB($sql, array(TABLE_PREFIX)); $savant->assign('titles', $rows_titles); require(AT_INCLUDE_PATH.'header.inc.php'); $savant->assign('system_courses', $system_courses); $savant->display('admin/courses/forum_add.tmpl.php'); require(AT_INCLUDE_PATH.'footer.inc.php'); ?>",0 " Jessica Zangari * * 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. *******************************************************************************/ /* * GroundingPreferences.h * * Created on: Mar 10, 2016 * Author: jessica */ #ifndef SRC_GROUNDER_STATEMENT_GROUNDINGPREFERENCES_H_ #define SRC_GROUNDER_STATEMENT_GROUNDINGPREFERENCES_H_ #include #include ""Rule.h"" #include #include #include using namespace std; namespace DLV2 { namespace grounder { struct HashAtomPointer{ inline size_t operator()(Atom* obj) const { return size_t(obj); } inline bool operator()(Atom* obj1, Atom* obj2) const { return obj1==obj2; } }; enum AnnotationsError {OK, ATOM_NOT_PRESENT, ARITY_ERROR, CONFLICT_FOUND}; typedef unordered_map,HashAtomPointer,HashAtomPointer> unordered_map_pointers_atom_arguments; typedef unordered_map,HashForTable,HashForTable> unordered_map_atom_arguments; class GroundingPreferences { public: bool addRuleOrderingType(Rule* rule, unsigned orderingType); bool addRuleProjectionType(Rule* rule, unsigned pType){ rulesProjectionTypes.insert({rule->getIndex(), pType}); return true; } void addRuleRewArith(Rule* rule){ rulesRewArith.insert(rule->getIndex()); } void addRuleLookAhead(Rule* rule){ rulesLookAhead.insert(rule->getIndex()); } void addRuleAlignSubstitutions(Rule* rule){ rulesAlignSubstitutions.insert(rule->getIndex()); } AnnotationsError addRuleAtomIndexingSetting(Rule* rule, Atom* atom, vector& arguments); void addRulePartialOrder(Rule* rule){rulesPartialOrders[rule->getIndex()].emplace_back();rulesPartialOrdersAtoms[rule->getIndex()].emplace_back();} AnnotationsError addRulePartialOrderAtom(Rule* rule, Atom* atom); AnnotationsError checkRulePartialOrderConflicts(Rule* rule); AnnotationsError applyRulePartialOrder(Rule* rule); bool addGlobalOrderingType(unsigned orderingType); void addGlobalAtomIndexingSetting(Atom* atom, vector& arguments); void addGlobalPartialOrder(){ globalPartialOrdersAtoms.emplace_back();} void addGlobalPartialOrderAtomStart(Atom* atom); void addGlobalPartialOrderAtomEnd(Atom* atom); int getOrderingType(Rule* r) ; pair getProjectionType(Rule* r){ auto i =r->getIndex(); if(rulesProjectionTypes.count(i)) return {true,rulesProjectionTypes[i]}; return {false,-1}; } bool getRewArith(Rule* r){ return rulesRewArith.count(r->getIndex()); } bool getLookAhead(Rule* r){ return rulesLookAhead.count(r->getIndex()); } bool getAlignSubstitutions(Rule* r){ return rulesAlignSubstitutions.count(r->getIndex()); } bool checkPartialOrder(Rule* rule,unsigned atomPosition,const list& atoms) ; bool checkAtomIndexed(Rule* rule,Atom* atom,const vector& possibileArgs, vector& idxTerms) ; static GroundingPreferences* getGroundingPreferences() { if(groundingPreferences==0) groundingPreferences=new GroundingPreferences(); return groundingPreferences; } ~GroundingPreferences(){}; static void freeInstance(){ delete groundingPreferences;} static void checkIfAtomIsPresentInRule(Rule* rule, Atom* atom, vector& positions); void print(Rule* rule) const; private: unordered_map rulesOrderingTypes; unordered_map rulesProjectionTypes; unordered_set rulesRewArith; unordered_set rulesLookAhead; unordered_set rulesAlignSubstitutions; unordered_map rulesAtomsIndexed; unordered_map>> rulesPartialOrders; unordered_map>> rulesPartialOrdersAtoms; int globalOrderingType; unordered_map_atom_arguments globalAtomsIndexed; vector> globalPartialOrdersAtoms; bool applayedGlobalAnnotations; bool applyGlobalAtomIndexingSetting(); bool applyGlobalPartialOrder(); void setGlobalAnnotations(); GroundingPreferences():globalOrderingType(-1),applayedGlobalAnnotations(false){}; static GroundingPreferences* groundingPreferences; }; } /* namespace grounder */ } /* namespace DLV2 */ #endif /* SRC_GROUNDER_STATEMENT_GROUNDINGPREFERENCES_H_ */ ",0 ".leif.ffmanagementsuite.repository.AuthorityRepository; import de.leif.ffmanagementsuite.config.Constants; import de.leif.ffmanagementsuite.repository.UserRepository; import de.leif.ffmanagementsuite.security.AuthoritiesConstants; import de.leif.ffmanagementsuite.security.SecurityUtils; import de.leif.ffmanagementsuite.service.util.RandomUtil; import de.leif.ffmanagementsuite.service.dto.UserDTO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cache.CacheManager; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.*; import java.util.stream.Collectors; /** * Service class for managing users. */ @Service @Transactional public class UserService { private final Logger log = LoggerFactory.getLogger(UserService.class); private final UserRepository userRepository; private final PasswordEncoder passwordEncoder; private final AuthorityRepository authorityRepository; private final CacheManager cacheManager; public UserService(UserRepository userRepository, PasswordEncoder passwordEncoder, AuthorityRepository authorityRepository, CacheManager cacheManager) { this.userRepository = userRepository; this.passwordEncoder = passwordEncoder; this.authorityRepository = authorityRepository; this.cacheManager = cacheManager; } public Optional activateRegistration(String key) { log.debug(""Activating user for activation key {}"", key); return userRepository.findOneByActivationKey(key) .map(user -> { // activate given user for the registration key. user.setActivated(true); user.setActivationKey(null); cacheManager.getCache(""users"").evict(user.getLogin()); log.debug(""Activated user: {}"", user); return user; }); } public Optional completePasswordReset(String newPassword, String key) { log.debug(""Reset user password for reset key {}"", key); return userRepository.findOneByResetKey(key) .filter(user -> user.getResetDate().isAfter(Instant.now().minusSeconds(86400))) .map(user -> { user.setPassword(passwordEncoder.encode(newPassword)); user.setResetKey(null); user.setResetDate(null); cacheManager.getCache(""users"").evict(user.getLogin()); return user; }); } public Optional requestPasswordReset(String mail) { return userRepository.findOneByEmailIgnoreCase(mail) .filter(User::getActivated) .map(user -> { user.setResetKey(RandomUtil.generateResetKey()); user.setResetDate(Instant.now()); cacheManager.getCache(""users"").evict(user.getLogin()); return user; }); } public User createUser(String login, String password, String firstName, String lastName, String email, String imageUrl, String langKey) { User newUser = new User(); Authority authority = authorityRepository.findOne(AuthoritiesConstants.USER); Set authorities = new HashSet<>(); String encryptedPassword = passwordEncoder.encode(password); newUser.setLogin(login); // new user gets initially a generated password newUser.setPassword(encryptedPassword); newUser.setFirstName(firstName); newUser.setLastName(lastName); newUser.setEmail(email); newUser.setImageUrl(imageUrl); newUser.setLangKey(langKey); // new user is not active newUser.setActivated(false); // new user gets registration key newUser.setActivationKey(RandomUtil.generateActivationKey()); authorities.add(authority); newUser.setAuthorities(authorities); userRepository.save(newUser); log.debug(""Created Information for User: {}"", newUser); return newUser; } public User createUser(UserDTO userDTO) { User user = new User(); user.setLogin(userDTO.getLogin()); user.setFirstName(userDTO.getFirstName()); user.setLastName(userDTO.getLastName()); user.setEmail(userDTO.getEmail()); user.setImageUrl(userDTO.getImageUrl()); if (userDTO.getLangKey() == null) { user.setLangKey(Constants.DEFAULT_LANGUAGE); // default language } else { user.setLangKey(userDTO.getLangKey()); } if (userDTO.getAuthorities() != null) { Set authorities = new HashSet<>(); userDTO.getAuthorities().forEach( authority -> authorities.add(authorityRepository.findOne(authority)) ); user.setAuthorities(authorities); } String encryptedPassword = passwordEncoder.encode(RandomUtil.generatePassword()); user.setPassword(encryptedPassword); user.setResetKey(RandomUtil.generateResetKey()); user.setResetDate(Instant.now()); user.setActivated(true); userRepository.save(user); log.debug(""Created Information for User: {}"", user); return user; } /** * Update basic information (first name, last name, email, language) for the current user. * * @param firstName first name of user * @param lastName last name of user * @param email email id of user * @param langKey language key * @param imageUrl image URL of user */ public void updateUser(String firstName, String lastName, String email, String langKey, String imageUrl) { userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin()).ifPresent(user -> { user.setFirstName(firstName); user.setLastName(lastName); user.setEmail(email); user.setLangKey(langKey); user.setImageUrl(imageUrl); cacheManager.getCache(""users"").evict(user.getLogin()); log.debug(""Changed Information for User: {}"", user); }); } /** * Update all information for a specific user, and return the modified user. * * @param userDTO user to update * @return updated user */ public Optional updateUser(UserDTO userDTO) { return Optional.of(userRepository .findOne(userDTO.getId())) .map(user -> { user.setLogin(userDTO.getLogin()); user.setFirstName(userDTO.getFirstName()); user.setLastName(userDTO.getLastName()); user.setEmail(userDTO.getEmail()); user.setImageUrl(userDTO.getImageUrl()); user.setActivated(userDTO.isActivated()); user.setLangKey(userDTO.getLangKey()); Set managedAuthorities = user.getAuthorities(); managedAuthorities.clear(); userDTO.getAuthorities().stream() .map(authorityRepository::findOne) .forEach(managedAuthorities::add); cacheManager.getCache(""users"").evict(user.getLogin()); log.debug(""Changed Information for User: {}"", user); return user; }) .map(UserDTO::new); } public void deleteUser(String login) { userRepository.findOneByLogin(login).ifPresent(user -> { userRepository.delete(user); cacheManager.getCache(""users"").evict(login); log.debug(""Deleted User: {}"", user); }); } public void changePassword(String password) { userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin()).ifPresent(user -> { String encryptedPassword = passwordEncoder.encode(password); user.setPassword(encryptedPassword); cacheManager.getCache(""users"").evict(user.getLogin()); log.debug(""Changed password for User: {}"", user); }); } @Transactional(readOnly = true) public Page getAllManagedUsers(Pageable pageable) { return userRepository.findAllByLoginNot(pageable, Constants.ANONYMOUS_USER).map(UserDTO::new); } @Transactional(readOnly = true) public Optional getUserWithAuthoritiesByLogin(String login) { return userRepository.findOneWithAuthoritiesByLogin(login); } @Transactional(readOnly = true) public User getUserWithAuthorities(Long id) { return userRepository.findOneWithAuthoritiesById(id); } @Transactional(readOnly = true) public User getUserWithAuthorities() { return userRepository.findOneWithAuthoritiesByLogin(SecurityUtils.getCurrentUserLogin()).orElse(null); } /** * Not activated users should be automatically deleted after 3 days. *

        * This is scheduled to get fired everyday, at 01:00 (am). */ @Scheduled(cron = ""0 0 1 * * ?"") public void removeNotActivatedUsers() { List users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(Instant.now().minus(3, ChronoUnit.DAYS)); for (User user : users) { log.debug(""Deleting not activated user {}"", user.getLogin()); userRepository.delete(user); cacheManager.getCache(""users"").evict(user.getLogin()); } } /** * @return a list of all the authorities */ public List getAuthorities() { return authorityRepository.findAll().stream().map(Authority::getName).collect(Collectors.toList()); } } ",0 "============= * Grid field * @author EllisLab * ============================================ * File grid.php * */ class Zenbu_grid_ft extends Grid_ft { var $dropdown_type = ""contains_doesnotcontain""; /** * Constructor * * @access public */ function __construct() { $this->EE =& get_instance(); $this->EE->load->model('zenbu_get'); $this->EE->load->helper('loader'); } /** * ====================== * function zenbu_display * ====================== * Set up display in entry result cell * * @param $entry_id int The entry ID of this single result entry * @param $channel_id int The channel ID associated to this single result entry * @param $data array Raw data as found in database cell in exp_channel_data * @param $table_data array Data array usually retrieved from other table than exp_channel_data * @param $field_id int The ID of this field * @param $settings array The settings array, containing saved field order, display, extra options etc settings * @param $rules array An array of entry filtering rules * @param $upload_prefs array An array of upload preferences (optional) * @param $installed_addons array An array of installed addons and their version numbers (optional) * @param $fieldtypes array Fieldtype of available fieldtypes: id, name, etc (optional) * @return $output The HTML used to display data */ function zenbu_display($entry_id, $channel_id, $data, $grid_data = array(), $field_id, $settings, $rules = array(), $upload_prefs = array(), $installed_addons) { $output = NBS; // If grid_data is empty (no results), stop here and return a space for the field data if( ! isset($grid_data['table_data']['entry_id_'.$entry_id]['field_id_'.$field_id])) { return $output; } $output = """"; $row_array = array(); $grid_data['field_id'] = $field_id; $grid_data['entry_id'] = $entry_id; // ---------------------------------------- // Rewrite Grid data array with Zenbu-formatted data // instead of raw Grid DB data // ---------------------------------------- foreach($grid_data['table_data']['entry_id_'.$entry_id]['field_id_'.$field_id] as $row => $col) { foreach($col as $col_id => $data) { $fieldtype = $grid_data['headers']['field_id_'.$field_id][$col_id]['fieldtype']; // ---------------------------------------- // Load Zenbu Fieldtype Class // ---------------------------------------- $ft_class = $fieldtype.'_ft'; load_ft_class($ft_class); // ---------------------------------------- // Run the zenbu_display method, if it exists // This should convert the raw data into Zenbu data // ---------------------------------------- if(class_exists($ft_class)) { $ft_object = create_object($ft_class); // Some stuff we need for zenbu_display $settings = $this->EE->zenbu_get->_get_settings(); $rules = array(); $output_upload_prefs = $this->EE->zenbu_get->_get_file_upload_prefs(); $installed_addons = $this->EE->zenbu_get->_get_installed_addons(); $fieldtypes = $this->EE->zenbu_get->_get_field_ids(); // ---------------------------------------- // Get relationship data, if present // ---------------------------------------- // Send grid_id_X array key to signal the // relationship field that this in a grid $rel_array = array( $entry_id => array( 'grid_id_'.$field_id => $data ) ); $table_data = (method_exists($ft_object, 'zenbu_get_table_data')) ? $ft_object->zenbu_get_table_data(array($entry_id), array($field_id), $channel_id, $output_upload_prefs, $settings, $rel_array) : array(); $table_data['grid_row'] = substr($row, 4); $table_data['grid_col'] = substr($col_id, 7); // ---------------------------------------- // Convert the data // ---------------------------------------- $data = (method_exists($ft_object, 'zenbu_display')) ? $ft_object->zenbu_display($entry_id, $channel_id, $data, $table_data, $field_id, $settings, $rules, $output_upload_prefs, $installed_addons, $fieldtypes) : $data; } $grid_data['table_data']['entry_id_'.$entry_id]['field_id_'.$field_id][$row][$col_id] = $data; } } $this->EE->load->helper('display'); $output = $this->EE->load->view('_grid', $grid_data, TRUE); //return $output; /** * Displaying the matrix inline or as a fancybox link * Based on user group setting */ $extra_options = $settings['setting'][$channel_id]['extra_options']; if( ! isset($extra_options[""field_"".$field_id]['grid_option_1'])) { // Display table in a hidden div, then have a fancybox link show it on click $output = '

        ' . $output . '
        '; $link_to_matrix = '#e_'.$entry_id.'_f_'.$field_id; return anchor($link_to_matrix, $this->EE->lang->line('show_').$this->EE->lang->line('grid'), 'class=""fancybox-inline"" rel=""#field_id_'.$field_id.'""') . $output; } else { // ..else return the table as-is, and see it displayed directly in the row return $output; } } /** * ============================= * function zenbu_get_table_data * ============================= * Retrieve data stored in other database tables * based on results from Zenbu's entry list * @uses Instead of many small queries, this function can be used to carry out * a single query of data to be later processed by the zenbu_display() method * * @param $entry_ids array An array of entry IDs from Zenbu's entry listing results * @param $field_ids array An array of field IDs tied to/associated with result entries * @param $channel_id int The ID of the channel in which Zenbu searched entries (0 = ""All channels"") * @param $output_upload_prefs array An array of upload preferences * @param $settings array The settings array, containing saved field order, display, extra options etc settings (optional) * @param $rel_array array A simple array useful when using related entry-type fields (optional) * @return $output array An array of data (typically broken down by entry_id then field_id) that can be used and processed by the zenbu_display() method */ function zenbu_get_table_data($entry_ids, $field_ids, $channel_id) { $output = array(); if( empty($entry_ids) || empty($field_ids)) { return $output; } // ---------------------------------------- // Get grid field data as an array // ---------------------------------------- // ---------------------------------------- // First, get field_ids that are grid fields // ---------------------------------------- if($this->EE->session->cache('zenbu', 'grid_field_ids')) { $field_ids = $this->EE->session->cache('zenbu', 'grid_field_ids'); } else { $sql = ""SHOW TABLES LIKE '%grid_field_%'""; $query = $this->EE->db->query($sql); $grid_field_ids = array(); if($query->num_rows() > 0) { foreach($query->result_array() as $row) { foreach($row as $val => $table_name) { preg_match('/(\d+)$/', $table_name, $matches); $grid_field_ids[] = $matches[1]; } } } // Make a new field_ids array, which will only be grid_field_ids $field_ids = array_intersect($grid_field_ids, $field_ids); $this->EE->session->set_cache('zenbu', 'grid_field_ids', $field_ids); } // If the new field_ids array winds up empty, get out. if( empty($field_ids)) { return $output; } // ---------------------------------------- // Since each Grid field has its own table, to avoid a mess // of clashing column names, query each table individually. // ---------------------------------------- $sql = ''; foreach($field_ids as $field_id) { if($this->EE->session->cache('zenbu', 'grid_table_data_field_'.$field_id)) { $table_data = $this->EE->session->cache('zenbu', 'grid_table_data_field_'.$field_id); } else { $sql = ""/* Zenbu grid.php "" . __FUNCTION__ ."" field_id_"" . $field_id. "" */ SELECT * FROM exp_channel_grid_field_"" . $field_id . "" gf, exp_grid_columns gc WHERE gc.field_id = "" . $field_id . "" AND gf.entry_id IN ("" . implode(', ', $entry_ids) . "") ORDER BY gf.entry_id ASC, gf.row_order ASC, gc.col_order ASC""; $query = $this->EE->db->query($sql); $headers_array = array(); $col_params = array(); $table_data = array(); if($query->num_rows() > 0) { foreach($query->result_array() as $row) { $headers_array['id'][$row['col_id']] = $row['col_id']; $headers_array['col_order'][$row['col_id']] = $row['col_order']; $headers_array['label'][$row['col_id']] = $row['col_label']; $headers_array['fieldtype'][$row['col_id']] = $row['col_type']; $table_data['headers']['field_id_'.$row['field_id']]['col_id_'.$row['col_id']] = array( ""id"" => $row['col_id'], ""col_order"" => $row['col_order'], ""label"" => $row['col_label'], ""fieldtype"" => $row['col_type'], ); } foreach($query->result_array() as $row) { foreach($headers_array['id'] as $col_id) { $table_data['table_data']['entry_id_'.$row['entry_id']]['field_id_'.$field_id]['row_'.$row['row_id']]['col_id_'.$col_id] = $row['col_id_'.$col_id]; } } } else { $headers_array['id'][] = ''; $headers_array['label'][] = ''; $headers_array['fieldtype'][] = ''; } //$headers = $col_params; //$this->EE->session->set_cache('zenbu', 'grid_headers_field_'.$field_id, $headers); $this->EE->session->set_cache('zenbu', 'grid_table_data_field_'.$field_id, $table_data); } } return $table_data; } /** * =================================== * function zenbu_field_extra_settings * =================================== * Set up display for this fieldtype in ""display settings"" * * @param $table_col string A Zenbu table column name to be used for settings and input field labels * @param $channel_id int The channel ID for this field * @param $extra_options array The Zenbu field settings, used to retieve pre-saved data * @return $output The HTML used to display setting fields */ function zenbu_field_extra_settings($table_col, $channel_id, $extra_options) { $extra_option_1 = (isset($extra_options['grid_option_1'])) ? TRUE : FALSE; $output['grid_option_1'] = form_label(form_checkbox('settings['.$channel_id.']['.$table_col.'][grid_option_1]', 'y', $extra_option_1).' '.$this->EE->lang->line('show_').$this->EE->lang->line('grid').$this->EE->lang->line('_in_row')); return $output; } /** * =================================== * function zenbu_result_query * =================================== * Extra queries to be intergrated into main entry result query * * @param $rules int An array of entry filtering rules * @param $field_id array The ID of this field * @param $fieldtypes array $fieldtype data * @param $already_queried bool Used to avoid using a FROM statement for the same field twice * @return A query to be integrated with entry results. Should be in CI Active Record format ($this->EE->db->…) */ function zenbu_result_query($rules = array(), $field_id = """", $fieldtypes, $already_queried = FALSE) { if(empty($rules)) { return; } if($already_queried === FALSE) { $this->EE->db->from(""exp_grid_data""); } $this->EE->db->where(""exp_grid_data.field_id"", $field_id); $col_query = $this->EE->db->query(""/* Zenbu: Show columns for matrix */\nSHOW COLUMNS FROM exp_grid_data""); $concat = """"; $where_in = array(); if($col_query->num_rows() > 0) { foreach($col_query->result_array() as $row) { if(strchr($row['Field'], 'col_id_') !== FALSE) { $concat .= 'exp_grid_data.'.$row['Field'].', '; } } $concat = substr($concat, 0, -2); } $col_query->free_result(); if( ! empty($concat)) { // Find entry_ids that have the keyword foreach($rules as $rule) { $rule_field_id = (strncmp($rule['field'], 'field_', 6) == 0) ? substr($rule['field'], 6) : 0; if(isset($fieldtypes['fieldtype'][$rule_field_id]) && $fieldtypes['fieldtype'][$rule_field_id] == ""matrix"") { $keyword = $rule['val']; $keyword_query = $this->EE->db->query(""/* Zenbu: Search matrix */\nSELECT entry_id FROM exp_grid_data WHERE \nCONCAT_WS(',', "".$concat."") \nLIKE '%"".$this->EE->db->escape_like_str($keyword).""%'""); $where_in = array(); if($keyword_query->num_rows() > 0) { foreach($keyword_query->result_array() as $row) { $where_in[] = $row['entry_id']; } } } // if // If $keyword_query has hits, $where_in should not be empty. // In that case finish the query if( ! empty($where_in)) { if($rule['cond'] == ""doesnotcontain"") { // …then query entries NOT in the group of entries $this->EE->db->where_not_in(""exp_channel_titles.entry_id"", $where_in); } else { $this->EE->db->where_in(""exp_channel_titles.entry_id"", $where_in); } } else { // However, $keyword_query has no hits (like on an unexistent word), $where_in will be empty // Send no results for: ""search field containing this unexistent word"". // Else, just show everything, as obviously all entries will not contain the odd word if($rule['cond'] == ""contains"") { $where_in[] = 0; $this->EE->db->where_in(""exp_channel_titles.entry_id"", $where_in); } } } // foreach } // if } } // END CLASS /* End of file grid.php */ /* Location: ./system/expressionengine/third_party/zenbu/fieldtypes/grid.php */ ?>",0 "s\Event; use Illuminate\Support\Facades\Schema; use Illuminate\Database\Eloquent\Model; /** * @group integration */ class EloquentModelCustomEventsTest extends TestCase { protected function getEnvironmentSetUp($app) { $app['config']->set('app.debug', 'true'); $app['config']->set('database.default', 'testbench'); $app['config']->set('database.connections.testbench', [ 'driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '', ]); } public function setUp() { parent::setUp(); Schema::create('test_model1', function ($table) { $table->increments('id'); }); Event::listen(CustomEvent::class, function () { $_SERVER['fired_event'] = true; }); } public function testFlushListenersClearsCustomEvents() { $_SERVER['fired_event'] = false; TestModel1::flushEventListeners(); $user = TestModel1::create(); $this->assertFalse($_SERVER['fired_event']); } public function testCustomEventListenersAreFired() { $_SERVER['fired_event'] = false; $user = TestModel1::create(); $this->assertTrue($_SERVER['fired_event']); } } class TestModel1 extends Model { public $dispatchesEvents = ['created' => CustomEvent::class]; public $table = 'test_model1'; public $timestamps = false; protected $guarded = ['id']; } class CustomEvent { } ",0 "TH]; // verb for command - open, explore, menu, uninstall, back TCHAR Document[MAX_PATH]; // document/executable for command TCHAR Directory[MAX_PATH]; // directory for command ULONG Spacing; // number of extra lines after menu item MenuItem* Next; // next item in menu RECT Area; // area of menu item in window }; // Menu // // a menu struct Menu { TCHAR Name[MAX_PATH]; // name of menu TCHAR Bitmap[MAX_PATH]; // name of bitmap for menu TCHAR FontName[MAX_PATH]; // font name for menu text ULONG FontSize; // font size (pixels) ULONG FontWeight; // font weight COLORREF ColourNormal; // normal colour (0x00BBGGRR) COLORREF ColourSelected; // selected colour (0x00BBGGRR) ULONG LeftBorder; // x of left border (pixels) ULONG TopBorder; // y of top border (pixels) ULONG LineSpacing; // spacing between lines (pixels) MenuItem* Item; // first item in menu Menu* Next; // next menu in list Menu(); // set defaults Menu(FILE* fd); // load from file ~Menu(); // delete }; // Director // // top-level control struct Director { // data loaded from file TCHAR WindowTitle[MAX_PATH]; // title for main window TCHAR AppName[MAX_PATH]; // app name in registry TCHAR ExeName[MAX_PATH]; // executable name in registry TCHAR UninstallString[MAX_PATH]; // uninstall string TCHAR AppPath[MAX_PATH]; // application path Menu* MenuList; // list of menus Menu* PreInstall; // preinstall menu Menu* PostInstall; // postinstall menu Menu* Active; // active menu Director(); // create default menus Director(FILE* fd); // load from file ~Director(); // delete void LoadRegistryStrings(); // load UninstallString[] and RunString[] from the registry Menu* FindMenu(TCHAR* name); // find a named menu }; ",0 "rg/1999/xhtml' lang='he' dir='rtl'> òùå ëîå òùá

        òùå ëîå òùá

        ÷åã: òùå ëîå òùá áúð""ê

        ñåâ: ôøèéí1

        îàú: çâé äåôø

        àì:

        ""åéöà äøàùåï àãîåðé ëåìå ëàãøú ùéòø åé÷øàå ùîå òùå"" (áøàùéú, ëä', 25).
        ôéøåù äùí - ëîå òùá. åòùå âí äâãéì ìòùåú áöéãå, àê æäå ëáø ãøù (åáàéåá, îà', 5 - ""àéï òì àôø îùìå äòùå ìáìé çú"", åáàéåá, î', 19 - ""äåà øàùéú ãøëé àì äòùå éâù çøáå"", ëùí ùááøàùéú, ëæ', 40 äåà àåîø - ""òì çøáê úçéä"")

        úâåáåú

        ",0 "tional_navigation3}} {{/propositionHeader}} {{$headerClass}}with-proposition{{/headerClass}} {{$content}}

        ALPHAThis is a new service – your feedback will help us to improve it.

        Does your cancer affect your ability to drive?

        Please select a valid option
        Back to the previous question
        {{/content}} {{$bodyEnd}} {{/bodyEnd}} {{/govuk_template}}",0 " Your Streaming Ticket

        Hello,

        Your Streaming ticket for {{ file_name }} attached! You can also directly view the video at {{ file_link }}, however to be compliant with the TEACH Act and Copyright Laws you may not share the direct link with your students.

        Please refer to the following instructions in order to create a link to your video in Blackboard:
        1. Click on the file attached to the email that was sent to you and download it.
        2. Save the file to your preferred download area (such as the Desktop)
        3. Open Blackboard and go to the desired course
        4. Go to the Content Area where you would like to place the video link
        5. Under the Build Content tab, select File (this will take you to the Create File page) or Item if you want to provide description
        6. Fill in the required options
        a. Select Browse My Computer and select the file you downloaded from this email
        b. Select Yes to Open in New Window_blank (this is REQUIRED for the video to function correctly)
        c. Select Yes to Permit Users to View this Content
        7. Click Submit
        8. Please test your video to make sure it is functioning correctly before you make it available to students.

        Your videos are available for pick-up. We do not have the ability to store your physical course materials, and materials that are not picked up after 5 business days will be sent back to you via campus mail.
        We cannot guarantee the safe return of your course materials if you do not come and pick them up.

        Cheers,
        SDSU ITS

        Generated on {{ generated_on_date_footer }}.
        This is an automated one time email, you cannot unsubscribe from this type of email.

        SDSU - Instructional Technology Services
        5500 Campanile Drive, San Diego, CA 92182

        ",0 "port android.content.*; import android.os.*; import com.zst.xposed.halo.floatingwindow3.*; import java.util.prefs.*; import android.widget.*; import android.graphics.*; public class FloatDotActivity extends Activity implements OnSharedPreferenceChangeListener { SharedPreferences mPref; //Context mContext; int[] mColors = new int[4]; int mCircleDiameter; ImageView snapDragger; ImageView floatLauncher; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.dialog_floatdot); snapDragger = (ImageView) findViewById(R.id.snapDragger); floatLauncher = (ImageView) findViewById(R.id.floatingLauncher); mPref = getSharedPreferences(Common.PREFERENCE_MAIN_FILE, MODE_WORLD_READABLE); updatePrefs(); // getFragmentManager().beginTransaction().replace(R.id.floatDotPrefs, // new FloatDotFragment()).commit(); } private void updatePrefs(){ loadColors(); mCircleDiameter=mPref.getInt(Common.KEY_FLOATDOT_SIZE, Common.DEFAULT_FLOATDOT_SIZE); snapDragger.setImageDrawable(Util.makeDoubleCircle(mColors[0], mColors[1], Util.realDp(mCircleDiameter, getApplicationContext()), Util.realDp(mCircleDiameter/4, getApplicationContext()))); floatLauncher.setImageDrawable(Util.makeDoubleCircle(mColors[2], mColors[3], Util.realDp(mCircleDiameter, getApplicationContext()), Util.realDp(mCircleDiameter/4, getApplicationContext()))); } private void loadColors(){ mColors[0] = Color.parseColor(""#"" + mPref.getString(Common.KEY_FLOATDOT_COLOR_OUTER1, Common.DEFAULT_FLOATDOT_COLOR_OUTER1)); if(mPref.getBoolean(Common.KEY_FLOATDOT_SINGLE_COLOR_SNAP, Common.DEFAULT_FLOATDOT_SINGLE_COLOR_SNAP)) mColors[1] = mColors[0]; else mColors[1] = Color.parseColor(""#"" + mPref.getString(Common.KEY_FLOATDOT_COLOR_INNER1, Common.DEFAULT_FLOATDOT_COLOR_INNER1)); mColors[2] = Color.parseColor(""#"" + mPref.getString(Common.KEY_FLOATDOT_COLOR_OUTER2, Common.DEFAULT_FLOATDOT_COLOR_OUTER2)); if(mPref.getBoolean(Common.KEY_FLOATDOT_SINGLE_COLOR_LAUNCHER, Common.DEFAULT_FLOATDOT_SINGLE_COLOR_LAUNCHER)) mColors[3] = mColors[2]; else mColors[3] = Color.parseColor(""#"" + mPref.getString(Common.KEY_FLOATDOT_COLOR_INNER2, Common.DEFAULT_FLOATDOT_COLOR_INNER2)); } private void sendRefreshCommand(String key){ int item = 0; int size = 0; float alpha = 0; String mColor = null; if(key.equals(Common.KEY_FLOATDOT_COLOR_OUTER1)) item=0; else if(key.equals(Common.KEY_FLOATDOT_COLOR_INNER1)) item=1; else if(key.equals(Common.KEY_FLOATDOT_COLOR_OUTER2)) item=2; else if(key.equals(Common.KEY_FLOATDOT_COLOR_INNER2)) item=3; else if(key.equals(Common.KEY_FLOATDOT_SINGLE_COLOR_SNAP)){ item = 1; if(mPref.getBoolean(key, Common.DEFAULT_FLOATDOT_SINGLE_COLOR_SNAP)) mColor = mPref.getString(Common.KEY_FLOATDOT_COLOR_OUTER1, Common.DEFAULT_FLOATDOT_COLOR_OUTER1); else mColor = mPref.getString(Common.KEY_FLOATDOT_COLOR_INNER1, Common.KEY_FLOATDOT_COLOR_INNER1); } else if(key.equals(Common.KEY_FLOATDOT_SINGLE_COLOR_LAUNCHER)){ item = 3; if(mPref.getBoolean(key, Common.DEFAULT_FLOATDOT_SINGLE_COLOR_LAUNCHER)) mColor = mPref.getString(Common.KEY_FLOATDOT_COLOR_OUTER2, Common.DEFAULT_FLOATDOT_COLOR_OUTER2); else mColor = mPref.getString(Common.KEY_FLOATDOT_COLOR_INNER2, Common.KEY_FLOATDOT_COLOR_INNER2); } else if(key.equals(Common.KEY_FLOATDOT_SIZE)){ size = mPref.getInt(key, Common.DEFAULT_FLOATDOT_SIZE); } else if(key.equals(Common.KEY_FLOATDOT_ALPHA)){ alpha = mPref.getFloat(key, Common.DEFAULT_FLOATDOT_ALPHA); } else return; if(mColor==null && size==0 && alpha == 0) mColor = mPref.getString(key, null); Intent mIntent = new Intent(Common.UPDATE_FLOATDOT_PARAMS); mIntent.putExtra(""color"", mColor); mIntent.putExtra(""size"", size); mIntent.putExtra(""alpha"", alpha); mIntent.putExtra(""item"", item); mIntent.setPackage(Common.THIS_MOD_PACKAGE_NAME); getApplicationContext().sendBroadcast(mIntent); } private void enableFloatDotLauncher(boolean enable){ Intent mIntent = new Intent(Common.UPDATE_FLOATDOT_PARAMS); mIntent.putExtra(Common.KEY_FLOATDOT_LAUNCHER_ENABLED, enable); mIntent.setPackage(Common.THIS_MOD_PACKAGE_NAME); getApplicationContext().sendBroadcast(mIntent); } @Override public void onSharedPreferenceChanged(SharedPreferences p1, String key) { updatePrefs(); if(key.equals(Common.KEY_FLOATDOT_LAUNCHER_ENABLED)){ enableFloatDotLauncher(mPref.getBoolean(key, Common.DEFAULT_FLOATDOT_LAUNCHER_ENABLED)); return; } sendRefreshCommand(key); } @Override protected void onResume() { super.onResume(); mPref.registerOnSharedPreferenceChangeListener(this); } @Override protected void onPause() { super.onPause(); mPref.unregisterOnSharedPreferenceChangeListener(this); } } ",0 "Context; import android.content.pm.ActivityInfo; import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.sothree.slidinguppanel.SlidingUpPanelLayout; import com.sothree.slidinguppanel.SlidingUpPanelLayout.PanelSlideListener; import java.util.ArrayList; import java.util.List; import de.klimek.spacecurl.Database; import de.klimek.spacecurl.R; import de.klimek.spacecurl.game.GameCallBackListener; import de.klimek.spacecurl.game.GameDescription; import de.klimek.spacecurl.game.GameFragment; import de.klimek.spacecurl.util.ColorGradient; import de.klimek.spacecurl.util.cards.StatusCard; import de.klimek.spacecurl.util.collection.GameStatus; import de.klimek.spacecurl.util.collection.Training; import de.klimek.spacecurl.util.collection.TrainingStatus; import it.gmariotti.cardslib.library.internal.Card; import it.gmariotti.cardslib.library.internal.CardArrayAdapter; import it.gmariotti.cardslib.library.view.CardListView; import it.gmariotti.cardslib.library.view.CardView; /** * This abstract class loads a training and provides functionality to * subclasses, e. g. usage of the status panel, switching games, and showing a * pause screen.
        * A Training must be loaded with {@link #loadTraining(Training)}. In order to * use the status-panel {@link #useStatusPanel()} has to be called. * * @author Mike Klimek * @see Android * API */ public abstract class BasicTrainingActivity extends FragmentActivity implements OnClickListener, GameCallBackListener { public static final String TAG = BasicTrainingActivity.class.getName(); // Status panel private boolean mUsesStatus = false; private TrainingStatus mTrainingStatus; private GameStatus mCurGameStatus; private int mStatusColor; private ColorGradient mStatusGradient = new ColorGradient(Color.RED, Color.YELLOW, Color.GREEN); private FrameLayout mStatusIndicator; private ImageButton mSlidingToggleButton; private boolean mButtonImageIsExpand = true; private SlidingUpPanelLayout mSlidingUpPanel; private CardListView mCardListView; private CardArrayAdapter mCardArrayAdapter; private List mCards = new ArrayList(); private GameFragment mGameFragment; private FrameLayout mGameFrame; private Training mTraining; private Database mDatabase; // Pause Frame private FrameLayout mPauseFrame; private LinearLayout mInstructionLayout; private ImageView mResumeButton; private TextView mInstructionsTextView; private String mInstructions = """"; private int mShortAnimationDuration; private State mState = State.Paused; public static enum State { Paused, Pausing, Running } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mDatabase = Database.getInstance(this); setContentView(R.layout.activity_base); setupPauseView(); } /** * Dialog with instructions for the current game or pause/play icon. Shows * when the user interacts with the App. */ private void setupPauseView() { mGameFrame = (FrameLayout) findViewById(R.id.game_frame); mGameFrame.setOnClickListener(this); // hide initially mPauseFrame = (FrameLayout) findViewById(R.id.pause_layout); mPauseFrame.setAlpha(0.0f); mPauseFrame.setVisibility(View.GONE); mInstructionLayout = (LinearLayout) findViewById(R.id.instruction_layout); mResumeButton = (ImageView) findViewById(R.id.resume_button); mInstructionsTextView = (TextView) findViewById(R.id.instructions_textview); mShortAnimationDuration = getResources().getInteger( android.R.integer.config_shortAnimTime); } @Override protected void onResume() { super.onResume(); if (mDatabase.isOrientationLandscape()) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } else { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } } /** * Subclasses must load a Training with this method. * * @param training */ protected final void loadTraining(Training training) { mTraining = training; } /** * Subclasses can use this method to enable the status-panel. */ protected final void useStatusPanel() { mTrainingStatus = mTraining.createTrainingStatus(); mUsesStatus = true; mStatusIndicator = (FrameLayout) findViewById(R.id.status_indicator); mSlidingToggleButton = (ImageButton) findViewById(R.id.panel_button); mSlidingUpPanel = (SlidingUpPanelLayout) findViewById(R.id.content_frame); mSlidingUpPanel.setPanelSlideListener(new PanelSlideListener() { @Override public void onPanelSlide(View panel, float slideOffset) { if (slideOffset > 0.5f && mButtonImageIsExpand) { mSlidingToggleButton.setImageResource(R.drawable.ic_collapse); mButtonImageIsExpand = false; } else if (slideOffset < 0.5f && !mButtonImageIsExpand) { mSlidingToggleButton.setImageResource(R.drawable.ic_expand); mButtonImageIsExpand = true; } } @Override public void onPanelCollapsed(View panel) { } @Override public void onPanelExpanded(View panel) { } @Override public void onPanelAnchored(View panel) { } @Override public void onPanelHidden(View panel) { } }); int statusIndicatorHeight = (int) (getResources() .getDimension(R.dimen.status_indicator_height)); mSlidingUpPanel.setPanelHeight(statusIndicatorHeight); // delegate clicks to underlying panel mSlidingToggleButton.setClickable(false); mSlidingUpPanel.setEnabled(true); // setup cardlist mCardArrayAdapter = new FixedCardArrayAdapter(this, mCards); mCardListView = (CardListView) findViewById(R.id.card_list); mCardListView.setAdapter(mCardArrayAdapter); } protected final void updateCurGameStatus(final float status) { // graph mCurGameStatus.addStatus(status); // indicator color mStatusColor = mStatusGradient.getColorForFraction(status); mStatusIndicator.setBackgroundColor(mStatusColor); } protected final void expandSlidingPane() { if (mState == State.Running) { pause(); mState = State.Paused; } mSlidingUpPanel.setPanelState(SlidingUpPanelLayout.PanelState.EXPANDED); } protected final void collapseSlidingPane() { mSlidingUpPanel.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); } protected final void showStatusIndicator() { mStatusIndicator.setVisibility(View.VISIBLE); } protected final void hideStatusIndicator() { mStatusIndicator.setVisibility(View.GONE); } protected final void lockSlidingPane() { mSlidingToggleButton.setVisibility(View.GONE); } protected final void unlockSlidingPane() { mSlidingToggleButton.setVisibility(View.VISIBLE); } /** * Creates a new GameFragment from a gameDescriptionIndex and displays it. * Switches to the associated gameStatus from a previous game (overwriting * it) or creates a new one. * * @param gameDescriptionIndex the game to start * @param enterAnimation how the fragment should enter * @param exitAnimation how the previous fragment should be removed */ protected final void switchToGame(int gameDescriptionIndex, int enterAnimation, int exitAnimation) { mState = State.Paused; pause(); // get Fragment GameDescription newGameDescription = mTraining.get(gameDescriptionIndex); mGameFragment = newGameDescription.createFragment(); // Transaction getSupportFragmentManager().beginTransaction() .setCustomAnimations(enterAnimation, exitAnimation) .replace(R.id.game_frame, mGameFragment) .commit(); // enable callback mGameFragment.registerGameCallBackListener(this); // update pause view mInstructions = newGameDescription.getInstructions(); if (mInstructions == null || mInstructions.isEmpty()) { // only show pause/play icon mInstructionLayout.setVisibility(View.GONE); mResumeButton.setVisibility(View.VISIBLE); } else { // only show instructions mResumeButton.setVisibility(View.GONE); mInstructionLayout.setVisibility(View.VISIBLE); mInstructionsTextView.setText(mInstructions); } if (mUsesStatus) { // switch to status associated with current game mCurGameStatus = mTrainingStatus.get(gameDescriptionIndex); if (mCurGameStatus == null) { // create new mCurGameStatus = new GameStatus(newGameDescription.getTitle()); mTrainingStatus.append(gameDescriptionIndex, mCurGameStatus); mCards.add(gameDescriptionIndex, new StatusCard(this, mCurGameStatus)); mCardArrayAdapter.notifyDataSetChanged(); } else { // reset existing mCurGameStatus.reset(); mCardArrayAdapter.notifyDataSetChanged(); } } } /** * Convenience method. Same as * {@link #switchToGame(int gameDescriptionIndex, int enterAnimation, int exitAnimation)} * but uses standard fade_in/fade_out animations. * * @param gameDescriptionIndex the game to start */ protected final void switchToGame(int gameDescriptionIndex) { switchToGame(gameDescriptionIndex, android.R.anim.fade_in, android.R.anim.fade_out); } @Override protected void onPause() { super.onPause(); if (mState == State.Running) { pause(); } mState = State.Paused; } @Override public void onUserInteraction() { // Pause on every user interaction if (mState == State.Running) { mState = State.Pausing; pause(); } else if (mState == State.Pausing) { // Previously clicked outside of gameframe and now possibly on // gameframe again to resume mState = State.Paused; } super.onUserInteraction(); } /** * Called when clicking inside the game frame (after onUserInteraction) */ @Override public void onClick(View v) { if (mState == State.Paused) { // Resume when paused resume(); mState = State.Running; } else if (mState == State.Pausing) { // We have just paused in onUserInteraction -> don't resume mState = State.Paused; } } private void pause() { Log.v(TAG, ""Paused""); // pause game if (mGameFragment != null) { mGameFragment.onPauseGame(); } // Show pause view and grey out screen mPauseFrame.setVisibility(View.VISIBLE); mPauseFrame.animate() .alpha(1f) .setDuration(mShortAnimationDuration) .setListener(null); // Show navigation bar getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE); } private void resume() { Log.v(TAG, ""Resumed""); // hide pause view mPauseFrame.animate() .alpha(0f) .setDuration(mShortAnimationDuration) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mPauseFrame.setVisibility(View.GONE); } }); // resume game if (mGameFragment != null) { mGameFragment.onResumeGame(); } // Grey out navigation bar getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); } /** * Fixes bug in {@link CardArrayAdapter CardArrayAdapter's} Viewholder * pattern. Otherwise the cards innerViewElements would not be replaced * (Title and Graph from previous Graph is shown). * * @author Mike Klimek */ private class FixedCardArrayAdapter extends CardArrayAdapter { public FixedCardArrayAdapter(Context context, List cards) { super(context, cards); } @Override public View getView(int position, View convertView, ViewGroup parent) { Card card = (Card) getItem(position); if (convertView == null) { LayoutInflater layoutInflater = LayoutInflater.from(getContext()); convertView = layoutInflater.inflate(R.layout.list_card_layout, parent, false); } CardView view = (CardView) convertView.findViewById(R.id.list_cardId); view.setForceReplaceInnerLayout(true); view.setCard(card); return convertView; } } } ",0 "en the template in the editor. */ package org.kore.runtime.jsf.converter; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.Converter; import javax.faces.convert.FacesConverter; import org.kore.runtime.person.Titel; /** * * @author Konrad Renner */ @FacesConverter(value = ""CurrencyConverter"") public class TitelConverter implements Converter { @Override public Titel getAsObject(FacesContext fc, UIComponent uic, String string) { if (string == null || string.trim().length() == 0) { return null; } return new Titel(string.trim()); } @Override public String getAsString(FacesContext fc, UIComponent uic, Object o) { if (o == null) { return null; } if (o instanceof Titel) { return ((Titel) o).getValue(); } throw new IllegalArgumentException(""Given object is not a org.kore.runtime.person.Titel""); } } ",0 " public Error(String message, Throwable cause) { super(message, cause); } public abstract int getStatusCode(); @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Error error = (Error) o; return getMessage() != null ? getMessage().equals(error.getMessage()) : error.getMessage() == null; } @Override public int hashCode() { return getMessage() != null ? getMessage().hashCode() : 0; } } ",0 "tion and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the names of PolarSSL or XySSL nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TROPICSSL_CAMELLIA_H #define TROPICSSL_CAMELLIA_H #define CAMELLIA_ENCRYPT 1 #define CAMELLIA_DECRYPT 0 /** * \brief CAMELLIA context structure */ typedef struct { int nr; /*!< number of rounds */ unsigned long rk[68]; /*!< CAMELLIA round keys */ } camellia_context; #ifdef __cplusplus extern ""C"" { #endif /** * \brief CAMELLIA key schedule (encryption) * * \param ctx CAMELLIA context to be initialized * \param key encryption key * \param keysize must be 128, 192 or 256 */ void camellia_setkey_enc(camellia_context * ctx, unsigned char *key, int keysize); /** * \brief CAMELLIA key schedule (decryption) * * \param ctx CAMELLIA context to be initialized * \param key decryption key * \param keysize must be 128, 192 or 256 */ void camellia_setkey_dec(camellia_context * ctx, unsigned char *key, int keysize); /** * \brief CAMELLIA-ECB block encryption/decryption * * \param ctx CAMELLIA context * \param mode CAMELLIA_ENCRYPT or CAMELLIA_DECRYPT * \param input 16-byte input block * \param output 16-byte output block */ void camellia_crypt_ecb(camellia_context * ctx, int mode, unsigned char input[16], unsigned char output[16]); /** * \brief CAMELLIA-CBC buffer encryption/decryption * * \param ctx CAMELLIA context * \param mode CAMELLIA_ENCRYPT or CAMELLIA_DECRYPT * \param length length of the input data * \param iv initialization vector (updated after use) * \param input buffer holding the input data * \param output buffer holding the output data */ void camellia_crypt_cbc(camellia_context * ctx, int mode, int length, unsigned char iv[16], unsigned char *input, unsigned char *output); /** * \brief CAMELLIA-CFB128 buffer encryption/decryption * * \param ctx CAMELLIA context * \param mode CAMELLIA_ENCRYPT or CAMELLIA_DECRYPT * \param length length of the input data * \param iv_off offset in IV (updated after use) * \param iv initialization vector (updated after use) * \param input buffer holding the input data * \param output buffer holding the output data */ void camellia_crypt_cfb128(camellia_context * ctx, int mode, int length, int *iv_off, unsigned char iv[16], unsigned char *input, unsigned char *output); /** * \brief Checkup routine * * \return 0 if successful, or 1 if the test failed */ int camellia_self_test(int verbose); #ifdef __cplusplus } #endif #endif /* camellia.h */ ",0 "le>bignums: 3 m 34 s 🏆
        « Up

        bignums 8.7.0 3 m 34 s 🏆

        📅 (2021-11-14 19:55:30 UTC)

        Context

        # Packages matching: installed
        # Name              # Installed # Synopsis
        base-bigarray       base
        base-threads        base
        base-unix           base
        camlp5              7.14        Preprocessor-pretty-printer of OCaml
        conf-findutils      1           Virtual package relying on findutils
        conf-perl           1           Virtual package relying on perl
        coq                 8.7.1+2     Formal proof management system
        num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
        ocaml               4.09.1      The OCaml compiler (virtual package)
        ocaml-base-compiler 4.09.1      Official release 4.09.1
        ocaml-config        1           OCaml Switch Configuration
        ocamlfind           1.9.1       A library manager for OCaml
        # opam file:
        opam-version: "2.0"
        maintainer: "pierre.letouzey@inria.fr"
        homepage: "https://github.com/coq/bignums"
        dev-repo: "git+https://github.com/coq/bignums.git"
        bug-reports: "https://github.com/coq/bignums/issues"
        authors: [
          "Laurent Théry"
          "Benjamin Grégoire"
          "Arnaud Spiwack"
          "Evgeny Makarov"
          "Pierre Letouzey"
        ]
        license: "LGPL-2.1-only"
        build: [
          [make "-j%{jobs}%" {ocaml:version >= "4.06"}]
        ]
        install: [
          [make "install"]
        ]
        depends: [
          "ocaml"
          "coq" {>= "8.7" & < "8.8~"}
        ]
        tags: [
          "keyword:integer numbers"
          "keyword:rational numbers"
          "keyword:arithmetic"
          "keyword:arbitrary-precision"
          "category:Miscellaneous/Coq Extensions"
          "category:Mathematics/Arithmetic and Number Theory/Number theory"
          "category:Mathematics/Arithmetic and Number Theory/Rational numbers"
          "date:2017-06-15"
          "logpath:Bignums"
        ]
        synopsis: "Bignums, the Coq library of arbitrary large numbers"
        description:
          "Provides BigN, BigZ, BigQ that used to be part of Coq standard library < 8.7."
        url {
          src: "https://github.com/coq/bignums/archive/V8.7.0.tar.gz"
          checksum: "md5=1d5f18f15675cfac64df59b3405e64d3"
        }
        

        Lint

        Command
        true
        Return code
        0

        Dry install 🏜️

        Dry install with the current Coq version:

        Command
        opam install -y --show-action coq-bignums.8.7.0 coq.8.7.1+2
        Return code
        0

        Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

        Command
        true
        Return code
        0

        Install dependencies

        Command
        opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-bignums.8.7.0 coq.8.7.1+2
        Return code
        0
        Duration
        13 s

        Install 🚀

        Command
        opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-bignums.8.7.0 coq.8.7.1+2
        Return code
        0
        Duration
        3 m 34 s

        Installation size

        Total: 10 M

        • 1 M ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/BigN.vo
        • 777 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDiv.vo
        • 712 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSqrt.vo
        • 641 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigZ/BigZ.vo
        • 610 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/NMake.vo
        • 549 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDiv.glob
        • 366 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleMul.vo
        • 344 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSqrt.glob
        • 306 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigQ/QMake.vo
        • 295 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDivn1.vo
        • 290 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/NMake_gen.vo
        • 274 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleCyclic.vo
        • 265 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleLift.vo
        • 263 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/NMake.glob
        • 211 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSigZAxioms.vo
        • 209 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSigNAxioms.vo
        • 200 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDivn1.glob
        • 197 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleCyclic.glob
        • 197 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/NMake_gen.glob
        • 189 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigQ/BigQ.vo
        • 181 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleMul.glob
        • 177 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigZ/ZMake.vo
        • 151 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleLift.glob
        • 145 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigQ/QMake.glob
        • 138 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaQ/QSig.vo
        • 116 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigNumPrelude.vo
        • 116 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigZ/ZMake.glob
        • 101 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/Nbasic.vo
        • 96 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSub.vo
        • 92 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleBase.vo
        • 87 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSub.glob
        • 80 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleAdd.vo
        • 74 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleBase.glob
        • 72 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleAdd.glob
        • 69 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/Nbasic.glob
        • 69 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/bignums_syntax_plugin.cmxs
        • 68 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigNumPrelude.glob
        • 62 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSigNAxioms.glob
        • 61 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSigZAxioms.glob
        • 60 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSig.vo
        • 56 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSig.vo
        • 55 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDiv.v
        • 52 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/NMake.v
        • 48 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSqrt.v
        • 37 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaQ/QSig.glob
        • 35 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigQ/QMake.v
        • 35 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSig.glob
        • 33 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/NMake_gen.v
        • 31 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSig.glob
        • 28 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleCyclic.v
        • 24 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleMul.v
        • 21 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigZ/ZMake.v
        • 20 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDivn1.v
        • 19 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleLift.v
        • 16 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/Nbasic.v
        • 16 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigZ/BigZ.glob
        • 13 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/BigN.glob
        • 13 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleBase.v
        • 13 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigNumPrelude.v
        • 12 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSub.v
        • 12 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSigZAxioms.v
        • 12 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigQ/BigQ.glob
        • 12 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSigNAxioms.v
        • 11 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleAdd.v
        • 9 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/bignums_syntax_plugin.cmi
        • 9 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/bignums_syntax_plugin.cmx
        • 7 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaQ/QSig.v
        • 6 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigZ/BigZ.v
        • 6 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigN/BigN.v
        • 5 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSig.v
        • 5 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/BigQ/BigQ.v
        • 5 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSig.v
        • 4 K ../ocaml-base-compiler.4.09.1/lib/coq/user-contrib/Bignums/bignums_syntax_plugin.cmxa

        Uninstall 🧹

        Command
        opam remove -y coq-bignums.8.7.0
        Return code
        0
        Missing removes
        none
        Wrong removes
        none

        Sources are on GitHub © Guillaume Claret 🐣

        ",0 "pliance 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. package com.boundary.sdk.event.service.db; import java.util.List; import java.util.Map; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.Processor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.boundary.camel.component.ping.PingConfiguration; import com.boundary.camel.component.port.PortConfiguration; import com.boundary.camel.component.ssh.SshxConfiguration; import com.boundary.sdk.event.service.ServiceCheckRequest; import com.boundary.sdk.event.service.ServiceTest; import com.boundary.sdk.event.service.ping.PingServiceModel; import com.boundary.sdk.event.service.port.PortServiceModel; import com.boundary.sdk.event.service.ssh.SshxServiceModel; import com.boundary.sdk.event.service.url.UrlServiceDatabase; public class ServiceChecksDatabase implements Processor { //TODO: Separate class for handling constants private static final String PING = ""ping""; private static final String PORT = ""port""; private static final String SSH = ""ssh""; private static final String URL = ""url""; private static Logger LOG = LoggerFactory.getLogger(ServiceChecksDatabase.class); public ServiceChecksDatabase() { // TODO Auto-generated constructor stub } private void sendTestData(Exchange exchange) { Message message = exchange.getIn(); String sdnDirectorHost = ""192.168.137.11""; String sdnDirectorName = ""SDN Director""; ServiceCheckRequest request = new ServiceCheckRequest(); PingConfiguration sdnDirectorPingTest = new PingConfiguration(); sdnDirectorPingTest.setHost(sdnDirectorHost); PingServiceModel sdnDirectorPingModel = new PingServiceModel(); PortConfiguration sdnDirectorPortTest8080 = new PortConfiguration(); sdnDirectorPortTest8080.setHost(sdnDirectorHost); sdnDirectorPortTest8080.setPort(8080); PortServiceModel sdnDirectorPortModel8080 = new PortServiceModel(); SshxConfiguration plumgridProcessTest = new SshxConfiguration(); plumgridProcessTest.setHost(sdnDirectorHost); plumgridProcessTest.setCommand(""status plumgrid""); plumgridProcessTest.setTimeout(10000); plumgridProcessTest.setUsername(""plumgrid""); plumgridProcessTest.setPassword(""plumgrid""); SshxServiceModel plumgridProcessModel = new SshxServiceModel(); plumgridProcessModel.setExpectedOutput(""^plumgrid start/running, process\\s+\\d+""); SshxConfiguration plumgridSalProcessTest = new SshxConfiguration(); plumgridSalProcessTest.setHost(sdnDirectorHost); plumgridSalProcessTest.setCommand(""status plumgrid-sal""); plumgridSalProcessTest.setTimeout(10000); plumgridSalProcessTest.setUsername(""plumgrid""); plumgridSalProcessTest.setPassword(""plumgrid""); SshxServiceModel plumgridSalProcessTestModel = new SshxServiceModel(); plumgridSalProcessTestModel.setExpectedOutput(""^plumgrid-sal start/running, process\\s\\d+""); SshxConfiguration nginxProcessTest = new SshxConfiguration(); nginxProcessTest.setHost(sdnDirectorHost); nginxProcessTest.setCommand(""status nginx""); nginxProcessTest.setTimeout(10000); nginxProcessTest.setUsername(""plumgrid""); nginxProcessTest.setPassword(""plumgrid""); SshxServiceModel nginxProcessModel = new SshxServiceModel(); nginxProcessModel.setExpectedOutput(""^nginx start/running, process\\s\\d+""); ServiceTest pingSDNDirector= new ServiceTest( ""host status"",""ping"",sdnDirectorName,request.getRequestId(),sdnDirectorPingTest,sdnDirectorPingModel); request.addServiceTest(pingSDNDirector); ServiceTest portSDNDirector8080 = new ServiceTest( ""8080 port status"",""port"",sdnDirectorName,request.getRequestId(),sdnDirectorPortTest8080,sdnDirectorPortModel8080); request.addServiceTest(portSDNDirector8080); ServiceTest sshPlumgridProcess = new ServiceTest( ""plumgrid process status"",""ssh"",sdnDirectorName,request.getRequestId(),plumgridProcessTest,plumgridProcessModel); request.addServiceTest(sshPlumgridProcess); ServiceTest sshPlumgridSalProcess = new ServiceTest( ""plumgrid-sal process status"",""ssh"",sdnDirectorName,request.getRequestId(),plumgridProcessTest,plumgridProcessModel); request.addServiceTest(sshPlumgridSalProcess); ServiceTest sshNginxProcess = new ServiceTest( ""nginx process status"",""ssh"",sdnDirectorName,request.getRequestId(),plumgridProcessTest,plumgridProcessModel); request.addServiceTest(sshNginxProcess); message.setBody(request); } private void createPingServiceTest(ServiceCheckRequest request, Map row) { String pingHost = row.get(""pingHost"").toString(); int pingTimeout = Integer.parseInt(row.get(""pingTimeout"").toString()); PingConfiguration pingConfiguration = new PingConfiguration(); pingConfiguration.setHost(pingHost); pingConfiguration.setTimeout(pingTimeout); String serviceName = row.get(""serviceName"").toString(); String serviceTestName = row.get(""serviceTestName"").toString(); String serviceTypeName = row.get(""serviceTypeName"").toString(); PingServiceModel pingServiceModel = new PingServiceModel(); ServiceTest pingServiceTest = new ServiceTest(serviceTestName,serviceTypeName,serviceName, request.getRequestId(),pingConfiguration,pingServiceModel); request.addServiceTest(pingServiceTest); } private void createPortServiceTest(ServiceCheckRequest request, Map row) { String portHost = row.get(""portHost"").toString(); int port = Integer.parseInt(row.get(""portPort"").toString()); int portTimeout = Integer.parseInt(row.get(""portTimeout"").toString()); PortConfiguration portConfiguration = new PortConfiguration(); portConfiguration.setHost(portHost); portConfiguration.setPort(port); portConfiguration.setTimeout(portTimeout); String serviceName = row.get(""serviceName"").toString(); String serviceTestName = row.get(""serviceTestName"").toString(); String serviceTypeName = row.get(""serviceTypeName"").toString(); PortServiceModel portServiceModel = new PortServiceModel(); ServiceTest portServicetest = new ServiceTest(serviceTestName,serviceTypeName,serviceName, request.getRequestId(),portConfiguration,portServiceModel); request.addServiceTest(portServicetest); } private void createSshServiceTest(ServiceCheckRequest request, Map row) { String sshHost = row.get(""sshHost"").toString(); int sshPort = Integer.parseInt(row.get(""sshPort"").toString()); int sshTimeout = Integer.parseInt(row.get(""sshTimeout"").toString()); String sshUserName = row.get(""sshUserName"").toString(); String sshPassword = row.get(""sshPassword"").toString(); String sshCommand = row.get(""sshCommand"").toString(); SshxConfiguration sshConfiguration = new SshxConfiguration(); sshConfiguration.setHost(sshHost); sshConfiguration.setPort(sshPort); sshConfiguration.setTimeout(sshTimeout); sshConfiguration.setUsername(sshUserName); sshConfiguration.setPassword(sshPassword); sshConfiguration.setCommand(sshCommand); String serviceName = row.get(""serviceName"").toString(); String serviceTestName = row.get(""serviceTestName"").toString(); String serviceTypeName = row.get(""serviceTypeName"").toString(); SshxServiceModel sshServiceModel = new SshxServiceModel(); String expectedOutput = row.get(""sshExpectedOutput"").toString(); sshServiceModel.setExpectedOutput(expectedOutput); ServiceTest sshServicetest = new ServiceTest(serviceTestName,serviceTypeName,serviceName, request.getRequestId(),sshConfiguration,sshServiceModel); request.addServiceTest(sshServicetest); } private void createUrlServiceTest(ServiceCheckRequest request, Map row) { UrlServiceDatabase serviceUrl = new UrlServiceDatabase(); serviceUrl.populate(request,row); } @Override public void process(Exchange exchange) throws Exception { Message message = exchange.getIn(); ServiceCheckRequest request = new ServiceCheckRequest(); List> list = message.getBody(List.class); for (Map row : list) { LOG.debug(""Service Test Data: "" + row.toString()); String serviceTestType = row.get(""serviceTypeName"").toString(); switch (serviceTestType) { case PING: createPingServiceTest(request,row); break; case PORT: createPortServiceTest(request,row); break; case SSH: createSshServiceTest(request,row); break; case URL: createUrlServiceTest(request,row); break; } } //TODO: How to handle if there are no service tests message.setBody(request); } } ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.solr.handler.export; import java.io.IOException; import org.apache.lucene.index.DocValues; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.MultiDocValues; import org.apache.lucene.index.OrdinalMap; import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.LongValues; class StringValue implements SortValue { private final SortedDocValues globalDocValues; private final OrdinalMap ordinalMap; private final String field; private final IntComp comp; protected LongValues toGlobal = LongValues.IDENTITY; // this segment to global ordinal. NN; protected SortedDocValues docValues; public int currentOrd; protected int lastDocID; private boolean present; private BytesRef lastBytes; private String lastString; private int lastOrd = -1; private int leafOrd = -1; public StringValue(SortedDocValues globalDocValues, String field, IntComp comp) { this.globalDocValues = globalDocValues; this.docValues = globalDocValues; if (globalDocValues instanceof MultiDocValues.MultiSortedDocValues) { this.ordinalMap = ((MultiDocValues.MultiSortedDocValues) globalDocValues).mapping; } else { this.ordinalMap = null; } this.field = field; this.comp = comp; this.currentOrd = comp.resetValue(); this.present = false; } public String getLastString() { return this.lastString; } public void setLastString(String lastString) { this.lastString = lastString; } public StringValue copy() { StringValue copy = new StringValue(globalDocValues, field, comp); return copy; } public void setCurrentValue(int docId) throws IOException { // System.out.println(docId +"":""+lastDocID); /* if (docId < lastDocID) { throw new AssertionError(""docs were sent out-of-order: lastDocID="" + lastDocID + "" vs doc="" + docId); } lastDocID = docId; */ if (docId > docValues.docID()) { docValues.advance(docId); } if (docId == docValues.docID()) { present = true; currentOrd = docValues.ordValue(); } else { present = false; currentOrd = -1; } } @Override public boolean isPresent() { return present; } public void setCurrentValue(SortValue sv) { StringValue v = (StringValue) sv; this.currentOrd = v.currentOrd; this.present = v.present; this.leafOrd = v.leafOrd; this.lastOrd = v.lastOrd; this.toGlobal = v.toGlobal; } public Object getCurrentValue() throws IOException { assert present == true; if (currentOrd != lastOrd) { lastBytes = docValues.lookupOrd(currentOrd); lastOrd = currentOrd; lastString = null; } return lastBytes; } public void toGlobalValue(SortValue previousValue) { lastOrd = currentOrd; StringValue sv = (StringValue) previousValue; if (sv.lastOrd == currentOrd) { // Take the global ord from the previousValue unless we are a -1 which is the same in both // global and leaf ordinal if (this.currentOrd != -1) { this.currentOrd = sv.currentOrd; } } else { if (this.currentOrd > -1) { this.currentOrd = (int) toGlobal.get(this.currentOrd); } } } public String getField() { return field; } public void setNextReader(LeafReaderContext context) throws IOException { leafOrd = context.ord; if (ordinalMap != null) { toGlobal = ordinalMap.getGlobalOrds(context.ord); } docValues = DocValues.getSorted(context.reader(), field); lastDocID = 0; } public void reset() { this.currentOrd = comp.resetValue(); this.present = false; lastDocID = 0; } public int compareTo(SortValue o) { StringValue sv = (StringValue) o; return comp.compare(currentOrd, sv.currentOrd); } public String toString() { return Integer.toString(this.currentOrd); } } ",0 "tAPI is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ReportAPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with ReportAPI. If not, see . --> {% endcomment %}{% load i18n l10n %}
        fade in"">

        <% if (type==""alert-danger"") { %>{% trans 'Bug!' %}<% } else if (type==""alert-warning"") { %>{% trans 'Attention!' %}<% } else { %>{% trans 'Message.' %}<% } %>

        <%= msg %> <% if ((type==""alert-error"") && (DEBUG)) { %>
        {% trans 'see the log in the JavaScript console' %}
        <% } %>
        ",0 "re.preferences.PlaybackPreferences; import de.danoeh.antennapod.core.preferences.SleepTimerPreferences; import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.storage.PodDBAdapter; import de.danoeh.antennapod.core.util.NetworkUtils; /** * Stores callbacks for core classes like Services, DB classes etc. and other configuration variables. * Apps using the core module of AntennaPod should register implementations of all interfaces here. */ public class ClientConfig { private ClientConfig(){} /** * Should be used when setting User-Agent header for HTTP-requests. */ public static String USER_AGENT; public static ApplicationCallbacks applicationCallbacks; public static DownloadServiceCallbacks downloadServiceCallbacks; public static PlaybackServiceCallbacks playbackServiceCallbacks; public static GpodnetCallbacks gpodnetCallbacks; public static FlattrCallbacks flattrCallbacks; public static DBTasksCallbacks dbTasksCallbacks; public static CastCallbacks castCallbacks; private static boolean initialized = false; public static synchronized void initialize(Context context) { if(initialized) { return; } PodDBAdapter.init(context); UserPreferences.init(context); UpdateManager.init(context); PlaybackPreferences.init(context); NetworkUtils.init(context); CastManager.init(context); SleepTimerPreferences.init(context); initialized = true; } } ",0 "opensearch/1.1/""> Inppnet - Instituto Nacional de Parapsicologia Psicometafísica Instituto Nacional de Parapsicologia Psicometafísica. Cursos Online UTF-8 http://sala.inppnet.com.br/templates/ja_university/favicon.ico "";",0 "f the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** * Copyright (C) 2007-2011 Catalyst IT (http://www.catalyst.net.nz) * Copyright (C) 2011-2013 Totara LMS (http://www.totaralms.com) * Copyright (C) 2014 onwards Catalyst IT (http://www.catalyst-eu.net) * * @package mod * @subpackage facetoface * @copyright 2014 onwards Catalyst IT * @author Stacey Walker */ namespace mod_facetoface\event; defined('MOODLE_INTERNAL') || die(); /** * The mod_facetoface take attendance event class. * * @package mod_facetoface * @since Moodle 2.7 * @copyright 2014 onwards Catalyst IT * @author Stacey Walker * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class take_attendance extends \core\event\base { /** * Init method. * * @return void */ protected function init() { $this->data['crud'] = 'r'; $this->data['edulevel'] = self::LEVEL_PARTICIPATING; $this->data['objecttable'] = 'facetoface_sessions'; } /** * Returns description of what happened. * * @return string */ public function get_description() { return ""The user with id '$this->userid' has taken the attendance for session with id '$this->objectid' in the facetoface instance "" . ""with the course module id '$this->contextinstanceid'.""; } /** * Return localised event name. * * @return string */ public static function get_name() { return get_string('eventattendancetaken', 'mod_facetoface'); } /** * Get URL related to the action * * @return \moodle_url */ public function get_url() { return new \moodle_url('/mod/facetoface/attendees.php', array('s' => $this->objectid, 'takeattendance' => 1)); } /** * Return the legacy event log data. * * @return array|null */ protected function get_legacy_logdata() { return array($this->courseid, $this->objecttable, 'take attendance', 'attendees.php?s=' . $this->objectid . '&takeattendance=1', $this->objectid, $this->contextinstanceid); } /** * Custom validation. * * @throws \coding_exception * @return void */ protected function validate_data() { parent::validate_data(); if ($this->contextlevel != CONTEXT_MODULE) { throw new \coding_exception('Context level must be CONTEXT_MODULE.'); } } } ",0 "Stream; import java.io.ObjectOutputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Date; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.codec.binary.Base64; import org.apache.log4j.Logger; @WebServlet(""/controller"") public class ControllerServlet extends HttpServlet { private final Logger LOG = Logger.getLogger(ControllerServlet.class); private static final long serialVersionUID = 1L; public ControllerServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Controller String message = """"; String state = """"; String action = request.getParameter(""action""); if(action == null) { // do nothing } else if(action.equals(""Login"")) { LOG.info(""> login""); state = listToString(new ArrayList()); message = ""You logged in successfully!""; } else if(action.equals(""Logout"")) { LOG.info(""> logout""); state = """"; message = ""You logged out successfully!""; } else if(action.equals(""Add"")) { String name = request.getParameter(""name""); String quantity = request.getParameter(""quantity""); ArrayList cart = listFromString(request.getParameter(""state"")); Product product = new Product(name, quantity); LOG.info(""> add "" + product); cart.add(product); state = listToString(cart); message = ""added: "" + product.getQuantity() + "" "" + product.getName() + "" to the cart""; LOG.info(""> cart: "" + cart); } // generate response page response.setContentType(""text/html""); PrintWriter out = response.getWriter(); String html = generateWebPage(state, message); out.println(html); out.close(); } private String generateWebPage(String state, String message) { StringBuilder html = new StringBuilder(); html.append(""\n""); html.append(""\n""); html.append("" \n""); html.append("" Simple Shopping Cart\n""); html.append("" \n""); html.append("" \n""); html.append(""

        Session Management

        \n""); html.append(""
        ""); html.append("" \n""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append(""
        ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append(""
        ""); html.append(""
        ""); html.append(""

        ""); html.append(""

        Your Shopping Cart:

        \n""); html.append(""
        ""); html.append("" \n""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append("" ""); html.append(""
        ProductQuantity
        ""); html.append(""
        ""); html.append(""

        ""); html.append(""

        "" + message + ""

        ""); html.append(""

        ""); Date now = new Date(); html.append(""

        "" + now + ""
        ""); return html.toString(); } private String listToString(ArrayList list) { LOG.debug(""listToString() "" + list); try { ByteArrayOutputStream bout = new ByteArrayOutputStream(); ObjectOutputStream oos= new ObjectOutputStream(bout); oos.writeObject(list); oos.close(); byte[] bytes = bout.toByteArray(); // TODO: Encryption return Base64.encodeBase64String(bytes); } catch (IOException e) { return """"; } } @SuppressWarnings(""unchecked"") private ArrayList listFromString(String base64String) { LOG.debug(""listFromString() "" + base64String); try { byte[] bytes = Base64.decodeBase64(base64String); // Decrypt data ArrayList list = new ArrayList(); ByteArrayInputStream bin = new ByteArrayInputStream(bytes); ObjectInputStream ois; ois = new ObjectInputStream(bin); list = (ArrayList) ois.readObject(); ois.close(); return list; } catch (IOException | ClassNotFoundException e) { return new ArrayList(); } } } ",0 " | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2014 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | | CiviCRM is free software; you can copy, modify, and distribute it | | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | | | | You should have received a copy of the GNU Affero General Public | | License and the CiviCRM Licensing Exception along | | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ */ require_once '../civicrm.config.php'; require_once 'CRM/Core/Config.php'; $config = CRM_Core_Config::singleton(); session_start(); require_once 'CRM/Utils/REST.php'; $rest = new CRM_Utils_REST(); if (isset($_GET['json']) && $_GET['json']) { header('Content-Type: text/javascript'); } else { header('Content-Type: text/xml'); } echo $rest->bootAndRun(); ",0 "f the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * ""Shopware"" is a registered trademark of shopware AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ namespace Shopware\Bundle\ESIndexingBundle\Product; use Shopware\Bundle\ESIndexingBundle\LastIdQuery; /** * Class ProductQueryFactoryInterface */ interface ProductQueryFactoryInterface { /** * @param int $categoryId * @param int|null $limit * * @return LastIdQuery */ public function createCategoryQuery($categoryId, $limit = null); /** * @param int[] $priceIds * @param int|null $limit * * @return LastIdQuery */ public function createPriceIdQuery($priceIds, $limit = null); /** * @param int[] $unitIds * @param int|null $limit * * @return LastIdQuery */ public function createUnitIdQuery($unitIds, $limit = null); /** * @param int[] $voteIds * @param int|null $limit * * @return LastIdQuery */ public function createVoteIdQuery($voteIds, $limit = null); /** * @param int[] $productIds * @param int|null $limit * * @return LastIdQuery */ public function createProductIdQuery($productIds, $limit = null); /** * @param int[] $variantIds * @param int|null $limit * * @return LastIdQuery */ public function createVariantIdQuery($variantIds, $limit = null); /** * @param int[] $taxIds * @param int|null $limit * * @return LastIdQuery */ public function createTaxQuery($taxIds, $limit = null); /** * @param int[] $manufacturerIds * @param int|null $limit * * @return LastIdQuery */ public function createManufacturerQuery($manufacturerIds, $limit = null); /** * @param int[] $categoryIds * @param int|null $limit * * @return LastIdQuery */ public function createProductCategoryQuery($categoryIds, $limit = null); /** * @param int[] $groupIds * @param int|null $limit * * @return LastIdQuery */ public function createPropertyGroupQuery($groupIds, $limit = null); /** * @param int[] $optionIds * @param int|null $limit * * @return LastIdQuery */ public function createPropertyOptionQuery($optionIds, $limit = null); } ",0 "enerated by javadoc (version 1.7.0) on Sat Oct 20 21:08:33 CEST 2012 --> R.drawable
        kvhc.adrumdrum

        Class R.drawable

        • java.lang.Object
          • kvhc.adrumdrum.R.drawable
        • Enclosing class:
          R


          public static final class R.drawable
          extends java.lang.Object
        ",0 " 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. */ #ifndef SkUserConfig_DEFINED #define SkUserConfig_DEFINED /* SkTypes.h, the root of the public header files, does the following trick: #include #include #include SkPreConfig.h runs first, and it is responsible for initializing certain skia defines. SkPostConfig.h runs last, and its job is to just check that the final defines are consistent (i.e. that we don't have mutually conflicting defines). SkUserConfig.h (this file) runs in the middle. It gets to change or augment the list of flags initially set in preconfig, and then postconfig checks that everything still makes sense. Below are optional defines that add, subtract, or change default behavior in Skia. Your port can locally edit this file to enable/disable flags as you choose, or these can be delared on your command line (i.e. -Dfoo). By default, this include file will always default to having all of the flags commented out, so including it will have no effect. */ /////////////////////////////////////////////////////////////////////////////// /* Scalars (the fractional value type in skia) can be implemented either as floats or 16.16 integers (fixed). Exactly one of these two symbols must be defined. */ //#define SK_SCALAR_IS_FLOAT //#define SK_SCALAR_IS_FIXED /* Somewhat independent of how SkScalar is implemented, Skia also wants to know if it can use floats at all. Naturally, if SK_SCALAR_IS_FLOAT is defined, then so muse SK_CAN_USE_FLOAT, but if scalars are fixed, SK_CAN_USE_FLOAT can go either way. */ //#define SK_CAN_USE_FLOAT /* For some performance-critical scalar operations, skia will optionally work around the standard float operators if it knows that the CPU does not have native support for floats. If your environment uses software floating point, define this flag. */ //#define SK_SOFTWARE_FLOAT /* Skia has lots of debug-only code. Often this is just null checks or other parameter checking, but sometimes it can be quite intrusive (e.g. check that each 32bit pixel is in premultiplied form). This code can be very useful during development, but will slow things down in a shipping product. By default, these mutually exclusive flags are defined in SkPreConfig.h, based on the presence or absence of NDEBUG, but that decision can be changed here. */ //#define SK_DEBUG //#define SK_RELEASE /* If, in debugging mode, Skia needs to stop (presumably to invoke a debugger) it will call SK_CRASH(). If this is not defined it, it is defined in SkPostConfig.h to write to an illegal address */ //#define SK_CRASH() *(int *)(uintptr_t)0 = 0 /* preconfig will have attempted to determine the endianness of the system, but you can change these mutually exclusive flags here. */ //#define SK_CPU_BENDIAN //#define SK_CPU_LENDIAN /* Some compilers don't support long long for 64bit integers. If yours does not, define this to the appropriate type. */ //#define SkLONGLONG int64_t /* Some envorinments do not suport writable globals (eek!). If yours does not, define this flag. */ //#define SK_USE_RUNTIME_GLOBALS /* To write debug messages to a console, skia will call SkDebugf(...) following printf conventions (e.g. const char* format, ...). If you want to redirect this to something other than printf, define yours here */ //#define SkDebugf(...) MyFunction(__VA_ARGS__) /* If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST which will run additional self-tests at startup. These can take a long time, so this flag is optional. */ #ifdef SK_DEBUG #define SK_SUPPORT_UNITTEST #endif // ===== Begin Chrome-specific definitions ===== #define SK_SCALAR_IS_FLOAT #undef SK_SCALAR_IS_FIXED // Log the file and line number for assertions. #define SkDebugf(...) SkDebugf_FileLine(__FILE__, __LINE__, false, __VA_ARGS__) void SkDebugf_FileLine(const char* file, int line, bool fatal, const char* format, ...); // Marking the debug print as ""fatal"" will cause a debug break, so we don't need // a separate crash call here. #define SK_DEBUGBREAK(cond) do { if (!(cond)) { \ SkDebugf_FileLine(__FILE__, __LINE__, true, \ ""%s:%d: failed assertion \""%s\""\n"", \ __FILE__, __LINE__, #cond); } } while (false) #if defined(SK_BUILD_FOR_WIN32) #define SK_BUILD_FOR_WIN // VC8 doesn't support stdint.h, so we define those types here. #define SK_IGNORE_STDINT_DOT_H typedef signed char int8_t; typedef unsigned char uint8_t; typedef short int16_t; typedef unsigned short uint16_t; typedef int int32_t; typedef unsigned uint32_t; #define SK_A32_SHIFT 24 #define SK_R32_SHIFT 16 #define SK_G32_SHIFT 8 #define SK_B32_SHIFT 0 // VC doesn't support __restrict__, so make it a NOP. #undef SK_RESTRICT #define SK_RESTRICT // Skia uses this deprecated bzero function to fill zeros into a string. #define bzero(str, len) memset(str, 0, len) #elif defined(SK_BUILD_FOR_MAC) #define SK_CPU_LENDIAN #undef SK_CPU_BENDIAN // we want (memory order) BGRA, because that's what core image uses with // kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, which is what // Apple recommends for best performance (ARGB becomes BGRA in memory on // little-endian) -- and we want skia and coregraphic to have matching memory // layouts, so that we don't have to spend time converting between them. #define SK_A32_SHIFT 24 #define SK_R32_SHIFT 16 #define SK_G32_SHIFT 8 #define SK_B32_SHIFT 0 #elif defined(SK_BUILD_FOR_UNIX) #ifdef SK_CPU_BENDIAN // Below we set the order for ARGB channels in registers. I suspect that, on // big endian machines, you can keep this the same and everything will work. // The in-memory order will be different, of course, but as long as everything // is reading memory as words rather than bytes, it will all work. However, if // you find that colours are messed up I thought that I would leave a helpful // locator for you. Also see the comments in // base/gfx/bitmap_platform_device_linux.h #error Read the comment at this location #endif // For Linux we want to match the most common X visual, which is // ARGB (in registers) #define SK_A32_SHIFT 24 #define SK_R32_SHIFT 16 #define SK_G32_SHIFT 8 #define SK_B32_SHIFT 0 #endif // The default crash macro writes to badbeef which can cause some strange // problems. Instead, pipe this through to the logging function as a fatal // assertion. #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, ""SK_CRASH"") // TODO(brettw) bug 6373: Re-enable Skia assertions. This is blocked on fixing // some of our transparency handling which generates purposely-invalid colors, // in turn causing assertions. //#ifndef NDEBUG // #define SK_DEBUG // #undef SK_RELEASE #undef SK_SUPPORT_UNITTEST // This is only necessary in debug mode since // we've disabled assertions. When we re-enable // them, this line can be removed. //#else #define SK_RELEASE #undef SK_DEBUG //#endif // For now (and to avoid rebaselining 1700+ tests), we'll use the old version // of SkAlpha255To256. #define SK_USE_OLD_255_TO_256 // ===== End Chrome-specific definitions ===== #endif ",0 "l Wildcatpoint SST Audio * * Copyright (C) 2013, Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version * 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include #include #include #include #include #include #include #include ""../../codecs/rt286.h"" static struct snd_soc_jack skylake_headset; /* Headset jack detection DAPM pins */ static struct snd_soc_jack_pin skylake_headset_pins[] = { { .pin = ""Mic Jack"", .mask = SND_JACK_MICROPHONE, }, { .pin = ""Headphone Jack"", .mask = SND_JACK_HEADPHONE, }, }; static const struct snd_kcontrol_new skylake_controls[] = { SOC_DAPM_PIN_SWITCH(""Speaker""), SOC_DAPM_PIN_SWITCH(""Headphone Jack""), SOC_DAPM_PIN_SWITCH(""Mic Jack""), }; static const struct snd_soc_dapm_widget skylake_widgets[] = { SND_SOC_DAPM_HP(""Headphone Jack"", NULL), SND_SOC_DAPM_SPK(""Speaker"", NULL), SND_SOC_DAPM_MIC(""Mic Jack"", NULL), SND_SOC_DAPM_MIC(""DMIC2"", NULL), SND_SOC_DAPM_MIC(""SoC DMIC"", NULL), }; static const struct snd_soc_dapm_route skylake_rt286_map[] = { /* speaker */ {""Speaker"", NULL, ""SPOR""}, {""Speaker"", NULL, ""SPOL""}, /* HP jack connectors - unknown if we have jack deteck */ {""Headphone Jack"", NULL, ""HPO Pin""}, /* other jacks */ {""MIC1"", NULL, ""Mic Jack""}, /* digital mics */ {""DMIC1 Pin"", NULL, ""DMIC2""}, {""DMIC AIF"", NULL, ""SoC DMIC""}, /* CODEC BE connections */ { ""AIF1 Playback"", NULL, ""ssp0 Tx""}, { ""ssp0 Tx"", NULL, ""codec0_out""}, { ""ssp0 Tx"", NULL, ""codec1_out""}, { ""codec0_in"", NULL, ""ssp0 Rx"" }, { ""codec1_in"", NULL, ""ssp0 Rx"" }, { ""ssp0 Rx"", NULL, ""AIF1 Capture"" }, { ""dmic01_hifi"", NULL, ""DMIC01 Rx"" }, { ""DMIC01 Rx"", NULL, ""Capture"" }, { ""hif1"", NULL, ""iDisp Tx""}, { ""iDisp Tx"", NULL, ""iDisp_out""}, }; static int skylake_rt286_codec_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; int ret; ret = snd_soc_card_jack_new(rtd->card, ""Headset"", SND_JACK_HEADSET | SND_JACK_BTN_0, &skylake_headset, skylake_headset_pins, ARRAY_SIZE(skylake_headset_pins)); if (ret) return ret; rt286_mic_detect(codec, &skylake_headset); return 0; } static int skylake_ssp0_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); /* The output is 48KHz, stereo, 16bits */ rate->min = rate->max = 48000; channels->min = channels->max = 2; params_set_format(params, SNDRV_PCM_FORMAT_S16_LE); return 0; } static int skylake_rt286_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *codec_dai = rtd->codec_dai; int ret; ret = snd_soc_dai_set_sysclk(codec_dai, RT286_SCLK_S_PLL, 24000000, SND_SOC_CLOCK_IN); if (ret < 0) dev_err(rtd->dev, ""set codec sysclk failed: %d\n"", ret); return ret; } static struct snd_soc_ops skylake_rt286_ops = { .hw_params = skylake_rt286_hw_params, }; /* skylake digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link skylake_rt286_dais[] = { /* Front End DAI links */ { .name = ""Skl Audio Port"", .stream_name = ""Audio"", .cpu_dai_name = ""System Pin"", .platform_name = ""0000:00:1f.3"", .nonatomic = 1, .dynamic = 1, .codec_name = ""snd-soc-dummy"", .codec_dai_name = ""snd-soc-dummy-dai"", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST }, .dpcm_playback = 1, }, { .name = ""Skl Audio Capture Port"", .stream_name = ""Audio Record"", .cpu_dai_name = ""System Pin"", .platform_name = ""0000:00:1f.3"", .nonatomic = 1, .dynamic = 1, .codec_name = ""snd-soc-dummy"", .codec_dai_name = ""snd-soc-dummy-dai"", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST }, .dpcm_capture = 1, }, { .name = ""Skl Audio Reference cap"", .stream_name = ""refcap"", .cpu_dai_name = ""Reference Pin"", .codec_name = ""snd-soc-dummy"", .codec_dai_name = ""snd-soc-dummy-dai"", .platform_name = ""0000:00:1f.3"", .init = NULL, .dpcm_capture = 1, .ignore_suspend = 1, .nonatomic = 1, .dynamic = 1, }, /* Back End DAI links */ { /* SSP0 - Codec */ .name = ""SSP0-Codec"", .be_id = 0, .cpu_dai_name = ""SSP0 Pin"", .platform_name = ""0000:00:1f.3"", .no_pcm = 1, .codec_name = ""i2c-INT343A:00"", .codec_dai_name = ""rt286-aif1"", .init = skylake_rt286_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ignore_suspend = 1, .ignore_pmdown_time = 1, .be_hw_params_fixup = skylake_ssp0_fixup, .ops = &skylake_rt286_ops, .dpcm_playback = 1, .dpcm_capture = 1, }, { .name = ""dmic01"", .be_id = 1, .cpu_dai_name = ""DMIC01 Pin"", .codec_name = ""dmic-codec"", .codec_dai_name = ""dmic-hifi"", .platform_name = ""0000:00:1f.3"", .ignore_suspend = 1, .dpcm_capture = 1, .no_pcm = 1, }, }; /* skylake audio machine driver for SPT + RT286S */ static struct snd_soc_card skylake_rt286 = { .name = ""skylake-rt286"", .owner = THIS_MODULE, .dai_link = skylake_rt286_dais, .num_links = ARRAY_SIZE(skylake_rt286_dais), .controls = skylake_controls, .num_controls = ARRAY_SIZE(skylake_controls), .dapm_widgets = skylake_widgets, .num_dapm_widgets = ARRAY_SIZE(skylake_widgets), .dapm_routes = skylake_rt286_map, .num_dapm_routes = ARRAY_SIZE(skylake_rt286_map), .fully_routed = true, }; static int skylake_audio_probe(struct platform_device *pdev) { skylake_rt286.dev = &pdev->dev; return devm_snd_soc_register_card(&pdev->dev, &skylake_rt286); } static struct platform_driver skylake_audio = { .probe = skylake_audio_probe, .driver = { .name = ""skl_alc286s_i2s"", }, }; module_platform_driver(skylake_audio) /* Module information */ MODULE_AUTHOR(""Omair Mohammed Abdullah ""); MODULE_DESCRIPTION(""Intel SST Audio for Skylake""); MODULE_LICENSE(""GPL v2""); MODULE_ALIAS(""platform:skl_alc286s_i2s""); ",0 "PhpDaemon\Lib\Command; /** * Create a simple socket server. * Supply an IP and Port for incoming connections. Add any number of Command objects to parse client input. * * Used in blocking mode, this can be the backbone of a Daemon based server with a loop_interval set to Null. * Alternatively, you could set $blocking = false and use it to interact with a timer-based Daemon application. * * Can be combined with the Worker API by adding Command objects that call methods attached to a Worker. That would leave * the main Application process to handle connections and client input, worker process management, and passing commands * between client input to worker calls, and worker return values to client output. * */ class Server implements IPlugin { const COMMAND_CONNECT = 'CLIENT_CONNECT'; const COMMAND_DISCONNECT = 'CLIENT_DISCONNECT'; const COMMAND_DESTRUCT = 'SERVER_DISCONNECT'; /** * @var Daemon */ public $daemon; /** * The IP Address server will listen on * @var string IP */ public $ip; /** * The Port the server will listen on * @var integer */ public $port; /** * The socket resource * @var Resource */ public $socket; /** * Maximum number of concurrent clients * @var int */ public $max_clients = 10; /** * Maximum bytes read from a given client connection at a time * @var int */ public $max_read = 1024; /** * Array of stdClass client structs. * @var stdClass[] */ public $clients = array(); /** * Is this a Blocking server or a Polling server? When in blocking mode, the server will * wait for connections & commands indefinitely. When polling, it will look for any connections or commands awaiting * a response and return immediately if there aren't any. * @var bool */ public $blocking = false; /** * Write verbose logging to the application log when true. * @var bool */ public $debug = true; /** * Array of Command objects to match input against. * Note: In addition to input rec'd from the client, the server will emit the following commands when appropriate: * CLIENT_CONNECT(stdClass Client) * CLIENT_DISCONNECT(stdClass Client) * SERVER_DISCONNECT * * @var Command[] */ private $commands = array(); public function __construct(Daemon $daemon) { $this->daemon = $daemon; } public function __destruct() { unset($this->daemon); } /** * Called on Construct or Init * @return void */ public function setup() { $this->socket = socket_create(AF_INET, SOCK_STREAM, 0); if (!socket_bind($this->socket, $this->ip, $this->port)) { $errno = socket_last_error(); $this->error(sprintf('Could not bind to address %s:%s [%s] %s', $this->ip, $this->port, $errno, socket_strerror($errno))); throw new Exception('Could not start server.'); } socket_listen($this->socket); $this->daemon->on(Daemon::ON_POSTEXECUTE, array($this, 'run')); } /** * Called on Destruct * @return void */ public function teardown() { foreach(array_keys($this->clients) as $slot) $this->disconnect($slot); @ socket_shutdown($this->socket, 1); usleep(500); @ socket_shutdown($this->socket, 0); @ socket_close($this->socket); $this->socket = null; } /** * This is called during object construction to validate any dependencies * NOTE: At a minimum you should ensure that if $errors is not empty that you pass it along as the return value. * @return Array Return array of error messages (Think stuff like ""GD Library Extension Required"" or ""Cannot open /tmp for Writing"") or an empty array */ public function check_environment(array $errors = array()) { if (!is_callable('socket_create')) $errors[] = 'Socket support is currently unavailable: You must add the php_sockets extension to your php.ini or recompile php with the --enable-sockets option set'; return $errors; } /** * Add a Command object to the command queue. Input from a client is evaluated against these commands * in the order they are added * * @param Command $command */ public function addCommand(Command $command) { $this->commands[] = $command; return $this; } /** * An alternative to addCommand - a simple factory for Command objects. * @param $regex * @param $callable */ public function newCommand($regex, $callable) { $cmd = new Command(); $cmd->regex = $regex; $cmd->callable = $callable; return $this->addCommand($cmd); } public function run() { // Build an array of sockets and select any with pending I/O $read = array ( 0 => $this->socket ); foreach($this->clients as $client) $read[] = $client->socket; $result = @ socket_select($read, $write = null, $except = null, $this->blocking ? null : 1); if ($result === false || ($result === 0 && $this->blocking)) { $this->error('Socket Select Interruption: ' . socket_strerror(socket_last_error())); return false; } // If the master socket is in the $read array, there's a pending connection if (in_array($this->socket, $read)) $this->connect(); // Handle input from sockets in the $read array. $daemon = $this->daemon; $printer = function($str) use ($daemon) { $daemon->log($str, 'SocketServer'); }; foreach($this->clients as $slot => $client) { if (!in_array($client->socket, $read)) continue; $input = socket_read($client->socket, $this->max_read); if ($input === null) { $this->disconnect($slot); continue; } $this->command($input, array($client->write, $printer)); } } private function connect() { $slot = $this->slot(); if ($slot === null) throw new Exception(sprintf('%s Failed - Maximum number of connections has been reached.', __METHOD__)); $this->debug(""Creating New Connection""); $client = new \stdClass(); $client->socket = socket_accept($this->socket); if (empty($client->socket)) throw new Exception(sprintf('%s Failed - socket_accept failed with error: %s', __METHOD__, socket_last_error())); socket_getpeername($client->socket, $client->ip); $client->write = function($string, $term = ""\r\n"") use($client) { if($term) $string .= $term; return socket_write($client->socket, $string, strlen($string)); }; $this->clients[$slot] = $client; // @todo clean this up $daemon = $this->daemon; $this->command(self::COMMAND_CONNECT, array($client->write, function($str) use ($daemon) { $daemon->log($str, 'SocketServer'); })); } private function command($input, array $args = array()) { foreach($this->commands as $command) if($command->match($input, $args) && $command->exclusive) break; } private function disconnect($slot) { $daemon = $this->daemon; $this->command(self::COMMAND_DISCONNECT, array($this->clients[$slot]->write, function($str) use ($daemon) { $daemon->log($str, 'SocketServer'); })); @ socket_shutdown($this->clients[$slot]->socket, 1); usleep(500); @ socket_shutdown($this->clients[$slot]->socket, 0); @ socket_close($this->clients[$slot]->socket); unset($this->clients[$slot]); } private function slot() { for($i=0; $i < $this->max_clients; $i++ ) if (empty($this->clients[$i])) return $i; return null; } private function debug($message) { if (!$this->debug) return; $this->daemon->debug($message, 'SocketServer'); } private function error($message) { $this->daemon->error($message, 'SocketServer'); } private function log($message) { $this->daemon->log($message, 'SocketServer'); } } ",0 " notice in irrlicht.h #ifndef __S_SHARED_MESH_BUFFER_H_INCLUDED__ #define __S_SHARED_MESH_BUFFER_H_INCLUDED__ #include ""irrArray.h"" #include ""IMeshBuffer.h"" namespace irr { namespace scene { //! Implementation of the IMeshBuffer interface with shared vertex list struct SSharedMeshBuffer : public IMeshBuffer { //! constructor SSharedMeshBuffer() : IMeshBuffer(), Vertices(0), ChangedID_Vertex(1), ChangedID_Index(1), MappingHintVertex(EHM_NEVER), MappingHintIndex(EHM_NEVER) { #ifdef _DEBUG setDebugName(""SSharedMeshBuffer""); #endif } //! constructor SSharedMeshBuffer(core::array *vertices) : IMeshBuffer(), Vertices(vertices) { #ifdef _DEBUG setDebugName(""SSharedMeshBuffer""); #endif } //! returns the material of this meshbuffer virtual const video::SMaterial& getMaterial() const { return Material; } //! returns the material of this meshbuffer virtual video::SMaterial& getMaterial() { return Material; } //! returns pointer to vertices virtual const void* getVertices() const { if (Vertices) return Vertices->const_pointer(); else return 0; } //! returns pointer to vertices virtual void* getVertices() { if (Vertices) return Vertices->pointer(); else return 0; } //! returns amount of vertices virtual u32 getVertexCount() const { if (Vertices) return Vertices->size(); else return 0; } //! returns pointer to Indices virtual const u16* getIndices() const { return Indices.const_pointer(); } //! returns pointer to Indices virtual u16* getIndices() { return Indices.pointer(); } //! returns amount of indices virtual u32 getIndexCount() const { return Indices.size(); } //! Get type of index data which is stored in this meshbuffer. virtual video::E_INDEX_TYPE getIndexType() const { return video::EIT_16BIT; } //! returns an axis aligned bounding box virtual const core::aabbox3d& getBoundingBox() const { return BoundingBox; } //! set user axis aligned bounding box virtual void setBoundingBox( const core::aabbox3df& box) { BoundingBox = box; } //! returns which type of vertex data is stored. virtual video::E_VERTEX_TYPE getVertexType() const { return video::EVT_STANDARD; } //! recalculates the bounding box. should be called if the mesh changed. virtual void recalculateBoundingBox() { if (!Vertices || Vertices->empty() || Indices.empty()) BoundingBox.reset(0,0,0); else { BoundingBox.reset((*Vertices)[Indices[0]].Pos); for (u32 i=1; i *Vertices; //! Array of Indices core::array Indices; //! ID used for hardware buffer management u32 ChangedID_Vertex; //! ID used for hardware buffer management u32 ChangedID_Index; //! Bounding box core::aabbox3df BoundingBox; //! hardware mapping hint E_HARDWARE_MAPPING MappingHintVertex; E_HARDWARE_MAPPING MappingHintIndex; }; } // end namespace scene } // end namespace irr #endif ",0 "nd/or modify it under * the terms of the GNU General Public License, either version 2 * of the License, or any later version. * * For the full copyright and license information, please read the * LICENSE.txt file that was distributed with this source code. * * The TYPO3 project - inspiring people to share! */ use TYPO3\CMS\Backend\Tests\Functional\Form\FormTestService; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Lang\LanguageService; class FileMetadataVisibleFieldsTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase { protected static $fileMetadataFields = [ 'title', 'description', 'alternative', 'categories', ]; /** * @test */ public function fileMetadataFormContainsExpectedFields() { $this->setUpBackendUserFromFixture(1); $GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class); $formEngineTestService = GeneralUtility::makeInstance(FormTestService::class); $formResult = $formEngineTestService->createNewRecordForm('sys_file_metadata'); foreach (static::$fileMetadataFields as $expectedField) { $this->assertNotFalse( $formEngineTestService->formHtmlContainsField($expectedField, $formResult['html']), 'The field ' . $expectedField . ' is not in the form HTML' ); } } } ",0 "ompliance with the License. You may obtain a copy of the * License at http://www.hl7.org/HPL/ * * Software distributed under the License is distributed on an ""AS IS"" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and * limitations under the License. * * The Original Code is all this file. * * The Initial Developer of the Original Code is . * Portions created by Initial Developer are Copyright (C) 2002-2004 * Health Level Seven, Inc. All Rights Reserved. * * Contributor(s): */ package org.hl7.types.impl; import org.hl7.types.ANY; import org.hl7.types.BL; import org.hl7.types.Criterion; import org.hl7.types.INT; import org.hl7.types.IVL; import org.hl7.types.PQ; import org.hl7.types.QSET; import org.hl7.types.QTY; import org.hl7.types.SET; import org.hl7.types.TS; /* * Result of periodic hull operation between two QSETs */ public class QSETPeriodicHullImpl extends QSETTermBase implements QSET { /* * The hull is considered the space (inclusive) of occurence intervals of _thisset and _thatset. Note: this is * different from the intervals of _thatset and _thisset. As of now, we assume that the two sets are interleaving */ QSET _thisset; // occurs first QSET _thatset; // occurs second @Override public String toString() { return _thisset.toString() + "" .. "" + _thatset.toString(); } public static QSETPeriodicHullImpl valueOf(final QSET thisset, final QSET thatset) { return new QSETPeriodicHullImpl(thisset, thatset); } private QSETPeriodicHullImpl(final QSET thisset, final QSET thatset) { _thisset = thisset; _thatset = thatset; } public QSET getThisSet() { return _thisset; } public QSET getThatSet() { return _thatset; } public BL contains(final T element) { return this.nextTo(element).low().lessOrEqual(element).and(element.lessOrEqual(this.nextTo(element).high())); } public BL contains(final SET subset) { if (subset instanceof IVL) { final IVL ivl = (IVL) subset; return this.contains(ivl.low()).and(this.contains(ivl.high())).and( this.nextTo(ivl.low()).equal(this.nextTo(ivl.high()))); } else { throw new UnsupportedOperationException(); } } public IVL hull() { throw new UnsupportedOperationException(); } public IVL nextTo(final T element) { IVL thisIVL, thatIVL; thisIVL = _thisset.nextTo(element); thatIVL = _thatset.nextTo(element); if (thisIVL.low().lessOrEqual(element).isTrue()) { return IVLimpl.valueOf(thisIVL.lowClosed(), thisIVL.low(), thatIVL.high(), thatIVL.highClosed()); } else if (thatIVL.high().lessOrEqual(thisIVL.low()).isTrue()) { final PQ diff = (PQ) _thisset.nextAfter(thisIVL.low()).low().minus(thisIVL.low()); return IVLimpl.valueOf(thisIVL.lowClosed(), (T) ((TS) thisIVL.low()).minus(diff), thatIVL.high(), thatIVL .highClosed()); } else { return IVLimpl.valueOf(thisIVL.lowClosed(), thisIVL.low(), thatIVL.high(), thatIVL.highClosed()); } } public IVL nextAfter(final T element) { final IVL ans = this.nextTo(element); if (element.lessOrEqual(ans.low()).isTrue()) { return ans; } else { // we have to get the next ans final IVL thisIVL = _thisset.nextAfter(ans.high()); final IVL thatIVL = _thatset.nextAfter(ans.high()); return IVLimpl.valueOf(thisIVL.lowClosed(), thisIVL.low(), thatIVL.high(), thatIVL.highClosed()); } } public BL interleaves(final QSET otherset) { throw new UnsupportedOperationException(); } @Override public BL equal(final ANY that) { throw new UnsupportedOperationException(); } public INT cardinality() { throw new UnsupportedOperationException(); } public BL isEmpty() { return _thisset.isEmpty().and(_thatset.isEmpty()); } public T any() { throw new UnsupportedOperationException(); } public SET select(final Criterion c) { throw new UnsupportedOperationException(); } } ",0 "distribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * Scute is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see . * SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef TABLE_H #define TABLE_H 1 #include #include /* The indexed list type. */ struct scute_table; typedef struct scute_table *scute_table_t; /* TABLE interface. */ /* A table entry allocator function callback. Should return the new table entry in DATA_R. */ typedef gpg_error_t (*scute_table_alloc_cb_t) (void **data_r, void *hook); /* A table entry deallocator function callback. */ typedef void (*scute_table_dealloc_cb_t) (void *data); /* Allocate a new table and return it in TABLE_R. */ gpg_error_t scute_table_create (scute_table_t *table_r, scute_table_alloc_cb_t alloc, scute_table_dealloc_cb_t dealloc); /* Destroy the indexed list TABLE. This also calls the deallocator on all entries. */ void scute_table_destroy (scute_table_t table); /* Allocate a new table entry with a free index. Returns the index pointing to the new list entry in INDEX_R. This calls the allocator on the new entry before returning. Also returns the table entry in *DATA_R if this is not NULL. */ gpg_error_t scute_table_alloc (scute_table_t table, int *index_r, void **data_r, void *hook); /* Deallocate the list entry index. Afterwards, INDEX points to the following entry. This calls the deallocator on the entry before returning. */ void scute_table_dealloc (scute_table_t table, int *index); /* Return the index for the beginning of the list TABLE. */ int scute_table_first (scute_table_t table); /* Return the index following INDEX. If INDEX is the last element in the list, return 0. */ int scute_table_next (scute_table_t table, int index); /* Return true iff INDEX is the end-of-list marker. */ bool scute_table_last (scute_table_t table, int index); /* Return the user data associated with INDEX. Return NULL if INDEX is the end-of-list marker. */ void *scute_table_data (scute_table_t table, int index); /* Return the number of entries in the table TABLE. */ int scute_table_used (scute_table_t table); #endif /* !TABLE_H */ ",0 "; import org.apache.commons.lang.builder.HashCodeBuilder; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import java.util.Iterator; /** * Immutable Vector class. * Inspired from WorldEdit. */ public class Vector implements Iterable { private final double x, y, z; public Vector() { this.x = 0; this.y = 0; this.z = 0; } public Vector(int x, int y, int z) { this.x = x; this.y = y; this.z = z; } public Vector(double x, double y, double z) { this.x = x; this.y = y; this.z = z; } public Vector(Location loc) { this(loc.getX(), loc.getY(), loc.getZ()); } public Vector(Entity entity) { this(entity.getLocation()); } public Vector(Block block) { this(block.getX(), block.getY(), block.getZ()); } public double getX() { return x; } public Vector setX(double x) { return new Vector(x, y, z); } public int getBlockX() { return (int) Math.round(x); } public double getY() { return y; } public Vector setY(double y) { return new Vector(x, y, z); } public int getBlockY() { return (int) Math.round(y); } public double getZ() { return z; } public Vector setZ(double z) { return new Vector(x, y, z); } public int getBlockZ() { return (int) Math.round(z); } public Vector add(double i) { return new Vector(this.x + i, this.y + i, this.z + i); } public Vector add(double ox, double oy, double oz) { return new Vector(x + ox, y + oy, z + oz); } public Vector add(Vector other) { return new Vector(x + other.x, y + other.y, z + other.z); } public Vector addX(double ox) { return new Vector(x + ox, y, z); } public Vector addY(double oy) { return new Vector(x, y + oy, z); } public Vector addZ(double oz) { return new Vector(x, y, z + oz); } public Vector subtract(double i) { return new Vector(x - i, y - i, z - i); } public Vector subtract(double ox, double oy, double oz) { return new Vector(x - ox, y - oy, z - oz); } public Vector subtract(Vector other) { return new Vector(x - other.x, y - other.y, z - other.z); } public Vector subtractX(double ox) { return new Vector(x - ox, y, z); } public Vector subtractY(double oy) { return new Vector(x, y - oy, z); } public Vector subtractZ(double oz) { return new Vector(x, y, z - oz); } public Vector multiply(double i) { return new Vector(x * i, y * i, z * i); } public Vector multiply(double ox, double oy, double oz) { return new Vector(x * ox, y * oy, z * oz); } public Vector multiply(Vector other) { return new Vector(x * other.x, y * other.y, z * other.z); } public Vector divide(double i) { return new Vector(x / i, y / i, z / i); } public Vector divide(double ox, double oy, double oz) { return new Vector(x / ox, y / oy, z / oz); } public Vector divide(Vector other) { return new Vector(x / other.x, y / other.y, z / other.z); } public Vector getMiddle(Vector other) { return new Vector( (x + other.x) / 2, (y + other.y) / 2, (z + other.z) / 2); } public boolean isInside(Vector min, Vector max) { return x >= min.x && x <= max.x && y >= min.y && y <= max.y && z >= min.z && z <= max.z; } public boolean isZero() { return x == 0.0 && y == 0.0 && z == 0; } public Vector positive() { return new Vector(Math.abs(x), Math.abs(y), Math.abs(z)); } public double lengthSq() { return x * x + y * y + z * z; } public double length() { return Math.sqrt(lengthSq()); } public double distanceSq(Vector other) { return subtract(other).lengthSq(); } public double distance(Vector other) { return subtract(other).length(); } public Vector normalize() { return divide(length()); } public Vector2D to2D() { return new Vector2D(x, z); } public Block toBlock(World world) { return world.getBlockAt(getBlockX(), getBlockY(), getBlockZ()); } public Direction toDirection() { if (isZero()) { return Direction.NONE; } return new VectorDirection(this); } public Direction towards(Vector to) { return to.subtract(this).toDirection(); } public org.bukkit.util.Vector toBukkit() { return new org.bukkit.util.Vector(x, y, z); } public Location toLocation(World world) { return toLocation(world, 0.0f, 0.0f); } public Location toLocation(World world, Vector2D direction) { return toLocation(world, direction.toDirection()); } public Location toLocation(World world, Direction dir) { return toLocation(world, dir.getYaw(), dir.getPitch()); } public Location toLocation(World world, float yaw, float pitch) { return new Location(world, x, getBlockY() + 0.1, z, yaw, pitch); } @Override public Iterator iterator() { return new VectorIterator(new Vector(), this); } public Iterable rectangle(final Vector max) { return new Iterable() { @Override public Iterator iterator() { return new VectorIterator(Vector.this, max); } }; } @Override public String toString() { return ""("" + x + "", "" + y + "", "" + z + "")""; } @Override public int hashCode() { return new HashCodeBuilder(23, 11) .append(x) .append(y) .append(z) .toHashCode(); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Vector)) { return false; } Vector o = (Vector) obj; return x == o.x && y == o.y && z == o.z; } public boolean equalsBlock(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Vector)) { return false; } Vector other = (Vector) obj; return getBlockX() == other.getBlockX() && getBlockY() == other.getBlockY() && getBlockZ() == other.getBlockZ(); } } ",0 "se Magento\TestFramework\Helper\Bootstrap; use Magento\Framework\App\DeploymentConfig\Reader; /** * A listener that watches for integrity of deployment configuration */ class DeploymentConfig { /** * Deployment configuration reader * * @var Reader */ private $reader; /** * Initial value of deployment configuration * * @var mixed */ private $config; /** * Memorizes the initial value of configuration reader and the configuration value * * Assumption: this is done once right before executing very first test suite. * It is assumed that deployment configuration is valid at this point * * @return void */ public function startTestSuite() { if (null === $this->reader) { $this->reader = Bootstrap::getObjectManager()->get('Magento\Framework\App\DeploymentConfig\Reader'); $this->config = $this->reader->load(); } } /** * Checks if deployment configuration has been changed by a test * * Changing deployment configuration violates isolation between tests, so further tests may become broken. * To fix this issue, find out why this test changes deployment configuration. * If this is intentional, then it must be reverted to the previous state within the test. * After that, the application needs to be wiped out and reinstalled. * * @param \PHPUnit_Framework_TestCase $test * @return void */ public function endTest(\PHPUnit_Framework_TestCase $test) { $config = $this->reader->load(); if ($this->config != $config) { $error = ""\n\nERROR: deployment configuration is corrupted. The application state is no longer valid.\n"" . 'Further tests may fail.' . "" This test failure may be misleading, if you are re-running it on a corrupted application.\n"" . $test->toString() . ""\n""; $test->fail($error); } } } ",0 "*/ use System\Classes\PluginBase; class Plugin extends PluginBase { public function pluginDetails() { return [ 'name' => 'Google Analytics', 'description' => 'Provides the Google Analytics tracking and reporting.', 'author' => 'Alexey Bobkov, Samuel Georges', 'icon' => 'icon-bar-chart-o' ]; } public function registerComponents() { return [ '\RainLab\GoogleAnalytics\Components\Tracker' => 'googleTracker' ]; } public function registerReportWidgets() { return [ 'RainLab\GoogleAnalytics\ReportWidgets\TrafficOverview'=>[ 'name'=>'Google Analytics traffic overview', 'context'=>'dashboard' ], 'RainLab\GoogleAnalytics\ReportWidgets\TrafficSources'=>[ 'name'=>'Google Analytics traffic sources', 'context'=>'dashboard' ], 'RainLab\GoogleAnalytics\ReportWidgets\Browsers'=>[ 'name'=>'Google Analytics browsers', 'context'=>'dashboard' ], 'RainLab\GoogleAnalytics\ReportWidgets\TrafficGoal'=>[ 'name'=>'Google Analytics traffic goal', 'context'=>'dashboard' ], 'RainLab\GoogleAnalytics\ReportWidgets\TopPages'=>[ 'name'=>'Google Analytics top pages', 'context'=>'dashboard' ] ]; } public function registerSettings() { return [ 'config' => [ 'label' => 'Google Analytics', 'icon' => 'icon-bar-chart-o', 'description' => 'Configure Google Analytics API code and tracking options.', 'class' => 'RainLab\GoogleAnalytics\Models\Settings', 'order' => 100 ] ]; } }",0 "ot 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. */ package com.hazelcast.internal.util.filter; /** * Filter matching only when both sub-filters are matching * * @param */ public final class AndFilter implements Filter { private final Filter filter1; private final Filter filter2; public AndFilter(Filter filter1, Filter filter2) { this.filter1 = filter1; this.filter2 = filter2; } @Override public boolean accept(T object) { return filter1.accept(object) && filter2.accept(object); } } ",0 " Copyright (C) The Internet Society (2004). All Rights Reserved. ******************************************************************/ #ifndef __iLBC_LPC_DECODE_H #define __iLBC_LPC_DECODE_H void LSFinterpolate2a_dec( float *a, /* (o) lpc coefficients for a sub-frame */ float *lsf1, /* (i) first lsf coefficient vector */ float *lsf2, /* (i) second lsf coefficient vector */ float coef, /* (i) interpolation weight */ int length /* (i) length of lsf vectors */ ); void SimplelsfDEQ( float *lsfdeq, /* (o) dequantized lsf coefficients */ int *index, /* (i) quantization index */ int lpc_n /* (i) number of LPCs */ ); void DecoderInterpolateLSF( float *syntdenum, /* (o) synthesis filter coefficients */ float *weightdenum, /* (o) weighting denumerator coefficients */ float *lsfdeq, /* (i) dequantized lsf coefficients */ int length, /* (i) length of lsf coefficient vector */ iLBC_Dec_Inst_t *iLBCdec_inst /* (i) the decoder state structure */ ); #endif ",0 "btain 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. */ package com.facebook.presto.sql.planner.assertions; import com.facebook.presto.Session; import com.facebook.presto.cost.PlanNodeCost; import com.facebook.presto.metadata.Metadata; import com.facebook.presto.sql.planner.plan.LimitNode; import com.facebook.presto.sql.planner.plan.PlanNode; import static com.google.common.base.Preconditions.checkState; public class LimitMatcher implements Matcher { private final long limit; public LimitMatcher(long limit) { this.limit = limit; } @Override public boolean shapeMatches(PlanNode node) { if (!(node instanceof LimitNode)) { return false; } LimitNode limitNode = (LimitNode) node; return limitNode.getCount() == limit; } @Override public MatchResult detailMatches(PlanNode node, PlanNodeCost planNodeCost, Session session, Metadata metadata, SymbolAliases symbolAliases) { checkState(shapeMatches(node)); return MatchResult.match(); } } ",0 "javadoc (build 1.4.2_11) on Sun Oct 15 22:02:21 CDT 2006 --> Uses of Interface org.hibernate.dialect.lock.LockingStrategy (Hibernate API Documentation)
        Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
         PREV   NEXT FRAMES    NO FRAMES    

        Uses of Interface
        org.hibernate.dialect.lock.LockingStrategy

        Packages that use LockingStrategy
        org.hibernate.dialect This package abstracts the SQL dialect of the underlying database. 
        org.hibernate.dialect.lock   
        org.hibernate.persister.entity This package abstracts persistence mechanisms for entities, and defines the Hibernate runtime metamodel. 
         

        Uses of LockingStrategy in org.hibernate.dialect
         

        Classes in org.hibernate.dialect that implement LockingStrategy
        static class HSQLDialect.ReadUncommittedLockingStrategy
                   
         

        Methods in org.hibernate.dialect that return LockingStrategy
         LockingStrategy TimesTenDialect.getLockingStrategy(Lockable lockable, LockMode lockMode)
                   
         LockingStrategy RDMSOS2200Dialect.getLockingStrategy(Lockable lockable, LockMode lockMode)
                   
         LockingStrategy PointbaseDialect.getLockingStrategy(Lockable lockable, LockMode lockMode)
                   
         LockingStrategy MckoiDialect.getLockingStrategy(Lockable lockable, LockMode lockMode)
                   
         LockingStrategy HSQLDialect.getLockingStrategy(Lockable lockable, LockMode lockMode)
                   
         LockingStrategy FrontBaseDialect.getLockingStrategy(Lockable lockable, LockMode lockMode)
                   
         LockingStrategy Dialect.getLockingStrategy(Lockable lockable, LockMode lockMode)
                  Get a strategy instance which knows how to acquire a database-level lock of the specified mode for this dialect.
         

        Uses of LockingStrategy in org.hibernate.dialect.lock
         

        Classes in org.hibernate.dialect.lock that implement LockingStrategy
         class SelectLockingStrategy
                  A locking strategy where the locks are obtained through select statements.
         class UpdateLockingStrategy
                  A locking strategy where the locks are obtained through update statements.
         

        Uses of LockingStrategy in org.hibernate.persister.entity
         

        Methods in org.hibernate.persister.entity that return LockingStrategy
        protected  LockingStrategy AbstractEntityPersister.generateLocker(LockMode lockMode)
                   
         


        Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
         PREV   NEXT FRAMES    NO FRAMES    

        ",0 "this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.camel.component.zookeeper.operations; import java.util.List; import static java.lang.String.format; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.ZooDefs.Ids; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.data.ACL; import org.apache.zookeeper.data.Stat; /** * CreateOperation is a basic Zookeeper operation used to create * and set the data contained in a given node */ public class CreateOperation extends ZooKeeperOperation { private static final List DEFAULT_PERMISSIONS = Ids.OPEN_ACL_UNSAFE; private static final CreateMode DEFAULT_MODE = CreateMode.EPHEMERAL; private byte[] data; private List permissions = DEFAULT_PERMISSIONS; private CreateMode createMode = DEFAULT_MODE; public CreateOperation(ZooKeeper connection, String node) { super(connection, node); } @Override public OperationResult getResult() { try { String created = connection.create(node, data, permissions, createMode); if (LOG.isDebugEnabled()) { LOG.debug(format(""Created node '%s' using mode '%s'"", created, createMode)); } // for consistency with other operations return an empty stats set. return new OperationResult(created, new Stat()); } catch (Exception e) { return new OperationResult(e); } } public void setData(byte[] data) { this.data = data; } public void setPermissions(List permissions) { this.permissions = permissions; } public void setCreateMode(CreateMode createMode) { this.createMode = createMode; } } ",0 "
        ",0 "ef=""../../themes/default/easyui.css"">

        Validate DateBox

        When the selected date is greater than specified date. The field validator will raise an error.
        ",0 "ght.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id: tiki-view_tracker.php 48122 2013-10-20 22:07:01Z nkoth $ $section = 'trackers'; require_once ('tiki-setup.php'); $access->check_feature('feature_trackers'); global $trklib; include_once ('lib/trackers/trackerlib.php'); if ($prefs['feature_groupalert'] == 'y') { include_once ('lib/groupalert/groupalertlib.php'); } include_once ('lib/notifications/notificationlib.php'); if ($prefs['feature_categories'] == 'y') { include_once ('lib/categories/categlib.php'); } $auto_query_args = array( 'offset', 'trackerId', 'reloff', 'itemId', 'maxRecords', 'status', 'sort_mode', 'initial', 'filterfield', 'filtervalue' ); if (!empty($_REQUEST['itemId'])) $ratedItemId = $_REQUEST['itemId']; $_REQUEST[""itemId""] = 0; $smarty->assign('itemId', $_REQUEST[""itemId""]); if (!isset($_REQUEST[""trackerId""])) { $smarty->assign('msg', tra(""No tracker indicated"")); $smarty->display(""error.tpl""); die; } $trackerDefinition = Tracker_Definition::get($_REQUEST['trackerId']); if (! $trackerDefinition) { $smarty->assign('msg', tra(""No tracker indicated"")); $smarty->display(""error.tpl""); die; } $tracker_info = $trackerDefinition->getInformation(); $tikilib->get_perm_object($_REQUEST['trackerId'], 'tracker', $tracker_info); if (!empty($_REQUEST['show']) && $_REQUEST['show'] == 'view') { $cookietab = '1'; } elseif (!empty($_REQUEST['show']) && $_REQUEST['show'] == 'mod') { $cookietab = '2'; } elseif (empty($_REQUEST['cookietab'])) { if (isset($tracker_info['writerCanModify']) && $tracker_info['writerCanModify'] == 'y' && $user) $cookietab = '1'; elseif (!($tiki_p_view_trackers == 'y' || $tiki_p_admin == 'y' || $tiki_p_admin_trackers == 'y') && $tiki_p_create_tracker_items == 'y') $cookietab = ""2""; else if (!isset($cookietab)) { $cookietab = '1'; } } else { $cookietab = $_REQUEST['cookietab']; } $defaultvalues = array(); if (isset($_REQUEST['vals']) and is_array($_REQUEST['vals'])) { $defaultvalues = $_REQUEST['vals']; $cookietab = ""2""; } elseif (isset($_REQUEST['new'])) { $cookietab = ""2""; } $smarty->assign('defaultvalues', $defaultvalues); $my = ''; $ours = ''; if (isset($_REQUEST['my'])) { if ($tiki_p_admin_trackers == 'y') { $my = $_REQUEST['my']; } elseif ($user) { $my = $user; } } elseif (isset($_REQUEST['ours'])) { if ($tiki_p_admin_trackers == 'y') { $ours = $_REQUEST['ours']; } elseif ($group) { $ours = $group; } } if ($tiki_p_create_tracker_items == 'y' && !empty($t['start'])) { if ($tikilib->now < $t['start']) { $tiki_p_create_tracker_items = 'n'; $smarty->assign('tiki_p_create_tracker_items', 'n'); } } if ($tiki_p_create_tracker_items == 'y' && !empty($t['end'])) { if ($tikilib->now > $t['end']) { $tiki_p_create_tracker_items = 'n'; $smarty->assign('tiki_p_create_tracker_items', 'n'); } } $access->check_permission_either(array('tiki_p_view_trackers', 'tiki_p_create_tracker_items')); if ($tracker_info['adminOnlyViewEditItem'] === 'y') { $access->check_permission('tiki_p_admin_trackers', tra('Admin this tracker'), 'tracker', $tracker_info['trackerId']); } if ($tiki_p_view_trackers != 'y') { $userCreatorFieldId = $writerfield; $groupCreatorFieldId = $writergroupfield; if ($user && !$my and isset($tracker_info['writerCanModify']) and $tracker_info['writerCanModify'] == 'y' and !empty($userCreatorFieldId)) { $my = $user; } elseif ($user && !$ours and isset($tracker_info['writerGroupCanModify']) and $tracker_info['writerGroupCanModify'] == 'y' and !empty($groupCreatorFieldId)) { $ours = $group; } } $smarty->assign('my', $my); $smarty->assign('ours', $ours); if ($prefs['feature_groupalert'] == 'y') { $groupforalert = $groupalertlib->GetGroup('tracker', $_REQUEST['trackerId']); if ($groupforalert != '') { $showeachuser = $groupalertlib->GetShowEachUser('tracker', $_REQUEST[""trackerId""], $groupforalert); $listusertoalert = $userlib->get_users(0, -1, 'login_asc', '', '', false, $groupforalert, ''); $smarty->assign_by_ref('listusertoalert', $listusertoalert['data']); } $smarty->assign_by_ref('groupforalert', $groupforalert); $smarty->assign_by_ref('showeachuser', $showeachuser); } $status_types = array(); $status_raw = $trklib->status_types(); if (isset($_REQUEST['status'])) { $sts = preg_split('//', $_REQUEST['status'], -1, PREG_SPLIT_NO_EMPTY); } elseif (isset($tracker_info[""defaultStatus""])) { $sts = preg_split('//', $tracker_info[""defaultStatus""], -1, PREG_SPLIT_NO_EMPTY); $_REQUEST['status'] = $tracker_info[""defaultStatus""]; } else { $sts = array( 'o' ); $_REQUEST['status'] = 'o'; } foreach ($status_raw as $let => $sta) { if ((isset($$sta['perm']) and $$sta['perm'] == 'y') or ($my or $ours)) { if (in_array($let, $sts)) { $sta['class'] = 'statuson'; $sta['statuslink'] = str_replace($let, '', implode('', $sts)); } else { $sta['class'] = 'statusoff'; $sta['statuslink'] = implode('', $sts) . $let; } $status_types[""$let""] = $sta; } } $smarty->assign('status_types', $status_types); if (count($status_types) == 0) { $tracker_info[""showStatus""] = 'n'; } $filterFields = array('isSearchable'=>'y', 'isTblVisible'=>'y', 'type'=>array('q','u','g','I','C','n','j','f')); $sort_field = 0; if (!isset($_REQUEST[""sort_mode""])) { if (isset($tracker_info['defaultOrderKey'])) { if ($tracker_info['defaultOrderKey'] == - 1) $sort_mode = 'lastModif'; elseif ($tracker_info['defaultOrderKey'] == - 2) $sort_mode = 'created'; elseif ($tracker_info['defaultOrderKey'] == - 3) $sort_mode = 'itemId'; else { $sort_field = $tracker_info['defaultOrderKey']; $sort_mode = 'f_' . $tracker_info['defaultOrderKey']; $filterFields['fieldId'] = $tracker_info['defaultOrderKey']; } if (isset($tracker_info['defaultOrderDir'])) { $sort_mode.= ""_"" . $tracker_info['defaultOrderDir']; } else { $sort_mode.= ""_asc""; } } else { $sort_mode = ''; } } else { $sort_mode = $_REQUEST[""sort_mode""]; if (preg_match('/f_([0-9]+)_/', $sort_mode, $matches)) { $sort_field = $matches[1]; $filterFields['fieldId'] = $matches[1]; } } $smarty->assign_by_ref('sort_mode', $sort_mode); //get field settings (no values) $xfields = array('data' => $trackerDefinition->getFields()); $popupFields = $trackerDefinition->getPopupFields(); $smarty->assign_by_ref('popupFields', $popupFields); $smarty->assign('tracker_sync', $trackerDefinition->getSyncInformation()); $orderkey = false; $listfields = array(); $usecategs = false; $textarea_options = false; $all_descends = false; $fieldFactory = $trackerDefinition->getFieldFactory(); $itemObject = Tracker_Item::newItem($_REQUEST['trackerId']); foreach ($xfields['data'] as $i => $current_field) { $current_field_ins = null; $fid = $current_field[""fieldId""]; $ins_id = 'ins_' . $fid; $current_field[""ins_id""] = $ins_id; $current_field[""id""] = $fid; $filter_id = 'filter_' . $fid; $current_field[""filter_id""] = $filter_id; if (!empty($sort_field) and $sort_field == $fid) { $orderkey = true; } $fieldIsVisible = $itemObject->canViewField($fid); $fieldIsEditable = $itemObject->canModifyField($fid); if ($fieldIsVisible || $fieldIsEditable) { $handler = $fieldFactory->getHandler($current_field); if ($handler) { $field_values = $insert_values = $handler->getFieldData($_REQUEST); $current_field_ins = array_merge($current_field, $insert_values); } } //exclude fields that should not be listed if ($fieldIsVisible && ($current_field_ins['isTblVisible'] == 'y' or in_array($fid, $popupFields))) { $listfields[$fid] = $current_field_ins; } if (! empty($current_field_ins)) { if ($fieldIsEditable) { $ins_fields['data'][$i] = $current_field_ins; } if ($fieldIsVisible) { $fields['data'][$i] = $current_field_ins; } } if ($fieldIsEditable) { $listfields[$fid]['editable'] = true; } else { $listfields[$fid]['editable'] = false; } } // Collect information from the provided fields $newItemRateField = null; foreach ($ins_fields['data'] as $current_field) { if ($current_field['type'] == 's' && $current_field['name'] == 'Rating') { $newItemRateField = $current_field; $newItemRate = $current_field['request_rate']; } } if (!$orderkey && $sort_mode == '') { $sort_mode = 'lastModif_asc'; } if (!empty($_REQUEST['remove'])) { $item_info = $trklib->get_item_info($_REQUEST['remove']); $actionObject = Tracker_Item::fromInfo($item_info); if ($actionObject->canRemove()) { //bypass the question to confirm delete or not if (empty($_REQUEST['force'])) { $access->check_authenticity(); $trklib->remove_tracker_item($_REQUEST['remove']); } } } elseif (isset($_REQUEST[""batchaction""]) and $_REQUEST[""batchaction""] == 'delete') { check_ticket('view-trackers'); $transaction = $tikilib->begin(); foreach ($_REQUEST['action'] as $batchid) { $item_info = $trklib->get_item_info($batchid); $actionObject = Tracker_Item::fromInfo($item_info); if ($actionObject->canRemove()) { $trklib->remove_tracker_item($batchid); } } $transaction->commit(); } elseif (isset($_REQUEST['batchaction']) and ($_REQUEST['batchaction'] == 'o' || $_REQUEST['batchaction'] == 'p' || $_REQUEST['batchaction'] == 'c')) { check_ticket('view-trackers'); $transaction = $tikilib->begin(); foreach ($_REQUEST['action'] as $batchid) { $item_info = $trklib->get_item_info($batchid); $actionObject = Tracker_Item::fromInfo($item_info); if ($actionObject->canModify()) { $trklib->replace_item($_REQUEST['trackerId'], $batchid, array('data' => ''), $_REQUEST['batchaction']); } } $transaction->commit(); } $smarty->assign('mail_msg', ''); $smarty->assign('email_mon', ''); if ($prefs['feature_user_watches'] == 'y' and $tiki_p_watch_trackers == 'y') { if ($user and isset($_REQUEST['watch'])) { check_ticket('view-trackers'); if ($_REQUEST['watch'] == 'add') { $tikilib->add_user_watch($user, 'tracker_modified', $_REQUEST[""trackerId""], 'tracker', $tracker_info['name'], ""tiki-view_tracker.php?trackerId="" . $_REQUEST[""trackerId""]); } else { $tikilib->remove_user_watch($user, 'tracker_modified', $_REQUEST[""trackerId""], 'tracker'); } } $smarty->assign('user_watching_tracker', 'n'); $it = $tikilib->user_watches($user, 'tracker_modified', $_REQUEST['trackerId'], 'tracker'); if ($user and $tikilib->user_watches($user, 'tracker_modified', $_REQUEST['trackerId'], 'tracker')) { $smarty->assign('user_watching_tracker', 'y'); } // Check, if the user is watching this tracker by a category. if ($prefs['feature_categories'] == 'y') { $watching_categories_temp = $categlib->get_watching_categories($_REQUEST[""trackerId""], 'tracker', $user); $smarty->assign('category_watched', 'n'); if (count($watching_categories_temp) > 0) { $smarty->assign('category_watched', 'y'); $watching_categories = array(); foreach ($watching_categories_temp as $wct) { $watching_categories[] = array( ""categId"" => $wct, ""name"" => $categlib->get_category_name($wct) ); } $smarty->assign('watching_categories', $watching_categories); } } } if (isset($_REQUEST[""save""])) { if ($itemObject->canModify()) { global $captchalib; include_once 'lib/captcha/captchalib.php'; if (empty($user) && $prefs['feature_antibot'] == 'y' && !$captchalib->validate()) { $smarty->assign('msg', $captchalib->getErrors()); $smarty->assign('errortype', 'no_redirect_login'); $smarty->display(""error.tpl""); die; } // Check field values for each type and presence of mandatory ones $mandatory_missing = array(); $err_fields = array(); $categorized_fields = $trackerDefinition->getCategorizedFields(); $field_errors = $trklib->check_field_values($ins_fields, $categorized_fields, $_REQUEST['trackerId'], empty($_REQUEST['itemId'])?'':$_REQUEST['itemId']); $smarty->assign('err_mandatory', $field_errors['err_mandatory']); $smarty->assign('err_value', $field_errors['err_value']); // values are OK, then lets add a new item if (count($field_errors['err_mandatory']) == 0 && count($field_errors['err_value']) == 0) { $smarty->assign('input_err', '0'); // no warning to display check_ticket('view-trackers'); if (!isset($_REQUEST[""status""]) or ($tracker_info[""showStatus""] != 'y' and $tiki_p_admin_trackers != 'y')) { $_REQUEST[""status""] = ''; } if (empty($_REQUEST[""itemId""]) && $tracker_info['oneUserItem'] == 'y') { // test if one item per user $_REQUEST['itemId'] = $trklib->get_user_item($_REQUEST['trackerId'], $tracker_info); } $itemid = $trklib->replace_item($_REQUEST[""trackerId""], $_REQUEST[""itemId""], $ins_fields, $_REQUEST['status']); if (isset($_REQUEST['listtoalert']) && $prefs['feature_groupalert'] == 'y') { $groupalertlib->Notify($_REQUEST['listtoalert'], ""tiki-view_tracker_item.php?itemId=$itemid""); } $cookietab = ""1""; $smarty->assign('itemId', ''); if (isset($newItemRate)) { $trackerId = $_REQUEST[""trackerId""]; $trklib->replace_rating($trackerId, $itemid, $newItemRateField, $user, $newItemRate); } if (isset($_REQUEST[""viewitem""]) && $_REQUEST[""viewitem""] == 'view') { header('location: ' . preg_replace('#[\r\n]+#', '', ""tiki-view_tracker_item.php?trackerId="" . $_REQUEST[""trackerId""] . ""&itemId="" . $itemid)); die; } elseif (isset($_REQUEST[""viewitem""]) && $_REQUEST[""viewitem""] == 'new') { header('location: ' . preg_replace('#[\r\n]+#', '', ""tiki-view_tracker.php?trackerId="" . $_REQUEST[""trackerId""] . ""&cookietab=2"")); die; } if (isset($tracker_info[""defaultStatus""])) { $_REQUEST['status'] = $tracker_info[""defaultStatus""]; } } else { $cookietab = ""2""; $smarty->assign('input_err', '1'); // warning to display } if (isset($newItemRate)) { $trackerId = $_REQUEST[""trackerId""]; $trklib->replace_rating($trackerId, $itemid, $newItemRateField, $user, $newItemRate); } } } if (!isset($_REQUEST[""offset""])) { $offset = 0; } else { $offset = $_REQUEST[""offset""]; } $smarty->assign_by_ref('offset', $offset); if (!empty($_REQUEST[""maxRecords""])) { $maxRecords = $_REQUEST['maxRecords']; } if (isset($_REQUEST[""initial""])) { $initial = $_REQUEST[""initial""]; } else { $initial = ''; } $smarty->assign('initial', $initial); $writerfield = $trackerDefinition->getWriterField(); $writergroupfield = $trackerDefinition->getWriterGroupField(); if ($my and $writerfield) { $filterfield = $writerfield; } elseif ($ours and $writergroupfield) { $filterfield = $writergroupfield; } else { if (isset($_REQUEST[""filterfield""])) { $filterfield = $_REQUEST[""filterfield""]; } else { $filterfield = ''; } } $smarty->assign('filterfield', $filterfield); if ($my and $writerfield) { $exactvalue = $my; $filtervalue = ''; $_REQUEST['status'] = 'opc'; } elseif ($ours and $writergroupfield) { $exactvalue = $userlib->get_user_groups($user); $filtervalue = ''; $_REQUEST['status'] = 'opc'; } else { if (isset($_REQUEST[""filtervalue""]) and is_array($_REQUEST[""filtervalue""]) and isset($_REQUEST[""filtervalue""][""$filterfield""])) { $filtervalue = $_REQUEST[""filtervalue""][""$filterfield""]; } else if (isset($_REQUEST[""filtervalue""])) { $filtervalue = $_REQUEST[""filtervalue""]; } else { $filtervalue = ''; } if (!empty($_REQUEST['filtervalue_other'])) { $filtervalue = $_REQUEST['filtervalue_other']; } $exactvalue = ''; } $smarty->assign('filtervalue', $filtervalue); if (is_array($filtervalue)) { foreach ($filtervalue as $fil) { $filtervalueencoded = ""&filtervalue["" . rawurlencode($filterfield) . ""][]="" . rawurlencode($fil); } $smarty->assign('filtervalueencoded', $filtervalueencoded); } $smarty->assign('status', $_REQUEST[""status""]); if (isset($_REQUEST[""trackerId""])) { $trackerId = $_REQUEST[""trackerId""]; } if (isset($tracker_info['useRatings']) and $tracker_info['useRatings'] == 'y' and $user and $tiki_p_tracker_vote_ratings == 'y' and !empty($_REQUEST['trackerId']) and !empty($ratedItemId) and isset($newItemRate) and ($newItemRate == 'NULL' || in_array($newItemRate, explode(',', $tracker_info['ratingOptions'])))) { $trklib->replace_rating($_REQUEST['trackerId'], $ratedItemId, $newItemRateField, $user, $newItemRate); } $items = $trklib->list_items($_REQUEST[""trackerId""], $offset, $maxRecords, $sort_mode, $listfields, $filterfield, $filtervalue, $_REQUEST[""status""], $initial, $exactvalue, '', $xfields); $urlquery['status'] = $_REQUEST['status']; $urlquery['initial'] = $initial; $urlquery['trackerId'] = $_REQUEST[""trackerId""]; $urlquery['sort_mode'] = $sort_mode; $urlquery['exactvalue'] = $exactvalue; $urlquery['filterfield'] = $filterfield; if (is_array($filtervalue)) { foreach ($filtervalue as $fil) { $urlquery[""filtervalue["" . $filterfield . ""][]""] = $fil; } } else { $urlquery[""filtervalue["" . $filterfield . ""]""] = $filtervalue; } $smarty->assign_by_ref('urlquery', $urlquery); if ($tracker_info['useComments'] == 'y' && ($tracker_info['showComments'] == 'y' || isset($tracker_info['showLastComment']) && $tracker_info['showLastComment'] == 'y')) { foreach ($items['data'] as $itkey => $oneitem) { if ($tracker_info['showComments'] == 'y') { $items['data'][$itkey]['comments'] = $trklib->get_item_nb_comments($items['data'][$itkey]['itemId']); } if (isset($tracker_info['showLastComment']) && $tracker_info['showLastComment'] == 'y') { $l = $trklib->list_last_comments($items['data'][$itkey]['trackerId'], $items['data'][$itkey]['itemId'], 0, 1); $items['data'][$itkey]['lastComment'] = !empty($l['cant']) ? $l['data'][0] : ''; } } } if ($tracker_info['useAttachments'] == 'y' && $tracker_info['showAttachments'] == 'y') { foreach ($items[""data""] as $itkey => $oneitem) { $res = $trklib->get_item_nb_attachments($items[""data""][$itkey]['itemId']); $items[""data""][$itkey]['attachments'] = $res['attachments']; $items[""data""][$itkey]['hits'] = $res['hits']; } } foreach ($fields['data'] as $fd) { // add field info for searchable fields not shown in the list $fid = $fd[""fieldId""]; if ($fd['isSearchable'] == 'y' and !isset($listfields[$fid]) and $itemObject->canViewField($fid)) { $listfields[$fid] = $fd; } } $smarty->assign('trackerId', $_REQUEST[""trackerId""]); $smarty->assign('tracker_info', $tracker_info); $smarty->assign('fields', $fields['data']); $smarty->assign('ins_fields', $ins_fields['data']); $smarty->assign_by_ref('items', $items[""data""]); $smarty->assign_by_ref('item_count', $items['cant']); $smarty->assign_by_ref('listfields', $listfields); $users = $userlib->list_all_users(); $smarty->assign_by_ref('users', $users); if ($tiki_p_export_tracker == 'y') { $trackers = $trklib->list_trackers(); $smarty->assign_by_ref('trackers', $trackers['data']); include_once ('lib/wiki-plugins/wikiplugin_trackerfilter.php'); $formats = ''; $filters = wikiplugin_trackerFilter_get_filters($_REQUEST['trackerId'], '', $formats); $smarty->assign_by_ref('filters', $filters); if (!empty($_REQUEST['displayedFields'])) { if (is_string($_REQUEST['displayedFields'])) { $smarty->assign('displayedFields', preg_split('/[:,]/', $_REQUEST['displayedFields'])); } else { $smarty->assign_by_ref('displayedFields', $_REQUEST['displayedFields']); } } $smarty->assign('recordsMax', $items['cant']); $smarty->assign('recordsOffset', 1); } include_once ('tiki-section_options.php'); $smarty->assign('uses_tabs', 'y'); $smarty->assign('show_filters', 'n'); if (count($fields['data']) > 0) { foreach ($fields['data'] as $it) { if ($it['isSearchable'] == 'y') { $smarty->assign('show_filters', 'y'); break; } } } if (isset($tracker_info['useRatings']) && $tracker_info['useRatings'] == 'y' && $items['data']) { foreach ($items['data'] as $f => $v) { $items['data'][$f]['my_rate'] = $tikilib->get_user_vote(""tracker."" . $_REQUEST[""trackerId""] . '.' . $items['data'][$f]['itemId'], $user); } } setcookie('tab', $cookietab); $smarty->assign('cookietab', $cookietab); ask_ticket('view-trackers'); // Generate validation js if ($prefs['feature_jquery'] == 'y' && $prefs['feature_jquery_validation'] == 'y') { global $validatorslib; include_once('lib/validatorslib.php'); $validationjs = $validatorslib->generateTrackerValidateJS($fields['data']); $smarty->assign('validationjs', $validationjs); } //Use 12- or 24-hour clock for $publishDate time selector based on admin and user preferences include_once ('lib/userprefs/userprefslib.php'); $smarty->assign('use_24hr_clock', $userprefslib->get_user_clock_pref($user)); // Display the template $smarty->assign('mid', 'tiki-view_tracker.tpl'); $smarty->display(""tiki.tpl""); ",0 "a name=""generator"" content=""rustdoc""> rustc_lint::middle::infer::uok - Rust

        rustc_lint::middle::infer

        Function rustc_lint::middle::infer::uokUnstable [-] [+] [src]

        pub fn uok() -> Result<(), type_err<'tcx>>

        Keyboard shortcuts

        ?
        Show this help dialog
        S
        Focus the search field
        Move up in search results
        Move down in search results
        Go to active search result

        Search tricks

        Prefix searches with a type followed by a colon (e.g. fn:) to restrict the search to a given type.

        Accepted types are: fn, mod, struct, enum, trait, typedef (or tdef).

        ",0 " 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. */ /* Import. */ #include ""private.h"" /* Forward. */ static nmsg_res read_file(nmsg_input_t, ssize_t *); static nmsg_res do_read_file(nmsg_input_t, ssize_t, ssize_t); static nmsg_res do_read_sock(nmsg_input_t, ssize_t); /* Internal functions. */ nmsg_res _input_nmsg_read(nmsg_input_t input, nmsg_message_t *msg) { Nmsg__NmsgPayload *np; nmsg_res res; if (input->stream->nmsg != NULL && input->stream->np_index >= input->stream->nmsg->n_payloads - 1) { input->stream->nmsg->n_payloads = 0; nmsg__nmsg__free_unpacked(input->stream->nmsg, NULL); input->stream->nmsg = NULL; } else { input->stream->np_index += 1; } if (input->stream->nmsg == NULL) { res = input->stream->stream_read_fp(input, &input->stream->nmsg); if (res != nmsg_res_success) return (res); input->stream->np_index = 0; } /* detach the payload from the original nmsg container */ np = input->stream->nmsg->payloads[input->stream->np_index]; input->stream->nmsg->payloads[input->stream->np_index] = NULL; /* filter payload */ if (_input_nmsg_filter(input, input->stream->np_index, np) == false) { _nmsg_payload_free(&np); return (nmsg_res_again); } /* pass a pointer to the payload to the caller */ *msg = _nmsg_message_from_payload(np); if (msg == NULL) return (nmsg_res_memfail); /* possibly sleep a bit if ingress rate control is enabled */ if (input->stream->brate != NULL) _nmsg_brate_sleep(input->stream->brate, input->stream->nc_size, input->stream->nmsg->n_payloads, input->stream->np_index); return (nmsg_res_success); } nmsg_res _input_nmsg_loop(nmsg_input_t input, int cnt, nmsg_cb_message cb, void *user) { unsigned n; nmsg_res res; Nmsg__Nmsg *nmsg; Nmsg__NmsgPayload *np; nmsg_message_t msg; if (cnt < 0) { /* loop indefinitely */ for (;;) { if (input->stop) break; res = input->stream->stream_read_fp(input, &input->stream->nmsg); if (res == nmsg_res_again) continue; if (res != nmsg_res_success) return (res); nmsg = input->stream->nmsg; for (n = 0; n < nmsg->n_payloads; n++) { np = nmsg->payloads[n]; if (_input_nmsg_filter(input, n, np)) { msg = _nmsg_message_from_payload(np); cb(msg, user); } } nmsg->n_payloads = 0; free(nmsg->payloads); nmsg->payloads = NULL; nmsg__nmsg__free_unpacked(nmsg, NULL); input->stream->nmsg = NULL; } } else { /* loop until (n_payloads == cnt) */ int n_payloads = 0; for (;;) { if (input->stop) break; res = input->stream->stream_read_fp(input, &input->stream->nmsg); if (res == nmsg_res_again) continue; if (res != nmsg_res_success) return (res); nmsg = input->stream->nmsg; for (n = 0; n < nmsg->n_payloads; n++) { np = nmsg->payloads[n]; if (_input_nmsg_filter(input, n, np)) { if (n_payloads == cnt) break; n_payloads += 1; msg = _nmsg_message_from_payload(np); cb(msg, user); } } nmsg->n_payloads = 0; free(nmsg->payloads); nmsg->payloads = NULL; nmsg__nmsg__free_unpacked(nmsg, NULL); input->stream->nmsg = NULL; if (n_payloads == cnt) break; } } return (nmsg_res_success); } bool _input_nmsg_filter(nmsg_input_t input, unsigned idx, Nmsg__NmsgPayload *np) { assert(input->stream->nmsg != NULL); /* payload crc */ if (input->stream->nmsg->n_payload_crcs >= (idx + 1)) { uint32_t wire_crc = input->stream->nmsg->payload_crcs[idx]; uint32_t calc_crc = my_crc32c(np->payload.data, np->payload.len); if (ntohl(wire_crc) != calc_crc) { _nmsg_dprintf(1, ""libnmsg: WARNING: crc mismatch (%x != %x) [%s]\n"", calc_crc, wire_crc, __func__); return (false); } } /* (vid, msgtype) */ if (input->do_filter == true && (input->filter_vid != np->vid || input->filter_msgtype != np->msgtype)) { return (false); } /* source */ if (input->stream->source > 0 && input->stream->source != np->source) { return (false); } /* operator */ if (input->stream->operator > 0 && input->stream->operator != np->operator_) { return (false); } /* group */ if (input->stream->group > 0 && input->stream->group != np->group) { return (false); } /* all passed */ return (true); } nmsg_res _input_nmsg_unpack_container(nmsg_input_t input, Nmsg__Nmsg **nmsg, uint8_t *buf, size_t buf_len) { nmsg_res res = nmsg_res_success; input->stream->nc_size = buf_len + NMSG_HDRLSZ_V2; _nmsg_dprintf(6, ""%s: unpacking container len= %zd\n"", __func__, buf_len); if (input->stream->flags & NMSG_FLAG_FRAGMENT) { res = _input_frag_read(input, nmsg, buf, buf_len); } else if (input->stream->flags & NMSG_FLAG_ZLIB) { size_t u_len; u_char *u_buf; res = nmsg_zbuf_inflate(input->stream->zb, buf_len, buf, &u_len, &u_buf); if (res != nmsg_res_success) return (res); *nmsg = nmsg__nmsg__unpack(NULL, u_len, u_buf); free(u_buf); if (*nmsg == NULL) return (nmsg_res_parse_error); } else { *nmsg = nmsg__nmsg__unpack(NULL, buf_len, buf); if (*nmsg == NULL) return (nmsg_res_parse_error); } return (res); } nmsg_res _input_nmsg_unpack_container2(const uint8_t *buf, size_t buf_len, unsigned flags, Nmsg__Nmsg **nmsg) { nmsg_res res; /* fragmented containers aren't handled by this function */ if (flags & NMSG_FLAG_FRAGMENT) return (nmsg_res_failure); if (flags & NMSG_FLAG_ZLIB) { size_t u_len; u_char *u_buf; nmsg_zbuf_t zb; zb = nmsg_zbuf_inflate_init(); if (zb == NULL) return (nmsg_res_memfail); res = nmsg_zbuf_inflate(zb, buf_len, (uint8_t *) buf, &u_len, &u_buf); nmsg_zbuf_destroy(&zb); if (res != nmsg_res_success) return (res); *nmsg = nmsg__nmsg__unpack(NULL, u_len, u_buf); free(u_buf); if (*nmsg == NULL) return (nmsg_res_failure); } else { *nmsg = nmsg__nmsg__unpack(NULL, buf_len, buf); if (*nmsg == NULL) return (nmsg_res_failure); } return (nmsg_res_success); } nmsg_res _input_nmsg_read_container_file(nmsg_input_t input, Nmsg__Nmsg **nmsg) { nmsg_res res; ssize_t bytes_avail, msgsize = 0; assert(input->stream->type == nmsg_stream_type_file); /* read */ res = read_file(input, &msgsize); if (res != nmsg_res_success) return (res); /* ensure that the full NMSG container is available */ bytes_avail = _nmsg_buf_avail(input->stream->buf); if (bytes_avail < msgsize) { ssize_t bytes_to_read = msgsize - bytes_avail; res = do_read_file(input, bytes_to_read, bytes_to_read); if (res != nmsg_res_success) return (res); } /* unpack message */ res = _input_nmsg_unpack_container(input, nmsg, input->stream->buf->pos, msgsize); input->stream->buf->pos += msgsize; return (res); } nmsg_res _input_nmsg_read_container_sock(nmsg_input_t input, Nmsg__Nmsg **nmsg) { nmsg_res res; ssize_t msgsize; struct nmsg_buf *buf = input->stream->buf; assert(input->stream->type == nmsg_stream_type_sock); /* read the NMSG container */ _nmsg_buf_reset(buf); res = do_read_sock(input, buf->bufsz); if (res != nmsg_res_success) { if (res == nmsg_res_read_failure) return (res); else /* forward compatibility */ return (nmsg_res_again); } if (_nmsg_buf_avail(buf) < NMSG_HDRLSZ_V2) return (nmsg_res_failure); /* deserialize the NMSG header */ res = _input_nmsg_deserialize_header(buf->pos, _nmsg_buf_avail(buf), &msgsize, &input->stream->flags); if (res != nmsg_res_success) return (res); buf->pos += NMSG_HDRLSZ_V2; /* since the input stream is a sock stream, the entire message must * have been read by the call to do_read_sock() */ if (_nmsg_buf_avail(buf) != msgsize) return (nmsg_res_parse_error); /* unpack message */ res = _input_nmsg_unpack_container(input, nmsg, buf->pos, msgsize); input->stream->buf->pos += msgsize; /* update counters */ if (*nmsg != NULL) { input->stream->count_recv += 1; if (input->stream->verify_seqsrc) { struct nmsg_seqsrc *seqsrc; seqsrc = _input_seqsrc_get(input, *nmsg); if (seqsrc != NULL) { size_t drop; drop = _input_seqsrc_update(input, seqsrc, *nmsg); input->stream->count_drop += drop; } } } /* expire old outstanding fragments */ _input_frag_gc(input->stream); return (res); } #ifdef HAVE_LIBXS nmsg_res _input_nmsg_read_container_xs(nmsg_input_t input, Nmsg__Nmsg **nmsg) { int ret; nmsg_res res; uint8_t *buf; size_t buf_len; ssize_t msgsize = 0; xs_msg_t xmsg; xs_pollitem_t xitems[1]; /* poll */ xitems[0].socket = input->stream->xs; xitems[0].events = XS_POLLIN; ret = xs_poll(xitems, 1, NMSG_RBUF_TIMEOUT); if (ret == 0 || (ret == -1 && errno == EINTR)) return (nmsg_res_again); else if (ret == -1) return (nmsg_res_read_failure); /* initialize XS message object */ if (xs_msg_init(&xmsg)) return (nmsg_res_failure); /* read the NMSG container */ if (xs_recvmsg(input->stream->xs, &xmsg, 0) == -1) { res = nmsg_res_failure; goto out; } nmsg_timespec_get(&input->stream->now); /* get buffer from the XS message */ buf = xs_msg_data(&xmsg); buf_len = xs_msg_size(&xmsg); if (buf_len < NMSG_HDRLSZ_V2) { res = nmsg_res_failure; goto out; } /* deserialize the NMSG header */ res = _input_nmsg_deserialize_header(buf, buf_len, &msgsize, &input->stream->flags); if (res != nmsg_res_success) goto out; buf += NMSG_HDRLSZ_V2; /* the entire message must have been read by xs_recvmsg() */ assert((size_t) msgsize == buf_len - NMSG_HDRLSZ_V2); /* unpack message */ res = _input_nmsg_unpack_container(input, nmsg, buf, msgsize); /* update seqsrc counts */ if (input->stream->verify_seqsrc && *nmsg != NULL) { struct nmsg_seqsrc *seqsrc = _input_seqsrc_get(input, *nmsg); if (seqsrc != NULL) _input_seqsrc_update(input, seqsrc, *nmsg); } /* expire old outstanding fragments */ _input_frag_gc(input->stream); out: xs_msg_close(&xmsg); return (res); } #endif /* HAVE_LIBXS */ nmsg_res _input_nmsg_deserialize_header(const uint8_t *buf, size_t buf_len, ssize_t *msgsize, unsigned *flags) { static const char magic[] = NMSG_MAGIC; uint16_t version; if (buf_len < NMSG_LENHDRSZ_V2) return (nmsg_res_failure); /* check magic */ if (memcmp(buf, magic, sizeof(magic)) != 0) return (nmsg_res_magic_mismatch); buf += sizeof(magic); /* check version */ load_net16(buf, &version); if ((version & 0xFF) != 2U) return (nmsg_res_version_mismatch); *flags = version >> 8; buf += sizeof(version); /* load message (container) size */ load_net32(buf, msgsize); return (nmsg_res_success); } /* Private functions. */ static nmsg_res read_file(nmsg_input_t input, ssize_t *msgsize) { static const char magic[] = NMSG_MAGIC; bool reset_buf = false; ssize_t bytes_avail, bytes_needed, lenhdrsz; nmsg_res res = nmsg_res_failure; uint16_t version; struct nmsg_buf *buf = input->stream->buf; /* ensure we have the (magic, version) header fields */ bytes_avail = _nmsg_buf_avail(buf); if (bytes_avail < NMSG_HDRSZ) { assert(bytes_avail >= 0); bytes_needed = NMSG_HDRSZ - bytes_avail; if (bytes_avail == 0) { _nmsg_buf_reset(buf); res = do_read_file(input, bytes_needed, buf->bufsz); } else { /* the (magic, version) header fields were split */ res = do_read_file(input, bytes_needed, bytes_needed); reset_buf = true; } if (res != nmsg_res_success) return (res); } bytes_avail = _nmsg_buf_avail(buf); assert(bytes_avail >= NMSG_HDRSZ); /* check magic */ if (memcmp(buf->pos, magic, sizeof(magic)) != 0) return (nmsg_res_magic_mismatch); buf->pos += sizeof(magic); /* check version */ load_net16(buf->pos, &version); buf->pos += 2; if (version == 1U) { lenhdrsz = NMSG_LENHDRSZ_V1; } else if ((version & 0xFF) == 2U) { input->stream->flags = version >> 8; version &= 0xFF; lenhdrsz = NMSG_LENHDRSZ_V2; } else { res = nmsg_res_version_mismatch; goto read_header_out; } /* if reset_buf was set, then reading the (magic, version) header * required two read()s. at this point we've consumed all the split * header data, so reset the buffer to avoid overflow. */ if (reset_buf == true) { _nmsg_buf_reset(buf); reset_buf = false; } /* ensure we have the length header field */ bytes_avail = _nmsg_buf_avail(buf); if (bytes_avail < lenhdrsz) { if (bytes_avail == 0) _nmsg_buf_reset(buf); bytes_needed = lenhdrsz - bytes_avail; if (bytes_avail == 0) { res = do_read_file(input, bytes_needed, buf->bufsz); } else { /* the length header field was split */ res = do_read_file(input, bytes_needed, bytes_needed); reset_buf = true; } } bytes_avail = _nmsg_buf_avail(buf); assert(bytes_avail >= lenhdrsz); /* load message size */ if (version == 1U) { load_net16(buf->pos, msgsize); buf->pos += 2; } else if (version == 2U) { load_net32(buf->pos, msgsize); buf->pos += 4; } res = nmsg_res_success; read_header_out: if (reset_buf == true) _nmsg_buf_reset(buf); return (res); } static nmsg_res do_read_file(nmsg_input_t input, ssize_t bytes_needed, ssize_t bytes_max) { ssize_t bytes_read; struct nmsg_buf *buf = input->stream->buf; /* sanity check */ assert(bytes_needed <= bytes_max); /* check that we have enough buffer space */ assert((buf->end + bytes_max) <= (buf->data + NMSG_RBUFSZ)); while (bytes_needed > 0) { bytes_read = read(buf->fd, buf->end, bytes_max); if (bytes_read < 0) return (nmsg_res_failure); if (bytes_read == 0) return (nmsg_res_eof); buf->end += bytes_read; bytes_needed -= bytes_read; bytes_max -= bytes_read; } nmsg_timespec_get(&input->stream->now); return (nmsg_res_success); } static nmsg_res do_read_sock(nmsg_input_t input, ssize_t bytes_max) { int ret; ssize_t bytes_read; struct nmsg_buf *buf = input->stream->buf; socklen_t addr_len = sizeof(struct sockaddr_storage); /* check that we have enough buffer space */ assert((buf->end + bytes_max) <= (buf->data + NMSG_RBUFSZ)); if (input->stream->blocking_io == true) { /* poll */ ret = poll(&input->stream->pfd, 1, NMSG_RBUF_TIMEOUT); if (ret == 0 || (ret == -1 && errno == EINTR)) return (nmsg_res_again); else if (ret == -1) return (nmsg_res_read_failure); } /* read */ bytes_read = recvfrom(buf->fd, buf->pos, bytes_max, 0, (struct sockaddr *) &input->stream->addr_ss, &addr_len); nmsg_timespec_get(&input->stream->now); if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return (nmsg_res_again); if (bytes_read < 0) return (nmsg_res_read_failure); if (bytes_read == 0) return (nmsg_res_eof); buf->end = buf->pos + bytes_read; return (nmsg_res_success); } ",0 ".collections.transformation.FilteredList; import javafx.collections.transformation.SortedList; import javafx.fxml.FXML; import javafx.scene.control.TableColumn; import javafx.scene.control.TableRow; import javafx.scene.control.TableView; import javafx.scene.control.TextField; import javafx.scene.control.cell.CheckBoxTableCell; import javafx.scene.control.cell.PropertyValueFactory; import javafx.stage.Stage; import org.jetbrains.annotations.NotNull; import structures.Annotation; import java.util.ArrayList; import java.util.HashMap; import java.util.TreeSet; /** * View-Controller for the genome table. * * @author Marco Jakob -> from http://code.makery.ch/blog/javafx-8-tableview-sorting-filtering/ * Changed to view and change annotations by Jip Rietveld */ public class AnnotationTableController { @FXML private TextField filterField; @FXML private TableView annotationTable; @FXML private TableColumn startColumn; @FXML private TableColumn endColumn; @FXML private TableColumn infoColumn; @FXML private TableColumn highlightColumn; private SortedList sortedData; private HashMap> annotations; private HashMap> updatedAnnotations; private boolean allSelected; /** * Just add some sample data in the constructor. */ public AnnotationTableController() { } /** * Initializes the controller class. * Needs to be called manually to get the data. * Initializes the table columns and sets up sorting and filtering. * * @param annotationsArg the annotations to load into the table. */ @FXML @SuppressWarnings(""MethodLength"") //It is only 2 too long and the comments ensure clarity. public void initialize(HashMap> annotationsArg) { this.annotations = annotationsArg; this.updatedAnnotations = this.annotations; allSelected = false; ObservableList masterData = FXCollections.observableArrayList(new ArrayList<>(bucketsToTreeSet())); // 0. Initialize the columns. initializeColumns(); // 0.1 setRight editable columns setEditable(); // 1. Wrap the ObservableList in a FilteredList (initially display all data). FilteredList filteredData = new FilteredList<>(masterData, p -> true); // 2. Set the filter Predicate whenever the filter changes. filterField.textProperty().addListener((observable, oldValue, newValue) -> filteredData.setPredicate(annotation -> { // If filter text is empty, display all annotations. if (newValue == null || newValue.isEmpty()) { return true; } String lowerCaseFilter = newValue.toLowerCase(); //Check the info, but also co-ordinates. return annotation.getInfo().toLowerCase().contains(lowerCaseFilter) || Integer.toString(annotation.getStart()).contains(lowerCaseFilter) || Integer.toString(annotation.getEnd()).contains(lowerCaseFilter); })); // 3. Wrap the FilteredList in a SortedList. sortedData = new SortedList<>(filteredData); // 4. Bind the SortedList comparator to the TableView comparator. sortedData.comparatorProperty().bind(annotationTable.comparatorProperty()); // 5. Add sorted (and filtered) data to the table. annotationTable.setItems(sortedData); } /** * Sets the hashMap annotations to a HashSet. * * @return a hash set of the buckets of annotations */ @NotNull private TreeSet bucketsToTreeSet() { return bucketsToTreeSet(this.annotations); } /** * Converts the hashMap to a hashSet. * * @param hashMap The hashMap to be converted. * @return a hashSet of the hashMap. */ private TreeSet bucketsToTreeSet(HashMap> hashMap) { if (hashMap == null) { return null; } TreeSet drawThese = new TreeSet<>(); for (int i = 0; i <= hashMap.size(); i++) { TreeSet tempAnnotations = hashMap.get(i); if (tempAnnotations != null) { drawThese.addAll(tempAnnotations); } } return drawThese; } /** * Method that sets the columns and table to the correct editable state. */ private void setEditable() { annotationTable.setEditable(true); startColumn.setEditable(false); endColumn.setEditable(false); infoColumn.setEditable(false); highlightColumn.setEditable(true); } /** * Method that initializes the columns with the right factories. */ private void initializeColumns() { startColumn.setCellValueFactory(new PropertyValueFactory<>(""start"")); endColumn.setCellValueFactory(new PropertyValueFactory<>(""end"")); infoColumn.setCellValueFactory(new PropertyValueFactory<>(""info"")); highlightColumn.setCellValueFactory( param -> param.getValue().getSelected()); highlightColumn.setCellFactory(CheckBoxTableCell.forTableColumn(highlightColumn)); annotationTable.setRowFactory(tv -> { TableRow row = new TableRow<>(); row.setOnMouseClicked(event -> { if (event.getClickCount() == 2 && (!row.isEmpty())) { Annotation annotation = row.getItem(); goToAnnotation(annotation); close(); } }); return row; }); } /** * Method that goes to the annotation and highlights it. * * @param annotation the Annotation to go to. */ private void goToAnnotation(Annotation annotation) { try { int startNodeID = GraphDrawer.getInstance().hongerInAfrika(annotation.getStart()); int endNodeID = GraphDrawer.getInstance().hongerInAfrika(annotation.getEnd()); int soortVanRadius = (int) ((endNodeID - startNodeID) * 1.2); if (soortVanRadius > 4000) { ZoomController.getInstance().traverseGraphClicked(startNodeID, 4000); } else { ZoomController.getInstance().traverseGraphClicked(((endNodeID + startNodeID) / 2), Math.max(soortVanRadius, (int) Math.sqrt(49))); } GraphDrawer.getInstance().highlightAnnotation(annotation); } catch (StackOverflowError e) { AnnotationPopUpController popUp = new AnnotationPopUpController(); popUp.loadNoAnnotationFound(""Sorry, can't find this annotation.""); System.err.println(""Sorry, too many nodes without ref to hold in memory.""); } } /** * Handles pressing the save button. */ @FXML public void saveButtonClicked() { updatedAnnotations = annotations; Annotation annotation = annotationTable.getSelectionModel().getSelectedItem(); if (annotation != null) { goToAnnotation(annotation); } close(); } /** * Handles pressing the cancel button. */ public void cancelButtonClicked() { close(); } /** * A general function that closes the stage. */ private void close() { Stage stage = (Stage) annotationTable.getScene().getWindow(); stage.close(); } /** * Can select/deselect the entire sortedData at the same time. */ @FXML public void selectAllFiltered() { for (Annotation annotation : sortedData) { if (allSelected) { annotation.setSelected(false); } else { annotation.setSelected(true); } } annotationTable.setItems(sortedData); allSelected = !allSelected; } public HashMap> getAnnotations() { return updatedAnnotations; } } ",0 ") . '/program.json'), true); $versions = json_decode(file_get_contents(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/workspace/packages/test/etc/versions.json'), true); $urls = json_decode(file_get_contents(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/workspace/packages/test/etc/urls.json'), true); $url = str_replace('%%VERSION%%', $versions['ZendFramework'][$descriptor['implements']['github.com/firephp/firephp/workspace/packages/test/0.1']['dependencies']['ZendFramework']], $urls['ZendFramework']); $path = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/workspace/.pinf-packages/downloads/packages/' . substr($url, strpos($url, '/') + 2) . ""~pkg/library""; set_include_path('.' . PATH_SEPARATOR . $path); date_default_timezone_set('America/Vancouver'); } ___main___(); // @see http://framework.zend.com/manual/1.11/en/learning.autoloading.usage.html require_once 'Zend/Loader/Autoloader.php'; Zend_Loader_Autoloader::getInstance(); /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_Wildfire * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ /* NOTE: You must have Zend Framework in your include path! */ /* * Add our Firebug Log Writer to the registry */ require_once 'Zend/Registry.php'; require_once 'Zend/Log.php'; require_once 'Zend/Log/Writer/Firebug.php'; $writer = new Zend_Log_Writer_Firebug(); $writer->setPriorityStyle(8, 'TABLE'); $writer->setPriorityStyle(9, 'TRACE'); $logger = new Zend_Log($writer); $logger->addPriority('TABLE', 8); $logger->addPriority('TRACE', 9); Zend_Registry::set('logger',$logger); /* * Add our Firebug DB Profiler to the registry */ require_once 'Zend/Db.php'; require_once 'Zend/Db/Profiler/Firebug.php'; $profiler = new Zend_Db_Profiler_Firebug('All DB Queries'); $db = Zend_Db::factory('PDO_SQLITE', array('dbname' => ':memory:', 'profiler' => $profiler)); $db->getProfiler()->setEnabled(true); Zend_Registry::set('db',$db); /* * Run the front controller */ require_once 'Zend/Controller/Front.php'; Zend_Controller_Front::run(dirname(dirname(__FILE__)).'/application/controllers'); ",0 "utton; import edu.wpi.first.wpilibj.buttons.JoystickButton; import team.gif.commands.*; public class OI { public static final Joystick leftStick = new Joystick(1); public static final rightStick = new Joystick(2); public static final auxStick = new Joystick(3); private final Button leftTrigger = new JoystickButton(leftStick, 1); private final Button right2 = new JoystickButton(rightStick, 2); private final Button right3 = new JoystickButton(rightStick, 3); private final Button right6 = new JoystickButton(rightStick, 6); private final Button right7 = new JoystickButton(rightStick, 7); public static final Button auxTrigger = new JoystickButton(rightStick, 1); public OI() { leftTrigger.whileHeld(new ShifterHigh()); right2.whileHeld(new CollectorReceive()); right2.whenPressed(new EarsOpen()); right3.whileHeld(new CollectorPass()); right3.whenPressed(new EarsOpen()); right3.whenReleased(new CollectorStandby()); right3.whenReleased(new EarsClosed()); right6.whileHeld(new BumperUp()); right7.whileHeld(new CollectorRaise()); } } ",0 "com/~r/geledes/~3/EdmSLCOQs3o/"" > My post · Entropista

        My post

        http://feedproxy.google.com/~r/geledes/~3/EdmSLCOQs3o/

        ",0 "nse information, please view the LICENSE * file that was distributed with this source code. */ namespace RunOpenCode\AssetsInjection\Tests\Mockup; use RunOpenCode\AssetsInjection\Contract\Compiler\CompilerPassInterface; use RunOpenCode\AssetsInjection\Contract\ContainerInterface; use RunOpenCode\AssetsInjection\Library\LibraryDefinition; use RunOpenCode\AssetsInjection\Value\CompilerPassResult; /** * Class DummyCompilerPass * * Dummy compiler pass which will add definition with given name to container in order to check validity of executed test. * * @package RunOpenCode\AssetsInjection\Tests\Mockup */ final class DummyCompilerPass implements CompilerPassInterface { /** * @var string */ private $definitionTestNameMarker; /** * @var bool */ private $stopProcessing; /** * A constructor. * * @param string $definitionTestNameMarker LibraryDefinition marker name to add to container. * @param bool|false $stopProcessing Should compilation be stopped. */ public function __construct($definitionTestNameMarker, $stopProcessing = false) { $this->definitionTestNameMarker = $definitionTestNameMarker; $this->stopProcessing = $stopProcessing; } /** * {@inheritdoc} */ public function process(ContainerInterface $container) { $container->getLibraries()->addDefinition(new LibraryDefinition($this->definitionTestNameMarker)); return new CompilerPassResult($container, $this->stopProcessing); } }",0 "bute it and/or modify it under * the terms of the GNU General Public License, either version 2 * of the License, or any later version. * * For the full copyright and license information, please read the * LICENSE.txt file that was distributed with this source code. * * The TYPO3 project - inspiring people to share! */ use TYPO3\CMS\Extbase\Persistence\QueryInterface; /** * The Query class used to run queries against the database * * @api */ class Query implements QueryInterface { /** * An inner join. */ const JCR_JOIN_TYPE_INNER = '{http://www.jcp.org/jcr/1.0}joinTypeInner'; /** * A left-outer join. */ const JCR_JOIN_TYPE_LEFT_OUTER = '{http://www.jcp.org/jcr/1.0}joinTypeLeftOuter'; /** * A right-outer join. */ const JCR_JOIN_TYPE_RIGHT_OUTER = '{http://www.jcp.org/jcr/1.0}joinTypeRightOuter'; /** * Charset of strings in QOM */ const CHARSET = 'utf-8'; /** * @var string */ protected $type; /** * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface * @inject */ protected $objectManager; /** * @var \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper * @inject */ protected $dataMapper; /** * @var \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface * @inject */ protected $persistenceManager; /** * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory * @inject */ protected $qomFactory; /** * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface */ protected $source; /** * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface */ protected $constraint; /** * @var \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement */ protected $statement; /** * @var int */ protected $orderings = array(); /** * @var int */ protected $limit; /** * @var int */ protected $offset; /** * The query settings. * * @var QuerySettingsInterface */ protected $querySettings; /** * Constructs a query object working on the given class name * * @param string $type */ public function __construct($type) { $this->type = $type; } /** * Sets the Query Settings. These Query settings must match the settings expected by * the specific Storage Backend. * * @param QuerySettingsInterface $querySettings The Query Settings * @return void * @api This method is not part of FLOW3 API */ public function setQuerySettings(QuerySettingsInterface $querySettings) { $this->querySettings = $querySettings; } /** * Returns the Query Settings. * * @throws Exception * @return QuerySettingsInterface $querySettings The Query Settings * @api This method is not part of FLOW3 API */ public function getQuerySettings() { if (!$this->querySettings instanceof QuerySettingsInterface) { throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception('Tried to get the query settings without seting them before.', 1248689115); } return $this->querySettings; } /** * Returns the type this query cares for. * * @return string * @api */ public function getType() { return $this->type; } /** * Sets the source to fetch the result from * * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $source */ public function setSource(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $source) { $this->source = $source; } /** * Returns the selectorn name or an empty string, if the source is not a selector * TODO This has to be checked at another place * * @return string The selector name */ protected function getSelectorName() { $source = $this->getSource(); if ($source instanceof \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SelectorInterface) { return $source->getSelectorName(); } else { return ''; } } /** * Gets the node-tuple source for this query. * * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface the node-tuple source; non-null */ public function getSource() { if ($this->source === NULL) { $this->source = $this->qomFactory->selector($this->getType(), $this->dataMapper->convertClassNameToTableName($this->getType())); } return $this->source; } /** * Executes the query against the database and returns the result * * @param $returnRawQueryResult boolean avoids the object mapping by the persistence * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface|array The query result object or an array if $returnRawQueryResult is TRUE * @api */ public function execute($returnRawQueryResult = FALSE) { if ($returnRawQueryResult === TRUE || $this->getQuerySettings()->getReturnRawQueryResult() === TRUE) { return $this->persistenceManager->getObjectDataByQuery($this); } else { return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\QueryResultInterface', $this); } } /** * Sets the property names to order the result by. Expected like this: * array( * 'foo' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING, * 'bar' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING * ) * where 'foo' and 'bar' are property names. * * @param array $orderings The property names to order by * @return QueryInterface * @api */ public function setOrderings(array $orderings) { $this->orderings = $orderings; return $this; } /** * Returns the property names to order the result by. Like this: * array( * 'foo' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING, * 'bar' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING * ) * * @return array * @api */ public function getOrderings() { return $this->orderings; } /** * Sets the maximum size of the result set to limit. Returns $this to allow * for chaining (fluid interface) * * @param integer $limit * @throws \InvalidArgumentException * @return QueryInterface * @api */ public function setLimit($limit) { if (!is_int($limit) || $limit < 1) { throw new \InvalidArgumentException('The limit must be an integer >= 1', 1245071870); } $this->limit = $limit; return $this; } /** * Resets a previously set maximum size of the result set. Returns $this to allow * for chaining (fluid interface) * * @return QueryInterface * @api */ public function unsetLimit() { unset($this->limit); return $this; } /** * Returns the maximum size of the result set to limit. * * @return integer * @api */ public function getLimit() { return $this->limit; } /** * Sets the start offset of the result set to offset. Returns $this to * allow for chaining (fluid interface) * * @param integer $offset * @throws \InvalidArgumentException * @return QueryInterface * @api */ public function setOffset($offset) { if (!is_int($offset) || $offset < 0) { throw new \InvalidArgumentException('The offset must be a positive integer', 1245071872); } $this->offset = $offset; return $this; } /** * Returns the start offset of the result set. * * @return integer * @api */ public function getOffset() { return $this->offset; } /** * The constraint used to limit the result set. Returns $this to allow * for chaining (fluid interface) * * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint * @return QueryInterface * @api */ public function matching($constraint) { $this->constraint = $constraint; return $this; } /** * Sets the statement of this query. If you use this, you will lose the abstraction from a concrete storage * backend (database). * * @param string|\TYPO3\CMS\Core\Database\PreparedStatement $statement The statement * @param array $parameters An array of parameters. These will be bound to placeholders '?' in the $statement. * @return QueryInterface */ public function statement($statement, array $parameters = array()) { $this->statement = $this->qomFactory->statement($statement, $parameters); return $this; } /** * Returns the statement of this query. * * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement */ public function getStatement() { return $this->statement; } /** * Gets the constraint for this query. * * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface|NULL the constraint, or null if none * @api */ public function getConstraint() { return $this->constraint; } /** * Performs a logical conjunction of the given constraints. The method takes one or more contraints and concatenates them with a boolean AND. * It also scepts a single array of constraints to be concatenated. * * @param mixed $constraint1 The first of multiple constraints or an array of constraints. * @throws Exception\InvalidNumberOfConstraintsException * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\AndInterface * @api */ public function logicalAnd($constraint1) { if (is_array($constraint1)) { $resultingConstraint = array_shift($constraint1); $constraints = $constraint1; } else { $constraints = func_get_args(); $resultingConstraint = array_shift($constraints); } if ($resultingConstraint === NULL) { throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidNumberOfConstraintsException('There must be at least one constraint or a non-empty array of constraints given.', 1268056288); } foreach ($constraints as $constraint) { $resultingConstraint = $this->qomFactory->_and($resultingConstraint, $constraint); } return $resultingConstraint; } /** * Performs a logical disjunction of the two given constraints * * @param mixed $constraint1 The first of multiple constraints or an array of constraints. * @throws Exception\InvalidNumberOfConstraintsException * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\OrInterface * @api */ public function logicalOr($constraint1) { if (is_array($constraint1)) { $resultingConstraint = array_shift($constraint1); $constraints = $constraint1; } else { $constraints = func_get_args(); $resultingConstraint = array_shift($constraints); } if ($resultingConstraint === NULL) { throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidNumberOfConstraintsException('There must be at least one constraint or a non-empty array of constraints given.', 1268056289); } foreach ($constraints as $constraint) { $resultingConstraint = $this->qomFactory->_or($resultingConstraint, $constraint); } return $resultingConstraint; } /** * Performs a logical negation of the given constraint * * @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint Constraint to negate * @throws \RuntimeException * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\NotInterface * @api */ public function logicalNot(\TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint) { return $this->qomFactory->not($constraint); } /** * Returns an equals criterion used for matching objects against a query * * @param string $propertyName The name of the property to compare against * @param mixed $operand The value to compare with * @param boolean $caseSensitive Whether the equality test should be done case-sensitive * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface * @api */ public function equals($propertyName, $operand, $caseSensitive = TRUE) { if (is_object($operand) || $caseSensitive) { $comparison = $this->qomFactory->comparison( $this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), QueryInterface::OPERATOR_EQUAL_TO, $operand ); } else { $comparison = $this->qomFactory->comparison( $this->qomFactory->lowerCase($this->qomFactory->propertyValue($propertyName, $this->getSelectorName())), QueryInterface::OPERATOR_EQUAL_TO, \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Charset\\CharsetConverter')->conv_case(\TYPO3\CMS\Extbase\Persistence\Generic\Query::CHARSET, $operand, 'toLower') ); } return $comparison; } /** * Returns a like criterion used for matching objects against a query * * @param string $propertyName The name of the property to compare against * @param mixed $operand The value to compare with * @param boolean $caseSensitive Whether the matching should be done case-sensitive * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface * @api */ public function like($propertyName, $operand, $caseSensitive = TRUE) { return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), QueryInterface::OPERATOR_LIKE, $operand); } /** * Returns a ""contains"" criterion used for matching objects against a query. * It matches if the multivalued property contains the given operand. * * @param string $propertyName The name of the (multivalued) property to compare against * @param mixed $operand The value to compare with * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface * @api */ public function contains($propertyName, $operand) { return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), QueryInterface::OPERATOR_CONTAINS, $operand); } /** * Returns an ""in"" criterion used for matching objects against a query. It * matches if the property's value is contained in the multivalued operand. * * @param string $propertyName The name of the property to compare against * @param mixed $operand The value to compare with, multivalued * @throws Exception\UnexpectedTypeException * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface * @api */ public function in($propertyName, $operand) { if (!is_array($operand) && !$operand instanceof \ArrayAccess && !$operand instanceof \Traversable) { throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\UnexpectedTypeException('The ""in"" operator must be given a multivalued operand (array, ArrayAccess, Traversable).', 1264678095); } return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), QueryInterface::OPERATOR_IN, $operand); } /** * Returns a less than criterion used for matching objects against a query * * @param string $propertyName The name of the property to compare against * @param mixed $operand The value to compare with * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface * @api */ public function lessThan($propertyName, $operand) { return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), QueryInterface::OPERATOR_LESS_THAN, $operand); } /** * Returns a less or equal than criterion used for matching objects against a query * * @param string $propertyName The name of the property to compare against * @param mixed $operand The value to compare with * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface * @api */ public function lessThanOrEqual($propertyName, $operand) { return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), QueryInterface::OPERATOR_LESS_THAN_OR_EQUAL_TO, $operand); } /** * Returns a greater than criterion used for matching objects against a query * * @param string $propertyName The name of the property to compare against * @param mixed $operand The value to compare with * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface * @api */ public function greaterThan($propertyName, $operand) { return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), QueryInterface::OPERATOR_GREATER_THAN, $operand); } /** * Returns a greater than or equal criterion used for matching objects against a query * * @param string $propertyName The name of the property to compare against * @param mixed $operand The value to compare with * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface * @api */ public function greaterThanOrEqual($propertyName, $operand) { return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), QueryInterface::OPERATOR_GREATER_THAN_OR_EQUAL_TO, $operand); } /** * @return void */ public function __wakeup() { $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager'); $this->persistenceManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\PersistenceManagerInterface'); $this->dataMapper = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Mapper\\DataMapper'); $this->qomFactory = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\QueryObjectModelFactory'); } /** * @return array */ public function __sleep() { return array('type', 'source', 'constraint', 'statement', 'orderings', 'limit', 'offset', 'querySettings'); } /** * Returns the query result count. * * @return integer The query result count * @api */ public function count() { return $this->execute()->count(); } /** * Returns an ""isEmpty"" criterion used for matching objects against a query. * It matches if the multivalued property contains no values or is NULL. * * @param string $propertyName The name of the multivalued property to compare against * @throws \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException if used on a single-valued property * @return bool * @api */ public function isEmpty($propertyName) { throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__); } } ",0 "or=""#CCCCCC"">

        Original

        ",0 "

        Post tagged: precision

        ",0 " /** * @Id * @Identity * @GeneratedValue * @Primary * @Column(type=""integer"") * @var integer */ public $id; /** * @Column(column=""pib"", type=""string"") * @var string */ public $pib; /** * @Column(column=""birthDate"", type=""timestamp"") * @var string */ public $birthDate; /** * @Column(name=""maritalStatus"", type=""enum"") * @var string */ public $maritalStatus; /** * @Column(name=""cityId"", type=""integer"") * @var string */ public $cityId; /** * @Column(name=""educationId"", type=""integer"") * @var string */ public $educationId; /** * @Column(name=""phoneMobile"", type=""string"", length=200) * @var string */ public $phoneMobile; /** * @Column(name=""phoneHome"", type=""string"") * @var string */ public $phoneHome; /** * @Column(name=""email"", type=""string"") * @var string */ public $email; /** * @Column(name=""drivingExp"", type=""string"") * @var string */ public $drivingExp; /** * @Column(type=""$recommendations"", nullable=false, name=""group_id"", size=""11"") */ public $recommendations; /** * @Column(column=""changed"", type=""timestamp"") * @var string */ public $changed; /** * @Column(column=""created"", type=""timestamp"") * @var string */ public $created; public function getSource() { return ""candidates""; } } ",0 "ple page to create accounts. // Due to the need of reading conf files this script has to be located // inside the Aura web folder, or you have to adjust some paths. // -------------------------------------------------------------------------- include '../shared/Conf.class.php'; include '../shared/MabiDb.class.php'; $conf = new Conf(); $conf->load('../../conf/database.conf'); $db = new MabiDb(); $db->init($conf->get('database.host'), $conf->get('database.user'), $conf->get('database.pass'), $conf->get('database.db')); $succs = false; $error = ''; $user = ''; $pass = ''; $pass2 = ''; if(isset($_POST['register'])) { $user = $_POST['user']; $pass = $_POST['pass']; $pass2 = $_POST['pass2']; if(!preg_match('~^[a-z0-9]{4,20}$~i', $user)) $error = 'Invalid username (4-20 characters).'; else if($pass !== $pass2) $error = 'Passwords don\'t match.'; else if(!preg_match('~^[a-z0-9]{6,24}$~i', $pass)) $error = 'Invalid password (6-24 characters).'; else if($db->accountExists($user)) $error = 'Username already exists.'; else { $db->createAccount($user, $pass); $succs = true; } } ?> Register - Aura "">
        "">
        Username ""/>
        Password ""/>
        Password Repeat ""/>
        ",0 "tribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include ""krb5_locl.h"" void _krb5_evp_schedule(krb5_context context, struct _krb5_key_type *kt, struct _krb5_key_data *kd) { struct _krb5_evp_schedule *key = kd->schedule->data; const EVP_CIPHER *c = (*kt->evp)(); EVP_CIPHER_CTX_init(&key->ectx); EVP_CIPHER_CTX_init(&key->dctx); EVP_CipherInit_ex(&key->ectx, c, NULL, kd->key->keyvalue.data, NULL, 1); EVP_CipherInit_ex(&key->dctx, c, NULL, kd->key->keyvalue.data, NULL, 0); } void _krb5_evp_cleanup(krb5_context context, struct _krb5_key_data *kd) { struct _krb5_evp_schedule *key = kd->schedule->data; EVP_CIPHER_CTX_cleanup(&key->ectx); EVP_CIPHER_CTX_cleanup(&key->dctx); } krb5_error_code _krb5_evp_encrypt(krb5_context context, struct _krb5_key_data *key, void *data, size_t len, krb5_boolean encryptp, int usage, void *ivec) { struct _krb5_evp_schedule *ctx = key->schedule->data; EVP_CIPHER_CTX *c; c = encryptp ? &ctx->ectx : &ctx->dctx; if (ivec == NULL) { /* alloca ? */ size_t len2 = EVP_CIPHER_CTX_iv_length(c); void *loiv = malloc(len2); if (loiv == NULL) { krb5_clear_error_message(context); return ENOMEM; } memset(loiv, 0, len2); EVP_CipherInit_ex(c, NULL, NULL, NULL, loiv, -1); free(loiv); } else EVP_CipherInit_ex(c, NULL, NULL, NULL, ivec, -1); EVP_Cipher(c, data, data, len); return 0; } static const unsigned char zero_ivec[EVP_MAX_BLOCK_LENGTH] = { 0 }; krb5_error_code _krb5_evp_encrypt_cts(krb5_context context, struct _krb5_key_data *key, void *data, size_t len, krb5_boolean encryptp, int usage, void *ivec) { size_t i, blocksize; struct _krb5_evp_schedule *ctx = key->schedule->data; unsigned char tmp[EVP_MAX_BLOCK_LENGTH], ivec2[EVP_MAX_BLOCK_LENGTH]; EVP_CIPHER_CTX *c; unsigned char *p; c = encryptp ? &ctx->ectx : &ctx->dctx; blocksize = EVP_CIPHER_CTX_block_size(c); if (len < blocksize) { krb5_set_error_message(context, EINVAL, ""message block too short""); return EINVAL; } else if (len == blocksize) { EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); EVP_Cipher(c, data, data, len); return 0; } if (ivec) EVP_CipherInit_ex(c, NULL, NULL, NULL, ivec, -1); else EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); if (encryptp) { p = data; i = ((len - 1) / blocksize) * blocksize; EVP_Cipher(c, p, p, i); p += i - blocksize; len -= i; memcpy(ivec2, p, blocksize); for (i = 0; i < len; i++) tmp[i] = p[i + blocksize] ^ ivec2[i]; for (; i < blocksize; i++) tmp[i] = 0 ^ ivec2[i]; EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); EVP_Cipher(c, p, tmp, blocksize); memcpy(p + blocksize, ivec2, len); if (ivec) memcpy(ivec, p, blocksize); } else { unsigned char tmp2[EVP_MAX_BLOCK_LENGTH], tmp3[EVP_MAX_BLOCK_LENGTH]; p = data; if (len > blocksize * 2) { /* remove last two blocks and round up, decrypt this with cbc, then do cts dance */ i = ((((len - blocksize * 2) + blocksize - 1) / blocksize) * blocksize); memcpy(ivec2, p + i - blocksize, blocksize); EVP_Cipher(c, p, p, i); p += i; len -= i + blocksize; } else { if (ivec) memcpy(ivec2, ivec, blocksize); else memcpy(ivec2, zero_ivec, blocksize); len -= blocksize; } memcpy(tmp, p, blocksize); EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); EVP_Cipher(c, tmp2, p, blocksize); memcpy(tmp3, p + blocksize, len); memcpy(tmp3 + len, tmp2 + len, blocksize - len); /* xor 0 */ for (i = 0; i < len; i++) p[i + blocksize] = tmp2[i] ^ tmp3[i]; EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); EVP_Cipher(c, p, tmp3, blocksize); for (i = 0; i < blocksize; i++) p[i] ^= ivec2[i]; if (ivec) memcpy(ivec, tmp, blocksize); } return 0; } ",0 "3 of the GNU * General Public License. * See LICENSE and gpl-3.0.txt for details. */ /*************************************************************************** * Jean Baptiste Filippi - 01.11.2005 * * * ***************************************************************************/ #include ""grib_api_internal.h"" /* This is used by make_class.pl START_CLASS_DEF CLASS = action IMPLEMENTS = create_accessor IMPLEMENTS = dump;xref IMPLEMENTS = destroy IMPLEMENTS = notify_change IMPLEMENTS = compile MEMBERS = long len MEMBERS = grib_arguments* params END_CLASS_DEF */ /* START_CLASS_IMP */ /* Don't edit anything between START_CLASS_IMP and END_CLASS_IMP Instead edit values between START_CLASS_DEF and END_CLASS_DEF or edit ""action.class"" and rerun ./make_class.pl */ static void init_class (grib_action_class*); static void dump (grib_action* d, FILE*,int); static void xref (grib_action* d, FILE* f,const char* path); static void compile (grib_action* a, grib_compiler* compiler); static void destroy (grib_context*,grib_action*); static int create_accessor(grib_section*,grib_action*,grib_loader*); static int notify_change(grib_action* a, grib_accessor* observer,grib_accessor* observed); typedef struct grib_action_gen { grib_action act; /* Members defined in gen */ long len; grib_arguments* params; } grib_action_gen; static grib_action_class _grib_action_class_gen = { 0, /* super */ ""action_class_gen"", /* name */ sizeof(grib_action_gen), /* size */ 0, /* inited */ &init_class, /* init_class */ 0, /* init */ &destroy, /* destroy */ &dump, /* dump */ &xref, /* xref */ &create_accessor, /* create_accessor*/ ¬ify_change, /* notify_change */ 0, /* reparse */ 0, /* execute */ &compile, /* compile */ }; grib_action_class* grib_action_class_gen = &_grib_action_class_gen; static void init_class(grib_action_class* c) { } /* END_CLASS_IMP */ grib_action* grib_action_create_gen( grib_context* context, const char* name, const char* op, const long len, grib_arguments* params, grib_arguments* default_value,int flags,const char* name_space,const char* set) { grib_action_gen* a = NULL; grib_action_class* c = grib_action_class_gen; grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context,c->size); act->next = NULL; act->name = grib_context_strdup_persistent(context, name); act->op = grib_context_strdup_persistent(context, op); if(name_space) act->name_space = grib_context_strdup_persistent(context, name_space); act->cclass = c; act->context = context; act->flags = flags; a = (grib_action_gen*)act; a->len = len; a->params = params; if (set) act->set = grib_context_strdup_persistent(context, set); act->default_value = default_value; return act; } static void dump( grib_action* act, FILE* f, int lvl) { grib_action_gen* a = ( grib_action_gen*)act; int i =0; for (i=0;icontext,f,"" ""); grib_context_print(act->context,f,""%s[%d] %s \n"", act->op, a->len , act->name); } #define F(x) if(flg&x) { fprintf(f,""%s=>1,"",#x); flg &= !x; } static int count=0; static void xref( grib_action* act, FILE* f,const char *path) { grib_action_gen* a = ( grib_action_gen*)act; unsigned long flg = act->flags; int position= a->len > 0 ? count++ : -1; fprintf(f,""bless({path=>'%s',size => %ld, name=> '%s', position=> %d, "",path, (long)a->len , act->name,position); fprintf(f,"" params=> [""); grib_arguments_print(act->context,a->params,NULL); fprintf(f,""], flags=> {""); F(GRIB_ACCESSOR_FLAG_READ_ONLY); F(GRIB_ACCESSOR_FLAG_DUMP); F(GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC); F(GRIB_ACCESSOR_FLAG_CAN_BE_MISSING); F(GRIB_ACCESSOR_FLAG_HIDDEN); F(GRIB_ACCESSOR_FLAG_CONSTRAINT); F(GRIB_ACCESSOR_FLAG_OVERRIDE); F(GRIB_ACCESSOR_FLAG_NO_COPY); F(GRIB_ACCESSOR_FLAG_COPY_OK); F(GRIB_ACCESSOR_FLAG_FUNCTION); F(GRIB_ACCESSOR_FLAG_DATA); F(GRIB_ACCESSOR_FLAG_NO_FAIL); F(GRIB_ACCESSOR_FLAG_TRANSIENT); F(GRIB_ACCESSOR_FLAG_STRING_TYPE); F(GRIB_ACCESSOR_FLAG_LONG_TYPE); /* make sure all flags are processed */ if(flg) { printf(""FLG = %ld\n"",(long)flg); } Assert(flg == 0); fprintf(f,""}, defaults=> [""); grib_arguments_print(act->context,act->default_value,NULL); fprintf(f,""]}, 'xref::%s'),\n"",act->op); } static int create_accessor( grib_section* p, grib_action* act, grib_loader *loader) { grib_action_gen* a = ( grib_action_gen*)act; grib_accessor* ga = NULL; ga = grib_accessor_factory( p, act,a->len,a->params); if(!ga) return GRIB_INTERNAL_ERROR; grib_push_accessor(ga,p->block); if(ga->flags & GRIB_ACCESSOR_FLAG_CONSTRAINT) grib_dependency_observe_arguments(ga,act->default_value); if(loader == NULL) return GRIB_SUCCESS; else return loader->init_accessor(loader,ga,act->default_value); } static int notify_change(grib_action* act, grib_accessor * notified, grib_accessor* changed) { if(act->default_value) return grib_pack_expression(notified,grib_arguments_get_expression(notified->parent->h,act->default_value,0)); return GRIB_SUCCESS; } static void destroy(grib_context* context,grib_action* act) { grib_action_gen* a = ( grib_action_gen*)act; if(a->params != act->default_value) grib_arguments_free(context, a->params); grib_arguments_free(context, act->default_value); grib_context_free_persistent(context, act->name); grib_context_free_persistent(context, act->op); grib_context_free_persistent(context, act->name_space); if (act->set) grib_context_free_persistent(context, act->set); } static void compile(grib_action* act, grib_compiler* compiler) { grib_action_gen* a = (grib_action_gen*)act; fprintf(compiler->out,""%s = grib_action_create_gen(ctx,"",compiler->var); fprintf(compiler->out,""\""%s\"","",act->name); fprintf(compiler->out,""\""%s\"","",act->op); fprintf(compiler->out,""%ld,"",a->len); grib_compile_arguments(a->params, compiler); fprintf(compiler->out,"",""); grib_compile_arguments(act->default_value, compiler); fprintf(compiler->out,"",""); grib_compile_flags(compiler,act->flags); fprintf(compiler->out,"",""); if(act->name_space) { fprintf(compiler->out,""\""%s\"","",act->name_space); } else { fprintf(compiler->out,""NULL,""); } if(act->set) { fprintf(compiler->out,""\""%s\"");"",act->set); } else { fprintf(compiler->out,""NULL);""); } fprintf(compiler->out,""\n""); } ",0 "al-tcp-manager-header"">Postman Proxy: Disconnected

        Can use regular expressions.

        Can use regular expressions. For example, to exclude multiple strings use google|dropbox|github

        Separate using commas. Example: PUT,GET,POST

        ",0 " * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program. If not, see * . * #L% */ import com.google.gson.*; import org.eclipse.smarthome.core.internal.service.CommandDescriptionServiceImpl; import org.eclipse.smarthome.core.internal.types.CommandDescriptionImpl; import org.eclipse.smarthome.core.types.CommandDescription; import org.eclipse.smarthome.core.types.CommandDescriptionBuilder; import org.eclipse.smarthome.core.types.CommandOption; import org.openbase.bco.device.openhab.jp.JPOpenHABURI; import org.openbase.jps.core.JPService; import org.openbase.jps.exception.JPNotAvailableException; import org.openbase.jul.exception.InstantiationException; import org.openbase.jul.exception.*; import org.openbase.jul.exception.printer.ExceptionPrinter; import org.openbase.jul.exception.printer.LogLevel; import org.openbase.jul.iface.Shutdownable; import org.openbase.jul.pattern.Observable; import org.openbase.jul.pattern.ObservableImpl; import org.openbase.jul.pattern.Observer; import org.openbase.jul.schedule.GlobalScheduledExecutorService; import org.openbase.jul.schedule.SyncObject; import org.openbase.type.domotic.state.ConnectionStateType.ConnectionState; import org.openbase.type.domotic.state.ConnectionStateType.ConnectionState.State; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.ws.rs.ProcessingException; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Entity; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.sse.InboundSseEvent; import javax.ws.rs.sse.SseEventSource; import java.lang.reflect.Type; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; public abstract class OpenHABRestConnection implements Shutdownable { public static final String SEPARATOR = ""/""; public static final String REST_TARGET = ""rest""; public static final String APPROVE_TARGET = ""approve""; public static final String EVENTS_TARGET = ""events""; public static final String TOPIC_KEY = ""topic""; public static final String TOPIC_SEPARATOR = SEPARATOR; private static final Logger LOGGER = LoggerFactory.getLogger(OpenHABRestConnection.class); private final SyncObject topicObservableMapLock = new SyncObject(""topicObservableMapLock""); private final SyncObject connectionStateSyncLock = new SyncObject(""connectionStateSyncLock""); private final Map> topicObservableMap; private final Client restClient; private final WebTarget restTarget; private SseEventSource sseSource; private boolean shutdownInitiated = false; protected final JsonParser jsonParser; protected final Gson gson; private ScheduledFuture connectionTask; protected ConnectionState.State openhabConnectionState = State.DISCONNECTED; public OpenHABRestConnection() throws InstantiationException { try { this.topicObservableMap = new HashMap<>(); this.gson = new GsonBuilder().setExclusionStrategies(new ExclusionStrategy() { @Override public boolean shouldSkipField(FieldAttributes fieldAttributes) { return false; } @Override public boolean shouldSkipClass(Class aClass) { // ignore Command Description because its an interface and can not be serialized without any instance creator. if(aClass.equals(CommandDescription.class)) { return true; } return false; } }).create(); this.jsonParser = new JsonParser(); this.restClient = ClientBuilder.newClient(); this.restTarget = restClient.target(JPService.getProperty(JPOpenHABURI.class).getValue().resolve(SEPARATOR + REST_TARGET)); this.setConnectState(State.CONNECTING); } catch (JPNotAvailableException ex) { throw new InstantiationException(this, ex); } } private boolean isTargetReachable() { try { testConnection(); } catch (CouldNotPerformException e) { if (e.getCause() instanceof ProcessingException) { return false; } } return true; } protected abstract void testConnection() throws CouldNotPerformException; public void waitForConnectionState(final ConnectionState.State connectionState, final long timeout, final TimeUnit timeUnit) throws InterruptedException { synchronized (connectionStateSyncLock) { while (getOpenhabConnectionState() != connectionState) { connectionStateSyncLock.wait(timeUnit.toMillis(timeout)); } } } public void waitForConnectionState(final ConnectionState.State connectionState) throws InterruptedException { synchronized (connectionStateSyncLock) { while (getOpenhabConnectionState() != connectionState) { connectionStateSyncLock.wait(); } } } private void setConnectState(final ConnectionState.State connectState) { synchronized (connectionStateSyncLock) { // filter non changing states if (connectState == this.openhabConnectionState) { return; } LOGGER.trace(""Openhab Connection State changed to: ""+connectState); // update state this.openhabConnectionState = connectState; // handle state change switch (connectState) { case CONNECTING: LOGGER.info(""Wait for openHAB...""); try { connectionTask = GlobalScheduledExecutorService.scheduleWithFixedDelay(() -> { if (isTargetReachable()) { // set connected setConnectState(State.CONNECTED); // cleanup own task connectionTask.cancel(false); } }, 0, 15, TimeUnit.SECONDS); } catch (NotAvailableException | RejectedExecutionException ex) { // if global executor service is not available we have no chance to connect. LOGGER.warn(""Wait for openHAB..."", ex); setConnectState(State.DISCONNECTED); } break; case CONNECTED: LOGGER.info(""Connection to OpenHAB established.""); initSSE(); break; case RECONNECTING: LOGGER.warn(""Connection to OpenHAB lost!""); resetConnection(); setConnectState(State.CONNECTING); break; case DISCONNECTED: LOGGER.info(""Connection to OpenHAB closed.""); resetConnection(); break; } // notify state change connectionStateSyncLock.notifyAll(); // apply next state if required switch (connectState) { case RECONNECTING: setConnectState(State.CONNECTING); break; } } } private void initSSE() { // activate sse source if not already done if (sseSource != null) { LOGGER.warn(""SSE already initialized!""); return; } final WebTarget webTarget = restTarget.path(EVENTS_TARGET); sseSource = SseEventSource.target(webTarget).reconnectingEvery(15, TimeUnit.SECONDS).build(); sseSource.open(); final Consumer evenConsumer = inboundSseEvent -> { // dispatch event try { final JsonObject payload = jsonParser.parse(inboundSseEvent.readData()).getAsJsonObject(); for (Entry> topicObserverEntry : topicObservableMap.entrySet()) { try { if (payload.get(TOPIC_KEY).getAsString().matches(topicObserverEntry.getKey())) { topicObserverEntry.getValue().notifyObservers(payload); } } catch (Exception ex) { ExceptionPrinter.printHistory(new CouldNotPerformException(""Could not notify listeners on topic["" + topicObserverEntry.getKey() + ""]"", ex), LOGGER); } } } catch (Exception ex) { ExceptionPrinter.printHistory(new CouldNotPerformException(""Could not handle SSE payload!"", ex), LOGGER); } }; final Consumer errorHandler = ex -> { ExceptionPrinter.printHistory(""Openhab connection error detected!"", ex, LOGGER, LogLevel.DEBUG); checkConnectionState(); }; final Runnable reconnectHandler = () -> { checkConnectionState(); }; sseSource.register(evenConsumer, errorHandler, reconnectHandler); } public State getOpenhabConnectionState() { return openhabConnectionState; } public void checkConnectionState() { synchronized (connectionStateSyncLock) { // only validate if connected if (!isConnected()) { return; } // if not reachable init a reconnect if (!isTargetReachable()) { setConnectState(State.RECONNECTING); } } } public boolean isConnected() { return getOpenhabConnectionState() == State.CONNECTED; } public void addSSEObserver(Observer observer) { addSSEObserver(observer, """"); } public void addSSEObserver(final Observer observer, final String topicRegex) { synchronized (topicObservableMapLock) { if (topicObservableMap.containsKey(topicRegex)) { topicObservableMap.get(topicRegex).addObserver(observer); return; } final ObservableImpl observable = new ObservableImpl<>(this); observable.addObserver(observer); topicObservableMap.put(topicRegex, observable); } } public void removeSSEObserver(Observer observer) { removeSSEObserver(observer, """"); } public void removeSSEObserver(Observer observer, final String topicFilter) { synchronized (topicObservableMapLock) { if (topicObservableMap.containsKey(topicFilter)) { topicObservableMap.get(topicFilter).removeObserver(observer); } } } private void resetConnection() { // cancel ongoing connection task if (!connectionTask.isDone()) { connectionTask.cancel(false); } // close sse if (sseSource != null) { sseSource.close(); sseSource = null; } } public void validateConnection() throws CouldNotPerformException { if (!isConnected()) { throw new InvalidStateException(""Openhab not reachable yet!""); } } private String validateResponse(final Response response) throws CouldNotPerformException, ProcessingException { return validateResponse(response, false); } private String validateResponse(final Response response, final boolean skipConnectionValidation) throws CouldNotPerformException, ProcessingException { final String result = response.readEntity(String.class); if (response.getStatus() == 200 || response.getStatus() == 201 || response.getStatus() == 202) { return result; } else if (response.getStatus() == 404) { if (!skipConnectionValidation) { checkConnectionState(); } throw new NotAvailableException(""URL""); } else if (response.getStatus() == 503) { if (!skipConnectionValidation) { checkConnectionState(); } // throw a processing exception to indicate that openHAB is still not fully started, this is used to wait for openHAB throw new ProcessingException(""OpenHAB server not ready""); } else { throw new CouldNotPerformException(""Response returned with ErrorCode["" + response.getStatus() + ""], Result["" + result + ""] and ErrorMessage["" + response.getStatusInfo().getReasonPhrase() + ""]""); } } protected String get(final String target) throws CouldNotPerformException { return get(target, false); } protected String get(final String target, final boolean skipValidation) throws CouldNotPerformException { try { // handle validation if (!skipValidation) { validateConnection(); } final WebTarget webTarget = restTarget.path(target); final Response response = webTarget.request().get(); return validateResponse(response, skipValidation); } catch (CouldNotPerformException | ProcessingException ex) { if (isShutdownInitiated()) { ExceptionProcessor.setInitialCause(ex, new ShutdownInProgressException(this)); } throw new CouldNotPerformException(""Could not get sub-URL["" + target + ""]"", ex); } } protected String delete(final String target) throws CouldNotPerformException { try { validateConnection(); final WebTarget webTarget = restTarget.path(target); final Response response = webTarget.request().delete(); return validateResponse(response); } catch (CouldNotPerformException | ProcessingException ex) { if (isShutdownInitiated()) { ExceptionProcessor.setInitialCause(ex, new ShutdownInProgressException(this)); } throw new CouldNotPerformException(""Could not delete sub-URL["" + target + ""]"", ex); } } protected String putJson(final String target, final Object value) throws CouldNotPerformException { return put(target, gson.toJson(value), MediaType.APPLICATION_JSON_TYPE); } protected String put(final String target, final String value, final MediaType mediaType) throws CouldNotPerformException { try { validateConnection(); final WebTarget webTarget = restTarget.path(target); final Response response = webTarget.request().put(Entity.entity(value, mediaType)); return validateResponse(response); } catch (CouldNotPerformException | ProcessingException ex) { if (isShutdownInitiated()) { ExceptionProcessor.setInitialCause(ex, new ShutdownInProgressException(this)); } throw new CouldNotPerformException(""Could not put value["" + value + ""] on sub-URL["" + target + ""]"", ex); } } protected String postJson(final String target, final Object value) throws CouldNotPerformException { return post(target, gson.toJson(value), MediaType.APPLICATION_JSON_TYPE); } protected String post(final String target, final String value, final MediaType mediaType) throws CouldNotPerformException { try { validateConnection(); final WebTarget webTarget = restTarget.path(target); final Response response = webTarget.request().post(Entity.entity(value, mediaType)); return validateResponse(response); } catch (CouldNotPerformException | ProcessingException ex) { if (isShutdownInitiated()) { ExceptionProcessor.setInitialCause(ex, new ShutdownInProgressException(this)); } throw new CouldNotPerformException(""Could not post Value["" + value + ""] of MediaType["" + mediaType + ""] on sub-URL["" + target + ""]"", ex); } } public boolean isShutdownInitiated() { return shutdownInitiated; } @Override public void shutdown() { // prepare shutdown shutdownInitiated = true; setConnectState(State.DISCONNECTED); // stop rest service restClient.close(); // stop sse service synchronized (topicObservableMapLock) { for (final Observable jsonObjectObservable : topicObservableMap.values()) { jsonObjectObservable.shutdown(); } topicObservableMap.clear(); resetConnection(); } } } ",0 "or Coco/R, Copyright (c) 1990, 2004 Hanspeter Moessenboeck, University of Linz extended by M. Loeberbauer & A. Woess, Univ. of Linz with improvements by Pat Terry, Rhodes University. ported to C by Charles Wang This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As an exception, it is allowed to write an extension of Coco/R that is used as a plugin in non-free software. If not otherwise stated, any source code generated by Coco/R (other than Coco/R itself) does not fall under the GNU General Public License. -------------------------------------------------------------------------*/ /*---- enable ----*/ #ifndef COCO_CcsXmlParser_H #define COCO_CcsXmlParser_H #ifndef COCO_ERRORPOOL_H #include ""c/ErrorPool.h"" #endif #ifndef COCO_CcsXmlScanner_H #include ""Scanner.h"" #endif /*---- hIncludes ----*/ #ifndef COCO_GLOBALS_H #include ""Globals.h"" #endif /*---- enable ----*/ EXTC_BEGIN /*---- SynDefines ----*/ #define CcsXmlParser_WEAK_USED /*---- enable ----*/ typedef struct CcsXmlParser_s CcsXmlParser_t; struct CcsXmlParser_s { CcsErrorPool_t errpool; CcsXmlScanner_t scanner; CcsToken_t * t; CcsToken_t * la; int maxT; /*---- members ----*/ CcGlobals_t globals; /* Shortcut pointers */ CcSymbolTable_t * symtab; CcXmlSpecMap_t * xmlspecmap; CcSyntax_t * syntax; /*---- enable ----*/ }; CcsXmlParser_t * CcsXmlParser(CcsXmlParser_t * self, FILE * infp, FILE * errfp); CcsXmlParser_t * CcsXmlParser_ByName(CcsXmlParser_t * self, const char * infn, FILE * errfp); void CcsXmlParser_Destruct(CcsXmlParser_t * self); void CcsXmlParser_Parse(CcsXmlParser_t * self); void CcsXmlParser_SemErr(CcsXmlParser_t * self, const CcsToken_t * token, const char * format, ...); void CcsXmlParser_SemErrT(CcsXmlParser_t * self, const char * format, ...); EXTC_END #endif /* COCO_PARSER_H */ ",0 """ rel=""stylesheet"">

        metamachine

        v.0.03
        Liebe
        Glück
        Tradition
        Abenteuer
        Perfektion


          ",0 "rg) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * @link https://cakephp.org CakePHP(tm) Project * @since 3.3.4 * @license https://opensource.org/licenses/mit-license.php MIT License */ namespace App\Controller; use Cake\Event\Event; /** * Error Handling Controller * * Controller used by ExceptionRenderer to render error responses. */ class ErrorController extends AppController { /** * Initialization hook method. * * @return void */ public function initialize() { $this->loadComponent('RequestHandler', [ 'enableBeforeRedirect' => false, ]); } /** * beforeFilter callback. * * @param \Cake\Event\Event $event Event. * @return \Cake\Http\Response|null|void */ public function beforeFilter(Event $event) { } /** * beforeRender callback. * * @param \Cake\Event\Event $event Event. * @return \Cake\Http\Response|null|void */ public function beforeRender(Event $event) { parent::beforeRender($event); $this->viewBuilder()->setTemplatePath('Error'); } /** * afterFilter callback. * * @param \Cake\Event\Event $event Event. * @return \Cake\Http\Response|null|void */ public function afterFilter(Event $event) { } } ",0 "--------------------------------------------------------- * CollectiveAccess * Open-source collections management software * ---------------------------------------------------------------------- * * Software by Whirl-i-Gig (http://www.whirl-i-gig.com) * Copyright 2009-2010 Whirl-i-Gig * * For more information visit http://www.CollectiveAccess.org * * This program is free software; you may redistribute it and/or modify it under * the terms of the provided license as published by Whirl-i-Gig * * CollectiveAccess is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * This source code is free and modifiable under the terms of * GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See * the ""license.txt"" file for details, or visit the CollectiveAccess web site at * http://www.CollectiveAccess.org * * ---------------------------------------------------------------------- */ $va_facets = $this->getVar('available_facets'); $va_facets_with_content = $this->getVar('facets_with_content'); $va_facet_info = $this->getVar('facet_info'); $va_criteria = is_array($this->getVar('criteria')) ? $this->getVar('criteria') : array(); $va_results = $this->getVar('result'); $vs_browse_ui_style = $this->request->config->get('browse_ui_style'); $vs_browse_target = $this->getVar('target'); ?>
          getVar('browse_selector'); ?>
          $va_row_ids) { foreach($va_row_ids as $vn_row_id => $vs_label) { $vs_facet_label = (isset($va_facet_info[$vs_facet_name]['label_singular'])) ? unicode_ucfirst($va_facet_info[$vs_facet_name]['label_singular']) : '???'; ?>
          :
          {$vs_label}"".caNavLink($this->request, 'x', 'close', '', 'Browse', 'removeCriteria', array('facet' => $vs_facet_name, 'id' => $vn_row_id)).""
          \n""; ?>
          with
          px;"">
          Refine results by:
          getVar('available_facets'); foreach($va_available_facets as $vs_facet_code => $va_facet_info) { print ""\n""; } ?>
          or request, _t('start over'), '', '', 'Browse', 'clearCriteria', array()); ?>
          px;"">
          px;"">
          request, _t('start over'), '', '', 'Browse', 'clearCriteria', array()); ?>
          px;"">
          Start browsing by:
          getVar('available_facets'); foreach($va_available_facets as $vs_facet_code => $va_facet_info) { print ""\n""; } ?>
          render('Browse/browse_start_html.php'); } else { print ($vs_paging_controls = $this->render('Results/paging_controls_html.php')); print $this->render('Search/search_controls_html.php'); print ""
          ""; print $this->render('Results/'.$vs_browse_target.'_results_'.$this->getVar('current_view').'_html.php'); print ""
          ""; } ?>
           
          ",0 "These values are overwritten on a per-injection basis by the injector. */ /* Must not be defined as consts, or the compiler will optimize them. */ struct dyld_all_image_infos *dyld_info = (typeof(dyld_info)) DYLD_MAGIC_32; char argument[ARGUMENT_MAX_LENGTH] = ARGUMENT_MAGIC_STR; /* The interrupt calling convention does not save the flags register, so we use these ASM functions to save and restore it outselves. They must be called as early and as late as possible, respectively, so instructions that modify flags won't destory the state. */ uint32_t get_flags(void); /* Use fastcall for set_flags, parameters on registers are easier to work with. */ __attribute__((fastcall)) void set_flags(uint32_t); __asm__ ( ""_get_flags: \n"" "" pushfd \n"" "" pop %eax \n"" "" ret \n"" ""_set_flags: \n"" "" push %ecx \n"" "" popfd \n"" "" ret \n"" ); static const struct mach_header *get_header_by_path(const char *name) { for (unsigned i = 0; i < dyld_info->infoArrayCount; i++) { if (strcmp(dyld_info->infoArray[i].imageFilePath, name) == 0) { return (const struct mach_header *) dyld_info->infoArray[i].imageLoadAddress; } } return NULL; } static const void *get_symbol_from_header(const struct mach_header *header, const char *symbol) { if (!header) { return NULL; } /* Get the required commands */ const struct symtab_command *symtab = NULL; const struct segment_command *first = NULL; const struct segment_command *linkedit = NULL; const struct load_command *cmd = (typeof(cmd))(header + 1); for (unsigned i = 0; i < header->ncmds; i++, cmd = (typeof(cmd)) ((char*) cmd + cmd->cmdsize)) { if (cmd->cmd == LC_SEGMENT) { if (!first && ((typeof(first))cmd)->filesize ) { first = (typeof(first)) cmd; } if (strcmp(((typeof(linkedit)) cmd)->segname, ""__LINKEDIT"") == 0) { linkedit = (typeof(linkedit)) cmd; } } else if (cmd->cmd == LC_SYMTAB) { symtab = (typeof (symtab)) cmd; } if (symtab && linkedit) break; } if (!symtab || !linkedit) return NULL; const char *string_table = ((const char *) header + symtab->stroff - linkedit->fileoff + linkedit->vmaddr - first->vmaddr); const struct nlist *symbols = (typeof (symbols)) ((const char *) header + symtab->symoff - linkedit->fileoff + linkedit->vmaddr - first->vmaddr); for (unsigned i = 0; i < symtab->nsyms; i++) { if (strcmp(string_table + symbols[i].n_un.n_strx, symbol) == 0) { return (char *)header + symbols[i].n_value - first->vmaddr; } } return NULL; } void _entry() { uint32_t flags = get_flags(); typeof(dlopen) *$dlopen = NULL; /* We can't call dyld`dlopen when dyld3 is being used, so we must find libdyld`dlopen and call that instead */ $dlopen = get_symbol_from_header(get_header_by_path(""/usr/lib/system/libdyld.dylib""), ""_dlopen""); if ($dlopen) { $dlopen(argument, RTLD_NOW); } set_flags(flags); } /* Clang on x86-32 does not support the preserve_all convention. Instead, we use * the interrupt attribute. The Makefile takes care of replacing iret with ret. Additionally, Clang sometimes stores xmm7 on an unaligned address and crashes, and since LLVM's bug tracker has been down for ages, the Makefile fixes that as well. -_- */ void __attribute__((interrupt)) entry(void * __attribute__((unused)) unused) { _entry(); } /* Taken from Apple's libc */ int strcmp(s1, s2) const char *s1, *s2; { while (*s1 == *s2++) if (*s1++ == 0) return (0); return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); } ",0 "th or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include ""config.h"" #endif /*#define USE_SMALLFT*/ #define USE_KISS_FFT #include ""misc.h"" #define MAX_FFT_SIZE 2048 #ifdef FIXED_POINT static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t bound, int len) { int i, shift; spx_word16_t max_val = 0; for (i=0;imax_val) max_val = in[i]; if (-in[i]>max_val) max_val = -in[i]; } shift=0; while (max_val <= (bound>>1) && max_val != 0) { max_val <<= 1; shift++; } for (i=0;i> shift; } } #endif #ifdef USE_SMALLFT #include ""smallft.h"" #include void *spx_fft_init(int size) { struct drft_lookup *table; table = speex_alloc(sizeof(struct drft_lookup)); spx_drft_init((struct drft_lookup *)table, size); return (void*)table; } void spx_fft_destroy(void *table) { spx_drft_clear(table); speex_free(table); } void spx_fft(void *table, float *in, float *out) { if (in==out) { int i; speex_warning(""FFT should not be done in-place""); float scale = 1./((struct drft_lookup *)table)->n; for (i=0;i<((struct drft_lookup *)table)->n;i++) out[i] = scale*in[i]; } else { int i; float scale = 1./((struct drft_lookup *)table)->n; for (i=0;i<((struct drft_lookup *)table)->n;i++) out[i] = scale*in[i]; } spx_drft_forward((struct drft_lookup *)table, out); } void spx_ifft(void *table, float *in, float *out) { if (in==out) { int i; speex_warning(""FFT should not be done in-place""); } else { int i; for (i=0;i<((struct drft_lookup *)table)->n;i++) out[i] = in[i]; } spx_drft_backward((struct drft_lookup *)table, out); } #elif defined(USE_KISS_FFT) #include ""kiss_fftr.h"" #include ""kiss_fft.h"" struct kiss_config { kiss_fftr_cfg forward; kiss_fftr_cfg backward; kiss_fft_cpx *freq_data; int N; }; void *spx_fft_init(int size) { struct kiss_config *table; table = (struct kiss_config*)speex_alloc(sizeof(struct kiss_config)); table->freq_data = (kiss_fft_cpx*)speex_alloc(sizeof(kiss_fft_cpx)*((size>>1)+1)); table->forward = kiss_fftr_alloc(size,0,NULL,NULL); table->backward = kiss_fftr_alloc(size,1,NULL,NULL); table->N = size; return table; } void spx_fft_destroy(void *table) { struct kiss_config *t = (struct kiss_config *)table; kiss_fftr_free(t->forward); kiss_fftr_free(t->backward); speex_free(t->freq_data); speex_free(table); } #ifdef FIXED_POINT void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out) { int i; int shift; struct kiss_config *t = (struct kiss_config *)table; shift = maximize_range(in, in, 32000, t->N); kiss_fftr(t->forward, in, t->freq_data); out[0] = t->freq_data[0].r; for (i=1;iN>>1;i++) { out[(i<<1)-1] = t->freq_data[i].r; out[(i<<1)] = t->freq_data[i].i; } out[(i<<1)-1] = t->freq_data[i].r; renorm_range(in, in, shift, t->N); renorm_range(out, out, shift, t->N); } #else void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out) { int i; float scale; struct kiss_config *t = (struct kiss_config *)table; scale = 1./t->N; kiss_fftr(t->forward, in, t->freq_data); out[0] = scale*t->freq_data[0].r; for (i=1;iN>>1;i++) { out[(i<<1)-1] = scale*t->freq_data[i].r; out[(i<<1)] = scale*t->freq_data[i].i; } out[(i<<1)-1] = scale*t->freq_data[i].r; } #endif void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out) { int i; struct kiss_config *t = (struct kiss_config *)table; t->freq_data[0].r = in[0]; t->freq_data[0].i = 0; for (i=1;iN>>1;i++) { t->freq_data[i].r = in[(i<<1)-1]; t->freq_data[i].i = in[(i<<1)]; } t->freq_data[i].r = in[(i<<1)-1]; t->freq_data[i].i = 0; kiss_fftri(t->backward, t->freq_data, out); } #else #error No other FFT implemented #endif #ifdef FIXED_POINT /*#include ""smallft.h""*/ void spx_fft_float(void *table, float *in, float *out) { int i; #ifdef USE_SMALLFT int N = ((struct drft_lookup *)table)->n; #elif defined(USE_KISS_FFT) int N = ((struct kiss_config *)table)->N; #else #endif #ifdef VAR_ARRAYS spx_word16_t _in[N]; spx_word16_t _out[N]; #else spx_word16_t _in[MAX_FFT_SIZE]; spx_word16_t _out[MAX_FFT_SIZE]; #endif for (i=0;iN); scale = 1./((struct kiss_config *)table)->N; for (i=0;i<((struct kiss_config *)table)->N;i++) out[i] = scale*in[i]; spx_drft_forward(&t, out); spx_drft_clear(&t); } #endif } void spx_ifft_float(void *table, float *in, float *out) { int i; #ifdef USE_SMALLFT int N = ((struct drft_lookup *)table)->n; #elif defined(USE_KISS_FFT) int N = ((struct kiss_config *)table)->N; #else #endif #ifdef VAR_ARRAYS spx_word16_t _in[N]; spx_word16_t _out[N]; #else spx_word16_t _in[MAX_FFT_SIZE]; spx_word16_t _out[MAX_FFT_SIZE]; #endif for (i=0;iN); for (i=0;i<((struct kiss_config *)table)->N;i++) out[i] = in[i]; spx_drft_backward(&t, out); spx_drft_clear(&t); } #endif } #else void spx_fft_float(void *table, float *in, float *out) { spx_fft(table, in, out); } void spx_ifft_float(void *table, float *in, float *out) { spx_ifft(table, in, out); } #endif ",0 "javadoc (build 1.6.0_33) on Fri Jul 13 11:10:51 CEST 2012 --> Sample
          Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
           PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
          SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

          converter
          Class Sample

          java.lang.Object
            converter.Sample
          

          public class Sample
          extends java.lang.Object


          Constructor Summary
          Sample()
                     
           
          Method Summary
           void convertFromTigerXmlToFramenet()
                     
           
          Methods inherited from class java.lang.Object
          equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
           

          Constructor Detail

          Sample

          public Sample()
          Method Detail

          convertFromTigerXmlToFramenet

          public void convertFromTigerXmlToFramenet()

          Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
           PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
          SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

          ",0 " Platform (MARLO). * MARLO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * at your option) any later version. * MARLO is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with MARLO. If not, see . *****************************************************************/ package org.cgiar.ccafs.marlo.data.manager.impl; import org.cgiar.ccafs.marlo.data.dao.ReportSynthesisGovernanceDAO; import org.cgiar.ccafs.marlo.data.manager.ReportSynthesisGovernanceManager; import org.cgiar.ccafs.marlo.data.model.ReportSynthesisGovernance; import java.util.List; import javax.inject.Inject; import javax.inject.Named; /** * @author CCAFS */ @Named public class ReportSynthesisGovernanceManagerImpl implements ReportSynthesisGovernanceManager { private ReportSynthesisGovernanceDAO reportSynthesisGovernanceDAO; // Managers @Inject public ReportSynthesisGovernanceManagerImpl(ReportSynthesisGovernanceDAO reportSynthesisGovernanceDAO) { this.reportSynthesisGovernanceDAO = reportSynthesisGovernanceDAO; } @Override public void deleteReportSynthesisGovernance(long reportSynthesisGovernanceId) { reportSynthesisGovernanceDAO.deleteReportSynthesisGovernance(reportSynthesisGovernanceId); } @Override public boolean existReportSynthesisGovernance(long reportSynthesisGovernanceID) { return reportSynthesisGovernanceDAO.existReportSynthesisGovernance(reportSynthesisGovernanceID); } @Override public List findAll() { return reportSynthesisGovernanceDAO.findAll(); } @Override public ReportSynthesisGovernance getReportSynthesisGovernanceById(long reportSynthesisGovernanceID) { return reportSynthesisGovernanceDAO.find(reportSynthesisGovernanceID); } @Override public ReportSynthesisGovernance saveReportSynthesisGovernance(ReportSynthesisGovernance reportSynthesisGovernance) { return reportSynthesisGovernanceDAO.save(reportSynthesisGovernance); } } ",0 "E(""rsutils"") u8 acpi_rs_decode_bitmask(u16 mask, u8 * list) { u8 i; u8 bit_count; ACPI_FUNCTION_ENTRY(); /* Decode the mask bits */ for (i = 0, bit_count = 0; mask; i++) { if (mask & 0x0001) { list[bit_count] = i; bit_count++; } mask >>= 1; } return (bit_count); } u16 acpi_rs_encode_bitmask(u8 * list, u8 count) { u32 i; u16 mask; ACPI_FUNCTION_ENTRY(); /* Encode the list into a single bitmask */ for (i = 0, mask = 0; i < count; i++) { mask |= (0x1 << list[i]); } return mask; } void acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type) { u32 i; ACPI_FUNCTION_ENTRY(); /* One move per item */ for (i = 0; i < item_count; i++) { switch (move_type) { /* * For the 8-bit case, we can perform the move all at once * since there are no alignment or endian issues */ case ACPI_RSC_MOVE8: ACPI_MEMCPY(destination, source, item_count); return; /* * 16-, 32-, and 64-bit cases must use the move macros that perform * endian conversion and/or accomodate hardware that cannot perform * misaligned memory transfers */ case ACPI_RSC_MOVE16: ACPI_MOVE_16_TO_16(&ACPI_CAST_PTR(u16, destination)[i], &ACPI_CAST_PTR(u16, source)[i]); break; case ACPI_RSC_MOVE32: ACPI_MOVE_32_TO_32(&ACPI_CAST_PTR(u32, destination)[i], &ACPI_CAST_PTR(u32, source)[i]); break; case ACPI_RSC_MOVE64: ACPI_MOVE_64_TO_64(&ACPI_CAST_PTR(u64, destination)[i], &ACPI_CAST_PTR(u64, source)[i]); break; default: return; } } } void acpi_rs_set_resource_length(acpi_rsdesc_size total_length, union aml_resource *aml) { acpi_rs_length resource_length; ACPI_FUNCTION_ENTRY(); /* Length is the total descriptor length minus the header length */ resource_length = (acpi_rs_length) (total_length - acpi_ut_get_resource_header_length(aml)); /* Length is stored differently for large and small descriptors */ if (aml->small_header.descriptor_type & ACPI_RESOURCE_NAME_LARGE) { /* Large descriptor -- bytes 1-2 contain the 16-bit length */ ACPI_MOVE_16_TO_16(&aml->large_header.resource_length, &resource_length); } else { /* Small descriptor -- bits 2:0 of byte 0 contain the length */ aml->small_header.descriptor_type = (u8) /* Clear any existing length, preserving descriptor type bits */ ((aml->small_header. descriptor_type & ~ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK) | resource_length); } } void acpi_rs_set_resource_header(u8 descriptor_type, acpi_rsdesc_size total_length, union aml_resource *aml) { ACPI_FUNCTION_ENTRY(); /* Set the Resource Type */ aml->small_header.descriptor_type = descriptor_type; /* Set the Resource Length */ acpi_rs_set_resource_length(total_length, aml); } static u16 acpi_rs_strcpy(char *destination, char *source) { u16 i; ACPI_FUNCTION_ENTRY(); for (i = 0; source[i]; i++) { destination[i] = source[i]; } destination[i] = 0; /* Return string length including the NULL terminator */ return ((u16) (i + 1)); } acpi_rs_length acpi_rs_get_resource_source(acpi_rs_length resource_length, acpi_rs_length minimum_length, struct acpi_resource_source * resource_source, union aml_resource * aml, char *string_ptr) { acpi_rsdesc_size total_length; u8 *aml_resource_source; ACPI_FUNCTION_ENTRY(); total_length = resource_length + sizeof(struct aml_resource_large_header); aml_resource_source = ACPI_ADD_PTR(u8, aml, minimum_length); /* * resource_source is present if the length of the descriptor is longer than * the minimum length. * * Note: Some resource descriptors will have an additional null, so * we add 1 to the minimum length. */ if (total_length > (acpi_rsdesc_size) (minimum_length + 1)) { /* Get the resource_source_index */ resource_source->index = aml_resource_source[0]; resource_source->string_ptr = string_ptr; if (!string_ptr) { /* * String destination pointer is not specified; Set the String * pointer to the end of the current resource_source structure. */ resource_source->string_ptr = ACPI_ADD_PTR(char, resource_source, sizeof(struct acpi_resource_source)); } /* * In order for the Resource length to be a multiple of the native * word, calculate the length of the string (+1 for NULL terminator) * and expand to the next word multiple. * * Zero the entire area of the buffer. */ total_length = (u32) ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) + 1; total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length); ACPI_MEMSET(resource_source->string_ptr, 0, total_length); /* Copy the resource_source string to the destination */ resource_source->string_length = acpi_rs_strcpy(resource_source->string_ptr, ACPI_CAST_PTR(char, &aml_resource_source[1])); return ((acpi_rs_length) total_length); } /* resource_source is not present */ resource_source->index = 0; resource_source->string_length = 0; resource_source->string_ptr = NULL; return (0); } acpi_rsdesc_size acpi_rs_set_resource_source(union aml_resource * aml, acpi_rs_length minimum_length, struct acpi_resource_source * resource_source) { u8 *aml_resource_source; acpi_rsdesc_size descriptor_length; ACPI_FUNCTION_ENTRY(); descriptor_length = minimum_length; /* Non-zero string length indicates presence of a resource_source */ if (resource_source->string_length) { /* Point to the end of the AML descriptor */ aml_resource_source = ACPI_ADD_PTR(u8, aml, minimum_length); /* Copy the resource_source_index */ aml_resource_source[0] = (u8) resource_source->index; /* Copy the resource_source string */ ACPI_STRCPY(ACPI_CAST_PTR(char, &aml_resource_source[1]), resource_source->string_ptr); /* * Add the length of the string (+ 1 for null terminator) to the * final descriptor length */ descriptor_length += ((acpi_rsdesc_size) resource_source->string_length + 1); } /* Return the new total length of the AML descriptor */ return (descriptor_length); } acpi_status acpi_rs_get_prt_method_data(struct acpi_namespace_node * node, struct acpi_buffer * ret_buffer) { union acpi_operand_object *obj_desc; acpi_status status; ACPI_FUNCTION_TRACE(rs_get_prt_method_data); /* Parameters guaranteed valid by caller */ /* Execute the method, no parameters */ status = acpi_ut_evaluate_object(node, METHOD_NAME__PRT, ACPI_BTYPE_PACKAGE, &obj_desc); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* * Create a resource linked list from the byte stream buffer that comes * back from the _CRS method execution. */ status = acpi_rs_create_pci_routing_table(obj_desc, ret_buffer); /* On exit, we must delete the object returned by evaluate_object */ acpi_ut_remove_reference(obj_desc); return_ACPI_STATUS(status); } acpi_status acpi_rs_get_crs_method_data(struct acpi_namespace_node *node, struct acpi_buffer *ret_buffer) { union acpi_operand_object *obj_desc; acpi_status status; ACPI_FUNCTION_TRACE(rs_get_crs_method_data); /* Parameters guaranteed valid by caller */ /* Execute the method, no parameters */ status = acpi_ut_evaluate_object(node, METHOD_NAME__CRS, ACPI_BTYPE_BUFFER, &obj_desc); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* * Make the call to create a resource linked list from the * byte stream buffer that comes back from the _CRS method * execution. */ status = acpi_rs_create_resource_list(obj_desc, ret_buffer); /* On exit, we must delete the object returned by evaluate_object */ acpi_ut_remove_reference(obj_desc); return_ACPI_STATUS(status); } #ifdef ACPI_FUTURE_USAGE acpi_status acpi_rs_get_prs_method_data(struct acpi_namespace_node *node, struct acpi_buffer *ret_buffer) { union acpi_operand_object *obj_desc; acpi_status status; ACPI_FUNCTION_TRACE(rs_get_prs_method_data); /* Parameters guaranteed valid by caller */ /* Execute the method, no parameters */ status = acpi_ut_evaluate_object(node, METHOD_NAME__PRS, ACPI_BTYPE_BUFFER, &obj_desc); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* * Make the call to create a resource linked list from the * byte stream buffer that comes back from the _CRS method * execution. */ status = acpi_rs_create_resource_list(obj_desc, ret_buffer); /* On exit, we must delete the object returned by evaluate_object */ acpi_ut_remove_reference(obj_desc); return_ACPI_STATUS(status); } #endif /* ACPI_FUTURE_USAGE */ acpi_status acpi_rs_get_method_data(acpi_handle handle, char *path, struct acpi_buffer *ret_buffer) { union acpi_operand_object *obj_desc; acpi_status status; ACPI_FUNCTION_TRACE(rs_get_method_data); /* Parameters guaranteed valid by caller */ /* Execute the method, no parameters */ status = acpi_ut_evaluate_object(handle, path, ACPI_BTYPE_BUFFER, &obj_desc); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* * Make the call to create a resource linked list from the * byte stream buffer that comes back from the method * execution. */ status = acpi_rs_create_resource_list(obj_desc, ret_buffer); /* On exit, we must delete the object returned by evaluate_object */ acpi_ut_remove_reference(obj_desc); return_ACPI_STATUS(status); } acpi_status acpi_rs_set_srs_method_data(struct acpi_namespace_node *node, struct acpi_buffer *in_buffer) { struct acpi_evaluate_info *info; union acpi_operand_object *args[2]; acpi_status status; struct acpi_buffer buffer; ACPI_FUNCTION_TRACE(rs_set_srs_method_data); /* Allocate and initialize the evaluation information block */ info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); if (!info) { return_ACPI_STATUS(AE_NO_MEMORY); } info->prefix_node = node; info->pathname = METHOD_NAME__SRS; info->parameters = args; info->flags = ACPI_IGNORE_RETURN_VALUE; /* * The in_buffer parameter will point to a linked list of * resource parameters. It needs to be formatted into a * byte stream to be sent in as an input parameter to _SRS * * Convert the linked list into a byte stream */ buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; status = acpi_rs_create_aml_resources(in_buffer->pointer, &buffer); if (ACPI_FAILURE(status)) { goto cleanup; } /* Create and initialize the method parameter object */ args[0] = acpi_ut_create_internal_object(ACPI_TYPE_BUFFER); if (!args[0]) { /* * Must free the buffer allocated above (otherwise it is freed * later) */ ACPI_FREE(buffer.pointer); status = AE_NO_MEMORY; goto cleanup; } args[0]->buffer.length = (u32) buffer.length; args[0]->buffer.pointer = buffer.pointer; args[0]->common.flags = AOPOBJ_DATA_VALID; args[1] = NULL; /* Execute the method, no return value is expected */ status = acpi_ns_evaluate(info); /* Clean up and return the status from acpi_ns_evaluate */ acpi_ut_remove_reference(args[0]); cleanup: ACPI_FREE(info); return_ACPI_STATUS(status); } ",0 "9-1""> Modify Files for Building Images

          Modify FW.C for all three Images


          The Cypress FW.C file requires only minor modifications, in order to work with the JSR80 javax.USB TCK implementation.

          The modifications necessary for the FW.C file are identical for all three Images (BULKINT, ISODCP, TOPOLOGY), so these instructions will explain how to modify the FW.C file currently located in the BULKINT subdirectory. Following the modifications to the copy of the FW.C file in the BULKINT subdirectory, that file should be copied into the ISODCP and TOPOLOGY subdirectories, overwriting the previous versions of FW.C located in those two subdirectories.

          Please navigate first to the FW.C file that is located (following completion of step 1 of the ""Steps to Build EEPROM Images"") in the subdirectory C:\TCK\BULKINT.

          Now, follow the steps listed below to add the necessary lines to FW.C.

          Steps to Modify FW.C:

          1. The location for the new code in the FW.C module can be found by traversing the path listed below down to the ""if"" block in which the code changes will be made.
            Start in function ""void SetupCommand(void)""
               -> switch(SETUPDAT[1])
                  -> case SC_GET_DESCRIPTOR:
                     -> if(DR_GetDescriptor())
                        -> switch(SETUPDAT[3])
                           -> case GD_STRING:
                              -> if(dscr_ptr = (void *)EZUSB_GetStringDscr(SETUPDAT[2]))
          2. Add the following local variable right after the other local variables in this ""if"" block:
            WORD wLength;
          3. Then, delete the 2 lines listed below that appear after the line ""len = sdp->length;"":
            if (len > SETUPDAT[6])
                    len = SETUPDAT[6];
          4. Next, add the following lines after the line ""len = sdp->length;"":
            //A string descriptor length is limited to a byte
            //section 9.6.5 of USB spec 1.1.
            //However, wLength of a standard request is two bytes.
            //The host can ask for up to 0xFFFF bytes and the device
            //will return what is available.
            //Code was modified to read the high byte, SETUPDAT[7]
            //the wLength specified in the request (section 9.4.3
            //USB spec 1.1 )
            wLength= SETUPDAT[7]<< 8;
            wLength = wLength + SETUPDAT[6];

            if (wLength > 255)
                    wLength = 255;

            if ((WORD)len > wLength)
                    len = (BYTE) wLength; //limit to the requested length
          5. Finally, this modified FW.C file should be copied into the ISODCP (C:\TCK\ISODCP) and TOPOLOGY (C:\TCK\TOPOLOGY) subdirectories. This action will replace the FW.C files that were in those two subdirectories. Following this step, the FW.C files should be identical in the BULKINT, ISODCP and TOPOLOGY subdirectories.


            Author: TCK Team



            ",0 "href=""../css/analysis.css"" />

            Izveidot skata aizsegumus


            Skata aizseguma izveides rīks veido apgabalus, kuros novērotājs var redzēt uz zemes esošus objektus. Ievades novērošanas punkti var apzīmēt vai nu novērotājus (piemēram, cilvēkus, kas stāv uz zemes vai ugunsgrēku novērošanas tornī), vai novērotos objektus (piemēram, vējturbīnas, ūdenstorņus, transportlīdzekļus vai citus cilvēkus). Rezultātu apgabali ir tādi apgabali, kuros novērotāji var redzēt novērotos objektus, un pretēji — novērotie objekti var redzēt novērotājus.

            Gan novērotāji, gan novērotie objekti var atrasties virs zemes, un šis augstums virs zemes tiek izmantots, lai noteiktu redzamību. Piemēram, skata aizsegums, kas tiek aprēķināts 400 pēdu augstām vējturbīnām un 6 pēdas gariem cilvēkiem, kas stāv uz zemes, parasti būs lielāks nekā skata aizsegums, kas aprēķināts 200 pēdu augstām vējturbīnām un 6 pēdas gariem cilvēkiem.

            Ņemiet vērā, ka skata aizseguma aprēķinos netiek ņemti vērā tādi šķēršļi kā koki un celtnes. Varat pieņemt, ka aprēķini tiek veikti tukšā vietā, kur nav nekā cita kā tikai novērotājs un novērotie objekti.

            Rezultāta slānis satur apgabala elementus, kas apzīmē redzamos apgabalus. Laukā biežums tiek reģistrēts novērošanas punktu skaits, no kuriem var redzēt katru no apgabaliem. Piemēram, ja jums ir pieci ievades punkti, kas visi apzīmē ugunsgrēku novērošanas torņus, laukā Biežums būs vērtības no “1” līdz “5”; apgabali ar vērtību “1” būs redzami tikai no viena torņa, un apgabali ar vērtību “5” būs redzami no visiem torņiem. Rezultāta slānis satur arī lauku DEMResolution, kurā tiek reģistrēta digitālās evolūcijas modeļa (DEM) izšķirtspēja, kas tiek izmantota, lai veidotu skata aizsegumus.

            Ja ir atzīmēta iespēja Izmantot pašreizējo kartes apmēru, tad tiks analizēti tikai tie novērošanas punkti, kas ir redzami pašreizējā kartes skatā. Ja iespēja nav atzīmēta, tiks analizēti visi ievades slāņa novērošanas punkti — arī tie, kas atrodas ārpus pašreizējā kartes pārklājuma.

            Punkta elementi, kas pārstāv novērotāja vietas


            Punkta elementi, kas jāizmanto kā novērotāja vietas.

            Papildus slāņa izvēlei no kartes nolaižamā saraksta apakšā varat atlasīt Izvēlēties Living Atlas analīzes slāni vai Izvēlēties analīzes slāni. Tādējādi tiek atvērta galerija, kurā apskatāmi dažādi analīzes slāņi.

            Novērotāja vietu augstums


            Šis ir jūsu novērotāja vietu augstums virs zemes. Noklusējums ir aptuvenais vidējais cilvēka garums.

            Citu objektu, kas atrodas uz zemes, augstums


            Šis ir uz zemes esošu celtņu vai cilvēku augstums, kas tiek izmantots, lai noteiktu redzamību. Rezultātā iegūtais skata aizsegums ir tie apgabali, kuros no novērošanas punkta var redzēt šos citus objektus. Ir pareizs arī pretējais apgalvojums — šie citi objekti var redzēt novērošanas punktu.

            • Ja novērošanas punkti apzīmē vējturbīnas un jūs vēlaties noteikt, kurā vietā uz zemes cilvēki var redzēt šīs turbīnas, ievadiet vidējo cilvēka garumu (apmēram 6 pēdas). Rezultāts ir tie apgabali, kuros cilvēks stāvot uz zemes var redzēt šīs vējturbīnas.
            • Ja novērošanas punkti apzīmē ugunsgrēku novērošanas torņus un jūs vēlaties noteikt, no kuriem novērošanas torņiem var redzēt dūmu grīstes 20 pēdu augstumā vai augstāk, ievadiet augstuma vērtību 20 pēdu. Rezultāts ir tie apgabali, kuros no ugunsgrēku novērošanas torņa var redzēt dūmu grīstes vismaz 20 pēdu augstumā.
            • Ja novērošanas punkti apzīmē ainavu skatu laukumus ceļa vai takas malā un jūs vēlaties noteikt, kur 400 pēdu augstas vai augstākas vējturbīnas var saskatīt, ievadiet augstuma vērtību 400 pēdu. Rezultāts ir tie apgabali, kuros cilvēks, kas stāv ainavas skatu laukumā, var redzēt vismaz 400 pēdu augstu vējturbīnu.
            • Ja novērošanas punkti apzīmē ainavu skatu laukumus un jūs vēlaties noteikt, cik lielu apgabalu uz zemes var redzēt cilvēki, kas stāv šajā skatu laukumā, ievadiet nulli. Rezultāts ir tie apgabali, ko var redzēt no ainavas skatu laukuma.

            Maksimālais skatīšanas attālums


            Šis ir attālums, kurā tiek pārtraukta redzamo apgabalu aprēķināšana. Tālāk par šo vietu nav zināms, vai novērošanas punkti un citi objekti var redzēt cits citu. Lielas vērtības palielina aprēķināšanas laiku. Maksimālā atļautā vērtība ir 31 jūdzes (50 kilometru).

            Rezultāta slāņa nosaukums


            Tas ir slāņa nosaukums, kas tiks izveidots lapā Mans saturs un pievienots kartei. Noklusējuma nosaukums ir balstīts uz rīka nosaukumu un ievades slāņa nosaukumu. Ja slānis jau pastāv, jums tiks lūgts norādīt citu nosaukumu.

            Lietojot iespēju Saglabāt rezultātu nolaižamajā sarakstlodziņā, jūs varat norādīt mapes nosaukumu sadaļā Mans saturs, kur tiks saglabāts rezultāts.

            ",0 "e TESTNGPPST_NS_START struct TestCaseRunner; struct TestHierarchySandboxRunnerImpl; struct TestHierarchySandboxRunner : public TestHierarchyRunner { TestHierarchySandboxRunner ( unsigned int maxCurrentProcess , TestCaseRunner*); ~TestHierarchySandboxRunner(); void run ( TestHierarchyHandler* , TestFixtureResultCollector*); private: TestHierarchySandboxRunnerImpl* This; }; TESTNGPPST_NS_END #endif ",0 "File(String path) throws IOException { StringBuilder stringBuilder = new StringBuilder(); try (InputStream is = this.getClass().getResourceAsStream(path); BufferedReader bfr = new BufferedReader(new InputStreamReader(is))) { String line = bfr.readLine(); while (line != null) { stringBuilder.append(line); line = bfr.readLine(); } } return stringBuilder.toString(); } public void writeFile(String path, String content) throws IOException { File file = new File(System.getProperty(""user.dir"") + File.separator + path); if (!file.exists()) { file.createNewFile(); } try (OutputStream os = new FileOutputStream(System.getProperty(""user.dir"")+ File.separator + path); BufferedWriter bfw = new BufferedWriter(new OutputStreamWriter(os))) { bfw.write(content); } } } ",0 "le for the terms of usage and distribution. */ #include #include #include #include ""thash_string.h"" #include ""tassert.h"" /**************************************************** * macros definition ****************************************************/ #define DEFAULT_TABLE_SIZE (16) #define REHASH_FACTOR (1.2) /**************************************************** * struct definition ****************************************************/ struct _thash_string { tuint32 table_size; /* rehash border */ tuint32 max_element_size; tuint32 element_count; thlist_head *head; }; /**************************************************** * static variable ****************************************************/ /**************************************************** * functions ****************************************************/ /** * @brief get string hash value * @param hash_string - hash table * @param key - string to hash * @return hash value */ static tuint32 t_hash_string_hash(const thash_string *hash_string, const char *key) { tuint32 hash_val = 0; while (*key != '\0') { hash_val = (hash_val << 5) + *key++; } return hash_val & (hash_string->table_size - 1); } /** * @brief round data to the nearest interger * @param data - data to round * @return nearest interger */ static tint tround(tdouble data) { if (data < 0) { return (tint)(data - 0.5); } else { return (tint)(data + 0.5); } } /** * @brief create new hash table * @param table_size - hash table size * @return if create success return hash table pointer otherwise return NULL */ static thash_string *t_hash_string_new_size(tuint32 table_size) { thash_string *hash = malloc(sizeof(thash_string)); if (NULL != hash) { hash->head = calloc(sizeof(thlist_head), table_size); if (NULL != hash->head) { hash->table_size = table_size; hash->element_count = 0; tuint32 i = 0; tdouble max_size = REHASH_FACTOR * hash->table_size; hash->max_element_size = tround(max_size); for (; i < table_size; ++i) { t_hlist_init_head(&hash->head[i]); } } else { free(hash); hash = NULL; } } return hash; } /** * @brief rehash old hash table to new hash table * @param hash_string - old hash table * @param table_size - new hash table size * @return if success new hash table pointer return and delete old hash table, * otherwise NULL return and no change to old hash table */ static thash_string *t_hash_string_rehash(thash_string *hash_string, tuint32 table_size) { if (table_size < DEFAULT_TABLE_SIZE) { table_size = DEFAULT_TABLE_SIZE; } thash_string *new_hash_string = t_hash_string_new_size(table_size); if (NULL != new_hash_string) { thlist_head *hlist_head = NULL; thlist_node *hlist_node = NULL, *hlist_node_next = NULL; thash_string_node *string_node = NULL; tuint32 index = 0; //foreach every entry in old hash table for (index = 0; index < hash_string->table_size; ++index) { hlist_head = &hash_string->head[index]; hlist_node = hlist_head->first; //insert to new hash table while(hlist_node != NULL) { hlist_node_next = hlist_node->next; string_node = t_hlist_entry(hlist_node, thash_string_node, node); t_hash_string_insert(new_hash_string, string_node); hlist_node = hlist_node_next; } } } return new_hash_string; } /** * @brief init string hash node * @param node - string hash node * @param key - key string */ tint t_hash_string_init_node(thash_string_node *node, const char *key) { T_ASSERT(NULL != node); if (NULL != key) { /* new key */ node->key = malloc(strlen(key) + 1); if (NULL != node->key) { strcpy(node->key, key); } else { return -ENOMEM; } } t_hlist_init_node(&node->node); return 0; } /** * @brief new string hash node * @param key - key string * @return node pointer */ thash_string_node *t_hash_string_new_node(const tchar *key) { thash_string_node *node = malloc(sizeof(thash_string_node)); if (NULL != node) { if (NULL != key) { node->key = malloc(strlen(key) + 1); strcpy(node->key, key); } t_hlist_init_node(&node->node); } return node; } /** * @brief create new hash table * @return if create success return hash table pointer otherwise return NULL */ thash_string *t_hash_string_new(void) { return t_hash_string_new_size(DEFAULT_TABLE_SIZE); } /** * @brief insert hash node to hash table * @param hash_string - hash table * @param node - node to insert */ thash_string *t_hash_string_insert(thash_string *hash_string, thash_string_node *node) { T_ASSERT(NULL != hash_string); T_ASSERT(NULL != node); T_ASSERT(NULL != node->key); tuint32 hash_val = t_hash_string_hash(hash_string, node->key); //check if already contain thlist_node *hlist_node = NULL; thash_string_node *string_node = NULL; t_hlist_foreach(hlist_node, &hash_string->head[hash_val]) { string_node = t_hlist_entry(hlist_node, thash_string_node, node); if (0 == strcmp(string_node->key, node->key)) { return hash_string; } } //insert node t_hlist_insert(&hash_string->head[hash_val], &node->node); hash_string->element_count++; //check if need rehash if (hash_string->element_count > hash_string->max_element_size) { thash_string *new_hash_string = t_hash_string_rehash(hash_string, hash_string->table_size * 2); if (NULL != new_hash_string) { //delete old hash string free(hash_string->head); free(hash_string); return new_hash_string; } } return hash_string; } /** * @brief remove node key equals to key from hash table * @param hash_string - hash table * @param key - key to remove * @return removed hash node pointer */ thash_string_node *t_hash_string_remove(thash_string *hash_string, const char *key) { T_ASSERT(NULL != hash_string); T_ASSERT(NULL != key); thash_string_node *string_node = t_hash_string_get(hash_string, key); if (NULL != string_node) { t_hlist_remove(&(string_node->node)); hash_string->element_count--; } return string_node; } /** * @brief get hash node which key euqals to key in hash table * @param hash_string - hash table * @param key - key to find * @return hash node */ thash_string_node *t_hash_string_get(const thash_string *hash_string, const char *key) { T_ASSERT(NULL != hash_string); T_ASSERT(NULL != key); tuint32 hash_val = t_hash_string_hash(hash_string, key); thlist_node *hlist_node = NULL; thash_string_node *string_node = NULL; t_hlist_foreach(hlist_node, &hash_string->head[hash_val]) { string_node = t_hlist_entry(hlist_node, thash_string_node, node); if (0 == strcmp(string_node->key, key)) { return string_node; } } return NULL; } /** * @brief get hash table all keys * @param hash_string - string hash table * @param keys - output key buffers */ void t_hash_string_keys(const thash_string *hash_string, char **keys) { T_ASSERT(NULL != hash_string); T_ASSERT(NULL != keys); thlist_node *hlist_node = NULL; thash_string_node *string_node = NULL; tuint32 index = 0; for (tuint32 i = 0; i < hash_string->table_size; ++i) { t_hlist_foreach(hlist_node, &hash_string->head[i]) { string_node = t_hlist_entry(hlist_node, thash_string_node, node); strcpy(keys[index], string_node->key); index ++; } } keys[index] = NULL; } /** * @brief iterator all node in hash table * @param hash_string - hash table handle * @param hash_func - hash callback function * @return error code, 0 means no error happend */ tint t_hash_string_foreach(const thash_string *hash_string, thash_func hash_func, void *userdata) { if (NULL == hash_string) { return 0; } thlist_node *hlist_node = NULL; thash_string_node *string_node = NULL; tint err = 0; for (tuint32 i = 0; i < hash_string->table_size; ++i) { t_hlist_foreach(hlist_node, &hash_string->head[i]) { string_node = t_hlist_entry(hlist_node, thash_string_node, node); if (NULL != hash_func) { err = hash_func(string_node, userdata); if (0 != err) { return err; } } } } return 0; } /** * @brief check if there is any node whose key equals to key in hash table * @param hash_string - hash table * @param key - key to find * @return check value TRUE: contain FALSE: can't find */ tbool t_hash_string_contain(const thash_string *hash_string, const char *key) { T_ASSERT(NULL != hash_string); T_ASSERT(NULL != key); tuint32 hash_val = t_hash_string_hash(hash_string, key); thlist_node *hlist_node = NULL; thash_string_node *string_node = NULL; t_hlist_foreach(hlist_node, &hash_string->head[hash_val]) { string_node = t_hlist_entry(hlist_node, thash_string_node, node); if (0 == strcmp(string_node->key, key)) { return TRUE; } } return FALSE; } /** * @brief get hash table element count * @param hash_string - hash table pointer * @return hash table element count */ tuint32 t_hash_string_count(const thash_string *hash_string) { T_ASSERT(NULL != hash_string); return hash_string->element_count; } /** * @brief get hash table table size * @param hash_string - hash table pointer * @return hash table table size */ tuint32 t_hash_string_capacity(const thash_string *hash_string) { T_ASSERT(NULL != hash_string); return hash_string->table_size; } /** * @brief free all node in hash table * @param hash_string - hash table * @param free_func - resource free function */ void t_hash_string_free(thash_string *hash_string, tfree_func free_func) { T_ASSERT(NULL != hash_string); thlist_head *head = NULL; for (tuint32 i = 0; i < hash_string->table_size; ++i) { head = &hash_string->head[i]; thlist_node *cur = head->first; thlist_node *temp = NULL; while (cur != NULL) { temp = cur->next; if (NULL != free_func) { free_func(t_hlist_entry(cur, thash_string_node, node)); } cur = temp; } } free(hash_string->head); free(hash_string); } /** * @brief free all node in hash table * @param hash_string - hash table * @param free_func - resource free function */ void t_hash_string_clear(thash_string *hash_string, tfree_func free_func) { T_ASSERT(NULL != hash_string); thlist_head *head = NULL; /* free node first */ for (tuint32 i = 0; i < hash_string->table_size; ++i) { head = &hash_string->head[i]; thlist_node *cur = head->first; thlist_node *temp = NULL; while (cur != NULL) { temp = cur->next; if (NULL != free_func) { free_func(t_hlist_entry(cur, thash_string_node, node)); } cur = temp; } } /* free head */ for (tuint32 i = DEFAULT_TABLE_SIZE; i < hash_string->table_size; ++i) { free(&hash_string->head[i]); } /* init head */ for (tuint32 i = 0; i < hash_string->table_size; ++i) { t_hlist_init_head(&hash_string->head[i]); } hash_string->table_size = DEFAULT_TABLE_SIZE; hash_string->element_count = 0; tdouble max_size = REHASH_FACTOR * hash_string->table_size; hash_string->max_element_size = tround(max_size); } ",0 ".3 2002/01/24 22:58:42 rfeany Exp $ * Copyright: Copyright (C) 2001, Russ Dill * Author: Russ Dill * Description: Mini inflate implementation (RFC 1951) *-----------------------------------------------------------------------*/ /* * SPDX-License-Identifier: GPL-2.0+ */ #include #include /* The order that the code lengths in section 3.2.7 are in */ static unsigned char huffman_order[] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; static inline void cramfs_memset(int *s, const int c, size n) { n--; for (;n > 0; n--) s[n] = c; s[0] = c; } /* associate a stream with a block of data and reset the stream */ static void init_stream(struct bitstream *stream, unsigned char *data, void *(*inflate_memcpy)(void *, const void *, size)) { stream->error = NO_ERROR; stream->memcpy = inflate_memcpy; stream->decoded = 0; stream->data = data; stream->bit = 0; /* The first bit of the stream is the lsb of the * first byte */ /* really sorry about all this initialization, think of a better way, * let me know and it will get cleaned up */ stream->codes.bits = 8; stream->codes.num_symbols = 19; stream->codes.lengths = stream->code_lengths; stream->codes.symbols = stream->code_symbols; stream->codes.count = stream->code_count; stream->codes.first = stream->code_first; stream->codes.pos = stream->code_pos; stream->lengths.bits = 16; stream->lengths.num_symbols = 288; stream->lengths.lengths = stream->length_lengths; stream->lengths.symbols = stream->length_symbols; stream->lengths.count = stream->length_count; stream->lengths.first = stream->length_first; stream->lengths.pos = stream->length_pos; stream->distance.bits = 16; stream->distance.num_symbols = 32; stream->distance.lengths = stream->distance_lengths; stream->distance.symbols = stream->distance_symbols; stream->distance.count = stream->distance_count; stream->distance.first = stream->distance_first; stream->distance.pos = stream->distance_pos; } /* pull 'bits' bits out of the stream. The last bit pulled it returned as the * msb. (section 3.1.1) */ static inline unsigned long pull_bits(struct bitstream *stream, const unsigned int bits) { unsigned long ret; int i; ret = 0; for (i = 0; i < bits; i++) { ret += ((*(stream->data) >> stream->bit) & 1) << i; /* if, before incrementing, we are on bit 7, * go to the lsb of the next byte */ if (stream->bit++ == 7) { stream->bit = 0; stream->data++; } } return ret; } static inline int pull_bit(struct bitstream *stream) { int ret = ((*(stream->data) >> stream->bit) & 1); if (stream->bit++ == 7) { stream->bit = 0; stream->data++; } return ret; } /* discard bits up to the next whole byte */ static void discard_bits(struct bitstream *stream) { if (stream->bit != 0) { stream->bit = 0; stream->data++; } } /* No decompression, the data is all literals (section 3.2.4) */ static void decompress_none(struct bitstream *stream, unsigned char *dest) { unsigned int length; discard_bits(stream); length = *(stream->data++); length += *(stream->data++) << 8; pull_bits(stream, 16); /* throw away the inverse of the size */ stream->decoded += length; stream->memcpy(dest, stream->data, length); stream->data += length; } /* Read in a symbol from the stream (section 3.2.2) */ static int read_symbol(struct bitstream *stream, struct huffman_set *set) { int bits = 0; int code = 0; while (!(set->count[bits] && code < set->first[bits] + set->count[bits])) { code = (code << 1) + pull_bit(stream); if (++bits > set->bits) { /* error decoding (corrupted data?) */ stream->error = CODE_NOT_FOUND; return -1; } } return set->symbols[set->pos[bits] + code - set->first[bits]]; } /* decompress a stream of data encoded with the passed length and distance * huffman codes */ static void decompress_huffman(struct bitstream *stream, unsigned char *dest) { struct huffman_set *lengths = &(stream->lengths); struct huffman_set *distance = &(stream->distance); int symbol, length, dist, i; do { if ((symbol = read_symbol(stream, lengths)) < 0) return; if (symbol < 256) { *(dest++) = symbol; /* symbol is a literal */ stream->decoded++; } else if (symbol > 256) { /* Determine the length of the repitition * (section 3.2.5) */ if (symbol < 265) length = symbol - 254; else if (symbol == 285) length = 258; else { length = pull_bits(stream, (symbol - 261) >> 2); length += (4 << ((symbol - 261) >> 2)) + 3; length += ((symbol - 1) % 4) << ((symbol - 261) >> 2); } /* Determine how far back to go */ if ((symbol = read_symbol(stream, distance)) < 0) return; if (symbol < 4) dist = symbol + 1; else { dist = pull_bits(stream, (symbol - 2) >> 1); dist += (2 << ((symbol - 2) >> 1)) + 1; dist += (symbol % 2) << ((symbol - 2) >> 1); } stream->decoded += length; for (i = 0; i < length; i++) { *dest = dest[-dist]; dest++; } } } while (symbol != 256); /* 256 is the end of the data block */ } /* Fill the lookup tables (section 3.2.2) */ static void fill_code_tables(struct huffman_set *set) { int code = 0, i, length; /* fill in the first code of each bit length, and the pos pointer */ set->pos[0] = 0; for (i = 1; i < set->bits; i++) { code = (code + set->count[i - 1]) << 1; set->first[i] = code; set->pos[i] = set->pos[i - 1] + set->count[i - 1]; } /* Fill in the table of symbols in order of their huffman code */ for (i = 0; i < set->num_symbols; i++) { if ((length = set->lengths[i])) set->symbols[set->pos[length]++] = i; } /* reset the pos pointer */ for (i = 1; i < set->bits; i++) set->pos[i] -= set->count[i]; } static void init_code_tables(struct huffman_set *set) { cramfs_memset(set->lengths, 0, set->num_symbols); cramfs_memset(set->count, 0, set->bits); cramfs_memset(set->first, 0, set->bits); } /* read in the huffman codes for dynamic decoding (section 3.2.7) */ static void decompress_dynamic(struct bitstream *stream, unsigned char *dest) { /* I tried my best to minimize the memory footprint here, while still * keeping up performance. I really dislike the _lengths[] tables, but * I see no way of eliminating them without a sizable performance * impact. The first struct table keeps track of stats on each bit * length. The _length table keeps a record of the bit length of each * symbol. The _symbols table is for looking up symbols by the huffman * code (the pos element points to the first place in the symbol table * where that bit length occurs). I also hate the initization of these * structs, if someone knows how to compact these, lemme know. */ struct huffman_set *codes = &(stream->codes); struct huffman_set *lengths = &(stream->lengths); struct huffman_set *distance = &(stream->distance); int hlit = pull_bits(stream, 5) + 257; int hdist = pull_bits(stream, 5) + 1; int hclen = pull_bits(stream, 4) + 4; int length, curr_code, symbol, i, last_code; last_code = 0; init_code_tables(codes); init_code_tables(lengths); init_code_tables(distance); /* fill in the count of each bit length' as well as the lengths * table */ for (i = 0; i < hclen; i++) { length = pull_bits(stream, 3); codes->lengths[huffman_order[i]] = length; if (length) codes->count[length]++; } fill_code_tables(codes); /* Do the same for the length codes, being carefull of wrap through * to the distance table */ curr_code = 0; while (curr_code < hlit) { if ((symbol = read_symbol(stream, codes)) < 0) return; if (symbol == 0) { curr_code++; last_code = 0; } else if (symbol < 16) { /* Literal length */ lengths->lengths[curr_code] = last_code = symbol; lengths->count[symbol]++; curr_code++; } else if (symbol == 16) { /* repeat the last symbol 3 - 6 * times */ length = 3 + pull_bits(stream, 2); for (;length; length--, curr_code++) if (curr_code < hlit) { lengths->lengths[curr_code] = last_code; lengths->count[last_code]++; } else { /* wrap to the distance table */ distance->lengths[curr_code - hlit] = last_code; distance->count[last_code]++; } } else if (symbol == 17) { /* repeat a bit length 0 */ curr_code += 3 + pull_bits(stream, 3); last_code = 0; } else { /* same, but more times */ curr_code += 11 + pull_bits(stream, 7); last_code = 0; } } fill_code_tables(lengths); /* Fill the distance table, don't need to worry about wrapthrough * here */ curr_code -= hlit; while (curr_code < hdist) { if ((symbol = read_symbol(stream, codes)) < 0) return; if (symbol == 0) { curr_code++; last_code = 0; } else if (symbol < 16) { distance->lengths[curr_code] = last_code = symbol; distance->count[symbol]++; curr_code++; } else if (symbol == 16) { length = 3 + pull_bits(stream, 2); for (;length; length--, curr_code++) { distance->lengths[curr_code] = last_code; distance->count[last_code]++; } } else if (symbol == 17) { curr_code += 3 + pull_bits(stream, 3); last_code = 0; } else { curr_code += 11 + pull_bits(stream, 7); last_code = 0; } } fill_code_tables(distance); decompress_huffman(stream, dest); } /* fill in the length and distance huffman codes for fixed encoding * (section 3.2.6) */ static void decompress_fixed(struct bitstream *stream, unsigned char *dest) { /* let gcc fill in the initial values */ struct huffman_set *lengths = &(stream->lengths); struct huffman_set *distance = &(stream->distance); cramfs_memset(lengths->count, 0, 16); cramfs_memset(lengths->first, 0, 16); cramfs_memset(lengths->lengths, 8, 144); cramfs_memset(lengths->lengths + 144, 9, 112); cramfs_memset(lengths->lengths + 256, 7, 24); cramfs_memset(lengths->lengths + 280, 8, 8); lengths->count[7] = 24; lengths->count[8] = 152; lengths->count[9] = 112; cramfs_memset(distance->count, 0, 16); cramfs_memset(distance->first, 0, 16); cramfs_memset(distance->lengths, 5, 32); distance->count[5] = 32; fill_code_tables(lengths); fill_code_tables(distance); decompress_huffman(stream, dest); } /* returns the number of bytes decoded, < 0 if there was an error. Note that * this function assumes that the block starts on a byte boundry * (non-compliant, but I don't see where this would happen). section 3.2.3 */ long decompress_block(unsigned char *dest, unsigned char *source, void *(*inflate_memcpy)(void *, const void *, size)) { int bfinal, btype; struct bitstream stream; init_stream(&stream, source, inflate_memcpy); do { bfinal = pull_bit(&stream); btype = pull_bits(&stream, 2); if (btype == NO_COMP) decompress_none(&stream, dest + stream.decoded); else if (btype == DYNAMIC_COMP) decompress_dynamic(&stream, dest + stream.decoded); else if (btype == FIXED_COMP) decompress_fixed(&stream, dest + stream.decoded); else stream.error = COMP_UNKNOWN; } while (!bfinal && !stream.error); #if 0 putstr(""decompress_block start\r\n""); putLabeledWord(""stream.error = "",stream.error); putLabeledWord(""stream.decoded = "",stream.decoded); putLabeledWord(""dest = "",dest); putstr(""decompress_block end\r\n""); #endif return stream.error ? -stream.error : stream.decoded; } ",0 " | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2011 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | | CiviCRM is free software; you can copy, modify, and distribute it | | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | | | | You should have received a copy of the GNU Affero General Public | | License and the CiviCRM Licensing Exception along | | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ */ /** * * @package CRM * @copyright CiviCRM LLC (c) 2004-2011 * $Id$ * */ require_once 'CRM/Logging/Differ.php'; class CRM_Logging_Reverter { private $db; private $log_conn_id; private $log_date; function __construct($log_conn_id, $log_date) { $dsn = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN); $this->db = $dsn['database']; $this->log_conn_id = $log_conn_id; $this->log_date = $log_date; } function revert($tables) { // FIXME: split off the table → DAO mapping to a GenCode-generated class $daos = array( 'civicrm_address' => 'CRM_Core_DAO_Address', 'civicrm_contact' => 'CRM_Contact_DAO_Contact', 'civicrm_email' => 'CRM_Core_DAO_Email', 'civicrm_im' => 'CRM_Core_DAO_IM', 'civicrm_openid' => 'CRM_Core_DAO_OpenID', 'civicrm_phone' => 'CRM_Core_DAO_Phone', 'civicrm_website' => 'CRM_Core_DAO_Website', 'civicrm_contribution' => 'CRM_Contribute_DAO_Contribution', ); // get custom data tables, columns and types $ctypes = array(); $dao = CRM_Core_DAO::executeQuery('SELECT table_name, column_name, data_type FROM civicrm_custom_group cg JOIN civicrm_custom_field cf ON (cf.custom_group_id = cg.id)'); while ($dao->fetch()) { if (!isset($ctypes[$dao->table_name])) $ctypes[$dao->table_name] = array('entity_id' => 'Integer'); $ctypes[$dao->table_name][$dao->column_name] = $dao->data_type; } $differ = new CRM_Logging_Differ($this->log_conn_id, $this->log_date); $diffs = $differ->diffsInTables($tables); $deletes = array(); $reverts = array(); foreach ($diffs as $table => $changes) { foreach ($changes as $change) { switch ($change['action']) { case 'Insert': if (!isset($deletes[$table])) $deletes[$table] = array(); $deletes[$table][] = $change['id']; break; case 'Delete': case 'Update': if (!isset($reverts[$table])) $reverts[$table] = array(); if (!isset($reverts[$table][$change['id']])) $reverts[$table][$change['id']] = array('log_action' => $change['action']); $reverts[$table][$change['id']][$change['field']] = $change['from']; break; } } } // revert inserts by deleting foreach ($deletes as $table => $ids) { CRM_Core_DAO::executeQuery(""DELETE FROM `$table` WHERE id IN ("" . implode(', ', array_unique($ids)) . ')'); } // revert updates by updating to previous values foreach ($reverts as $table => $row) { switch (true) { // DAO-based tables case in_array($table, array_keys($daos)): require_once str_replace('_', DIRECTORY_SEPARATOR, $daos[$table]) . '.php'; eval(""\$dao = new {$daos[$table]};""); foreach ($row as $id => $changes) { $dao->id = $id; foreach ($changes as $field => $value) { if ($field == 'log_action') continue; if (empty($value) and $value !== 0 and $value !== '0') $value = 'null'; $dao->$field = $value; } $changes['log_action'] == 'Delete' ? $dao->insert() : $dao->update(); $dao->reset(); } break; // custom data tables case in_array($table, array_keys($ctypes)): foreach ($row as $id => $changes) { $inserts = array('id' => '%1'); $updates = array(); $params = array(1 => array($id, 'Integer')); $counter = 2; foreach ($changes as $field => $value) { if (!isset($ctypes[$table][$field])) continue; // don’t try reverting a field that’s no longer there switch ($ctypes[$table][$field]) { case 'Date': $value = substr(CRM_Utils_Date::isoToMysql($value), 0, 8); break; case 'Timestamp': $value = CRM_Utils_Date::isoToMysql($value); break; } $inserts[$field] = ""%$counter""; $updates[] = ""$field = %$counter""; $params[$counter] = array($value, $ctypes[$table][$field]); $counter++; } if ($changes['log_action'] == 'Delete') { $sql = ""INSERT INTO `$table` ("" . implode(', ', array_keys($inserts)) . ') VALUES (' . implode(', ', $inserts) . ')'; } else { $sql = ""UPDATE `$table` SET "" . implode(', ', $updates) . ' WHERE id = %1'; } CRM_Core_DAO::executeQuery($sql, $params); } break; } } // CRM-7353: if nothing altered civicrm_contact, touch it; this will // make sure there’s an entry in log_civicrm_contact for this revert if (empty($diffs['civicrm_contact'])) { $query = "" SELECT id FROM `{$this->db}`.log_civicrm_contact WHERE log_conn_id = %1 AND log_date BETWEEN DATE_SUB(%2, INTERVAL 10 SECOND) AND DATE_ADD(%2, INTERVAL 10 SECOND) ORDER BY log_date DESC LIMIT 1 ""; $params = array( 1 => array($this->log_conn_id, 'Integer'), 2 => array($this->log_date, 'String'), ); $cid = CRM_Core_DAO::singleValueQuery($query, $params); if (!$cid) return; require_once 'CRM/Contact/DAO/Contact.php'; $dao = new CRM_Contact_DAO_Contact; $dao->id = $cid; if ($dao->find(true)) { // CRM-8102: MySQL can’t parse its own dates $dao->birth_date = CRM_Utils_Date::isoToMysql($dao->birth_date); $dao->deceased_date = CRM_Utils_Date::isoToMysql($dao->deceased_date); $dao->save(); } } } } ",0 "ge, to any person obtaining a copy // of this software and associated documentation files (the ""Software""), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #import typedef NS_ENUM(NSUInteger, VTDNearTermDateRelation) { VTDNearTermDateRelationOutOfRange, VTDNearTermDateRelationToday, VTDNearTermDateRelationTomorrow, VTDNearTermDateRelationLaterThisWeek, VTDNearTermDateRelationNextWeek }; ",0 "********************** --> _Install (Groovy Documentation)
            Overview  Package   Class  Deprecated  Index  Help 
            Groovy Documentation
            FRAMES    NO FRAMES    
            SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

            unzipped.scripts
            Class _Install

            java.lang.Object
              unzipped.scripts._Install
            

            class _Install
            
            
            Constructor Summary
            _Install()

             
            Method Summary
             
            Methods inherited from class java.lang.Object
            wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
             

            Constructor Detail

            _Install

            _Install()


             

            Groovy Documentation


            ",0 "rt javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * * The content partner related validation errors. * * *

            Java class for ContentPartnerError complex type. * *

            The following schema fragment specifies the expected content contained within this class. * *

             * <complexType name=""ContentPartnerError"">
             *   <complexContent>
             *     <extension base=""{https://www.google.com/apis/ads/publisher/v201508}ApiError"">
             *       <sequence>
             *         <element name=""reason"" type=""{https://www.google.com/apis/ads/publisher/v201508}ContentPartnerError.Reason"" minOccurs=""0""/>
             *       </sequence>
             *     </extension>
             *   </complexContent>
             * </complexType>
             * 
            * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = ""ContentPartnerError"", propOrder = { ""reason"" }) public class ContentPartnerError extends ApiError { @XmlSchemaType(name = ""string"") protected ContentPartnerErrorReason reason; /** * Gets the value of the reason property. * * @return * possible object is * {@link ContentPartnerErrorReason } * */ public ContentPartnerErrorReason getReason() { return reason; } /** * Sets the value of the reason property. * * @param value * allowed object is * {@link ContentPartnerErrorReason } * */ public void setReason(ContentPartnerErrorReason value) { this.reason = value; } } ",0 "009 MobileRobots Inc. Copyright (C) 2010, 2011 Adept Technology, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA If you wish to redistribute ARIA under different terms, contact Adept MobileRobots for information about a commercial version of ARIA at robots@mobilerobots.com or Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; 800-639-9481 */ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.36 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package com.mobilerobots.Aria; public class ArDPPTU extends ArPTZ { /* (begin code from javabody_derived typemap) */ private long swigCPtr; /* for internal use by swig only */ public ArDPPTU(long cPtr, boolean cMemoryOwn) { super(AriaJavaJNI.SWIGArDPPTUUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } /* for internal use by swig only */ public static long getCPtr(ArDPPTU obj) { return (obj == null) ? 0 : obj.swigCPtr; } /* (end code from javabody_derived typemap) */ protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AriaJavaJNI.delete_ArDPPTU(swigCPtr); } swigCPtr = 0; super.delete(); } public ArDPPTU(ArRobot robot, ArDPPTU.DeviceType deviceType) { this(AriaJavaJNI.new_ArDPPTU__SWIG_0(ArRobot.getCPtr(robot), robot, deviceType.swigValue()), true); } public ArDPPTU(ArRobot robot) { this(AriaJavaJNI.new_ArDPPTU__SWIG_1(ArRobot.getCPtr(robot), robot), true); } public boolean init() { return AriaJavaJNI.ArDPPTU_init(swigCPtr, this); } public boolean canZoom() { return AriaJavaJNI.ArDPPTU_canZoom(swigCPtr, this); } public boolean blank() { return AriaJavaJNI.ArDPPTU_blank(swigCPtr, this); } public boolean resetCalib() { return AriaJavaJNI.ArDPPTU_resetCalib(swigCPtr, this); } public boolean disableReset() { return AriaJavaJNI.ArDPPTU_disableReset(swigCPtr, this); } public boolean resetTilt() { return AriaJavaJNI.ArDPPTU_resetTilt(swigCPtr, this); } public boolean resetPan() { return AriaJavaJNI.ArDPPTU_resetPan(swigCPtr, this); } public boolean resetAll() { return AriaJavaJNI.ArDPPTU_resetAll(swigCPtr, this); } public boolean saveSet() { return AriaJavaJNI.ArDPPTU_saveSet(swigCPtr, this); } public boolean restoreSet() { return AriaJavaJNI.ArDPPTU_restoreSet(swigCPtr, this); } public boolean factorySet() { return AriaJavaJNI.ArDPPTU_factorySet(swigCPtr, this); } public boolean panTilt(double pdeg, double tdeg) { return AriaJavaJNI.ArDPPTU_panTilt(swigCPtr, this, pdeg, tdeg); } public boolean pan(double deg) { return AriaJavaJNI.ArDPPTU_pan(swigCPtr, this, deg); } public boolean panRel(double deg) { return AriaJavaJNI.ArDPPTU_panRel(swigCPtr, this, deg); } public boolean tilt(double deg) { return AriaJavaJNI.ArDPPTU_tilt(swigCPtr, this, deg); } public boolean tiltRel(double deg) { return AriaJavaJNI.ArDPPTU_tiltRel(swigCPtr, this, deg); } public boolean panTiltRel(double pdeg, double tdeg) { return AriaJavaJNI.ArDPPTU_panTiltRel(swigCPtr, this, pdeg, tdeg); } public boolean limitEnforce(boolean val) { return AriaJavaJNI.ArDPPTU_limitEnforce(swigCPtr, this, val); } public boolean immedExec() { return AriaJavaJNI.ArDPPTU_immedExec(swigCPtr, this); } public boolean slaveExec() { return AriaJavaJNI.ArDPPTU_slaveExec(swigCPtr, this); } public boolean awaitExec() { return AriaJavaJNI.ArDPPTU_awaitExec(swigCPtr, this); } public boolean haltAll() { return AriaJavaJNI.ArDPPTU_haltAll(swigCPtr, this); } public boolean haltPan() { return AriaJavaJNI.ArDPPTU_haltPan(swigCPtr, this); } public boolean haltTilt() { return AriaJavaJNI.ArDPPTU_haltTilt(swigCPtr, this); } public double getMaxPosPan() { return AriaJavaJNI.ArDPPTU_getMaxPosPan(swigCPtr, this); } public double getMaxNegPan() { return AriaJavaJNI.ArDPPTU_getMaxNegPan(swigCPtr, this); } public double getMaxPosTilt() { return AriaJavaJNI.ArDPPTU_getMaxPosTilt(swigCPtr, this); } public double getMaxNegTilt() { return AriaJavaJNI.ArDPPTU_getMaxNegTilt(swigCPtr, this); } public double getMaxPanSlew() { return AriaJavaJNI.ArDPPTU_getMaxPanSlew(swigCPtr, this); } public double getMinPanSlew() { return AriaJavaJNI.ArDPPTU_getMinPanSlew(swigCPtr, this); } public double getMaxTiltSlew() { return AriaJavaJNI.ArDPPTU_getMaxTiltSlew(swigCPtr, this); } public double getMinTiltSlew() { return AriaJavaJNI.ArDPPTU_getMinTiltSlew(swigCPtr, this); } public double getMaxPanAccel() { return AriaJavaJNI.ArDPPTU_getMaxPanAccel(swigCPtr, this); } public double getMinPanAccel() { return AriaJavaJNI.ArDPPTU_getMinPanAccel(swigCPtr, this); } public double getMaxTiltAccel() { return AriaJavaJNI.ArDPPTU_getMaxTiltAccel(swigCPtr, this); } public double getMinTiltAccel() { return AriaJavaJNI.ArDPPTU_getMinTiltAccel(swigCPtr, this); } public boolean initMon(double deg1, double deg2, double deg3, double deg4) { return AriaJavaJNI.ArDPPTU_initMon(swigCPtr, this, deg1, deg2, deg3, deg4); } public boolean enMon() { return AriaJavaJNI.ArDPPTU_enMon(swigCPtr, this); } public boolean disMon() { return AriaJavaJNI.ArDPPTU_disMon(swigCPtr, this); } public boolean offStatPower() { return AriaJavaJNI.ArDPPTU_offStatPower(swigCPtr, this); } public boolean regStatPower() { return AriaJavaJNI.ArDPPTU_regStatPower(swigCPtr, this); } public boolean lowStatPower() { return AriaJavaJNI.ArDPPTU_lowStatPower(swigCPtr, this); } public boolean highMotPower() { return AriaJavaJNI.ArDPPTU_highMotPower(swigCPtr, this); } public boolean regMotPower() { return AriaJavaJNI.ArDPPTU_regMotPower(swigCPtr, this); } public boolean lowMotPower() { return AriaJavaJNI.ArDPPTU_lowMotPower(swigCPtr, this); } public boolean panAccel(double deg) { return AriaJavaJNI.ArDPPTU_panAccel(swigCPtr, this, deg); } public boolean tiltAccel(double deg) { return AriaJavaJNI.ArDPPTU_tiltAccel(swigCPtr, this, deg); } public boolean basePanSlew(double deg) { return AriaJavaJNI.ArDPPTU_basePanSlew(swigCPtr, this, deg); } public boolean baseTiltSlew(double deg) { return AriaJavaJNI.ArDPPTU_baseTiltSlew(swigCPtr, this, deg); } public boolean upperPanSlew(double deg) { return AriaJavaJNI.ArDPPTU_upperPanSlew(swigCPtr, this, deg); } public boolean lowerPanSlew(double deg) { return AriaJavaJNI.ArDPPTU_lowerPanSlew(swigCPtr, this, deg); } public boolean upperTiltSlew(double deg) { return AriaJavaJNI.ArDPPTU_upperTiltSlew(swigCPtr, this, deg); } public boolean lowerTiltSlew(double deg) { return AriaJavaJNI.ArDPPTU_lowerTiltSlew(swigCPtr, this, deg); } public boolean indepMove() { return AriaJavaJNI.ArDPPTU_indepMove(swigCPtr, this); } public boolean velMove() { return AriaJavaJNI.ArDPPTU_velMove(swigCPtr, this); } public boolean panSlew(double deg) { return AriaJavaJNI.ArDPPTU_panSlew(swigCPtr, this, deg); } public boolean tiltSlew(double deg) { return AriaJavaJNI.ArDPPTU_tiltSlew(swigCPtr, this, deg); } public boolean panSlewRel(double deg) { return AriaJavaJNI.ArDPPTU_panSlewRel(swigCPtr, this, deg); } public boolean tiltSlewRel(double deg) { return AriaJavaJNI.ArDPPTU_tiltSlewRel(swigCPtr, this, deg); } public double getPan() { return AriaJavaJNI.ArDPPTU_getPan(swigCPtr, this); } public double getTilt() { return AriaJavaJNI.ArDPPTU_getTilt(swigCPtr, this); } public double getPanSlew() { return AriaJavaJNI.ArDPPTU_getPanSlew(swigCPtr, this); } public double getTiltSlew() { return AriaJavaJNI.ArDPPTU_getTiltSlew(swigCPtr, this); } public double getBasePanSlew() { return AriaJavaJNI.ArDPPTU_getBasePanSlew(swigCPtr, this); } public double getBaseTiltSlew() { return AriaJavaJNI.ArDPPTU_getBaseTiltSlew(swigCPtr, this); } public double getPanAccel() { return AriaJavaJNI.ArDPPTU_getPanAccel(swigCPtr, this); } public double getTiltAccel() { return AriaJavaJNI.ArDPPTU_getTiltAccel(swigCPtr, this); } public final static class DeviceType { public final static DeviceType PANTILT_DEFAULT = new DeviceType(""PANTILT_DEFAULT""); public final static DeviceType PANTILT_PTUD47 = new DeviceType(""PANTILT_PTUD47""); public final int swigValue() { return swigValue; } public String toString() { return swigName; } public static DeviceType swigToEnum(int swigValue) { if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) return swigValues[swigValue]; for (int i = 0; i < swigValues.length; i++) if (swigValues[i].swigValue == swigValue) return swigValues[i]; throw new IllegalArgumentException(""No enum "" + DeviceType.class + "" with value "" + swigValue); } private DeviceType(String swigName) { this.swigName = swigName; this.swigValue = swigNext++; } private DeviceType(String swigName, int swigValue) { this.swigName = swigName; this.swigValue = swigValue; swigNext = swigValue+1; } private DeviceType(String swigName, DeviceType swigEnum) { this.swigName = swigName; this.swigValue = swigEnum.swigValue; swigNext = this.swigValue+1; } private static DeviceType[] swigValues = { PANTILT_DEFAULT, PANTILT_PTUD47 }; private static int swigNext = 0; private final int swigValue; private final String swigName; } } ",0 " html { min-height:100%; } #container { width: 960px; margin: 0 auto; background-color: ghostwhite; height:100%; } #header h1 { text-align: center; } #nav { background-color: mistyrose; } #nav li { display: inline-block; margin-right: 10px; padding: 5px 0; } #content { background-color: lightgreen; float:left; width: 66%; } #sidebar { display: inline-block; width:34%; background-color: lightblue; } #footer { position: fixed; bottom: 0; background-color: white; width: 100%; padding: 10px; text-align: center; }

            Simple 2 column CSS layout

            WASHINGTON — Saudi Arabia announced on Sunday that its new monarch, King Salman, would not be attending meetings at the White House with President Obama or a summit gathering at Camp David this week, in an apparent signal of its continued displeasure with the administration over United States relations with Iran, its rising regional adversary. As recently as Friday, the White House said that King Salman would be coming to “resume consultations on a wide range of regional and bilateral issues,” according to Eric Schultz, a White House spokesman. But on Sunday, the state-run Saudi Press Agency said that the king would instead send Crown Prince Mohammed bin Nayef, the Saudi interior minister, and Deputy Crown Prince Mohammed bin Salman, the defense minister. The agency said the summit meeting would overlap with a five-day cease-fire in Yemen that is scheduled to start on Tuesday to allow for the delivery of humanitarian aid. WASHINGTON — Saudi Arabia announced on Sunday that its new monarch, King Salman, would not be attending meetings at the White House with President Obama or a summit gathering at Camp David this week, in an apparent signal of its continued displeasure with the administration over United States relations with Iran, its rising regional adversary. As recently as Friday, the White House said that King Salman would be coming to “resume consultations on a wide range of regional and bilateral issues,” according to Eric Schultz, a White House spokesman. But on Sunday, the state-run Saudi Press Agency said that the king would instead send Crown Prince Mohammed bin Nayef, the Saudi interior minister, and Deputy Crown Prince Mohammed bin Salman, the defense minister. The agency said the summit meeting would overlap with a five-day cease-fire in Yemen that is scheduled to start on Tuesday to allow for the delivery of humanitarian aid. WASHINGTON — Saudi Arabia announced on Sunday that its new monarch, King Salman, would not be attending meetings at the White House with President Obama or a summit gathering at Camp David this week, in an apparent signal of its continued displeasure with the administration over United States relations with Iran, its rising regional adversary. As recently as Friday, the White House said that King Salman would be coming to “resume consultations on a wide range of regional and bilateral issues,” according to Eric Schultz, a White House spokesman. But on Sunday, the state-run Saudi Press Agency said that the king would instead send Crown Prince Mohammed bin Nayef, the Saudi interior minister, and Deputy Crown Prince Mohammed bin Salman, the defense minister. The agency said the summit meeting would overlap with a five-day cease-fire in Yemen that is scheduled to start on Tuesday to allow for the delivery of humanitarian aid. WASHINGTON — Saudi Arabia announced on Sunday that its new monarch, King Salman, would not be attending meetings at the White House with President Obama or a summit gathering at Camp David this week, in an apparent signal of its continued displeasure with the administration over United States relations with Iran, its rising regional adversary. As recently as Friday, the White House said that King Salman would be coming to “resume consultations on a wide range of regional and bilateral issues,” according to Eric Schultz, a White House spokesman. But on Sunday, the state-run Saudi Press Agency said that the king would instead send Crown Prince Mohammed bin Nayef, the Saudi interior minister, and Deputy Crown Prince Mohammed bin Salman, the defense minister. The agency said the summit meeting would overlap with a five-day cease-fire in Yemen that is scheduled to start on Tuesday to allow for the delivery of humanitarian aid. WASHINGTON — Saudi Arabia announced on Sunday that its new monarch, King Salman, would not be attending meetings at the White House with President Obama or a summit gathering at Camp David this week, in an apparent signal of its continued displeasure with the administration over United States relations with Iran, its rising regional adversary. As recently as Friday, the White House said that King Salman would be coming to “resume consultations on a wide range of regional and bilateral issues,” according to Eric Schultz, a White House spokesman. But on Sunday, the state-run Saudi Press Agency said that the king would instead send Crown Prince Mohammed bin Nayef, the Saudi interior minister, and Deputy Crown Prince Mohammed bin Salman, the defense minister. The agency said the summit meeting would overlap with a five-day cease-fire in Yemen that is scheduled to start on Tuesday to allow for the delivery of humanitarian aid.
            WASHINGTON — Saudi Arabia announced on Sunday that its new monarch, King Salman, would not be attending meetings at the White House with President Obama or a summit gathering at Camp David this week, in an apparent signal of its continued displeasure with the administration over United States relations with Iran, its rising regional adversary. As recently as Friday, the White House said that King Salman would be coming to “resume consultations on a wide range of regional and bilateral issues,” according to Eric Schultz, a White House spokesman. But on Sunday, the state-run Saudi Press Agency said that the king would instead send Crown Prince Mohammed bin Nayef, the Saudi interior minister, and Deputy Crown Prince Mohammed bin Salman, the defense minister. The agency said the summit meeting would overlap with a five-day cease-fire in Yemen that is scheduled to start on Tuesday to allow for the delivery of humanitarian aid. WASHINGTON — Saudi Arabia announced on Sunday that its new monarch, King Salman, would not be attending meetings at the White House with President Obama or a summit gathering at Camp David this week, in an apparent signal of its continued displeasure with the administration over United States relations with Iran, its rising regional adversary. As recently as Friday, the White House said that King Salman would be coming to “resume consultations on a wide range of regional and bilateral issues,” according to Eric Schultz, a White House spokesman. But on Sunday, the state-run Saudi Press Agency said that the king would instead send Crown Prince Mohammed bin Nayef, the Saudi interior minister, and Deputy Crown Prince Mohammed bin Salman, the defense minister. The agency said the summit meeting would overlap with a five-day cease-fire in Yemen that is scheduled to start on Tuesday to allow for the delivery of humanitarian aid. WASHINGTON — Saudi Arabia announced on Sunday that its new monarch, King Salman, would not be attending meetings at the White House with President Obama or a summit gathering at Camp David this week, in an apparent signal of its continued displeasure with the administration over United States relations with Iran, its rising regional adversary. As recently as Friday, the White House said that King Salman would be coming to “resume consultations on a wide range of regional and bilateral issues,” according to Eric Schultz, a White House spokesman. But on Sunday, the state-run Saudi Press Agency said that the king would instead send Crown Prince Mohammed bin Nayef, the Saudi interior minister, and Deputy Crown Prince Mohammed bin Salman, the defense minister. The agency said the summit meeting would overlap with a five-day cease-fire in Yemen that is scheduled to start on Tuesday to allow for the delivery of humanitarian aid. WASHINGTON — Saudi Arabia announced on Sunday that its new monarch, King Salman, would not be attending meetings at the White House with President Obama or a summit gathering at Camp David this week, in an apparent signal of its continued displeasure with the administration over United States relations with Iran, its rising regional adversary. As recently as Friday, the White House said that King Salman would be coming to “resume consultations on a wide range of regional and bilateral issues,” according to Eric Schultz, a White House spokesman. But on Sunday, the state-run Saudi Press Agency said that the king would instead send Crown Prince Mohammed bin Nayef, the Saudi interior minister, and Deputy Crown Prince Mohammed bin Salman, the defense minister. The agency said the summit meeting would overlap with a five-day cease-fire in Yemen that is scheduled to start on Tuesday to allow for the delivery of humanitarian aid.
            FOR ENTERTAINMENT PURPOSES ONLY!!!
            ",0 "th> 



          Classes
           ClassDescription
           UIComponentUtil Utility functions for use with UIComponents.

          name; ?>
          id, ' View', array('class' => 'btn btn-small')); ?> id, ' Edit', array('class' => 'btn btn-small')); ?> id, ' Delete', array('class' => 'btn btn-small btn-danger', 'onclick' => ""return confirm('Are you sure?')"")); ?>

          No Names.

          'btn btn-success')); ?>

          ",0 "stributed with this source code. */ namespace eZ\Bundle\EzPublishLegacyBundle\Controller; use eZ\Bundle\EzPublishLegacyBundle\LegacyResponse\LegacyResponseManager; use eZ\Publish\Core\MVC\Legacy\Kernel\URIHelper; use eZ\Publish\Core\MVC\Legacy\Templating\LegacyHelper; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use eZ\Publish\Core\MVC\ConfigResolverInterface; use ezpKernelRedirect; use Symfony\Component\Routing\RouterInterface; /** * Controller embedding legacy kernel. */ class LegacyKernelController { /** * @var \Closure */ private $kernelClosure; /** * @var \eZ\Publish\Core\MVC\ConfigResolverInterface */ private $configResolver; /** * Template declaration to wrap legacy responses in a Twig pagelayout (optional) * Either a template declaration string or null/false to use legacy pagelayout * Default is null. * * @var mixed */ private $legacyLayout; /** * @var \eZ\Publish\Core\MVC\Legacy\Kernel\URIHelper */ private $uriHelper; /** * @var \eZ\Bundle\EzPublishLegacyBundle\LegacyResponse\LegacyResponseManager */ private $legacyResponseManager; /** * @var \eZ\Publish\Core\MVC\Legacy\Templating\LegacyHelper */ private $legacyHelper; /** * @var \Symfony\Component\Routing\RouterInterface */ private $router; public function __construct( \Closure $kernelClosure, ConfigResolverInterface $configResolver, URIHelper $uriHelper, LegacyResponseManager $legacyResponseManager, LegacyHelper $legacyHelper, RouterInterface $router ) { $this->kernelClosure = $kernelClosure; $this->legacyLayout = $configResolver->getParameter('module_default_layout', 'ezpublish_legacy'); $this->configResolver = $configResolver; $this->uriHelper = $uriHelper; $this->legacyResponseManager = $legacyResponseManager; $this->legacyHelper = $legacyHelper; $this->router = $router; } /** * Base fallback action. * Will be basically used for every legacy module. * * @param \Symfony\Component\HttpFoundation\Request $request * * @return \eZ\Bundle\EzPublishLegacyBundle\LegacyResponse */ public function indexAction(Request $request) { $kernelClosure = $this->kernelClosure; /** @var \eZ\Publish\Core\MVC\Legacy\Kernel $kernel */ $kernel = $kernelClosure(); $legacyMode = $this->configResolver->getParameter('legacy_mode'); $kernel->setUseExceptions(false); // Fix up legacy URI with current request since we can be in a sub-request here. $this->uriHelper->updateLegacyURI($request); // If we have a layout for legacy AND we're not in legacy mode, we ask the legacy kernel not to generate layout. if (isset($this->legacyLayout) && !$legacyMode) { $kernel->setUsePagelayout(false); } $result = $kernel->run(); $kernel->setUseExceptions(true); if ($result instanceof ezpKernelRedirect) { return $this->legacyResponseManager->generateRedirectResponse($result); } $this->legacyHelper->loadDataFromModuleResult($result->getAttribute('module_result')); $response = $this->legacyResponseManager->generateResponseFromModuleResult($result); $this->legacyResponseManager->mapHeaders(headers_list(), $response); return $response; } /** * Generates a RedirectResponse to the appropriate login route. * * @return RedirectResponse */ public function loginAction() { return new RedirectResponse($this->router->generate('login')); } /** * Generates a RedirectResponse to the appropriate logout route. * * @return RedirectResponse */ public function logoutAction() { return new RedirectResponse($this->router->generate('logout')); } } ",0 "enerated by javadoc (1.8.0_20) on Tue Jan 20 23:37:43 CET 2015 --> Uses of Class core.command.DeleteCommand
          • Prev
          • Next

          Uses of Class
          core.command.DeleteCommand

          No usage of core.command.DeleteCommand
          • Prev
          • Next
          ",0 " position: absolute; margin: auto; top: 0; bottom: 0; left: 0; right: 0; } ",0 "ends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ); } protected function doDisplay(array $context, array $blocks = array()) { // line 11 echo "" ""; } // line 12 public function getrender_form($__form__ = null, $__permissions__ = null, $__td_type__ = null, $__admin__ = null, $__admin_pool__ = null, $__object__ = null) { $context = $this->env->mergeGlobals(array( ""form"" => $__form__, ""permissions"" => $__permissions__, ""td_type"" => $__td_type__, ""admin"" => $__admin__, ""admin_pool"" => $__admin_pool__, ""object"" => $__object__, )); $blocks = array(); ob_start(); try { // line 13 echo ""
          env, $this->getAttribute((isset($context[""admin""]) ? $context[""admin""] : $this->getContext($context, ""admin"")), ""generateUrl"", array(0 => ""acl"", 1 => array(""id"" => $this->getAttribute((isset($context[""admin""]) ? $context[""admin""] : $this->getContext($context, ""admin"")), ""id"", array(0 => (isset($context[""object""]) ? $context[""object""] : $this->getContext($context, ""object""))), ""method""), ""uniqid"" => $this->getAttribute((isset($context[""admin""]) ? $context[""admin""] : $this->getContext($context, ""admin"")), ""uniqid"", array()), ""subclass"" => $this->getAttribute($this->getAttribute((isset($context[""app""]) ? $context[""app""] : $this->getContext($context, ""app"")), ""request"", array()), ""get"", array(0 => ""subclass""), ""method""))), ""method""), ""html"", null, true); echo ""\"" ""; echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context[""form""]) ? $context[""form""] : $this->getContext($context, ""form"")), 'enctype'); echo "" method=\""POST\"" ""; // line 16 if ( !$this->getAttribute((isset($context[""admin_pool""]) ? $context[""admin_pool""] : $this->getContext($context, ""admin_pool"")), ""getOption"", array(0 => ""html5_validate""), ""method"")) { echo ""novalidate=\""novalidate\""""; } // line 17 echo "" > ""; // line 18 if ((twig_length_filter($this->env, $this->getAttribute($this->getAttribute((isset($context[""form""]) ? $context[""form""] : $this->getContext($context, ""form"")), ""vars"", array()), ""errors"", array())) > 0)) { // line 19 echo ""
          ""; // line 20 echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context[""form""]) ? $context[""form""] : $this->getContext($context, ""form"")), 'errors'); echo ""
          ""; } // line 23 echo ""
          ""; // line 29 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable((isset($context[""permissions""]) ? $context[""permissions""] : $this->getContext($context, ""permissions""))); foreach ($context['_seq'] as $context[""_key""] => $context[""permission""]) { // line 30 echo "" ""; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['permission'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 32 echo "" ""; // line 34 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context[""form""]) ? $context[""form""] : $this->getContext($context, ""form"")), ""children"", array())); $context['loop'] = array( 'parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true, ); foreach ($context['_seq'] as $context[""_key""] => $context[""child""]) { if (($this->getAttribute($this->getAttribute($context[""child""], ""vars"", array()), ""name"", array()) != ""_token"")) { // line 35 echo "" ""; if ((($this->getAttribute($context[""loop""], ""index0"", array()) == 0) || (($this->getAttribute($context[""loop""], ""index0"", array()) % 10) == 0))) { // line 36 echo "" ""; // line 38 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable((isset($context[""permissions""]) ? $context[""permissions""] : $this->getContext($context, ""permissions""))); foreach ($context['_seq'] as $context[""_key""] => $context[""permission""]) { // line 39 echo "" ""; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['permission'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 41 echo "" ""; } // line 43 echo "" ""; // line 50 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable((isset($context[""permissions""]) ? $context[""permissions""] : $this->getContext($context, ""permissions""))); foreach ($context['_seq'] as $context[""_key""] => $context[""permission""]) { // line 51 echo "" ""; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['permission'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 53 echo "" ""; ++$context['loop']['index0']; ++$context['loop']['index']; $context['loop']['first'] = false; } } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 55 echo ""
          ""; // line 37 echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans((isset($context[""td_type""]) ? $context[""td_type""] : $this->getContext($context, ""td_type"")), array(), ""SonataAdminBundle""), ""html"", null, true); echo """"; echo twig_escape_filter($this->env, $context[""permission""], ""html"", null, true); echo ""
          ""; // line 46 $context[""typeChild""] = (($this->getAttribute($context[""child""], ""role"", array(), ""array"", true, true)) ? ($this->getAttribute($context[""child""], ""role"", array(), ""array"")) : ($this->getAttribute($context[""child""], ""user"", array(), ""array""))); // line 47 echo "" ""; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context[""typeChild""]) ? $context[""typeChild""] : $this->getContext($context, ""typeChild"")), ""vars"", array()), ""value"", array()), ""html"", null, true); echo "" ""; // line 48 echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context[""typeChild""]) ? $context[""typeChild""] : $this->getContext($context, ""typeChild"")), 'widget'); echo "" ""; echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($context[""child""], $context[""permission""], array(), ""array""), 'widget', array(""label"" => false)); echo ""
          ""; // line 59 echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context[""form""]) ? $context[""form""] : $this->getContext($context, ""form"")), ""_token"", array()), 'row'); echo ""
          env, $this->env->getExtension('translator')->trans(""btn_update_acl"", array(), ""SonataAdminBundle""), ""html"", null, true); echo ""\"">
          ""; } catch (Exception $e) { ob_end_clean(); throw $e; } return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); } public function getTemplateName() { return ""SonataAdminBundle:CRUD:base_acl_macro.html.twig""; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 182 => 62, 176 => 59, 170 => 55, 159 => 53, 150 => 51, 146 => 50, 141 => 48, 136 => 47, 134 => 46, 129 => 43, 125 => 41, 116 => 39, 112 => 38, 108 => 37, 105 => 36, 102 => 35, 91 => 34, 87 => 32, 80 => 30, 76 => 29, 68 => 23, 62 => 20, 59 => 19, 57 => 18, 54 => 17, 50 => 16, 43 => 14, 40 => 13, 24 => 12, 19 => 11,); } } ",0 "anagement application. * * Copyright (C) 2003-2008 ATEOR * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public * License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * * PHP version 5.1.0+ * * @package Onlogistics * @author ATEOR dev team * @copyright 2003-2008 ATEOR * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU AGPL * @version SVN: $Id$ * @link http://www.onlogistics.org * @link http://onlogistics.googlecode.com * @since File available since release 0.1.0 * @filesource */ class GridColumnOrderWOOpeTaskList extends AbstractGridColumn { /** * Constructor * * @access protected */ function GridColumnOrderWOOpeTaskList($title = '', $params = array()) { parent::__construct($title, $params); } function Render($object) { require_once('Objects/WorkOrder.php'); $WorkOrderState = Tools::getValueFromMacro($object, '%OwnerWorkerOrder.State%'); if ($WorkOrderState == WorkOrder::WORK_ORDER_STATE_FULL) { // si le WO associe est cloture if (0 == $object->GetOrderInWorkOrder() || is_Null($object->GetOrderInWorkOrder())) { $output = _('N/A'); } else { $output = $object->GetOrderInWorkOrder(); } } else { // si pas cloture, on propose de le modifier: input text if (0 == $object->GetOrderInWorkOrder() || is_Null($object->GetOrderInWorkOrder())) { $output = ''; } else { $output = 'GetOrderInWorkOrder() . '"">'; } $output .= 'GetId() . '"">'; } return $output; } } ?> ",0 "gma omp atomic // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected an expression statement}} { foo(); goto L1; // expected-error {{use of undeclared label 'L1'}} } goto L2; // expected-error {{use of undeclared label 'L2'}} #pragma omp atomic // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected an expression statement}} { foo(); L2: foo(); } return 0; } struct S { int a; }; int readint() { int a = 0, b = 0; // Test for atomic read #pragma omp atomic read // expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}} // expected-note@+1 {{expected an expression statement}} ; #pragma omp atomic read // expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}} // expected-note@+1 {{expected built-in assignment operator}} foo(); #pragma omp atomic read // expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}} // expected-note@+1 {{expected built-in assignment operator}} a += b; #pragma omp atomic read // expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}} // expected-note@+1 {{expected lvalue expression}} a = 0; #pragma omp atomic read a = b; // expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'read' clause}} #pragma omp atomic read read a = b; return 0; } int readS() { struct S a, b; // expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'read' clause}} expected-error@+1 {{unexpected OpenMP clause 'allocate' in directive '#pragma omp atomic'}} #pragma omp atomic read read allocate(a) // expected-error@+2 {{the statement for 'atomic read' must be an expression statement of form 'v = x;', where v and x are both lvalue expressions with scalar type}} // expected-note@+1 {{expected expression of scalar type}} a = b; return a.a; } int writeint() { int a = 0, b = 0; // Test for atomic write #pragma omp atomic write // expected-error@+2 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is a lvalue expression with scalar type}} // expected-note@+1 {{expected an expression statement}} ; #pragma omp atomic write // expected-error@+2 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is a lvalue expression with scalar type}} // expected-note@+1 {{expected built-in assignment operator}} foo(); #pragma omp atomic write // expected-error@+2 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is a lvalue expression with scalar type}} // expected-note@+1 {{expected built-in assignment operator}} a += b; #pragma omp atomic write a = 0; #pragma omp atomic write a = b; // expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'write' clause}} #pragma omp atomic write write a = b; return 0; } int writeS() { struct S a, b; // expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'write' clause}} #pragma omp atomic write write // expected-error@+2 {{the statement for 'atomic write' must be an expression statement of form 'x = expr;', where x is a lvalue expression with scalar type}} // expected-note@+1 {{expected expression of scalar type}} a = b; return a.a; } int updateint() { int a = 0, b = 0; // Test for atomic update #pragma omp atomic update // expected-error@+2 {{the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected an expression statement}} ; #pragma omp atomic // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected built-in binary or unary operator}} foo(); #pragma omp atomic // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected built-in binary operator}} a = b; #pragma omp atomic update // expected-error@+2 {{the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected one of '+', '*', '-', '/', '&', '^', '|', '<<', or '>>' built-in operations}} a = b || a; #pragma omp atomic update // expected-error@+2 {{the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected one of '+', '*', '-', '/', '&', '^', '|', '<<', or '>>' built-in operations}} a = a && b; #pragma omp atomic update // expected-error@+2 {{the statement for 'atomic update' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected in right hand side of expression}} a = (float)a + b; #pragma omp atomic // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected in right hand side of expression}} a = 2 * b; #pragma omp atomic // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression with scalar type}} // expected-note@+1 {{expected in right hand side of expression}} a = b + *&a; #pragma omp atomic update *&a = *&a + 2; #pragma omp atomic update a++; #pragma omp atomic ++a; #pragma omp atomic update a--; #pragma omp atomic --a; #pragma omp atomic update a += b; #pragma omp atomic a %= b; #pragma omp atomic update a *= b; #pragma omp atomic a -= b; #pragma omp atomic update a /= b; #pragma omp atomic a &= b; #pragma omp atomic update a ^= b; #pragma omp atomic a |= b; #pragma omp atomic update a <<= b; #pragma omp atomic a >>= b; #pragma omp atomic update a = b + a; #pragma omp atomic a = a * b; #pragma omp atomic update a = b - a; #pragma omp atomic a = a / b; #pragma omp atomic update a = b & a; #pragma omp atomic a = a ^ b; #pragma omp atomic update a = b | a; #pragma omp atomic a = a << b; #pragma omp atomic a = b >> a; // expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'update' clause}} #pragma omp atomic update update a /= b; return 0; } int captureint() { int a = 0, b = 0, c = 0; // Test for atomic capture #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}} // expected-note@+1 {{expected compound statement}} ; #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected assignment expression}} foo(); #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected built-in binary or unary operator}} a = b; #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected assignment expression}} a = b || a; #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected one of '+', '*', '-', '/', '&', '^', '|', '<<', or '>>' built-in operations}} b = a = a && b; #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected assignment expression}} a = (float)a + b; #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected assignment expression}} a = 2 * b; #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected assignment expression}} a = b + *&a; #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}} // expected-note@+1 {{expected exactly two expression statements}} { a = b; } #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}} // expected-note@+1 {{expected exactly two expression statements}} {} #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}} // expected-note@+1 {{expected in right hand side of the first expression}} {a = b;a = b;} #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be a compound statement of form '{v = x; x binop= expr;}', '{x binop= expr; v = x;}', '{v = x; x = x binop expr;}', '{v = x; x = expr binop x;}', '{x = x binop expr; v = x;}', '{x = expr binop x; v = x;}' or '{v = x; x = expr;}', '{v = x; x++;}', '{v = x; ++x;}', '{++x; v = x;}', '{x++; v = x;}', '{v = x; x--;}', '{v = x; --x;}', '{--x; v = x;}', '{x--; v = x;}' where x is an l-value expression with scalar type}} // expected-note@+1 {{expected in right hand side of the first expression}} {a = b; a = b || a;} #pragma omp atomic capture {b = a; a = a && b;} #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected in right hand side of expression}} b = a = (float)a + b; #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected in right hand side of expression}} b = a = 2 * b; #pragma omp atomic capture // expected-error@+2 {{the statement for 'atomic capture' must be an expression statement of form 'v = ++x;', 'v = --x;', 'v = x++;', 'v = x--;', 'v = x binop= expr;', 'v = x = x binop expr' or 'v = x = expr binop x', where x and v are both l-value expressions with scalar type}} // expected-note@+1 {{expected in right hand side of expression}} b = a = b + *&a; #pragma omp atomic capture c = *&a = *&a + 2; #pragma omp atomic capture c = a++; #pragma omp atomic capture c = ++a; #pragma omp atomic capture c = a--; #pragma omp atomic capture c = --a; #pragma omp atomic capture c = a += b; #pragma omp atomic capture c = a %= b; #pragma omp atomic capture c = a *= b; #pragma omp atomic capture c = a -= b; #pragma omp atomic capture c = a /= b; #pragma omp atomic capture c = a &= b; #pragma omp atomic capture c = a ^= b; #pragma omp atomic capture c = a |= b; #pragma omp atomic capture c = a <<= b; #pragma omp atomic capture c = a >>= b; #pragma omp atomic capture c = a = b + a; #pragma omp atomic capture c = a = a * b; #pragma omp atomic capture c = a = b - a; #pragma omp atomic capture c = a = a / b; #pragma omp atomic capture c = a = b & a; #pragma omp atomic capture c = a = a ^ b; #pragma omp atomic capture c = a = b | a; #pragma omp atomic capture c = a = a << b; #pragma omp atomic capture c = a = b >> a; #pragma omp atomic capture { c = *&a; *&a = *&a + 2;} #pragma omp atomic capture { *&a = *&a + 2; c = *&a;} #pragma omp atomic capture {c = a; a++;} #pragma omp atomic capture {c = a; (a)++;} #pragma omp atomic capture {++a;c = a;} #pragma omp atomic capture {c = a;a--;} #pragma omp atomic capture {--a;c = a;} #pragma omp atomic capture {c = a; a += b;} #pragma omp atomic capture {c = a; (a) += b;} #pragma omp atomic capture {a %= b; c = a;} #pragma omp atomic capture {c = a; a *= b;} #pragma omp atomic capture {a -= b;c = a;} #pragma omp atomic capture {c = a; a /= b;} #pragma omp atomic capture {a &= b; c = a;} #pragma omp atomic capture {c = a; a ^= b;} #pragma omp atomic capture {a |= b; c = a;} #pragma omp atomic capture {c = a; a <<= b;} #pragma omp atomic capture {a >>= b; c = a;} #pragma omp atomic capture {c = a; a = b + a;} #pragma omp atomic capture {a = a * b; c = a;} #pragma omp atomic capture {c = a; a = b - a;} #pragma omp atomic capture {a = a / b; c = a;} #pragma omp atomic capture {c = a; a = b & a;} #pragma omp atomic capture {a = a ^ b; c = a;} #pragma omp atomic capture {c = a; a = b | a;} #pragma omp atomic capture {a = a << b; c = a;} #pragma omp atomic capture {c = a; a = b >> a;} #pragma omp atomic capture {c = a; a = foo();} // expected-error@+1 {{directive '#pragma omp atomic' cannot contain more than one 'capture' clause}} #pragma omp atomic capture capture b = a /= b; return 0; } ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.camel.component.elasticsearch; import java.util.HashMap; import java.util.Map; import org.apache.camel.Component; import org.apache.camel.component.extension.ComponentVerifierExtension; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Assert; import org.junit.Test; public class ElasticsearchRestComponentVerifierExtensionTest extends CamelTestSupport { // ************************************************* // Tests (parameters) // ************************************************* @Override public boolean isUseRouteBuilder() { return false; } @Test public void testParameters() throws Exception { Component component = context().getComponent(""elasticsearch-rest""); ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new); Map parameters = new HashMap<>(); parameters.put(""hostAddresses"", ""http://localhost:9000""); parameters.put(""clusterName"", ""es-test""); ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters); Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus()); } @Test public void testConnectivity() throws Exception { Component component = context().getComponent(""elasticsearch-rest""); ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new); Map parameters = new HashMap<>(); parameters.put(""hostAddresses"", ""http://localhost:9000""); ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters); Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus()); } } ",0 "ponse; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Component\Yaml\Parser; use Symfony\Component\Yaml\Exception\ParseException; class FrontController extends Controller { /** * @Route(""/"", name=""front"") * @Template(""MawiFrostlogBundle::layout.html.twig"") */ public function frontAction() { return array(); } /** * @Route(""/check"", name=""ajax_login_check"") */ public function indexAction() { if (false === $this->get('security.context')->isGranted( 'IS_AUTHENTICATED_FULLY' )) { return new Response('NOT AUTHENTICATED'); } $token = $this->get('security.context')->getToken(); if ($token) { $user = $token->getUser(); if ($user) { return new Response('OK'); } else { return new Response('NO USER'); } } return new Response('NO TOKEN'); } public function loginPageAction() { $request = $this->getRequest(); $session = $request->getSession(); // get the login error if there is one if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) { $error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR); } else { $error = $session->get(SecurityContext::AUTHENTICATION_ERROR); $session->remove(SecurityContext::AUTHENTICATION_ERROR); } return $this->render('MawiFrostlogBundle:Front:login.html.twig', array( // last username entered by the user 'last_username' => $session->get(SecurityContext::LAST_USERNAME), 'error' => $error, )); } /** * @Route(""/login"", name=""login"") */ public function loginAction() { return $this->render('MawiFrostlogBundle::layout.html.twig', array( // last username entered by the user 'content' => 'MawiFrostlogBundle:Front:loginPage', )); } /** * @Route(""/login/done"", name=""login_done"") */ public function loginDoneAction() { return new Response('DONE'); } /** * @Route(""/login/fail"", name=""login_fail"") */ public function loginFailAction() { return new Response('FAIL'); } /** * @Route(""/login_check"", name=""login_check"") */ public function loginCheckAction() { } /** * @Route(""/logout"", name=""logout"") */ public function logoutAction() { } } ",0 " made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ package org.eclipse.smarthome.io.rest.core.link; import java.util.ArrayList; import java.util.Collection; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import javax.ws.rs.core.UriInfo; import org.eclipse.smarthome.core.thing.ChannelUID; import org.eclipse.smarthome.core.thing.link.AbstractLink; import org.eclipse.smarthome.core.thing.link.ItemChannelLink; import org.eclipse.smarthome.core.thing.link.ItemChannelLinkRegistry; import org.eclipse.smarthome.core.thing.link.ThingLinkManager; import org.eclipse.smarthome.core.thing.link.dto.AbstractLinkDTO; import org.eclipse.smarthome.core.thing.link.dto.ItemChannelLinkDTO; import org.eclipse.smarthome.io.rest.JSONResponse; import org.eclipse.smarthome.io.rest.RESTResource; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; /** * This class acts as a REST resource for links. * * @author Dennis Nobel - Initial contribution * @author Yordan Zhelev - Added Swagger annotations * @author Kai Kreuzer - Removed Thing links and added auto link url */ @Path(ItemChannelLinkResource.PATH_LINKS) @Api(value = ItemChannelLinkResource.PATH_LINKS) public class ItemChannelLinkResource implements RESTResource { /** The URI path to this resource */ public static final String PATH_LINKS = ""links""; private ItemChannelLinkRegistry itemChannelLinkRegistry; private ThingLinkManager thingLinkManager; @Context UriInfo uriInfo; @GET @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = ""Gets all available links."", response = ItemChannelLinkDTO.class, responseContainer = ""Collection"") @ApiResponses(value = { @ApiResponse(code = 200, message = ""OK"") }) public Response getAll() { Collection channelLinks = itemChannelLinkRegistry.getAll(); return Response.ok(toBeans(channelLinks)).build(); } @GET @Path(""/auto"") @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = ""Tells whether automatic link mode is active or not"", response = Boolean.class) @ApiResponses(value = { @ApiResponse(code = 200, message = ""OK"") }) public Response isAutomatic() { return Response.ok(thingLinkManager.isAutoLinksEnabled()).build(); } @PUT @Path(""/{itemName}/{channelUID}"") @ApiOperation(value = ""Links item to a channel."") @ApiResponses(value = { @ApiResponse(code = 200, message = ""OK""), @ApiResponse(code = 400, message = ""Item already linked to the channel."") }) public Response link(@PathParam(""itemName"") @ApiParam(value = ""itemName"") String itemName, @PathParam(""channelUID"") @ApiParam(value = ""channelUID"") String channelUid) { itemChannelLinkRegistry.add(new ItemChannelLink(itemName, new ChannelUID(channelUid))); return Response.ok().build(); } @DELETE @Path(""/{itemName}/{channelUID}"") @ApiOperation(value = ""Unlinks item from a channel."") @ApiResponses(value = { @ApiResponse(code = 200, message = ""OK""), @ApiResponse(code = 404, message = ""Link not found.""), @ApiResponse(code = 405, message = ""Link not editable."") }) public Response unlink(@PathParam(""itemName"") @ApiParam(value = ""itemName"") String itemName, @PathParam(""channelUID"") @ApiParam(value = ""channelUID"") String channelUid) { String linkId = AbstractLink.getIDFor(itemName, new ChannelUID(channelUid)); if (itemChannelLinkRegistry.get(linkId) == null) { String message = ""Link "" + linkId + "" does not exist!""; return JSONResponse.createResponse(Status.NOT_FOUND, null, message); } ItemChannelLink result = itemChannelLinkRegistry .remove(AbstractLink.getIDFor(itemName, new ChannelUID(channelUid))); if (result != null) { return Response.ok().build(); } else { return JSONResponse.createErrorResponse(Status.METHOD_NOT_ALLOWED, ""Channel is read-only.""); } } protected void setThingLinkManager(ThingLinkManager thingLinkManager) { this.thingLinkManager = thingLinkManager; } protected void unsetThingLinkManager(ThingLinkManager thingLinkManager) { this.thingLinkManager = null; } protected void setItemChannelLinkRegistry(ItemChannelLinkRegistry itemChannelLinkRegistry) { this.itemChannelLinkRegistry = itemChannelLinkRegistry; } protected void unsetItemChannelLinkRegistry(ItemChannelLinkRegistry itemChannelLinkRegistry) { this.itemChannelLinkRegistry = null; } private Collection toBeans(Iterable links) { Collection beans = new ArrayList<>(); for (AbstractLink link : links) { ItemChannelLinkDTO bean = new ItemChannelLinkDTO(link.getItemName(), link.getUID().toString()); beans.add(bean); } return beans; } } ",0 "his software and associated documentation files (the ""Software""), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is furnished to do * so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.xeiam.xchange.justcoin.service.polling; import java.io.IOException; import java.util.Collection; import java.util.HashSet; import java.util.Set; import si.mazi.rescu.RestProxyFactory; import com.xeiam.xchange.ExchangeSpecification; import com.xeiam.xchange.currency.CurrencyPair; import com.xeiam.xchange.justcoin.Justcoin; import com.xeiam.xchange.justcoin.JustcoinAdapters; import com.xeiam.xchange.justcoin.dto.marketdata.JustcoinTicker; import com.xeiam.xchange.service.BaseExchangeService; import com.xeiam.xchange.utils.AuthUtils; public class JustcoinBasePollingService extends BaseExchangeService { protected final T justcoin; private final Set currencyPairs = new HashSet(); /** * Constructor * * @param exchangeSpecification The {@link ExchangeSpecification} */ public JustcoinBasePollingService(Class type, ExchangeSpecification exchangeSpecification) { super(exchangeSpecification); this.justcoin = RestProxyFactory.createProxy(type, exchangeSpecification.getSslUri()); } @Override public Collection getExchangeSymbols() throws IOException { if (currencyPairs.isEmpty()) { for (final JustcoinTicker ticker : justcoin.getTickers()) { final CurrencyPair currencyPair = JustcoinAdapters.adaptCurrencyPair(ticker.getId()); currencyPairs.add(currencyPair); } } return currencyPairs; } protected String getBasicAuthentication() { return AuthUtils.getBasicAuth(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); } } ",0 "javadoc (build 1.6.0_17) on Sun May 04 13:42:20 MDT 2014 --> Uses of Class simplealgebra.ga.SymbolicWedge
          Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
           PREV   NEXT FRAMES    NO FRAMES    

          Uses of Class
          simplealgebra.ga.SymbolicWedge

          No usage of simplealgebra.ga.SymbolicWedge


          Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
           PREV   NEXT FRAMES    NO FRAMES    

          ",0 "l"" lang=""en"" xml:lang=""en""> food blogging | Introduction to New Media

          food blogging

          By ColoradoGirl - Posted on 4 February 2007 - 2:06pm.

          I love to eat. Ok, let me clarify that – I love to eat good food. Today while savoring the Sunday NY Times Style section, I saw an article of blogging interest, Sharp Bites. Exploring how restaurant critics (or the more likely case on blogs, people like me who just love to eat out and sample new venues) are blogging their way into internet fame; ""hundreds of thousands of hits"" it what one blog got after it started posting a comical recipe for cupcakes that resembled Janet Jackson's bare breast at the Super Bowl.

          I am interested in how the blogs critiquing food and restaurants are able to be more open, more honest, and more vicious (??) with their comments. We talked about the emergence of more opinionated political writing in the blogosphere, and I think you'll agree with me that food critiques on blogs are la même chose.

          What does this upsurge in food bloggers do to reputation of restaurants? I recently dined at a hole-in-the wall sushi place outside L.A. . . . I consider myself to be a sushi expert (having traveled to Japan and consumed mass amounts of the delicious food there and at good sushi joints elsewhere) and what I tasted at this particular restaurant was absolutely sickening. However, a blog I found congratulated this very restaurant on serving ""sushi that even sushi haters will love."" Hmmm, where's the truth there?!

          Submitted by Bumpkins on 4 February 2007 - 7:14pm.

          See.

          - If this takes away your anonymity feel free to delete it.

          Recent comments

          social software tools

          new media studies sites

          ",0 "l GNU GPL * @copyright (C) 2012-2016 Gregor Anzelj, info@povsod.com * */ defined('INTERNAL') || die(); $string['pluginname'] = 'Cloud service'; $string['cloud'] = 'Cloud service'; $string['clouds'] = 'Cloud services'; $string['service'] = 'Service'; $string['servicefiles'] = '%s Files'; $string['unknownservice'] = 'Unknown Service'; $string['account'] = 'Account'; $string['manage'] = 'Manage'; $string['access'] = 'Access'; $string['accessgrant'] = 'Grant access'; $string['accessrevoke'] = 'Revoke access'; $string['accessrevoked'] = 'Access revoked successfully'; $string['httprequestcode'] = 'HTTP request unsuccessful with code: %s'; $string['ticketnotreturned'] = 'There was no ticket'; $string['requesttokennotreturned'] = 'There was no request token'; $string['accesstokennotreturned'] = 'There was no access token'; $string['accesstokensaved'] = 'Access token saved sucessfully'; $string['accesstokensavefailed'] = 'Failed to save access token'; $string['servererror'] = 'There was server error when downloading a file'; $string['userinfo'] = 'User information'; $string['username'] = 'User name'; $string['useremail'] = 'User email'; $string['userprofile'] = 'User profile'; $string['userid'] = 'User ID'; $string['usageinfo'] = 'Usage information'; $string['filename'] = 'File name'; $string['foldername'] = 'Folder name'; $string['description'] = 'Description'; $string['Shared'] = 'Shared'; $string['Revision'] = 'Revision'; $string['fileaccessdenied'] = 'You cannot access this file'; $string['folderaccessdenied'] = 'You cannot access this folder'; $string['consenttitle'] = 'The app %s would like to connect with your %s account'; $string['consentmessage'] = 'By entering the details in the form below, you are authorizing this application or website to access the files in your account.'; $string['allow'] = 'Allow'; $string['deny'] = 'Deny'; $string['filedetails'] = 'Details about %s'; $string['exporttomahara'] = 'Export to Mahara'; $string['export'] = 'Export'; $string['selectfileformat'] = 'Select format to export file to:'; $string['savetofolder'] = 'Save file to folder:'; $string['savetomahara'] = 'Save to Mahara'; $string['save'] = 'Save'; $string['preview'] = 'Preview'; $string['download'] = 'Download'; $string['servicenotconfigured'] = 'This service is not configured yet.'; $string['servicenotauthorised'] = 'This service is not authorised yet.'; /* ===== jQuery DataTable strings ===== */ $string['loading'] = 'Loading ...'; $string['processing'] = 'Processing ...'; $string['firstpage'] = 'First'; $string['previouspage'] = 'Previous'; $string['nextpage'] = 'Next'; $string['lastpage'] = 'Last'; $string['emptytable'] = 'No data available in table'; $string['info'] = 'Showing _START_ to _END_ of _TOTAL_ entries'; // Don't translate: _START_, _END_ and _TOTAL_ $string['infoempty'] = 'No entries to show'; $string['infofiltered'] = '(filtered from _MAX_ total entries)'; // Don't tanslate: _MAX_ $string['lengthmenu'] = 'Show _MENU_ entries'; // Don't tanslate: _MENU_ $string['search'] = 'Search:'; $string['zerorecords'] = 'No matching entries found'; ",0 "mpliance 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. */ package com.ibm.watson.visual_recognition.v4.model; import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; import com.ibm.cloud.sdk.core.service.model.GenericModel; import java.util.ArrayList; import java.util.List; /** The addImages options. */ public class AddImagesOptions extends GenericModel { protected String collectionId; protected List imagesFile; protected List imageUrl; protected String trainingData; /** Builder. */ public static class Builder { private String collectionId; private List imagesFile; private List imageUrl; private String trainingData; private Builder(AddImagesOptions addImagesOptions) { this.collectionId = addImagesOptions.collectionId; this.imagesFile = addImagesOptions.imagesFile; this.imageUrl = addImagesOptions.imageUrl; this.trainingData = addImagesOptions.trainingData; } /** Instantiates a new builder. */ public Builder() {} /** * Instantiates a new builder with required properties. * * @param collectionId the collectionId */ public Builder(String collectionId) { this.collectionId = collectionId; } /** * Builds a AddImagesOptions. * * @return the new AddImagesOptions instance */ public AddImagesOptions build() { return new AddImagesOptions(this); } /** * Adds an imagesFile to imagesFile. * * @param imagesFile the new imagesFile * @return the AddImagesOptions builder */ public Builder addImagesFile(FileWithMetadata imagesFile) { com.ibm.cloud.sdk.core.util.Validator.notNull(imagesFile, ""imagesFile cannot be null""); if (this.imagesFile == null) { this.imagesFile = new ArrayList(); } this.imagesFile.add(imagesFile); return this; } /** * Adds an imageUrl to imageUrl. * * @param imageUrl the new imageUrl * @return the AddImagesOptions builder */ public Builder addImageUrl(String imageUrl) { com.ibm.cloud.sdk.core.util.Validator.notNull(imageUrl, ""imageUrl cannot be null""); if (this.imageUrl == null) { this.imageUrl = new ArrayList(); } this.imageUrl.add(imageUrl); return this; } /** * Set the collectionId. * * @param collectionId the collectionId * @return the AddImagesOptions builder */ public Builder collectionId(String collectionId) { this.collectionId = collectionId; return this; } /** * Set the imagesFile. Existing imagesFile will be replaced. * * @param imagesFile the imagesFile * @return the AddImagesOptions builder */ public Builder imagesFile(List imagesFile) { this.imagesFile = imagesFile; return this; } /** * Set the imageUrl. Existing imageUrl will be replaced. * * @param imageUrl the imageUrl * @return the AddImagesOptions builder */ public Builder imageUrl(List imageUrl) { this.imageUrl = imageUrl; return this; } /** * Set the trainingData. * * @param trainingData the trainingData * @return the AddImagesOptions builder */ public Builder trainingData(String trainingData) { this.trainingData = trainingData; return this; } } protected AddImagesOptions(Builder builder) { com.ibm.cloud.sdk.core.util.Validator.notEmpty( builder.collectionId, ""collectionId cannot be empty""); collectionId = builder.collectionId; imagesFile = builder.imagesFile; imageUrl = builder.imageUrl; trainingData = builder.trainingData; } /** * New builder. * * @return a AddImagesOptions builder */ public Builder newBuilder() { return new Builder(this); } /** * Gets the collectionId. * *

          The identifier of the collection. * * @return the collectionId */ public String collectionId() { return collectionId; } /** * Gets the imagesFile. * *

          An array of image files (.jpg or .png) or .zip files with images. - Include a maximum of 20 * images in a request. - Limit the .zip file to 100 MB. - Limit each image file to 10 MB. * *

          You can also include an image with the **image_url** parameter. * * @return the imagesFile */ public List imagesFile() { return imagesFile; } /** * Gets the imageUrl. * *

          The array of URLs of image files (.jpg or .png). - Include a maximum of 20 images in a * request. - Limit each image file to 10 MB. - Minimum width and height is 30 pixels, but the * service tends to perform better with images that are at least 300 x 300 pixels. Maximum is 5400 * pixels for either height or width. * *

          You can also include images with the **images_file** parameter. * * @return the imageUrl */ public List imageUrl() { return imageUrl; } /** * Gets the trainingData. * *

          Training data for a single image. Include training data only if you add one image with the * request. * *

          The `object` property can contain alphanumeric, underscore, hyphen, space, and dot * characters. It cannot begin with the reserved prefix `sys-` and must be no longer than 32 * characters. * * @return the trainingData */ public String trainingData() { return trainingData; } } ",0 "mlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"" lang=""en""> schrodinger.graphics3d.polyhedron.MaestroIcosahedron
             Trees       Indices       Help   
          2015-2Schrodinger Python API
          Package schrodinger :: Package graphics3d :: Module polyhedron :: Class MaestroIcosahedron
          [hide private]
          [frames] | no frames]

          Class MaestroIcosahedron

                object --+            
                         |            
          common.Primitive --+        
                             |        
                    Polyhedron --+    
                                 |    
             MaestroPolyhedronCore --+
                                     |
                                    MaestroIcosahedron
          
          Known Subclasses:

          Class to draw a 3D icosahedron in Maestro's Workspace.

          See Tetrahedron doc string for more details.

          Instance Methods [hide private]
           
          __init__(self, center, mode, length=None, radius=None, volume=None, color='red', opacity=1.0, style=1)
          Create a polyhedron centered at center.
           
          getVertices(self, center, length=None, radius=None, volume=None)
          Get a list of vertices.
           
          getIndices(self)
          @return The indices of the faces

          Inherited from MaestroPolyhedronCore: getFaces, updateVertices

          Inherited from Polyhedron: setStyle, update

          Inherited from Polyhedron (private): _calculateBoundingBox, _draw, _setNormals

          Inherited from common.Primitive: __del__, groupHidden, groupShown, hide, isGroupShown, isShown, setEntryID, show

          Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

          Static Methods [hide private]

          Inherited from Polyhedron (private): _glReset, _glSetup

          Class Variables [hide private]
          Instance Variables [hide private]

          Inherited from Polyhedron: faces, normals, vertices

          Properties [hide private]

          Inherited from object: __class__

          Method Details [hide private]

          __init__(self, center, mode, length=None, radius=None, volume=None, color='red', opacity=1.0, style=1)
          (Constructor)

           

          Create a polyhedron centered at center. Note that one of length, radius, volume is needed to create the shape.

          Parameters:
          • center - List of 3 Angstrom values indicating the center coordinate of the tetrahedron.
          • length - Length in Angstroms of each of the edges of the tetrahedron.
          • radius - Circumsphere radius in Angstroms from center of tetrahedron.
          • volume - Volume in cubed Angstroms of the object.
          • color - One of - Color object, Color name (string), or Tuple of (R, G, B) (each 0.0-1.0)
          • opacity - 0.0 (invisible) through 1.0 (opaque). Defaults to 1.0
          • style - LINE or FILL. Default is FILL.
          Raises:
          • RuntimeError - If a single option from length, radius, and volume does not have a value.
          • ValueError - If the size parameter (length, radius, or volume) is not a float.
          • NotImplementedError - If the initiating subclass does not have a getVertices or getFaces method.
          Overrides: object.__init__

          getVertices(self, center, length=None, radius=None, volume=None)

           

          Get a list of vertices. If the center coordinates are considered the origin the vertices will have a base on the y-plane, a vertex on the x-axis and a vertex directly in the +z-axis from the center.

          Parameters:
          • center (List) - List of 3 Angstrom values indicating the center coordinate of the icosahedron.
          • length (float) - Length in Angstroms of each of the sides of the icosahedron. Note: length or radius must be specified to create icosahedron.
          • radius (float) - Circumsphere radius in Angstroms from center of icosahedron. Note: length or radius must be specified to create icosahedron.
          • volume (float) - Volume in cubed Angstroms of the object.
          Overrides: MaestroPolyhedronCore.getVertices

          getIndices(self)

           

          @return The indices of the faces

          Overrides: MaestroPolyhedronCore.getIndices

             Trees       Indices       Help   
          2015-2Schrodinger Python API
          Generated by Epydoc 3.0.1 on Sat May 9 06:31:22 2015 http://epydoc.sourceforge.net
          ",0 "Offload_SES\Aws3\Aws\Api\StructureShape; use DeliciousBrains\WP_Offload_SES\Aws3\Aws\CommandInterface; use DeliciousBrains\WP_Offload_SES\Aws3\Aws\ResultInterface; use DeliciousBrains\WP_Offload_SES\Aws3\Psr\Http\Message\ResponseInterface; use DeliciousBrains\WP_Offload_SES\Aws3\Psr\Http\Message\StreamInterface; /** * @internal */ abstract class AbstractParser { /** @var \Aws\Api\Service Representation of the service API*/ protected $api; /** @var callable */ protected $parser; /** * @param Service $api Service description. */ public function __construct(\DeliciousBrains\WP_Offload_SES\Aws3\Aws\Api\Service $api) { $this->api = $api; } /** * @param CommandInterface $command Command that was executed. * @param ResponseInterface $response Response that was received. * * @return ResultInterface */ public abstract function __invoke(\DeliciousBrains\WP_Offload_SES\Aws3\Aws\CommandInterface $command, \DeliciousBrains\WP_Offload_SES\Aws3\Psr\Http\Message\ResponseInterface $response); public abstract function parseMemberFromStream(\DeliciousBrains\WP_Offload_SES\Aws3\Psr\Http\Message\StreamInterface $stream, \DeliciousBrains\WP_Offload_SES\Aws3\Aws\Api\StructureShape $member, $response); } ",0 "s(""nls"") public final class TPlus extends Token { public TPlus() { super.setText(""+""); } public TPlus(int line, int pos) { super.setText(""+""); setLine(line); setPos(pos); } @Override public Object clone() { return new TPlus(getLine(), getPos()); } @Override public void apply(Switch sw) { ((Analysis) sw).caseTPlus(this); } @Override public void setText(@SuppressWarnings(""unused"") String text) { throw new RuntimeException(""Cannot change TPlus text.""); } } ",0 "giosadmin.de. * * Nagios Administrator is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Nagios Administrator is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Nagios Administrator. If not, see . * * @package nagiosadmin * @subpackage generator * @license http://www.gnu.org/licenses/gpl.html * @link www.nagiosadmin.de * @version $Revision$ * @author Henrik Westphal */ ?>
          ",0 "le>tait: Not compatible 👼
          « Up

          tait 8.7.0 Not compatible 👼

          📅 (2021-12-29 02:51:29 UTC)

          Context

          # Packages matching: installed
          # Name                   # Installed # Synopsis
          base-bigarray            base
          base-threads             base
          base-unix                base
          conf-findutils           1           Virtual package relying on findutils
          conf-gmp                 3           Virtual package relying on a GMP lib system installation
          coq                      8.14.1      Formal proof management system
          dune                     2.9.1       Fast, portable, and opinionated build system
          ocaml                    4.06.1      The OCaml compiler (virtual package)
          ocaml-base-compiler      4.06.1      Official 4.06.1 release
          ocaml-config             1           OCaml Switch Configuration
          ocaml-secondary-compiler 4.08.1-1    OCaml 4.08.1 Secondary Switch Compiler
          ocamlfind                1.9.1       A library manager for OCaml
          ocamlfind-secondary      1.9.1       Adds support for ocaml-secondary-compiler to ocamlfind
          zarith                   1.12        Implements arithmetic and logical operations over arbitrary-precision integers
          # opam file:
          opam-version: "2.0"
          maintainer: "Hugo.Herbelin@inria.fr"
          homepage: "https://github.com/coq-contribs/tait"
          license: "LGPL 2.1"
          build: [make "-j%{jobs}%"]
          install: [make "install"]
          remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Tait"]
          depends: [
            "ocaml"
            "coq" {>= "8.7" & < "8.8~"}
          ]
          tags: [
            "keyword: normalization"
            "keyword: lambda calculus"
            "keyword: extraction"
            "keyword: Tait proof"
            "keyword: normalization by evalution"
            "keyword: type theory" "category: Mathematics/Logic/Type theory"
            "category: Computer Science/Lambda Calculi"
            "category: Miscellaneous/Extracted Programs/Type checking unification and normalization"
            "date: 2004"
          ]
          authors: [ "Pierre Letouzey" "Helmut Schwichtenberg" ]
          bug-reports: "https://github.com/coq-contribs/tait/issues"
          dev-repo: "git+https://github.com/coq-contribs/tait.git"
          synopsis: "A normalization proof a la Tait for simply-typed lambda-calculus"
          description: """
          This is a formalization of Berger's TLCA'93 paper, with complete proofs
          of the axioms and an extraction of a normalization program close to N.B.E."""
          flags: light-uninstall
          url {
            src: "https://github.com/coq-contribs/tait/archive/v8.7.0.tar.gz"
            checksum: "md5=df90e5a8502acbb2f488408ed30528df"
          }
          

          Lint

          Command
          true
          Return code
          0

          Dry install 🏜️

          Dry install with the current Coq version:

          Command
          opam install -y --show-action coq-tait.8.7.0 coq.8.14.1
          Return code
          5120
          Output
          [NOTE] Package coq is already installed (current version is 8.14.1).
          The following dependencies couldn't be met:
            - coq-tait -> coq < 8.8~ -> ocaml < 4.06.0
                base of this switch (use `--unlock-base' to force)
          Your request can't be satisfied:
            - No available version of coq satisfies the constraints
          No solution found, exiting
          

          Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

          Command
          opam remove -y coq; opam install -y --show-action --unlock-base coq-tait.8.7.0
          Return code
          0

          Install dependencies

          Command
          true
          Return code
          0
          Duration
          0 s

          Install 🚀

          Command
          true
          Return code
          0
          Duration
          0 s

          Installation size

          No files were installed.

          Uninstall 🧹

          Command
          true
          Return code
          0
          Missing removes
          none
          Wrong removes
          none

          Sources are on GitHub © Guillaume Claret 🐣

          ",0 "an redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ package com.codegremlins.lemonjuice.engine; import com.codegremlins.lemonjuice.TemplateContext; import com.codegremlins.lemonjuice.util.Functions; class EqualElement extends Element { private Element left; private Element right; private boolean condition; public EqualElement(boolean condition, Element left, Element right) { this.condition = condition; this.left = left; this.right = right; } @Override public Object evaluate(TemplateContext model) throws Exception { Object lvalue = left.evaluate(model); Object rvalue = right.evaluate(model); return condition == Functions.compareEqual(lvalue, rvalue); } }",0 "ketOptions; import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.channels.DatagramChannel; import java.nio.channels.SocketChannel; import java.nio.channels.WritableByteChannel; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; import java.nio.charset.CoderResult; import java.util.Random; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * A java statsd client that makes use of LMAX disruptor for smart batching * of counter updates to a statsd server * @author raymond.mak */ public class StatsdClient { final static private byte COUNTER_METRIC_TYPE = 0; final static private byte GAUGE_METRIC_TYPE = 1; final static private byte HISTOGRAM_METRIC_TYPE = 2; final static private byte METER_METRIC_TYPE = 3; final static private byte TIMER_METRIC_TYPE = 4; final static private short HUNDRED_PERCENT = (short)10000; final static private String[] METRIC_TYPE_STRINGS = new String[] { ""|c"", ""|g"", ""|h"", ""|m"", ""|ms"", }; static private class CounterEvent { private byte metricsType; private short samplingRate = HUNDRED_PERCENT; // In hundredth of a percentage point, 10000 being 100% private String key; private long magnitude; public CounterEvent() { super(); } public byte getMetricsType() { return metricsType; } public void setMetricsType(byte value) { metricsType = value; } public short getSamplingRate() { return samplingRate; } public void setSamplingRate(short value) { samplingRate = value; } public String getKey() { return key; } public void setKey(String value) { key = value; } public long getMagnitude() { return magnitude; } public void setMagnitude(long value) { magnitude = value; } final static public EventFactory EVENT_FACTORY = new EventFactory() { @Override public CounterEvent newInstance() { return new CounterEvent(); } }; } final static private ThreadLocal threadLocalSampler = new ThreadLocal() { @Override public Random initialValue() { return new Random(System.currentTimeMillis()); } }; private class CounterEventHandler implements EventHandler { final static private int MAX_MESSAGE_SIZE = 1000; // Assuming MTU being 1500 for typical datacenter Eternet implementation, cap message size to 1000 bytes to avoid fragmentation private DatagramChannel datagramChannel; private SocketChannel socketChannel; private ByteBuffer counterMessageBuffer; private int messagesInBuffer = 0; private CharsetEncoder encoder = Charset.forName(""UTF-8"").newEncoder(); private WritableByteChannel outputChannel; private String statsdHostName; private int statsdPort; private long tcpConnectionRetryInterval = Long.MAX_VALUE; private long lastSuccessfulFlushTimestamp; private int timeDelayInMillisAfterIncompleteFlush; public CounterEventHandler( String statsdHostName, int statsdPort, boolean useTcp, int tcpMessageSize, long tcpConnectionRetryInterval, int timeDelayInMillisAfterIncompleteFlush) throws IOException { this.statsdHostName = statsdHostName; this.statsdPort = statsdPort; this.timeDelayInMillisAfterIncompleteFlush = timeDelayInMillisAfterIncompleteFlush; if (useTcp) { this.counterMessageBuffer = ByteBuffer.allocate(tcpMessageSize); this.tcpConnectionRetryInterval = tcpConnectionRetryInterval; openSocket(); } else { this.counterMessageBuffer = ByteBuffer.allocate(MAX_MESSAGE_SIZE); this.datagramChannel = DatagramChannel.open(); this.datagramChannel.connect( new InetSocketAddress(statsdHostName, statsdPort)); this.outputChannel = datagramChannel; } } private void openSocket() throws IOException { this.socketChannel = SocketChannel.open(); this.socketChannel.setOption(StandardSocketOptions.SO_KEEPALIVE, true); this.socketChannel.connect(new InetSocketAddress(statsdHostName, statsdPort)); this.outputChannel = socketChannel; this.socketChannel.shutdownInput(); } private void flush() throws IOException { onFlushMessageBuffer(); counterMessageBuffer.flip(); try { outputChannel.write(counterMessageBuffer); lastSuccessfulFlushTimestamp = System.currentTimeMillis(); } catch (Throwable e) { onFlushMessageFailure(e); if (socketChannel != null) { if (System.currentTimeMillis() - lastSuccessfulFlushTimestamp < tcpConnectionRetryInterval) { lastSuccessfulFlushTimestamp = System.currentTimeMillis(); if (socketChannel.isOpen()) { socketChannel.close(); } try { openSocket(); onReconnection(); } catch (Throwable innerException) {} } } } finally { counterMessageBuffer.clear(); messagesInBuffer = 0; } } private void addMessageToBuffer(String message) throws Exception { counterMessageBuffer.mark(); // Remember current position onCounterMessageReceived(); if (encoder.encode(CharBuffer.wrap(message), counterMessageBuffer, true) == CoderResult.OVERFLOW) { counterMessageBuffer.reset(); flush(); if (encoder.encode(CharBuffer.wrap(message), counterMessageBuffer, true) == CoderResult.OVERFLOW) { // Well the message is too big to fit in a single packet, throw it away counterMessageBuffer.clear(); onOversizedMessage(message); } else { messagesInBuffer++; } } else { messagesInBuffer++; } } @Override public void onEvent(CounterEvent t, long l, boolean bln) throws Exception { // Construct counter message String message = t.getKey().replace("":"", ""_"") + "":"" + Long.toString(t.getMagnitude()) + METRIC_TYPE_STRINGS[t.getMetricsType()] + (t.getSamplingRate() < HUNDRED_PERCENT ? String.format(""|@0.%4d\n"", t.getSamplingRate()/HUNDRED_PERCENT, t.getSamplingRate()%HUNDRED_PERCENT) : ""\n""); addMessageToBuffer(message); if (bln && messagesInBuffer > 0) { flush(); if (timeDelayInMillisAfterIncompleteFlush > 0) { Thread.sleep(timeDelayInMillisAfterIncompleteFlush); } } } public void close() throws Exception { if (datagramChannel != null) { datagramChannel.close(); } if (socketChannel != null) { socketChannel.close(); } } } private RingBuffer ringBuffer; private ExecutorService eventProcessorExecutor; private BatchEventProcessor counterEventProcessor; private CounterEventHandler counterEventHandler; private short defaultSamplingRate; protected StatsdClient() {} public StatsdClient( int ringBufferSize, final String statsdHostName, final int statsdPort, final boolean useTcp, final int tcpMessageSize, final int tcpConnectionRetryInterval, final int timeDelayInMillisAfterIncompletFlush, short defaultSamplingRate) throws Exception { this(ringBufferSize, statsdHostName, statsdPort, useTcp, tcpMessageSize, tcpConnectionRetryInterval, timeDelayInMillisAfterIncompletFlush, defaultSamplingRate, new BlockingWaitStrategy()); } static private class NullClient extends StatsdClient { public NullClient() {} @Override public void sendCounterMessage(byte metricsType, short samplingRate, String key, long magnitude) {} } static final public StatsdClient NULL = new NullClient(); public StatsdClient( int ringBufferSize, final String statsdHostName, final int statsdPort, final boolean useTcp, final int tcpMessageSize, final int tcpConnectionRetryInterval, final int timeDelayInMillisAfterIncompletFlush, short defaultSamplingRate, WaitStrategy waitStrategy ) throws Exception { this.defaultSamplingRate = defaultSamplingRate; ringBuffer = new RingBuffer<>(CounterEvent.EVENT_FACTORY, new MultiThreadedClaimStrategy(ringBufferSize), waitStrategy); counterEventHandler = new CounterEventHandler(statsdHostName, statsdPort, useTcp, tcpMessageSize, tcpConnectionRetryInterval, timeDelayInMillisAfterIncompletFlush); counterEventProcessor = new BatchEventProcessor<>(ringBuffer, ringBuffer.newBarrier(), counterEventHandler); ringBuffer.setGatingSequences(counterEventProcessor.getSequence()); eventProcessorExecutor = Executors.newSingleThreadExecutor(); eventProcessorExecutor.submit(counterEventProcessor); } public void shutdown() throws Exception { if (counterEventProcessor != null) { counterEventProcessor.halt(); counterEventProcessor = null; } if (counterEventHandler != null) { counterEventHandler.close(); } if (eventProcessorExecutor != null) { eventProcessorExecutor.shutdown(); eventProcessorExecutor = null; } } public void incrementCounter(String key, long magnitude) { incrementCounter(key, magnitude, defaultSamplingRate); } public void incrementCounter(String key, long magnitude, short samplingRate) { sendCounterMessage(COUNTER_METRIC_TYPE, samplingRate, key, magnitude); } public void updateGauge(String key, long magnitude) { updateGauge(key, magnitude, defaultSamplingRate); } public void updateGauge(String key, long magnitude, short samplingRate) { sendCounterMessage(GAUGE_METRIC_TYPE, samplingRate, key, magnitude); } public void updateHistogram(String key, long magnitude) { updateHistogram(key, magnitude, defaultSamplingRate); } public void updateHistogram(String key, long magnitude, short samplingRate) { sendCounterMessage(HISTOGRAM_METRIC_TYPE, samplingRate, key, magnitude); } public void updateMeter(String key, long magnitude) { updateMeter(key, magnitude, defaultSamplingRate); } public void updateMeter(String key, long magnitude, short samplingRate) { sendCounterMessage(METER_METRIC_TYPE, samplingRate, key, magnitude); } public void updateTimer(String key, long magnitude) { updateTimer(key, magnitude, defaultSamplingRate); } public void updateTimer(String key, long magnitude, short samplingRate) { sendCounterMessage(TIMER_METRIC_TYPE, samplingRate, key, magnitude); } // Extension points for intercepting interesting events in the statsd client // such as a counter message being picked up by the consumer thread and // when the message buffer is flushed down the wire. protected void onCounterMessageReceived() {} protected void onFlushMessageBuffer() {} protected void onFlushMessageFailure(Throwable exception) {} protected void onReconnection() {} protected void onOversizedMessage(String message) {} protected void onRingBufferOverflow() {} public void sendCounterMessage(byte metricsType, short samplingRate, String key, long magnitude) { if (samplingRate < HUNDRED_PERCENT && threadLocalSampler.get().nextInt(HUNDRED_PERCENT) >= samplingRate) { return; } try { long sequence = ringBuffer.tryNext(1); CounterEvent event = ringBuffer.get(sequence); event.setMetricsType(metricsType); event.setSamplingRate(samplingRate); event.setKey(key); event.setMagnitude(magnitude); ringBuffer.publish(sequence); } catch (InsufficientCapacityException e) { onRingBufferOverflow(); } } } ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.commons.io.monitor; import java.io.File; import java.io.Serializable; /** * {@link FileEntry} represents the state of a file or directory, capturing * the following {@link File} attributes at a point in time. *
            *
          • File Name (see {@link File#getName()})
          • *
          • Exists - whether the file exists or not (see {@link File#exists()})
          • *
          • Directory - whether the file is a directory or not (see {@link File#isDirectory()})
          • *
          • Last Modified Date/Time (see {@link File#lastModified()})
          • *
          • Length (see {@link File#length()}) - directories treated as zero
          • *
          • Children - contents of a directory (see {@link File#listFiles(java.io.FileFilter)})
          • *
          *

          *

          Custom Implementations

          * If the state of additional {@link File} attributes is required then create a custom * {@link FileEntry} with properties for those attributes. Override the * {@link #newChildInstance(File)} to return a new instance of the appropriate type. * You may also want to override the {@link #refresh(File)} method. * @see FileAlterationObserver * @since 2.0 */ public class FileEntry implements Serializable { static final FileEntry[] EMPTY_ENTRIES = new FileEntry[0]; private final FileEntry parent; private FileEntry[] children; private final File file; private String name; private boolean exists; private boolean directory; private long lastModified; private long length; /** * Construct a new monitor for a specified {@link File}. * * @param file The file being monitored */ public FileEntry(File file) { this((FileEntry)null, file); } /** * Construct a new monitor for a specified {@link File}. * * @param parent The parent * @param file The file being monitored */ public FileEntry(FileEntry parent, File file) { if (file == null) { throw new IllegalArgumentException(""File is missing""); } this.file = file; this.parent = parent; this.name = file.getName(); } /** * Refresh the attributes from the {@link File}, indicating * whether the file has changed. *

          * This implementation refreshes the name, exists, * directory, lastModified and length * properties. *

          * The exists, directory, lastModified * and length properties are compared for changes * * @param file the file instance to compare to * @return true if the file has changed, otherwise false */ public boolean refresh(File file) { // cache original values boolean origExists = exists; long origLastModified = lastModified; boolean origDirectory = directory; long origLength = length; // refresh the values name = file.getName(); exists = file.exists(); directory = exists ? file.isDirectory() : false; lastModified = exists ? file.lastModified() : 0; length = exists && !directory ? file.length() : 0; // Return if there are changes return exists != origExists || lastModified != origLastModified || directory != origDirectory || length != origLength; } /** * Create a new child instance. *

          * Custom implementations should override this method to return * a new instance of the appropriate type. * * @param file The child file * @return a new child instance */ public FileEntry newChildInstance(File file) { return new FileEntry(this, file); } /** * Return the parent entry. * * @return the parent entry */ public FileEntry getParent() { return parent; } /** * Return the level * * @return the level */ public int getLevel() { return parent == null ? 0 : parent.getLevel() + 1; } /** * Return the directory's files. * * @return This directory's files or an empty * array if the file is not a directory or the * directory is empty */ public FileEntry[] getChildren() { return children != null ? children : EMPTY_ENTRIES; } /** * Set the directory's files. * * @param children This directory's files, may be null */ public void setChildren(FileEntry[] children) { this.children = children; } /** * Return the file being monitored. * * @return the file being monitored */ public File getFile() { return file; } /** * Return the file name. * * @return the file name */ public String getName() { return name; } /** * Set the file name. * * @param name the file name */ public void setName(String name) { this.name = name; } /** * Return the last modified time from the last time it * was checked. * * @return the last modified time */ public long getLastModified() { return lastModified; } /** * Return the last modified time from the last time it * was checked. * * @param lastModified The last modified time */ public void setLastModified(long lastModified) { this.lastModified = lastModified; } /** * Return the length. * * @return the length */ public long getLength() { return length; } /** * Set the length. * * @param length the length */ public void setLength(long length) { this.length = length; } /** * Indicate whether the file existed the last time it * was checked. * * @return whether the file existed */ public boolean isExists() { return exists; } /** * Set whether the file existed the last time it * was checked. * * @param exists whether the file exists or not */ public void setExists(boolean exists) { this.exists = exists; } /** * Indicate whether the file is a directory or not. * * @return whether the file is a directory or not */ public boolean isDirectory() { return directory; } /** * Set whether the file is a directory or not. * * @param directory whether the file is a directory or not */ public void setDirectory(boolean directory) { this.directory = directory; } } ",0 "_once(__DIR__ . '/../include/header.php'); ?>

          查詢其他部落格公開資訊

          呼叫方式

          $pixapi->blog->info('userName');

          實際測試

          執行

          $pixapi->blog->info('');

          執行結果

          blog->info($query)); ?>
          ",0 "ile 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. */ package com.facebook.buck.parser; import static org.junit.Assert.assertEquals; import com.facebook.buck.core.cell.Cell; import com.facebook.buck.core.cell.TestCellBuilder; import com.facebook.buck.core.exceptions.DependencyStack; import com.facebook.buck.core.model.ConfigurationBuildTargetFactoryForTests; import com.facebook.buck.core.model.RuleType; import com.facebook.buck.core.model.UnconfiguredBuildTargetFactoryForTests; import com.facebook.buck.core.model.UnconfiguredBuildTargetView; import com.facebook.buck.core.model.targetgraph.impl.Package; import com.facebook.buck.core.model.targetgraph.raw.UnconfiguredTargetNode; import com.facebook.buck.core.parser.buildtargetparser.ParsingUnconfiguredBuildTargetViewFactory; import com.facebook.buck.core.plugin.impl.BuckPluginManagerFactory; import com.facebook.buck.core.rules.knowntypes.TestKnownRuleTypesProvider; import com.facebook.buck.core.rules.knowntypes.provider.KnownRuleTypesProvider; import com.facebook.buck.core.select.Selector; import com.facebook.buck.core.select.SelectorKey; import com.facebook.buck.core.select.SelectorList; import com.facebook.buck.core.select.impl.SelectorFactory; import com.facebook.buck.core.select.impl.SelectorListFactory; import com.facebook.buck.parser.api.ImmutablePackageMetadata; import com.facebook.buck.parser.syntax.ImmutableListWithSelects; import com.facebook.buck.parser.syntax.ImmutableSelectorValue; import com.facebook.buck.rules.coercer.JsonTypeConcatenatingCoercerFactory; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import java.util.List; import java.util.Optional; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; public class DefaultUnconfiguredTargetNodeFactoryTest { private DefaultUnconfiguredTargetNodeFactory factory; private Cell cell; @Rule public ExpectedException thrown = ExpectedException.none(); @Before public void setUp() { KnownRuleTypesProvider knownRuleTypesProvider = TestKnownRuleTypesProvider.create(BuckPluginManagerFactory.createPluginManager()); cell = new TestCellBuilder().build(); factory = new DefaultUnconfiguredTargetNodeFactory( knownRuleTypesProvider, new BuiltTargetVerifier(), cell.getCellPathResolver(), new SelectorListFactory( new SelectorFactory(new ParsingUnconfiguredBuildTargetViewFactory()))); } @Test public void testCreatePopulatesNode() { UnconfiguredBuildTargetView buildTarget = UnconfiguredBuildTargetFactoryForTests.newInstance(""//a/b:c""); ImmutableMap inputAttributes = ImmutableMap.builder() .put(""buck.type"", ""java_library"") .put(""name"", ""c"") .put(""buck.base_path"", ""a/b"") .put(""deps"", ImmutableList.of(""//a/b:d"", ""//a/b:e"")) .put( ""resources"", ImmutableListWithSelects.of( ImmutableList.of( ImmutableSelectorValue.of( ImmutableMap.of( ""//c:a"", ImmutableList.of(""//a/b:file1"", ""//a/b:file2""), ""//c:b"", ImmutableList.of(""//a/b:file3"", ""//a/b:file4"")), """")), ImmutableList.class)) .put(""visibility"", ImmutableList.of(""//a/..."")) .put(""within_view"", ImmutableList.of(""//b/..."")) .build(); ImmutableMap expectAttributes = ImmutableMap.builder() .put(""buck.type"", ""java_library"") .put(""name"", ""c"") .put(""buck.base_path"", ""a/b"") .put(""deps"", ImmutableList.of(""//a/b:d"", ""//a/b:e"")) .put( ""resources"", new SelectorList<>( JsonTypeConcatenatingCoercerFactory.createForType(List.class), ImmutableList.of( new Selector<>( ImmutableMap.of( new SelectorKey( ConfigurationBuildTargetFactoryForTests.newInstance(""//c:a"")), ImmutableList.of(""//a/b:file1"", ""//a/b:file2""), new SelectorKey( ConfigurationBuildTargetFactoryForTests.newInstance(""//c:b"")), ImmutableList.of(""//a/b:file3"", ""//a/b:file4"")), ImmutableSet.of(), """")))) .put(""visibility"", ImmutableList.of(""//a/..."")) .put(""within_view"", ImmutableList.of(""//b/..."")) .build(); UnconfiguredTargetNode unconfiguredTargetNode = factory.create( cell, cell.getRoot().resolve(""a/b/BUCK""), buildTarget, DependencyStack.root(), inputAttributes, getPackage()); assertEquals( RuleType.of(""java_library"", RuleType.Kind.BUILD), unconfiguredTargetNode.getRuleType()); assertEquals(buildTarget.getData(), unconfiguredTargetNode.getBuildTarget()); assertEquals(expectAttributes, unconfiguredTargetNode.getAttributes()); assertEquals( ""//a/..."", Iterables.getFirst(unconfiguredTargetNode.getVisibilityPatterns(), null) .getRepresentation()); assertEquals( ""//b/..."", Iterables.getFirst(unconfiguredTargetNode.getWithinViewPatterns(), null) .getRepresentation()); } Package getPackage() { ImmutablePackageMetadata pkg = ImmutablePackageMetadata.of(ImmutableList.of(""//a/...""), ImmutableList.of(""//d/..."")); return PackageFactory.create(cell, cell.getRoot().resolve(""a/b/BUCK""), pkg, Optional.empty()); } } ",0 "algorithm used here is mostly lifted from the perl module * Algorithm::Diff (version 1.06) by Ned Konz, which is available at: * http://www.perl.com/CPAN/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.06.zip * * More ideas are taken from: http://www.ics.uci.edu/~eppstein/161/960229.html * * Some ideas (and a bit of code) are taken from analyze.c, of GNU * diffutils-2.7, which can be found at: * ftp://gnudist.gnu.org/pub/gnu/diffutils/diffutils-2.7.tar.gz * * Some ideas (subdivision by NCHUNKS > 2, and some optimizations) are from * Geoffrey T. Dairiki . The original PHP version of this * code was written by him, and is used/adapted with his permission. * * Copyright 2004-2011 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you did * not receive this file, see http://www.horde.org/licenses/lgpl21. * * @author Geoffrey T. Dairiki * @package Text_Diff */ // Disallow direct access to this file for security reasons if(!defined(""IN_MYBB"")) { die(""Direct initialization of this file is not allowed.

          Please make sure IN_MYBB is defined.""); } class Horde_Text_Diff_Engine_Native { public function diff($from_lines, $to_lines) { array_walk($from_lines, array('Horde_Text_Diff', 'trimNewlines')); array_walk($to_lines, array('Horde_Text_Diff', 'trimNewlines')); $n_from = count($from_lines); $n_to = count($to_lines); $this->xchanged = $this->ychanged = array(); $this->xv = $this->yv = array(); $this->xind = $this->yind = array(); unset($this->seq); unset($this->in_seq); unset($this->lcs); // Skip leading common lines. for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++) { if ($from_lines[$skip] !== $to_lines[$skip]) { break; } $this->xchanged[$skip] = $this->ychanged[$skip] = false; } // Skip trailing common lines. $xi = $n_from; $yi = $n_to; for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++) { if ($from_lines[$xi] !== $to_lines[$yi]) { break; } $this->xchanged[$xi] = $this->ychanged[$yi] = false; } // Ignore lines which do not exist in both files. for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { $xhash[$from_lines[$xi]] = 1; } for ($yi = $skip; $yi < $n_to - $endskip; $yi++) { $line = $to_lines[$yi]; if (($this->ychanged[$yi] = empty($xhash[$line]))) { continue; } $yhash[$line] = 1; $this->yv[] = $line; $this->yind[] = $yi; } for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { $line = $from_lines[$xi]; if (($this->xchanged[$xi] = empty($yhash[$line]))) { continue; } $this->xv[] = $line; $this->xind[] = $xi; } // Find the LCS. $this->_compareseq(0, count($this->xv), 0, count($this->yv)); // Merge edits when possible. $this->_shiftBoundaries($from_lines, $this->xchanged, $this->ychanged); $this->_shiftBoundaries($to_lines, $this->ychanged, $this->xchanged); // Compute the edit operations. $edits = array(); $xi = $yi = 0; while ($xi < $n_from || $yi < $n_to) { assert($yi < $n_to || $this->xchanged[$xi]); assert($xi < $n_from || $this->ychanged[$yi]); // Skip matching ""snake"". $copy = array(); while ($xi < $n_from && $yi < $n_to && !$this->xchanged[$xi] && !$this->ychanged[$yi]) { $copy[] = $from_lines[$xi++]; ++$yi; } if ($copy) { $edits[] = new Horde_Text_Diff_Op_Copy($copy); } // Find deletes & adds. $delete = array(); while ($xi < $n_from && $this->xchanged[$xi]) { $delete[] = $from_lines[$xi++]; } $add = array(); while ($yi < $n_to && $this->ychanged[$yi]) { $add[] = $to_lines[$yi++]; } if ($delete && $add) { $edits[] = new Horde_Text_Diff_Op_Change($delete, $add); } elseif ($delete) { $edits[] = new Horde_Text_Diff_Op_Delete($delete); } elseif ($add) { $edits[] = new Horde_Text_Diff_Op_Add($add); } } return $edits; } /** * Divides the Largest Common Subsequence (LCS) of the sequences (XOFF, * XLIM) and (YOFF, YLIM) into NCHUNKS approximately equally sized * segments. * * Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of * NCHUNKS+1 (X, Y) indexes giving the diving points between sub * sequences. The first sub-sequence is contained in (X0, X1), (Y0, Y1), * the second in (X1, X2), (Y1, Y2) and so on. Note that (X0, Y0) == * (XOFF, YOFF) and (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM). * * This public function assumes that the first lines of the specified portions of * the two files do not match, and likewise that the last lines do not * match. The caller must trim matching lines from the beginning and end * of the portions it is going to specify. */ protected function _diag ($xoff, $xlim, $yoff, $ylim, $nchunks) { $flip = false; if ($xlim - $xoff > $ylim - $yoff) { /* Things seems faster (I'm not sure I understand why) when the * shortest sequence is in X. */ $flip = true; list ($xoff, $xlim, $yoff, $ylim) = array($yoff, $ylim, $xoff, $xlim); } if ($flip) { for ($i = $ylim - 1; $i >= $yoff; $i--) { $ymatches[$this->xv[$i]][] = $i; } } else { for ($i = $ylim - 1; $i >= $yoff; $i--) { $ymatches[$this->yv[$i]][] = $i; } } $this->lcs = 0; $this->seq[0]= $yoff - 1; $this->in_seq = array(); $ymids[0] = array(); $numer = $xlim - $xoff + $nchunks - 1; $x = $xoff; for ($chunk = 0; $chunk < $nchunks; $chunk++) { if ($chunk > 0) { for ($i = 0; $i <= $this->lcs; $i++) { $ymids[$i][$chunk - 1] = $this->seq[$i]; } } $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $chunk) / $nchunks); for (; $x < $x1; $x++) { $line = $flip ? $this->yv[$x] : $this->xv[$x]; if (empty($ymatches[$line])) { continue; } $matches = $ymatches[$line]; reset($matches); while (list(, $y) = each($matches)) { if (empty($this->in_seq[$y])) { $k = $this->_lcsPos($y); assert($k > 0); $ymids[$k] = $ymids[$k - 1]; break; } } while (list(, $y) = each($matches)) { if ($y > $this->seq[$k - 1]) { assert($y <= $this->seq[$k]); /* Optimization: this is a common case: next match is * just replacing previous match. */ $this->in_seq[$this->seq[$k]] = false; $this->seq[$k] = $y; $this->in_seq[$y] = 1; } elseif (empty($this->in_seq[$y])) { $k = $this->_lcsPos($y); assert($k > 0); $ymids[$k] = $ymids[$k - 1]; } } } } $seps[] = $flip ? array($yoff, $xoff) : array($xoff, $yoff); $ymid = $ymids[$this->lcs]; for ($n = 0; $n < $nchunks - 1; $n++) { $x1 = $xoff + (int)(($numer + ($xlim - $xoff) * $n) / $nchunks); $y1 = $ymid[$n] + 1; $seps[] = $flip ? array($y1, $x1) : array($x1, $y1); } $seps[] = $flip ? array($ylim, $xlim) : array($xlim, $ylim); return array($this->lcs, $seps); } protected function _lcsPos($ypos) { $end = $this->lcs; if ($end == 0 || $ypos > $this->seq[$end]) { $this->seq[++$this->lcs] = $ypos; $this->in_seq[$ypos] = 1; return $this->lcs; } $beg = 1; while ($beg < $end) { $mid = (int)(($beg + $end) / 2); if ($ypos > $this->seq[$mid]) { $beg = $mid + 1; } else { $end = $mid; } } assert($ypos != $this->seq[$end]); $this->in_seq[$this->seq[$end]] = false; $this->seq[$end] = $ypos; $this->in_seq[$ypos] = 1; return $end; } /** * Finds LCS of two sequences. * * The results are recorded in the vectors $this->{x,y}changed[], by * storing a 1 in the element for each line that is an insertion or * deletion (ie. is not in the LCS). * * The subsequence of file 0 is (XOFF, XLIM) and likewise for file 1. * * Note that XLIM, YLIM are exclusive bounds. All line numbers are * origin-0 and discarded lines are not counted. */ protected function _compareseq ($xoff, $xlim, $yoff, $ylim) { /* Slide down the bottom initial diagonal. */ while ($xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff]) { ++$xoff; ++$yoff; } /* Slide up the top initial diagonal. */ while ($xlim > $xoff && $ylim > $yoff && $this->xv[$xlim - 1] == $this->yv[$ylim - 1]) { --$xlim; --$ylim; } if ($xoff == $xlim || $yoff == $ylim) { $lcs = 0; } else { /* This is ad hoc but seems to work well. $nchunks = * sqrt(min($xlim - $xoff, $ylim - $yoff) / 2.5); $nchunks = * max(2,min(8,(int)$nchunks)); */ $nchunks = min(7, $xlim - $xoff, $ylim - $yoff) + 1; list($lcs, $seps) = $this->_diag($xoff, $xlim, $yoff, $ylim, $nchunks); } if ($lcs == 0) { /* X and Y sequences have no common subsequence: mark all * changed. */ while ($yoff < $ylim) { $this->ychanged[$this->yind[$yoff++]] = 1; } while ($xoff < $xlim) { $this->xchanged[$this->xind[$xoff++]] = 1; } } else { /* Use the partitions to split this problem into subproblems. */ reset($seps); $pt1 = $seps[0]; while ($pt2 = next($seps)) { $this->_compareseq ($pt1[0], $pt2[0], $pt1[1], $pt2[1]); $pt1 = $pt2; } } } /** * Adjusts inserts/deletes of identical lines to join changes as much as * possible. * * We do something when a run of changed lines include a line at one end * and has an excluded, identical line at the other. We are free to * choose which identical line is included. `compareseq' usually chooses * the one at the beginning, but usually it is cleaner to consider the * following identical line to be the ""change"". * * This is extracted verbatim from analyze.c (GNU diffutils-2.7). */ protected function _shiftBoundaries($lines, &$changed, $other_changed) { $i = 0; $j = 0; assert('count($lines) == count($changed)'); $len = count($lines); $other_len = count($other_changed); while (1) { /* Scan forward to find the beginning of another run of * changes. Also keep track of the corresponding point in the * other file. * * Throughout this code, $i and $j are adjusted together so that * the first $i elements of $changed and the first $j elements of * $other_changed both contain the same number of zeros (unchanged * lines). * * Furthermore, $j is always kept so that $j == $other_len or * $other_changed[$j] == false. */ while ($j < $other_len && $other_changed[$j]) { $j++; } while ($i < $len && ! $changed[$i]) { assert('$j < $other_len && ! $other_changed[$j]'); $i++; $j++; while ($j < $other_len && $other_changed[$j]) { $j++; } } if ($i == $len) { break; } $start = $i; /* Find the end of this run of changes. */ while (++$i < $len && $changed[$i]) { continue; } do { /* Record the length of this run of changes, so that we can * later determine whether the run has grown. */ $runlength = $i - $start; /* Move the changed region back, so long as the previous * unchanged line matches the last changed one. This merges * with previous changed regions. */ while ($start > 0 && $lines[$start - 1] == $lines[$i - 1]) { $changed[--$start] = 1; $changed[--$i] = false; while ($start > 0 && $changed[$start - 1]) { $start--; } assert('$j > 0'); while ($other_changed[--$j]) { continue; } assert('$j >= 0 && !$other_changed[$j]'); } /* Set CORRESPONDING to the end of the changed run, at the * last point where it corresponds to a changed run in the * other file. CORRESPONDING == LEN means no such point has * been found. */ $corresponding = $j < $other_len ? $i : $len; /* Move the changed region forward, so long as the first * changed line matches the following unchanged one. This * merges with following changed regions. Do this second, so * that if there are no merges, the changed region is moved * forward as far as possible. */ while ($i < $len && $lines[$start] == $lines[$i]) { $changed[$start++] = false; $changed[$i++] = 1; while ($i < $len && $changed[$i]) { $i++; } assert('$j < $other_len && ! $other_changed[$j]'); $j++; if ($j < $other_len && $other_changed[$j]) { $corresponding = $i; while ($j < $other_len && $other_changed[$j]) { $j++; } } } } while ($runlength != $i - $start); /* If possible, move the fully-merged run of changes back to a * corresponding run in the other file. */ while ($corresponding < $i) { $changed[--$start] = 1; $changed[--$i] = 0; assert('$j > 0'); while ($other_changed[--$j]) { continue; } assert('$j >= 0 && !$other_changed[$j]'); } } } } ",0 "lude #include #include class fl_gl_cyclic_color_wheel : public Fl_Gl_Window { public: fl_gl_cyclic_color_wheel(int x,int y ,int w,int h ,const char*l=0); void init_widget_set( const int number ,Fl_Value_Input* valinp_hue_min ,Fl_Value_Input* valinp_hue_max ,Fl_Check_Button* chebut_enable_sw ,Fl_Check_Button* chebut_rotate360_sw ); void init_number_and_is_max( const int number ,const bool is_max); void set_min_or_max(const bool is_max ); void set_reset(void); private: /* マウスドラッグ開始位置 */ int mouse_x_when_push_ ,mouse_y_when_push_; /* Hue Color Wheel表示開始位置 */ double x_offset_; double hue_offset_; /* 各Hue min,maxの範囲を参考表示 */ class guide_widget_set_ { public: Fl_Value_Input* valinp_hue_min; Fl_Value_Input* valinp_hue_max; Fl_Check_Button* chebut_enable_sw; Fl_Check_Button* chebut_rotate360_sw; }; std::vector< guide_widget_set_ > guide_widget_sets_; int hue_range_number_; bool hue_range_is_max_; //---------- void draw(); void draw_object_(); int handle(int event); void handle_push_( const int mx ,const int my ); void handle_updownleftright_( const int mx ,const int my ); void handle_keyboard_( const int key , const char* text ); double xpos_from_hue_(const double hue); double hue_from_xpos_(const double xpos); double limit_new_hue_( double hue_o_new ,bool& rotate360_sw ); void set_min_or_max_to_gui_( const bool rot360_sw ); }; #endif /* !fl_gl_cyclic_color_wheel_h */ ",0 "mes/default/template/controllers/shop/helpers/list/list_action_delete.tpl"" */ ?> decodeProperties(array ( 'file_dependency' => array ( 'cbf2ed399b76a836e7562130658957cc92238d15' => array ( 0 => '/Users/Evergreen/Documents/workspace/licpresta/admin/themes/default/template/controllers/shop/helpers/list/list_action_delete.tpl', 1 => 1452095428, 2 => 'file', ), ), 'nocache_hash' => '154545909656eab4a3d7e136-98563971', 'function' => array ( ), 'variables' => array ( 'href' => 0, 'action' => 0, 'id_shop' => 0, 'shops_having_dependencies' => 0, 'confirm' => 0, ), 'has_nocache_code' => false, 'version' => 'Smarty-3.1.19', 'unifunc' => 'content_56eab4a3e7ff77_59198683', ),false); /*/%%SmartyHeaderCode%%*/?> tpl_vars['href']->value, ENT_QUOTES, 'UTF-8', true);?> "" class=""delete"" title=""tpl_vars['action']->value, ENT_QUOTES, 'UTF-8', true);?> "" tpl_vars['id_shop']->value,$_smarty_tpl->tpl_vars['shops_having_dependencies']->value)) {?> onclick=""jAlert(''You cannot delete this shop\'s (customer and/or order dependency)','js'=>1),$_smarty_tpl);?> '); return false;"" tpl_vars['confirm']->value)) {?> onclick=""if (confirm('tpl_vars['confirm']->value;?> ')){return true;}else{event.stopPropagation(); event.preventDefault();};"" > tpl_vars['action']->value, ENT_QUOTES, 'UTF-8', true);?> ",0 " it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef CONTEXT_FLAGS_H_INCLUDED #define CONTEXT_FLAGS_H_INCLUDED class Context; class ContextFlags { public: enum { HasActiveDocument = 1 << 0, HasActiveSprite = 1 << 1, HasVisibleMask = 1 << 2, HasActiveLayer = 1 << 3, HasActiveCel = 1 << 4, HasActiveImage = 1 << 5, HasBackgroundLayer = 1 << 6, ActiveDocumentIsReadable = 1 << 7, ActiveDocumentIsWritable = 1 << 8, ActiveLayerIsImage = 1 << 9, ActiveLayerIsBackground = 1 << 10, ActiveLayerIsReadable = 1 << 11, ActiveLayerIsWritable = 1 << 12, }; ContextFlags(); bool check(uint32_t flags) const { return (m_flags & flags) == flags; } void update(Context* context); private: uint32_t m_flags; }; #endif ",0 "f the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** * This file contains the class for restore of this submission plugin * * @package assignsubmission_file * @copyright 2012 NetSpot {@link http://www.netspot.com.au} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * Restore subplugin class. * * Provides the necessary information * needed to restore one assign_submission subplugin. * * @package assignsubmission_file * @copyright 2012 NetSpot {@link http://www.netspot.com.au} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class restore_assignsubmission_file_subplugin extends restore_subplugin { /** * Returns the paths to be handled by the subplugin at workshop level * @return array */ protected function define_submission_subplugin_structure() { $paths = array(); $elename = $this->get_namefor('submission'); $elepath = $this->get_pathfor('/submission_file'); // We used get_recommended_name() so this works. $paths[] = new restore_path_element($elename, $elepath); return $paths; } /** * Processes one submission_file element * @param mixed $data * @return void */ public function process_assignsubmission_file_submission($data) { global $DB; $data = (object)$data; $data->assignment = $this->get_new_parentid('assign'); $oldsubmissionid = $data->submission; // The mapping is set in the restore for the core assign activity // when a submission node is processed. $data->submission = $this->get_mappingid('submission', $data->submission); $DB->insert_record('assignsubmission_file', $data); $this->add_related_files('assignsubmission_file', 'submission_files', 'submission', null, $oldsubmissionid); } } ",0 "lter+rtpsniff@osso.nl> This file is part of RTPSniff. RTPSniff is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. RTPSniff is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with RTPSniff. If not, see . ======================================================================*/ #include ""rtpsniff.h"" #include #include #include #include #include #include #include /* Settings */ #ifndef INTERVAL_SECONDS # define INTERVAL_SECONDS 10 /* wake the storage engine every N seconds */ #endif /* INTERVAL_SECONDS */ #if INTERVAL_SECONDS < 2 # error INTERVAL_SECONDS be too low #endif #define TIMER__METHOD_NSLEEP 1 #define TIMER__METHOD_SEMAPHORE 2 #if !defined(USE_NSLEEP_TIMER) && (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) # define TIMER__METHOD TIMER__METHOD_SEMAPHORE # include # include #else # define TIMER__METHOD TIMER__METHOD_NSLEEP #endif static pthread_t timer__thread; static struct memory_t *timer__memory; #if TIMER__METHOD == TIMER__METHOD_NSLEEP static volatile int timer__done; /* whether we're done */ #elif TIMER__METHOD == TIMER__METHOD_SEMAPHORE static sem_t timer__semaphore; /* semaphore to synchronize the threads */ #endif /* TIMER__METHOD == TIMER__METHOD_SEMAPHORE */ static void *timer__run(void *thread_arg); void timer_help() { printf( ""/*********************"" "" module: timer (interval) *******************************/\n"" ""#%s USE_NSLEEP_TIMER\n"" ""#define INTERVAL_SECONDS %"" SCNu32 ""\n"" ""\n"" ""Sleeps until the specified interval of %.2f minutes have passed and wakes up\n"" ""to tell the storage engine to write averages.\n"" ""\n"" ""The USE_NSLEEP_TIMER define forces the module to use a polling sleep loop even\n"" ""when the (probably) less cpu intensive and more accurate sem_timedwait()\n"" ""function is available. The currently compiled in timer method is: %s\n"" ""\n"", #ifdef USE_NSLEEP_TIMER ""define"", #else /* !USE_NSLEEP_TIMER */ ""undef"", #endif (uint32_t)INTERVAL_SECONDS, (float)INTERVAL_SECONDS / 60, #if TIMER__METHOD == TIMER__METHOD_NSLEEP ""n_sleep"" #elif TIMER__METHOD == TIMER__METHOD_SEMAPHORE ""semaphore"" #endif /* TIMER__METHOD == TIMER__METHOD_SEMAPHORE */ ); } int timer_loop_bg(struct memory_t *memory) { pthread_attr_t attr; /* Set internal config */ timer__memory = memory; #if TIMER__METHOD == TIMER__METHOD_NSLEEP /* Initialize polling variable */ timer__done = 0; #elif TIMER__METHOD == TIMER__METHOD_SEMAPHORE /* Initialize semaphore */ if (sem_init(&timer__semaphore, 0, 0) != 0) { perror(""sem_init""); return -1; } #endif /* TIMER__METHOD == TIMER__METHOD_SEMAPHORE */ /* We want default pthread attributes */ if (pthread_attr_init(&attr) != 0) { perror(""pthread_attr_init""); return -1; } /* Run thread */ if (pthread_create(&timer__thread, &attr, &timer__run, NULL) != 0) { perror(""pthread_create""); return -1; } #ifndef NDEBUG fprintf(stderr, ""timer_loop_bg: Thread %p started.\n"", (void*)timer__thread); #endif return 0; } void timer_loop_stop() { void *ret; /* Tell our thread that it is time */ #if TIMER__METHOD == TIMER__METHOD_NSLEEP timer__done = 1; #elif TIMER__METHOD == TIMER__METHOD_SEMAPHORE sem_post(&timer__semaphore); #endif /* TIMER__METHOD == TIMER__METHOD_SEMAPHORE */ /* Get its exit status */ if (pthread_join(timer__thread, &ret) != 0) perror(""pthread_join""); #ifndef NDEBUG fprintf(stderr, ""timer_loop_stop: Thread %p joined.\n"", (void*)timer__thread); #endif #if TIMER__METHOD == TIMER__METHOD_SEMAPHORE /* Destroy semaphore */ if (sem_destroy(&timer__semaphore) != 0) perror(""sem_destroy""); #endif /* TIMER__METHOD == TIMER__METHOD_SEMAPHORE */ } /* The timers job is to run storage function after after every INTERVAL_SECONDS time. */ static void *timer__run(void *thread_arg) { int first_run_skipped = 0; /* do not store the first run because the interval is wrong */ #ifndef NDEBUG fprintf(stderr, ""timer__run: Thread started.\n""); #endif while (1) { struct timeval current_time; /* current time is in UTC */ int sample_begin_time; #if TIMER__METHOD == TIMER__METHOD_NSLEEP int sleep_useconds; #elif TIMER__METHOD == TIMER__METHOD_SEMAPHORE struct timespec new_time; int ret; #endif /* TIMER__METHOD == TIMER__METHOD_SEMAPHORE */ int previously_active; /* Get current time */ if (gettimeofday(¤t_time, NULL) != 0) { perror(""gettimeofday""); return (void*)-1; } /* Yes, we started sampling when SIGUSR1 fired, so this is correct */ sample_begin_time = current_time.tv_sec - (current_time.tv_sec % INTERVAL_SECONDS); /* Calculate how long to sleep */ #if TIMER__METHOD == TIMER__METHOD_NSLEEP sleep_useconds = (1000000 * (INTERVAL_SECONDS - (current_time.tv_sec % INTERVAL_SECONDS)) - current_time.tv_usec); # ifndef NDEBUG fprintf(stderr, ""timer__run: Current time is %i (%02i:%02i:%02i.%06i), "" ""sleep planned for %i useconds.\n"", (int)current_time.tv_sec, (int)(current_time.tv_sec / 3600) % 24, (int)(current_time.tv_sec / 60) % 60, (int)current_time.tv_sec % 60, (int)current_time.tv_usec, sleep_useconds); # endif /* NDEBUG */ #elif TIMER__METHOD == TIMER__METHOD_SEMAPHORE new_time.tv_sec = sample_begin_time + INTERVAL_SECONDS; new_time.tv_nsec = 0; # ifndef NDEBUG fprintf(stderr, ""timer__run: Current time is %i (%02i:%02i:%02i.%06i), "" ""sleep planned until %02i:%02i:%02i.\n"", (int)current_time.tv_sec, (int)(current_time.tv_sec / 3600) % 24, (int)(current_time.tv_sec / 60) % 60, (int)current_time.tv_sec % 60, (int)current_time.tv_usec, (int)(new_time.tv_sec / 3600) % 24, (int)(new_time.tv_sec / 60) % 60, (int)new_time.tv_sec % 60); # endif /* NDEBUG */ #endif /* TIMER__METHOD == TIMER__METHOD_SEMAPHORE */ #if TIMER__METHOD == TIMER__METHOD_NSLEEP /* The sleep in this thread won't wake up (EINTR) from a SIGALRM in the other * thread. Pause/alarm won't work either. We use this crappy polling loop as * an alternative. Observe that the semaphore below method is way more * accurate and probably uses less cpu. */ while (!timer__done && sleep_useconds > 999999) { sleep(1); sleep_useconds -= 1000000; } if (timer__done) break; usleep(sleep_useconds); #elif TIMER__METHOD == TIMER__METHOD_SEMAPHORE /* The sem_timedwait function will sleep happily until the absolutely specified * time has been reached. */ while ((ret = sem_timedwait(&timer__semaphore, &new_time)) == -1 && errno == EINTR) continue; /* restart if interrupted by handler */ if (ret == 0) break; /* if the semaphore was hit, we're done */ if (errno != ETIMEDOUT) perror(""sem_timedwait""); #endif /* TIMER__METHOD == TIMER__METHOD_SEMAPHORE */ #ifndef NDEBUG if (gettimeofday(¤t_time, NULL) != 0) { perror(""gettimeofday""); return (void*)-1; } fprintf(stderr, ""timer__run: Awake! Time is now %i (%02i:%02i:%02i.%06i).\n"", (int)current_time.tv_sec, (int)(current_time.tv_sec / 3600) % 24, (int)(current_time.tv_sec / 60) % 60, (int)current_time.tv_sec % 60, (int)current_time.tv_usec); #endif /* Poke other thread to switch memory */ previously_active = timer__memory->active; raise(SIGUSR1); sleep(1); /* wait a second to let other thread finish switching memory */ assert(previously_active != timer__memory->active); if (first_run_skipped) { /* Delegate the actual writing to storage. */ out_write(sample_begin_time, INTERVAL_SECONDS, timer__memory->rtphash[previously_active]); } else { /* On first run, we started too late in the interval. Ignore those counts. */ first_run_skipped = 1; } /* Reset mem for next run */ sniff_release(&timer__memory->rtphash[previously_active]); } #ifndef NDEBUG fprintf(stderr, ""timer__run: Thread done.\n""); #endif return 0; } ",0 "edit.appver #foreach($!module in $!moduleList) #if($!businessAppredit.appid ==$!module.moduleid) $!module.modulename
          #end #end $!businessAppredit.appdescription 允许最大接入数: $!businessAppredit.applimitnum
          授权截止日期:$!businessAppredit.applimitdate $!businessAppredit.opdt #end #*快速查询通道 【返回list集合中存放Record对象】 *# #* #foreach($!businessAppredit in $!businessAppreditList) $!businessAppredit.getString(""appname"") $!businessAppredit.getString(""appver"") $!businessAppredit.getString(""appdescription"") $!businessAppredit.getString(""appdescription"") $!businessAppredit.getString(""accreditedcode"") $!businessAppredit.getString(""opdt"") #end *# #* 快速查询通道 【返回list集合中存放Record对象】 *# #* #foreach($!businessAppredit3 in $!businessAppreditList3.items) $!businessAppredit3.getString(""appname"") $!businessAppredit3.getString(""appver"") $!businessAppredit3.getString(""appdescription"") $!businessAppredit3.getString(""appdescription"") $!businessAppredit3.getString(""accreditedcode"") $!businessAppredit3.getString(""opdt"") #end *# #* #foreach($!businessAppredit3 in $!businessAppreditList3.items) $!businessAppredit3.getString(""appname"") $!businessAppredit3.getString(""appver"") $!businessAppredit3.getString(""appdescription"") $!businessAppredit3.getString(""appdescription"") $!businessAppredit3.getString(""accreditedcode"") $!businessAppredit3.getString(""opdt"") #end *# #*
          #parse($paging) #paging($pageView)
          *#",0 " * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace RDS { namespace Model { /** *

          Contains a list of available options for a DB instance

          This data type * is used as a response element in the DescribeOrderableDBInstanceOptions * action.

          See Also:

          AWS * API Reference

          */ class AWS_RDS_API OrderableDBInstanceOption { public: OrderableDBInstanceOption(); OrderableDBInstanceOption(const Aws::Utils::Xml::XmlNode& xmlNode); OrderableDBInstanceOption& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

          The engine type of the orderable DB instance.

          */ inline const Aws::String& GetEngine() const{ return m_engine; } /** *

          The engine type of the orderable DB instance.

          */ inline void SetEngine(const Aws::String& value) { m_engineHasBeenSet = true; m_engine = value; } /** *

          The engine type of the orderable DB instance.

          */ inline void SetEngine(Aws::String&& value) { m_engineHasBeenSet = true; m_engine = std::move(value); } /** *

          The engine type of the orderable DB instance.

          */ inline void SetEngine(const char* value) { m_engineHasBeenSet = true; m_engine.assign(value); } /** *

          The engine type of the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithEngine(const Aws::String& value) { SetEngine(value); return *this;} /** *

          The engine type of the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithEngine(Aws::String&& value) { SetEngine(std::move(value)); return *this;} /** *

          The engine type of the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithEngine(const char* value) { SetEngine(value); return *this;} /** *

          The engine version of the orderable DB instance.

          */ inline const Aws::String& GetEngineVersion() const{ return m_engineVersion; } /** *

          The engine version of the orderable DB instance.

          */ inline void SetEngineVersion(const Aws::String& value) { m_engineVersionHasBeenSet = true; m_engineVersion = value; } /** *

          The engine version of the orderable DB instance.

          */ inline void SetEngineVersion(Aws::String&& value) { m_engineVersionHasBeenSet = true; m_engineVersion = std::move(value); } /** *

          The engine version of the orderable DB instance.

          */ inline void SetEngineVersion(const char* value) { m_engineVersionHasBeenSet = true; m_engineVersion.assign(value); } /** *

          The engine version of the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithEngineVersion(const Aws::String& value) { SetEngineVersion(value); return *this;} /** *

          The engine version of the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithEngineVersion(Aws::String&& value) { SetEngineVersion(std::move(value)); return *this;} /** *

          The engine version of the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithEngineVersion(const char* value) { SetEngineVersion(value); return *this;} /** *

          The DB instance class for the orderable DB instance.

          */ inline const Aws::String& GetDBInstanceClass() const{ return m_dBInstanceClass; } /** *

          The DB instance class for the orderable DB instance.

          */ inline void SetDBInstanceClass(const Aws::String& value) { m_dBInstanceClassHasBeenSet = true; m_dBInstanceClass = value; } /** *

          The DB instance class for the orderable DB instance.

          */ inline void SetDBInstanceClass(Aws::String&& value) { m_dBInstanceClassHasBeenSet = true; m_dBInstanceClass = std::move(value); } /** *

          The DB instance class for the orderable DB instance.

          */ inline void SetDBInstanceClass(const char* value) { m_dBInstanceClassHasBeenSet = true; m_dBInstanceClass.assign(value); } /** *

          The DB instance class for the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithDBInstanceClass(const Aws::String& value) { SetDBInstanceClass(value); return *this;} /** *

          The DB instance class for the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithDBInstanceClass(Aws::String&& value) { SetDBInstanceClass(std::move(value)); return *this;} /** *

          The DB instance class for the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithDBInstanceClass(const char* value) { SetDBInstanceClass(value); return *this;} /** *

          The license model for the orderable DB instance.

          */ inline const Aws::String& GetLicenseModel() const{ return m_licenseModel; } /** *

          The license model for the orderable DB instance.

          */ inline void SetLicenseModel(const Aws::String& value) { m_licenseModelHasBeenSet = true; m_licenseModel = value; } /** *

          The license model for the orderable DB instance.

          */ inline void SetLicenseModel(Aws::String&& value) { m_licenseModelHasBeenSet = true; m_licenseModel = std::move(value); } /** *

          The license model for the orderable DB instance.

          */ inline void SetLicenseModel(const char* value) { m_licenseModelHasBeenSet = true; m_licenseModel.assign(value); } /** *

          The license model for the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithLicenseModel(const Aws::String& value) { SetLicenseModel(value); return *this;} /** *

          The license model for the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithLicenseModel(Aws::String&& value) { SetLicenseModel(std::move(value)); return *this;} /** *

          The license model for the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithLicenseModel(const char* value) { SetLicenseModel(value); return *this;} /** *

          A list of Availability Zones for the orderable DB instance.

          */ inline const Aws::Vector& GetAvailabilityZones() const{ return m_availabilityZones; } /** *

          A list of Availability Zones for the orderable DB instance.

          */ inline void SetAvailabilityZones(const Aws::Vector& value) { m_availabilityZonesHasBeenSet = true; m_availabilityZones = value; } /** *

          A list of Availability Zones for the orderable DB instance.

          */ inline void SetAvailabilityZones(Aws::Vector&& value) { m_availabilityZonesHasBeenSet = true; m_availabilityZones = std::move(value); } /** *

          A list of Availability Zones for the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithAvailabilityZones(const Aws::Vector& value) { SetAvailabilityZones(value); return *this;} /** *

          A list of Availability Zones for the orderable DB instance.

          */ inline OrderableDBInstanceOption& WithAvailabilityZones(Aws::Vector&& value) { SetAvailabilityZones(std::move(value)); return *this;} /** *

          A list of Availability Zones for the orderable DB instance.

          */ inline OrderableDBInstanceOption& AddAvailabilityZones(const AvailabilityZone& value) { m_availabilityZonesHasBeenSet = true; m_availabilityZones.push_back(value); return *this; } /** *

          A list of Availability Zones for the orderable DB instance.

          */ inline OrderableDBInstanceOption& AddAvailabilityZones(AvailabilityZone&& value) { m_availabilityZonesHasBeenSet = true; m_availabilityZones.push_back(std::move(value)); return *this; } /** *

          Indicates whether this orderable DB instance is multi-AZ capable.

          */ inline bool GetMultiAZCapable() const{ return m_multiAZCapable; } /** *

          Indicates whether this orderable DB instance is multi-AZ capable.

          */ inline void SetMultiAZCapable(bool value) { m_multiAZCapableHasBeenSet = true; m_multiAZCapable = value; } /** *

          Indicates whether this orderable DB instance is multi-AZ capable.

          */ inline OrderableDBInstanceOption& WithMultiAZCapable(bool value) { SetMultiAZCapable(value); return *this;} /** *

          Indicates whether this orderable DB instance can have a Read Replica.

          */ inline bool GetReadReplicaCapable() const{ return m_readReplicaCapable; } /** *

          Indicates whether this orderable DB instance can have a Read Replica.

          */ inline void SetReadReplicaCapable(bool value) { m_readReplicaCapableHasBeenSet = true; m_readReplicaCapable = value; } /** *

          Indicates whether this orderable DB instance can have a Read Replica.

          */ inline OrderableDBInstanceOption& WithReadReplicaCapable(bool value) { SetReadReplicaCapable(value); return *this;} /** *

          Indicates whether this is a VPC orderable DB instance.

          */ inline bool GetVpc() const{ return m_vpc; } /** *

          Indicates whether this is a VPC orderable DB instance.

          */ inline void SetVpc(bool value) { m_vpcHasBeenSet = true; m_vpc = value; } /** *

          Indicates whether this is a VPC orderable DB instance.

          */ inline OrderableDBInstanceOption& WithVpc(bool value) { SetVpc(value); return *this;} /** *

          Indicates whether this orderable DB instance supports encrypted storage.

          */ inline bool GetSupportsStorageEncryption() const{ return m_supportsStorageEncryption; } /** *

          Indicates whether this orderable DB instance supports encrypted storage.

          */ inline void SetSupportsStorageEncryption(bool value) { m_supportsStorageEncryptionHasBeenSet = true; m_supportsStorageEncryption = value; } /** *

          Indicates whether this orderable DB instance supports encrypted storage.

          */ inline OrderableDBInstanceOption& WithSupportsStorageEncryption(bool value) { SetSupportsStorageEncryption(value); return *this;} /** *

          Indicates the storage type for this orderable DB instance.

          */ inline const Aws::String& GetStorageType() const{ return m_storageType; } /** *

          Indicates the storage type for this orderable DB instance.

          */ inline void SetStorageType(const Aws::String& value) { m_storageTypeHasBeenSet = true; m_storageType = value; } /** *

          Indicates the storage type for this orderable DB instance.

          */ inline void SetStorageType(Aws::String&& value) { m_storageTypeHasBeenSet = true; m_storageType = std::move(value); } /** *

          Indicates the storage type for this orderable DB instance.

          */ inline void SetStorageType(const char* value) { m_storageTypeHasBeenSet = true; m_storageType.assign(value); } /** *

          Indicates the storage type for this orderable DB instance.

          */ inline OrderableDBInstanceOption& WithStorageType(const Aws::String& value) { SetStorageType(value); return *this;} /** *

          Indicates the storage type for this orderable DB instance.

          */ inline OrderableDBInstanceOption& WithStorageType(Aws::String&& value) { SetStorageType(std::move(value)); return *this;} /** *

          Indicates the storage type for this orderable DB instance.

          */ inline OrderableDBInstanceOption& WithStorageType(const char* value) { SetStorageType(value); return *this;} /** *

          Indicates whether this orderable DB instance supports provisioned IOPS.

          */ inline bool GetSupportsIops() const{ return m_supportsIops; } /** *

          Indicates whether this orderable DB instance supports provisioned IOPS.

          */ inline void SetSupportsIops(bool value) { m_supportsIopsHasBeenSet = true; m_supportsIops = value; } /** *

          Indicates whether this orderable DB instance supports provisioned IOPS.

          */ inline OrderableDBInstanceOption& WithSupportsIops(bool value) { SetSupportsIops(value); return *this;} /** *

          Indicates whether the DB instance supports enhanced monitoring at intervals * from 1 to 60 seconds.

          */ inline bool GetSupportsEnhancedMonitoring() const{ return m_supportsEnhancedMonitoring; } /** *

          Indicates whether the DB instance supports enhanced monitoring at intervals * from 1 to 60 seconds.

          */ inline void SetSupportsEnhancedMonitoring(bool value) { m_supportsEnhancedMonitoringHasBeenSet = true; m_supportsEnhancedMonitoring = value; } /** *

          Indicates whether the DB instance supports enhanced monitoring at intervals * from 1 to 60 seconds.

          */ inline OrderableDBInstanceOption& WithSupportsEnhancedMonitoring(bool value) { SetSupportsEnhancedMonitoring(value); return *this;} /** *

          Indicates whether this orderable DB instance supports IAM database * authentication.

          */ inline bool GetSupportsIAMDatabaseAuthentication() const{ return m_supportsIAMDatabaseAuthentication; } /** *

          Indicates whether this orderable DB instance supports IAM database * authentication.

          */ inline void SetSupportsIAMDatabaseAuthentication(bool value) { m_supportsIAMDatabaseAuthenticationHasBeenSet = true; m_supportsIAMDatabaseAuthentication = value; } /** *

          Indicates whether this orderable DB instance supports IAM database * authentication.

          */ inline OrderableDBInstanceOption& WithSupportsIAMDatabaseAuthentication(bool value) { SetSupportsIAMDatabaseAuthentication(value); return *this;} private: Aws::String m_engine; bool m_engineHasBeenSet; Aws::String m_engineVersion; bool m_engineVersionHasBeenSet; Aws::String m_dBInstanceClass; bool m_dBInstanceClassHasBeenSet; Aws::String m_licenseModel; bool m_licenseModelHasBeenSet; Aws::Vector m_availabilityZones; bool m_availabilityZonesHasBeenSet; bool m_multiAZCapable; bool m_multiAZCapableHasBeenSet; bool m_readReplicaCapable; bool m_readReplicaCapableHasBeenSet; bool m_vpc; bool m_vpcHasBeenSet; bool m_supportsStorageEncryption; bool m_supportsStorageEncryptionHasBeenSet; Aws::String m_storageType; bool m_storageTypeHasBeenSet; bool m_supportsIops; bool m_supportsIopsHasBeenSet; bool m_supportsEnhancedMonitoring; bool m_supportsEnhancedMonitoringHasBeenSet; bool m_supportsIAMDatabaseAuthentication; bool m_supportsIAMDatabaseAuthenticationHasBeenSet; }; } // namespace Model } // namespace RDS } // namespace Aws ",0 " Boost.Geometry (aka GGL, Generic Geometry Library)
            
          boost::geometry::resolve_variant::relate< Geometry1, Geometry2 > Member List
          This is the complete list of members for boost::geometry::resolve_variant::relate< Geometry1, Geometry2 >, including all inherited members.
          apply(Geometry1 const &geometry1, Geometry2 const &geometry2, Mask const &mask)boost::geometry::resolve_variant::relate< Geometry1, Geometry2 > [static]

          April 2, 2011

          Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
          Copyright © 2008-2011 Bruno Lalande, Paris, France
          Copyright © 2009-2010 Mateusz Loskot, London, UK
          Documentation is generated by Doxygen
          ",0 "0

          This directory contains a project file for Visual C++, named freetype.vcxproj, and Visual Studio, called freetype.sln. It compiles the following libraries from the FreeType 2.4.11 sources:

                freetype2411.lib     - release build; single threaded
                freetype2411_D.lib   - debug build;   single threaded
                freetype2411MT.lib   - release build; multi-threaded
                freetype2411MT_D.lib - debug build;   multi-threaded

          Be sure to extract the files with the Windows (CR+LF) line endings. ZIP archives are already stored this way, so no further action is required. If you use some .tar.*z archives, be sure to configure your extracting tool to convert the line endings. For example, with WinZip, you should activate the TAR file smart CR/LF Conversion option. Alternatively, you may consider using the unix2dos or u2d utilities that are floating around, which specifically deal with this particular problem.

          Build directories are placed in the top-level objs directory.

          ",0 "xtern ""C"" { #endif /* Type: ALLEGRO_DISPLAY_MODE */ typedef struct ALLEGRO_DISPLAY_MODE { int width; int height; int format; int refresh_rate; } ALLEGRO_DISPLAY_MODE; AL_FUNC(int, al_get_num_display_modes, (void)); AL_FUNC(ALLEGRO_DISPLAY_MODE*, al_get_display_mode, (int index, ALLEGRO_DISPLAY_MODE *mode)); #ifdef __cplusplus } #endif #endif /* vim: set ts=8 sts=3 sw=3 et: */ ",0 "s file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// /// \file /// \brief This file defines OpenMP AST classes for executable directives and /// clauses. /// //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_AST_STMTOPENMP_H #define LLVM_CLANG_AST_STMTOPENMP_H #include ""clang/Basic/OpenMPKinds.h"" #include ""clang/Basic/SourceLocation.h"" #include ""clang/AST/Expr.h"" #include ""clang/AST/Stmt.h"" namespace clang { //===----------------------------------------------------------------------===// // AST classes for clauses. //===----------------------------------------------------------------------===// /// \brief This is a basic class for representing single OpenMP clause. /// class OMPClause { /// \brief Starting location of the clause (the clause keyword). SourceLocation StartLoc; /// \brief Ending location of the clause. SourceLocation EndLoc; /// \brief Kind of the clause. OpenMPClauseKind Kind; protected: OMPClause(OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc) : StartLoc(StartLoc), EndLoc(EndLoc), Kind(K) {} public: /// \brief Returns the starting location of the clause. SourceLocation getLocStart() const { return StartLoc; } /// \brief Returns the ending location of the clause. SourceLocation getLocEnd() const { return EndLoc; } /// \brief Sets the starting location of the clause. void setLocStart(SourceLocation Loc) { StartLoc = Loc; } /// \brief Sets the ending location of the clause. void setLocEnd(SourceLocation Loc) { EndLoc = Loc; } /// \brief Returns kind of OpenMP clause (private, shared, reduction, etc.). OpenMPClauseKind getClauseKind() const { return Kind; } bool isImplicit() const { return StartLoc.isInvalid();} StmtRange children(); ConstStmtRange children() const { return const_cast(this)->children(); } static bool classof(const OMPClause *T) { return true; } }; /// \brief This represents clauses with the list of variables like 'private', /// 'firstprivate', 'copyin', 'shared', or 'reduction' clauses in the /// '#pragma omp ...' directives. template class OMPVarList { friend class OMPClauseReader; /// \brief Location of '('. SourceLocation LParenLoc; /// \brief Number of variables in the list. unsigned NumVars; protected: /// \brief Fetches list of variables associated with this clause. llvm::MutableArrayRef getVarRefs() { return llvm::MutableArrayRef( reinterpret_cast(static_cast(this) + 1), NumVars); } /// \brief Sets the list of variables for this clause. void setVarRefs(ArrayRef VL) { assert(VL.size() == NumVars && ""Number of variables is not the same as the preallocated buffer""); std::copy(VL.begin(), VL.end(), reinterpret_cast(static_cast(this) + 1)); } /// \brief Build clause with number of variables \a N. /// /// \param N Number of the variables in the clause. /// OMPVarList(SourceLocation LParenLoc, unsigned N) : LParenLoc(LParenLoc), NumVars(N) { } public: typedef llvm::MutableArrayRef::iterator varlist_iterator; typedef ArrayRef::iterator varlist_const_iterator; unsigned varlist_size() const { return NumVars; } bool varlist_empty() const { return NumVars == 0; } varlist_iterator varlist_begin() { return getVarRefs().begin(); } varlist_iterator varlist_end() { return getVarRefs().end(); } varlist_const_iterator varlist_begin() const { return getVarRefs().begin(); } varlist_const_iterator varlist_end() const { return getVarRefs().end(); } /// \brief Sets the location of '('. void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; } /// \brief Returns the location of '('. SourceLocation getLParenLoc() const { return LParenLoc; } /// \brief Fetches list of all variables in the clause. ArrayRef getVarRefs() const { return ArrayRef( reinterpret_cast(static_cast(this) + 1), NumVars); } }; /// \brief This represents 'default' clause in the '#pragma omp ...' directive. /// /// \code /// #pragma omp parallel default(shared) /// \endcode /// In this example directive '#pragma omp parallel' has simple 'default' /// clause with kind 'shared'. /// class OMPDefaultClause : public OMPClause { friend class OMPClauseReader; /// \brief Location of '('. SourceLocation LParenLoc; /// \brief A kind of the 'default' clause. OpenMPDefaultClauseKind Kind; /// \brief Start location of the kind in source code. SourceLocation KindKwLoc; /// \brief Set kind of the clauses. /// /// \param K Argument of clause. /// void setDefaultKind(OpenMPDefaultClauseKind K) { Kind = K; } /// \brief Set argument location. /// /// \param KLoc Argument location. /// void setDefaultKindKwLoc(SourceLocation KLoc) { KindKwLoc = KLoc; } public: /// \brief Build 'default' clause with argument \a A ('none' or 'shared'). /// /// \param A Argument of the clause ('none' or 'shared'). /// \param ALoc Starting location of the argument. /// \param StartLoc Starting location of the clause. /// \param LParenLoc Location of '('. /// \param EndLoc Ending location of the clause. /// OMPDefaultClause(OpenMPDefaultClauseKind A, SourceLocation ALoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc) : OMPClause(OMPC_default, StartLoc, EndLoc), LParenLoc(LParenLoc), Kind(A), KindKwLoc(ALoc) { } /// \brief Build an empty clause. /// OMPDefaultClause() : OMPClause(OMPC_default, SourceLocation(), SourceLocation()), LParenLoc(SourceLocation()), Kind(OMPC_DEFAULT_unknown), KindKwLoc(SourceLocation()) { } /// \brief Sets the location of '('. void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; } /// \brief Returns the location of '('. SourceLocation getLParenLoc() const { return LParenLoc; } /// \brief Returns kind of the clause. OpenMPDefaultClauseKind getDefaultKind() const { return Kind; } /// \brief Returns location of clause kind. SourceLocation getDefaultKindKwLoc() const { return KindKwLoc; } static bool classof(const OMPClause *T) { return T->getClauseKind() == OMPC_default; } StmtRange children() { return StmtRange(); } }; /// \brief This represents clause 'private' in the '#pragma omp ...' directives. /// /// \code /// #pragma omp parallel private(a,b) /// \endcode /// In this example directive '#pragma omp parallel' has clause 'private' /// with the variables 'a' and 'b'. /// class OMPPrivateClause : public OMPClause, public OMPVarList { /// \brief Build clause with number of variables \a N. /// /// \param StartLoc Starting location of the clause. /// \param LParenLoc Location of '('. /// \param EndLoc Ending location of the clause. /// \param N Number of the variables in the clause. /// OMPPrivateClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned N) : OMPClause(OMPC_private, StartLoc, EndLoc), OMPVarList(LParenLoc, N) { } /// \brief Build an empty clause. /// /// \param N Number of variables. /// explicit OMPPrivateClause(unsigned N) : OMPClause(OMPC_private, SourceLocation(), SourceLocation()), OMPVarList(SourceLocation(), N) { } public: /// \brief Creates clause with a list of variables \a VL. /// /// \param C AST context. /// \param StartLoc Starting location of the clause. /// \param LParenLoc Location of '('. /// \param EndLoc Ending location of the clause. /// \param VL List of references to the variables. /// static OMPPrivateClause *Create(ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef VL); /// \brief Creates an empty clause with the place for \a N variables. /// /// \param C AST context. /// \param N The number of variables. /// static OMPPrivateClause *CreateEmpty(ASTContext &C, unsigned N); StmtRange children() { return StmtRange(reinterpret_cast(varlist_begin()), reinterpret_cast(varlist_end())); } static bool classof(const OMPClause *T) { return T->getClauseKind() == OMPC_private; } }; //===----------------------------------------------------------------------===// // AST classes for directives. //===----------------------------------------------------------------------===// /// \brief This is a basic class for representing single OpenMP executable /// directive. /// class OMPExecutableDirective : public Stmt { friend class ASTStmtReader; /// \brief Kind of the directive. OpenMPDirectiveKind Kind; /// \brief Starting location of the directive (directive keyword). SourceLocation StartLoc; /// \brief Ending location of the directive. SourceLocation EndLoc; /// \brief Pointer to the list of clauses. llvm::MutableArrayRef Clauses; /// \brief Associated statement (if any) and expressions. llvm::MutableArrayRef StmtAndExpressions; protected: /// \brief Build instance of directive of class \a K. /// /// \param SC Statement class. /// \param K Kind of OpenMP directive. /// \param StartLoc Starting location of the directive (directive keyword). /// \param EndLoc Ending location of the directive. /// template OMPExecutableDirective(const T *, StmtClass SC, OpenMPDirectiveKind K, SourceLocation StartLoc, SourceLocation EndLoc, unsigned NumClauses, unsigned NumberOfExpressions) : Stmt(SC), Kind(K), StartLoc(StartLoc), EndLoc(EndLoc), Clauses(reinterpret_cast(static_cast(this) + 1), NumClauses), StmtAndExpressions(reinterpret_cast(Clauses.end()), NumberOfExpressions) { } /// \brief Sets the list of variables for this clause. /// /// \param Clauses The list of clauses for the directive. /// void setClauses(ArrayRef Clauses); /// \brief Set the associated statement for the directive. /// /// /param S Associated statement. /// void setAssociatedStmt(Stmt *S) { StmtAndExpressions[0] = S; } public: /// \brief Returns starting location of directive kind. SourceLocation getLocStart() const { return StartLoc; } /// \brief Returns ending location of directive. SourceLocation getLocEnd() const { return EndLoc; } /// \brief Set starting location of directive kind. /// /// \param Loc New starting location of directive. /// void setLocStart(SourceLocation Loc) { StartLoc = Loc; } /// \brief Set ending location of directive. /// /// \param Loc New ending location of directive. /// void setLocEnd(SourceLocation Loc) { EndLoc = Loc; } /// \brief Get number of clauses. unsigned getNumClauses() const { return Clauses.size(); } /// \brief Returns specified clause. /// /// \param i Number of clause. /// OMPClause *getClause(unsigned i) const { assert(i < Clauses.size() && ""index out of bound!""); return Clauses[i]; } /// \brief Returns statement associated with the directive. Stmt *getAssociatedStmt() const { return StmtAndExpressions[0]; } OpenMPDirectiveKind getDirectiveKind() const { return Kind; } static bool classof(const Stmt *S) { return S->getStmtClass() >= firstOMPExecutableDirectiveConstant && S->getStmtClass() <= lastOMPExecutableDirectiveConstant; } child_range children() { return child_range(StmtAndExpressions.begin(), StmtAndExpressions.end()); } ArrayRef clauses() { return Clauses; } ArrayRef clauses() const { return Clauses; } }; /// \brief This represents '#pragma omp parallel' directive. /// /// \code /// #pragma omp parallel private(a,b) reduction(+: c,d) /// \endcode /// In this example directive '#pragma omp parallel' has clauses 'private' /// with the variables 'a' and 'b' and 'reduction' with operator '+' and /// variables 'c' and 'd'. /// class OMPParallelDirective : public OMPExecutableDirective { /// \brief Build directive with the given start and end location. /// /// \param StartLoc Starting location of the directive (directive keyword). /// \param EndLoc Ending Location of the directive. /// OMPParallelDirective(SourceLocation StartLoc, SourceLocation EndLoc, unsigned N) : OMPExecutableDirective(this, OMPParallelDirectiveClass, OMPD_parallel, StartLoc, EndLoc, N, 1) { } /// \brief Build an empty directive. /// /// \param N Number of clauses. /// explicit OMPParallelDirective(unsigned N) : OMPExecutableDirective(this, OMPParallelDirectiveClass, OMPD_parallel, SourceLocation(), SourceLocation(), N, 1) { } public: /// \brief Creates directive with a list of \a Clauses. /// /// \param C AST context. /// \param StartLoc Starting location of the directive kind. /// \param EndLoc Ending Location of the directive. /// \param Clauses List of clauses. /// \param AssociatedStmt Statement associated with the directive. /// static OMPParallelDirective *Create(ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef Clauses, Stmt *AssociatedStmt); /// \brief Creates an empty directive with the place for \a N clauses. /// /// \param C AST context. /// \param N The number of clauses. /// static OMPParallelDirective *CreateEmpty(ASTContext &C, unsigned N, EmptyShell); static bool classof(const Stmt *T) { return T->getStmtClass() == OMPParallelDirectiveClass; } }; } // end namespace clang #endif ",0 "ib.min.js"">//-->
          ",0 "s hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the ""Software""), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- #ifndef GUI_ASSET_H #define GUI_ASSET_H #ifndef _ASSET_BASE_H_ #include ""assets/assetBase.h"" #endif #ifndef _ASSET_DEFINITION_H_ #include ""assets/assetDefinition.h"" #endif #ifndef _STRINGUNIT_H_ #include ""string/stringUnit.h"" #endif #ifndef _ASSET_FIELD_TYPES_H_ #include ""assets/assetFieldTypes.h"" #endif #include ""gui/editor/guiInspectorTypes.h"" //----------------------------------------------------------------------------- class GUIAsset : public AssetBase { typedef AssetBase Parent; StringTableEntry mScriptFile; StringTableEntry mGUIFile; StringTableEntry mScriptPath; StringTableEntry mGUIPath; public: GUIAsset(); virtual ~GUIAsset(); /// Engine. static void initPersistFields(); virtual void copyTo(SimObject* object); /// Declare Console Object. DECLARE_CONOBJECT(GUIAsset); void setGUIFile(const char* pScriptFile); inline StringTableEntry getGUIFile(void) const { return mGUIFile; }; void setScriptFile(const char* pScriptFile); inline StringTableEntry getScriptFile(void) const { return mScriptFile; }; inline StringTableEntry getGUIPath(void) const { return mGUIPath; }; inline StringTableEntry getScriptPath(void) const { return mScriptPath; }; protected: virtual void initializeAsset(void); virtual void onAssetRefresh(void); static bool setGUIFile(void *obj, const char *index, const char *data) { static_cast(obj)->setGUIFile(data); return false; } static const char* getGUIFile(void* obj, const char* data) { return static_cast(obj)->getGUIFile(); } static bool setScriptFile(void *obj, const char *index, const char *data) { static_cast(obj)->setScriptFile(data); return false; } static const char* getScriptFile(void* obj, const char* data) { return static_cast(obj)->getScriptFile(); } }; DefineConsoleType(TypeGUIAssetPtr, GUIAsset) //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- class GuiInspectorTypeGUIAssetPtr : public GuiInspectorTypeFileName { typedef GuiInspectorTypeFileName Parent; public: GuiBitmapButtonCtrl *mSMEdButton; DECLARE_CONOBJECT(GuiInspectorTypeGUIAssetPtr); static void consoleInit(); virtual GuiControl* constructEditControl(); virtual bool updateRects(); }; #endif // _ASSET_BASE_H_ ",0 "/ #include #include #include void clearpri() //调整光标 { system(""busybox clear""); } void init(int num) //记录初始化 { FILE* fp; int n=0; char s[2000]; fp=fopen(""data/ec.db"",""w""); while(n='0'&&c<='9') { num++; printf(""%c"",c); s=s*10+c-'0'; } else if(c==127&&num>0) { s=s/10; printf(""\b \b""); num--; } } scanf(""%d"",&s); rewind(fp); n=s; if(s==1||s==0)return 1; while(s>1) { if((c=fgetc(fp))=='^')s--; if( num>5 || (feof(fp) && s>1) ) { clearpri(); printf(""error!数值超出范围\n按任意键返回第一题""); getch(); fseek(fp,0,SEEK_SET); return 1; } } fgetc(fp); fgetc(fp); return n; } void uud(FILE* fp,int s) //无显示跳题 { char c; rewind(fp); if(s==1||s==0)return ; while(s>1) { if((c=fgetc(fp))=='^')s--; if(c==EOF&&s>1) { fseek(fp,0,SEEK_SET); return ; } } fgetc(fp); fgetc(fp); return ; } int udd() //统计题量 { char c; int n=0; FILE* fp; fp=fopen(""data/select.db"",""r""); while((c=fgetc(fp))!=EOF)if(c=='^')n++; return n; } int ude() //统计错题量 { char c; int n=0; FILE* fp; fp=fopen(""data/ec.db"",""r""); while((c=fgetc(fp))!=EOF)if(c=='1')n++; return n; } int uddd(FILE* fp) //计算当前题号 { FILE* fp1; int num=1,n; n=ftell(fp); fp1=fopen(""data/select.db"",""r""); while(ftell(fp1)<=n) { if(fgetc(fp1)=='^')num++; } return num; } int Option( char rw , int nb , int n ) //存储设置 { int nu[2] ; FILE* fp ; if( ( fp=fopen( ""data/option.ini"" , ""r"" ) ) == NULL ) { fclose( fp ) ; printf( ""\n< 文件错误:设置文件未找到 >\n"" ) ; exit(0); } fscanf( fp , ""num = %d\n"" , &nu[0] ) ; fclose( fp ) ; switch( rw ) { case 'r': switch( n ) { case 0: if( nu[0] == 0 )return 1 ; else return nu[0] ; break ; } break ; case 'w': if( ( fp=fopen( ""data/option.ini"" , ""w"" ) ) == NULL ) { fclose( fp ) ; printf( ""\n< 文件错误:设置文件未能创建成功 >\n"" ) ; exit( 0 ) ; } switch( n ) { case 0: if( nb == 0 )nu[0] =1 ; else nu[0] =nb ; break ; } fprintf( fp , ""num = %d\n"" , nu[0] ) ; fclose( fp ) ; return 1 ; } return 0 ; } ",0 "ER['argv'][1]; } else { die(""Usage: php {$_SERVER['argv'][0]} \n""); } $result = array('comments' => array()); $extension = pathinfo($path, PATHINFO_EXTENSION); // Whitelist of extensions to check (default phpcs list) if(in_array($extension, array('php', 'js', 'inc', 'css'))) { // Run each sniff // phpcs --encoding=utf-8 --standard=framework/tests/phpcs/tabs.xml run_sniff('tabs.xml', $path, $result); // phpcs --encoding=utf-8 --tab-width=4 --standard=framework/tests/phpcs/ruleset.xml run_sniff('ruleset.xml', $path, $result, '--tab-width=4'); } echo json_encode($result); function run_sniff($standard, $path, array &$result, $extraFlags = '') { $sniffPath = escapeshellarg(__DIR__ . '/phpcs/' . $standard); $checkPath = escapeshellarg($path); exec(""phpcs --encoding=utf-8 $extraFlags --standard=$sniffPath --report=xml $checkPath"", $output); // We can't check the return code as it's non-zero if the sniff finds an error if($output) { $xml = implode(""\n"", $output); $xml = simplexml_load_string($xml); $errors = $xml->xpath('/phpcs/file/error'); if($errors) { $sanePath = str_replace('/', '_', $path); foreach($errors as $error) { $attributes = $error->attributes(); $result['comments'][] = array( 'line' => (int)strval($attributes->line), 'id' => $standard . '-' . $sanePath . '-' . $attributes->line . '-' . $attributes->column, 'message' => strval($error) ); } } } } ",0 " #include #include #ifndef _WRS_KERNEL #include #endif class ArrayEntryType; #include ""ArrayData.h"" #include ""ComplexEntryType.h"" struct ArrayEntryData{ uint8_t length; EntryValue* array; }; /** * Represents the size and contents of an array. */ typedef struct ArrayEntryData ArrayEntryData; /** * Represents the type of an array entry value. */ class ArrayEntryType : public ComplexEntryType {//TODO allow for array of complex type private: NetworkTableEntryType& m_elementType; public: /** * Creates a new ArrayEntryType. * * @param id The ID which identifies this type to other nodes on * across the network. * @param elementType The type of the elements this array contains. */ ArrayEntryType(TypeId id, NetworkTableEntryType& elementType); /** * Creates a copy of an value which is of the type contained by * this array. * * @param value The element, of this array's contained type, to * copy. * @return A copy of the given value. */ EntryValue copyElement(EntryValue value); /** * Deletes a entry value which is of the type contained by * this array. * * After calling this method, the given entry value is * no longer valid. * * @param value The value to delete. */ void deleteElement(EntryValue value); /** * See {@link NetworkTableEntryType}::sendValue */ void sendValue(EntryValue value, DataIOStream& os); /** * See {@link NetworkTableEntryType}::readValue */ EntryValue readValue(DataIOStream& is); /** * See {@link NetworkTableEntryType}::copyValue */ EntryValue copyValue(EntryValue value); /** * See {@link NetworkTableEntryType}::deleteValue */ void deleteValue(EntryValue value); /** * See {@link ComplexEntryType}::internalizeValue */ EntryValue internalizeValue(std::string& key, ComplexData& externalRepresentation, EntryValue currentInteralValue); /** * See {@link ComplexEntryType}::exportValue */ void exportValue(std::string& key, EntryValue internalData, ComplexData& externalRepresentation); }; #endif /* ARRAYENTRYTYPE_H_ */ ",0 "enerated by javadoc (1.8.0_31) on Wed Dec 17 20:48:31 PST 2014 --> Uses of Class org.omg.CORBA.NO_RESOURCES (Java Platform SE 8 )
          Java™ Platform
          Standard Ed. 8
          • Prev
          • Next

          Uses of Class
          org.omg.CORBA.NO_RESOURCES

          No usage of org.omg.CORBA.NO_RESOURCES
          Java™ Platform
          Standard Ed. 8
          • Prev
          • Next

          Submit a bug or feature
          For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
          Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.

          ",0 "** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QDECLARATIVECOMPONENT_P_H #define QDECLARATIVECOMPONENT_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #include ""qdeclarativecomponent.h"" #include ""private/qdeclarativeengine_p.h"" #include ""private/qdeclarativetypeloader_p.h"" #include ""private/qbitfield_p.h"" #include ""qdeclarativeerror.h"" #include ""qdeclarative.h"" #include #include #include #include QT_BEGIN_NAMESPACE class QDeclarativeComponent; class QDeclarativeEngine; class QDeclarativeCompiledData; class QDeclarativeComponentAttached; class Q_AUTOTEST_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback { Q_DECLARE_PUBLIC(QDeclarativeComponent) public: QDeclarativeComponentPrivate() : typeData(0), progress(0.), start(-1), count(-1), cc(0), engine(0), creationContext(0) {} QObject *beginCreate(QDeclarativeContextData *, const QBitField &); void completeCreate(); QDeclarativeTypeData *typeData; virtual void typeDataReady(QDeclarativeTypeData *) {}; virtual void typeDataProgress(QDeclarativeTypeData *, qreal) {}; void fromTypeData(QDeclarativeTypeData *data); QUrl url; qreal progress; int start; int count; QDeclarativeCompiledData *cc; struct ConstructionState { ConstructionState() : componentAttached(0), completePending(false) {} QList > bindValues; QList > parserStatus; QList, int> > finalizedParserStatus; QDeclarativeComponentAttached *componentAttached; QList errors; bool completePending; }; ConstructionState state; static QObject *begin(QDeclarativeContextData *parentContext, QDeclarativeContextData *componentCreationContext, QDeclarativeCompiledData *component, int start, int count, ConstructionState *state, QList *errors, const QBitField &bindings = QBitField()); static void beginDeferred(QDeclarativeEnginePrivate *enginePriv, QObject *object, ConstructionState *state); static void complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state); QScriptValue createObject(QObject *publicParent, const QScriptValue valuemap); QDeclarativeEngine *engine; QDeclarativeGuardedContextData creationContext; void clear(); static QDeclarativeComponentPrivate *get(QDeclarativeComponent *c) { return static_cast(QObjectPrivate::get(c)); } }; class QDeclarativeComponentAttached : public QObject { Q_OBJECT public: QDeclarativeComponentAttached(QObject *parent = 0); virtual ~QDeclarativeComponentAttached() {}; void add(QDeclarativeComponentAttached **a) { prev = a; next = *a; *a = this; if (next) next->prev = &next; } void rem() { if (next) next->prev = prev; *prev = next; next = 0; prev = 0; } QDeclarativeComponentAttached **prev; QDeclarativeComponentAttached *next; Q_SIGNALS: void completed(); void destruction(); private: friend class QDeclarativeContextData; friend class QDeclarativeComponentPrivate; }; QT_END_NAMESPACE #endif // QDECLARATIVECOMPONENT_P_H ",0 "mlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"" lang=""en""> terminology

          Module terminology


          Classes

          TerminologyPlaceable

          Variables

          parsers

          [hide private] ",0 "a http-equiv=""X-UA-Compatible"" content=""IE=edge"">

          ",0 "ialive/MediaLive_EXPORTS.h> #include namespace Aws { namespace MediaLive { namespace Model { enum class WebvttDestinationStyleControl { NOT_SET, NO_STYLE_DATA, PASSTHROUGH }; namespace WebvttDestinationStyleControlMapper { AWS_MEDIALIVE_API WebvttDestinationStyleControl GetWebvttDestinationStyleControlForName(const Aws::String& name); AWS_MEDIALIVE_API Aws::String GetNameForWebvttDestinationStyleControl(WebvttDestinationStyleControl value); } // namespace WebvttDestinationStyleControlMapper } // namespace Model } // namespace MediaLive } // namespace Aws ",0 " that you are going to be using. ***/ // Enqueue Scripts & Stylesheets require_once(dirname(__FILE__) . '/functions/queue-scripts.php'); // // Initialize Custom Post Types // require_once(dirname(__FILE__) . '/functions/post-types.php'); // // // Initialize Custom Taxonomies // require_once(dirname(__FILE__) . '/functions/taxonomies.php'); // // // Enqueue Utility Functions // require_once(dirname(__FILE__) . '/functions/utilities/wp-utilities.php'); // require_once(dirname(__FILE__) . '/functions/utilities/global-utilities.php'); // // Enqueue Modular Functions require_once(dirname(__FILE__) . '/functions/modules/menus.php'); require_once(dirname(__FILE__) . '/functions/modules/latest_news.php'); // register latest news widget function c4rva_latest_news_widget_init() { $opts = array( 'before_widget' => '', 'after_widget' => '', 'before_title' => '

          ', 'after_title' => '

          ' ); register_sidebar(array_merge($opts, array( 'name' => 'Latest News', 'id' => 'latest_news' ))); } add_action( 'widgets_init', 'c4rva_latest_news_widget_init' ); // register triptych widget areas function c4rva_triptych_widgets_init() { $opts = array( 'before_widget' => '', 'after_widget' => '', 'before_title' => '

          ', 'after_title' => '

          ' ); register_sidebar(array_merge($opts, array( 'name' => 'Home Triptych Left', 'id' => 'triptych_left' ))); register_sidebar(array_merge($opts, array( 'name' => 'Home Triptych Center', 'id' => 'triptych_center' ))); register_sidebar(array_merge($opts, array( 'name' => 'Home Triptych Right', 'id' => 'triptych_right' ))); } add_action( 'widgets_init', 'c4rva_triptych_widgets_init' ); // register meetup widget area function c4rva_meetup_widget_init() { register_sidebar(array( 'name' => 'Home Next Meetup', 'id' => 'next_meetup', 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => '' )); } add_action( 'widgets_init', 'c4rva_meetup_widget_init' ); // load meetup-widgets plugin function c4rva_load_plugins() { if (!class_exists('VsMeet')) { require_once(TEMPLATEPATH . '/plugins/meetup-widgets/vs_meetup.php'); } } add_action( 'after_setup_theme', 'c4rva_load_plugins' ); // displays the nav menu (called from theme) function c4rva_nav_menu() { wp_nav_menu(array( 'menu' => 'top', 'menu_class' => 'header__list', 'container' => 'false' )); } // displays a widget area (called from theme) function c4rva_show_widget_area( $id ) { if ( is_active_sidebar( $id ) ) { dynamic_sidebar( $id ); } } function the_slug(){ echo get_post_field( 'post_name', get_post() ); } ",0 "rec{ margin-left:4px; color:blue; font-size:14px; font-weight:bold; cursor:pointer; } .bouton:hover{ color:#ccc; } #log{ border:1px solid red; background-color:pink; }
          Afficher : Rafraichir

          Ajouter

          &term, const QMap &majority, const QString &term_, const QString &majority_); void clear(); signals: void back(); void show_plans(const QString &term, const QString &majority); protected: void paintEvent(QPaintEvent *); private slots: void on_button_back_clicked(); void on_button_submit_clicked(); private: void set_button_(bool flag); QMap term_; QMap majority_; Ui::select *ui = nullptr; }; #endif // SELECT_H ",0 "ontent=""IE=edge""> 涪陵博生和美妇产医院

          涪陵博生和美妇产医院

          May 3, 2016

          涪陵博生和美妇产医院

          信息

          ",0 "; import org.kalnee.trivor.insights.service.InsightService; import org.kalnee.trivor.nlp.domain.ChunkFrequency; import org.kalnee.trivor.nlp.domain.PhrasalVerbUsage; import org.kalnee.trivor.nlp.domain.SentenceFrequency; import org.kalnee.trivor.nlp.domain.WordUsage; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; import java.util.Set; @RestController @RequestMapping(value = ""/api/insights"") public class InsightsResource { private final InsightService insightService; public InsightsResource(InsightService insightService) { this.insightService = insightService; } @GetMapping public ResponseEntity> findByInsightAndImdb(@RequestParam(""imdbId"") String imdbId, Pageable pageable) { return ResponseEntity.ok().body(insightService.findByImdbId(imdbId, pageable)); } @GetMapping(""/summary"") @Timed public ResponseEntity> getInsightsSummary(@RequestParam(""imdbId"") String imdbId) { return ResponseEntity.ok().body(insightService.getInsightsSummary(imdbId)); } @GetMapping(""/sentences/frequency"") @Timed public ResponseEntity> findSentencesFrequency(@RequestParam(""imdbId"") String imdbId, @RequestParam(value = ""limit"", required = false) Integer limit) { return ResponseEntity.ok().body( insightService.findSentencesFrequencyByImdbId(imdbId, limit) ); } @GetMapping(""/chunks/frequency"") @Timed public ResponseEntity> findChunksFrequency(@RequestParam(""imdbId"") String imdbId, @RequestParam(value = ""limit"", required = false) Integer limit) { return ResponseEntity.ok().body( insightService.findChunksFrequencyByImdbId(imdbId, limit) ); } @GetMapping(""/phrasal-verbs/usage"") @Timed public ResponseEntity> findPhrasalVerbsUsageByImdbId(@RequestParam(""imdbId"") String imdbId) { return ResponseEntity.ok().body(insightService.findPhrasalVerbsUsageByImdbId(imdbId)); } @GetMapping(""/vocabulary/{vocabulary}/frequency"") @Timed public ResponseEntity> findVocabularyFrequencyByImdbId( @PathVariable(""vocabulary"") String vocabulary, @RequestParam(""imdbId"") String imdbId, @RequestParam(value = ""limit"", required = false) Integer limit) { return ResponseEntity.ok().body(insightService.findVocabularyFrequencyByImdbId(vocabulary, imdbId, limit)); } @GetMapping(""/vocabulary/{vocabulary}/usage"") @Timed public ResponseEntity> findVocabularyUsageByImdbAndSeasonAndEpisode( @PathVariable(""vocabulary"") String vocabulary, @RequestParam(""imdbId"") String imdbId, @RequestParam(value = ""season"", required = false) Integer season, @RequestParam(value = ""episode"", required = false) Integer episode) { return ResponseEntity.ok().body( insightService.findVocabularyUsageByImdbAndSeasonAndEpisode(vocabulary, imdbId, season, episode) ); } @GetMapping(""/{insight}/genres/{genre}"") @Timed public ResponseEntity> findInsightsByGenre( @PathVariable(""genre"") String genre) { return ResponseEntity.ok().body(insightService.findInsightsByInsightAndGenre(genre)); } @GetMapping(""/{insight}/keywords/{keyword}"") @Timed public ResponseEntity> findInsightsByKeyword( @PathVariable(""keyword"") String keyword) { return ResponseEntity.ok().body(insightService.findInsightsByInsightAndKeyword(keyword)); } } ",0 "header(); ?>
          /images/saprator-circle.jpg"" width=""27"" height=""13"">

          Our Clients

            'our_clients', 'order'=>'DESC', 'posts_per_page'=>'-1')); // The Loop if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
          • "" alt=""img"">
          ",0 "soft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.requests; import com.microsoft.graph.http.IRequestBuilder; import com.microsoft.graph.core.ClientException; import com.microsoft.graph.models.ActivityBasedTimeoutPolicy; import com.microsoft.graph.models.DirectoryObject; import com.microsoft.graph.models.ExtensionProperty; import java.util.Arrays; import java.util.EnumSet; import javax.annotation.Nullable; import javax.annotation.Nonnull; import com.microsoft.graph.core.IBaseClient; import com.microsoft.graph.http.BaseRequest; import com.microsoft.graph.http.HttpMethod; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The class for the Activity Based Timeout Policy Request. */ public class ActivityBasedTimeoutPolicyRequest extends BaseRequest { /** * The request for the ActivityBasedTimeoutPolicy * * @param requestUrl the request URL * @param client the service client * @param requestOptions the options for this request */ public ActivityBasedTimeoutPolicyRequest(@Nonnull final String requestUrl, @Nonnull final IBaseClient client, @Nullable final java.util.List requestOptions) { super(requestUrl, client, requestOptions, ActivityBasedTimeoutPolicy.class); } /** * Gets the ActivityBasedTimeoutPolicy from the service * * @return a future with the result */ @Nonnull public java.util.concurrent.CompletableFuture getAsync() { return sendAsync(HttpMethod.GET, null); } /** * Gets the ActivityBasedTimeoutPolicy from the service * * @return the ActivityBasedTimeoutPolicy from the request * @throws ClientException this exception occurs if the request was unable to complete for any reason */ @Nullable public ActivityBasedTimeoutPolicy get() throws ClientException { return send(HttpMethod.GET, null); } /** * Delete this item from the service * * @return a future with the deletion result */ @Nonnull public java.util.concurrent.CompletableFuture deleteAsync() { return sendAsync(HttpMethod.DELETE, null); } /** * Delete this item from the service * @return the resulting response if the service returns anything on deletion * * @throws ClientException if there was an exception during the delete operation */ @Nullable public ActivityBasedTimeoutPolicy delete() throws ClientException { return send(HttpMethod.DELETE, null); } /** * Patches this ActivityBasedTimeoutPolicy with a source * * @param sourceActivityBasedTimeoutPolicy the source object with updates * @return a future with the result */ @Nonnull public java.util.concurrent.CompletableFuture patchAsync(@Nonnull final ActivityBasedTimeoutPolicy sourceActivityBasedTimeoutPolicy) { return sendAsync(HttpMethod.PATCH, sourceActivityBasedTimeoutPolicy); } /** * Patches this ActivityBasedTimeoutPolicy with a source * * @param sourceActivityBasedTimeoutPolicy the source object with updates * @return the updated ActivityBasedTimeoutPolicy * @throws ClientException this exception occurs if the request was unable to complete for any reason */ @Nullable public ActivityBasedTimeoutPolicy patch(@Nonnull final ActivityBasedTimeoutPolicy sourceActivityBasedTimeoutPolicy) throws ClientException { return send(HttpMethod.PATCH, sourceActivityBasedTimeoutPolicy); } /** * Creates a ActivityBasedTimeoutPolicy with a new object * * @param newActivityBasedTimeoutPolicy the new object to create * @return a future with the result */ @Nonnull public java.util.concurrent.CompletableFuture postAsync(@Nonnull final ActivityBasedTimeoutPolicy newActivityBasedTimeoutPolicy) { return sendAsync(HttpMethod.POST, newActivityBasedTimeoutPolicy); } /** * Creates a ActivityBasedTimeoutPolicy with a new object * * @param newActivityBasedTimeoutPolicy the new object to create * @return the created ActivityBasedTimeoutPolicy * @throws ClientException this exception occurs if the request was unable to complete for any reason */ @Nullable public ActivityBasedTimeoutPolicy post(@Nonnull final ActivityBasedTimeoutPolicy newActivityBasedTimeoutPolicy) throws ClientException { return send(HttpMethod.POST, newActivityBasedTimeoutPolicy); } /** * Creates a ActivityBasedTimeoutPolicy with a new object * * @param newActivityBasedTimeoutPolicy the object to create/update * @return a future with the result */ @Nonnull public java.util.concurrent.CompletableFuture putAsync(@Nonnull final ActivityBasedTimeoutPolicy newActivityBasedTimeoutPolicy) { return sendAsync(HttpMethod.PUT, newActivityBasedTimeoutPolicy); } /** * Creates a ActivityBasedTimeoutPolicy with a new object * * @param newActivityBasedTimeoutPolicy the object to create/update * @return the created ActivityBasedTimeoutPolicy * @throws ClientException this exception occurs if the request was unable to complete for any reason */ @Nullable public ActivityBasedTimeoutPolicy put(@Nonnull final ActivityBasedTimeoutPolicy newActivityBasedTimeoutPolicy) throws ClientException { return send(HttpMethod.PUT, newActivityBasedTimeoutPolicy); } /** * Sets the select clause for the request * * @param value the select clause * @return the updated request */ @Nonnull public ActivityBasedTimeoutPolicyRequest select(@Nonnull final String value) { addSelectOption(value); return this; } /** * Sets the expand clause for the request * * @param value the expand clause * @return the updated request */ @Nonnull public ActivityBasedTimeoutPolicyRequest expand(@Nonnull final String value) { addExpandOption(value); return this; } } ",0 "nd/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include ""config.h"" #include ""pcm_volume.h"" #include ""pcm_utils.h"" #include ""audio_format.h"" #include #include #include #undef G_LOG_DOMAIN #define G_LOG_DOMAIN ""pcm_volume"" static void pcm_volume_change_8(int8_t *buffer, const int8_t *end, int volume) { while (buffer < end) { int32_t sample = *buffer; sample = (sample * volume + pcm_volume_dither() + PCM_VOLUME_1 / 2) / PCM_VOLUME_1; *buffer++ = pcm_range(sample, 8); } } static void pcm_volume_change_16(int16_t *buffer, const int16_t *end, int volume) { while (buffer < end) { int32_t sample = *buffer; sample = (sample * volume + pcm_volume_dither() + PCM_VOLUME_1 / 2) / PCM_VOLUME_1; *buffer++ = pcm_range(sample, 16); } } #ifdef __i386__ /** * Optimized volume function for i386. Use the EDX:EAX 2*32 bit * multiplication result instead of emulating 64 bit multiplication. */ static inline int32_t pcm_volume_sample_24(int32_t sample, int32_t volume, G_GNUC_UNUSED int32_t dither) { int32_t result; asm(/* edx:eax = sample * volume */ ""imul %2\n"" /* ""add %3, %1\n"" dithering disabled for now, because we have no overflow check - is dithering really important here? */ /* eax = edx:eax / PCM_VOLUME_1 */ ""sal $22, %%edx\n"" ""shr $10, %1\n"" ""or %%edx, %1\n"" : ""=a""(result) : ""0""(sample), ""r""(volume) /* , ""r""(dither) */ : ""edx"" ); return result; } #endif static void pcm_volume_change_24(int32_t *buffer, const int32_t *end, int volume) { while (buffer < end) { #ifdef __i386__ /* assembly version for i386 */ int32_t sample = *buffer; sample = pcm_volume_sample_24(sample, volume, pcm_volume_dither()); #else /* portable version */ int64_t sample = *buffer; sample = (sample * volume + pcm_volume_dither() + PCM_VOLUME_1 / 2) / PCM_VOLUME_1; #endif *buffer++ = pcm_range(sample, 24); } } static void pcm_volume_change_32(int32_t *buffer, const int32_t *end, int volume) { while (buffer < end) { #ifdef __i386__ /* assembly version for i386 */ int32_t sample = *buffer; *buffer++ = pcm_volume_sample_24(sample, volume, 0); #else /* portable version */ int64_t sample = *buffer; sample = (sample * volume + pcm_volume_dither() + PCM_VOLUME_1 / 2) / PCM_VOLUME_1; *buffer++ = pcm_range_64(sample, 32); #endif } } static void pcm_volume_change_float(float *buffer, const float *end, float volume) { while (buffer < end) { float sample = *buffer; sample *= volume; *buffer++ = sample; } } bool pcm_volume(void *buffer, size_t length, enum sample_format format, int volume) { if (volume == PCM_VOLUME_1) return true; if (volume <= 0) { memset(buffer, 0, length); return true; } const void *end = pcm_end_pointer(buffer, length); switch (format) { case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_S24: case SAMPLE_FORMAT_DSD: case SAMPLE_FORMAT_DSD_LSBFIRST: /* not implemented */ return false; case SAMPLE_FORMAT_S8: pcm_volume_change_8(buffer, end, volume); return true; case SAMPLE_FORMAT_S16: pcm_volume_change_16(buffer, end, volume); return true; case SAMPLE_FORMAT_S24_P32: pcm_volume_change_24(buffer, end, volume); return true; case SAMPLE_FORMAT_S32: pcm_volume_change_32(buffer, end, volume); return true; case SAMPLE_FORMAT_FLOAT: pcm_volume_change_float(buffer, end, pcm_volume_to_float(volume)); return true; } /* unreachable */ assert(false); return false; } ",0 " (c) 1999, 2000 Niklas Hallqvist. All rights reserved. * Copyright (c) 1999, 2000 Angelos D. Keromytis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This code was written under funding by Ericsson Radio Systems. */ #ifndef _LIBCRYPTO_H_ #define _LIBCRYPTO_H_ #include /* XXX I want #include but we appear to not install meth.h */ #include #include #include #include #include #include extern void libcrypto_init(void); #endif /* _LIBCRYPTO_H_ */ ",0 " * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /** * @file alarm.c * Platform abstraction for the alarm */ #include #include ""platform-da15000.h"" #include ""hw_timer0.h"" static bool sIsRunning = false; static uint32_t sAlarm = 0; static uint32_t sCounter; volatile bool sAlarmFired = false; static void timer0_interrupt_cb(void) { sCounter++; } void da15000AlarmProcess(otInstance *aInstance) { if ((sIsRunning) && (sAlarm <= sCounter)) { sIsRunning = false; otPlatAlarmMilliFired(aInstance); } } void da15000AlarmInit(void) { hw_timer0_init(NULL); hw_timer0_set_clock_source(HW_TIMER0_CLK_SRC_FAST); hw_timer0_set_pwm_mode(HW_TIMER0_MODE_PWM); hw_timer0_set_fast_clock_div(HW_TIMER0_FAST_CLK_DIV_4); hw_timer0_set_t0_reload(0x07D0, 0x07D0); hw_timer0_register_int(timer0_interrupt_cb); hw_timer0_set_on_clock_div(false); } uint32_t otPlatAlarmMilliGetNow(void) { return sCounter; } void otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t t0, uint32_t dt) { OT_UNUSED_VARIABLE(aInstance); sAlarm = t0 + dt; sIsRunning = true; if (sCounter == 0) { hw_timer0_enable(); } hw_timer0_unfreeze(); } void otPlatAlarmMilliStop(otInstance *aInstance) { OT_UNUSED_VARIABLE(aInstance); sIsRunning = false; hw_timer0_freeze(); } ",0 """). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ package com.amazonaws.services.workmailmessageflow.model.transform; import java.math.*; import javax.annotation.Generated; import com.amazonaws.services.workmailmessageflow.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * MessageRejectedException JSON Unmarshaller */ @Generated(""com.amazonaws:aws-java-sdk-code-generator"") public class MessageRejectedExceptionUnmarshaller extends EnhancedJsonErrorUnmarshaller { private MessageRejectedExceptionUnmarshaller() { super(com.amazonaws.services.workmailmessageflow.model.MessageRejectedException.class, ""MessageRejected""); } @Override public com.amazonaws.services.workmailmessageflow.model.MessageRejectedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception { com.amazonaws.services.workmailmessageflow.model.MessageRejectedException messageRejectedException = new com.amazonaws.services.workmailmessageflow.model.MessageRejectedException( null); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return messageRejectedException; } private static MessageRejectedExceptionUnmarshaller instance; public static MessageRejectedExceptionUnmarshaller getInstance() { if (instance == null) instance = new MessageRejectedExceptionUnmarshaller(); return instance; } } ",0 "teway = 'https://www.tenpay.com/cgi-bin/med/show_opentrans.cgi'; var $_code = 'tenpay'; /** * 获取支付表单 * * @author Garbin * @param array $order_info 待支付的订单信息,必须包含总费用及唯一外部交易号 * @return array */ function get_payform($order_info) { /* 版本号 */ $version = '2'; /* 任务代码,定值:12 */ $cmdno = '12'; /* 编码标准 */ if (!defined('CHARSET')) { $encode_type = 2; } else { if (CHARSET == 'utf-8') { $encode_type = 2; } else { $encode_type = 1; } } /* 平台提供者,代理商的财付通账号 */ $chnid = $this->_config['tenpay_account']; /* 收款方财付通账号 */ $seller = $this->_config['tenpay_account']; /* 商品名称 */ $mch_name = $this->_get_subject($order_info); /* 总金额 */ $mch_price = floatval($order_info['order_amount']) * 100; /* 物流配送说明 */ $transport_desc = ''; $transport_fee = ''; /* 交易说明 */ $mch_desc = $this->_get_subject($order_info); $need_buyerinfo = '2' ; /* 交易类型:2、虚拟交易,1、实物交易 */ $mch_type = $this->_config['tenpay_type']; /* 生成一个随机扰码 */ $rand_num = rand(1,9); for ($i = 1; $i < 10; $i++) { $rand_num .= rand(0,9); } /* 获得订单的流水号,补零到10位 */ $mch_vno = $this->_get_trade_sn($order_info); /* 返回的路径 */ $mch_returl = $this->_create_notify_url($order_info['order_id']); $show_url = $this->_create_return_url($order_info['order_id']); $attach = $rand_num; /* 数字签名 */ $sign_text = ""attach="" . $attach . ""&chnid="" . $chnid . ""&cmdno="" . $cmdno . ""&encode_type="" . $encode_type . ""&mch_desc="" . $mch_desc . ""&mch_name="" . $mch_name . ""&mch_price="" . $mch_price .""&mch_returl="" . $mch_returl . ""&mch_type="" . $mch_type . ""&mch_vno="" . $mch_vno . ""&need_buyerinfo="" . $need_buyerinfo .""&seller="" . $seller . ""&show_url="" . $show_url . ""&version="" . $version . ""&key="" . $this->_config['tenpay_key']; $sign =md5($sign_text); /* 交易参数 */ $parameter = array( 'attach' => $attach, 'chnid' => $chnid, 'cmdno' => $cmdno, // 业务代码, 财付通支付支付接口填 1 'encode_type' => $encode_type, //编码标准 'mch_desc' => $mch_desc, 'mch_name' => $mch_name, 'mch_price' => $mch_price, // 订单金额 'mch_returl' => $mch_returl, // 接收财付通返回结果的URL 'mch_type' => $mch_type, //交易类型 'mch_vno' => $mch_vno, // 交易号(订单号),由商户网站产生(建议顺序累加) 'need_buyerinfo' => $need_buyerinfo, //是否需要在财付通填定物流信息 'seller' => $seller, // 商家的财付通商户号 'show_url' => $show_url, 'transport_desc' => $transport_desc, 'transport_fee' => $transport_fee, 'version' => $version, //版本号 2 'key' => $this->_config['tenpay_key'], 'sign' => $sign, // MD5签名 'sys_id' => '542554970' //ECMall C账号 不参与签名 ); return $this->_create_payform('GET', $parameter); } /** * 返回通知结果 * * @author Garbin * @param array $order_info * @param bool $strict * @return array 返回结果 * false 失败时返回 */ function verify_notify($order_info, $strict = false) { /*取返回参数*/ $cmd_no = $_GET['cmdno']; $retcode = $_GET['retcode']; $status = $_GET['status']; $seller = $_GET['seller']; $total_fee = $_GET['total_fee']; $trade_price = $_GET['trade_price']; $transport_fee = $_GET['transport_fee']; $buyer_id = $_GET['buyer_id']; $chnid = $_GET['chnid']; $cft_tid = $_GET['cft_tid']; $mch_vno = $_GET['mch_vno']; $attach = !empty($_GET['attach']) ? $_GET['attach'] : ''; $version = $_GET['version']; $sign = $_GET['sign']; $log_id = $mch_vno; //取得支付的log_id /* 如果$retcode大于0则表示支付失败 */ if ($retcode > 0) { //echo '操作失败'; return false; } $order_amount = $total_fee / 100; /* 检查支付的金额是否相符 */ if ($order_info['order_amount'] != $order_amount) { /* 支付的金额与实际金额不一致 */ $this->_error('price_inconsistent'); return false; } if ($order_info['out_trade_sn'] != $log_id) { /* 通知中的订单与欲改变的订单不一致 */ $this->_error('order_inconsistent'); return false; } /* 检查数字签名是否正确 */ $sign_text = ""attach="" . $attach . ""&buyer_id="" . $buyer_id . ""&cft_tid="" . $cft_tid . ""&chnid="" . $chnid . ""&cmdno="" . $cmd_no . ""&mch_vno="" . $mch_vno . ""&retcode="" . $retcode . ""&seller="" .$seller . ""&status="" . $status . ""&total_fee="" . $total_fee . ""&trade_price="" . $trade_price . ""&transport_fee="" . $transport_fee . ""&version="" . $version . ""&key="" . $this->_config['tenpay_key']; $sign_md5 = strtoupper(md5($sign_text)); if ($sign_md5 != $sign) { /* 若本地签名与网关签名不一致,说明签名不可信 */ $this->_error('sign_inconsistent'); return false; } if ($status != 3) { return false; } return array( 'target' => ORDER_ACCEPTED, ); } /** * 获取外部交易号 覆盖基类 * * @author huibiaoli * @param array $order_info * @return string */ function _get_trade_sn($order_info) { if (!$order_info['out_trade_sn'] || $order_info['pay_alter']) { $out_trade_sn = $this->_gen_trade_sn(); } else { $out_trade_sn = $order_info['out_trade_sn']; } /* 将此数据写入订单中 */ $model_order =& m('order'); $model_order->edit(intval($order_info['order_id']), array('out_trade_sn' => $out_trade_sn, 'pay_alter' => 0)); return $out_trade_sn; } /** * 生成外部交易号 * * @author huibiaoli * @return string */ function _gen_trade_sn() { /* 选择一个随机的方案 */ mt_srand((double) microtime() * 1000000); $timestamp = gmtime(); $y = date('y', $timestamp); $z = date('z', $timestamp); $out_trade_sn = $y . str_pad($z, 3, '0', STR_PAD_LEFT) . str_pad(mt_rand(1, 99999), 5, '0', STR_PAD_LEFT); $model_order =& m('order'); $orders = $model_order->find('out_trade_sn=' . $out_trade_sn); if (empty($orders)) { /* 否则就使用这个交易号 */ return $out_trade_sn; } /* 如果有重复的,则重新生成 */ return $this->_gen_trade_sn(); } } ?>",0 "eta http-equiv=""Content-Type"" content=""text/html; charset=UTF-8"">

          HOME DOWNLOAD DOCUMENTATION FAQ

          > Home > Documentation

          Using SHTOOLS with Python

          To access the SHTOOLS routines from Python, it is necessary that the pyshtools directory be in the Python search path. From within Python, enter

          import sys
          sys.path.append('/path-to-pyshtools')

          where /path-to-pyshtools should be /usr/local/lib/python2.7/site-packages after a full installation. After setting the path, it is then only necessary to execute the statement

          import pyshtools as shtools

          to load the routines and documentation. If you are using iPython, which adds improved functionality to Python, the available shtools routines can be explored by typing

          shtools.[tab]

          where [tab] is the tab key.

          To explore the list of predefined constants used by SHTOOLS, enter

          shtools.constant.[tab]

          Documentation

          To read the documentation of a routine in iPython, such as PlmBar, enter

          shtools.PlmBar?

          Documentation for the Python functions used in SHTOOLS can also be accessed by their unix man pages, appending py to the name and using all lower case letters. As an example, to access the MakeGridDH man page, use

          man pymakegriddh

          Alternatively, the man pages can be accessed from the documentation link on this web site.

          > Home > Documentation

          Institut de Physique du Globe de Paris University of Sorbonne Paris Cité © 2015 Mark Wieczorek
          ",0 " public function calculateQueryCacheHash() { self::$lastQueryCacheHash = parent::calculateQueryCacheHash(); return self::$lastQueryCacheHash; } } $_app = 'pc_frontend'; $_env = 'test'; $configuration = ProjectConfiguration::getApplicationConfiguration($_app, $_env, true); new sfDatabaseManager($configuration); Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_QUERY_CLASS, 'myQuery'); $t = new lime_test(null, new lime_output_color()); // -- $keys = array(); Doctrine::getTable('AdminUser')->find(1); $keys['find'] = myQuery::$lastQueryCacheHash; Doctrine::getTable('AdminUser')->findAll(); $keys['find_all'] = myQuery::$lastQueryCacheHash; Doctrine::getTable('AdminUser')->findById(1); $keys['find_by_id'] = myQuery::$lastQueryCacheHash; Doctrine::getTable('AdminUser')->findOneById(1); $keys['find_one_by_id'] = myQuery::$lastQueryCacheHash; Doctrine::getTable('AdminUser')->findByIdAndUsername(1, 'admin'); $keys['find_by_id_and_username'] = myQuery::$lastQueryCacheHash; Doctrine::getTable('AdminUser')->findOneByIdAndUsername(1, 'admin'); $keys['find_one_by_id_and_username'] = myQuery::$lastQueryCacheHash; Doctrine::getTable('AdminUser')->findByUsernameAndPassword('admin', 'password'); $keys['find_by_username_and_password'] = myQuery::$lastQueryCacheHash; Doctrine::getTable('AdminUser')->findOneByUsernameAndPassword('admin', 'password'); $keys['find_one_by_username_and_password'] = myQuery::$lastQueryCacheHash; $t->isnt($keys['find'], $keys['find_all'], '->find() and ->findAll() generates different query cache keys'); $t->isnt($keys['find'], $keys['find_by_id'], '->find() and ->findById() generates different query cache keys'); $t->is($keys['find'], $keys['find_one_by_id'], '->find() and ->findOneById() generates same query cache keys'); $t->isnt($keys['find'], $keys['find_by_id_and_username'], '->find() and ->findByIdAndUsername() generates different query cache keys'); $t->isnt($keys['find'], $keys['find_one_by_id_and_username'], '->find() and ->findOneByIdAndUsername() generates different query cache keys'); $t->isnt($keys['find'], $keys['find_by_username_and_password'], '->find() and ->findByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find'], $keys['find_one_by_username_and_password'], '->find() and ->findOneByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_all'], $keys['find_by_id'], '->findAll() and ->findById() generates different query cache keys'); $t->isnt($keys['find_all'], $keys['find_one_by_id'], '->findAll() and ->findOneById() generates different query cache keys'); $t->isnt($keys['find_all'], $keys['find_by_id_and_username'], '->findAll() and ->findByIdAndUsername() generates different query cache keys'); $t->isnt($keys['find_all'], $keys['find_one_by_id_and_username'], '->findAll() and ->findOneByIdAndUsername() generates different query cache keys'); $t->isnt($keys['find_all'], $keys['find_by_username_and_password'], '->findAll() and ->findByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_all'], $keys['find_one_by_username_and_password'], '->findAll() and ->findOneByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_by_id'], $keys['find_one_by_id'], '->findById() and ->findOneById() generates different query cache keys'); $t->isnt($keys['find_by_id'], $keys['find_by_id_and_username'], '->findById() and ->findByIdAndUsername() generates different query cache keys'); $t->isnt($keys['find_by_id'], $keys['find_one_by_id_and_username'], '->findById() and ->findOneById() generates different query cache keys'); $t->isnt($keys['find_by_id'], $keys['find_by_username_and_password'], '->findById() and ->findByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_by_id'], $keys['find_one_by_username_and_password'], '->findById() and ->findOneByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_one_by_id'], $keys['find_by_id_and_username'], '->findOneById() and ->findByIdAndUsername() generates different query cache keys'); $t->isnt($keys['find_one_by_id'], $keys['find_one_by_id_and_username'], '->findOneById() and ->findOneByIdAndUsername() generates different query cache keys'); $t->isnt($keys['find_one_by_id'], $keys['find_by_username_and_password'], '->findOneById() and ->findByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_one_by_id'], $keys['find_one_by_username_and_password'], '->findOneById() and ->findOneByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_by_id_and_username'], $keys['find_one_by_id_and_username'], '->findByIdAndUsername() and ->findOneByIdAndUsername() generates different query cache keys'); $t->isnt($keys['find_by_id_and_username'], $keys['find_by_username_and_password'], '->findByIdAndUsername() and ->findByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_by_id_and_username'], $keys['find_one_by_username_and_password'], '->findByIdAndUsername() and ->findOneByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_one_by_id_and_username'], $keys['find_by_username_and_password'], '->findOneByIdAndUsername() and ->findByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_one_by_id_and_username'], $keys['find_one_by_username_and_password'], '->findOneByIdAndUsername() and ->findOneByUsernameAndPassword() generates different query cache keys'); $t->isnt($keys['find_by_username_and_password'], $keys['find_one_by_username_and_password'], '->findByUsernameAndPassword() and ->findOneByUsernameAndPassword() generates different query cache keys'); ",0 "t under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License. CIDE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with CIDE. If not, see . See http://www.fosd.de/cide/ for further information. */ package de.ovgu.cide.export.virtual.internal; import java.util.Set; import org.eclipse.jdt.core.dom.CompilationUnit; import de.ovgu.cide.export.CopiedNaiveASTFlattener; import de.ovgu.cide.export.useroptions.IUserOptionProvider; import de.ovgu.cide.features.IFeature; import de.ovgu.cide.features.source.ColoredSourceFile; /** * how to print annotations? note: we assume ifdef semantics, i.e. annotations * may be nested, but always close in the reverse order * * * @author ckaestne * */ public interface IPPExportOptions extends IUserOptionProvider { /** * should the start and end instructions be printed in a new line? (i.e. * should a line break be enforced before?) * * the instruction is responsible for the linebreak at the end itself * * @return */ boolean inNewLine(); /** * get the code statement(s) to begin an annotation block * * @param f * set of features annotated for the current element * @return */ String getStartInstruction(Set f); /** * get the code statement(s) to end an annotation block * * @param f * set of features annotated for the current element * @return */ String getEndInstruction(Set f); CopiedNaiveASTFlattener getPrettyPrinter(ColoredSourceFile sourceFile); /** * allows the developer to change the AST before printing it. can be used * for some refactorings. returns the modified AST * * @param root * @param sourceFile * @return */ CompilationUnit refactorAST(CompilationUnit root, ColoredSourceFile sourceFile); } ",0 "enerated by javadoc (1.8.0_25) on Sat Jan 02 14:50:50 CET 2016 --> ra.woGibtEsWas Class Hierarchy

          Hierarchy For Package ra.woGibtEsWas

          Package Hierarchies:

          Class Hierarchy

          • java.lang.Object
          ",0 ".org/1999/xhtml"" xml:lang=""en"" lang=""en""> Module: Approvability::ActsAsApprovability — Documentation by YARD 0.8.7.6

          Module: Approvability::ActsAsApprovability

          Defined in:
          lib/approvability/acts_as_approvability.rb

          Defined Under Namespace

          Modules: Base

          Generated on Thu Mar 12 18:39:24 2015 by yard 0.8.7.6 (ruby-2.0.0).
          ",0 " (1<<5) /* Bit 5 for Power key */ #define PMU_HI6551_USB_STATE_MASK (1<<5) #define PMU_HI6551_HRESET_STATE_MASK (1<<1) #define HI6551_OTMP_125_OFFSET 0 #define HI6551_OTMP_150_OFFSET 7 #define HI6551_VSYS_UNDER_2P5_OFFSET 2 #define HI6551_VSYS_UNDER_2P7_OFFSET 3 #define HI6551_VSYS_OVER_6P0_OFFSET 4 #define HI6551_POWER_KEY_4S_PRESS_OFFSET 5 #define HI6551_POWER_KEY_20MS_RELEASE_OFFSET 6 #define HI6551_POWER_KEY_20MS_PRESS_OFFSET 7 /*º¯ÊýÉùÃ÷*/ /***************************************************************************** º¯ Êý Ãû : pmu_hi6551_init ¹¦ÄÜÃèÊö : pmu hi6551Ä£¿é³õʼ»¯ ÊäÈë²ÎÊý : ÎÞ Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : ÎÞ µ÷Óú¯Êý : fastbootÖÐpmuÄ£¿éÊÊÅä²ã ±»µ÷º¯Êý : *****************************************************************************/ void pmu_hi6551_init(void); /***************************************************************************** º¯ Êý Ãû : hi6551_power_key_state_get ¹¦ÄÜÃèÊö : »ñÈ¡power¼üÊÇ·ñ°´Ï ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : power¼üÊÇ·ñ°´Ï£º1:°´Ï£»0:δ°´ÏÂ) µ÷Óú¯Êý : fastbootÖÐpmuÄ£¿éÊÊÅä²ã ±»µ÷º¯Êý : *****************************************************************************/ bool hi6551_power_key_state_get(void); /***************************************************************************** º¯ Êý Ãû : bsp_hi6551_usb_state_get ¹¦ÄÜÃèÊö : »ñÈ¡usbÊÇ·ñ²å°Î״̬ ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : usb²åÈë»ò°Î³ö(1:²åÈ룻0:°Î³ö) µ÷Óú¯Êý : fastbootÖÐpmuÄ£¿éÊÊÅä²ã ±»µ÷º¯Êý : *****************************************************************************/ bool hi6551_usb_state_get(void); /***************************************************************************** º¯ Êý Ãû : hi6551_hreset_state_get ¹¦ÄÜÃèÊö : ÅжÏpmuÊÇ·ñΪÈÈÆô¶¯ ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : pmuÊÇÈÈÆô¶¯»òÀäÆô¶¯(1:ÈÈÆô¶¯£»0:ÀäÆô¶¯) µ÷Óú¯Êý : fastbootÖÐpmuÄ£¿éÊÊÅä²ã ±»µ÷º¯Êý : *****************************************************************************/ bool hi6551_hreset_state_get(void); /***************************************************************************** º¯ Êý Ãû : hi6551_hreset_state_clear ¹¦ÄÜÃèÊö : Çå³ýpmuÊÇ·ñΪÈÈÆô¶¯±êÖ¾ ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : ÎÞ µ÷Óú¯Êý : fastbootÖÐpmuÄ£¿éÊÊÅä²ã ±»µ÷º¯Êý : *****************************************************************************/ void hi6551_hreset_state_clear(void); /***************************************************************************** º¯ Êý Ãû : hi6551_lvs4_switch ¹¦ÄÜÃèÊö : ¿ª¹Ølvs04µçÔ´ ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : µ÷Óú¯Êý : ±»µ÷º¯Êý : lcdÄ£¿éµ÷Óà *****************************************************************************/ int hi6551_lvs4_switch(power_switch_e sw); /***************************************************************************** º¯ Êý Ãû : hi6551_ldo14_switch ¹¦ÄÜÃèÊö : ¿ª¹Øldo14µçÔ´ ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : µ÷Óú¯Êý : ±»µ÷º¯Êý : lcdÄ£¿éµ÷Óà *****************************************************************************/ int hi6551_ldo14_switch(power_switch_e sw); /***************************************************************************** º¯ Êý Ãû : hi6551_ldo14_volt_set ¹¦ÄÜÃèÊö : ÉèÖÃldo14µçÔ´µçѹ ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : µ÷Óú¯Êý : ±»µ÷º¯Êý : lcdÄ£¿éµ÷Óà *****************************************************************************/ int hi6551_ldo14_volt_set(int voltage); /***************************************************************************** º¯ Êý Ãû : hi6551_ldo23_switch ¹¦ÄÜÃèÊö : ¿ª¹Øldo23µçÔ´ ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : µ÷Óú¯Êý : ±»µ÷º¯Êý : efuseÄ£¿éµ÷Óà *****************************************************************************/ int hi6551_ldo23_switch(power_switch_e sw); /***************************************************************************** º¯ Êý Ãû : hi6551_ldo23_volt_set ¹¦ÄÜÃèÊö : ÉèÖÃldo23µçÔ´µçѹ ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : µ÷Óú¯Êý : ±»µ÷º¯Êý : efuseÄ£¿éµ÷Óà *****************************************************************************/ int hi6551_ldo23_volt_set(int voltage); /***************************************************************************** º¯ Êý Ãû : hi6551_version_get ¹¦ÄÜÃèÊö : »ñÈ¡pmuµÄ°æ±¾ºÅ ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : pmu°æ±¾ºÅ µ÷Óú¯Êý : ±»µ÷º¯Êý : HSO¼¯³É,MSPµ÷Óà *****************************************************************************/ u8 hi6551_version_get(void); int hi6551_get_boot_state(void); /***************************************************************************** º¯ Êý Ãû : hi6551_set_by_nv ¹¦ÄÜÃèÊö : ¸ù¾ÝnvÏîÉèÖýøÐÐĬÈÏÉèÖà ÊäÈë²ÎÊý : void Êä³ö²ÎÊý : ÎÞ ·µ »Ø Öµ : pmuĬÈÏÉèÖÃ(Ö÷ÒªÖ¸Óë²úÆ·ÐÎ̬Ïà¹ØµÄ) µ÷Óú¯Êý : ±»µ÷º¯Êý : *****************************************************************************/ void hi6551_set_by_nv(void); #endif",0 "on/Foundation.h> #import ""DDLog.h"" #if DEBUG static const int ddLogLevel = LOG_LEVEL_VERBOSE; #else // TODO: change this when we can deploy safely // static const int ddLogLevel = LOG_LEVEL_ERROR; static const int ddLogLevel = LOG_LEVEL_INFO; #endif #define MFLogError(fmt,...) {\ [Megalog logErrorWithFormat:fmt,##__VA_ARGS__];\ }\ #define MFLogWarning(fmt,...){\ [Megalog logWarningWithFormat:fmt,##__VA_ARGS__];\ }\ #define MFLogInfo(fmt, ...) {\ [Megalog logInfoWithFormat:fmt,##__VA_ARGS__];\ }\ #define MFLogVerbose(fmt,...) {\ [Megalog logVerboseWithFormat:fmt,##__VA_ARGS__];\ }\ @interface Megalog : NSObject +(void)logErrorWithFormat:(NSString *)format, ...; +(void)logWarningWithFormat:(NSString *)format, ...; +(void)logInfoWithFormat:(NSString *)format, ...; +(void)logVerboseWithFormat:(NSString *)format, ...; +(NSString *)currentLogFilePath; @end ",0 "Inc. * Copyright (C) 2014 AHMCT, University of California * Copyright (C) 2015 SRF Consulting Group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ package us.mn.state.dot.tms; import java.util.HashMap; import static us.mn.state.dot.tms.SignMessageHelper.DMS_MESSAGE_MAX_PAGES; import us.mn.state.dot.tms.utils.I18N; /** * This enum defines all system attributes. * * @author Douglas Lau * @author Michael Darter * @author Travis Swanston */ public enum SystemAttrEnum { CAMERA_AUTH_USERNAME(""""), CAMERA_AUTH_PASSWORD(""""), CAMERA_AUTOPLAY(true, Change.RESTART_CLIENT), CAMERA_ID_BLANK(""""), CAMERA_NUM_PRESET_BTNS(3, 0, 20, Change.RESTART_CLIENT), CAMERA_PRESET_PANEL_COLUMNS(6, 1, 6, Change.RESTART_CLIENT), CAMERA_PRESET_PANEL_ENABLE(false, Change.RESTART_CLIENT), CAMERA_PRESET_STORE_ENABLE(false, Change.RESTART_CLIENT), CAMERA_PTZ_AXIS_COMPORT(1, 1, 64), CAMERA_PTZ_AXIS_RESET(""""), CAMERA_PTZ_AXIS_WIPE(""""), CAMERA_PTZ_BLIND(true), CAMERA_PTZ_PANEL_ENABLE(false, Change.RESTART_CLIENT), CAMERA_STREAM_CONTROLS_ENABLE(false, Change.RESTART_CLIENT), CAMERA_UTIL_PANEL_ENABLE(false, Change.RESTART_CLIENT), CAMERA_WIPER_PRECIP_MM_HR(8, 1, 100), CLIENT_UNITS_SI(true), COMM_EVENT_PURGE_DAYS(14, 0, 1000), DATABASE_VERSION(String.class, Change.RESTART_SERVER), DETECTOR_AUTO_FAIL_ENABLE(true), DIALUP_POLL_PERIOD_MINS(60, 2, 1440), DMS_AWS_ENABLE(false), DMS_BRIGHTNESS_ENABLE(true, Change.RESTART_CLIENT), DMS_COMM_LOSS_MINUTES(5, 0, 60), DMS_COMPOSER_EDIT_MODE(1, 0, 2, Change.RESTART_CLIENT), DMS_DEFAULT_JUSTIFICATION_LINE(3, 2, 5, Change.RESTART_CLIENT), DMS_DEFAULT_JUSTIFICATION_PAGE(2, 2, 4, Change.RESTART_CLIENT), DMS_DURATION_ENABLE(true), DMS_FONT_SELECTION_ENABLE(false, Change.RESTART_CLIENT), DMS_FORM(1, 1, 2), DMS_HIGH_TEMP_CUTOFF(60, 35, 100), DMS_LAMP_TEST_TIMEOUT_SECS(30, 5, 90), DMS_MANUFACTURER_ENABLE(true, Change.RESTART_CLIENT), DMS_MAX_LINES(3, 1, 12, Change.RESTART_CLIENT), DMS_MESSAGE_MIN_PAGES(1, 1, DMS_MESSAGE_MAX_PAGES, Change.RESTART_CLIENT), DMS_OP_STATUS_ENABLE(false, Change.RESTART_CLIENT), DMS_PAGE_OFF_DEFAULT_SECS(0f, 0f, 60f), DMS_PAGE_ON_DEFAULT_SECS(2f, 0f, 60f), DMS_PAGE_ON_MAX_SECS(10.0f, 0f, 100f, Change.RESTART_CLIENT), DMS_PAGE_ON_MIN_SECS(0.5f, 0f, 100f, Change.RESTART_CLIENT), DMS_PAGE_ON_SELECTION_ENABLE(false), DMS_PIXEL_OFF_LIMIT(2, 1), DMS_PIXEL_ON_LIMIT(1, 1), DMS_PIXEL_MAINT_THRESHOLD(35, 1), DMS_PIXEL_STATUS_ENABLE(true, Change.RESTART_CLIENT), DMS_PIXEL_TEST_TIMEOUT_SECS(30, 5, 90), DMS_QUERYMSG_ENABLE(false, Change.RESTART_CLIENT), DMS_QUICKMSG_STORE_ENABLE(false, Change.RESTART_CLIENT), DMS_RESET_ENABLE(false, Change.RESTART_CLIENT), DMS_SEND_CONFIRMATION_ENABLE(false, Change.RESTART_CLIENT), DMS_UPDATE_FONT_TABLE(false), DMSXML_MODEM_OP_TIMEOUT_SECS(5 * 60 + 5, 5), DMSXML_OP_TIMEOUT_SECS(60 + 5, 5), DMSXML_REINIT_DETECT(false), EMAIL_SENDER_SERVER(String.class), EMAIL_SMTP_HOST(String.class), EMAIL_RECIPIENT_AWS(String.class), EMAIL_RECIPIENT_DMSXML_REINIT(String.class), EMAIL_RECIPIENT_GATE_ARM(String.class), GATE_ARM_ALERT_TIMEOUT_SECS(90, 10), GPS_NTCIP_ENABLE(false), GPS_NTCIP_JITTER_M(100, 0, 1610), HELP_TROUBLE_TICKET_ENABLE(false), HELP_TROUBLE_TICKET_URL(String.class), INCIDENT_CLEAR_SECS(600, 0, 3600), LCS_POLL_PERIOD_SECS(30, 0, Change.RESTART_SERVER), MAP_EXTENT_NAME_INITIAL(""Home""), MAP_ICON_SIZE_SCALE_MAX(30f, 0f, 9000f), MAP_SEGMENT_MAX_METERS(2000, 100, Change.RESTART_CLIENT), METER_EVENT_PURGE_DAYS(14, 0, 1000), METER_GREEN_SECS(1.3f, 0.1f, 10f), METER_MAX_RED_SECS(13f, 5f, 30f), METER_MIN_RED_SECS(0.1f, 0.1f, 10f), METER_YELLOW_SECS(0.7f, 0.1f, 10f), MSG_FEED_VERIFY(true), OPERATION_RETRY_THRESHOLD(3, 1, 20), ROUTE_MAX_LEGS(8, 1, 20), ROUTE_MAX_MILES(16, 1, 30), RWIS_HIGH_WIND_SPEED_KPH(40, 0), RWIS_LOW_VISIBILITY_DISTANCE_M(152, 0), RWIS_OBS_AGE_LIMIT_SECS(240, 0), RWIS_MAX_VALID_WIND_SPEED_KPH(282, 0), SAMPLE_ARCHIVE_ENABLE(true), SPEED_LIMIT_MIN_MPH(45, 0, 100), SPEED_LIMIT_DEFAULT_MPH(55, 0, 100), SPEED_LIMIT_MAX_MPH(75, 0, 100), TESLA_HOST(String.class), TRAVEL_TIME_MIN_MPH(15, 1, 50), UPTIME_LOG_ENABLE(false), VSA_BOTTLENECK_ID_MPH(55, 10, 65), VSA_CONTROL_THRESHOLD(-1000, -5000, -200), VSA_DOWNSTREAM_MILES(0.2f, 0f, 2.0f), VSA_MAX_DISPLAY_MPH(60, 10, 60), VSA_MIN_DISPLAY_MPH(30, 10, 55), VSA_MIN_STATION_MILES(0.1f, 0.01f, 1.0f), VSA_START_INTERVALS(3, 0, 10), VSA_START_THRESHOLD(-1500, -5000, -200), VSA_STOP_THRESHOLD(-750, -5000, -200), WINDOW_TITLE(""IRIS: "", Change.RESTART_CLIENT); /** Change action, which indicates what action the admin must * take after changing a system attribute. */ enum Change { RESTART_SERVER(""Restart the server after changing.""), RESTART_CLIENT(""Restart the client after changing.""), NONE(""A change takes effect immediately.""); /** Change message for user. */ private final String m_msg; /** Constructor */ private Change(String msg) { m_msg = msg; } /** Get the restart message. */ public String getMessage() { return m_msg; } } /** System attribute class */ protected final Class atype; /** Default value */ protected final Object def_value; /** Change action */ protected final Change change_action; /** Minimum value for number attributes */ protected final Number min_value; /** Maximum value for number attributes */ protected final Number max_value; /** Create a String attribute with the given default value */ private SystemAttrEnum(String d) { this(String.class, d, null, null, Change.NONE); } /** Create a String attribute with the given default value */ private SystemAttrEnum(String d, Change ca) { this(String.class, d, null, null, ca); } /** Create a Boolean attribute with the given default value */ private SystemAttrEnum(boolean d) { this(Boolean.class, d, null, null, Change.NONE); } /** Create a Boolean attribute with the given default value */ private SystemAttrEnum(boolean d, Change ca) { this(Boolean.class, d, null, null, ca); } /** Create an Integer attribute with default, min and max values */ private SystemAttrEnum(int d, int mn, int mx) { this(Integer.class, d, mn, mx, Change.NONE); } /** Create an Integer attribute with default, min and max values */ private SystemAttrEnum(int d, int mn, int mx, Change ca) { this(Integer.class, d, mn, mx, ca); } /** Create an Integer attribute with default and min values */ private SystemAttrEnum(int d, int mn) { this(Integer.class, d, mn, null, Change.NONE); } /** Create an Integer attribute with default and min values */ private SystemAttrEnum(int d, int mn, Change ca) { this(Integer.class, d, mn, null, ca); } /** Create a Float attribute with default, min and max values */ private SystemAttrEnum(float d, float mn, float mx) { this(Float.class, d, mn, mx, Change.NONE); } /** Create a Float attribute with default, min and max values */ private SystemAttrEnum(float d, float mn, float mx, Change ca) { this(Float.class, d, mn, mx, ca); } /** Create a system attribute with a null default value */ private SystemAttrEnum(Class c) { this(c, null, null, null, Change.NONE); } /** Create a system attribute with a null default value */ private SystemAttrEnum(Class c, Change ca) { this(c, null, null, null, ca); } /** Create a system attribute */ private SystemAttrEnum(Class c, Object d, Number mn, Number mx, Change ca) { atype = c; def_value = d; min_value = mn; max_value = mx; change_action = ca; assert isValidBoolean() || isValidFloat() || isValidInteger() || isValidString(); } /** Get a description of the system attribute enum. */ public static String getDesc(String aname) { String ret = I18N.get(aname); SystemAttrEnum sae = lookup(aname); if(sae != null) ret += "" "" + sae.change_action.getMessage(); return ret; } /** Return true if the value is the default value. */ public boolean equalsDefault() { return get().toString().equals(getDefault()); } /** Test if the attribute is a valid boolean */ private boolean isValidBoolean() { return (atype == Boolean.class) && (def_value instanceof Boolean) && min_value == null && max_value == null; } /** Test if the attribute is a valid float */ private boolean isValidFloat() { return (atype == Float.class) && (def_value instanceof Float) && (min_value == null || min_value instanceof Float) && (max_value == null || max_value instanceof Float); } /** Test if the attribute is a valid integer */ private boolean isValidInteger() { return (atype == Integer.class) && (def_value instanceof Integer) && (min_value == null || min_value instanceof Integer) && (max_value == null || max_value instanceof Integer); } /** Test if the attribute is a valid string */ private boolean isValidString() { return (atype == String.class) && (def_value == null || def_value instanceof String) && min_value == null && max_value == null; } /** Get the attribute name */ public String aname() { return toString().toLowerCase(); } /** Set of all system attributes */ static protected final HashMap ALL_ATTRIBUTES = new HashMap(); static { for(SystemAttrEnum sa: SystemAttrEnum.values()) ALL_ATTRIBUTES.put(sa.aname(), sa); } /** Lookup an attribute by name */ static public SystemAttrEnum lookup(String aname) { return ALL_ATTRIBUTES.get(aname); } /** * Get the value of the attribute as a string. * @return The value of the attribute as a string, never null. */ public String getString() { assert atype == String.class; return (String)get(); } /** Get the default value as a String. */ public String getDefault() { if(def_value != null) return def_value.toString(); else return """"; } /** Get the value of the attribute as a boolean */ public boolean getBoolean() { assert atype == Boolean.class; return (Boolean)get(); } /** Get the value of the attribute as an int */ public int getInt() { assert atype == Integer.class; return (Integer)get(); } /** Get the value of the attribute as a float */ public float getFloat() { assert atype == Float.class; return (Float)get(); } /** * Get the value of the attribute. * @return The value of the attribute, never null. */ protected Object get() { return getValue(SystemAttributeHelper.get(aname())); } /** * Get the value of a system attribute. * @param attr System attribute or null. * @return The attribute value or the default value on error. * Null is never returned. */ private Object getValue(SystemAttribute attr) { if(attr == null) { System.err.println(warningDefault()); return def_value; } return parseValue(attr.getValue()); } /** * Get the value of a system attribute. * @return The parsed value or the default value on error. * Null is never returned. */ public Object parseValue(String v) { Object value = parse(v); if(value == null) { System.err.println(warningParse()); return def_value; } return value; } /** * Parse an attribute value. * @param v Attribute value, may be null. * @return The parsed value or null on error. */ protected Object parse(String v) { if(atype == String.class) return v; if(atype == Boolean.class) return parseBoolean(v); if(atype == Integer.class) return parseInteger(v); if(atype == Float.class) return parseFloat(v); assert false; return null; } /** Parse a boolean attribute value */ protected Boolean parseBoolean(String v) { try { return Boolean.parseBoolean(v); } catch(NumberFormatException e) { return null; } } /** Parse an integer attribute value */ protected Integer parseInteger(String v) { int i; try { i = Integer.parseInt(v); } catch(NumberFormatException e) { return null; } if(min_value != null) { int m = min_value.intValue(); if(i < m) { System.err.println(warningMinimum()); return m; } } if(max_value != null) { int m = max_value.intValue(); if(i > m) { System.err.println(warningMaximum()); return m; } } return i; } /** Parse a float attribute value */ protected Float parseFloat(String v) { float f; try { f = Float.parseFloat(v); } catch(NumberFormatException e) { return null; } if(min_value != null) { float m = min_value.floatValue(); if(f < m) { System.err.println(warningMinimum()); return m; } } if(max_value != null) { float m = max_value.floatValue(); if(f > m) { System.err.println(warningMaximum()); return m; } } return f; } /** Create a 'missing system attribute' warning message */ protected String warningDefault() { return ""Warning: "" + toString() + "" system attribute was not "" + ""found; using a default value ("" + def_value + "").""; } /** Create a parsing warning message */ protected String warningParse() { return ""Warning: "" + toString() + "" system attribute could "" + ""not be parsed; using a default value ("" + def_value + "").""; } /** Create a minimum value warning message */ protected String warningMinimum() { return ""Warning: "" + toString() + "" system attribute was too "" + ""low; using a minimum value ("" + min_value + "").""; } /** Create a maximum value warning message */ protected String warningMaximum() { return ""Warning: "" + toString() + "" system attribute was too "" + ""high; using a maximum value ("" + max_value + "").""; } } ",0 "ftware: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Written by Eric Blake. */ #include #include ""verror.h"" #include ""xvasprintf.h"" #include #include #include #if ENABLE_NLS # include ""gettext.h"" # define _(msgid) gettext (msgid) #endif #ifndef _ # define _(String) String #endif /* Print a message with 'vfprintf (stderr, FORMAT, ARGS)'; if ERRNUM is nonzero, follow it with "": "" and strerror (ERRNUM). If STATUS is nonzero, terminate the program with 'exit (STATUS)'. Use the globals error_print_progname and error_message_count similarly to error(). */ void verror (int status, int errnum, const char *format, va_list args) { verror_at_line (status, errnum, NULL, 0, format, args); } /* Print a message with 'vfprintf (stderr, FORMAT, ARGS)'; if ERRNUM is nonzero, follow it with "": "" and strerror (ERRNUM). If STATUS is nonzero, terminate the program with 'exit (STATUS)'. If FNAME is not NULL, prepend the message with ""FNAME:LINENO:"". Use the globals error_print_progname, error_message_count, and error_one_per_line similarly to error_at_line(). */ void verror_at_line (int status, int errnum, const char *file, unsigned int line_number, const char *format, va_list args) { char *message = xvasprintf (format, args); if (message) { /* Until https://sourceware.org/bugzilla/show_bug.cgi?id=2997 is fixed, glibc violates GNU Coding Standards when the file argument to error_at_line is NULL. */ if (file) error_at_line (status, errnum, file, line_number, ""%s"", message); else error (status, errnum, ""%s"", message); } else { /* EOVERFLOW, EINVAL, and EILSEQ from xvasprintf are signs of serious programmer errors. */ error (0, errno, _(""unable to display error message"")); abort (); } free (message); } ",0 "orms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of any associated organizations nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/ #ifndef PHONONBACKEND_H #define PHONONBACKEND_H #include #include #include ""backend.h"" #include ""backendplugin.h"" struct Private; class Q_DECL_EXPORT PhononBackend : public Backend { public: PhononBackend(QObject *tail); virtual ~PhononBackend(); virtual bool initBackend(); virtual void shutdown(); virtual bool trackData(TrackData *data, const QUrl &url, int types = All) const; virtual bool isValid(const QUrl &url) const; virtual void play(); virtual void pause(); virtual void setProgress(int type, int progress); virtual int progress(int type); virtual void stop(); virtual bool loadUrl(const QUrl &url); virtual int status() const; virtual int volume() const; virtual void setVolume(int vol); virtual QString errorMessage() const; virtual int errorCode() const; virtual void setMute(bool on); virtual bool isMute() const; virtual int flags() const; private: Private *d; }; class Q_DECL_EXPORT PhononBackendPlugin : public BackendPlugin { public: PhononBackendPlugin() : BackendPlugin(QStringList() << ""phonon"" << ""phononbackend"") {} virtual Backend *createBackend(QObject *parent) { return new PhononBackend(parent); } }; #endif ",0 "n.java.JavaPlugin; @Getter public final class LinkPortalPlugin extends JavaPlugin { private final LinkPortalListener listener = new LinkPortalListener(this); private final LinkPortals portals = new LinkPortals(this); private boolean debugMode; Set serverPortal = new HashSet<>(); @Override public void onEnable() { saveDefaultConfig(); loadConf(); getServer().getPluginManager().registerEvents(listener, this); getCommand(""linkportal"").setExecutor(new LinkPortalCommand(this)); getServer().getScheduler().runTaskTimer(this, listener::tick, 1L, 1L); } void loadConf() { reloadConfig(); this.debugMode = getConfig().getBoolean(""debug""); if (this.debugMode) { getLogger().info(""Debug mode enabled in config.yml!""); } } } ",0 "e 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. */ package org.gradle.initialization; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.gradle.api.internal.project.ProjectIdentifier; import org.gradle.api.internal.project.ProjectRegistry; import org.gradle.api.InvalidUserDataException; import java.io.File; import java.io.Serializable; public class ProjectDirectoryProjectSpec extends AbstractProjectSpec implements Serializable { private final File dir; public ProjectDirectoryProjectSpec(File dir) { this.dir = dir; } public String getDisplayName() { return String.format(""with project directory '%s'"", dir); } public boolean isCorresponding(File file) { return dir.equals(file); } protected String formatNoMatchesMessage() { return String.format(""No projects in this build have project directory '%s'."", dir); } protected String formatMultipleMatchesMessage(Iterable matches) { return String.format(""Multiple projects in this build have project directory '%s': %s"", dir, matches); } protected boolean select(ProjectIdentifier project) { return project.getProjectDir().equals(dir); } @Override protected void checkPreconditions(ProjectRegistry registry) { if (!dir.exists()) { throw new InvalidUserDataException(String.format(""Project directory '%s' does not exist."", dir)); } if (!dir.isDirectory()) { throw new InvalidUserDataException(String.format(""Project directory '%s' is not a directory."", dir)); } } public boolean equals(Object obj) { return EqualsBuilder.reflectionEquals(this, obj); } public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } } ",0 "* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #define G_LOG_DOMAIN ""modelines"" #include #include #include #include #include ""modeline-parser.h"" #define MODELINES_LANGUAGE_MAPPINGS_FILE ""/org/gnome/builder/modelines/language-mappings"" #define gedit_debug_message(ignored,fmt,...) g_debug(fmt,__VA_ARGS__) /* Mappings: language name -> Gedit language ID */ static GHashTable *vim_languages = NULL; static GHashTable *emacs_languages = NULL; static GHashTable *kate_languages = NULL; typedef enum { MODELINE_SET_NONE = 0, MODELINE_SET_TAB_WIDTH = 1 << 0, MODELINE_SET_INDENT_WIDTH = 1 << 1, MODELINE_SET_WRAP_MODE = 1 << 2, MODELINE_SET_SHOW_RIGHT_MARGIN = 1 << 3, MODELINE_SET_RIGHT_MARGIN_POSITION = 1 << 4, MODELINE_SET_LANGUAGE = 1 << 5, MODELINE_SET_INSERT_SPACES = 1 << 6 } ModelineSet; typedef struct _ModelineOptions { gchar *language_id; /* these options are similar to the GtkSourceView properties of the * same names. */ gboolean insert_spaces; guint tab_width; guint indent_width; GtkWrapMode wrap_mode; gboolean display_right_margin; guint right_margin_position; ModelineSet set; } ModelineOptions; #define MODELINE_OPTIONS_DATA_KEY ""ModelineOptionsDataKey"" static gboolean has_option (ModelineOptions *options, ModelineSet set) { return options->set & set; } void modeline_parser_init (void) { } void modeline_parser_shutdown () { if (vim_languages != NULL) g_hash_table_unref (vim_languages); if (emacs_languages != NULL) g_hash_table_unref (emacs_languages); if (kate_languages != NULL) g_hash_table_unref (kate_languages); vim_languages = NULL; emacs_languages = NULL; kate_languages = NULL; } static GHashTable * load_language_mappings_group (GKeyFile *key_file, const gchar *group) { GHashTable *table; gchar **keys; gsize length = 0; int i; table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); keys = g_key_file_get_keys (key_file, group, &length, NULL); gedit_debug_message (DEBUG_PLUGINS, ""%"" G_GSIZE_FORMAT "" mappings in group %s"", length, group); for (i = 0; i < length; i++) { /* steal the name string */ gchar *name = keys[i]; gchar *id = g_key_file_get_string (key_file, group, name, NULL); g_hash_table_insert (table, name, id); } g_free (keys); return table; } /* lazy loading of language mappings */ static void load_language_mappings (void) { g_autoptr(GBytes) bytes = NULL; GKeyFile *mappings; const gchar *data; gsize len = 0; GError *error = NULL; bytes = g_resources_lookup_data (MODELINES_LANGUAGE_MAPPINGS_FILE, 0, NULL); g_assert (bytes != NULL); data = g_bytes_get_data (bytes, &len); g_assert (data); g_assert (len > 0); mappings = g_key_file_new (); if (g_key_file_load_from_data (mappings, data, len, 0, &error)) { gedit_debug_message (DEBUG_PLUGINS, ""Loaded language mappings from %s"", MODELINES_LANGUAGE_MAPPINGS_FILE); vim_languages = load_language_mappings_group (mappings, ""vim""); emacs_languages = load_language_mappings_group (mappings, ""emacs""); kate_languages = load_language_mappings_group (mappings, ""kate""); } else { gedit_debug_message (DEBUG_PLUGINS, ""Failed to loaded language mappings from %s: %s"", MODELINES_LANGUAGE_MAPPINGS_FILE, error->message); g_error_free (error); } g_key_file_free (mappings); } static gchar * get_language_id (const gchar *language_name, GHashTable *mapping) { gchar *name; gchar *language_id = NULL; name = g_ascii_strdown (language_name, -1); if (mapping != NULL) { language_id = g_hash_table_lookup (mapping, name); if (language_id != NULL) { g_free (name); return g_strdup (language_id); } } /* by default assume that the gtksourcevuew id is the same */ return name; } static gchar * get_language_id_vim (const gchar *language_name) { if (vim_languages == NULL) load_language_mappings (); return get_language_id (language_name, vim_languages); } static gchar * get_language_id_emacs (const gchar *language_name) { if (emacs_languages == NULL) load_language_mappings (); return get_language_id (language_name, emacs_languages); } static gchar * get_language_id_kate (const gchar *language_name) { if (kate_languages == NULL) load_language_mappings (); return get_language_id (language_name, kate_languages); } static gboolean skip_whitespaces (gchar **s) { while (**s != '\0' && g_ascii_isspace (**s)) (*s)++; return **s != '\0'; } /* Parse vi(m) modelines. * Vi(m) modelines looks like this: * - first form: [text]{white}{vi:|vim:|ex:}[white]{options} * - second form: [text]{white}{vi:|vim:|ex:}[white]se[t] {options}:[text] * They can happen on the three first or last lines. */ static gchar * parse_vim_modeline (gchar *s, ModelineOptions *options) { gboolean in_set = FALSE; gboolean neg; guint intval; GString *key, *value; key = g_string_sized_new (8); value = g_string_sized_new (8); while (*s != '\0' && !(in_set && *s == ':')) { while (*s != '\0' && (*s == ':' || g_ascii_isspace (*s))) s++; if (*s == '\0') break; if (strncmp (s, ""set "", 4) == 0 || strncmp (s, ""se "", 3) == 0) { s = strchr(s, ' ') + 1; in_set = TRUE; } neg = FALSE; if (strncmp (s, ""no"", 2) == 0) { neg = TRUE; s += 2; } g_string_assign (key, """"); g_string_assign (value, """"); while (*s != '\0' && *s != ':' && *s != '=' && !g_ascii_isspace (*s)) { g_string_append_c (key, *s); s++; } if (*s == '=') { s++; while (*s != '\0' && *s != ':' && !g_ascii_isspace (*s)) { g_string_append_c (value, *s); s++; } } if (strcmp (key->str, ""ft"") == 0 || strcmp (key->str, ""filetype"") == 0) { g_free (options->language_id); options->language_id = get_language_id_vim (value->str); options->set |= MODELINE_SET_LANGUAGE; } else if (strcmp (key->str, ""et"") == 0 || strcmp (key->str, ""expandtab"") == 0) { options->insert_spaces = !neg; options->set |= MODELINE_SET_INSERT_SPACES; } else if (strcmp (key->str, ""ts"") == 0 || strcmp (key->str, ""tabstop"") == 0) { intval = atoi (value->str); if (intval) { options->tab_width = intval; options->set |= MODELINE_SET_TAB_WIDTH; } } else if (strcmp (key->str, ""sw"") == 0 || strcmp (key->str, ""shiftwidth"") == 0) { intval = atoi (value->str); if (intval) { options->indent_width = intval; options->set |= MODELINE_SET_INDENT_WIDTH; } } else if (strcmp (key->str, ""wrap"") == 0) { options->wrap_mode = neg ? GTK_WRAP_NONE : GTK_WRAP_WORD; options->set |= MODELINE_SET_WRAP_MODE; } else if (strcmp (key->str, ""textwidth"") == 0 || strcmp (key->str, ""tw"") == 0) { intval = atoi (value->str); if (intval) { options->right_margin_position = intval; options->display_right_margin = TRUE; options->set |= MODELINE_SET_SHOW_RIGHT_MARGIN | MODELINE_SET_RIGHT_MARGIN_POSITION; } } } g_string_free (key, TRUE); g_string_free (value, TRUE); return s; } /* Parse emacs modelines. * Emacs modelines looks like this: ""-*- key1: value1; key2: value2 -*-"" * They can happen on the first line, or on the second one if the first line is * a shebang (#!) * See http://www.delorie.com/gnu/docs/emacs/emacs_486.html */ static gchar * parse_emacs_modeline (gchar *s, ModelineOptions *options) { guint intval; GString *key, *value; key = g_string_sized_new (8); value = g_string_sized_new (8); while (*s != '\0') { while (*s != '\0' && (*s == ';' || g_ascii_isspace (*s))) s++; if (*s == '\0' || strncmp (s, ""-*-"", 3) == 0) break; g_string_assign (key, """"); g_string_assign (value, """"); while (*s != '\0' && *s != ':' && *s != ';' && !g_ascii_isspace (*s)) { g_string_append_c (key, *s); s++; } if (!skip_whitespaces (&s)) break; if (*s != ':') continue; s++; if (!skip_whitespaces (&s)) break; while (*s != '\0' && *s != ';' && !g_ascii_isspace (*s)) { g_string_append_c (value, *s); s++; } gedit_debug_message (DEBUG_PLUGINS, ""Emacs modeline bit: %s = %s"", key->str, value->str); /* ""Mode"" key is case insenstive */ if (g_ascii_strcasecmp (key->str, ""Mode"") == 0) { g_free (options->language_id); options->language_id = get_language_id_emacs (value->str); options->set |= MODELINE_SET_LANGUAGE; } else if (strcmp (key->str, ""tab-width"") == 0) { intval = atoi (value->str); if (intval) { options->tab_width = intval; options->set |= MODELINE_SET_TAB_WIDTH; } } else if (strcmp (key->str, ""indent-offset"") == 0 || strcmp (key->str, ""c-basic-offset"") == 0 || strcmp (key->str, ""js-indent-level"") == 0) { intval = atoi (value->str); if (intval) { options->indent_width = intval; options->set |= MODELINE_SET_INDENT_WIDTH; } } else if (strcmp (key->str, ""indent-tabs-mode"") == 0) { intval = strcmp (value->str, ""nil"") == 0; options->insert_spaces = intval; options->set |= MODELINE_SET_INSERT_SPACES; } else if (strcmp (key->str, ""autowrap"") == 0) { intval = strcmp (value->str, ""nil"") != 0; options->wrap_mode = intval ? GTK_WRAP_WORD : GTK_WRAP_NONE; options->set |= MODELINE_SET_WRAP_MODE; } } g_string_free (key, TRUE); g_string_free (value, TRUE); return *s == '\0' ? s : s + 2; } /* * Parse kate modelines. * Kate modelines are of the form ""kate: key1 value1; key2 value2;"" * These can happen on the 10 first or 10 last lines of the buffer. * See http://wiki.kate-editor.org/index.php/Modelines */ static gchar * parse_kate_modeline (gchar *s, ModelineOptions *options) { guint intval; GString *key, *value; key = g_string_sized_new (8); value = g_string_sized_new (8); while (*s != '\0') { while (*s != '\0' && (*s == ';' || g_ascii_isspace (*s))) s++; if (*s == '\0') break; g_string_assign (key, """"); g_string_assign (value, """"); while (*s != '\0' && *s != ';' && !g_ascii_isspace (*s)) { g_string_append_c (key, *s); s++; } if (!skip_whitespaces (&s)) break; if (*s == ';') continue; while (*s != '\0' && *s != ';' && !g_ascii_isspace (*s)) { g_string_append_c (value, *s); s++; } gedit_debug_message (DEBUG_PLUGINS, ""Kate modeline bit: %s = %s"", key->str, value->str); if (strcmp (key->str, ""hl"") == 0 || strcmp (key->str, ""syntax"") == 0) { g_free (options->language_id); options->language_id = get_language_id_kate (value->str); options->set |= MODELINE_SET_LANGUAGE; } else if (strcmp (key->str, ""tab-width"") == 0) { intval = atoi (value->str); if (intval) { options->tab_width = intval; options->set |= MODELINE_SET_TAB_WIDTH; } } else if (strcmp (key->str, ""indent-width"") == 0) { intval = atoi (value->str); if (intval) options->indent_width = intval; } else if (strcmp (key->str, ""space-indent"") == 0) { intval = strcmp (value->str, ""on"") == 0 || strcmp (value->str, ""true"") == 0 || strcmp (value->str, ""1"") == 0; options->insert_spaces = intval; options->set |= MODELINE_SET_INSERT_SPACES; } else if (strcmp (key->str, ""word-wrap"") == 0) { intval = strcmp (value->str, ""on"") == 0 || strcmp (value->str, ""true"") == 0 || strcmp (value->str, ""1"") == 0; options->wrap_mode = intval ? GTK_WRAP_WORD : GTK_WRAP_NONE; options->set |= MODELINE_SET_WRAP_MODE; } else if (strcmp (key->str, ""word-wrap-column"") == 0) { intval = atoi (value->str); if (intval) { options->right_margin_position = intval; options->display_right_margin = TRUE; options->set |= MODELINE_SET_RIGHT_MARGIN_POSITION | MODELINE_SET_SHOW_RIGHT_MARGIN; } } } g_string_free (key, TRUE); g_string_free (value, TRUE); return s; } /* Scan a line for vi(m)/emacs/kate modelines. * Line numbers are counted starting at one. */ static void parse_modeline (gchar *line, gint line_number, gint line_count, ModelineOptions *options) { gchar *s = line; /* look for the beginning of a modeline */ while (s != NULL && *s != '\0') { if (s > line && !g_ascii_isspace (*(s - 1))) { s++; continue; } if ((line_number <= 3 || line_number > line_count - 3) && (strncmp (s, ""ex:"", 3) == 0 || strncmp (s, ""vi:"", 3) == 0 || strncmp (s, ""vim:"", 4) == 0)) { gedit_debug_message (DEBUG_PLUGINS, ""Vim modeline on line %d"", line_number); while (*s != ':') s++; s = parse_vim_modeline (s + 1, options); } else if (line_number <= 2 && strncmp (s, ""-*-"", 3) == 0) { gedit_debug_message (DEBUG_PLUGINS, ""Emacs modeline on line %d"", line_number); s = parse_emacs_modeline (s + 3, options); } else if ((line_number <= 10 || line_number > line_count - 10) && strncmp (s, ""kate:"", 5) == 0) { gedit_debug_message (DEBUG_PLUGINS, ""Kate modeline on line %d"", line_number); s = parse_kate_modeline (s + 5, options); } else { s++; } } } static void free_modeline_options (ModelineOptions *options) { g_free (options->language_id); g_slice_free (ModelineOptions, options); } void modeline_parser_apply_modeline (GtkTextBuffer *buffer, IdeFileSettings *file_settings) { ModelineOptions options; GtkTextIter iter, liter; gint line_count; ModelineOptions *previous; options.language_id = NULL; options.set = MODELINE_SET_NONE; gtk_text_buffer_get_start_iter (buffer, &iter); line_count = gtk_text_buffer_get_line_count (buffer); /* Parse the modelines on the 10 first lines... */ while ((gtk_text_iter_get_line (&iter) < 10) && !gtk_text_iter_is_end (&iter)) { gchar *line; liter = iter; gtk_text_iter_forward_to_line_end (&iter); line = gtk_text_buffer_get_text (buffer, &liter, &iter, TRUE); parse_modeline (line, 1 + gtk_text_iter_get_line (&iter), line_count, &options); gtk_text_iter_forward_line (&iter); g_free (line); } /* ...and on the 10 last ones (modelines are not allowed in between) */ if (!gtk_text_iter_is_end (&iter)) { gint cur_line; guint remaining_lines; /* we are on the 11th line (count from 0) */ cur_line = gtk_text_iter_get_line (&iter); /* g_assert (10 == cur_line); */ remaining_lines = line_count - cur_line - 1; if (remaining_lines > 10) { gtk_text_buffer_get_end_iter (buffer, &iter); gtk_text_iter_backward_lines (&iter, 9); } } while (!gtk_text_iter_is_end (&iter)) { gchar *line; liter = iter; gtk_text_iter_forward_to_line_end (&iter); line = gtk_text_buffer_get_text (buffer, &liter, &iter, TRUE); parse_modeline (line, 1 + gtk_text_iter_get_line (&iter), line_count, &options); gtk_text_iter_forward_line (&iter); g_free (line); } /* Try to set language */ if (has_option (&options, MODELINE_SET_LANGUAGE) && options.language_id) { if (g_ascii_strcasecmp (options.language_id, ""text"") == 0) { gtk_source_buffer_set_language (GTK_SOURCE_BUFFER (buffer), NULL); } else { GtkSourceLanguageManager *manager; GtkSourceLanguage *language; manager = gtk_source_language_manager_get_default (); language = gtk_source_language_manager_get_language (manager, options.language_id); if (language != NULL) { gtk_source_buffer_set_language (GTK_SOURCE_BUFFER (buffer), language); } else { gedit_debug_message (DEBUG_PLUGINS, ""Unknown language `%s'"", options.language_id); } } } previous = g_object_get_data (G_OBJECT (buffer), MODELINE_OPTIONS_DATA_KEY); /* Apply the options we got from modelines and restore defaults if we set them before */ if (has_option (&options, MODELINE_SET_INSERT_SPACES)) { IdeIndentStyle style; style = options.insert_spaces ? IDE_INDENT_STYLE_SPACES : IDE_INDENT_STYLE_TABS; ide_file_settings_set_indent_style (file_settings, style); } else { ide_file_settings_set_indent_style_set (file_settings, FALSE); } if (has_option (&options, MODELINE_SET_TAB_WIDTH)) { ide_file_settings_set_tab_width (file_settings, options.tab_width); } else { ide_file_settings_set_tab_width_set (file_settings, FALSE); } if (has_option (&options, MODELINE_SET_INDENT_WIDTH)) { ide_file_settings_set_indent_width (file_settings, options.indent_width); } else { ide_file_settings_set_indent_width_set (file_settings, FALSE); } /* XXX: no wrap mode support in IdeFileSettings yet */ #if 0 if (has_option (&options, MODELINE_SET_WRAP_MODE)) { gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), options.wrap_mode); } else if (check_previous (view, previous, MODELINE_SET_WRAP_MODE)) { GtkWrapMode mode; mode = g_settings_get_enum (settings, GEDIT_SETTINGS_WRAP_MODE); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), mode); } #endif if (has_option (&options, MODELINE_SET_RIGHT_MARGIN_POSITION)) { ide_file_settings_set_right_margin_position (file_settings, options.right_margin_position); } else { ide_file_settings_set_right_margin_position_set (file_settings, FALSE); } if (has_option (&options, MODELINE_SET_SHOW_RIGHT_MARGIN)) { ide_file_settings_set_show_right_margin (file_settings, options.display_right_margin); } else { ide_file_settings_set_show_right_margin_set (file_settings, FALSE); } if (previous) { g_free (previous->language_id); *previous = options; previous->language_id = g_strdup (options.language_id); } else { previous = g_slice_new (ModelineOptions); *previous = options; previous->language_id = g_strdup (options.language_id); g_object_set_data_full (G_OBJECT (buffer), MODELINE_OPTIONS_DATA_KEY, previous, (GDestroyNotify)free_modeline_options); } g_free (options.language_id); } /* vi:ts=8 */ ",0 " Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /** * Arduino Mega with RAMPS v1.0, v1.1, v1.2 pin assignments */ #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) #error ""Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."" #endif // Uncomment the following line for RAMPS v1.0 //#define RAMPS_V_1_0 #define X_STEP_PIN 26 #define X_DIR_PIN 28 #define X_ENABLE_PIN 24 #define X_MIN_PIN 3 #define X_MAX_PIN 2 #define Y_STEP_PIN 38 #define Y_DIR_PIN 40 #define Y_ENABLE_PIN 36 #define Y_MIN_PIN 16 #define Y_MAX_PIN 17 #define Z_STEP_PIN 44 #define Z_DIR_PIN 46 #define Z_ENABLE_PIN 42 #define Z_MIN_PIN 18 #define Z_MAX_PIN 19 #define E0_STEP_PIN 32 #define E0_DIR_PIN 34 #define E0_ENABLE_PIN 30 #define SDPOWER 48 #define SDSS 53 #define LED_PIN 13 #if ENABLED(RAMPS_V_1_0) // RAMPS_V_1_0 #define HEATER_0_PIN 12 // RAMPS 1.0 #define HEATER_BED_PIN -1 // RAMPS 1.0 #define FAN_PIN 11 // RAMPS 1.0 #else // RAMPS_V_1_1 or RAMPS_V_1_2 #define HEATER_0_PIN 10 // RAMPS 1.1 #define HEATER_BED_PIN 8 // RAMPS 1.1 #define FAN_PIN 9 // RAMPS 1.1 #endif #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! // SPI for Max6675 or Max31855 Thermocouple #if DISABLED(SDSUPPORT) #define MAX6675_SS 66// Do not use pin 53 if there is even the remote possibility of using Display/SD card #else #define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif #if DISABLED(SDSUPPORT) // these pins are defined in the SD library if building with SD support #define SCK_PIN 52 #define MISO_PIN 50 #define MOSI_PIN 51 #endif ",0 "enerated by javadoc (version 1.6.0_27) on Thu Dec 26 19:42:35 EST 2013 --> com.jwetherell.augmented_reality.ui.objects

          com.jwetherell.augmented_reality.ui.objects

          ",0 " Default Congregation
          Save
          ",0 "oftware; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * @file c_tcp_irregular.h * @brief Handle the irregular chain of the TCP compression profile * @author FWX * @author Didier Barvaux * @author Didier Barvaux */ #ifndef ROHC_COMP_TCP_IRREGULAR_H #define ROHC_COMP_TCP_IRREGULAR_H #include ""rohc_comp_internals.h"" #include ""ip.h"" #include ""protocols/tcp.h"" #include ""c_tcp_defines.h"" #include #include int tcp_code_irreg_chain(const struct rohc_comp_ctxt *const context, const struct rohc_comp_ctxt *const ref_ctxt, const struct rohc_pkt_hdrs *const uncomp_pkt_hdrs, const struct tcp_tmp_variables *const tmp, uint8_t *const rohc_pkt, const size_t rohc_pkt_max_len) __attribute__((warn_unused_result, nonnull(1, 2, 3, 4, 5))); #endif /* ROHC_COMP_TCP_IRREGULAR_H */ ",0 "ton/Proton_EXPORTS.h> #include #include #include namespace Aws { namespace Proton { namespace Model { /** */ class AWS_PROTON_API DeleteEnvironmentTemplateVersionRequest : public ProtonRequest { public: DeleteEnvironmentTemplateVersionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return ""DeleteEnvironmentTemplateVersion""; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

          The environment template major version to delete.

          */ inline const Aws::String& GetMajorVersion() const{ return m_majorVersion; } /** *

          The environment template major version to delete.

          */ inline bool MajorVersionHasBeenSet() const { return m_majorVersionHasBeenSet; } /** *

          The environment template major version to delete.

          */ inline void SetMajorVersion(const Aws::String& value) { m_majorVersionHasBeenSet = true; m_majorVersion = value; } /** *

          The environment template major version to delete.

          */ inline void SetMajorVersion(Aws::String&& value) { m_majorVersionHasBeenSet = true; m_majorVersion = std::move(value); } /** *

          The environment template major version to delete.

          */ inline void SetMajorVersion(const char* value) { m_majorVersionHasBeenSet = true; m_majorVersion.assign(value); } /** *

          The environment template major version to delete.

          */ inline DeleteEnvironmentTemplateVersionRequest& WithMajorVersion(const Aws::String& value) { SetMajorVersion(value); return *this;} /** *

          The environment template major version to delete.

          */ inline DeleteEnvironmentTemplateVersionRequest& WithMajorVersion(Aws::String&& value) { SetMajorVersion(std::move(value)); return *this;} /** *

          The environment template major version to delete.

          */ inline DeleteEnvironmentTemplateVersionRequest& WithMajorVersion(const char* value) { SetMajorVersion(value); return *this;} /** *

          The environment template minor version to delete.

          */ inline const Aws::String& GetMinorVersion() const{ return m_minorVersion; } /** *

          The environment template minor version to delete.

          */ inline bool MinorVersionHasBeenSet() const { return m_minorVersionHasBeenSet; } /** *

          The environment template minor version to delete.

          */ inline void SetMinorVersion(const Aws::String& value) { m_minorVersionHasBeenSet = true; m_minorVersion = value; } /** *

          The environment template minor version to delete.

          */ inline void SetMinorVersion(Aws::String&& value) { m_minorVersionHasBeenSet = true; m_minorVersion = std::move(value); } /** *

          The environment template minor version to delete.

          */ inline void SetMinorVersion(const char* value) { m_minorVersionHasBeenSet = true; m_minorVersion.assign(value); } /** *

          The environment template minor version to delete.

          */ inline DeleteEnvironmentTemplateVersionRequest& WithMinorVersion(const Aws::String& value) { SetMinorVersion(value); return *this;} /** *

          The environment template minor version to delete.

          */ inline DeleteEnvironmentTemplateVersionRequest& WithMinorVersion(Aws::String&& value) { SetMinorVersion(std::move(value)); return *this;} /** *

          The environment template minor version to delete.

          */ inline DeleteEnvironmentTemplateVersionRequest& WithMinorVersion(const char* value) { SetMinorVersion(value); return *this;} /** *

          The name of the environment template.

          */ inline const Aws::String& GetTemplateName() const{ return m_templateName; } /** *

          The name of the environment template.

          */ inline bool TemplateNameHasBeenSet() const { return m_templateNameHasBeenSet; } /** *

          The name of the environment template.

          */ inline void SetTemplateName(const Aws::String& value) { m_templateNameHasBeenSet = true; m_templateName = value; } /** *

          The name of the environment template.

          */ inline void SetTemplateName(Aws::String&& value) { m_templateNameHasBeenSet = true; m_templateName = std::move(value); } /** *

          The name of the environment template.

          */ inline void SetTemplateName(const char* value) { m_templateNameHasBeenSet = true; m_templateName.assign(value); } /** *

          The name of the environment template.

          */ inline DeleteEnvironmentTemplateVersionRequest& WithTemplateName(const Aws::String& value) { SetTemplateName(value); return *this;} /** *

          The name of the environment template.

          */ inline DeleteEnvironmentTemplateVersionRequest& WithTemplateName(Aws::String&& value) { SetTemplateName(std::move(value)); return *this;} /** *

          The name of the environment template.

          */ inline DeleteEnvironmentTemplateVersionRequest& WithTemplateName(const char* value) { SetTemplateName(value); return *this;} private: Aws::String m_majorVersion; bool m_majorVersionHasBeenSet; Aws::String m_minorVersion; bool m_minorVersionHasBeenSet; Aws::String m_templateName; bool m_templateNameHasBeenSet; }; } // namespace Model } // namespace Proton } // namespace Aws ",0 " 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. */ package jp.sblo.pandora.jota.text; import android.os.Bundle; import android.text.Editable; import android.text.method.KeyListener; import android.util.Log; import android.view.inputmethod.BaseInputConnection; import android.view.inputmethod.CompletionInfo; import android.view.inputmethod.ExtractedText; import android.view.inputmethod.ExtractedTextRequest; public class EditableInputConnection extends BaseInputConnection { private static final boolean DEBUG = false; private static final String TAG = ""EditableInputConnection""; private final TextView mTextView; public EditableInputConnection(TextView textview) { super(textview, true); mTextView = textview; } public Editable getEditable() { TextView tv = mTextView; if (tv != null) { return tv.getEditableText(); } return null; } public boolean beginBatchEdit() { mTextView.beginBatchEdit(); return true; } public boolean endBatchEdit() { mTextView.endBatchEdit(); return true; } public boolean clearMetaKeyStates(int states) { final Editable content = getEditable(); if (content == null) return false; KeyListener kl = mTextView.getKeyListener(); if (kl != null) { try { kl.clearMetaKeyState(mTextView, content, states); } catch (AbstractMethodError e) { // This is an old listener that doesn't implement the // new method. } } return true; } public boolean commitCompletion(CompletionInfo text) { if (DEBUG) Log.v(TAG, ""commitCompletion "" + text); mTextView.beginBatchEdit(); mTextView.onCommitCompletion(text); mTextView.endBatchEdit(); return true; } public boolean performEditorAction(int actionCode) { if (DEBUG) Log.v(TAG, ""performEditorAction "" + actionCode); mTextView.onEditorAction(actionCode); return true; } public boolean performContextMenuAction(int id) { if (DEBUG) Log.v(TAG, ""performContextMenuAction "" + id); mTextView.beginBatchEdit(); mTextView.onTextContextMenuItem(id); mTextView.endBatchEdit(); return true; } public ExtractedText getExtractedText(ExtractedTextRequest request, int flags) { if (mTextView != null) { ExtractedText et = new ExtractedText(); if (mTextView.extractText(request, et)) { if ((flags&GET_EXTRACTED_TEXT_MONITOR) != 0) { mTextView.setExtracting(request); } return et; } } return null; } public boolean performPrivateCommand(String action, Bundle data) { mTextView.onPrivateIMECommand(action, data); return true; } @Override public boolean commitText(CharSequence text, int newCursorPosition) { if (mTextView == null) { return super.commitText(text, newCursorPosition); } CharSequence errorBefore = mTextView.getError(); boolean success = super.commitText(text, newCursorPosition); CharSequence errorAfter = mTextView.getError(); if (errorAfter != null && errorBefore == errorAfter) { mTextView.setError(null, null); } return success; } } ",0 " String debug = """"; } private static > void sortHeap(E[] array) { for (int i = array.length - 1; i >= 1; i--) { swap(array, 0, i); heapifyDown(array, 0, i); } } private static > void constructHeap(E[] array) { for (int i = array.length / 2; i >= 0; i--) { heapifyDown(array, i, array.length); } } private static > void heapifyDown(E[] array, int index, int limit) { while (index < array.length / 2) { int childIndex = (2 * index) + 1; if(childIndex >= limit){ break; } if (childIndex + 1 < limit && array[childIndex].compareTo(array[childIndex + 1]) < 0) { childIndex += 1; } int compare = array[index].compareTo(array[childIndex]); if (compare > 0) { break; } swap(array, index, childIndex); index = childIndex; } } private static > void swap(E[] array, int index, int childIndex) { E element = array[index]; array[index] = array[childIndex]; array[childIndex] = element; } } ",0 "ware: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * Free Software Foundation,version 3. * * OpenBD is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenBD. If not, see http://www.gnu.org/licenses/ * * Additional permission under GNU GPL version 3 section 7 * * If you modify this Program, or any covered work, by linking or combining * it with any of the JARS listed in the README.txt (or a modified version of * (that library), containing parts covered by the terms of that JAR, the * licensors of this Program grant you additional permission to convey the * resulting work. * README.txt @ http://www.openbluedragon.org/license/README.txt * * http://openbd.org/ * * $Id: CronSetDirectory.java 1765 2011-11-04 07:55:52Z alan $ */ package org.alanwilliamson.openbd.plugin.crontab; import com.naryx.tagfusion.cfm.engine.cfArgStructData; import com.naryx.tagfusion.cfm.engine.cfBooleanData; import com.naryx.tagfusion.cfm.engine.cfData; import com.naryx.tagfusion.cfm.engine.cfSession; import com.naryx.tagfusion.cfm.engine.cfmRunTimeException; import com.naryx.tagfusion.expression.function.functionBase; public class CronSetDirectory extends functionBase { private static final long serialVersionUID = 1L; public CronSetDirectory(){ min = max = 1; setNamedParams( new String[]{ ""directory"" } ); } public String[] getParamInfo(){ return new String[]{ ""uri directory - will be created if not exists"", }; } public java.util.Map getInfo(){ return makeInfo( ""system"", ""Sets the URI directory that the cron tasks will run from. Calling this function will enable the crontab scheduler to start. This persists across server restarts"", ReturnType.BOOLEAN ); } public cfData execute(cfSession _session, cfArgStructData argStruct ) throws cfmRunTimeException { CronExtension.setRootPath( getNamedStringParam(argStruct, ""directory"", null ) ); return cfBooleanData.TRUE; } } ",0 " 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. */ package org.wso2.carbon.identity.mgt.util; import org.apache.axiom.om.util.Base64; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.neethi.Policy; import org.apache.neethi.PolicyEngine; import org.wso2.carbon.CarbonConstants; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.mgt.IdentityMgtConfig; import org.wso2.carbon.identity.mgt.constants.IdentityMgtConstants; import org.wso2.carbon.identity.mgt.dto.UserDTO; import org.wso2.carbon.identity.mgt.internal.IdentityMgtServiceComponent; import org.wso2.carbon.registry.core.RegistryConstants; import org.wso2.carbon.registry.core.Resource; import org.wso2.carbon.registry.core.exceptions.RegistryException; import org.wso2.carbon.registry.core.session.UserRegistry; import org.wso2.carbon.user.api.Tenant; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.api.UserStoreManager; import org.wso2.carbon.user.core.UserCoreConstants; import org.wso2.carbon.user.core.service.RealmService; import org.wso2.carbon.user.core.tenant.TenantManager; import org.wso2.carbon.user.core.util.UserCoreUtil; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import org.wso2.carbon.utils.multitenancy.MultitenantUtils; import java.io.ByteArrayInputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.HashMap; import java.util.Map; /** * */ public class Utils { private static final Log log = LogFactory.getLog(Utils.class); private Utils() { } public static UserDTO processUserId(String userId) throws IdentityException { if (userId == null || userId.trim().length() < 1) { throw IdentityException.error(""Can not proceed with out a user id""); } UserDTO userDTO = new UserDTO(userId); if (!IdentityMgtConfig.getInstance().isSaasEnabled()) { validateTenant(userDTO); } userDTO.setTenantId(getTenantId(userDTO.getTenantDomain())); return userDTO; } public static void validateTenant(UserDTO user) throws IdentityException { if (user.getTenantDomain() != null && !user.getTenantDomain().isEmpty()) { if (!user.getTenantDomain().equals( PrivilegedCarbonContext.getThreadLocalCarbonContext() .getTenantDomain())) { throw IdentityException.error( ""Failed access to unauthorized tenant domain""); } user.setTenantId(getTenantId(user.getTenantDomain())); } } /** * gets no of verified user challenges * * @param userDTO bean class that contains user and tenant Information * @return no of verified challenges * @throws IdentityException if fails */ public static int getVerifiedChallenges(UserDTO userDTO) throws IdentityException { int noOfChallenges = 0; try { UserRegistry registry = IdentityMgtServiceComponent.getRegistryService(). getConfigSystemRegistry(MultitenantConstants.SUPER_TENANT_ID); String identityKeyMgtPath = IdentityMgtConstants.IDENTITY_MANAGEMENT_CHALLENGES + RegistryConstants.PATH_SEPARATOR + userDTO.getUserId() + RegistryConstants.PATH_SEPARATOR + userDTO.getUserId(); Resource resource; if (registry.resourceExists(identityKeyMgtPath)) { resource = registry.get(identityKeyMgtPath); String property = resource.getProperty(IdentityMgtConstants.VERIFIED_CHALLENGES); if (property != null) { return Integer.parseInt(property); } } } catch (RegistryException e) { log.error(""Error while processing userKey"", e); } return noOfChallenges; } /** * gets the tenant id from the tenant domain * * @param domain - tenant domain name * @return tenantId * @throws IdentityException if fails or tenant doesn't exist */ public static int getTenantId(String domain) throws IdentityException { int tenantId; TenantManager tenantManager = IdentityMgtServiceComponent.getRealmService().getTenantManager(); if (MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(domain)) { tenantId = MultitenantConstants.SUPER_TENANT_ID; if (log.isDebugEnabled()) { String msg = ""Domain is not defined implicitly. So it is Super Tenant domain.""; log.debug(msg); } } else { try { tenantId = tenantManager.getTenantId(domain); if (tenantId < 1 && tenantId != MultitenantConstants.SUPER_TENANT_ID) { String msg = ""This action can not be performed by the users in non-existing domains.""; log.error(msg); throw IdentityException.error(msg); } } catch (org.wso2.carbon.user.api.UserStoreException e) { String msg = ""Error in retrieving tenant id of tenant domain: "" + domain + "".""; log.error(msg, e); throw IdentityException.error(msg, e); } } return tenantId; } /** * Get the claims from the user store manager * * @param userName user name * @param tenantId tenantId * @param claim claim name * @return claim value * @throws IdentityException if fails */ public static String getClaimFromUserStoreManager(String userName, int tenantId, String claim) throws IdentityException { org.wso2.carbon.user.core.UserStoreManager userStoreManager = null; RealmService realmService = IdentityMgtServiceComponent.getRealmService(); String claimValue = """"; try { if (realmService.getTenantUserRealm(tenantId) != null) { userStoreManager = (org.wso2.carbon.user.core.UserStoreManager) realmService.getTenantUserRealm(tenantId). getUserStoreManager(); } } catch (Exception e) { String msg = ""Error retrieving the user store manager for tenant id : "" + tenantId; log.error(msg, e); throw IdentityException.error(msg, e); } try { if (userStoreManager != null) { Map claimsMap = userStoreManager .getUserClaimValues(userName, new String[]{claim}, UserCoreConstants.DEFAULT_PROFILE); if (claimsMap != null && !claimsMap.isEmpty()) { claimValue = claimsMap.get(claim); } } return claimValue; } catch (Exception e) { String msg = ""Unable to retrieve the claim for user : "" + userName; log.error(msg, e); throw IdentityException.error(msg, e); } } public static Map getClaimsFromUserStoreManager(String userName, int tenantId, String[] claims) throws IdentityException { Map claimValues = new HashMap<>(); org.wso2.carbon.user.core.UserStoreManager userStoreManager = null; RealmService realmService = IdentityMgtServiceComponent.getRealmService(); try { if (realmService.getTenantUserRealm(tenantId) != null) { userStoreManager = (org.wso2.carbon.user.core.UserStoreManager) realmService.getTenantUserRealm(tenantId). getUserStoreManager(); } } catch (UserStoreException e) { throw IdentityException.error(""Error retrieving the user store manager for tenant id : "" + tenantId, e); } try { if (userStoreManager != null) { claimValues = userStoreManager.getUserClaimValues(userName, claims, UserCoreConstants.DEFAULT_PROFILE); } } catch (Exception e) { throw IdentityException.error(""Unable to retrieve the claim for user : "" + userName, e); } return claimValues; } /** * get email address from user store * * @param userName user name * @param tenantId tenant id * @return email address */ public static String getEmailAddressForUser(String userName, int tenantId) { String email = null; try { if (log.isDebugEnabled()) { log.debug(""Retrieving email address from user profile.""); } Tenant tenant = IdentityMgtServiceComponent.getRealmService(). getTenantManager().getTenant(tenantId); if (tenant != null && tenant.getAdminName().equals(userName)) { email = tenant.getEmail(); } if (email == null || email.trim().length() < 1) { email = getClaimFromUserStoreManager(userName, tenantId, UserCoreConstants.ClaimTypeURIs.EMAIL_ADDRESS); } if ((email == null || email.trim().length() < 1) && MultitenantUtils.isEmailUserName()) { email = UserCoreUtil.removeDomainFromName(userName); } } catch (Exception e) { String msg = ""Unable to retrieve an email address associated with the given user : "" + userName; log.warn(msg, e); // It is common to have users with no email address defined. } return email; } /** * Update Password with the user input * * @return true - if password was successfully reset * @throws IdentityException */ public static boolean updatePassword(String userId, int tenantId, String password) throws IdentityException { String tenantDomain = null; if (userId == null || userId.trim().length() < 1 || password == null || password.trim().length() < 1) { String msg = ""Unable to find the required information for updating password""; log.error(msg); throw IdentityException.error(msg); } try { UserStoreManager userStoreManager = IdentityMgtServiceComponent. getRealmService().getTenantUserRealm(tenantId).getUserStoreManager(); userStoreManager.updateCredentialByAdmin(userId, password); if (log.isDebugEnabled()) { String msg = ""Password is updated for user: "" + userId; log.debug(msg); } return true; } catch (UserStoreException e) { String msg = ""Error in changing the password, user name: "" + userId + "" domain: "" + tenantDomain + "".""; log.error(msg, e); throw IdentityException.error(msg, e); } } /** * @param value * @return * @throws UserStoreException */ public static String doHash(String value) throws UserStoreException { try { String digsestFunction = ""SHA-256""; MessageDigest dgst = MessageDigest.getInstance(digsestFunction); byte[] byteValue = dgst.digest(value.getBytes()); return Base64.encode(byteValue); } catch (NoSuchAlgorithmException e) { log.error(e.getMessage(), e); throw new UserStoreException(e.getMessage(), e); } } /** * Set claim to user store manager * * @param userName user name * @param tenantId tenant id * @param claim claim uri * @param value claim value * @throws IdentityException if fails */ public static void setClaimInUserStoreManager(String userName, int tenantId, String claim, String value) throws IdentityException { org.wso2.carbon.user.core.UserStoreManager userStoreManager = null; RealmService realmService = IdentityMgtServiceComponent.getRealmService(); try { if (realmService.getTenantUserRealm(tenantId) != null) { userStoreManager = (org.wso2.carbon.user.core.UserStoreManager) realmService.getTenantUserRealm(tenantId). getUserStoreManager(); } } catch (Exception e) { String msg = ""Error retrieving the user store manager for the tenant""; log.error(msg, e); throw IdentityException.error(msg, e); } try { if (userStoreManager != null) { String oldValue = userStoreManager.getUserClaimValue(userName, claim, null); if (oldValue == null || !oldValue.equals(value)) { Map claimMap = new HashMap(); claimMap.put(claim, value); userStoreManager.setUserClaimValues(userName, claimMap, UserCoreConstants.DEFAULT_PROFILE); } } } catch (Exception e) { String msg = ""Unable to set the claim for user : "" + userName; log.error(msg, e); throw IdentityException.error(msg, e); } } public static String getUserStoreDomainName(String userName) { int index; String userDomain; if ((index = userName.indexOf(CarbonConstants.DOMAIN_SEPARATOR)) >= 0) { // remove domain name if exist userDomain = userName.substring(0, index); } else { userDomain = UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME; } return userDomain; } public static String[] getChallengeUris() { //TODO return new String[]{IdentityMgtConstants.DEFAULT_CHALLENGE_QUESTION_URI01, IdentityMgtConstants.DEFAULT_CHALLENGE_QUESTION_URI02}; } public static Policy getSecurityPolicy() { String policyString = "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" \n"" + "" ""; return PolicyEngine.getPolicy(new ByteArrayInputStream(policyString.getBytes())); } } ",0 "rg/1999/xhtml""> V8 API Reference Guide for node.js v0.10.22 - v0.10.23: v8::internal::SmiTagging< 4 > Struct Template Reference
          V8 API Reference Guide for node.js v0.10.22 - v0.10.23
          v8::internal::SmiTagging< 4 > Struct Template Reference

          Static Public Member Functions

          static int SmiToInt (internal::Object *value)
           

          Static Public Attributes

          static const int kSmiShiftSize = 0
           
          static const int kSmiValueSize = 31
           
          static const uintptr_t kEncodablePointerMask = 0x1
           
          static const int kPointerToSmiShift = 0
           

          The documentation for this struct was generated from the following file:
          • deps/v8/include/v8.h

          Generated on Tue Aug 11 2015 23:45:06 for V8 API Reference Guide for node.js v0.10.22 - v0.10.23 by   1.8.9.1
          ",0 "omponent\Form\FormBuilderInterface; use JamesMannion\ForumBundle\Constants\Label; use JamesMannion\ForumBundle\Constants\Button; use JamesMannion\ForumBundle\Constants\Validation; use Doctrine\ORM\EntityRepository; use Symfony\Component\Form\AbstractType; class UserCreateForm extends AbstractType { private $name = 'userCreateForm'; public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add( 'username', 'text', array( 'mapped' => true, 'required' => true, 'label' => Label::REGISTRATION_USERNAME, 'max_length' => 100, ) ) ->add( 'email', 'repeated', array( 'type' => 'email', 'mapped' => true, 'required' => true, 'max_length' => 100, 'invalid_message' => Validation::REGISTRATION_EMAIL_MATCH, 'first_options' => array( 'label' => Label::REGISTRATION_EMAIL, ), 'second_options' => array( 'label' => Label::REGISTRATION_REPEAT_EMAIL), ) ) ->add( 'password', 'repeated', array( 'mapped' => true, 'type' => 'password', 'required' => true, 'max_length' => 100, 'invalid_message' => Validation::REGISTRATION_PASSWORD_MATCH, 'first_options' => array('label' => Label::REGISTRATION_PASSWORD), 'second_options' => array('label' => Label::REGISTRATION_REPEAT_PASSWORD) ) ) ->add( 'memorableQuestion', 'entity', array( 'mapped' => true, 'required' => true, 'label' => Label::REGISTRATION_MEMORABLE_QUESTION, 'class' => 'JamesMannionForumBundle:MemorableQuestion', 'query_builder' => function(EntityRepository $er) { return $er->createQueryBuilder('q') ->orderBy('q.question', 'ASC'); } ) ) ->add( 'memorableAnswer', 'text', array( 'mapped' => true, 'required' => true, 'label' => Label::REGISTRATION_MEMORABLE_ANSWER, 'max_length' => 100, ) ) ->add( 'save', 'submit', array( 'label' => Button::REGISTRATION_SUBMIT ) ); } /** * @return string */ public function getName() { return $this->name; } } ",0 "ryanwinchester/netsuite-php * @copyright Copyright (c) Ryan Winchester * @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0 * @link https://github.com/ryanwinchester/netsuite-php * * Original content: * @copyright Copyright (c) NetSuite Inc. * @license https://raw.githubusercontent.com/ryanwinchester/netsuite-php/master/original/NetSuite%20Application%20Developer%20License%20Agreement.txt * @link http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml * * generated: 2020-04-10 09:56:55 PM UTC */ namespace NetSuite\Classes; class NSSoapFault { /** * @var \NetSuite\Classes\FaultCodeType */ public $code; /** * @var string */ public $message; static $paramtypesmap = array( ""code"" => ""FaultCodeType"", ""message"" => ""string"", ); } ",0 "it-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -D__ARM_FEATURE_SVE -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s #include #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1, A2_UNUSED, A3, A4_UNUSED) A1##A3 #else #define SVE_ACLE_FUNC(A1, A2, A3, A4) A1##A2##A3##A4 #endif svint64_t test_svldff1uw_s64(svbool_t pg, const uint32_t *base) { // CHECK-LABEL: test_svldff1uw_s64 // CHECK: %[[PG:.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: %[[LOAD:.*]] = call @llvm.aarch64.sve.ldff1.nxv2i32( %[[PG]], i32* %base) // CHECK: %[[ZEXT:.*]] = zext %[[LOAD]] to // CHECK: ret %[[ZEXT]] return svldff1uw_s64(pg, base); } svuint64_t test_svldff1uw_u64(svbool_t pg, const uint32_t *base) { // CHECK-LABEL: test_svldff1uw_u64 // CHECK: %[[PG:.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: %[[LOAD:.*]] = call @llvm.aarch64.sve.ldff1.nxv2i32( %[[PG]], i32* %base) // CHECK: %[[ZEXT:.*]] = zext %[[LOAD]] to // CHECK: ret %[[ZEXT]] return svldff1uw_u64(pg, base); } svint64_t test_svldff1uw_vnum_s64(svbool_t pg, const uint32_t *base, int64_t vnum) { // CHECK-LABEL: test_svldff1uw_vnum_s64 // CHECK-DAG: %[[PG:.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK-DAG: %[[BITCAST:.*]] = bitcast i32* %base to * // CHECK-DAG: %[[GEP:.*]] = getelementptr , * %[[BITCAST]], i64 %vnum, i64 0 // CHECK: %[[LOAD:.*]] = call @llvm.aarch64.sve.ldff1.nxv2i32( %[[PG]], i32* %[[GEP]]) // CHECK: %[[ZEXT:.*]] = zext %[[LOAD]] to // CHECK: ret %[[ZEXT]] return svldff1uw_vnum_s64(pg, base, vnum); } svuint64_t test_svldff1uw_vnum_u64(svbool_t pg, const uint32_t *base, int64_t vnum) { // CHECK-LABEL: test_svldff1uw_vnum_u64 // CHECK-DAG: %[[PG:.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK-DAG: %[[BITCAST:.*]] = bitcast i32* %base to * // CHECK-DAG: %[[GEP:.*]] = getelementptr , * %[[BITCAST]], i64 %vnum, i64 0 // CHECK: %[[LOAD:.*]] = call @llvm.aarch64.sve.ldff1.nxv2i32( %[[PG]], i32* %[[GEP]]) // CHECK: %[[ZEXT:.*]] = zext %[[LOAD]] to // CHECK: ret %[[ZEXT]] return svldff1uw_vnum_u64(pg, base, vnum); } svint64_t test_svldff1uw_gather_u64base_s64(svbool_t pg, svuint64_t bases) { // CHECK-LABEL: test_svldff1uw_gather_u64base_s64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.scalar.offset.nxv2i32.nxv2i64( [[PG]], %bases, i64 0) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather, _u64base, _s64, )(pg, bases); } svuint64_t test_svldff1uw_gather_u64base_u64(svbool_t pg, svuint64_t bases) { // CHECK-LABEL: test_svldff1uw_gather_u64base_u64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.scalar.offset.nxv2i32.nxv2i64( [[PG]], %bases, i64 0) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather, _u64base, _u64, )(pg, bases); } svint64_t test_svldff1uw_gather_s64offset_s64(svbool_t pg, const uint32_t *base, svint64_t offsets) { // CHECK-LABEL: test_svldff1uw_gather_s64offset_s64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.nxv2i32( [[PG]], i32* %base, %offsets) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather_, s64, offset_s64, )(pg, base, offsets); } svuint64_t test_svldff1uw_gather_s64offset_u64(svbool_t pg, const uint32_t *base, svint64_t offsets) { // CHECK-LABEL: test_svldff1uw_gather_s64offset_u64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.nxv2i32( [[PG]], i32* %base, %offsets) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather_, s64, offset_u64, )(pg, base, offsets); } svint64_t test_svldff1uw_gather_u64offset_s64(svbool_t pg, const uint32_t *base, svuint64_t offsets) { // CHECK-LABEL: test_svldff1uw_gather_u64offset_s64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.nxv2i32( [[PG]], i32* %base, %offsets) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather_, u64, offset_s64, )(pg, base, offsets); } svuint64_t test_svldff1uw_gather_u64offset_u64(svbool_t pg, const uint32_t *base, svuint64_t offsets) { // CHECK-LABEL: test_svldff1uw_gather_u64offset_u64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.nxv2i32( [[PG]], i32* %base, %offsets) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather_, u64, offset_u64, )(pg, base, offsets); } svint64_t test_svldff1uw_gather_u64base_offset_s64(svbool_t pg, svuint64_t bases, int64_t offset) { // CHECK-LABEL: test_svldff1uw_gather_u64base_offset_s64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.scalar.offset.nxv2i32.nxv2i64( [[PG]], %bases, i64 %offset) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather, _u64base, _offset_s64, )(pg, bases, offset); } svuint64_t test_svldff1uw_gather_u64base_offset_u64(svbool_t pg, svuint64_t bases, int64_t offset) { // CHECK-LABEL: test_svldff1uw_gather_u64base_offset_u64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.scalar.offset.nxv2i32.nxv2i64( [[PG]], %bases, i64 %offset) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather, _u64base, _offset_u64, )(pg, bases, offset); } svint64_t test_svldff1uw_gather_s64index_s64(svbool_t pg, const uint32_t *base, svint64_t indices) { // CHECK-LABEL: test_svldff1uw_gather_s64index_s64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.index.nxv2i32( [[PG]], i32* %base, %indices) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather_, s64, index_s64, )(pg, base, indices); } svuint64_t test_svldff1uw_gather_s64index_u64(svbool_t pg, const uint32_t *base, svint64_t indices) { // CHECK-LABEL: test_svldff1uw_gather_s64index_u64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.index.nxv2i32( [[PG]], i32* %base, %indices) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather_, s64, index_u64, )(pg, base, indices); } svint64_t test_svldff1uw_gather_u64index_s64(svbool_t pg, const uint32_t *base, svuint64_t indices) { // CHECK-LABEL: test_svldff1uw_gather_u64index_s64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.index.nxv2i32( [[PG]], i32* %base, %indices) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather_, u64, index_s64, )(pg, base, indices); } svuint64_t test_svldff1uw_gather_u64index_u64(svbool_t pg, const uint32_t *base, svuint64_t indices) { // CHECK-LABEL: test_svldff1uw_gather_u64index_u64 // CHECK: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.index.nxv2i32( [[PG]], i32* %base, %indices) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather_, u64, index_u64, )(pg, base, indices); } svint64_t test_svldff1uw_gather_u64base_index_s64(svbool_t pg, svuint64_t bases, int64_t index) { // CHECK-LABEL: test_svldff1uw_gather_u64base_index_s64 // CHECK-DAG: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK-DAG: [[SHL:%.*]] = shl i64 %index, 2 // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.scalar.offset.nxv2i32.nxv2i64( [[PG]], %bases, i64 [[SHL]]) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather, _u64base, _index_s64, )(pg, bases, index); } svuint64_t test_svldff1uw_gather_u64base_index_u64(svbool_t pg, svuint64_t bases, int64_t index) { // CHECK-LABEL: test_svldff1uw_gather_u64base_index_u64 // CHECK-DAG: [[PG:%.*]] = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) // CHECK-DAG: [[SHL:%.*]] = shl i64 %index, 2 // CHECK: [[LOAD:%.*]] = call @llvm.aarch64.sve.ldff1.gather.scalar.offset.nxv2i32.nxv2i64( [[PG]], %bases, i64 [[SHL]]) // CHECK: [[ZEXT:%.*]] = zext [[LOAD]] to // CHECK: ret [[ZEXT]] return SVE_ACLE_FUNC(svldff1uw_gather, _u64base, _index_u64, )(pg, bases, index); } ",0 " - getpoisson - poisson deviate for given expected mean lambda This code is adapted from SimpleRNG by John D Cook, which is provided in the public domain. The original C++ code is found here: http://www.johndcook.com/cpp_random_number_generation.html This code has been modified in the following ways compared to the original. 1. convert to C from C++ 2. keep only uniform, gaussian and poisson deviates 3. state variables are module static instead of class variables 4. provide an srand() equivalent to initialize the state */ extern void simplerng_setstate(unsigned int u, unsigned int v); extern void simplerng_getstate(unsigned int *u, unsigned int *v); extern void simplerng_srand(unsigned int seed); extern double simplerng_getuniform(void); extern double simplerng_getnorm(void); extern int simplerng_getpoisson(double lambda); extern double simplerng_logfactorial(int n); ",0 "s 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. package com.google.devtools.build.android.desugar.io; import static com.google.common.base.Preconditions.checkArgument; import com.google.common.io.ByteStreams; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.zip.CRC32; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; /** Output provider is a zip file. */ class ZipOutputFileProvider implements OutputFileProvider { private final ZipOutputStream out; public ZipOutputFileProvider(Path root) throws IOException { out = new ZipOutputStream(new BufferedOutputStream(Files.newOutputStream(root))); } @Override public void copyFrom(String filename, InputFileProvider inputFileProvider) throws IOException { // TODO(bazel-team): Avoid de- and re-compressing resource files out.putNextEntry(inputFileProvider.getZipEntry(filename)); try (InputStream is = inputFileProvider.getInputStream(filename)) { ByteStreams.copy(is, out); } out.closeEntry(); } @Override public void write(String filename, byte[] content) throws IOException { checkArgument(filename.equals(DESUGAR_DEPS_FILENAME) || filename.endsWith("".class""), ""Expect file to be copied: %s"", filename); writeStoredEntry(out, filename, content); } @Override public void close() throws IOException { out.close(); } private static void writeStoredEntry(ZipOutputStream out, String filename, byte[] content) throws IOException { // Need to pre-compute checksum for STORED (uncompressed) entries) CRC32 checksum = new CRC32(); checksum.update(content); ZipEntry result = new ZipEntry(filename); result.setTime(0L); // Use stable timestamp Jan 1 1980 result.setCrc(checksum.getValue()); result.setSize(content.length); result.setCompressedSize(content.length); // Write uncompressed, since this is just an intermediary artifact that // we will convert to .dex result.setMethod(ZipEntry.STORED); out.putNextEntry(result); out.write(content); out.closeEntry(); } } ",0 "anagerInterface; use Oro\Bundle\EntityBundle\ORM\DoctrineHelper; use Oro\Bundle\IntegrationBundle\Async\ReversSyncIntegrationProcessor; use Oro\Bundle\IntegrationBundle\Async\Topics; use Oro\Bundle\IntegrationBundle\Entity\Channel as Integration; use Oro\Bundle\IntegrationBundle\Logger\LoggerStrategy; use Oro\Bundle\IntegrationBundle\Manager\TypesRegistry; use Oro\Bundle\IntegrationBundle\Provider\ConnectorInterface; use Oro\Bundle\IntegrationBundle\Provider\ReverseSyncProcessor; use Oro\Bundle\IntegrationBundle\Provider\TwoWaySyncConnectorInterface; use Oro\Component\MessageQueue\Client\TopicSubscriberInterface; use Oro\Component\MessageQueue\Consumption\MessageProcessorInterface; use Oro\Component\MessageQueue\Test\JobRunner; use Oro\Component\MessageQueue\Transport\Null\NullMessage; use Oro\Component\MessageQueue\Transport\Null\NullSession; use Oro\Component\MessageQueue\Util\JSON; use Oro\Component\Testing\ClassExtensionTrait; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; class ReversSyncIntegrationProcessorTest extends \PHPUnit_Framework_TestCase { use ClassExtensionTrait; public function testShouldImplementMessageProcessorInterface() { $this->assertClassImplements(MessageProcessorInterface::class, ReversSyncIntegrationProcessor::class); } public function testShouldImplementTopicSubscriberInterface() { $this->assertClassImplements(TopicSubscriberInterface::class, ReversSyncIntegrationProcessor::class); } public function testShouldImplementContainerAwareInterface() { $this->assertClassImplements(ContainerAwareInterface::class, ReversSyncIntegrationProcessor::class); } public function testShouldSubscribeOnReversSyncIntegrationTopic() { $this->assertEquals([Topics::REVERS_SYNC_INTEGRATION], ReversSyncIntegrationProcessor::getSubscribedTopics()); } public function testCouldBeConstructedWithExpectedArguments() { new ReversSyncIntegrationProcessor( $this->createDoctrineHelperStub(), $this->createReversSyncProcessorMock(), $this->createTypeRegistryMock(), new JobRunner(), $this->createLoggerMock() ); } public function testRejectAndLogIfMessageBodyMissIntegrationId() { $logger = $this->createLoggerMock(); $logger ->expects($this->once()) ->method('critical') ->with('Invalid message: integration_id and connector should not be empty: []') ; $processor = new ReversSyncIntegrationProcessor( $this->createDoctrineHelperStub(), $this->createReversSyncProcessorMock(), $this->createTypeRegistryMock(), new JobRunner(), $logger ); $message = new NullMessage(); $message->setBody('[]'); $status = $processor->process($message, new NullSession()); $this->assertEquals(MessageProcessorInterface::REJECT, $status); } /** * @expectedException \LogicException * @expectedExceptionMessage The malformed json given. */ public function testThrowIfMessageBodyInvalidJson() { $processor = new ReversSyncIntegrationProcessor( $this->createDoctrineHelperStub(), $this->createReversSyncProcessorMock(), $this->createTypeRegistryMock(), new JobRunner(), $this->createLoggerMock() ); $message = new NullMessage(); $message->setBody('[}'); $processor->process($message, new NullSession()); } public function testRejectAndLogIfMessageBodyMissConnector() { $logger = $this->createLoggerMock(); $logger ->expects($this->once()) ->method('critical') ->with( 'Invalid message: integration_id and connector should not be empty:'. ' {""integration_id"":""theIntegrationId""}' ) ; $processor = new ReversSyncIntegrationProcessor( $this->createDoctrineHelperStub(), $this->createReversSyncProcessorMock(), $this->createTypeRegistryMock(), new JobRunner(), $logger ); $message = new NullMessage(); $message->setBody(JSON::encode(['integration_id' => 'theIntegrationId'])); $status = $processor->process($message, new NullSession()); $this->assertEquals(MessageProcessorInterface::REJECT, $status); } public function testShouldRejectAndLogIfIntegrationNotExist() { $logger = $this->createLoggerMock(); $logger ->expects($this->once()) ->method('critical') ->with('Integration should exist and be enabled: theIntegrationId') ; $entityManagerMock = $this->createEntityManagerStub(); $entityManagerMock ->expects($this->once()) ->method('find') ->with(Integration::class, 'theIntegrationId') ->willReturn(null) ; $doctrineHelperStub = $this->createDoctrineHelperStub($entityManagerMock); $processor = new ReversSyncIntegrationProcessor( $doctrineHelperStub, $this->createReversSyncProcessorMock(), $this->createTypeRegistryMock(), new JobRunner(), $logger ); $message = new NullMessage(); $message->setBody(JSON::encode(['integration_id' => 'theIntegrationId', 'connector' => 'connector'])); $status = $processor->process($message, new NullSession()); $this->assertEquals(MessageProcessorInterface::REJECT, $status); } public function testShouldRejectAndLogIfIntegrationIsNotEnabled() { $logger = $this->createLoggerMock(); $logger ->expects($this->once()) ->method('critical') ->with('Integration should exist and be enabled: theIntegrationId') ; $integration = new Integration(); $integration->setEnabled(false); $entityManagerMock = $this->createEntityManagerStub(); $entityManagerMock ->expects($this->once()) ->method('find') ->with(Integration::class, 'theIntegrationId') ->willReturn($integration); ; $doctrineHelperStub = $this->createDoctrineHelperStub($entityManagerMock); $processor = new ReversSyncIntegrationProcessor( $doctrineHelperStub, $this->createReversSyncProcessorMock(), $this->createTypeRegistryMock(), new JobRunner(), $logger ); $message = new NullMessage(); $message->setBody(JSON::encode(['integration_id' => 'theIntegrationId', 'connector' => 'connector'])); $status = $processor->process($message, new NullSession()); $this->assertEquals(MessageProcessorInterface::REJECT, $status); } public function testRejectIfConnectionIsNotInstanceOfTwoWaySyncConnector() { $integration = new Integration(); $integration->setEnabled(true); $integration->setType('theIntegrationType'); $entityManagerMock = $this->createEntityManagerStub(); $entityManagerMock ->expects($this->once()) ->method('find') ->with(Integration::class, 'theIntegrationId') ->willReturn($integration); ; $doctrineHelperStub = $this->createDoctrineHelperStub($entityManagerMock); $typeRegistryMock = $this->createTypeRegistryMock(); $typeRegistryMock ->expects(self::once()) ->method('getConnectorType') ->with('theIntegrationType', 'theConnector') ->willReturn($this->createMock(ConnectorInterface::class)); $reversSyncProcessorMock = $this->createReversSyncProcessorMock(); $reversSyncProcessorMock ->expects(self::never()) ->method('process'); $processor = new ReversSyncIntegrationProcessor( $doctrineHelperStub, $reversSyncProcessorMock, $typeRegistryMock, new JobRunner(), $this->createLoggerMock() ); $message = new NullMessage(); $message->setBody(JSON::encode(['integration_id' => 'theIntegrationId', 'connector' => 'theConnector'])); $status = $processor->process($message, new NullSession()); $this->assertEquals(MessageProcessorInterface::REJECT, $status); } public function testShouldRunSyncAsUniqueJob() { $integration = new Integration(); $integration->setEnabled(true); $integration->setType('theIntegrationType'); $entityManagerMock = $this->createEntityManagerStub(); $entityManagerMock ->expects($this->once()) ->method('find') ->with(Integration::class, 'theIntegrationId') ->willReturn($integration); ; $doctrineHelperStub = $this->createDoctrineHelperStub($entityManagerMock); $typeRegistryMock = $this->createTypeRegistryMock(); $typeRegistryMock ->expects(self::once()) ->method('getConnectorType') ->willReturn($this->createMock(TwoWaySyncConnectorInterface::class)); $jobRunner = new JobRunner(); $processor = new ReversSyncIntegrationProcessor( $doctrineHelperStub, $this->createReversSyncProcessorMock(), $typeRegistryMock, $jobRunner, $this->createLoggerMock() ); $message = new NullMessage(); $message->setBody(JSON::encode(['integration_id' => 'theIntegrationId', 'connector' => 'theConnector'])); $message->setMessageId('theMessageId'); $processor->process($message, new NullSession()); $uniqueJobs = $jobRunner->getRunUniqueJobs(); self::assertCount(1, $uniqueJobs); self::assertEquals('oro_integration:revers_sync_integration:theIntegrationId', $uniqueJobs[0]['jobName']); self::assertEquals('theMessageId', $uniqueJobs[0]['ownerId']); } public function testShouldPerformReversSyncIfConnectorIsInstanceOfTwoWaySyncInterface() { $integration = new Integration(); $integration->setEnabled(true); $integration->setType('theIntegrationType'); $entityManagerMock = $this->createEntityManagerStub(); $entityManagerMock ->expects($this->once()) ->method('find') ->with(Integration::class, 'theIntegrationId') ->willReturn($integration) ; $doctrineHelperStub = $this->createDoctrineHelperStub($entityManagerMock); $typeRegistryMock = $this->createTypeRegistryMock(); $typeRegistryMock ->expects(self::once()) ->method('getConnectorType') ->with('theIntegrationType', 'theConnector') ->willReturn($this->createMock(TwoWaySyncConnectorInterface::class)); $processor = new ReversSyncIntegrationProcessor( $doctrineHelperStub, $this->createReversSyncProcessorMock(), $typeRegistryMock, new JobRunner(), $this->createLoggerMock() ); $message = new NullMessage(); $message->setBody(JSON::encode(['integration_id' => 'theIntegrationId', 'connector' => 'theConnector'])); $status = $processor->process($message, new NullSession()); $this->assertEquals(MessageProcessorInterface::ACK, $status); } /** * @return \PHPUnit_Framework_MockObject_MockObject|TypesRegistry */ private function createTypeRegistryMock() { return $this->createMock(TypesRegistry::class); } /** * @return \PHPUnit_Framework_MockObject_MockObject|ReverseSyncProcessor */ private function createReversSyncProcessorMock() { $reverseSyncProcessor = $this->createMock(ReverseSyncProcessor::class); $reverseSyncProcessor ->expects($this->any()) ->method('getLoggerStrategy') ->willReturn(new LoggerStrategy()) ; return $reverseSyncProcessor; } /** * @return \PHPUnit_Framework_MockObject_MockObject|EntityManagerInterface */ private function createEntityManagerStub() { $configuration = new Configuration(); $connectionMock = $this->createMock(Connection::class); $connectionMock ->expects($this->any()) ->method('getConfiguration') ->willReturn($configuration); $entityManagerMock = $this->createMock(EntityManagerInterface::class); $entityManagerMock ->expects($this->any()) ->method('getConnection') ->willReturn($connectionMock); return $entityManagerMock; } /** * @return \PHPUnit_Framework_MockObject_MockObject|DoctrineHelper */ private function createDoctrineHelperStub($entityManager = null) { $helperMock = $this->createMock(DoctrineHelper::class); $helperMock ->expects($this->any()) ->method('getEntityManagerForClass') ->willReturn($entityManager); return $helperMock; } /** * @return \PHPUnit_Framework_MockObject_MockObject | LoggerInterface */ private function createLoggerMock() { return $this->createMock(LoggerInterface::class); } } ",0 " { /** * Run the migrations. * * @return void */ public function up() { if (!Schema::hasColumn('user', 'oauth_provider')) { Schema::table( 'user', function (Blueprint $t){ $t->string('oauth_provider', 50)->nullable()->after('remember_token'); } ); } Schema::create( 'oauth_config', function (Blueprint $t){ $t->integer('service_id')->unsigned()->primary(); $t->foreign('service_id')->references('id')->on('service')->onDelete('cascade'); $t->integer('default_role')->unsigned()->nullable(); // previously set to 'restrict' which isn't supported by all databases // removing the onDelete clause gets the same behavior as No Action and Restrict are defaults. $t->foreign('default_role')->references('id')->on('role'); $t->string('client_id'); $t->longText('client_secret'); $t->string('redirect_url'); $t->string('icon_class')->nullable(); } ); } /** * Reverse the migrations. * * @return void */ public function down() { if (Schema::hasColumn('user', 'oauth_provider')) { Schema::table( 'user', function (Blueprint $t){ $t->dropColumn('oauth_provider'); } ); } Schema::dropIfExists('oauth_config'); } } ",0 ". * * *

          * The following features are supported: *

          *
            *
          • {@link net.opengis.gml311.MultiPointDomainType#getMultiPoint Multi Point}
          • *
          * * @see net.opengis.gml311.Gml311Package#getMultiPointDomainType() * @model extendedMetaData=""name='MultiPointDomainType' kind='elementOnly'"" * @generated */ public interface MultiPointDomainType extends DomainSetType { /** * Returns the value of the 'Multi Point' containment reference. * *

          * If the meaning of the 'Multi Point' containment reference isn't clear, * there really should be more of a description here... *

          * * @return the value of the 'Multi Point' containment reference. * @see #setMultiPoint(MultiPointType) * @see net.opengis.gml311.Gml311Package#getMultiPointDomainType_MultiPoint() * @model containment=""true"" * extendedMetaData=""kind='element' name='MultiPoint' namespace='##targetNamespace'"" * @generated */ MultiPointType getMultiPoint(); /** * Sets the value of the '{@link net.opengis.gml311.MultiPointDomainType#getMultiPoint Multi Point}' containment reference. * * * @param value the new value of the 'Multi Point' containment reference. * @see #getMultiPoint() * @generated */ void setMultiPoint(MultiPointType value); } // MultiPointDomainType ",0 ".xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.hl7.v3.CE; /** *

          Java-Klasse für anonymous complex type. * *

          Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. * *

           * <complexType>
           *   <complexContent>
           *     <restriction base=""{http://www.w3.org/2001/XMLSchema}anyType"">
           *       <sequence>
           *         <element name=""code"" type=""{urn:hl7-org:v3}CE"" minOccurs=""0""/>
           *       </sequence>
           *     </restriction>
           *   </complexContent>
           * </complexType>
           * 
          * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = """", propOrder = { ""code"" }) @XmlRootElement(name = ""getInboxClinicalDocuments"") public class GetInboxClinicalDocuments { protected CE code; /** * Ruft den Wert der code-Eigenschaft ab. * * @return * possible object is * {@link CE } * */ public CE getCode() { return code; } /** * Legt den Wert der code-Eigenschaft fest. * * @param value * allowed object is * {@link CE } * */ public void setCode(CE value) { this.code = value; } } ",0 "color: #eee; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }

          Frame: One | Two | Three | Four | Five | Six | Seven | Eight | Nine

          ",0 " * 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an ""AS IS"" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is Rhino code, released * May 6, 1999. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1997-1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Bob Jervis * Google Inc. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License Version 2 or later (the ""GPL""), in which * case the provisions of the GPL are applicable instead of those above. If * you wish to allow use of your version of this file only under the terms of * the GPL and not to allow others to use your version of this file under the * MPL, indicate your decision by deleting the provisions above and replacing * them with the notice and other provisions required by the GPL. If you do * not delete the provisions above, a recipient may use your version of this * file under either the MPL or the GPL. * * ***** END LICENSE BLOCK ***** */ package com.google.javascript.rhino; import java.util.ArrayList; import java.util.List; /** * A simple {@link ErrorReporter} that collects warnings and errors and makes * them accessible via {@link #errors()} and {@link #warnings()}. * * */ public class SimpleErrorReporter implements ErrorReporter { private List warnings = null; private List errors = null; public void warning(String message, String sourceName, int line, String lineSource, int lineOffset) { if (warnings == null) { warnings = new ArrayList(); } warnings.add(formatDetailedMessage( message, sourceName, line, lineSource, lineOffset)); } public void error(String message, String sourceName, int line, String lineSource, int lineOffset) { if (errors == null) { errors = new ArrayList(); } errors.add(formatDetailedMessage( message, sourceName, line, lineSource, lineOffset)); } public EvaluatorException runtimeError( String message, String sourceName, int line, String lineSource, int lineOffset) { return new EvaluatorException( message, sourceName, line, lineSource, lineOffset); } /** * Returns the list of errors, or {@code null} if there were none. */ public List errors() { return errors; } /** * Returns the list of warnings, or {@code null} if there were none. */ public List warnings() { return warnings; } private String formatDetailedMessage( String message, String sourceName, int line, String lineSource, int lineOffset) { RhinoException e = new RhinoException(message); if (sourceName != null) { e.initSourceName(sourceName); } if (lineSource != null) { e.initLineSource(lineSource); } if (line > 0) { e.initLineNumber(line); } if (lineOffset > 0) { e.initColumnNumber(lineOffset); } return e.getMessage(); } } ",0 "s Base; /** * Class OrderContext */ class OrderContext extends Base { /** * @var array */ private $prices; /** * @var array */ private $quantities; /** * @var string */ private $country; /** * @var string */ private $reduction; public function __construct($baseUrl) { parent::__construct($baseUrl); $this->quantities = []; $this->prices = []; $this->reduction = 'STANDARD'; } /** * @When I receive a bad request */ public function iReceiveABadRequest() { $this->visitPath('/order'); } /** * @Then I handle the bad request */ public function iHandleTheBadRequest() { $this->assertResponseStatus(405); } /** * @Given I have the following order */ public function iHaveTheFollowingOrder(TableNode $table) { $this->prices = $this->quantities = []; foreach ($table as $row ) { $this->prices[] = (float) $row['price']; $this->quantities[] = (int) $row['quantity']; } } /** * @Given the country is :country */ public function theCountryIs($country) { $this->country = $country; } /** * @Given the reduction is :reduction */ public function theReductionIs($reduction) { $this->reduction = $reduction; } /** * @When I validate */ public function iValidate() { $post = [ 'prices' => $this->prices, 'quantities' => $this->quantities, 'country' => $this->country, 'reduction' => $this->reduction, ]; $this->getSession()->getDriver()->getClient()->request('POST', $this->baseUrl.'/order', $post); $this->assertResponseStatus(200); } /** * @Then The total must be :total € */ public function theTotalMustBeEu($total) { $content = json_decode($this->getSession()->getDriver()->getContent(), true); assert($content['total'] == $total); } } ",0 "rg/1999/xhtml"" xml:lang=""en"" lang=""en""> Upgrading from 1.7.2 to 2.0.0 : CodeIgniter User Guide

          CodeIgniter User Guide Version 2.2.1

          Table of Contents Page
          CodeIgniter Home  ›  User Guide Home  ›  Upgrading from 1.7.2 to 2.0.0
          Search User Guide   

          Upgrading from 1.7.2 to 2.0.0

          Before performing an update you should take your site offline by replacing the index.php file with a static one.

          Step 1: Update your CodeIgniter files

          Replace all files and directories in your ""system"" folder except your application folder.

          Note: If you have any custom developed files in these folders please make copies of them first.

          Step 2: Adjust get_dir_file_info() where necessary

          Version 2.0.0 brings a non-backwards compatible change to get_dir_file_info() in the File Helper. Non-backwards compatible changes are extremely rare in CodeIgniter, but this one we feel was warranted due to how easy it was to create serious server performance issues. If you need recursiveness where you are using this helper function, change such instances, setting the second parameter, $top_level_only to FALSE:

          get_dir_file_info('/path/to/directory', FALSE);

          Step 3: Convert your Plugins to Helpers

          2.0.0 gets rid of the ""Plugin"" system as their functionality was identical to Helpers, but non-extensible. You will need to rename your plugin files from filename_pi.php to filename_helper.php, move them to your helpers folder, and change all instances of: $this->load->plugin('foo'); to $this->load->helper('foo');

          Step 4: Update stored encrypted data

          Note: If your application does not use the Encryption library, does not store Encrypted data permanently, or is on an environment that does not support Mcrypt, you may skip this step.

          The Encryption library has had a number of improvements, some for encryption strength and some for performance, that has an unavoidable consequence of making it no longer possible to decode encrypted data produced by the original version of this library. To help with the transition, a new method has been added, encode_from_legacy() that will decode the data with the original algorithm and return a re-encoded string using the improved methods. This will enable you to easily replace stale encrypted data with fresh in your applications, either on the fly or en masse.

          Please read how to use this method in the Encryption library documentation.

          Step 5: Remove loading calls for the compatibility helper.

          The compatibility helper has been removed from the CodeIgniter core. All methods in it should be natively available in supported PHP versions.

          Step 6: Update Class extension

          All core classes are now prefixed with CI_. Update Models and Controllers to extend CI_Model and CI_Controller, respectively.

          Step 7: Update Parent Constructor calls

          All native CodeIgniter classes now use the PHP 5 __construct() convention. Please update extended libraries to call parent::__construct().

          Step 8: Update your user guide

          Please replace your local copy of the user guide with the new version, including the image files.

          Previous Topic:  Installation Instructions    ·   Top of Page   ·   User Guide Home   ·   Next Topic:  Troubleshooting

          CodeIgniter  ·  Copyright © 2006 - 2014  ·  EllisLab, Inc.  ·  Copyright © 2014 - 2015  ·  British Columbia Institute of Technology

          ",0 "ss"">
          {{errMessage}}


          Number of claims available to process: {{claimCount}}

          No records available to process.

          Your request is received and will be processed.

          Notification will be sent to your email on file once the bulk process is complete.

          Results could be viewed in the BCDSS Results and Reports section.

          ",0 "ategory Elasticsearch * @package Elasticsearch\Endpoints * @author Zachary Tong * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 * @link http://elasticsearch.org */ class Bulk extends AbstractEndpoint implements BulkEndpointInterface { /** * @param Transport $transport * @param SerializerInterface $serializer */ public function __construct(Transport $transport, SerializerInterface $serializer) { $this->serializer = $serializer; parent::__construct($transport); } /** * @param string|array $body * * @return $this */ public function setBody($body) { if (isset($body) !== true) { return $this; } if (is_array($body) === true) { $bulkBody = """"; foreach ($body as $item) { $bulkBody .= $this->serializer->serialize($item).""\n""; } $body = $bulkBody; } $this->body = $body; return $this; } /** * @return string */ protected function getURI() { return $this->getOptionalURI('_bulk'); } /** * @return string[] */ protected function getParamWhitelist() { return array( 'consistency', 'refresh', 'replication', 'type', ); } /** * @return string */ protected function getMethod() { return 'POST'; } } ",0 "sovizen/u/leo/ */ //------------------------------------------------------------------------------------- // Constants Definition //------------------------------------------------------------------------------------- define('POP_CDNWP_VERSION', 0.157); define('POP_CDNWP_DIR', dirname(__FILE__)); class PoP_CDNWP { public function __construct() { // Priority: after PoP Engine Web Platform \PoP\Root\App::addAction('plugins_loaded', array($this, 'init'), 888412); } public function init() { define('POP_CDNWP_URL', plugins_url('', __FILE__)); if ($this->validate()) { $this->initialize(); define('POP_CDNWP_INITIALIZED', true); } } public function validate() { return true; include_once 'validation.php'; $validation = new PoP_CDNWP_Validation(); return $validation->validate(); } public function initialize() { include_once 'initialization.php'; $initialization = new PoP_CDNWP_Initialization(); return $initialization->initialize(); } } /** * Initialization */ new PoP_CDNWP(); ",0 " for additional information regarding copyright ownership. * Cloudkick licenses this file to You 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. */ package com.cloudkick; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.RelativeLayout; import android.widget.Toast; public class LoginActivity extends Activity { private static final int SETTINGS_ACTIVITY_ID = 0; RelativeLayout loginView = null; private String user = null; private String pass = null; private ProgressDialog progress = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.login); setTitle(""Cloudkick for Android""); findViewById(R.id.button_login).setOnClickListener(new LoginClickListener()); findViewById(R.id.button_signup).setOnClickListener(new SignupClickListener()); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == SETTINGS_ACTIVITY_ID) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(LoginActivity.this); if (prefs.getString(""editKey"", """").equals("""") && prefs.getString(""editSecret"", """").equals("""")) { finish(); } else { Intent result = new Intent(); result.putExtra(""login"", true); setResult(Activity.RESULT_OK, result); finish(); } } } private class LoginClickListener implements View.OnClickListener { public void onClick(View v) { new AccountLister().execute(); } } private class SignupClickListener implements View.OnClickListener { public void onClick(View v) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(""https://www.cloudkick.com/pricing/""))); } } private class AccountLister extends AsyncTask>{ private Integer statusCode = null; @Override protected void onPreExecute() { user = ((EditText) findViewById(R.id.input_email)).getText().toString(); pass = ((EditText) findViewById(R.id.input_password)).getText().toString(); progress = ProgressDialog.show(LoginActivity.this, """", ""Logging In..."", true); } @Override protected ArrayList doInBackground(Void...voids) { ArrayList accounts = new ArrayList(); try { HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost(""https://www.cloudkick.com/oauth/list_accounts/""); ArrayList values = new ArrayList(2); values.add(new BasicNameValuePair(""user"", user)); values.add(new BasicNameValuePair(""password"", pass)); post.setEntity(new UrlEncodedFormEntity(values)); HttpResponse response = client.execute(post); statusCode = response.getStatusLine().getStatusCode(); InputStream is = response.getEntity().getContent(); BufferedReader rd = new BufferedReader(new InputStreamReader(is)); String line; while ((line = rd.readLine()) != null) { accounts.add(line); Log.i(""LoginActivity"", line); } } catch (Exception e) { e.printStackTrace(); statusCode = 0; } return accounts; } @Override protected void onPostExecute(ArrayList accounts) { switch (statusCode) { case 200: if (accounts.size() == 1) { new KeyRetriever().execute(accounts.get(0)); } else { String[] tmpAccountArray = new String[accounts.size()]; final String[] accountArray = accounts.toArray(tmpAccountArray); AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this); builder.setTitle(""Select an Account""); builder.setItems(accountArray, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { new KeyRetriever().execute(accountArray[item]); } }); AlertDialog selectAccount = builder.create(); selectAccount.show(); } break; case 400: progress.dismiss(); if (accounts.get(0).equals(""You have enabled multi factor authentication for this account. To access the API key list, please visit the website."")) { AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this); builder.setTitle(""MFA is Enabled""); String mfaMessage = (""You appear to have multi-factor authentication enabled on your account. "" + ""You will need to manually create an API key with read permissions in the "" + ""web interface, then enter it directly in the settings panel.""); builder.setMessage(mfaMessage); builder.setPositiveButton(""Settings"", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Intent settingsActivity = new Intent(getBaseContext(), Preferences.class); startActivityForResult(settingsActivity, SETTINGS_ACTIVITY_ID); } }); AlertDialog mfaDialog = builder.create(); mfaDialog.show(); } else { Toast.makeText(LoginActivity.this, ""Invalid Username or Password"", Toast.LENGTH_LONG).show(); } break; default: progress.dismiss(); Toast.makeText(LoginActivity.this, ""An Error Occurred Retrieving Your Accounts"", Toast.LENGTH_LONG).show(); }; } } private class KeyRetriever extends AsyncTask{ private Integer statusCode = null; @Override protected String[] doInBackground(String...accts) { Log.i(""LoginActivity"", ""Selected Account: "" + accts[0]); String[] creds = new String[2]; try { HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost(""https://www.cloudkick.com/oauth/create_consumer/""); ArrayList values = new ArrayList(2); values.add(new BasicNameValuePair(""user"", user)); values.add(new BasicNameValuePair(""password"", pass)); values.add(new BasicNameValuePair(""account"", accts[0])); values.add(new BasicNameValuePair(""system"", ""Cloudkick for Android"")); values.add(new BasicNameValuePair(""perm_read"", ""True"")); values.add(new BasicNameValuePair(""perm_write"", ""False"")); values.add(new BasicNameValuePair(""perm_execute"", ""False"")); post.setEntity(new UrlEncodedFormEntity(values)); HttpResponse response = client.execute(post); statusCode = response.getStatusLine().getStatusCode(); Log.i(""LoginActivity"", ""Return Code: "" + statusCode); InputStream is = response.getEntity().getContent(); BufferedReader rd = new BufferedReader(new InputStreamReader(is)); String line; for (int i = 0; i < 2; i++) { line = rd.readLine(); if (line == null) { return creds; } creds[i] = line; } } catch (Exception e) { statusCode = 0; } return creds; } @Override protected void onPostExecute(String[] creds) { progress.dismiss(); if (statusCode != 200) { // Show short error messages - this is a dirty hack if (creds[0] != null && creds[0].startsWith(""User with role"")) { Toast.makeText(LoginActivity.this, creds[0], Toast.LENGTH_LONG).show(); } else { Toast.makeText(LoginActivity.this, ""An Error Occurred on Login"", Toast.LENGTH_LONG).show(); return; } } SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(LoginActivity.this); SharedPreferences.Editor editor = prefs.edit(); editor.putString(""editKey"", creds[0]); editor.putString(""editSecret"", creds[1]); editor.commit(); Intent result = new Intent(); result.putExtra(""login"", true); setResult(Activity.RESULT_OK, result); LoginActivity.this.finish(); } } } ",0 "ree of charge, to any person obtaining a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package reborncore.client.gui.slots; import net.minecraft.inventory.Inventory; import net.minecraft.item.ItemStack; public class SlotFake extends BaseSlot { public boolean mCanInsertItem; public boolean mCanStackItem; public int mMaxStacksize = 127; public SlotFake(Inventory itemHandler, int par2, int par3, int par4, boolean aCanInsertItem, boolean aCanStackItem, int aMaxStacksize) { super(itemHandler, par2, par3, par4); this.mCanInsertItem = aCanInsertItem; this.mCanStackItem = aCanStackItem; this.mMaxStacksize = aMaxStacksize; } @Override public boolean canInsert(ItemStack par1ItemStack) { return this.mCanInsertItem; } @Override public int getMaxStackAmount() { return this.mMaxStacksize; } @Override public boolean hasStack() { return false; } @Override public ItemStack takeStack(int par1) { return !this.mCanStackItem ? ItemStack.EMPTY : super.takeStack(par1); } @Override public boolean canWorldBlockRemove() { return false; } } ",0 " $result_response = process_request($_GET[""length""],$_GET[""width""],$_GET[""rent_type""]); //make this a hash so you can access the values with a string $db = $result_response[0]; $num_results = count($db); $request_sent=true; $width = $result_response[1]; $length=$result_response[2]; $rent_type=$result_response[3]; } ?>

          Available Units:

          20){;?>

          Search For Prices and Units










          ",0 "can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* * \file cast5.c * \author Daniel Otte * \email bg@nerilex.org * \date 2006-07-26 * \par License: * GPLv3 or later * \brief Implementation of the CAST5 (aka CAST-128) cipher algorithm as described in RFC 2144 * */ #include #include #include ""cast5.h"" #include #undef DEBUG #ifdef DEBUG #include ""cli.h"" #endif #include ""cast5-sbox.h"" #define S5(x) pgm_read_dword(&s5[(x)]) #define S6(x) pgm_read_dword(&s6[(x)]) #define S7(x) pgm_read_dword(&s7[(x)]) #define S8(x) pgm_read_dword(&s8[(x)]) static void cast5_init_A(uint8_t *dest, uint8_t *src, bool bmode) { uint8_t mask = bmode ? 0x8 : 0; *((uint32_t*) (&dest[0x0])) = *((uint32_t*) (&src[0x0 ^ mask])) ^ S5(src[0xD ^ mask]) ^ S6(src[0xF ^ mask]) ^ S7(src[0xC ^ mask]) ^ S8(src[0xE ^ mask]) ^ S7(src[0x8 ^ mask]); *((uint32_t*) (&dest[0x4])) = *((uint32_t*) (&src[0x8 ^ mask])) ^ S5(dest[0x0]) ^ S6(dest[0x2]) ^ S7(dest[0x1]) ^ S8(dest[0x3]) ^ S8(src[0xA ^ mask]); *((uint32_t*) (&dest[0x8])) = *((uint32_t*) (&src[0xC ^ mask])) ^ S5(dest[0x7]) ^ S6(dest[0x6]) ^ S7(dest[0x5]) ^ S8(dest[0x4]) ^ S5(src[0x9 ^ mask]); *((uint32_t*) (&dest[0xC])) = *((uint32_t*) (&src[0x4 ^ mask])) ^ S5(dest[0xA]) ^ S6(dest[0x9]) ^ S7(dest[0xB]) ^ S8(dest[0x8]) ^ S6(src[0xB ^ mask]); } static void cast5_init_M(uint8_t *dest, uint8_t *src, bool nmode, bool xmode) { uint8_t nmt[] = { 0xB, 0xA, 0x9, 0x8, 0xF, 0xE, 0xD, 0xC, 0x3, 0x2, 0x1, 0x0, 0x7, 0x6, 0x5, 0x4 }; /* nmode table */ uint8_t xmt[4][4] = { { 0x2, 0x6, 0x9, 0xC }, { 0x8, 0xD, 0x3, 0x7 }, { 0x3, 0x7, 0x8, 0xD }, { 0x9, 0xC, 0x2, 0x6 } }; #define NMT(x) (src[nmode?nmt[(x)]:(x)]) #define XMT(x) (src[xmt[(xmode<<1) + nmode][(x)]]) *((uint32_t*) (&dest[0x0])) = S5(NMT(0x8)) ^ S6(NMT(0x9)) ^ S7(NMT(0x7)) ^ S8(NMT(0x6)) ^ S5(XMT(0)); *((uint32_t*) (&dest[0x4])) = S5(NMT(0xA)) ^ S6(NMT(0xB)) ^ S7(NMT(0x5)) ^ S8(NMT(0x4)) ^ S6(XMT(1)); *((uint32_t*) (&dest[0x8])) = S5(NMT(0xC)) ^ S6(NMT(0xD)) ^ S7(NMT(0x3)) ^ S8(NMT(0x2)) ^ S7(XMT(2)); *((uint32_t*) (&dest[0xC])) = S5(NMT(0xE)) ^ S6(NMT(0xF)) ^ S7(NMT(0x1)) ^ S8(NMT(0x0)) ^ S8(XMT(3)); } #define S5B(x) pgm_read_byte(3+(uint8_t*)(&s5[(x)])) #define S6B(x) pgm_read_byte(3+(uint8_t*)(&s6[(x)])) #define S7B(x) pgm_read_byte(3+(uint8_t*)(&s7[(x)])) #define S8B(x) pgm_read_byte(3+(uint8_t*)(&s8[(x)])) static void cast5_init_rM(uint8_t *klo, uint8_t *khi, uint8_t offset, uint8_t *src, bool nmode, bool xmode) { uint8_t nmt[] = { 0xB, 0xA, 0x9, 0x8, 0xF, 0xE, 0xD, 0xC, 0x3, 0x2, 0x1, 0x0, 0x7, 0x6, 0x5, 0x4 }; /* nmode table */ uint8_t xmt[4][4] = { { 0x2, 0x6, 0x9, 0xC }, { 0x8, 0xD, 0x3, 0x7 }, { 0x3, 0x7, 0x8, 0xD }, { 0x9, 0xC, 0x2, 0x6 } }; uint8_t t, h = 0; t = S5B(NMT(0x8)) ^ S6B(NMT(0x9)) ^ S7B(NMT(0x7)) ^ S8B(NMT(0x6)) ^ S5B(XMT(0)); klo[offset * 2] |= (t & 0x0f); h |= (t & 0x10); h >>= 1; t = S5B(NMT(0xA)) ^ S6B(NMT(0xB)) ^ S7B(NMT(0x5)) ^ S8B(NMT(0x4)) ^ S6B(XMT(1)); klo[offset * 2] |= (t << 4) & 0xf0; h |= t & 0x10; h >>= 1; t = S5B(NMT(0xC)) ^ S6B(NMT(0xD)) ^ S7B(NMT(0x3)) ^ S8B(NMT(0x2)) ^ S7B(XMT(2)); klo[offset * 2 + 1] |= t & 0xf; h |= t & 0x10; h >>= 1; t = S5B(NMT(0xE)) ^ S6B(NMT(0xF)) ^ S7B(NMT(0x1)) ^ S8B(NMT(0x0)) ^ S8B(XMT(3)); klo[offset * 2 + 1] |= t << 4; h |= t & 0x10; h >>= 1; #ifdef DEBUG cli_putstr(""\r\n\t h=""); cli_hexdump(&h,1); #endif khi[offset >> 1] |= h << ((offset & 0x1) ? 4 : 0); } #define S_5X(s) pgm_read_dword(&s5[BPX[(s)]]) #define S_6X(s) pgm_read_dword(&s6[BPX[(s)]]) #define S_7X(s) pgm_read_dword(&s7[BPX[(s)]]) #define S_8X(s) pgm_read_dword(&s8[BPX[(s)]]) #define S_5Z(s) pgm_read_dword(&s5[BPZ[(s)]]) #define S_6Z(s) pgm_read_dword(&s6[BPZ[(s)]]) #define S_7Z(s) pgm_read_dword(&s7[BPZ[(s)]]) #define S_8Z(s) pgm_read_dword(&s8[BPZ[(s)]]) void cast5_init(const void *key, uint16_t keylength_b, cast5_ctx_t *s) { /* we migth return if the key is valid and if setup was successful */ uint32_t x[4], z[4]; #define BPX ((uint8_t*)&(x[0])) #define BPZ ((uint8_t*)&(z[0])) s->shortkey = (keylength_b <= 80); /* littel endian only! */ memset(&(x[0]), 0, 16); /* set x to zero */ if (keylength_b > 128) keylength_b = 128; memcpy(&(x[0]), key, (keylength_b + 7) / 8); /* todo: merge a and b and compress the whole stuff */ /***** A *****/ cast5_init_A((uint8_t*) (&z[0]), (uint8_t*) (&x[0]), false); /***** M *****/ cast5_init_M((uint8_t*) (&(s->mask[0])), (uint8_t*) (&z[0]), false, false); /***** B *****/ cast5_init_A((uint8_t*) (&x[0]), (uint8_t*) (&z[0]), true); /***** N *****/ cast5_init_M((uint8_t*) (&(s->mask[4])), (uint8_t*) (&x[0]), true, false); /***** A *****/ cast5_init_A((uint8_t*) (&z[0]), (uint8_t*) (&x[0]), false); /***** N' *****/ cast5_init_M((uint8_t*) (&(s->mask[8])), (uint8_t*) (&z[0]), true, true); /***** B *****/ cast5_init_A((uint8_t*) (&x[0]), (uint8_t*) (&z[0]), true); /***** M' *****/ cast5_init_M((uint8_t*) (&(s->mask[12])), (uint8_t*) (&x[0]), false, true); /* that were the masking keys, now the rotation keys */ /* set the keys to zero */ memset(&(s->rotl[0]), 0, 8); s->roth[0] = s->roth[1] = 0; /***** A *****/ cast5_init_A((uint8_t*) (&z[0]), (uint8_t*) (&x[0]), false); /***** M *****/ cast5_init_rM(&(s->rotl[0]), &(s->roth[0]), 0, (uint8_t*) (&z[0]), false, false); /***** B *****/ cast5_init_A((uint8_t*) (&x[0]), (uint8_t*) (&z[0]), true); /***** N *****/ cast5_init_rM(&(s->rotl[0]), &(s->roth[0]), 1, (uint8_t*) (&x[0]), true, false); /***** A *****/ cast5_init_A((uint8_t*) (&z[0]), (uint8_t*) (&x[0]), false); /***** N' *****/ cast5_init_rM(&(s->rotl[0]), &(s->roth[0]), 2, (uint8_t*) (&z[0]), true, true); /***** B *****/ cast5_init_A((uint8_t*) (&x[0]), (uint8_t*) (&z[0]), true); /***** M' *****/ cast5_init_rM(&(s->rotl[0]), &(s->roth[0]), 3, (uint8_t*) (&x[0]), false, true); /* done ;-) */ } /********************************************************************************************************/ #define ROTL32(a,n) ((a)<<(n) | (a)>>(32-(n))) #define CHANGE_ENDIAN32(x) ((x)<<24 | (x)>>24 | ((x)&0xff00)<<8 | ((x)&0xff0000)>>8 ) typedef uint32_t cast5_f_t(uint32_t, uint32_t, uint8_t); #define IA 3 #define IB 2 #define IC 1 #define ID 0 static uint32_t cast5_f1(uint32_t d, uint32_t m, uint8_t r) { uint32_t t; t = ROTL32((d + m), r); #ifdef DEBUG uint32_t ia,ib,ic,id; cli_putstr(""\r\n f1(""); cli_hexdump(&d, 4); cli_putc(','); cli_hexdump(&m , 4); cli_putc(','); cli_hexdump(&r, 1);cli_putstr(""): I=""); cli_hexdump(&t, 4); ia = pgm_read_dword(&s1[((uint8_t*)&t)[IA]] ); ib = pgm_read_dword(&s2[((uint8_t*)&t)[IB]] ); ic = pgm_read_dword(&s3[((uint8_t*)&t)[IC]] ); id = pgm_read_dword(&s4[((uint8_t*)&t)[ID]] ); cli_putstr(""\r\n\tIA=""); cli_hexdump(&ia, 4); cli_putstr(""\r\n\tIB=""); cli_hexdump(&ib, 4); cli_putstr(""\r\n\tIC=""); cli_hexdump(&ic, 4); cli_putstr(""\r\n\tID=""); cli_hexdump(&id, 4); return (((ia ^ ib) - ic) + id); #else return ((( pgm_read_dword(&s1[((uint8_t*)&t)[IA]]) ^ pgm_read_dword(&s2[((uint8_t*)&t)[IB]])) - pgm_read_dword(&s3[((uint8_t*)&t)[IC]])) + pgm_read_dword(&s4[((uint8_t*)&t)[ID]])); #endif } static uint32_t cast5_f2(uint32_t d, uint32_t m, uint8_t r) { uint32_t t; t = ROTL32((d ^ m), r); #ifdef DEBUG uint32_t ia,ib,ic,id; cli_putstr(""\r\n f2(""); cli_hexdump(&d, 4); cli_putc(','); cli_hexdump(&m , 4); cli_putc(','); cli_hexdump(&r, 1);cli_putstr(""): I=""); cli_hexdump(&t, 4); ia = pgm_read_dword(&s1[((uint8_t*)&t)[IA]] ); ib = pgm_read_dword(&s2[((uint8_t*)&t)[IB]] ); ic = pgm_read_dword(&s3[((uint8_t*)&t)[IC]] ); id = pgm_read_dword(&s4[((uint8_t*)&t)[ID]] ); cli_putstr(""\r\n\tIA=""); cli_hexdump(&ia, 4); cli_putstr(""\r\n\tIB=""); cli_hexdump(&ib, 4); cli_putstr(""\r\n\tIC=""); cli_hexdump(&ic, 4); cli_putstr(""\r\n\tID=""); cli_hexdump(&id, 4); return (((ia - ib) + ic) ^ id); #else return ((( pgm_read_dword(&s1[((uint8_t*)&t)[IA]]) - pgm_read_dword(&s2[((uint8_t*)&t)[IB]])) + pgm_read_dword(&s3[((uint8_t*)&t)[IC]])) ^ pgm_read_dword(&s4[((uint8_t*)&t)[ID]])); #endif } static uint32_t cast5_f3(uint32_t d, uint32_t m, uint8_t r) { uint32_t t; t = ROTL32((m - d), r); #ifdef DEBUG uint32_t ia,ib,ic,id; cli_putstr(""\r\n f3(""); cli_hexdump(&d, 4); cli_putc(','); cli_hexdump(&m , 4); cli_putc(','); cli_hexdump(&r, 1);cli_putstr(""): I=""); cli_hexdump(&t, 4); ia = pgm_read_dword(&s1[((uint8_t*)&t)[IA]] ); ib = pgm_read_dword(&s2[((uint8_t*)&t)[IB]] ); ic = pgm_read_dword(&s3[((uint8_t*)&t)[IC]] ); id = pgm_read_dword(&s4[((uint8_t*)&t)[ID]] ); cli_putstr(""\r\n\tIA=""); cli_hexdump(&ia, 4); cli_putstr(""\r\n\tIB=""); cli_hexdump(&ib, 4); cli_putstr(""\r\n\tIC=""); cli_hexdump(&ic, 4); cli_putstr(""\r\n\tID=""); cli_hexdump(&id, 4); return (((ia + ib) ^ ic) - id); #else return (( pgm_read_dword(&s1[((uint8_t*)&t)[IA]] ) + pgm_read_dword(&s2[((uint8_t*)&t)[IB]])) ^ pgm_read_dword(&s3[((uint8_t*)&t)[IC]])) - pgm_read_dword(&s4[((uint8_t*)&t)[ID]]); #endif } /******************************************************************************/ void cast5_enc(void *block, const cast5_ctx_t *s) { uint32_t l, r, x, y; uint8_t i; cast5_f_t *f[] = { cast5_f1, cast5_f2, cast5_f3 }; l = ((uint32_t*) block)[0]; r = ((uint32_t*) block)[1]; // cli_putstr(""\r\n round[-1] = ""); // cli_hexdump(&r, 4); for (i = 0; i < (s->shortkey ? 12 : 16); ++i) { x = r; y = (f[i % 3])(CHANGE_ENDIAN32(r), CHANGE_ENDIAN32(s->mask[i]), (((s->roth[i >> 3]) & (1 << (i & 0x7))) ? 0x10 : 0x00) + (((s->rotl[i >> 1]) >> ((i & 1) ? 4 : 0)) & 0x0f)); r = l ^ CHANGE_ENDIAN32(y); // cli_putstr(""\r\n round[""); DEBUG_B(i); cli_putstr(""] = ""); // cli_hexdump(&r, 4); l = x; } ((uint32_t*) block)[0] = r; ((uint32_t*) block)[1] = l; } /******************************************************************************/ void cast5_dec(void *block, const cast5_ctx_t *s) { uint32_t l, r, x, y; int8_t i, rounds; cast5_f_t *f[] = { cast5_f1, cast5_f2, cast5_f3 }; l = ((uint32_t*) block)[0]; r = ((uint32_t*) block)[1]; rounds = (s->shortkey ? 12 : 16); for (i = rounds - 1; i >= 0; --i) { x = r; y = (f[i % 3])(CHANGE_ENDIAN32(r), CHANGE_ENDIAN32(s->mask[i]), (((s->roth[i >> 3]) & (1 << (i & 0x7))) ? 0x10 : 0x00) + (((s->rotl[i >> 1]) >> ((i & 1) ? 4 : 0)) & 0x0f)); r = l ^ CHANGE_ENDIAN32(y); l = x; } ((uint32_t*) block)[0] = r; ((uint32_t*) block)[1] = l; } /******************************************************************************/ ",0 "序开发过程中的学习笔记
            {% for post in paginator.posts %}
          • {{ post.title }}

            {{ post.date | date: ""%F"" }}
            {% if post.author %}{{ post.author }} {% endif %}
            {% if page.meta %}{{ page.meta }} {% endif %}
            {% include category.html %}
            {% include tag.html %}
            {{post.excerpt}}

          • {% endfor %}
          {% if paginator.previous_page %} {% else %} {% endif %} {{ paginator.page }}/{{ paginator.total_pages }} {% if paginator.next_page %} {% else %} {% endif %}
          Recent Posts
            {% for post in site.posts offset: 0 limit: 10 %}
          • {{ post.title }}
          • {% endfor %}
          Categories
          Tags
          {% assign first = site.tags.first %} {% assign max = first[1].size %} {% assign min = max %} {% for tag in site.tags offset:1 %} {% if tag[1].size > max %} {% assign max = tag[1].size %} {% elsif tag[1].size < min %} {% assign min = tag[1].size %} {% endif %} {% endfor %} {% if max == min %} {% assign diff = 1 %} {% else %} {% assign diff = max | minus: min %} {% endif %} {% for tag in site.tags %} {% assign temp = tag[1].size | minus: min | times: 36 | divided_by: diff %} {% assign base = temp | divided_by: 4 %} {% assign remain = temp | modulo: 4 %} {% if remain == 0 %} {% assign size = base | plus: 9 %} {% elsif remain == 1 or remain == 2 %} {% assign size = base | plus: 9 | append: '.5' %} {% else %} {% assign size = base | plus: 10 %} {% endif %} {% if remain == 0 or remain == 1 %} {% assign color = 9 | minus: base %} {% else %} {% assign color = 8 | minus: base %} {% endif %} {{ tag[0] }} {% endfor %}
          ",0 "f the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * ""Shopware"" is a registered trademark of shopware AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ namespace Shopware\Bundle\PluginInstallerBundle\Struct; /** * Class CommentStruct * @package Shopware\Bundle\PluginInstallerBundle\Struct */ class CommentStruct implements \JsonSerializable { /** * @var string */ private $author; /** * @var string */ private $text; /** * @var string */ private $headline; /** * @var int */ private $rating; /** * @var \DateTime */ private $creationDate = null; /** * @inheritdoc */ public function jsonSerialize() { return get_object_vars($this); } /** * @return string */ public function getAuthor() { return $this->author; } /** * @param string $author */ public function setAuthor($author) { $this->author = $author; } /** * @return string */ public function getText() { return $this->text; } /** * @param string $text */ public function setText($text) { $this->text = $text; } /** * @return string */ public function getHeadline() { return $this->headline; } /** * @param string $headline */ public function setHeadline($headline) { $this->headline = $headline; } /** * @return int */ public function getRating() { return $this->rating; } /** * @param int $rating */ public function setRating($rating) { $this->rating = $rating; } /** * @return \DateTime */ public function getCreationDate() { return $this->creationDate; } /** * @param \DateTime $creationDate */ public function setCreationDate(\DateTime $creationDate) { $this->creationDate = $creationDate; } } ",0 "/** * The collection of Swift Messages. * * @var \Illuminate\Support\Collection */ protected $messages; /** * Create a new array transport instance. * * @return void */ public function __construct() { $this->messages = new Collection; } /** * {@inheritdoc} */ public function send(Swift_Mime_Message $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $this->messages[] = $message; return $this->numberOfRecipients($message); } /** * Retrieve the collection of messages. * * @return \Illuminate\Support\Collection */ public function messages() { return $this->messages; } /** * Clear all of the messages from the local collection. * * @return void */ public function flush() { return $this->messages = new Collection; } } ",0 "is 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. */ #pragma once #ifndef _GAME_OBJECT_DEBUG_DEFS_H #define _GAME_OBJECT_DEBUG_DEFS_H /********************** * System Includes * ***********************/ /************************* * 3rd Party Includes * **************************/ /*************************** * Game Engine Includes * ****************************/ /************** * Defines * ***************/ /// /// Name for Basic Colro Material in Visualizer /// #define AE_GOD_V_BASIC_COLOR_MAT_NAME ""AE GOD V Basic Color Material"" /// /// Name for Basic Line Material in Visualizer /// #define AE_GOD_V_BASIC_LINE_MAT_NAME ""AE GOD V Basic Line Material"" /// /// Name for Diffuse Texture Basic Material in Visualizer /// #define AE_GOD_V_DIFFUSE_TEXTURE_BASIC_MAT_NAME ""AE GOD V Diffuse Texture Basic Material"" /// /// Name for Directional Light Icon Texture /// #define AE_GOD_DIRECTIONAL_LIGHT_ICON_TEXTURE_NAME ""AE Directional Light Icon"" /// /// Name for Omni Light Icon Texture /// #define AE_GOD_OMNI_LIGHT_ICON_TEXTURE_NAME ""AE Omni Light Icon"" /// /// Name for Spot Light Icon Texture /// #define AE_GOD_SPOT_LIGHT_ICON_TEXTURE_NAME ""AE Spot Light Icon"" /// /// Name for Camera Icon Texture /// #define AE_GOD_CAMERA_ICON_TEXTURE_NAME ""AE Camera Icon"" /// /// File path for Directional Light Icon Texture /// #define AE_GOD_DIRECTIONAL_LIGHT_ICON_PATH AE_Base_FS_PATH ""Data\\Textures\\DirLightIcon.dds"" /// /// File path for Omni Light Icon Texture /// #define AE_GOD_OMNI_LIGHT_ICON_PATH AE_Base_FS_PATH ""Data\\Textures\\OmniLightIcon.dds"" /// /// File path for Spot Light Icon Texture /// #define AE_GOD_SPOT_LIGHT_ICON_PATH AE_Base_FS_PATH ""Data\\Textures\\SpotLightIcon.dds"" /// /// File path for Camera Icon Texture /// #define AE_GOD_CAMERA_ICON_PATH AE_Base_FS_PATH ""Data\\Textures\\VideoCameraIcon.dds"" /// /// Scale Amount for Light Icons /// #define AE_LIGHT_ICONS_DEFAULT_SCALE_AMOUNT 0.5f /// /// Scale Amount for Directional Light Shape /// #define AE_LIGHT_SHAPE_DIR_DEFAULT_SCALE_AMOUNT 2.0f /************ * Using * *************/ /******************** * Forward Decls * *********************/ /**************** * Constants * *****************/ /****************** * Struct Decl * *******************/ struct GameObjectsDebugVisualizerConfig sealed : AEObject { bool m_CameraIconDrawEnabled = true; bool m_LightIconDrawEnabled = true; bool m_GameObjectDebugRenderEnabled = true; float m_LightIconScale = AE_LIGHT_ICONS_DEFAULT_SCALE_AMOUNT; float m_DirectionalLightShapeScale = AE_LIGHT_SHAPE_DIR_DEFAULT_SCALE_AMOUNT; GameObjectsDebugVisualizerConfig() { } }; #endif ",0 "form action="""" method=""POST"" NAME=f>
          User ID:
          "">

          Password:
          "" size=""20"">

          Confirm Password:
          "" size=""20"">
          email address (required):
          ""> Number of Days to show in side-bar:

          >Put me on the announcement mailing list (low volume)

          We can send you an email when something on your watch list changes.
          Send me, at most, one message per:

          account"" NAME=""submit"">
          ",0 "HPFHIR library (https://github.com/dcarbone/php-fhir) using * class definitions from HL7 FHIR (https://www.hl7.org/fhir/) * * Class creation date: December 26th, 2019 15:43+0000 * * PHPFHIR Copyright: * * Copyright 2016-2019 Daniel Carbone (daniel.p.carbone@gmail.com) * * 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. * * * FHIR Copyright Notice: * * Copyright (c) 2011-2013, HL7, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of HL7 nor the names of its contributors may be used to * endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * * Generated on Tue, Sep 30, 2014 18:08+1000 for FHIR v0.0.82 */ use PHPUnit\Framework\TestCase; use DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRBackboneElement\FHIRValueSet\FHIRValueSetConcept; /** * Class FHIRValueSetConceptTest * @package \DCarbone\PHPFHIRGenerated\DSTU1\PHPFHIRTests\FHIRElement\FHIRBackboneElement\FHIRValueSet */ class FHIRValueSetConceptTest extends TestCase { public function testCanConstructTypeNoArgs() { $type = new FHIRValueSetConcept(); $this->assertInstanceOf('\DCarbone\PHPFHIRGenerated\DSTU1\FHIRElement\FHIRBackboneElement\FHIRValueSet\FHIRValueSetConcept', $type); } } ",0 " else $content = $_GET[""eq""]; try { $values = split(';', $content); for ($i=0; $i < count($values); $i++) { $val = $values[$i]; if ($val == """") { $it = new Item(""en_US""); array_push($items, $it); } else { $val = sql_sanitize($val); $req = Item::get_standard_query(""en_US"") . "" AND wow_native_id = $val""; $res = db_ask($req); if (is_array($res) == false || count($res) <= 0) { $it = new Item(""en_US""); array_push($items, $it); } else { $it = Item::get_from_array($res[0]); array_push($items, $it); } } } if (count($items) < 11) return generate_default_items(); else return $items; } catch (Exception $e) { return generate_default_items(); } } function generate_default_items() { $items = array(); $i = new Item(""en_US""); array_push($items, $i); array_push($items, $i); array_push($items, $i); array_push($items, $i); array_push($items, $i); array_push($items, $i); array_push($items, $i); array_push($items, $i); array_push($items, $i); array_push($items, $i); array_push($items, $i); array_push($items, $i); return $items; } function generate_item_present($item, $slot) { $slotName = slot_name($slot); if ($item->id == -1) { $content = """"; $content .= ""$slotName(Click to equip an item)""; return $content; } else { $content = ""icon . "".jpg\""/>""; $content .= ""$slotNamegenerate_color_class_object() . ""\"">"" . $item->name . """"; return $content; } } ?> ",0 "C24XX DMA support - per SoC functions * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include extern struct bus_type dma_subsys; extern struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; #define DMA_CH_VALID (1<<31) #define DMA_CH_NEVER (1<<30) /* struct s3c24xx_dma_map * * this holds the mapping information for the channel selected * to be connected to the specified device */ struct s3c24xx_dma_map { const char *name; unsigned long channels[S3C_DMA_CHANNELS]; }; struct s3c24xx_dma_selection { struct s3c24xx_dma_map *map; unsigned long map_size; unsigned long dcon_mask; void (*select)(struct s3c2410_dma_chan *chan, struct s3c24xx_dma_map *map); }; extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); /* struct s3c24xx_dma_order_ch * * channel map for one of the `enum dma_ch` dma channels. the list * entry contains a set of low-level channel numbers, orred with * DMA_CH_VALID, which are checked in the order in the array. */ struct s3c24xx_dma_order_ch { unsigned int list[S3C_DMA_CHANNELS]; /* list of channels */ unsigned int flags; /* flags */ }; /* struct s3c24xx_dma_order * * information provided by either the core or the board to give the * dma system a hint on how to allocate channels */ struct s3c24xx_dma_order { struct s3c24xx_dma_order_ch channels[DMACH_MAX]; }; extern int s3c24xx_dma_order_set(struct s3c24xx_dma_order *map); /* DMA init code, called from the cpu support code */ extern int s3c2410_dma_init(void); extern int s3c24xx_dma_init(unsigned int channels, unsigned int irq, unsigned int stride); ",0 "ry.go(-1)"" class=""link-back"">Back

          Mental state examination Insight

          Things you should be assessing

          • Insight
          • Awareness of danger
          {% if data['lcwra']==='lcwra1'%} {% elif data['lcwra']==='lcwra2' or data['lcwra']==='lcwra3' or data['lcwra']==='lcwra4' or data['lcwra']==='lcwra6' or data['lcwra']==='lcwra7' or data['lcwra']==='lcwra8' or data['lcwra']==='lcwra9' or data['lcwra']==='lcwra10' or data['lcwra']==='lcwra11' or data['lcwra']==='lcwra12' or data['lcwra']==='lcwra13' or data['lcwra']==='lcwra14' or data['lcwra']==='lcwra15' or data['lcwra']==='lcwra16' or data['lcwra']==='lcwra17' or data['lcwra']==='lcwra18' or data['lcwra']==='lcwra19' or data['lcwra']==='lcwra20'%}
          {% else %}{% endif %}
          {% endblock %} {% block footer_top %} {% endblock %} {% block page_scripts %} {% endblock %} ",0 "<%=model.name%><%}%>
          "">

          Give

          Get

          ",0 " // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and // associated documentation files (the ""Software""), to deal in the Software without restriction, // including without limitation the rights to use, copy, modify, merge, publish, distribute, // sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or // substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT // NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -------------------------------------------------------------------------------------------------- package com.microsoft.Malmo.Utils; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.stats.StatBase; import net.minecraft.stats.StatFileWriter; import net.minecraft.stats.StatList; import net.minecraft.util.BlockPos; import net.minecraft.util.ResourceLocation; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; /** * Helper class for building the ""World data"" to be passed from Minecraft back to the agent.
          * This class contains helper methods to build up a JSON tree of useful information, such as health, XP, food levels, distance travelled, etc.etc.
          * It can also build up a grid of the block types around the player. * Call this on the Server side only. */ public class JSONWorldDataHelper { /** * Simple class to hold the dimensions of the environment around the player * that we want to return in the World Data.
          * Min and max define an inclusive range, where the player's feet are situated at (0,0,0) */ static public class ImmediateEnvironmentDimensions { public int xMin; public int xMax; public int yMin; public int yMax; public int zMin; public int zMax; /** * Default constructor asks for an environment just big enough to contain * the player and one block all around him. */ public ImmediateEnvironmentDimensions() { this.xMin = -1; this.xMax = 1; this.zMin = -1; this.zMax = 1; this.yMin = -1; this.yMax = 2; } /** * Convenient constructor - effectively specifies the margin around the player
          * Passing (1,1,1) will have the same effect as the default constructor. * @param xMargin number of blocks to the left and right of the player * @param yMargin number of blocks above and below player * @param zMargin number of blocks in front of and behind player */ public ImmediateEnvironmentDimensions(int xMargin, int yMargin, int zMargin) { this.xMin = -xMargin; this.xMax = xMargin; this.yMin = -yMargin; this.yMax = yMargin + 1; // +1 because the player is two blocks tall. this.zMin = -zMargin; this.zMax = zMargin; } /** * Convenient constructor for the case where all that is required is the flat patch of ground
          * around the player's feet. * @param xMargin number of blocks around the player in the x-axis * @param zMargin number of blocks around the player in the z-axis */ public ImmediateEnvironmentDimensions(int xMargin, int zMargin) { this.xMin = -xMargin; this.xMax = xMargin; this.yMin = -1; this.yMax = -1; // Flat patch of ground at the player's feet. this.zMin = -zMargin; this.zMax = zMargin; } }; /** Builds the basic achievement world data to be used as observation signals by the listener. * @param json a JSON object into which the achievement stats will be added. */ public static void buildAchievementStats(JsonObject json, EntityPlayerMP player) { StatFileWriter sfw = player.getStatFile(); json.addProperty(""DistanceTravelled"", sfw.readStat((StatBase)StatList.distanceWalkedStat) + sfw.readStat((StatBase)StatList.distanceSwumStat) + sfw.readStat((StatBase)StatList.distanceDoveStat) + sfw.readStat((StatBase)StatList.distanceFallenStat) ); // TODO: there are many other ways of moving! json.addProperty(""TimeAlive"", sfw.readStat((StatBase)StatList.timeSinceDeathStat)); json.addProperty(""MobsKilled"", sfw.readStat((StatBase)StatList.mobKillsStat)); json.addProperty(""DamageTaken"", sfw.readStat((StatBase)StatList.damageTakenStat)); /* Other potential reinforcement signals that may be worth researching: json.addProperty(""BlocksDestroyed"", sfw.readStat((StatBase)StatList.objectBreakStats) - but objectBreakStats is an array of 32000 StatBase objects - indexed by block type.); json.addProperty(""Blocked"", ev.player.isMovementBlocked()) - but isMovementBlocker() is a protected method (can get round this with reflection) */ } /** Builds the basic life world data to be used as observation signals by the listener. * @param json a JSON object into which the life stats will be added. */ public static void buildLifeStats(JsonObject json, EntityPlayerMP player) { json.addProperty(""Life"", player.getHealth()); json.addProperty(""Score"", player.getScore()); // Might always be the same as XP? json.addProperty(""Food"", player.getFoodStats().getFoodLevel()); json.addProperty(""XP"", player.experienceTotal); json.addProperty(""IsAlive"", !player.isDead); json.addProperty(""Air"", player.getAir()); } /** Builds the player position data to be used as observation signals by the listener. * @param json a JSON object into which the positional information will be added. */ public static void buildPositionStats(JsonObject json, EntityPlayerMP player) { json.addProperty(""XPos"", player.posX); json.addProperty(""YPos"", player.posY); json.addProperty(""ZPos"", player.posZ); json.addProperty(""Pitch"", player.rotationPitch); json.addProperty(""Yaw"", player.rotationYaw); } /** * Build a signal for the cubic block grid centred on the player.
          * Default is 3x3x4. (One cube all around the player.)
          * Blocks are returned as a 1D array, in order * along the x, then z, then y axes.
          * Data will be returned in an array called ""Cells"" * @param json a JSON object into which the info for the object under the mouse will be added. * @param environmentDimensions object which specifies the required dimensions of the grid to be returned. * @param jsonName name to use for identifying the returned JSON array. */ public static void buildGridData(JsonObject json, ImmediateEnvironmentDimensions environmentDimensions, EntityPlayerMP player, String jsonName) { if (player == null || json == null) return; JsonArray arr = new JsonArray(); BlockPos pos = player.getPosition(); for (int y = environmentDimensions.yMin; y <= environmentDimensions.yMax; y++) { for (int z = environmentDimensions.zMin; z <= environmentDimensions.zMax; z++) { for (int x = environmentDimensions.xMin; x <= environmentDimensions.xMax; x++) { BlockPos p = pos.add(x, y, z); String name = """"; IBlockState state = player.worldObj.getBlockState(p); Object blockName = Block.blockRegistry.getNameForObject(state.getBlock()); if (blockName instanceof ResourceLocation) { name = ((ResourceLocation)blockName).getResourcePath(); } JsonElement element = new JsonPrimitive(name); arr.add(element); } } } json.add(jsonName, arr); } } ",0 " getModificationDateTime()); echo $date->format('d/m/Y H:i:s'); ?> getFormattedStatus();?> getComment();?> Users->__toString() ;?> count() == 5 ) : ?>   "" href=""""> ",0 "de #include #include #include #include ""glut_wrap.h"" static GLfloat Diffuse[4] = { 0.5, 0.5, 1.0, 1.0 }; static GLfloat Specular[4] = { 0.8, 0.8, 0.8, 1.0 }; static GLfloat LightPos[4] = { 0.0, 10.0, 20.0, 1.0 }; static GLfloat Delta = 1.0; static GLuint FragProg; static GLuint VertProg; static GLboolean Anim = GL_TRUE; static GLboolean Wire = GL_FALSE; static GLboolean PixelLight = GL_TRUE; static GLint Win; static GLfloat Xrot = 0, Yrot = 0; #define NAMED_PARAMETER4FV(prog, name, v) \ glProgramNamedParameter4fvNV(prog, strlen(name), (const GLubyte *) name, v) static void Display( void ) { glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); if (PixelLight) { #if defined(GL_NV_fragment_program) NAMED_PARAMETER4FV(FragProg, ""LightPos"", LightPos); glEnable(GL_FRAGMENT_PROGRAM_NV); glEnable(GL_VERTEX_PROGRAM_NV); #endif glDisable(GL_LIGHTING); } else { glLightfv(GL_LIGHT0, GL_POSITION, LightPos); #if defined(GL_NV_fragment_program) glDisable(GL_FRAGMENT_PROGRAM_NV); glDisable(GL_VERTEX_PROGRAM_NV); #endif glEnable(GL_LIGHTING); } glPushMatrix(); glRotatef(Xrot, 1, 0, 0); glRotatef(Yrot, 0, 1, 0); #if 1 glutSolidSphere(2.0, 10, 5); #else { GLUquadricObj *q = gluNewQuadric(); gluQuadricNormals(q, GL_SMOOTH); gluQuadricTexture(q, GL_TRUE); glRotatef(90, 1, 0, 0); glTranslatef(0, 0, -1); gluCylinder(q, 1.0, 1.0, 2.0, 24, 1); gluDeleteQuadric(q); } #endif glPopMatrix(); glutSwapBuffers(); } static void Idle(void) { LightPos[0] += Delta; if (LightPos[0] > 25.0) Delta = -1.0; else if (LightPos[0] <- 25.0) Delta = 1.0; glutPostRedisplay(); } static void Reshape( int width, int height ) { glViewport( 0, 0, width, height ); glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 ); /*glOrtho( -2.0, 2.0, -2.0, 2.0, 5.0, 25.0 );*/ glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); glTranslatef( 0.0, 0.0, -15.0 ); } static void Key( unsigned char key, int x, int y ) { (void) x; (void) y; switch (key) { case ' ': Anim = !Anim; if (Anim) glutIdleFunc(Idle); else glutIdleFunc(NULL); break; case 'x': LightPos[0] -= 1.0; break; case 'X': LightPos[0] += 1.0; break; case 'w': Wire = !Wire; if (Wire) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); else glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); break; case 'p': PixelLight = !PixelLight; if (PixelLight) { printf(""Per-pixel lighting\n""); } else { printf(""Conventional lighting\n""); } break; case 27: glutDestroyWindow(Win); exit(0); } glutPostRedisplay(); } static void SpecialKey( int key, int x, int y ) { const GLfloat step = 3.0; (void) x; (void) y; switch (key) { case GLUT_KEY_UP: Xrot -= step; break; case GLUT_KEY_DOWN: Xrot += step; break; case GLUT_KEY_LEFT: Yrot -= step; break; case GLUT_KEY_RIGHT: Yrot += step; break; } glutPostRedisplay(); } static void Init( void ) { static const char *fragProgramText = ""!!FP1.0\n"" ""DECLARE Diffuse; \n"" ""DECLARE Specular; \n"" ""DECLARE LightPos; \n"" ""# Compute normalized LightPos, put it in R0\n"" ""DP3 R0.x, LightPos, LightPos;\n"" ""RSQ R0.y, R0.x;\n"" ""MUL R0, LightPos, R0.y;\n"" ""# Compute normalized normal, put it in R1\n"" ""DP3 R1, f[TEX0], f[TEX0]; \n"" ""RSQ R1.y, R1.x;\n"" ""MUL R1, f[TEX0], R1.y;\n"" ""# Compute dot product of light direction and normal vector\n"" ""DP3_SAT R2, R0, R1;"" ""MUL R3, Diffuse, R2; # diffuse attenuation\n"" ""POW R4, R2.x, {20.0}.x; # specular exponent\n"" ""MUL R5, Specular, R4; # specular attenuation\n"" ""ADD o[COLR], R3, R5; # add diffuse and specular colors\n"" ""END \n"" ; static const char *vertProgramText = ""!!VP1.0\n"" ""# typical modelview/projection transform\n"" ""DP4 o[HPOS].x, c[0], v[OPOS] ;\n"" ""DP4 o[HPOS].y, c[1], v[OPOS] ;\n"" ""DP4 o[HPOS].z, c[2], v[OPOS] ;\n"" ""DP4 o[HPOS].w, c[3], v[OPOS] ;\n"" ""# transform normal by inv transpose of modelview, put in tex0\n"" ""DP3 o[TEX0].x, c[4], v[NRML] ;\n"" ""DP3 o[TEX0].y, c[5], v[NRML] ;\n"" ""DP3 o[TEX0].z, c[6], v[NRML] ;\n"" ""DP3 o[TEX0].w, c[7], v[NRML] ;\n"" ""END\n""; ; if (!glutExtensionSupported(""GL_NV_vertex_program"")) { printf(""Sorry, this demo requires GL_NV_vertex_program\n""); exit(1); } if (!glutExtensionSupported(""GL_NV_fragment_program"")) { printf(""Sorry, this demo requires GL_NV_fragment_program\n""); exit(1); } #if defined(GL_NV_fragment_program) glGenProgramsNV(1, &FragProg); assert(FragProg > 0); glGenProgramsNV(1, &VertProg); assert(VertProg > 0); /* * Fragment program */ glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, FragProg, strlen(fragProgramText), (const GLubyte *) fragProgramText); assert(glIsProgramNV(FragProg)); glBindProgramNV(GL_FRAGMENT_PROGRAM_NV, FragProg); NAMED_PARAMETER4FV(FragProg, ""Diffuse"", Diffuse); NAMED_PARAMETER4FV(FragProg, ""Specular"", Specular); /* * Vertex program */ glLoadProgramNV(GL_VERTEX_PROGRAM_NV, VertProg, strlen(vertProgramText), (const GLubyte *) vertProgramText); assert(glIsProgramNV(VertProg)); glBindProgramNV(GL_VERTEX_PROGRAM_NV, VertProg); glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 0, GL_MODELVIEW_PROJECTION_NV, GL_IDENTITY_NV); glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MODELVIEW, GL_INVERSE_TRANSPOSE_NV); #endif /* * Misc init */ glClearColor(0.3, 0.3, 0.3, 0.0); glEnable(GL_DEPTH_TEST); glEnable(GL_LIGHT0); glEnable(GL_LIGHTING); glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Diffuse); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Specular); glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 20.0); printf(""GL_RENDERER = %s\n"", (char *) glGetString(GL_RENDERER)); printf(""Press p to toggle between per-pixel and per-vertex lighting\n""); } int main( int argc, char *argv[] ) { glutInitWindowSize( 200, 200 ); glutInit( &argc, argv ); glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ); Win = glutCreateWindow(argv[0]); glewInit(); glutReshapeFunc( Reshape ); glutKeyboardFunc( Key ); glutSpecialFunc( SpecialKey ); glutDisplayFunc( Display ); if (Anim) glutIdleFunc(Idle); Init(); glutMainLoop(); return 0; } ",0 "); sigset_t mask; void reload() { /* reload config file */ syslog(LOG_INFO, ""RELOAD CONFIG FILE""); } void *thr_fn(void * arg) { int signo; while(sigwait(&mask, &signo) == 0) { switch(signo) { case SIGHUP: reload(); break; case SIGTERM: syslog(LOG_INFO, ""DAEMONIZE EXIT""); exit(0); default: syslog(LOG_INFO, ""CAUGHTED A SIGNAL %d"", signo); break; } } return (void *)1; } int main(int argc, char *argv[]) { char *pcmd; struct sigaction act; pthread_t tid; pcmd = strrchr(argv[0], '/'); if (pcmd == NULL) pcmd = argv[0]; else pcmd++; daemonize(pcmd); act.sa_handler = SIG_DFL; act.sa_flags = 0; sigemptyset(&act.sa_mask); sigfillset(&mask); if (pthread_sigmask(SIG_BLOCK, &mask, NULL) < 0) { syslog(LOG_ERR, ""pthread_sigmask failed.[%m]""); exit(-1); } pthread_create(&tid, NULL, thr_fn, NULL); pthread_join(tid, (void**)0); return 0; } ",0 "> Jan Christian Meyer This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation version 3 as published by the Free Software Foundation. You may not use, modify or distribute this program under any other version of the GNU Affero General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ package server.maps; import java.rmi.RemoteException; import java.util.List; import client.MapleCharacter; import java.util.ArrayList; import net.world.remote.WorldChannelInterface; import server.TimerManager; import tools.MaplePacketCreator; /* * MapleTVEffect * @author MrXotic */ public class MapleTVEffect { private List message = new ArrayList(5); private MapleCharacter user; private static boolean active; private int type; private MapleCharacter partner; public MapleTVEffect(MapleCharacter user_, MapleCharacter partner_, List msg, int type_) { this.message = msg; this.user = user_; this.type = type_; this.partner = partner_; broadcastTV(true); } public static boolean isActive() { return active; } private void setActive(boolean set) { active = set; } private void broadcastTV(boolean active_) { WorldChannelInterface wci = user.getClient().getChannelServer().getWorldInterface(); setActive(active_); try { if (active_) { wci.broadcastMessage(null, MaplePacketCreator.enableTV().getBytes()); wci.broadcastMessage(null, MaplePacketCreator.sendTV(user, message, type <= 2 ? type : type - 3, partner).getBytes()); int delay = 15000; if (type == 4) { delay = 30000; } else if (type == 5) { delay = 60000; } TimerManager.getInstance().schedule(new Runnable() { @Override public void run() { broadcastTV(false); } }, delay); } else { wci.broadcastMessage(null, MaplePacketCreator.removeTV().getBytes()); } } catch (RemoteException re) { user.getClient().getChannelServer().reconnectWorld(); } } } ",0 "software; you can redistribute it and/or modify // it under the terms of the Simplified BSD License. // #import #import ""SPSound.h"" /** ------------------------------------------------------------------------------------------------ The SPALSound class is a concrete implementation of SPSound that uses OpenAL internally. Don't create instances of this class manually. Use `[SPSound initWithContentsOfFile:]` instead. ------------------------------------------------------------------------------------------------- */ @interface SPALSound : SPSound /// -------------------- /// @name Initialization /// -------------------- /// Initializes a sound with its known properties. - (id)initWithData:(const void *)data size:(int)size channels:(int)channels frequency:(int)frequency duration:(double)duration; /// ---------------- /// @name Properties /// ---------------- /// The OpenAL buffer ID of the sound. @property (nonatomic, readonly) uint bufferID; @end ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.nifi.registry.client.impl.request; import org.apache.nifi.registry.client.RequestConfig; import org.junit.Test; import java.util.Map; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; public class TestBearerTokenRequestConfig { @Test public void testBearerTokenRequestConfig() { final String token = ""some-token""; final String expectedHeaderValue = ""Bearer "" + token; final RequestConfig requestConfig = new BearerTokenRequestConfig(token); final Map headers = requestConfig.getHeaders(); assertNotNull(headers); assertEquals(1, headers.size()); final String authorizationHeaderValue = headers.get(""Authorization""); assertEquals(expectedHeaderValue, authorizationHeaderValue); } } ",0 "yright Copyright (C) 2008 Massimo Giagnoni. All rights reserved. * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL */ /* This file is part of QContacts. QContacts is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ function QContactsBuildRoute(&$query) { static $items; $segments = array(); $itemid = null; // Get the menu items for this component. if (!$items) { $component = &JComponentHelper::getComponent('com_qcontacts'); $menu = &JSite::getMenu(); $items = $menu->getItems('componentid', $component->id); } // Break up the contact id into numeric and alias values. if (isset($query['id']) && strpos($query['id'], ':')) { list($query['id'], $query['alias']) = explode(':', $query['id'], 2); } // Break up the category id into numeric and alias values. if (isset($query['catid']) && strpos($query['catid'], ':')) { list($query['catid'], $query['catalias']) = explode(':', $query['catid'], 2); } // Search for an appropriate menu item. if (is_array($items)) { // If only the option and itemid are specified in the query, return that item. if (!isset($query['view']) && !isset($query['id']) && !isset($query['catid']) && isset($query['Itemid'])) { $itemid = (int) $query['Itemid']; } // Search for a specific link based on the critera given. if (!$itemid) { foreach ($items as $item) { // Check if this menu item links to this view. if (isset($item->query['view']) && $item->query['view'] == 'contact' && isset($query['view']) && $query['view'] == 'contact' && isset($item->query['id']) && $item->query['id'] == $query['id']) { $itemid = $item->id; } elseif (isset($item->query['view']) && $item->query['view'] == 'category' && isset($query['view']) && $query['view'] == 'category' && isset($item->query['catid']) && $item->query['catid'] == $query['catid']) { $itemid = $item->id; } } } // If no specific link has been found, search for a general one. if (!$itemid) { foreach ($items as $item) { if (isset($query['view']) && $query['view'] == 'contact' && isset($item->query['view']) && $item->query['view'] == 'category') { // Check for an undealt with contact id. if (isset($query['id'])) { // This menu item links to the contact view but we need to append the contact id to it. $itemid = $item->id; $segments[] = isset($query['catalias']) ? $query['catid'].':'.$query['catalias'] : $query['catid']; $segments[] = isset($query['alias']) ? $query['id'].':'.$query['alias'] : $query['id']; break; } } elseif (isset($query['view']) && $query['view'] == 'category' && isset($item->query['view']) && $item->query['view'] == 'category' && isset($item->query['id']) && $item->query['id'] != $query['id']) { // Check for an undealt with category id. if (isset($query['catid'])) { // This menu item links to the category view but we need to append the category id to it. $itemid = $item->id; $segments[] = isset($query['alias']) ? $query['id'].':'.$query['alias'] : $query['id']; break; } } } } } // Check if the router found an appropriate itemid. if (!$itemid) { // Check if a id was specified. if (isset($query['id'])) { if (isset($query['alias'])) { $query['id'] .= ':'.$query['alias']; } // Push the id onto the stack. $segments[] = $query['id']; unset($query['view']); unset($query['id']); unset($query['alias']); } elseif (isset($query['catid'])) { if (isset($query['catalias'])) { $query['catid'] .= ':'.$query['catalias']; } if (isset($query['alias'])) { $query['id'] .= ':'.$query['alias']; } // Push the catid onto the stack. $segments[] = 'category'; $segments[] = $query['catid']; // Push the id onto the stack. $segments[] = $query['id']; // Remove the unnecessary URL segments. unset($query['view']); unset($query['id']); unset($query['alias']); unset($query['catid']); unset($query['catalias']); } } else { $query['Itemid'] = $itemid; // Remove the unnecessary URL segments. unset($query['view']); unset($query['id']); unset($query['alias']); unset($query['catid']); unset($query['catalias']); } return $segments; } function QContactsParseRoute($segments) { $vars = array(); // Get the active menu item. $menu = &JSite::getMenu(); $item = &$menu->getActive(); // Check if we have a valid menu item. if (is_object($item)) { // Proceed through the possible variations trying to match the most specific one. if (isset($item->query['view']) && $item->query['view'] == 'contact' && isset($segments[0])) { // Break up the contact id into numeric and alias values. if (isset($segments[0]) && strpos($segments[0], ':')) { list($id, $alias) = explode(':', $segments[0], 2); } // Contact view. $vars['view'] = 'contact'; $vars['id'] = $id; } elseif (isset($item->query['view']) && $item->query['view'] == 'category' && count($segments) == 2) { // Break up the category id into numeric and alias values. if (isset($segments[0]) && strpos($segments[0], ':')) { list($catid, $catalias) = explode(':', $segments[0], 2); } // Break up the contact id into numeric and alias values. if (isset($segments[1]) && strpos($segments[1], ':')) { list($id, $alias) = explode(':', $segments[1], 2); } // Contact view. $vars['view'] = 'contact'; $vars['id'] = $id; $vars['catid'] = $catid; } elseif (isset($item->query['view']) && $item->query['view'] == 'category' && isset($segments[0])) { // Break up the category id into numeric and alias values. if (isset($segments[0]) && strpos($segments[0], ':')) { list($catid, $alias) = explode(':', $segments[0], 2); } // Category view. $vars['view'] = 'category'; $vars['catid'] = $catid; } } else { // Count route segments $count = count($segments); // Check if there are any route segments to handle. if ($count) { if ($count == 2) { // We are viewing a contact. $vars['view'] = 'contact'; $vars['id'] = $segments[$count-1]; $vars['catid'] = $segments[$count-2]; } else { // We are viewing a category. $vars['view'] = 'category'; $vars['catid'] = $segments[$count-1]; } } } return $vars; }",0 "rt retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Path; import retrofit2.http.Query; import rx.Observable; public interface GitHubService { @GET(""users/{user}/repos"") Call> listRepos(@Path(""user"") String user); @GET(""search/repositories"") Observable searchRepos(@Query(""q"") String keyword, @Query(""sort"") String sort, @Query(""order"") String order); }",0 "thors would copy and paste this code into their * functions.php file, and amend to suit. * * @package TGM-Plugin-Activation * @subpackage Example * @version 2.3.6 * @author Thomas Griffin * @author Gary Jones * @copyright Copyright (c) 2012, Thomas Griffin * @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later * @link https://github.com/thomasgriffin/TGM-Plugin-Activation */ /** * Include the TGM_Plugin_Activation class. */ require_once ( get_template_directory() .'/functions/class-tgm-plugin-activation.php' ); add_action( 'tgmpa_register', 'my_theme_register_required_plugins' ); /** * Register the required plugins for this theme. * * In this example, we register two plugins - one included with the TGMPA library * and one from the .org repo. * * The variable passed to tgmpa_register_plugins() should be an array of plugin * arrays. * * This function is hooked into tgmpa_init, which is fired within the * TGM_Plugin_Activation class constructor. */ function my_theme_register_required_plugins() { /** * Array of plugin arrays. Required keys are name and slug. * If the source is NOT from the .org repo, then source is also required. */ $plugins = array( array( 'name' => 'Symple Shortcodes', 'slug' => 'symple-shortcodes', 'source' => 'http://www.wpexplorer.com/symple-shortcodes-download', 'required' => false, 'force_activation' => false, 'force_deactivation' => false, ), array( 'name' => 'ZillaLikes', 'slug' => 'zilla-likes', 'source' => get_template_directory_uri() . '/plugins/zilla-likes.zip', 'Required' => true, 'version' => '1.0', 'force_activation' => false, 'force_deactivation' => false, 'external_url' => '', ) ); // Change this to your theme text domain, used for internationalising strings $theme_text_domain = 'tgmpa'; /** * Array of configuration settings. Amend each line as needed. * If you want the default strings to be available under your own theme domain, * leave the strings uncommented. * Some of the strings are added into a sprintf, so see the comments at the * end of each line for what each argument will be. */ $config = array( 'domain' => $theme_text_domain, // Text domain - likely want to be the same as your theme. 'default_path' => '', // Default absolute path to pre-packaged plugins 'parent_menu_slug' => 'themes.php', // Default parent menu slug 'parent_url_slug' => 'themes.php', // Default parent URL slug 'menu' => 'install-required-plugins', // Menu slug 'has_notices' => true, // Show admin notices or not 'is_automatic' => false, // Automatically activate plugins after installation or not 'message' => '', // Message to output right before the plugins table 'strings' => array( 'page_title' => __( 'Install Required Plugins', $theme_text_domain ), 'menu_title' => __( 'Install Plugins', $theme_text_domain ), 'installing' => __( 'Installing Plugin: %s', $theme_text_domain ), // %1$s = plugin name 'oops' => __( 'Something went wrong with the plugin API.', $theme_text_domain ), 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s) 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s) 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s) 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s) 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s) 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s) 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s) 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s) 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ), 'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins' ), 'return' => __( 'Return to Required Plugins Installer', $theme_text_domain ), 'plugin_activated' => __( 'Plugin activated successfully.', $theme_text_domain ), 'complete' => __( 'All plugins installed and activated successfully. %s', $theme_text_domain ), // %1$s = dashboard link 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated' or 'error' ) ); tgmpa( $plugins, $config ); }",0 "pyright (C) 2017 Zeiss Microscopy GmbH // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // To obtain a commercial version please contact Zeiss Microscopy GmbH. // //****************************************************************************** #pragma once #include ""libCZI.h"" namespace libCZI { /// This is an utility in order to prepare the information /// required for the multi-channel-composition functions from /// the display-settings (e. g. retrieved from metadata). /// If the gradation curve is given as gamma or as a spline, /// we calculate here the lookup-table. In addition, we /// make sure that only channels which are ""enabled"" (in the /// display-settings) are considered. class CDisplaySettingsHelper { private: std::vector channelInfos; std::vector activeChannels; std::vector> lutStore; public: /// Enumerate the enabled channels. The functor will be called for each active channel /// (with the channel-index passed in). /// /// \param ptrDspSetting The display settings. /// \param funcEnabledChannel A functor which will be called for each active channel. static void EnumEnabledChannels(const libCZI::IDisplaySettings* ptrDspSetting, std::function funcEnabledChannel) { ptrDspSetting->EnumChannels( [&](int chIndex)->bool { auto chDsplSetting = ptrDspSetting->GetChannelDisplaySettings(chIndex); if (chDsplSetting->GetIsEnabled() == true) { return funcEnabledChannel(chIndex); } return true; }); } /// Gets a vector containing the channel indices of the active channels. /// /// \param ptrDspSetting The display settings. /// /// \return A vector containing the channel indices of the active channels. static std::vector GetActiveChannels(const libCZI::IDisplaySettings* ptrDspSetting) { std::vector result; CDisplaySettingsHelper::EnumEnabledChannels(ptrDspSetting, [&](int chIdx)->bool {result.push_back(chIdx); return true; }); return result; } /// Initializes this object with a display-settings object. /// /// After this object is initialized, it will provide the Compositors::ChannelInfo information /// for all 'enabled' channels in the specified display-settings object. /// /// \param ptrDspSetting A pointer to a display-settings object. /// \param getPixelTypeForChannelIndex A functor which is called in order to retrieve the pixeltype of the bitmap passed in for the channel with the specified channel index. void Initialize(const libCZI::IDisplaySettings* ptrDspSetting, std::function getPixelTypeForChannelIndex) { this->Clear(); ptrDspSetting->EnumChannels( [&](int chIndex)->bool { auto chDsplSetting = ptrDspSetting->GetChannelDisplaySettings(chIndex); this->AddChannelSetting(chIndex, chDsplSetting.get(), getPixelTypeForChannelIndex); return true; }); } /// Initializes this object by specified a set of ChannelDisplaySetting-objects (and their respective channel-index). /// /// After this object is initialized, it will provide the Compositors::ChannelInfo information /// for all 'enabled' channels. /// /// \param getChDisplaySettingAndChannelIdx A functor which is used to retrieve a ChannelDisplaySetting-objects and its respective channels-index. /// If the functor returns false, the enumeration is cancelled (and the functor is not called any more). void Initialize(std::function&)> getChDisplaySettingAndChannelIdx, std::function getPixelTypeForChannelIndex) { this->Clear(); for (;;) { int chIdx; std::shared_ptr chDsplSetting; if (getChDisplaySettingAndChannelIdx(chIdx, chDsplSetting) == false) { break; } this->AddChannelSetting(chIdx, chDsplSetting.get(), getPixelTypeForChannelIndex); } } /// Gets a vector containing the channel-indices of the active channels. /// /// \return The vector with the channel-indices of the active channels. const std::vector& GetActiveChannels() const { return this->activeChannels; } /// Gets count of active channels. /// /// \return The active channels count. int GetActiveChannelsCount() const { return (int)this->activeChannels.size(); } /// Gets a reference to the channel-info for the channel with the specified index. /// The index must be in less than the number returned from GetActiveChannelsCount(), /// otherwise the behavior is undefined. Note that the index specified here is NOT /// the channel-index, it is just the index into the list of active channels (held in /// this class). /// /// \param idx The index. /// /// \return The channel-info for the (active) channel with the specified index. const libCZI::Compositors::ChannelInfo& GetActiveChannel(int idx) const { return this->channelInfos.at(idx); } /// Gets a pointer to the channel-infos array. Note that the data structure contains /// pointers to memory (ptrLookUpTable notably) which refer to memory owned by this /// class. So it is safe to use this data structure as long as this object exists, /// if this object has been destroyed, the behavior is undefined. /// Also the behavior is undefined if this class has not been successfully initialized. /// /// \return A pointer to the channel-infos array (containing as many elements as determined by GetActiveChannelsCount). const libCZI::Compositors::ChannelInfo* GetChannelInfosArray() { return &this->channelInfos[0]; } private: void Clear() { this->channelInfos.clear(); this->activeChannels.clear(); this->lutStore.clear(); } void AddChannelSetting(int chIdx, const libCZI::IChannelDisplaySetting* chDsplSetting, std::function getPixelTypeForChannelIndex) { // Note that we only add this channel IF IT IS ENABLED. If not, we DO NOT and MUST NOT call the // ""getPixelTypeForChannelIndex""-callback! if (chDsplSetting->GetIsEnabled() != true) { return; } libCZI::Compositors::ChannelInfo ci; ci.Clear(); ci.weight = chDsplSetting->GetWeight(); chDsplSetting->GetBlackWhitePoint(&ci.blackPoint, &ci.whitePoint); if (chDsplSetting->TryGetTintingColorRgb8(&ci.tinting.color) == true) { ci.enableTinting = true; } switch (chDsplSetting->GetGradationCurveMode()) { case libCZI::IDisplaySettings::GradationCurveMode::Gamma: { int lutSize = GetSizeForLUT(chIdx, getPixelTypeForChannelIndex); float gamma; chDsplSetting->TryGetGamma(&gamma); this->lutStore.emplace_back( libCZI::Utils::Create8BitLookUpTableFromGamma(lutSize, ci.blackPoint, ci.whitePoint, gamma)); ci.ptrLookUpTable = &(this->lutStore.back()[0]); ci.lookUpTableElementCount = lutSize; } break; case libCZI::IDisplaySettings::GradationCurveMode::Spline: { int lutSize = GetSizeForLUT(chIdx, getPixelTypeForChannelIndex); std::vector splineData; chDsplSetting->TryGetSplineData(&splineData); this->lutStore.emplace_back( libCZI::Utils::Create8BitLookUpTableFromSplines(lutSize, ci.blackPoint, ci.whitePoint, splineData)); ci.ptrLookUpTable = &(this->lutStore.back()[0]); ci.lookUpTableElementCount = lutSize; } break; default: // silence warnings break; } this->channelInfos.push_back(ci); this->activeChannels.push_back(chIdx); } static int GetSizeForLUT(int chIdx, std::function getPixelTypeForChannelIndex) { libCZI::PixelType pxlType = getPixelTypeForChannelIndex(chIdx); switch (pxlType) { case libCZI::PixelType::Gray8: case libCZI::PixelType::Bgr24: return 256; case libCZI::PixelType::Gray16: case libCZI::PixelType::Bgr48: return 256 * 256; default: throw std::runtime_error(""Pixeltype not supported""); } } }; }",0 "e 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. */ package org.gradle.api.internal.tasks.compile.incremental.cache; import org.gradle.api.internal.tasks.compile.incremental.analyzer.ClassAnalysisCache; import org.gradle.api.internal.tasks.compile.incremental.deps.LocalClassSetAnalysisStore; import org.gradle.api.internal.tasks.compile.incremental.jar.JarSnapshotCache; import org.gradle.api.internal.tasks.compile.incremental.jar.LocalJarClasspathSnapshotStore; public interface CompileCaches { ClassAnalysisCache getClassAnalysisCache(); JarSnapshotCache getJarSnapshotCache(); LocalJarClasspathSnapshotStore getLocalJarClasspathSnapshotStore(); LocalClassSetAnalysisStore getLocalClassSetAnalysisStore(); } ",0 "-scalable=no""> 葡萄藤PPT

          【JS-10】angular中$resource和$http有什么区别?

          分享人:韩阳

          目录

          1.背景介绍

          2.知识剖析

          3.常见问题

          4.解决方案

          5.编码实战

          6.扩展思考

          7.参考文献

          8.更多讨论

          1.背景介绍

          一、本质上功能都是一样的,都是基于XMLHttpRequest和服务器交互的服务

          一.$HTTP

          $http是angular中的一个核心服务,利用浏览器的xmlhttprequest或者via JSONP对象与远程HTTP服务器进行交互。  $http的使用方式和jquery提供的$.ajax操作比较相同,均支持多种method的请求,get、post、put、delete等。   $http的各种方式的请求更趋近于rest风格。 在controller中可通过与$scope同样的方式获取$http对象

          二、resource

          AngularJS中的resource(资源)允许我们用描述性的方式来定义对象模型,它可以描述以下内容: 资源在服务端的URL。
          常用的请求参数类型。
          一些附加的方法(你可以自动获得get、save、query、remove和delete方法),这些方法为对象模型包装了特定的功能和业务逻辑(例如信用卡对象的charge()方法)。 期望获得的响应类型(一个数组或者一个对象)。 协议头

          3.常见问题

          如何正确的应用resource

          4.解决方案

          1、在加载的脚本文件中包含angular-resource.js.

                    
          			
                    
                  

          2、在模块依赖声明中包含ngResource

                    
          			angular.module(‘myapp', [‘ngResource'])
                    
                  

          3、在需要的地方使用注入的$resource服务。

                    
          			var obj=$resource(url,[,paramsDefaults],[,actions])
                    
                  

          5.编码实战

                    
          			app.service('serviceAdd', function(){
          				this.companyAdd = '/carrots-admin-ajax/a/company/search';
          			});
          			app.service('library', function($resource,serviceAdd){
          				var getCompany = $resource(serviceAdd.companyAdd);
          			return{
          				getCompanies: getCompany.get
          			}
          			});
                    
                  
                    
          			angular.module('app').controller('company');
          				app.controller('company',function(library){
              				var vm = this;
              				vm.pageChange=function(){
              					params=vm.company;
              					library.getCompanies(params,function(response){
          	      				vm.response=response;
          	      				vm.a=vm.response.data;
             						})
            					};
              					vm.pageChange();
          				});
                    
                  

          6.扩展思考

          使用$resource的必要性

          为了代码的更加的规范和易维护性。还是很有必要性的

          7.参考文献

          参考一:segmentfault

          参考一:$resource

          8.更多讨论

          鸣谢

          感谢大家观看

          成都-韩阳

          ",0 "S /home/nyee/srsLTE/srslte/examples/src/asn1c/skeletons -fcompound-names -fskeletons-copy -gen-PER -pdu=auto` */ #include ""CandidateCellInfo-r10.h"" static asn_TYPE_member_t asn_MBR_CandidateCellInfo_r10_1[] = { { ATF_NOFLAGS, 0, offsetof(struct CandidateCellInfo_r10, physCellId_r10), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_PhysCellId, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, ""physCellId-r10"" }, { ATF_NOFLAGS, 0, offsetof(struct CandidateCellInfo_r10, dl_CarrierFreq_r10), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_ARFCN_ValueEUTRA, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, ""dl-CarrierFreq-r10"" }, { ATF_POINTER, 3, offsetof(struct CandidateCellInfo_r10, rsrpResult_r10), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_RSRP_Range, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, ""rsrpResult-r10"" }, { ATF_POINTER, 2, offsetof(struct CandidateCellInfo_r10, rsrqResult_r10), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_RSRQ_Range, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, ""rsrqResult-r10"" }, { ATF_POINTER, 1, offsetof(struct CandidateCellInfo_r10, dl_CarrierFreq_v1090), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_ARFCN_ValueEUTRA_v9e0, 0, /* Defer constraints checking to the member type */ 0, /* No PER visible constraints */ 0, ""dl-CarrierFreq-v1090"" }, }; static const int asn_MAP_CandidateCellInfo_r10_oms_1[] = { 2, 3, 4 }; static const ber_tlv_tag_t asn_DEF_CandidateCellInfo_r10_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_CandidateCellInfo_r10_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* physCellId-r10 */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dl-CarrierFreq-r10 */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* rsrpResult-r10 */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* rsrqResult-r10 */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* dl-CarrierFreq-v1090 */ }; static asn_SEQUENCE_specifics_t asn_SPC_CandidateCellInfo_r10_specs_1 = { sizeof(struct CandidateCellInfo_r10), offsetof(struct CandidateCellInfo_r10, _asn_ctx), asn_MAP_CandidateCellInfo_r10_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_CandidateCellInfo_r10_oms_1, /* Optional members */ 2, 1, /* Root/Additions */ 3, /* Start extensions */ 6 /* Stop extensions */ }; asn_TYPE_descriptor_t asn_DEF_CandidateCellInfo_r10 = { ""CandidateCellInfo-r10"", ""CandidateCellInfo-r10"", SEQUENCE_free, SEQUENCE_print, SEQUENCE_constraint, SEQUENCE_decode_ber, SEQUENCE_encode_der, SEQUENCE_decode_xer, SEQUENCE_encode_xer, SEQUENCE_decode_uper, SEQUENCE_encode_uper, 0, /* Use generic outmost tag fetcher */ asn_DEF_CandidateCellInfo_r10_tags_1, sizeof(asn_DEF_CandidateCellInfo_r10_tags_1) /sizeof(asn_DEF_CandidateCellInfo_r10_tags_1[0]), /* 1 */ asn_DEF_CandidateCellInfo_r10_tags_1, /* Same as above */ sizeof(asn_DEF_CandidateCellInfo_r10_tags_1) /sizeof(asn_DEF_CandidateCellInfo_r10_tags_1[0]), /* 1 */ 0, /* No PER visible constraints */ asn_MBR_CandidateCellInfo_r10_1, 5, /* Elements count */ &asn_SPC_CandidateCellInfo_r10_specs_1 /* Additional specs */ }; ",0 "arnyagin@lockless.no> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include #include #include ""queue.h"" #include ""cw1200.h"" #include ""debug.h"" /* private */ struct cw1200_queue_item { struct list_head head; struct sk_buff *skb; u32 packet_id; unsigned long queue_timestamp; unsigned long xmit_timestamp; struct cw1200_txpriv txpriv; u8 generation; }; static inline void __cw1200_queue_lock(struct cw1200_queue *queue) { struct cw1200_queue_stats *stats = queue->stats; if (queue->tx_locked_cnt++ == 0) { pr_debug(""[TX] Queue %d is locked.\n"", queue->queue_id); ieee80211_stop_queue(stats->priv->hw, queue->queue_id); } } static inline void __cw1200_queue_unlock(struct cw1200_queue *queue) { struct cw1200_queue_stats *stats = queue->stats; BUG_ON(!queue->tx_locked_cnt); if (--queue->tx_locked_cnt == 0) { pr_debug(""[TX] Queue %d is unlocked.\n"", queue->queue_id); ieee80211_wake_queue(stats->priv->hw, queue->queue_id); } } static inline void cw1200_queue_parse_id(u32 packet_id, u8 *queue_generation, u8 *queue_id, u8 *item_generation, u8 *item_id) { *item_id = (packet_id >> 0) & 0xFF; *item_generation = (packet_id >> 8) & 0xFF; *queue_id = (packet_id >> 16) & 0xFF; *queue_generation = (packet_id >> 24) & 0xFF; } static inline u32 cw1200_queue_mk_packet_id(u8 queue_generation, u8 queue_id, u8 item_generation, u8 item_id) { return ((u32)item_id << 0) | ((u32)item_generation << 8) | ((u32)queue_id << 16) | ((u32)queue_generation << 24); } static void cw1200_queue_post_gc(struct cw1200_queue_stats *stats, struct list_head *gc_list) { struct cw1200_queue_item *item, *tmp; list_for_each_entry_safe(item, tmp, gc_list, head) { list_del(&item->head); stats->skb_dtor(stats->priv, item->skb, &item->txpriv); kfree(item); } } static void cw1200_queue_register_post_gc(struct list_head *gc_list, struct cw1200_queue_item *item) { struct cw1200_queue_item *gc_item; gc_item = kmalloc(sizeof(struct cw1200_queue_item), GFP_ATOMIC); BUG_ON(!gc_item); memcpy(gc_item, item, sizeof(struct cw1200_queue_item)); list_add_tail(&gc_item->head, gc_list); } static void __cw1200_queue_gc(struct cw1200_queue *queue, struct list_head *head, bool unlock) { struct cw1200_queue_stats *stats = queue->stats; struct cw1200_queue_item *item = NULL, *tmp; bool wakeup_stats = false; list_for_each_entry_safe(item, tmp, &queue->queue, head) { if (jiffies - item->queue_timestamp < queue->ttl) break; --queue->num_queued; --queue->link_map_cache[item->txpriv.link_id]; spin_lock_bh(&stats->lock); --stats->num_queued; if (!--stats->link_map_cache[item->txpriv.link_id]) wakeup_stats = true; spin_unlock_bh(&stats->lock); cw1200_debug_tx_ttl(stats->priv); cw1200_queue_register_post_gc(head, item); item->skb = NULL; list_move_tail(&item->head, &queue->free_pool); } if (wakeup_stats) wake_up(&stats->wait_link_id_empty); if (queue->overfull) { if (queue->num_queued <= (queue->capacity >> 1)) { queue->overfull = false; if (unlock) __cw1200_queue_unlock(queue); } else if (item) { unsigned long tmo = item->queue_timestamp + queue->ttl; mod_timer(&queue->gc, tmo); cw1200_pm_stay_awake(&stats->priv->pm_state, tmo - jiffies); } } } static void cw1200_queue_gc(struct timer_list *t) { LIST_HEAD(list); struct cw1200_queue *queue = from_timer(queue, t, gc); spin_lock_bh(&queue->lock); __cw1200_queue_gc(queue, &list, true); spin_unlock_bh(&queue->lock); cw1200_queue_post_gc(queue->stats, &list); } int cw1200_queue_stats_init(struct cw1200_queue_stats *stats, size_t map_capacity, cw1200_queue_skb_dtor_t skb_dtor, struct cw1200_common *priv) { memset(stats, 0, sizeof(*stats)); stats->map_capacity = map_capacity; stats->skb_dtor = skb_dtor; stats->priv = priv; spin_lock_init(&stats->lock); init_waitqueue_head(&stats->wait_link_id_empty); stats->link_map_cache = kzalloc(sizeof(int) * map_capacity, GFP_KERNEL); if (!stats->link_map_cache) return -ENOMEM; return 0; } int cw1200_queue_init(struct cw1200_queue *queue, struct cw1200_queue_stats *stats, u8 queue_id, size_t capacity, unsigned long ttl) { size_t i; memset(queue, 0, sizeof(*queue)); queue->stats = stats; queue->capacity = capacity; queue->queue_id = queue_id; queue->ttl = ttl; INIT_LIST_HEAD(&queue->queue); INIT_LIST_HEAD(&queue->pending); INIT_LIST_HEAD(&queue->free_pool); spin_lock_init(&queue->lock); timer_setup(&queue->gc, cw1200_queue_gc, 0); queue->pool = kzalloc(sizeof(struct cw1200_queue_item) * capacity, GFP_KERNEL); if (!queue->pool) return -ENOMEM; queue->link_map_cache = kzalloc(sizeof(int) * stats->map_capacity, GFP_KERNEL); if (!queue->link_map_cache) { kfree(queue->pool); queue->pool = NULL; return -ENOMEM; } for (i = 0; i < capacity; ++i) list_add_tail(&queue->pool[i].head, &queue->free_pool); return 0; } int cw1200_queue_clear(struct cw1200_queue *queue) { int i; LIST_HEAD(gc_list); struct cw1200_queue_stats *stats = queue->stats; struct cw1200_queue_item *item, *tmp; spin_lock_bh(&queue->lock); queue->generation++; list_splice_tail_init(&queue->queue, &queue->pending); list_for_each_entry_safe(item, tmp, &queue->pending, head) { WARN_ON(!item->skb); cw1200_queue_register_post_gc(&gc_list, item); item->skb = NULL; list_move_tail(&item->head, &queue->free_pool); } queue->num_queued = 0; queue->num_pending = 0; spin_lock_bh(&stats->lock); for (i = 0; i < stats->map_capacity; ++i) { stats->num_queued -= queue->link_map_cache[i]; stats->link_map_cache[i] -= queue->link_map_cache[i]; queue->link_map_cache[i] = 0; } spin_unlock_bh(&stats->lock); if (queue->overfull) { queue->overfull = false; __cw1200_queue_unlock(queue); } spin_unlock_bh(&queue->lock); wake_up(&stats->wait_link_id_empty); cw1200_queue_post_gc(stats, &gc_list); return 0; } void cw1200_queue_stats_deinit(struct cw1200_queue_stats *stats) { kfree(stats->link_map_cache); stats->link_map_cache = NULL; } void cw1200_queue_deinit(struct cw1200_queue *queue) { cw1200_queue_clear(queue); del_timer_sync(&queue->gc); INIT_LIST_HEAD(&queue->free_pool); kfree(queue->pool); kfree(queue->link_map_cache); queue->pool = NULL; queue->link_map_cache = NULL; queue->capacity = 0; } size_t cw1200_queue_get_num_queued(struct cw1200_queue *queue, u32 link_id_map) { size_t ret; int i, bit; size_t map_capacity = queue->stats->map_capacity; if (!link_id_map) return 0; spin_lock_bh(&queue->lock); if (link_id_map == (u32)-1) { ret = queue->num_queued - queue->num_pending; } else { ret = 0; for (i = 0, bit = 1; i < map_capacity; ++i, bit <<= 1) { if (link_id_map & bit) ret += queue->link_map_cache[i]; } } spin_unlock_bh(&queue->lock); return ret; } int cw1200_queue_put(struct cw1200_queue *queue, struct sk_buff *skb, struct cw1200_txpriv *txpriv) { int ret = 0; LIST_HEAD(gc_list); struct cw1200_queue_stats *stats = queue->stats; if (txpriv->link_id >= queue->stats->map_capacity) return -EINVAL; spin_lock_bh(&queue->lock); if (!WARN_ON(list_empty(&queue->free_pool))) { struct cw1200_queue_item *item = list_first_entry( &queue->free_pool, struct cw1200_queue_item, head); BUG_ON(item->skb); list_move_tail(&item->head, &queue->queue); item->skb = skb; item->txpriv = *txpriv; item->generation = 0; item->packet_id = cw1200_queue_mk_packet_id(queue->generation, queue->queue_id, item->generation, item - queue->pool); item->queue_timestamp = jiffies; ++queue->num_queued; ++queue->link_map_cache[txpriv->link_id]; spin_lock_bh(&stats->lock); ++stats->num_queued; ++stats->link_map_cache[txpriv->link_id]; spin_unlock_bh(&stats->lock); /* TX may happen in parallel sometimes. * Leave extra queue slots so we don't overflow. */ if (queue->overfull == false && queue->num_queued >= (queue->capacity - (num_present_cpus() - 1))) { queue->overfull = true; __cw1200_queue_lock(queue); mod_timer(&queue->gc, jiffies); } } else { ret = -ENOENT; } spin_unlock_bh(&queue->lock); return ret; } int cw1200_queue_get(struct cw1200_queue *queue, u32 link_id_map, struct wsm_tx **tx, struct ieee80211_tx_info **tx_info, const struct cw1200_txpriv **txpriv) { int ret = -ENOENT; struct cw1200_queue_item *item; struct cw1200_queue_stats *stats = queue->stats; bool wakeup_stats = false; spin_lock_bh(&queue->lock); list_for_each_entry(item, &queue->queue, head) { if (link_id_map & BIT(item->txpriv.link_id)) { ret = 0; break; } } if (!WARN_ON(ret)) { *tx = (struct wsm_tx *)item->skb->data; *tx_info = IEEE80211_SKB_CB(item->skb); *txpriv = &item->txpriv; (*tx)->packet_id = item->packet_id; list_move_tail(&item->head, &queue->pending); ++queue->num_pending; --queue->link_map_cache[item->txpriv.link_id]; item->xmit_timestamp = jiffies; spin_lock_bh(&stats->lock); --stats->num_queued; if (!--stats->link_map_cache[item->txpriv.link_id]) wakeup_stats = true; spin_unlock_bh(&stats->lock); } spin_unlock_bh(&queue->lock); if (wakeup_stats) wake_up(&stats->wait_link_id_empty); return ret; } int cw1200_queue_requeue(struct cw1200_queue *queue, u32 packet_id) { int ret = 0; u8 queue_generation, queue_id, item_generation, item_id; struct cw1200_queue_item *item; struct cw1200_queue_stats *stats = queue->stats; cw1200_queue_parse_id(packet_id, &queue_generation, &queue_id, &item_generation, &item_id); item = &queue->pool[item_id]; spin_lock_bh(&queue->lock); BUG_ON(queue_id != queue->queue_id); if (queue_generation != queue->generation) { ret = -ENOENT; } else if (item_id >= (unsigned) queue->capacity) { WARN_ON(1); ret = -EINVAL; } else if (item->generation != item_generation) { WARN_ON(1); ret = -ENOENT; } else { --queue->num_pending; ++queue->link_map_cache[item->txpriv.link_id]; spin_lock_bh(&stats->lock); ++stats->num_queued; ++stats->link_map_cache[item->txpriv.link_id]; spin_unlock_bh(&stats->lock); item->generation = ++item_generation; item->packet_id = cw1200_queue_mk_packet_id(queue_generation, queue_id, item_generation, item_id); list_move(&item->head, &queue->queue); } spin_unlock_bh(&queue->lock); return ret; } int cw1200_queue_requeue_all(struct cw1200_queue *queue) { struct cw1200_queue_item *item, *tmp; struct cw1200_queue_stats *stats = queue->stats; spin_lock_bh(&queue->lock); list_for_each_entry_safe_reverse(item, tmp, &queue->pending, head) { --queue->num_pending; ++queue->link_map_cache[item->txpriv.link_id]; spin_lock_bh(&stats->lock); ++stats->num_queued; ++stats->link_map_cache[item->txpriv.link_id]; spin_unlock_bh(&stats->lock); ++item->generation; item->packet_id = cw1200_queue_mk_packet_id(queue->generation, queue->queue_id, item->generation, item - queue->pool); list_move(&item->head, &queue->queue); } spin_unlock_bh(&queue->lock); return 0; } int cw1200_queue_remove(struct cw1200_queue *queue, u32 packet_id) { int ret = 0; u8 queue_generation, queue_id, item_generation, item_id; struct cw1200_queue_item *item; struct cw1200_queue_stats *stats = queue->stats; struct sk_buff *gc_skb = NULL; struct cw1200_txpriv gc_txpriv; cw1200_queue_parse_id(packet_id, &queue_generation, &queue_id, &item_generation, &item_id); item = &queue->pool[item_id]; spin_lock_bh(&queue->lock); BUG_ON(queue_id != queue->queue_id); if (queue_generation != queue->generation) { ret = -ENOENT; } else if (item_id >= (unsigned) queue->capacity) { WARN_ON(1); ret = -EINVAL; } else if (item->generation != item_generation) { WARN_ON(1); ret = -ENOENT; } else { gc_txpriv = item->txpriv; gc_skb = item->skb; item->skb = NULL; --queue->num_pending; --queue->num_queued; ++queue->num_sent; ++item->generation; /* Do not use list_move_tail here, but list_move: * try to utilize cache row. */ list_move(&item->head, &queue->free_pool); if (queue->overfull && (queue->num_queued <= (queue->capacity >> 1))) { queue->overfull = false; __cw1200_queue_unlock(queue); } } spin_unlock_bh(&queue->lock); if (gc_skb) stats->skb_dtor(stats->priv, gc_skb, &gc_txpriv); return ret; } int cw1200_queue_get_skb(struct cw1200_queue *queue, u32 packet_id, struct sk_buff **skb, const struct cw1200_txpriv **txpriv) { int ret = 0; u8 queue_generation, queue_id, item_generation, item_id; struct cw1200_queue_item *item; cw1200_queue_parse_id(packet_id, &queue_generation, &queue_id, &item_generation, &item_id); item = &queue->pool[item_id]; spin_lock_bh(&queue->lock); BUG_ON(queue_id != queue->queue_id); if (queue_generation != queue->generation) { ret = -ENOENT; } else if (item_id >= (unsigned) queue->capacity) { WARN_ON(1); ret = -EINVAL; } else if (item->generation != item_generation) { WARN_ON(1); ret = -ENOENT; } else { *skb = item->skb; *txpriv = &item->txpriv; } spin_unlock_bh(&queue->lock); return ret; } void cw1200_queue_lock(struct cw1200_queue *queue) { spin_lock_bh(&queue->lock); __cw1200_queue_lock(queue); spin_unlock_bh(&queue->lock); } void cw1200_queue_unlock(struct cw1200_queue *queue) { spin_lock_bh(&queue->lock); __cw1200_queue_unlock(queue); spin_unlock_bh(&queue->lock); } bool cw1200_queue_get_xmit_timestamp(struct cw1200_queue *queue, unsigned long *timestamp, u32 pending_frame_id) { struct cw1200_queue_item *item; bool ret; spin_lock_bh(&queue->lock); ret = !list_empty(&queue->pending); if (ret) { list_for_each_entry(item, &queue->pending, head) { if (item->packet_id != pending_frame_id) if (time_before(item->xmit_timestamp, *timestamp)) *timestamp = item->xmit_timestamp; } } spin_unlock_bh(&queue->lock); return ret; } bool cw1200_queue_stats_is_empty(struct cw1200_queue_stats *stats, u32 link_id_map) { bool empty = true; spin_lock_bh(&stats->lock); if (link_id_map == (u32)-1) { empty = stats->num_queued == 0; } else { int i; for (i = 0; i < stats->map_capacity; ++i) { if (link_id_map & BIT(i)) { if (stats->link_map_cache[i]) { empty = false; break; } } } } spin_unlock_bh(&stats->lock); return empty; } ",0 " (long) myId) { mtx->_NestCount++; return thrd_success; } for(;;) { LONG prev = InterlockedCompareExchange(&mtx->_ThreadId, myId, 0); if(prev == 0) return thrd_success; DWORD rv = WaitForSingleObject(mtx->_WaitEvHandle, INFINITE); if(rv != WAIT_OBJECT_0) return thrd_error; } } #endif #ifdef TEST #include ""_PDCLIB_test.h"" int main( void ) { return TEST_RESULTS; } #endif",0 "pt's MD5 and SHA1 algorithms */ #include #include #include #include #include #include #include GCRY_THREAD_OPTION_PTHREAD_IMPL; /** * Initialise the XPL library. Should be called once in each program that * uses XPL. */ void XplInit(void) { XplHashInit(); // initialize gettext setlocale (LC_ALL, """"); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); } /** * Initialise the hashing subsystem for a program. This is usually part of * the XplInit() process - this is sort-of private. */ void XplHashInit(void) { //const char *gcry_version; gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); //gcry_version = gcry_check_version(NULL); gcry_control (GCRYCTL_DISABLE_SECMEM, 0); gcry_control (GCRYCTL_SET_RANDOM_SEED_FILE, XPL_DEFAULT_RANDSEED_PATH); gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); } /** * Create a new context to start a hash digest. * \param ctx xpl_hash_context to use * \param type Hashing algorithm to use * \return A new hash context for further use */ void XplHashNew(xpl_hash_context *ctx, xpl_hash_type type) { ctx->type = type; switch(type) { case XPLHASH_MD5: ctx->buffer_size = XPLHASH_MD5BYTES_LENGTH; break; case XPLHASH_SHA1: ctx->buffer_size = XPLHASH_SHA1BYTES_LENGTH; break; default: // unknown hash type - FIXME: ERROR ctx->buffer_size = 0; } gcry_md_open(&ctx->gcrypt_context, type, 0); } /** * Write data into the context to be hashed. * \param context Hash context to be used * \param buffer Pointer to the data to be written * \param length Amount of data from buffer to be written */ void XplHashWrite(xpl_hash_context *context, const void *buffer, size_t length) { gcry_md_write(context->gcrypt_context, buffer, length); } /** * Finalise the hash, and return the hash in raw format * See XplHashFinal() * \param context Hash context to be used * \param buffer Buffer into which the hash will be written * \param length Amount of data to write */ void XplHashFinalBytes(xpl_hash_context *context, unsigned char *buffer, size_t length) { memcpy(buffer, gcry_md_read(context->gcrypt_context, 0), min(context->buffer_size, length)); gcry_md_close(context->gcrypt_context); } /** * Finalise the hash, and return the hash encoded in string format * See XplHashFinalBytes() * \param context Hash context to be used * \param strcase Whether or not the string should use upper case * \param buffer Buffer into which the hash will be written * \param length Amount of data from buffer to be written */ void XplHashFinal(xpl_hash_context *context, xpl_hash_stringcase strcase, char *buffer, size_t length) { char format[5]; unsigned char *digest; char *p; unsigned int i; memcpy(format, ""%02X\0"", 5); if (strcase == XPLHASH_LOWERCASE) format[3] = 'x'; digest = MemMalloc(context->buffer_size); memcpy(digest, gcry_md_read(context->gcrypt_context, 0), context->buffer_size); gcry_md_close(context->gcrypt_context); for (i = 0, p = buffer; i < context->buffer_size && p < buffer+length-1; i++, p += 2) { sprintf((char *)p, format, digest[i]); } buffer[length-1] = 0; MemFree(digest); } /** * Write some random data into a memory area * \param buffer Place to write the random data to * \param length Number of bytes to write */ void XplRandomData(void *buffer, size_t length) { gcry_randomize(buffer, length, GCRY_STRONG_RANDOM); } /** * Save the current random seed to disk. This should only be done by 'management' processes, and * should not usually be called by agents. */ void XplSaveRandomSeed(void) { gcry_control (GCRYCTL_UPDATE_RANDOM_SEED_FILE); } ",0 "INCLUDE_NET_IPV4_AUTOCONF_H_ #define ZEPHYR_INCLUDE_NET_IPV4_AUTOCONF_H_ /** Current state of IPv4 Autoconfiguration */ enum net_ipv4_autoconf_state { NET_IPV4_AUTOCONF_INIT, NET_IPV4_AUTOCONF_PROBE, NET_IPV4_AUTOCONF_ANNOUNCE, NET_IPV4_AUTOCONF_ASSIGNED, NET_IPV4_AUTOCONF_RENEW, }; /** * @brief Initialize IPv4 auto configuration engine. */ #if defined(CONFIG_NET_IPV4_AUTO) void net_ipv4_autoconf_init(void); #else #define net_ipv4_autoconf_init(...) #endif #endif /* ZEPHYR_INCLUDE_NET_IPV4_AUTOCONF_H_ */ ",0 " under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ package net.sourceforge.vulcan.subversion; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Map; import net.sourceforge.vulcan.RepositoryAdaptor; import net.sourceforge.vulcan.StateManager; import net.sourceforge.vulcan.core.BuildDetailCallback; import net.sourceforge.vulcan.core.support.FileSystem; import net.sourceforge.vulcan.core.support.FileSystemImpl; import net.sourceforge.vulcan.core.support.RepositoryUtils; import net.sourceforge.vulcan.dto.ChangeLogDto; import net.sourceforge.vulcan.dto.ChangeSetDto; import net.sourceforge.vulcan.dto.PathModification; import net.sourceforge.vulcan.dto.ProjectConfigDto; import net.sourceforge.vulcan.dto.ProjectStatusDto; import net.sourceforge.vulcan.dto.RepositoryTagDto; import net.sourceforge.vulcan.dto.RevisionTokenDto; import net.sourceforge.vulcan.exception.ConfigException; import net.sourceforge.vulcan.exception.RepositoryException; import net.sourceforge.vulcan.integration.support.PluginSupport; import net.sourceforge.vulcan.subversion.dto.CheckoutDepth; import net.sourceforge.vulcan.subversion.dto.SparseCheckoutDto; import net.sourceforge.vulcan.subversion.dto.SubversionConfigDto; import net.sourceforge.vulcan.subversion.dto.SubversionProjectConfigDto; import net.sourceforge.vulcan.subversion.dto.SubversionRepositoryProfileDto; import org.apache.commons.lang.StringUtils; import org.tigris.subversion.javahl.ClientException; import org.tigris.subversion.javahl.Notify2; import org.tigris.subversion.javahl.NotifyAction; import org.tigris.subversion.javahl.NotifyInformation; import org.tigris.subversion.javahl.PromptUserPassword2; import org.tigris.subversion.javahl.PromptUserPassword3; import org.tigris.subversion.javahl.Revision; import org.tigris.subversion.javahl.SVNClient; import org.tmatesoft.svn.core.ISVNLogEntryHandler; import org.tmatesoft.svn.core.SVNCancelException; import org.tmatesoft.svn.core.SVNDepth; import org.tmatesoft.svn.core.SVNDirEntry; import org.tmatesoft.svn.core.SVNErrorCode; import org.tmatesoft.svn.core.SVNException; import org.tmatesoft.svn.core.SVNLogEntry; import org.tmatesoft.svn.core.SVNLogEntryPath; import org.tmatesoft.svn.core.SVNNodeKind; import org.tmatesoft.svn.core.SVNProperties; import org.tmatesoft.svn.core.SVNPropertyValue; import org.tmatesoft.svn.core.SVNURL; import org.tmatesoft.svn.core.io.SVNRepository; import org.tmatesoft.svn.core.wc.ISVNEventHandler; import org.tmatesoft.svn.core.wc.SVNDiffClient; import org.tmatesoft.svn.core.wc.SVNEvent; import org.tmatesoft.svn.core.wc.SVNLogClient; import org.tmatesoft.svn.core.wc.SVNPropertyData; import org.tmatesoft.svn.core.wc.SVNRevision; import org.tmatesoft.svn.core.wc.SVNWCClient; public class SubversionRepositoryAdaptor extends SubversionSupport implements RepositoryAdaptor { private final EventHandler eventHandler = new EventHandler(); private final ProjectConfigDto projectConfig; private final String projectName; private final Map byteCounters; final LineOfDevelopment lineOfDevelopment = new LineOfDevelopment(); final SVNClient client = new SVNClient(); private long revision = -1; private long diffStartRevision = -1; private final StateManager stateManager; private FileSystem fileSystem = new FileSystemImpl(); private List changeSets; boolean canceling = false; public SubversionRepositoryAdaptor(SubversionConfigDto globalConfig, ProjectConfigDto projectConfig, SubversionProjectConfigDto config, StateManager stateManager) throws ConfigException { this(globalConfig, projectConfig, config, stateManager, true); } protected SubversionRepositoryAdaptor(SubversionConfigDto globalConfig, ProjectConfigDto projectConfig, SubversionProjectConfigDto config, StateManager stateManager, boolean init) throws ConfigException { this( globalConfig, projectConfig, config, stateManager, init, getSelectedEnvironment( globalConfig.getProfiles(), config.getRepositoryProfile(), ""svn.profile.missing"")); } protected SubversionRepositoryAdaptor(SubversionConfigDto globalConfig, ProjectConfigDto projectConfig, SubversionProjectConfigDto config, StateManager stateManager, boolean init, SubversionRepositoryProfileDto profile) throws ConfigException { this( globalConfig, projectConfig, config, stateManager, profile, createRepository(profile, init)); } protected SubversionRepositoryAdaptor(SubversionConfigDto globalConfig, ProjectConfigDto projectConfig, SubversionProjectConfigDto config, StateManager stateManager, final SubversionRepositoryProfileDto profile, SVNRepository svnRepository) throws ConfigException { super(config, profile, svnRepository); this.stateManager = stateManager; this.projectConfig = projectConfig; this.projectName = projectConfig.getName(); if (globalConfig != null) { this.byteCounters = globalConfig.getWorkingCopyByteCounts(); } else { this.byteCounters = Collections.emptyMap(); } lineOfDevelopment.setPath(config.getPath()); lineOfDevelopment.setRepositoryRoot(profile.getRootUrl()); lineOfDevelopment.setTagFolderNames(new HashSet(Arrays.asList(globalConfig.getTagFolderNames()))); client.notification2(eventHandler); if (StringUtils.isNotBlank(profile.getUsername())) { client.setPrompt(new PromptUserPassword3() { public String getUsername() { return profile.getUsername(); } public String getPassword() { return profile.getPassword(); } public boolean prompt(String arg0, String arg1) { return true; } public boolean prompt(String arg0, String arg1, boolean arg2) { return true; } public boolean userAllowedSave() { return false; } public int askTrustSSLServer(String arg0, boolean arg1) { return PromptUserPassword2.AcceptTemporary; } public String askQuestion(String arg0, String arg1, boolean arg2, boolean arg3) { throw new UnsupportedOperationException(); } public String askQuestion(String arg0, String arg1, boolean arg2) { throw new UnsupportedOperationException(); } public boolean askYesNo(String arg0, String arg1, boolean arg2) { throw new UnsupportedOperationException(); } }); } } public boolean hasIncomingChanges(ProjectStatusDto previousStatus) throws RepositoryException { RevisionTokenDto rev = previousStatus.getRevision(); if (rev == null) { rev = previousStatus.getLastKnownRevision(); } if (rev == null) { return true; } return getLatestRevision(rev).getRevisionNum() > rev.getRevisionNum(); } public void prepareRepository(BuildDetailCallback buildDetailCallback) throws RepositoryException, InterruptedException { } public RevisionTokenDto getLatestRevision(RevisionTokenDto previousRevision) throws RepositoryException { final String path = lineOfDevelopment.getComputedRelativePath(); SVNDirEntry info; try { info = svnRepository.info(path, revision); } catch (SVNException e) { throw new RepositoryException(e); } if (info == null) { throw new RepositoryException(""svn.path.not.exist"", null, path); } final long lastChangedRevision = info.getRevision(); /* * Get the revision of the newest log entry for this path. * See Issue 95 (http://code.google.com/p/vulcan/issues/detail?id=95). */ final long mostRecentLogRevision = getMostRecentLogRevision(lastChangedRevision); revision = mostRecentLogRevision; if (config.getCheckoutDepth() == CheckoutDepth.Infinity || previousRevision == null) { return new RevisionTokenDto(revision, ""r"" + revision); } /* Issue 151 (http://code.google.com/p/vulcan/issues/detail?id=151): * Need to filter out irrelevant commits from sparse working copy. */ try { getChangeLog(previousRevision, new RevisionTokenDto(revision), null); if (changeSets.size() > 0) { String label = changeSets.get(changeSets.size()-1).getRevisionLabel(); revision = Long.valueOf(label.substring(1)); } else { // No commit logs matched means we're effectively at the old revision. // Need to check if the old revision exists on this path in case we're building // from a different branch/tag. try { info = svnRepository.info(path, previousRevision.getRevisionNum()); } catch (SVNException e) { throw new RepositoryException(e); } if (info != null) { revision = previousRevision.getRevisionNum(); } else { // Path doesn't exist at that revision. Use most recent commit // even though it didn't match our sparse working copy. revision = mostRecentLogRevision; } } } catch (RepositoryException e) { // Probably the path does not exist at the previousRevision. revision = mostRecentLogRevision; changeSets = null; } return new RevisionTokenDto(revision, ""r"" + revision); } public void createPristineWorkingCopy(BuildDetailCallback buildDetailCallback) throws RepositoryException { final File absolutePath = new File(projectConfig.getWorkDir()).getAbsoluteFile(); new RepositoryUtils(fileSystem).createOrCleanWorkingCopy(absolutePath, buildDetailCallback); synchronized (byteCounters) { if (byteCounters.containsKey(projectName)) { eventHandler.setPreviousFileCount(byteCounters.get(projectName).longValue()); } } eventHandler.setBuildDetailCallback(buildDetailCallback); final Revision svnRev = Revision.getInstance(revision); final boolean ignoreExternals = false; final boolean allowUnverObstructions = false; try { client.checkout( getCompleteSVNURL().toString(), absolutePath.toString(), svnRev, svnRev, config.getCheckoutDepth().getId(), ignoreExternals, allowUnverObstructions ); configureBugtraqIfNecessary(absolutePath); } catch (ClientException e) { if (!canceling) { throw new RepositoryException(e); } } catch (SVNException e) { throw new RepositoryException(e); } final boolean depthIsSticky = true; for (SparseCheckoutDto folder : config.getFolders()) { sparseUpdate(folder, absolutePath, svnRev, ignoreExternals, allowUnverObstructions, depthIsSticky); } synchronized (byteCounters) { byteCounters.put(projectName, eventHandler.getFileCount()); } } void sparseUpdate(SparseCheckoutDto folder, File workingCopyRootPath, final Revision svnRev, final boolean ignoreExternals, final boolean allowUnverObstructions, final boolean depthIsSticky) throws RepositoryException { final File dir = new File(workingCopyRootPath, folder.getDirectoryName()); final File parentDir = dir.getParentFile(); if (!parentDir.exists()) { final SparseCheckoutDto parentFolder = new SparseCheckoutDto(); parentFolder.setDirectoryName(new File(folder.getDirectoryName()).getParent()); parentFolder.setCheckoutDepth(CheckoutDepth.Empty); sparseUpdate(parentFolder, workingCopyRootPath, svnRev, ignoreExternals, allowUnverObstructions, depthIsSticky); } final String path = dir.toString(); try { client.update(path, svnRev, folder.getCheckoutDepth().getId(), depthIsSticky, ignoreExternals, allowUnverObstructions); } catch (ClientException e) { if (!canceling) { throw new RepositoryException(""svn.sparse.checkout.error"", e, folder.getDirectoryName()); } } } public void updateWorkingCopy(BuildDetailCallback buildDetailCallback) throws RepositoryException { final File absolutePath = new File(projectConfig.getWorkDir()).getAbsoluteFile(); try { final Revision svnRev = Revision.getInstance(revision); final boolean depthIsSticky = false; final boolean ignoreExternals = false; final boolean allowUnverObstructions = false; client.update(absolutePath.toString(), svnRev, SVNDepth.UNKNOWN.getId(), depthIsSticky, ignoreExternals, allowUnverObstructions); } catch (ClientException e) { if (!canceling) { throw new RepositoryException(e); } throw new RepositoryException(e); } } public boolean isWorkingCopy() { try { if (client.info(new File(projectConfig.getWorkDir()).getAbsolutePath()) != null) { return true; } } catch (ClientException ignore) { } return false; } public ChangeLogDto getChangeLog(RevisionTokenDto first, RevisionTokenDto last, OutputStream diffOutputStream) throws RepositoryException { final SVNRevision r1 = SVNRevision.create(first.getRevisionNum().longValue()); final SVNRevision r2 = SVNRevision.create(last.getRevisionNum().longValue()); if (changeSets == null) { changeSets = fetchChangeSets(r1, r2); if (this.config.getCheckoutDepth() != CheckoutDepth.Infinity) { final SparseChangeLogFilter filter = new SparseChangeLogFilter(this.config, this.lineOfDevelopment); filter.removeIrrelevantChangeSets(changeSets); } } if (diffOutputStream != null) { fetchDifferences(SVNRevision.create(diffStartRevision), r2, diffOutputStream); } final ChangeLogDto changeLog = new ChangeLogDto(); changeLog.setChangeSets(changeSets); return changeLog; } @SuppressWarnings(""unchecked"") public List getAvailableTagsAndBranches() throws RepositoryException { final String projectRoot = lineOfDevelopment.getComputedTagRoot(); final List tags = new ArrayList(); final RepositoryTagDto trunkTag = new RepositoryTagDto(); trunkTag.setDescription(""trunk""); trunkTag.setName(""trunk""); tags.add(trunkTag); try { final Collection entries = svnRepository.getDir(projectRoot, -1, null, (Collection) null); for (SVNDirEntry entry : entries) { final String folderName = entry.getName(); if (entry.getKind() == SVNNodeKind.DIR && lineOfDevelopment.isTag(folderName)) { addTags(projectRoot, folderName, tags); } } } catch (SVNException e) { throw new RepositoryException(e); } Collections.sort(tags, new Comparator() { public int compare(RepositoryTagDto t1, RepositoryTagDto t2) { return t1.getName().compareTo(t2.getName()); } }); return tags; } public String getRepositoryUrl() { try { return getCompleteSVNURL().toString(); } catch (SVNException e) { throw new RuntimeException(e); } } public String getTagOrBranch() { return lineOfDevelopment.getComputedTagName(); } public void setTagOrBranch(String tagName) { lineOfDevelopment.setAlternateTagName(tagName); } protected long getMostRecentLogRevision(final long lastChangedRevision) throws RepositoryException { final long[] commitRev = new long[1]; commitRev[0] = -1; final SVNLogClient logClient = new SVNLogClient( svnRepository.getAuthenticationManager(), options); final ISVNLogEntryHandler handler = new ISVNLogEntryHandler() { public void handleLogEntry(SVNLogEntry logEntry) throws SVNException { commitRev[0] = logEntry.getRevision(); } }; try { logClient.doLog(SVNURL.parseURIEncoded(profile.getRootUrl()), new String[] {lineOfDevelopment.getComputedRelativePath()}, SVNRevision.HEAD, SVNRevision.HEAD, SVNRevision.create(lastChangedRevision), true, false, 1, handler); } catch (SVNException e) { throw new RepositoryException(e); } // If for some reason there were zero log entries, default to Last Changed Revision. if (commitRev[0] < 0) { commitRev[0] = lastChangedRevision; } return commitRev[0]; } protected List fetchChangeSets(final SVNRevision r1, final SVNRevision r2) throws RepositoryException { final SVNLogClient logClient = new SVNLogClient(svnRepository.getAuthenticationManager(), options); logClient.setEventHandler(eventHandler); final List changeSets = new ArrayList(); diffStartRevision = r2.getNumber(); final ISVNLogEntryHandler handler = new ISVNLogEntryHandler() { @SuppressWarnings(""unchecked"") public void handleLogEntry(SVNLogEntry logEntry) { final long logEntryRevision = logEntry.getRevision(); if (diffStartRevision > logEntryRevision) { diffStartRevision = logEntryRevision; } if (logEntryRevision == r1.getNumber()) { /* The log message for r1 is in the previous build report. Don't include it twice. */ return; } final ChangeSetDto changeSet = new ChangeSetDto(); changeSet.setRevisionLabel(""r"" + logEntryRevision); changeSet.setAuthorName(logEntry.getAuthor()); changeSet.setMessage(logEntry.getMessage()); changeSet.setTimestamp(new Date(logEntry.getDate().getTime())); final Collection paths = ((Map) logEntry.getChangedPaths()).values(); for (SVNLogEntryPath path : paths) { changeSet.addModifiedPath(path.getPath(), toPathModification(path.getType())); } changeSets.add(changeSet); } private PathModification toPathModification(char type) { switch(type) { case SVNLogEntryPath.TYPE_ADDED: return PathModification.Add; case SVNLogEntryPath.TYPE_DELETED: return PathModification.Remove; case SVNLogEntryPath.TYPE_REPLACED: case SVNLogEntryPath.TYPE_MODIFIED: return PathModification.Modify; } return null; } }; try { logClient.doLog( SVNURL.parseURIEncoded(profile.getRootUrl()), new String[] {lineOfDevelopment.getComputedRelativePath()}, r1, r1, r2, true, true, 0, handler); } catch (SVNCancelException e) { } catch (SVNException e) { if (isFatal(e)) { throw new RepositoryException(e); } } return changeSets; } protected void fetchDifferences(final SVNRevision r1, final SVNRevision r2, OutputStream os) throws RepositoryException { final SVNDiffClient diffClient = new SVNDiffClient(svnRepository.getAuthenticationManager(), options); diffClient.setEventHandler(eventHandler); try { diffClient.doDiff(getCompleteSVNURL(), r1, r1, r2, SVNDepth.INFINITY, true, os); os.close(); } catch (SVNCancelException e) { } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_DAV_PATH_NOT_FOUND) { // This usually happens when building from a different branch or tag that // does not share ancestry with the previous build. log.info(""Failed to obtain diff of revisions r"" + r1.getNumber() + "":"" + r2.getNumber(), e); } else { throw new RepositoryException(e); } } catch (IOException e) { throw new RepositoryException(e); } } protected SVNURL getCompleteSVNURL() throws SVNException { return SVNURL.parseURIEncoded(lineOfDevelopment.getAbsoluteUrl()); } @SuppressWarnings(""unchecked"") private void addTags(String projectRoot, String folderName, List tags) throws SVNException { final String path = projectRoot + ""/"" + folderName; final Collection entries = svnRepository.getDir(path, -1, null, (Collection) null); for (SVNDirEntry entry : entries) { final String tagName = entry.getName(); if (entry.getKind() == SVNNodeKind.DIR) { RepositoryTagDto tag = new RepositoryTagDto(); tag.setName(folderName + ""/"" + tagName); tag.setDescription(tag.getName()); tags.add(tag); } } } private void configureBugtraqIfNecessary(File absolutePath) throws SVNException { if (!this.config.isObtainBugtraqProperties()) { return; } final ProjectConfigDto orig = stateManager.getProjectConfig(projectName); final SVNWCClient client = new SVNWCClient(svnRepository.getAuthenticationManager(), options); final SVNProperties bugtraqProps = new SVNProperties(); getWorkingCopyProperty(client, absolutePath, BUGTRAQ_URL, bugtraqProps); getWorkingCopyProperty(client, absolutePath, BUGTRAQ_MESSAGE, bugtraqProps); getWorkingCopyProperty(client, absolutePath, BUGTRAQ_LOGREGEX, bugtraqProps); final ProjectConfigDto projectConfig = (ProjectConfigDto) orig.copy(); configureBugtraq(projectConfig, bugtraqProps); if (!orig.equals(projectConfig)) { try { log.info(""Updating bugtraq information for project "" + projectName); stateManager.updateProjectConfig(projectName, projectConfig, false); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new RuntimeException(e); } } } private void getWorkingCopyProperty(final SVNWCClient client, File absolutePath, String propName, final SVNProperties bugtraqProps) throws SVNException { SVNPropertyData prop; prop = client.doGetProperty(absolutePath, propName, SVNRevision.BASE, SVNRevision.BASE); bugtraqProps.put(propName, getValueIfNotNull(prop)); } protected String getValueIfNotNull(SVNPropertyData prop) { if (prop != null) { final SVNPropertyValue value = prop.getValue(); if (value.isString()) { return value.getString(); } return SVNPropertyValue.getPropertyAsString(value); } return StringUtils.EMPTY; } private class EventHandler implements ISVNEventHandler, Notify2 { private long previousFileCount = -1; private long fileCount = 0; private BuildDetailCallback buildDetailCallback; public void onNotify(NotifyInformation info) { if (info.getAction() == NotifyAction.update_add) { fileCount++; PluginSupport.setWorkingCopyProgress(buildDetailCallback, fileCount, previousFileCount, ProgressUnit.Files); } else if (info.getAction() == NotifyAction.skip) { log.warn(""Skipping missing target: "" + info.getPath()); } if (Thread.interrupted()) { try { client.cancelOperation(); canceling = true; } catch (ClientException e) { log.error(""Error canceling svn operation"", e); } } } public void handleEvent(SVNEvent event, double progress) throws SVNException { } public void checkCancelled() throws SVNCancelException { if (Thread.interrupted()) { throw new SVNCancelException(); } } void setBuildDetailCallback(BuildDetailCallback buildDetailCallback) { this.buildDetailCallback = buildDetailCallback; } long getFileCount() { return fileCount; } void setPreviousFileCount(long previousByteCount) { this.previousFileCount = previousByteCount; } } } ",0 "ing studied this LAB you will able to: \n * - Understand the GPIO functions \n * - Study the programs related to the LCD Display. * * @section section2 Example6 : * Objective: Program to display Empty Triangle for one character. * * @section section3 Program Description: * This program demonstrates interfacing of LCD display and display empty triangle on it * * @section section4 Included Files: * * | Header Files | Source Files | * | :------------------------:| :------------------------:| * | @ref stm32f4xx_hal_conf.h | @ref stm32f4xx_hal_msp.c | * | @ref stm32f4xx_it.h | @ref stm32f4xx_it.c | * | @ref stm32f4_ask25_lcd.h | @ref stm32f4_ask25_lcd.c | * | | @ref main.c | * * \n * * @section section5 Pin Assignments * * | STM32F407 Reference | Device(ASK-25-LCD) | * | :------------------:| :----------------: | * | P1.21 GPIOB.1 | RS | * | P2.25 GPIOB.4 | R/W | * | P2.26 GPIOB.5 | EN | * | P1.26 GPIOE.8 | D0 | * | P1.27 GPIOE.9 | D1 | * | P1.28 GPIOE.10 | D2 | * | P1.29 GPIOE.11 | D3 | * | P1.30 GPIOE.12 | D4 | * | P1.31 GPIOE.13 | D5 | * | P1.32 GPIOE.14 | D6 | * | P1.33 GPIOE.15 | D7 | * * @section section6 Connection * | STM32F407 Reference | Device | * | :------------------:| :-------------: | * | J6 | ASK-25 (PL3) | * * @section section7 Program Folder Location * * * * @section section8 Part List * - STM32F4Discovery Board \n * - Flat cable \n * - USB cable \n * - Eclipse IDE \n * - PC \n * - ASK-25 Rev2.0 \n * * @section section9 Hardware Configuration * - Connect ASK 25 to educational practice board using flat cable. * - Connect the board using USB port of PC using USB cable. * - Apply Reset condition by pressing the Reset switch to ensure proper communication. * - Using download tool (STM ST-LINK Utility) download the .hex file developed using available tools. * - Reset the board. * - Observe the Output. * * @section section10 Output: * On LCD display you will see a empty triangle for only one character on starting location *\n *\n *******************************************************************************/ ",0 "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. * */ package benchmark.bcel.classfile; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import benchmark.bcel.Constants; /** * This class represents the table of exceptions that are thrown by a * method. This attribute may be used once per method. The name of * this class is ExceptionTable for historical reasons; The * Java Virtual Machine Specification, Second Edition defines this * attribute using the name Exceptions (which is inconsistent * with the other classes). * * @version $Id: ExceptionTable.java 386056 2006-03-15 11:31:56Z tcurdt $ * @author M. Dahm * @see Code */ public final class ExceptionTable extends Attribute { private int number_of_exceptions; // Table of indices into private int[] exception_index_table; // constant pool /** * Initialize from another object. Note that both objects use the same * references (shallow copy). Use copy() for a physical copy. */ public ExceptionTable(ExceptionTable c) { this(c.getNameIndex(), c.getLength(), c.getExceptionIndexTable(), c.getConstantPool()); } /** * @param name_index Index in constant pool * @param length Content length in bytes * @param exception_index_table Table of indices in constant pool * @param constant_pool Array of constants */ public ExceptionTable(int name_index, int length, int[] exception_index_table, ConstantPool constant_pool) { super(Constants.ATTR_EXCEPTIONS, name_index, length, constant_pool); setExceptionIndexTable(exception_index_table); } /** * Construct object from file stream. * @param name_index Index in constant pool * @param length Content length in bytes * @param file Input stream * @param constant_pool Array of constants * @throws IOException */ ExceptionTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException { this(name_index, length, (int[]) null, constant_pool); number_of_exceptions = file.readUnsignedShort(); exception_index_table = new int[number_of_exceptions]; for (int i = 0; i < number_of_exceptions; i++) { exception_index_table[i] = file.readUnsignedShort(); } } /** * Called by objects that are traversing the nodes of the tree implicitely * defined by the contents of a Java class. I.e., the hierarchy of methods, * fields, attributes, etc. spawns a tree of objects. * * @param v Visitor object */ public void accept( Visitor v ) { v.visitExceptionTable(this); } /** * Dump exceptions attribute to file stream in binary format. * * @param file Output file stream * @throws IOException */ public final void dump( DataOutputStream file ) throws IOException { super.dump(file); file.writeShort(number_of_exceptions); for (int i = 0; i < number_of_exceptions; i++) { file.writeShort(exception_index_table[i]); } } /** * @return Array of indices into constant pool of thrown exceptions. */ public final int[] getExceptionIndexTable() { return exception_index_table; } /** * @return Length of exception table. */ public final int getNumberOfExceptions() { return number_of_exceptions; } /** * @return class names of thrown exceptions */ public final String[] getExceptionNames() { String[] names = new String[number_of_exceptions]; for (int i = 0; i < number_of_exceptions; i++) { names[i] = constant_pool.getConstantString(exception_index_table[i], Constants.CONSTANT_Class).replace('/', '.'); } return names; } /** * @param exception_index_table the list of exception indexes * Also redefines number_of_exceptions according to table length. */ public final void setExceptionIndexTable( int[] exception_index_table ) { this.exception_index_table = exception_index_table; number_of_exceptions = (exception_index_table == null) ? 0 : exception_index_table.length; } /** * @return String representation, i.e., a list of thrown exceptions. */ public final String toString() { StringBuffer buf = new StringBuffer(""""); String str; for (int i = 0; i < number_of_exceptions; i++) { str = constant_pool.getConstantString(exception_index_table[i], Constants.CONSTANT_Class); buf.append(Utility.compactClassName(str, false)); if (i < number_of_exceptions - 1) { buf.append("", ""); } } return buf.toString(); } /** * @return deep copy of this attribute */ public Attribute copy( ConstantPool _constant_pool ) { ExceptionTable c = (ExceptionTable) clone(); if (exception_index_table != null) { c.exception_index_table = new int[exception_index_table.length]; System.arraycopy(exception_index_table, 0, c.exception_index_table, 0, exception_index_table.length); } c.constant_pool = _constant_pool; return c; } } ",0 ".0.html LGPL */ $GLOBALS['TL_LANG']['tl_linkslist_list']['title_legend'] = 'Titel'; $GLOBALS['TL_LANG']['tl_linkslist_list']['config_legend'] = 'Einstellungen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['name'][0] = 'Titel'; $GLOBALS['TL_LANG']['tl_linkslist_list']['name'][1] = 'Geben Sie hier den Linklist Titel ein.'; $GLOBALS['TL_LANG']['tl_linkslist_list']['new'][0] = 'Neue Linkliste'; $GLOBALS['TL_LANG']['tl_linkslist_list']['new'][1] = 'Eine neue Linkliste anlegen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['edit'][0] = 'Linkliste bearbeiten'; $GLOBALS['TL_LANG']['tl_linkslist_list']['edit'][1] = 'Linkliste ID %s bearbeiten'; $GLOBALS['TL_LANG']['tl_linkslist_list']['delete'][0] = 'Linkliste löschen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['delete'][1] = 'Linkliste ID %s löchen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['show'][0] = 'Linklistendetails'; $GLOBALS['TL_LANG']['tl_linkslist_list']['show'][1] = 'Details der Linkliste ID %s anzeigen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['target'][0] = 'Links in neuem Fenster öffnen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['target'][1] = 'Bitte wählen sie aus, ob die Links in einem neuen Fenster geöffnet werden sollen (target=""_blank"").'; ?>",0 "@if(Context.current().args.getOrDefault(""sidebar.isBefore"", java.lang.Boolean.valueOf(""true"")) == true) { @if(JudgelsPlayUtils.isSidebarShown(Context.current().request())) {
          @sidebarContent
          } @if(JudgelsPlayUtils.isSidebarShown(Context.current().request())) {
          } else {
          } @viewMenuView()
          @content
          } else { @if(JudgelsPlayUtils.isSidebarShown(Context.current().request())) {
          } else {
          }
          @viewMenuView()
          @content
          @if(JudgelsPlayUtils.isSidebarShown(Context.current().request())) {
          @sidebarContent
          } }
          ",0 " by javadoc (build 1.6.0_25) on Wed Feb 01 21:06:23 MST 2012 --> API Help
          Overview  Package  Class  Use  Tree  Deprecated  Index   Help 
           PREV   NEXT FRAMES    NO FRAMES    

          How This API Document Is Organized

          This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

          Overview

          The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

          Package

          Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

          • Interfaces (italic)
          • Classes
          • Enums
          • Exceptions
          • Errors
          • Annotation Types

          Class/Interface

          Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

          • Class inheritance diagram
          • Direct Subclasses
          • All Known Subinterfaces
          • All Known Implementing Classes
          • Class/interface declaration
          • Class/interface description

          • Nested Class Summary
          • Field Summary
          • Constructor Summary
          • Method Summary

          • Field Detail
          • Constructor Detail
          • Method Detail
          Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

          Annotation Type

          Each annotation type has its own separate page with the following sections:

          • Annotation Type declaration
          • Annotation Type description
          • Required Element Summary
          • Optional Element Summary
          • Element Detail

          Enum

          Each enum has its own separate page with the following sections:

          • Enum declaration
          • Enum description
          • Enum Constant Summary
          • Enum Constant Detail

          Use

          Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the ""Use"" link in the navigation bar.

          Tree (Class Hierarchy)

          There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
          • When viewing the Overview page, clicking on ""Tree"" displays the hierarchy for all packages.
          • When viewing a particular package, class or interface page, clicking ""Tree"" displays the hierarchy for only that package.

          Deprecated API

          The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

          Index

          The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

          Prev/Next

          These links take you to the next or previous class, interface, package, or related page.

          Frames/No Frames

          These links show and hide the HTML frames. All pages are available with or without frames.

          Serialized Form

          Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking ""Serialized Form"" in the ""See also"" section of the class description.

          Constant Field Values

          The Constant Field Values page lists the static final fields and their values.

          This help file applies to API documentation generated using the standard doclet.


          Overview  Package  Class  Use  Tree  Deprecated  Index   Help 
           PREV   NEXT FRAMES    NO FRAMES    

          ",0 "a name=""generator"" content=""rustdoc""> servo::script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants::TEXTURE_CUBE_MAP_NEGATIVE_Z - Rust

          servo::script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants

          servo::script::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants::TEXTURE_CUBE_MAP_NEGATIVE_Z [] [src]

          pub const TEXTURE_CUBE_MAP_NEGATIVE_Z: u32 = 34074

          Keyboard Shortcuts

          ?
          Show this help dialog
          S
          Focus the search field
          Move up in search results
          Move down in search results
          Go to active search result

          Search Tricks

          Prefix searches with a type followed by a colon (e.g. fn:) to restrict the search to a given type.

          Accepted types are: fn, mod, struct, enum, trait, type, macro, and const.

          Search functions by type signature (e.g. vec -> usize)

          ",0 "eaton Research, Inc. * * 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. * * For more information on Heaton Research copyrights, licenses * and trademarks visit: * http://www.heatonresearch.com/copyright */ package org.encog.engine.network.activation; /** * Linear activation function that bounds the output to [-1,+1]. This * activation is typically part of a CPPN neural network, such as * HyperNEAT. *

          * The idea for this activation function was developed by Ken Stanley, of * the University of Texas at Austin. * http://www.cs.ucf.edu/~kstanley/ */ public class ActivationClippedLinear implements ActivationFunction { @Override public void activationFunction(double[] d, int start, int size) { for (int i = start; i < start + size; i++) { if (d[i] < -1.0) { d[i] = -1.0; } if (d[i] > 1.0) { d[i] = 1.0; } } } /** * {@inheritDoc} */ @Override public double derivativeFunction(double b, double a) { return 1; } /** * {@inheritDoc} */ @Override public boolean hasDerivative() { return true; } /** * {@inheritDoc} */ @Override public double[] getParams() { return ActivationLinear.P; } /** * {@inheritDoc} */ @Override public void setParam(int index, double value) { } /** * {@inheritDoc} */ @Override public String[] getParamNames() { return ActivationLinear.N; } /** * {@inheritDoc} */ @Override public final ActivationFunction clone() { return new ActivationClippedLinear(); } /** * {@inheritDoc} */ @Override public String getFactoryCode() { return null; } } ",0 ")

          Cadastro de Textos

          Título
          Imagem
          Texto
          BasePath = ""/fckeditor/""; $oFCKeditor->Height = '300'; echo $oFCKeditor->CreateHtml(); ?>
          Cancelar
          @include('layout.rodape') @stop",0 "in 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. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.people.v1.model; /** * The response for deleting a contact's photo. * *

          This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the People API. For a detailed explanation see: * https://developers.google.com/api-client-library/java/google-http-java-client/json *

          * * @author Google, Inc. */ @SuppressWarnings(""javadoc"") public final class DeleteContactPhotoResponse extends com.google.api.client.json.GenericJson { /** * The updated person, if person_fields is set in the DeleteContactPhotoRequest; otherwise this * will be unset. * The value may be {@code null}. */ @com.google.api.client.util.Key private Person person; /** * The updated person, if person_fields is set in the DeleteContactPhotoRequest; otherwise this * will be unset. * @return value or {@code null} for none */ public Person getPerson() { return person; } /** * The updated person, if person_fields is set in the DeleteContactPhotoRequest; otherwise this * will be unset. * @param person person or {@code null} for none */ public DeleteContactPhotoResponse setPerson(Person person) { this.person = person; return this; } @Override public DeleteContactPhotoResponse set(String fieldName, Object value) { return (DeleteContactPhotoResponse) super.set(fieldName, value); } @Override public DeleteContactPhotoResponse clone() { return (DeleteContactPhotoResponse) super.clone(); } } ",0 "ile 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. ==============================================================================*/ #ifndef TENSORFLOW_CORE_KERNELS_EIG_OP_IMPL_H_ #define TENSORFLOW_CORE_KERNELS_EIG_OP_IMPL_H_ // See docs in ../ops/linalg_ops.cc. #include ""third_party/eigen3/Eigen/Core"" #include ""third_party/eigen3/Eigen/Eigenvalues"" #include ""tensorflow/core/framework/kernel_def_builder.h"" #include ""tensorflow/core/framework/op_kernel.h"" #include ""tensorflow/core/framework/tensor_shape.h"" #include ""tensorflow/core/kernels/linalg_ops_common.h"" #include ""tensorflow/core/lib/core/errors.h"" #include ""tensorflow/core/platform/denormal.h"" #include ""tensorflow/core/platform/logging.h"" #include ""tensorflow/core/platform/types.h"" namespace tensorflow { template class EigOp : public LinearAlgebraOp { public: typedef LinearAlgebraOp Base; explicit EigOp(OpKernelConstruction* context) : Base(context) { OP_REQUIRES_OK(context, context->GetAttr(""compute_v"", &compute_v_)); } using TensorShapes = typename Base::TensorShapes; using InputMatrix = typename Base::InputMatrix; using InputMatrixMaps = typename Base::InputMatrixMaps; using InputConstMatrixMap = typename Base::InputConstMatrixMap; using InputConstMatrixMaps = typename Base::InputConstMatrixMaps; using OutputMatrix = typename Base::OutputMatrix; using OutputMatrixMaps = typename Base::OutputMatrixMaps; using OutputConstMatrixMap = typename Base::OutputConstMatrixMap; using OutputConstMatrixMaps = typename Base::OutputConstMatrixMaps; TensorShapes GetOutputMatrixShapes( const TensorShapes& input_matrix_shapes) const final { int64 n = input_matrix_shapes[0].dim_size(0); if (compute_v_) { return TensorShapes({TensorShape({n}), TensorShape({n, n})}); } else { return TensorShapes({TensorShape({n})}); } } void ComputeMatrix(OpKernelContext* context, const InputConstMatrixMaps& inputs, OutputMatrixMaps* outputs) final { const int64 rows = inputs[0].rows(); if (rows == 0) { // If X is an empty matrix (0 rows, 0 col), X * X' == X. // Therefore, we return X. return; } // This algorithm relies on denormals, so switch them back on locally. port::ScopedDontFlushDenormal dont_flush_denormals; Eigen::ComplexEigenSolver eig( inputs[0], compute_v_ ? Eigen::ComputeEigenvectors : Eigen::EigenvaluesOnly); // TODO(rmlarsen): Output more detailed error info on failure. OP_REQUIRES( context, eig.info() == Eigen::Success, errors::InvalidArgument(""Eigen decomposition was not "" ""successful. The input might not be valid."")); outputs->at(0) = eig.eigenvalues().template cast(); if (compute_v_) { outputs->at(1) = eig.eigenvectors(); } } private: bool compute_v_; }; } // namespace tensorflow #endif // TENSORFLOW_CORE_KERNELS_EIG_OP_IMPL_H_ ",0 "****************************************************************************/ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Adapted from LAM-MPI implementation. */ #include #include #include /* Number of estimations. */ #define NUM_ITER 1000 int main(int argc, char *argv[]) { int iter, rank, size, i; double PI25DT = 3.141592653589793238462643; double mypi, pi, h, sum, x; double startwtime = 0.0, endwtime; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); for (iter = 2; iter < NUM_ITER; ++iter) { h = 1.0 / (double) iter; sum = 0.0; startwtime = MPI_Wtime(); for (i = rank + 1; i <= iter; i += size) { x = h * ((double) i - 0.5); sum += 4.0 / (1.0 + x * x); } mypi = h * sum; MPI_Reduce(&mypi, &pi, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); if (rank == 0) { printf(""%d points: PI is approximately %.16f, error = %.16f\n"", iter, pi, fabs(pi - PI25DT)); endwtime = MPI_Wtime(); printf(""[%d] Wall clock time = %f\n"", rank, endwtime - startwtime); fflush(stdout); } else { endwtime = MPI_Wtime(); printf(""[%d] Wall clock time = %f\n"", rank, endwtime - startwtime); } } MPI_Finalize(); return 0; } ",0 "s of use. */ #ifndef WT_DBO_FIELD_IMPL_H_ #define WT_DBO_FIELD_IMPL_H_ #include #include #include #include #include namespace Wt { namespace Dbo { template FieldRef::FieldRef(V& value, const std::string& name, int size) : value_(value), name_(name), size_(size) { } template const std::string& FieldRef::name() const { return name_; } template int FieldRef::size() const { return size_; } template std::string FieldRef::sqlType(Session& session) const { return sql_value_traits::type(session.connection(false), size_); } template const std::type_info *FieldRef::type() const { return &typeid(V); } template void FieldRef::bindValue(SqlStatement *statement, int column) const { sql_value_traits::bind(value_, statement, column, size_); } template void FieldRef::setValue(Session& session, SqlStatement *statement, int column) const { sql_value_traits::read(value_, statement, column, size_); } template CollectionRef::CollectionRef(collection< ptr >& value, RelationType type, const std::string& joinName, const std::string& joinId, int fkConstraints) : value_(value), joinName_(joinName), joinId_(joinId), type_(type), fkConstraints_(fkConstraints) { } template PtrRef::PtrRef(ptr& value, const std::string& name, int size, int fkConstraints) : value_(value), name_(name), size_(size), fkConstraints_(fkConstraints) { } template struct LoadLazyHelper { static void loadLazy(ptr& p, typename dbo_traits::IdType id, Session *session) { } }; template struct LoadLazyHelper >::type> { static void loadLazy(ptr& p, typename dbo_traits::IdType id, Session *session) { if (!(id == dbo_traits::invalidId())) { if (session) p = session->loadLazy(id); else throw Exception(""Could not load referenced Dbo::ptr, no session?""); } } }; template template void PtrRef::visit(A& action, Session *session) const { typename dbo_traits::IdType id; if (action.setsValue()) id = dbo_traits::invalidId(); else id = value_.id(); std::string idFieldName = ""stub""; int size = size_; if (session) { Impl::MappingInfo *mapping = session->getMapping(); action.actMapping(mapping); idFieldName = mapping->naturalIdFieldName; size = mapping->naturalIdFieldSize; if (idFieldName.empty()) idFieldName = mapping->surrogateIdFieldName; } field(action, id, name_ + ""_"" + idFieldName, size); LoadLazyHelper::loadLazy(value_, id, session); } template WeakPtrRef::WeakPtrRef(weak_ptr& value, const std::string& joinName) : value_(value), joinName_(joinName) { } template const std::type_info *PtrRef::type() const { return &typeid(typename dbo_traits::IdType); } template void id(A& action, V& value, const std::string& name, int size) { action.actId(value, name, size); } template void id(A& action, ptr& value, const std::string& name, ForeignKeyConstraint constraint, int size) { action.actId(value, name, size, constraint.value()); } template void field(A& action, V& value, const std::string& name, int size) { action.act(FieldRef(value, name, size)); } template void field(A& action, ptr& value, const std::string& name, int size) { action.actPtr(PtrRef(value, name, size, 0)); } template void belongsToImpl(A& action, ptr& value, const std::string& name, int fkConstraints, int size) { if (name.empty() && action.session()) action.actPtr(PtrRef(value, action.session()->template tableName(), size, fkConstraints)); else action.actPtr(PtrRef(value, name, size, fkConstraints)); } template void belongsTo(A& action, ptr& value, const std::string& name, int size) { belongsToImpl(action, value, name, 0, size); } template void belongsTo(A& action, ptr& value, const std::string& name, ForeignKeyConstraint constraint, int size) { belongsToImpl(action, value, name, constraint.value(), size); } template void belongsTo(A& action, ptr& value, ForeignKeyConstraint constraint, int size) { belongsToImpl(action, value, std::string(), constraint.value(), size); } template void hasOne(A& action, weak_ptr& value, const std::string& joinName) { action.actWeakPtr(WeakPtrRef(value, joinName)); } template void hasMany(A& action, collection< ptr >& value, RelationType type, const std::string& joinName) { action.actCollection(CollectionRef(value, type, joinName, std::string(), Impl::FKNotNull | Impl::FKOnDeleteCascade)); } template void hasMany(A& action, collection< ptr >& value, RelationType type, const std::string& joinName, const std::string& joinId, ForeignKeyConstraint constraint) { if (type != ManyToMany) throw Exception(""hasMany() with named joinId only for a ManyToMany relation""); action.actCollection(CollectionRef(value, type, joinName, joinId, constraint.value())); } } } #endif // WT_DBO_FIELD_IMPL_H_ ",0 "perationExtensibility.*; public class TestEvaluator { private static Visitor v; @BeforeClass public static void setUpBeforeClass() throws Exception { v = new Evaluator(); } @Test public void testLit() { Lit x = new Lit(); x.setInfo(42); assertEquals(""evaluate a literal"", 42, x.accept(v)); } @Test public void testAdd() { Add x = new Add(); Lit y = new Lit(); y.setInfo(1); x.setLeft(y); y = new Lit(); y.setInfo(2); x.setRight(y); assertEquals(""evaluate addition"", 3, x.accept(v)); } } ",0 "T * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the MIT license. For more information, see * . */ namespace Doctrine\ORM; use Exception; use Doctrine\Common\EventManager; use Doctrine\Common\Persistence\ObjectManager; use Doctrine\DBAL\Connection; use Doctrine\DBAL\LockMode; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Mapping\ClassMetadataFactory; use Doctrine\ORM\Query\ResultSetMapping; use Doctrine\ORM\Proxy\ProxyFactory; use Doctrine\ORM\Query\FilterCollection; use Doctrine\Common\Util\ClassUtils; /** * The EntityManager is the central access point to ORM functionality. * * It is a facade to all different ORM subsystems such as UnitOfWork, * Query Language and Repository API. Instantiation is done through * the static create() method. The quickest way to obtain a fully * configured EntityManager is: * * use Doctrine\ORM\Tools\Setup; * use Doctrine\ORM\EntityManager; * * $paths = array('/path/to/entity/mapping/files'); * * $config = Setup::createAnnotationMetadataConfiguration($paths); * $dbParams = array('driver' => 'pdo_sqlite', 'memory' => true); * $entityManager = EntityManager::create($dbParams, $config); * * For more information see * {@link http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/configuration.html} * * You should never attempt to inherit from the EntityManager: Inheritance * is not a valid extension point for the EntityManager. Instead you * should take a look at the {@see \Doctrine\ORM\Decorator\EntityManagerDecorator} * and wrap your entity manager in a decorator. * * @since 2.0 * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel */ /* final */class EntityManager implements EntityManagerInterface { /** * The used Configuration. * * @var \Doctrine\ORM\Configuration */ private $config; /** * The database connection used by the EntityManager. * * @var \Doctrine\DBAL\Connection */ private $conn; /** * The metadata factory, used to retrieve the ORM metadata of entity classes. * * @var \Doctrine\ORM\Mapping\ClassMetadataFactory */ private $metadataFactory; /** * The UnitOfWork used to coordinate object-level transactions. * * @var \Doctrine\ORM\UnitOfWork */ private $unitOfWork; /** * The event manager that is the central point of the event system. * * @var \Doctrine\Common\EventManager */ private $eventManager; /** * The proxy factory used to create dynamic proxies. * * @var \Doctrine\ORM\Proxy\ProxyFactory */ private $proxyFactory; /** * The repository factory used to create dynamic repositories. * * @var \Doctrine\ORM\Repository\RepositoryFactory */ private $repositoryFactory; /** * The expression builder instance used to generate query expressions. * * @var \Doctrine\ORM\Query\Expr */ private $expressionBuilder; /** * Whether the EntityManager is closed or not. * * @var bool */ private $closed = false; /** * Collection of query filters. * * @var \Doctrine\ORM\Query\FilterCollection */ private $filterCollection; /** * Creates a new EntityManager that operates on the given database connection * and uses the given Configuration and EventManager implementations. * * @param \Doctrine\DBAL\Connection $conn * @param \Doctrine\ORM\Configuration $config * @param \Doctrine\Common\EventManager $eventManager */ protected function __construct(Connection $conn, Configuration $config, EventManager $eventManager) { $this->conn = $conn; $this->config = $config; $this->eventManager = $eventManager; $metadataFactoryClassName = $config->getClassMetadataFactoryName(); $this->metadataFactory = new $metadataFactoryClassName; $this->metadataFactory->setEntityManager($this); $this->metadataFactory->setCacheDriver($this->config->getMetadataCacheImpl()); $this->repositoryFactory = $config->getRepositoryFactory(); $this->unitOfWork = new UnitOfWork($this); $this->proxyFactory = new ProxyFactory( $this, $config->getProxyDir(), $config->getProxyNamespace(), $config->getAutoGenerateProxyClasses() ); } /** * {@inheritDoc} */ public function getConnection() { return $this->conn; } /** * Gets the metadata factory used to gather the metadata of classes. * * @return \Doctrine\ORM\Mapping\ClassMetadataFactory */ public function getMetadataFactory() { return $this->metadataFactory; } /** * {@inheritDoc} */ public function getExpressionBuilder() { if ($this->expressionBuilder === null) { $this->expressionBuilder = new Query\Expr; } return $this->expressionBuilder; } /** * {@inheritDoc} */ public function beginTransaction() { $this->conn->beginTransaction(); } /** * {@inheritDoc} */ public function transactional($func) { if (!is_callable($func)) { throw new \InvalidArgumentException('Expected argument of type ""callable"", got ""' . gettype($func) . '""'); } $this->conn->beginTransaction(); try { $return = call_user_func($func, $this); $this->flush(); $this->conn->commit(); return $return ?: true; } catch (Exception $e) { $this->close(); $this->conn->rollback(); throw $e; } } /** * {@inheritDoc} */ public function commit() { $this->conn->commit(); } /** * {@inheritDoc} */ public function rollback() { $this->conn->rollback(); } /** * Returns the ORM metadata descriptor for a class. * * The class name must be the fully-qualified class name without a leading backslash * (as it is returned by get_class($obj)) or an aliased class name. * * Examples: * MyProject\Domain\User * sales:PriceRequest * * @param string $className * * @return \Doctrine\ORM\Mapping\ClassMetadata * * @internal Performance-sensitive method. */ public function getClassMetadata($className) { return $this->metadataFactory->getMetadataFor($className); } /** * {@inheritDoc} */ public function createQuery($dql = '') { $query = new Query($this); if ( ! empty($dql)) { $query->setDql($dql); } return $query; } /** * {@inheritDoc} */ public function createNamedQuery($name) { return $this->createQuery($this->config->getNamedQuery($name)); } /** * {@inheritDoc} */ public function createNativeQuery($sql, ResultSetMapping $rsm) { $query = new NativeQuery($this); $query->setSql($sql); $query->setResultSetMapping($rsm); return $query; } /** * {@inheritDoc} */ public function createNamedNativeQuery($name) { list($sql, $rsm) = $this->config->getNamedNativeQuery($name); return $this->createNativeQuery($sql, $rsm); } /** * {@inheritDoc} */ public function createQueryBuilder() { return new QueryBuilder($this); } /** * Flushes all changes to objects that have been queued up to now to the database. * This effectively synchronizes the in-memory state of managed objects with the * database. * * If an entity is explicitly passed to this method only this entity and * the cascade-persist semantics + scheduled inserts/removals are synchronized. * * @param null|object|array $entity * * @return void * * @throws \Doctrine\ORM\OptimisticLockException If a version check on an entity that * makes use of optimistic locking fails. */ public function flush($entity = null) { $this->errorIfClosed(); $this->unitOfWork->commit($entity); } /** * Finds an Entity by its identifier. * * @param string $entityName * @param mixed $id * @param integer $lockMode * @param integer|null $lockVersion * * @return object|null The entity instance or NULL if the entity can not be found. * * @throws OptimisticLockException * @throws ORMInvalidArgumentException * @throws TransactionRequiredException * @throws ORMException */ public function find($entityName, $id, $lockMode = LockMode::NONE, $lockVersion = null) { $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); if (is_object($id) && $this->metadataFactory->hasMetadataFor(ClassUtils::getClass($id))) { $id = $this->unitOfWork->getSingleIdentifierValue($id); if ($id === null) { throw ORMInvalidArgumentException::invalidIdentifierBindingEntity(); } } if ( ! is_array($id)) { $id = array($class->identifier[0] => $id); } $sortedId = array(); foreach ($class->identifier as $identifier) { if ( ! isset($id[$identifier])) { throw ORMException::missingIdentifierField($class->name, $identifier); } $sortedId[$identifier] = $id[$identifier]; } $unitOfWork = $this->getUnitOfWork(); // Check identity map first if (($entity = $unitOfWork->tryGetById($sortedId, $class->rootEntityName)) !== false) { if ( ! ($entity instanceof $class->name)) { return null; } switch ($lockMode) { case LockMode::OPTIMISTIC: $this->lock($entity, $lockMode, $lockVersion); break; case LockMode::PESSIMISTIC_READ: case LockMode::PESSIMISTIC_WRITE: $persister = $unitOfWork->getEntityPersister($class->name); $persister->refresh($sortedId, $entity, $lockMode); break; } return $entity; // Hit! } $persister = $unitOfWork->getEntityPersister($class->name); switch ($lockMode) { case LockMode::NONE: return $persister->load($sortedId); case LockMode::OPTIMISTIC: if ( ! $class->isVersioned) { throw OptimisticLockException::notVersioned($class->name); } $entity = $persister->load($sortedId); $unitOfWork->lock($entity, $lockMode, $lockVersion); return $entity; default: if ( ! $this->getConnection()->isTransactionActive()) { throw TransactionRequiredException::transactionRequired(); } return $persister->load($sortedId, null, null, array(), $lockMode); } } /** * {@inheritDoc} */ public function getReference($entityName, $id) { $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); if ( ! is_array($id)) { $id = array($class->identifier[0] => $id); } $sortedId = array(); foreach ($class->identifier as $identifier) { if ( ! isset($id[$identifier])) { throw ORMException::missingIdentifierField($class->name, $identifier); } $sortedId[$identifier] = $id[$identifier]; } // Check identity map first, if its already in there just return it. if (($entity = $this->unitOfWork->tryGetById($sortedId, $class->rootEntityName)) !== false) { return ($entity instanceof $class->name) ? $entity : null; } if ($class->subClasses) { return $this->find($entityName, $sortedId); } if ( ! is_array($sortedId)) { $sortedId = array($class->identifier[0] => $sortedId); } $entity = $this->proxyFactory->getProxy($class->name, $sortedId); $this->unitOfWork->registerManaged($entity, $sortedId, array()); return $entity; } /** * {@inheritDoc} */ public function getPartialReference($entityName, $identifier) { $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); // Check identity map first, if its already in there just return it. if (($entity = $this->unitOfWork->tryGetById($identifier, $class->rootEntityName)) !== false) { return ($entity instanceof $class->name) ? $entity : null; } if ( ! is_array($identifier)) { $identifier = array($class->identifier[0] => $identifier); } $entity = $class->newInstance(); $class->setIdentifierValues($entity, $identifier); $this->unitOfWork->registerManaged($entity, $identifier, array()); $this->unitOfWork->markReadOnly($entity); return $entity; } /** * Clears the EntityManager. All entities that are currently managed * by this EntityManager become detached. * * @param string|null $entityName if given, only entities of this type will get detached * * @return void */ public function clear($entityName = null) { $this->unitOfWork->clear($entityName); } /** * {@inheritDoc} */ public function close() { $this->clear(); $this->closed = true; } /** * Tells the EntityManager to make an instance managed and persistent. * * The entity will be entered into the database at or before transaction * commit or as a result of the flush operation. * * NOTE: The persist operation always considers entities that are not yet known to * this EntityManager as NEW. Do not pass detached entities to the persist operation. * * @param object $entity The instance to make managed and persistent. * * @return void * * @throws ORMInvalidArgumentException */ public function persist($entity) { if ( ! is_object($entity)) { throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()' , $entity); } $this->errorIfClosed(); $this->unitOfWork->persist($entity); } /** * Removes an entity instance. * * A removed entity will be removed from the database at or before transaction commit * or as a result of the flush operation. * * @param object $entity The entity instance to remove. * * @return void * * @throws ORMInvalidArgumentException */ public function remove($entity) { if ( ! is_object($entity)) { throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()' , $entity); } $this->errorIfClosed(); $this->unitOfWork->remove($entity); } /** * Refreshes the persistent state of an entity from the database, * overriding any local changes that have not yet been persisted. * * @param object $entity The entity to refresh. * * @return void * * @throws ORMInvalidArgumentException */ public function refresh($entity) { if ( ! is_object($entity)) { throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()' , $entity); } $this->errorIfClosed(); $this->unitOfWork->refresh($entity); } /** * Detaches an entity from the EntityManager, causing a managed entity to * become detached. Unflushed changes made to the entity if any * (including removal of the entity), will not be synchronized to the database. * Entities which previously referenced the detached entity will continue to * reference it. * * @param object $entity The entity to detach. * * @return void * * @throws ORMInvalidArgumentException */ public function detach($entity) { if ( ! is_object($entity)) { throw ORMInvalidArgumentException::invalidObject('EntityManager#detach()' , $entity); } $this->unitOfWork->detach($entity); } /** * Merges the state of a detached entity into the persistence context * of this EntityManager and returns the managed copy of the entity. * The entity passed to merge will not become associated/managed with this EntityManager. * * @param object $entity The detached entity to merge into the persistence context. * * @return object The managed copy of the entity. * * @throws ORMInvalidArgumentException */ public function merge($entity) { if ( ! is_object($entity)) { throw ORMInvalidArgumentException::invalidObject('EntityManager#merge()' , $entity); } $this->errorIfClosed(); return $this->unitOfWork->merge($entity); } /** * {@inheritDoc} * * @todo Implementation need. This is necessary since $e2 = clone $e1; throws an E_FATAL when access anything on $e: * Fatal error: Maximum function nesting level of '100' reached, aborting! */ public function copy($entity, $deep = false) { throw new \BadMethodCallException(""Not implemented.""); } /** * {@inheritDoc} */ public function lock($entity, $lockMode, $lockVersion = null) { $this->unitOfWork->lock($entity, $lockMode, $lockVersion); } /** * Gets the repository for an entity class. * * @param string $entityName The name of the entity. * * @return \Doctrine\ORM\EntityRepository The repository class. */ public function getRepository($entityName) { return $this->repositoryFactory->getRepository($this, $entityName); } /** * Determines whether an entity instance is managed in this EntityManager. * * @param object $entity * * @return boolean TRUE if this EntityManager currently manages the given entity, FALSE otherwise. */ public function contains($entity) { return $this->unitOfWork->isScheduledForInsert($entity) || $this->unitOfWork->isInIdentityMap($entity) && ! $this->unitOfWork->isScheduledForDelete($entity); } /** * {@inheritDoc} */ public function getEventManager() { return $this->eventManager; } /** * {@inheritDoc} */ public function getConfiguration() { return $this->config; } /** * Throws an exception if the EntityManager is closed or currently not active. * * @return void * * @throws ORMException If the EntityManager is closed. */ private function errorIfClosed() { if ($this->closed) { throw ORMException::entityManagerClosed(); } } /** * {@inheritDoc} */ public function isOpen() { return (!$this->closed); } /** * {@inheritDoc} */ public function getUnitOfWork() { return $this->unitOfWork; } /** * {@inheritDoc} */ public function getHydrator($hydrationMode) { return $this->newHydrator($hydrationMode); } /** * {@inheritDoc} */ public function newHydrator($hydrationMode) { switch ($hydrationMode) { case Query::HYDRATE_OBJECT: return new Internal\Hydration\ObjectHydrator($this); case Query::HYDRATE_ARRAY: return new Internal\Hydration\ArrayHydrator($this); case Query::HYDRATE_SCALAR: return new Internal\Hydration\ScalarHydrator($this); case Query::HYDRATE_SINGLE_SCALAR: return new Internal\Hydration\SingleScalarHydrator($this); case Query::HYDRATE_SIMPLEOBJECT: return new Internal\Hydration\SimpleObjectHydrator($this); default: if (($class = $this->config->getCustomHydrationMode($hydrationMode)) !== null) { return new $class($this); } } throw ORMException::invalidHydrationMode($hydrationMode); } /** * {@inheritDoc} */ public function getProxyFactory() { return $this->proxyFactory; } /** * {@inheritDoc} */ public function initializeObject($obj) { $this->unitOfWork->initializeObject($obj); } /** * Factory method to create EntityManager instances. * * @param mixed $conn An array with the connection parameters or an existing Connection instance. * @param Configuration $config The Configuration instance to use. * @param EventManager $eventManager The EventManager instance to use. * * @return EntityManager The created EntityManager. * * @throws \InvalidArgumentException * @throws ORMException */ public static function create($conn, Configuration $config, EventManager $eventManager = null) { if ( ! $config->getMetadataDriverImpl()) { throw ORMException::missingMappingDriverImpl(); } switch (true) { case (is_array($conn)): $conn = \Doctrine\DBAL\DriverManager::getConnection( $conn, $config, ($eventManager ?: new EventManager()) ); break; case ($conn instanceof Connection): if ($eventManager !== null && $conn->getEventManager() !== $eventManager) { throw ORMException::mismatchedEventManager(); } break; default: throw new \InvalidArgumentException(""Invalid argument: "" . $conn); } return new EntityManager($conn, $config, $conn->getEventManager()); } /** * {@inheritDoc} */ public function getFilters() { if (null === $this->filterCollection) { $this->filterCollection = new FilterCollection($this); } return $this->filterCollection; } /** * {@inheritDoc} */ public function isFiltersStateClean() { return null === $this->filterCollection || $this->filterCollection->isClean(); } /** * {@inheritDoc} */ public function hasFilters() { return null !== $this->filterCollection; } } ",0 "nses/LICENSE-2.0>. */ package org.hibernate.beanvalidation.tck.tests.constraints.application.method; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; /** * @author Gunnar Morling */ @Constraint(validatedBy = OnlineCalendarServiceValidator.class) @Target({ METHOD, CONSTRUCTOR, ANNOTATION_TYPE }) @Retention(RUNTIME) @Documented public @interface OnlineCalendarService { String message() default ""{validation.onlineCalendarService}""; Class[] groups() default { }; Class[] payload() default { }; } ",0 "ilter; use yii\web\Controller; class SiteController extends Controller { public function behaviors() { return [ 'access' => [ 'class' => AccessControl::className(), 'only' => ['logout'], 'rules' => [ [ 'actions' => ['logout'], 'allow' => true, 'roles' => ['@'], ], ], ], 'verbs' => [ 'class' => VerbFilter::className(), 'actions' => [ 'logout' => ['post'], ], ], ]; } public function actions() { return [ 'error' => [ 'class' => 'yii\web\ErrorAction', ], 'captcha' => [ 'class' => 'yii\captcha\CaptchaAction', 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null, ], ]; } public function actionIndex() { return $this->render('index'); } public function actionLogin() { if (!\Yii::$app->user->isGuest) { return $this->goHome(); } $model = new LoginForm(); if ($model->load(Yii::$app->request->post()) && $model->login()) { return $this->goBack(); } return $this->render('login', [ 'model' => $model, ]); } public function actionLogout() { Yii::$app->user->logout(); return $this->goHome(); } public function actionContact() { $model = new ContactForm(); if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) { Yii::$app->session->setFlash('contactFormSubmitted'); return $this->refresh(); } return $this->render('contact', [ 'model' => $model, ]); } public function actionAbout() { return $this->render('about'); } public function actionLayout() { $this->layout = 'frontEnd'; return $this->render('index'); // return $this->render('//order/step1'); } } ",0 "btain 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. */ package com.facebook.presto.sql.tree; import com.google.common.collect.ImmutableList; import java.util.List; import java.util.Objects; import java.util.Optional; import static java.util.Objects.requireNonNull; public class NotExpression extends Expression { private final Expression value; public NotExpression(Expression value) { this(Optional.empty(), value); } public NotExpression(NodeLocation location, Expression value) { this(Optional.of(location), value); } private NotExpression(Optional location, Expression value) { super(location); requireNonNull(value, ""value is null""); this.value = value; } public Expression getValue() { return value; } @Override public R accept(AstVisitor visitor, C context) { return visitor.visitNotExpression(this, context); } @Override public List getChildren() { return ImmutableList.of(value); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } NotExpression that = (NotExpression) o; return Objects.equals(value, that.value); } @Override public int hashCode() { return value.hashCode(); } } ",0 """screen"">

          BitcoinJS-lib Test Suite

            ",0 "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.*/ package ch.sourcepond.io.fileobserver.impl.dispatch; import ch.sourcepond.io.fileobserver.api.DispatchKey; import java.nio.file.Path; import java.util.Objects; import static java.lang.String.format; /** * */ final class DefaultDispatchKey implements DispatchKey { private final Object directoryKey; private final Path relativePath; public DefaultDispatchKey(final Object pDirectoryKey, final Path pRelativePath) { directoryKey = pDirectoryKey; relativePath = pRelativePath; } @Override public Object getDirectoryKey() { return directoryKey; } @Override public Path getRelativePath() { return relativePath; } @Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final DefaultDispatchKey other = (DefaultDispatchKey) o; return Objects.equals(directoryKey, other.directoryKey) && Objects.equals(relativePath, other.relativePath); } @Override public int hashCode() { return Objects.hash(directoryKey, relativePath); } @Override public String toString() { return format(""[%s:%s]"", directoryKey, relativePath); } } ",0 "ntent=""text/html; charset=UTF-8""/> The Authority, Vol. 5 #17
            The Authority, Vol. 5 #17
            DC Comics (Wildstorm)
            Wanted
            #580
            0*
            February 2010
            Comic  Modern Age $2.99
            Read It: Yes 32 Pages

            Written by Dan Abnett & Andy Lanning and Marc Bernardin & Adam Freeman Art by Simon Coleby and Al Barrionuevo Cover by Simon Coleby The Midnighter's quest to find a cure for the Warhol-infected Apollo has led him to the strangest confrontation imaginable - against a former member of The Authority! It's the startling conclusion to Dan Abnett, Andy Lanning and Simon Coleby's epic run, and it'll have mind-blowing consequences for the series! Also, the creative team taking the reins with issue #18 makes a cameo debut! On sale December 2 o 32 pg, FC, $2.99 US
            Creators
            Writer Dan Abnett, Andy Lanning
            Penciller Simon Coleby
            Inker Cliff Rathburn
            Colorist Wildstorm FX
            Letterer Wes Abbott
            Cover Artist Simon Coleby
            Editor Ben Abernathy
            Characters
            Apollo (Wildstorm)
            Doctor (Habib Ben Hassan)
            Engineer (Angela Spica)
            Green Knight (Habib Ben Hassan)
            Jack Hawksmoor
            Midnighter (Lucas Trent)
            Gaia Rothstein
            Swift (Shen Li-Min)

            Product Details
            Series Group The Authority
            Genre Adventure, Super-Heroes, Action
            Color Color
            Barcode 76194126778401711
            Country USA
            Language English
            Release Date 12/3/2009

            Personal Details
            Collection Status Wanted
            Links The Authority, Vol. 5 #17 at Comic Collector Connect

            ",0 "st; import org.junit.jupiter.api.TestFactory; import org.spoofax.jsglr2.integrationtest.BaseTestWithSdf3ParseTables; import org.spoofax.jsglr2.integrationtest.OriginDescriptor; import org.spoofax.terms.ParseError; public class OriginsTest extends BaseTestWithSdf3ParseTables { public OriginsTest() { super(""tokenization.sdf3""); } @TestFactory public Stream operator() throws ParseError { return testOrigins(""x+x"", Arrays.asList( //@formatter:off new OriginDescriptor(""AddOperator"", 0, 2), new OriginDescriptor(""Id"", 0, 0), new OriginDescriptor(""Id"", 2, 2) //@formatter:on )); } } ",0 "he model class for table ""comment"". * * @property integer $id * @property integer $action_id * @property string $content * * @property Action $action */ class Comment extends ActiveRecord { /** * @inheritdoc */ public static function tableName() { return 'comment'; } /** * @inheritdoc */ public function rules() { return [ [['action_id', 'content'], 'required'], [['action_id'], 'integer'], [['content'], 'string', 'max' => 255], [['action_id'], 'exist', 'skipOnError' => true, 'targetClass' => Action::className(), 'targetAttribute' => ['action_id' => 'id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => Yii::t('app', 'ID'), 'action_id' => Yii::t('app', 'Action ID'), 'content' => Yii::t('app', 'Content'), ]; } /** * @return ActionQuery */ public function getAction() { return $this->hasOne(Action::className(), ['id' => 'action_id'])->inverseOf('comments'); } /** * @inheritdoc * @return CommentQuery the active query used by this AR class. */ public static function find() { return new CommentQuery(get_called_class()); } } ",0 " Script is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Million Dollar Script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the Million Dollar Script. If not, see . */ require_once ('category.inc.php'); require_once ('lists.inc.php'); require_once ('dynamic_forms.php'); global $ad_tag_to_field_id; global $ad_tag_to_search; global $CACHE_ENABLED; if ($CACHE_ENABLED=='YES') { $dir = dirname(__FILE__); $dir = preg_split ('%[/\\\]%', $dir); $blank = array_pop($dir); $dir = implode('/', $dir); include (""$dir/cache/form1_cache.inc.php""); $ad_tag_to_search = $tag_to_search; $ad_tag_to_field_id = $tag_to_field_id; } else { $ad_tag_to_search = tag_to_search_init(1); $ad_tag_to_field_id = ad_tag_to_field_id_init(); } ##################################### function ad_tag_to_field_id_init () { global $CACHE_ENABLED; if ($CACHE_ENABLED=='YES') { global $ad_tag_to_field_id; return $ad_tag_to_field_id; } global $label; $sql = ""SELECT *, t2.field_label AS NAME FROM `form_fields` as t1, form_field_translations as t2 where t1.field_id = t2.field_id AND t2.lang='"".$_SESSION['MDS_LANG'].""' AND form_id=1 ORDER BY list_sort_order ""; $result = mysql_query($sql) or die (mysql_error()); # do a query for each field while ($fields = mysql_fetch_array($result, MYSQL_ASSOC)) { //$form_data = $row[] $tag_to_field_id[$fields['template_tag']]['field_id'] = $fields['field_id']; $tag_to_field_id[$fields['template_tag']]['field_type'] = $fields['field_type']; $tag_to_field_id[$fields['template_tag']]['field_label'] = $fields['NAME']; } $tag_to_field_id[""ORDER_ID""]['field_id'] = 'order_id'; $tag_to_field_id[""ORDER_ID""]['field_label'] = 'Order ID'; //$tag_to_field_id[""ORDER_ID""]['field_label'] = $label[""employer_resume_list_date""]; $tag_to_field_id[""BID""]['field_id'] = 'banner_id'; $tag_to_field_id[""BID""]['field_label'] = 'Grid ID'; $tag_to_field_id[""USER_ID""]['field_id'] = 'user_id'; $tag_to_field_id[""USER_ID""]['field_label'] = 'User ID'; $tag_to_field_id[""AD_ID""]['field_id'] = 'ad_id'; $tag_to_field_id[""AD_ID""]['field_label'] = 'Ad ID'; $tag_to_field_id[""DATE""]['field_id'] = 'ad_date'; $tag_to_field_id[""DATE""]['field_label'] = 'Date'; return $tag_to_field_id; } ###################################################################### function load_ad_values ($ad_id) { $prams = array(); $sql = ""SELECT * FROM `ads` WHERE ad_id='$ad_id' ""; $result = mysql_query($sql) or die ($sql. mysql_error()); if ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $prams['ad_id'] = $ad_id; $prams['user_id'] = $row['user_id']; $prams['order_id'] = $row['order_id']; $prams['banner_id'] = $row['banner_id']; $sql = ""SELECT * FROM form_fields WHERE form_id=1 AND field_type != 'SEPERATOR' AND field_type != 'BLANK' AND field_type != 'NOTE' ""; $result = mysql_query($sql) or die(mysql_error()); while ($fields = mysql_fetch_array($result, MYSQL_ASSOC)) { $prams[$fields['field_id']] = $row[$fields['field_id']]; if ($fields['field_type']=='DATE') { $day = $_REQUEST[$row['field_id'].""d""]; $month = $_REQUEST[$row['field_id'].""m""]; $year = $_REQUEST[$row['field_id'].""y""]; $prams[$fields['field_id']] = ""$year-$month-$day""; } elseif (($fields['field_type']=='MSELECT') || ($row['field_type']=='CHECK')) { if (is_array($_REQUEST[$row['field_id']])) { $prams[$fields['field_id']] = implode ("","", $_REQUEST[$fields['field_id']]); } else { $prams[$fields['field_id']] = $_REQUEST[$fields['field_id']]; } } } return $prams; } else { return false; } } ######################################################### function assign_ad_template($prams) { global $label; $str = $label['mouseover_ad_template']; $sql = ""SELECT * FROM form_fields WHERE form_id='1' AND field_type != 'SEPERATOR' AND field_type != 'BLANK' AND field_type != 'NOTE' ""; //echo $sql; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($row['field_type']=='IMAGE') { if ((file_exists(UPLOAD_PATH.'images/'.$prams[$row['field_id']]))&&($prams[$row['field_id']])) { $str = str_replace('%'.$row['template_tag'].'%', '', $str); } else { //$str = str_replace('%'.$row['template_tag'].'%', '', $str); $str = str_replace('%'.$row['template_tag'].'%', '', $str); } } else { $str = str_replace('%'.$row['template_tag'].'%', get_template_value($row['template_tag'],1), $str); } $str = str_replace('$'.$row['template_tag'].'$', get_template_field_label($row['template_tag'],1), $str); } return $str; } ######################################################### function display_ad_form ($form_id, $mode, $prams) { global $label; global $error; global $BID; if ($prams == '' ) { $prams['mode'] = $_REQUEST['mode']; $prams['ad_id']= $_REQUEST['ad_id']; $prams['banner_id'] = $BID; $prams['user_id'] = $_REQUEST['user_id']; $sql = ""SELECT * FROM form_fields WHERE form_id='$form_id' AND field_type != 'SEPERATOR' AND field_type != 'BLANK' AND field_type != 'NOTE' ""; //echo $sql; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { //$prams[$row[field_id]] = $_REQUEST[$row[field_id]]; if ($row['field_type']=='DATE') { $day = $_REQUEST[$row['field_id'].""d""]; $month = $_REQUEST[$row['field_id'].""m""]; $year = $_REQUEST[$row['field_id'].""y""]; $prams[$row['field_id']] = ""$year-$month-$day""; } elseif (($row['field_type']=='MSELECT') || ($row['field_type']=='CHECK')) { if (is_array($_REQUEST[$row['field_id']])) { $prams[$row['field_id']] = implode ("","", $_REQUEST[$row['field_id']]); } else { $prams[$row['field_id']] = $_REQUEST[$row['field_id']]; } } else { $prams[$row['field_id']] = stripslashes ($_REQUEST[$row['field_id']]); } } } if (!defined('SCW_INCLUDE')) { ?>
            "" name=""form1"" onsubmit="" form1.savebutton.disabled=true;"" enctype=""multipart/form-data""> ""> ""> ""> ""> "">
            "".$label['ad_save_error'].""
            "".$error.""""; ?>
            "" onClick=""save101.value='1';"">
            0 AND t1.banner_id='"".$BID.""' AND t1.user_id='"".$user_id.""' AND (t2.status = 'completed' OR t2.status = 'expired') $where_sql ORDER BY $order $ord ""; } elseif ($list_mode =='TOPLIST') { // $sql = ""SELECT *, DATE_FORMAT(MAX(order_date), '%Y-%c-%d') as max_date, sum(quantity) AS pixels FROM orders, ads where ads.order_id=orders.order_id AND status='completed' and orders.banner_id='$BID' GROUP BY orders.user_id, orders.banner_id order by pixels desc ""; } else { $sql = ""Select * FROM `ads` as t1, `orders` AS t2 WHERE t1.ad_id=t2.ad_id AND t1.banner_id='$BID' and t1.order_id > 0 $where_sql ORDER BY $order $ord ""; } //echo ""["".$sql.""]""; $result = mysql_query($sql) or die (mysql_error()); ############ # get the count $count = mysql_num_rows($result); if ($count > $records_per_page) { mysql_data_seek($result, $offset); } if ($count > 0 ) { if ($pages == 1) { } elseif ($list_mode!='USER') { $pages = ceil($count / $records_per_page); $cur_page = $_REQUEST['offset'] / $records_per_page; $cur_page++; echo ""
            ""; //echo ""Page $cur_page of $pages - ""; $label[""navigation_page""] = str_replace (""%CUR_PAGE%"", $cur_page, $label[""navigation_page""]); $label[""navigation_page""] = str_replace (""%PAGES%"", $pages, $label[""navigation_page""]); echo "" "".$label[""navigation_page""]."" ""; $nav = nav_pages_struct($result, $q_string, $count, $records_per_page); $LINKS = 10; render_nav_pages($nav, $LINKS, $q_string, $show_emp, $cat); echo ""
            ""; } $dir = dirname(__FILE__); $dir = preg_split ('%[/\\\]%', $dir); $blank = array_pop($dir); $dir = implode('/', $dir); include ($dir.'/mouseover_box.htm'); // edit this file to change the style of the mouseover box! echo ''; ?>  '; } if ($list_mode == 'USER' ) { echo ''; } echo_list_head_data(1, $admin); if (($list_mode == 'USER' ) || ($admin)) { echo ''; echo ''; echo ''; } ?> '; ?> ?action=edit&ad_id='""> '; } if ($list_mode == 'USER' ) { echo ''; ////////////////// echo ''; ///////////////// if ($prams['published']=='Y') { $pub =$label['ads_inc_pub_stat']; } else { $pub = $label['ads_inc_npub_stat']; } if ($prams['approved']=='Y') { $app = $label['ads_inc_app_stat'].', '; } else { $app = $label['ads_inc_napp_stat'].', '; } //$label['ad_list_st_'.$prams['status']]."" echo '""; } ?> ""; } else { echo ""
            "".$label[""ads_not_found""]."".
            ""; } return $count; } ######################################################## function delete_ads_files ($ad_id) { $sql = ""select * from form_fields where form_id=1 ""; $result = mysql_query ($sql) or die (mysql_error()); while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) { $field_id = $row['field_id']; $field_type = $row['field_type']; if (($field_type == ""FILE"")) { deleteFile(""ads"", ""ad_id"", $ad_id, $field_id); } if (($field_type == ""IMAGE"")){ deleteImage(""ads"", ""ad_id"", $ad_id, $field_id); } } } #################### function delete_ad ($ad_id) { delete_ads_files ($ad_id); $sql = ""delete FROM `ads` WHERE `ad_id`='"".$ad_id.""' ""; $result = mysql_query($sql) or die (mysql_error().$sql); } ################################ function search_category_tree_for_ads() { if (func_num_args() > 0 ) { $cat_id = func_get_arg(0); } else { $cat_id = $_REQUEST[cat]; } $sql = ""select search_set from categories where category_id='$cat_id' ""; $result2 = mysql_query ($sql) or die (mysql_error()); $row = mysql_fetch_array($result2); $search_set = $row[search_set]; $sql = ""select * from form_fields where field_type='CATEGORY' AND form_id='1'""; $result = mysql_query ($sql) or die (mysql_error()); $i=0; if (mysql_num_rows($result) >0) { while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) { if ($i>0) { $where_cat .= "" OR ""; } $where_cat .= "" `$row[field_id]` IN ($search_set) ""; $i++; } } if ($where_cat=='') { return "" AND 1=2 ""; } if ($search_set=='') { return """"; } return "" AND ($where_cat) ""; } #################### function search_category_for_ads() { if (func_num_args() > 0 ) { $cat_id = func_get_arg(0); } else { $cat_id = $_REQUEST[cat]; } $sql = ""select * from form_fields where field_type='CATEGORY' AND form_id='1'""; $result = mysql_query ($sql) or die (mysql_error()); $i=0; if (mysql_num_rows($result) >0) { while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) { if ($i>0) { $where_cat .= "" OR ""; } $where_cat .= "" `$row[field_id]`='$cat_id' ""; $i++; } } if ($where_cat=='') { return "" AND 1=2 ""; } return "" AND ($where_cat) ""; //$sql =""Select * from posts_table where $where_cat ""; //echo $sql.""
            ""; //$result2 = mysql_query ($sql) or die (mysql_error()); } ################## function generate_ad_id () { $query =""SELECT max(`ad_id`) FROM `ads`""; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_row($result); $row[0]++; return $row[0]; } ################# function temp_ad_exists($sid) { $query =""SELECT ad_id FROM `ads` where user_id='$sid' ""; $result = mysql_query($query) or die(mysql_error()); // $row = mysql_fetch_row($result); return mysql_num_rows($result); } ################################################################ function insert_ad_data() { if (func_num_args() > 0) { $admin = func_get_arg(0); // admin mode. } $user_id = $_SESSION['MDS_ID']; if ($user_id=='') { $user_id = addslashes(session_id()); } $order_id = $_REQUEST['order_id']; $ad_date = (gmdate(""Y-m-d H:i:s"")); $banner_id = $_REQUEST['banner_id']; if ($_REQUEST['ad_id'] == '') { $ad_id = generate_ad_id (); $now = (gmdate(""Y-m-d H:i:s"")); $sql = ""REPLACE INTO `ads` (`ad_id`, `order_id`, `user_id`, `ad_date`, `banner_id` "".get_sql_insert_fields(1)."") VALUES ('$ad_id', '$order_id', '$user_id', '$ad_date', '$banner_id' "".get_sql_insert_values(1, ""ads"", ""ad_id"", $_REQUEST['ad_id'], $user_id)."") ""; } else { $ad_id = $_REQUEST['ad_id']; if (!$admin) { // make sure that the logged in user is the owner of this ad. if (!is_numeric($_REQUEST['user_id'])) { // temp order (user_id = session_id()) if ($_REQUEST['user_id']!=session_id()) return false; } else { // user is logged in $sql = ""select user_id from `ads` WHERE ad_id='"".$_REQUEST['ad_id'].""'""; $result = mysql_query ($sql) or die(mysql_error()); $row = @mysql_fetch_array($result); if ($_SESSION['MDS_ID']!==$row['user_id']) { return false; // not the owner, hacking attempt! } } } $now = (gmdate(""Y-m-d H:i:s"")); $sql = ""UPDATE `ads` SET `ad_date`='$now' "".get_sql_update_values (1, ""ads"", ""ad_id"", $_REQUEST['ad_id'], $user_id)."" WHERE ad_id='"".$ad_id.""'""; } //echo ""
            Insert: $sql
            ""; //print_r ($_FILES); mysql_query ($sql) or die(""[$sql]"".mysql_error()); //build_ad_count(0); return $ad_id; } ############################################################### function validate_ad_data($form_id) { return validate_form_data(1); return $error; } ################################################################ function update_blocks_with_ad($ad_id, $user_id) { global $prams; $prams = load_ad_values($ad_id); if ($prams['order_id']>0) { $sql = ""UPDATE blocks SET alt_text='"".addslashes(get_template_value('ALT_TEXT', 1)).""', url='"".addslashes(get_template_value('URL', 1)).""' WHERE order_id='"".$prams['order_id'].""' AND user_id='"".$user_id.""' ""; mysql_query($sql) or die(mysql_error()); mds_log(""Updated blocks with ad URL, ALT_TEXT"", $sql); } } ?>",0 "t (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.spongepowered.common.data.processor.block; import static org.spongepowered.common.data.DataTransactionBuilder.fail; import com.google.common.base.Optional; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.world.World; import org.spongepowered.api.block.BlockState; import org.spongepowered.api.data.DataHolder; import org.spongepowered.api.data.DataPriority; import org.spongepowered.api.data.DataTransactionResult; import org.spongepowered.api.data.DataView; import org.spongepowered.api.data.manipulator.block.DirectionalData; import org.spongepowered.api.service.persistence.InvalidDataException; import org.spongepowered.common.data.DataTransactionBuilder; import org.spongepowered.common.data.SpongeBlockProcessor; import org.spongepowered.common.data.SpongeDataProcessor; import org.spongepowered.common.data.manipulator.block.SpongeDirectionalData; import org.spongepowered.common.interfaces.block.IMixinBlockDirectional; public class SpongeDirectionalProcessor implements SpongeDataProcessor, SpongeBlockProcessor { @Override public Optional fillData(DataHolder dataHolder, DirectionalData manipulator, DataPriority priority) { return Optional.absent(); } @Override public DataTransactionResult setData(DataHolder dataHolder, DirectionalData manipulator, DataPriority priority) { return DataTransactionBuilder.successNoData(); } @Override public boolean remove(DataHolder dataHolder) { return false; } @Override public Optional build(DataView container) throws InvalidDataException { return Optional.absent(); } @Override public DirectionalData create() { return new SpongeDirectionalData(); } @Override public Optional createFrom(DataHolder dataHolder) { return Optional.absent(); } @Override public Optional fromBlockPos(final World world, final BlockPos blockPos) { IBlockState blockState = world.getBlockState(blockPos); if (blockState.getBlock() instanceof IMixinBlockDirectional) { return Optional.of(((IMixinBlockDirectional) blockState.getBlock()).getDirectionalData(blockState)); } return Optional.absent(); } @Override public DataTransactionResult setData(World world, BlockPos blockPos, DirectionalData manipulator, DataPriority priority) { IBlockState blockState = world.getBlockState(blockPos); if (blockState.getBlock() instanceof IMixinBlockDirectional) { return ((IMixinBlockDirectional) blockState.getBlock()).setDirectionalData(manipulator, world, blockPos, priority); } return fail(manipulator); } @Override public boolean remove(World world, BlockPos blockPos) { IBlockState blockState = world.getBlockState(blockPos); if (blockState.getBlock() instanceof IMixinBlockDirectional) { // ((IMixinBlockDirectional) blockState.getBlock()).resetDirectionData(blockState); return true; } return false; } @Override public Optional removeFrom(IBlockState blockState) { return Optional.absent(); } @Override public Optional createFrom(IBlockState blockState) { if (blockState.getBlock() instanceof IMixinBlockDirectional) { ((IMixinBlockDirectional) blockState.getBlock()).getDirectionalData(blockState); } return Optional.absent(); } @Override public Optional getFrom(DataHolder dataHolder) { return Optional.absent(); } } ",0 "enerated by javadoc (1.8.0_101) on Wed Sep 21 04:14:05 CEST 2016 --> com.snakybo.torch.graphics.shader (Torch Engine 1.0 API)

            Package com.snakybo.torch.graphics.shader

             '.$label['ads_inc_pixels_col'].''.$label['ads_inc_expires_col'].''.$label['ad_list_status'].'
            '; ?> ?ad_id='""> '; } echo_ad_list_data($admin); if (($list_mode == 'USER' ) || ($admin)) { ///////////////// echo ''; if ($prams['days_expire'] > 0) { if ($prams['published']!='Y') { $time_start = strtotime(gmdate('r')); } else { $time_start = strtotime($prams['date_published']."" GMT""); } $elapsed_time = strtotime(gmdate('r')) - $time_start; $elapsed_days = floor ($elapsed_time / 60 / 60 / 24); $exp_time = ($prams['days_expire'] * 24 * 60 * 60); $exp_time_to_go = $exp_time - $elapsed_time; $exp_days_to_go = floor ($exp_time_to_go / 60 / 60 / 24); $to_go = elapsedtime($exp_time_to_go); $elapsed = elapsedtime($elapsed_time); if ($prams['status']=='expired') { $days = """".$label['ads_inc_expied_stat'].""""; } elseif ($prams['date_published']=='') { $days = $label['ads_inc_nyp_stat']; } else { $days = str_replace ('%ELAPSED%', $elapsed, $label['ads_inc_elapsed_stat']); $days = str_replace ('%TO_GO%', $to_go, $days); //$days = ""$elapsed elapsed
            $to_go to go ""; } //$days = $elapsed_time; //print_r($prams); } else { $days = $label['ads_inc_nev_stat']; } echo $days; echo '
            '.$app.$pub.""
            Class Summary 
            Class Description
            Shader
            The shader class is a direct link to the low-level GLSL shaders.
            ShaderInternal  
            ",0 "file allows all the initialisation, the evaluation * of the URL and the call of the appropriate method of the appropriate * controller which will then drive the rest of the process. * * PHP5 * * @author Vincent Perrin * @copyright 2012-2015 vincentperrin.com * @license MIT */ define('DS', DIRECTORY_SEPARATOR); define('ROOT', dirname(__FILE__)); // The application folder containing protected files define('APP_FOLDER', ROOT . DS . 'app' . DS); // The core classes and basic functions of the application define('CORE_FOLDER', APP_FOLDER . 'core' . DS); define('BASE_FOLDER', CORE_FOLDER . 'base' . DS); define('STRUCTURE_FOLDER', CORE_FOLDER . 'structure' . DS); // All the specific Models, Views and Controllers define('MVC_FOLDER', APP_FOLDER . 'mvc' . DS); define('MODELS_FOLDER', MVC_FOLDER . 'models' . DS); define('VIEWS_FOLDER', MVC_FOLDER . 'views' . DS); define('CONTROLLERS_FOLDER', MVC_FOLDER . 'controllers' . DS); // Folder containing all constants for the framework and the website define('CONFIG_FOLDER', APP_FOLDER . 'config' . DS); // All the public resources define('REL_IMG_FOLDER', 'img/'); define('REL_CSS_FOLDER', 'css/'); define('JSON_FOLDER', ROOT . DS . 'json' . DS); // External libraries define('LIB_FOLDER', ROOT . DS . 'lib' . DS); // Constants require_once (CONFIG_FOLDER . 'base.php'); require_once (CONFIG_FOLDER . 'db.php'); require_once (CONFIG_FOLDER . 'constants.php'); // Some mechanics (optional) require_once (BASE_FOLDER . 'init.php'); setReporting(); removeMagicQuotes(); unregisterGlobals(); // Managing the URL require_once (BASE_FOLDER . 'routing.php'); urlSetup(); // Loading necessary file following the URL analysis require_once (BASE_FOLDER . 'loading.php'); callController(); ?>",0 "se, 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. *************************GO-LICENSE-END***********************************/ package com.thoughtworks.go.domain.materials.git; import com.thoughtworks.go.domain.materials.Modification; import com.thoughtworks.go.util.DateUtils; import java.util.LinkedList; import java.util.List; import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; public class GitModificationParser { private LinkedList modifications = new LinkedList<>(); private static final String SPACES = ""\\s+""; private static final String COMMENT_INDENT = ""\\s{4}""; private static final String COMMENT_TEXT = ""(.*)""; private static final String HASH = ""(\\w+)""; private static final String DATE = ""(.+)""; private static final String AUTHOR = ""(.+)""; private static final Pattern COMMIT_PATTERN = Pattern.compile(""^commit"" + SPACES + HASH + ""$""); private static final Pattern AUTHOR_PATTERN = Pattern.compile(""^Author:""+ SPACES + AUTHOR + ""$""); private static final Pattern DATE_PATTERN = Pattern.compile(""^Date:"" + SPACES + DATE + ""$""); private static final Pattern COMMENT_PATTERN = Pattern.compile(""^"" + COMMENT_INDENT + COMMENT_TEXT + ""$""); public List parse(List output) { for (String line : output) { processLine(line); } return modifications; } public List getModifications() { return modifications; } public void processLine(String line) { Matcher matcher = COMMIT_PATTERN.matcher(line); if (matcher.matches()) { modifications.add(new Modification("""", """", null, null, matcher.group(1))); } Matcher authorMatcher = AUTHOR_PATTERN.matcher(line); if (authorMatcher.matches()) { modifications.getLast().setUserName(authorMatcher.group(1)); } Matcher dateMatcher = DATE_PATTERN.matcher(line); if (dateMatcher.matches()) { modifications.getLast().setModifiedTime(DateUtils.parseISO8601(dateMatcher.group(1))); } Matcher commentMatcher = COMMENT_PATTERN.matcher(line); if (commentMatcher.matches()) { Modification last = modifications.getLast(); String comment = Optional.ofNullable(last.getComment()).orElse(""""); if (!comment.isEmpty()) comment += ""\n""; last.setComment(comment + commentMatcher.group(1)); } } } ",0 "el->master_kk_id; $this->params['breadcrumbs'][] = ['label' => 'Master Kks', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?>

            title) ?>

            $model->master_kk_id], ['class' => 'btn btn-primary']) ?> $model->master_kk_id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => 'Are you sure you want to delete this item?', 'method' => 'post', ], ]) ?>

            $model, 'attributes' => [ 'master_kk_id', 'NIK', 'NAMA', 'TGL_LAHIR', 'ALAMAT_RUMAH', 'KOTA_RUMAH', 'vESG', 'TGL_MASUK', 'TGL_PENSIUN', 'TGL_CAPEG', 'BAND_POSISI', 'KLAS_POSISI', 'cDIVISI', 'vDIVISI', 'LOKASI_KERJA', 'PERSONALAREA', 'PERSONALSUBAREA', 'PENETAPAN_TPK_BERDASARKAN_TELECONFERENCE', 'PERSADMIN', 'YAKES_AREA', 'NO_KARTU_KELUARGA', 'NO_KTP', 'NO_BPJS', ], ]) ?>
            ",0 " See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ import com.carrotsearch.randomizedtesting.annotations.Listeners; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import org.apache.lucene.util.ArrayUtil; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TimeUnits; import org.elasticsearch.test.junit.listeners.ReproduceInfoPrinter; import org.junit.BeforeClass; import java.util.Locale; /** * @deprecated Remove when IndexableBinaryStringTools is removed. */ @Deprecated @Listeners({ ReproduceInfoPrinter.class }) @ThreadLeakScope(Scope.NONE) @TimeoutSuite(millis = TimeUnits.HOUR) @LuceneTestCase.SuppressSysoutChecks(bugUrl = ""we log a lot on purpose"") public class IndexableBinaryStringToolsTests extends LuceneTestCase { private static int NUM_RANDOM_TESTS; private static int MAX_RANDOM_BINARY_LENGTH; private static final String LINE_SEPARATOR = System.lineSeparator(); @BeforeClass public static void beforeClass() throws Exception { NUM_RANDOM_TESTS = atLeast(200); MAX_RANDOM_BINARY_LENGTH = atLeast(300); } public void testSingleBinaryRoundTrip() { byte[] binary = new byte[] { (byte) 0x23, (byte) 0x98, (byte) 0x13, (byte) 0xE4, (byte) 0x76, (byte) 0x41, (byte) 0xB2, (byte) 0xC9, (byte) 0x7F, (byte) 0x0A, (byte) 0xA6, (byte) 0xD8 }; int encodedLen = IndexableBinaryStringTools.getEncodedLength(binary, 0, binary.length); char encoded[] = new char[encodedLen]; IndexableBinaryStringTools.encode(binary, 0, binary.length, encoded, 0, encoded.length); int decodedLen = IndexableBinaryStringTools.getDecodedLength(encoded, 0, encoded.length); byte decoded[] = new byte[decodedLen]; IndexableBinaryStringTools.decode(encoded, 0, encoded.length, decoded, 0, decoded.length); assertEquals(""Round trip decode/decode returned different results:"" + LINE_SEPARATOR + ""original: "" + binaryDump(binary, binary.length) + LINE_SEPARATOR + "" encoded: "" + charArrayDump(encoded, encoded.length) + LINE_SEPARATOR + "" decoded: "" + binaryDump(decoded, decoded.length), binaryDump(binary, binary.length), binaryDump(decoded, decoded.length)); } public void testEncodedSortability() { byte[] originalArray1 = new byte[MAX_RANDOM_BINARY_LENGTH]; char[] originalString1 = new char[MAX_RANDOM_BINARY_LENGTH]; char[] encoded1 = new char[MAX_RANDOM_BINARY_LENGTH * 10]; byte[] original2 = new byte[MAX_RANDOM_BINARY_LENGTH]; char[] originalString2 = new char[MAX_RANDOM_BINARY_LENGTH]; char[] encoded2 = new char[MAX_RANDOM_BINARY_LENGTH * 10]; for (int testNum = 0; testNum < NUM_RANDOM_TESTS; ++testNum) { int numBytes1 = random().nextInt(MAX_RANDOM_BINARY_LENGTH - 1) + 1; // Min == 1 for (int byteNum = 0; byteNum < numBytes1; ++byteNum) { int randomInt = random().nextInt(0x100); originalArray1[byteNum] = (byte) randomInt; originalString1[byteNum] = (char) randomInt; } int numBytes2 = random().nextInt(MAX_RANDOM_BINARY_LENGTH - 1) + 1; // Min == 1 for (int byteNum = 0; byteNum < numBytes2; ++byteNum) { int randomInt = random().nextInt(0x100); original2[byteNum] = (byte) randomInt; originalString2[byteNum] = (char) randomInt; } int originalComparison = new String(originalString1, 0, numBytes1) .compareTo(new String(originalString2, 0, numBytes2)); originalComparison = originalComparison < 0 ? -1 : originalComparison > 0 ? 1 : 0; int encodedLen1 = IndexableBinaryStringTools.getEncodedLength( originalArray1, 0, numBytes1); if (encodedLen1 > encoded1.length) encoded1 = new char[ArrayUtil.oversize(encodedLen1, Character.BYTES)]; IndexableBinaryStringTools.encode(originalArray1, 0, numBytes1, encoded1, 0, encodedLen1); int encodedLen2 = IndexableBinaryStringTools.getEncodedLength(original2, 0, numBytes2); if (encodedLen2 > encoded2.length) encoded2 = new char[ArrayUtil.oversize(encodedLen2, Character.BYTES)]; IndexableBinaryStringTools.encode(original2, 0, numBytes2, encoded2, 0, encodedLen2); int encodedComparison = new String(encoded1, 0, encodedLen1) .compareTo(new String(encoded2, 0, encodedLen2)); encodedComparison = encodedComparison < 0 ? -1 : encodedComparison > 0 ? 1 : 0; assertEquals(""Test #"" + (testNum + 1) + "": Original bytes and encoded chars compare differently:"" + LINE_SEPARATOR + "" binary 1: "" + binaryDump(originalArray1, numBytes1) + LINE_SEPARATOR + "" binary 2: "" + binaryDump(original2, numBytes2) + LINE_SEPARATOR + ""encoded 1: "" + charArrayDump(encoded1, encodedLen1) + LINE_SEPARATOR + ""encoded 2: "" + charArrayDump(encoded2, encodedLen2) + LINE_SEPARATOR, originalComparison, encodedComparison); } } public void testEmptyInput() { byte[] binary = new byte[0]; int encodedLen = IndexableBinaryStringTools.getEncodedLength(binary, 0, binary.length); char[] encoded = new char[encodedLen]; IndexableBinaryStringTools.encode(binary, 0, binary.length, encoded, 0, encoded.length); int decodedLen = IndexableBinaryStringTools.getDecodedLength(encoded, 0, encoded.length); byte[] decoded = new byte[decodedLen]; IndexableBinaryStringTools.decode(encoded, 0, encoded.length, decoded, 0, decoded.length); assertEquals(""decoded empty input was not empty"", decoded.length, 0); } public void testAllNullInput() { byte[] binary = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int encodedLen = IndexableBinaryStringTools.getEncodedLength(binary, 0, binary.length); char encoded[] = new char[encodedLen]; IndexableBinaryStringTools.encode(binary, 0, binary.length, encoded, 0, encoded.length); int decodedLen = IndexableBinaryStringTools.getDecodedLength(encoded, 0, encoded.length); byte[] decoded = new byte[decodedLen]; IndexableBinaryStringTools.decode(encoded, 0, encoded.length, decoded, 0, decoded.length); assertEquals(""Round trip decode/decode returned different results:"" + LINE_SEPARATOR + "" original: "" + binaryDump(binary, binary.length) + LINE_SEPARATOR + ""decodedBuf: "" + binaryDump(decoded, decoded.length), binaryDump(binary, binary.length), binaryDump(decoded, decoded.length)); } public void testRandomBinaryRoundTrip() { byte[] binary = new byte[MAX_RANDOM_BINARY_LENGTH]; char[] encoded = new char[MAX_RANDOM_BINARY_LENGTH * 10]; byte[] decoded = new byte[MAX_RANDOM_BINARY_LENGTH]; for (int testNum = 0; testNum < NUM_RANDOM_TESTS; ++testNum) { int numBytes = random().nextInt(MAX_RANDOM_BINARY_LENGTH - 1) + 1; // Min == 1 for (int byteNum = 0; byteNum < numBytes; ++byteNum) { binary[byteNum] = (byte) random().nextInt(0x100); } int encodedLen = IndexableBinaryStringTools.getEncodedLength(binary, 0, numBytes); if (encoded.length < encodedLen) encoded = new char[ArrayUtil.oversize(encodedLen, Character.BYTES)]; IndexableBinaryStringTools.encode(binary, 0, numBytes, encoded, 0, encodedLen); int decodedLen = IndexableBinaryStringTools.getDecodedLength(encoded, 0, encodedLen); IndexableBinaryStringTools.decode(encoded, 0, encodedLen, decoded, 0, decodedLen); assertEquals(""Test #"" + (testNum + 1) + "": Round trip decode/decode returned different results:"" + LINE_SEPARATOR + "" original: "" + binaryDump(binary, numBytes) + LINE_SEPARATOR + ""encodedBuf: "" + charArrayDump(encoded, encodedLen) + LINE_SEPARATOR + ""decodedBuf: "" + binaryDump(decoded, decodedLen), binaryDump(binary, numBytes), binaryDump(decoded, decodedLen)); } } public String binaryDump(byte[] binary, int numBytes) { StringBuilder buf = new StringBuilder(); for (int byteNum = 0 ; byteNum < numBytes ; ++byteNum) { String hex = Integer.toHexString(binary[byteNum] & 0xFF); if (hex.length() == 1) { buf.append('0'); } buf.append(hex.toUpperCase(Locale.ROOT)); if (byteNum < numBytes - 1) { buf.append(' '); } } return buf.toString(); } public String charArrayDump(char[] charArray, int numBytes) { StringBuilder buf = new StringBuilder(); for (int charNum = 0 ; charNum < numBytes ; ++charNum) { String hex = Integer.toHexString(charArray[charNum]); for (int digit = 0 ; digit < 4 - hex.length() ; ++digit) { buf.append('0'); } buf.append(hex.toUpperCase(Locale.ROOT)); if (charNum < numBytes - 1) { buf.append(' '); } } return buf.toString(); } } ",0 "ort org.workcraft.plugins.petri.VisualPetri; import org.workcraft.plugins.policy.Policy; import org.workcraft.plugins.policy.PolicyDescriptor; import org.workcraft.plugins.policy.VisualPolicy; import org.workcraft.plugins.policy.tools.PetriToPolicyConverter; import org.workcraft.utils.Hierarchy; import org.workcraft.utils.DialogUtils; import org.workcraft.workspace.ModelEntry; import org.workcraft.workspace.WorkspaceEntry; import org.workcraft.utils.WorkspaceUtils; public class PetriToPolicyConversionCommand extends AbstractConversionCommand { @Override public String getDisplayName() { return ""Policy Net""; } @Override public boolean isApplicableTo(WorkspaceEntry we) { return WorkspaceUtils.isApplicableExact(we, Petri.class); } @Override public ModelEntry convert(ModelEntry me) { if (Hierarchy.isHierarchical(me)) { DialogUtils.showError(""Policy Net cannot be derived from a hierarchical Petri Net.""); return null; } final VisualPetri src = me.getAs(VisualPetri.class); final VisualPolicy dst = new VisualPolicy(new Policy()); final PetriToPolicyConverter converter = new PetriToPolicyConverter(src, dst); return new ModelEntry(new PolicyDescriptor(), converter.getDstModel()); } } ",0 "ts

            Ross Gammon’s Family Tree

            Christening

            Gramps ID E2683
            Date 1692-06-22
            Place

            Generated by Gramps 4.2.8
            Last change was the 2015-08-05 19:54:10
            Created for GAMMON, Francis

            ",0 "ancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef BERRYIWORKBENCHPARTREFERENCE_H_ #define BERRYIWORKBENCHPARTREFERENCE_H_ #include #include #include ""berryIPropertyChangeListener.h"" namespace berry { struct IWorkbenchPart; struct IWorkbenchPage; /** * \ingroup org_blueberry_ui_qt * * Implements a reference to a IWorkbenchPart. * The IWorkbenchPart will not be instanciated until the part * becomes visible or the API getPart is sent with true; *

            * This interface is not intended to be implemented by clients. *

            */ struct BERRY_UI_QT IWorkbenchPartReference : public Object { berryObjectMacro(berry::IWorkbenchPartReference) ~IWorkbenchPartReference() override; /** * Returns the IWorkbenchPart referenced by this object. * Returns null if the editors was not instantiated or * it failed to be restored. Tries to restore the editor * if restore is true. */ virtual SmartPointer GetPart(bool restore) = 0; /** * @see IWorkbenchPart#getTitleImage */ virtual QIcon GetTitleImage() const = 0; /** * @see IWorkbenchPart#getTitleToolTip */ virtual QString GetTitleToolTip() const = 0; /** * @see IWorkbenchPartSite#getId */ virtual QString GetId() const = 0; /** * @see IWorkbenchPart#addPropertyListener */ virtual void AddPropertyListener(IPropertyChangeListener* listener) = 0; /** * @see IWorkbenchPart#removePropertyListener */ virtual void RemovePropertyListener(IPropertyChangeListener* listener) = 0; /** * Returns the workbench page that contains this part */ virtual SmartPointer GetPage() const = 0; /** * Returns the name of the part, as it should be shown in tabs. * * @return the part name */ virtual QString GetPartName() const = 0; /** * Returns the content description for the part (or the empty string if none) * * @return the content description for the part */ virtual QString GetContentDescription() const = 0; /** * Returns true if the part is pinned otherwise returns false. */ virtual bool IsPinned() const = 0; /** * Returns whether the part is dirty (i.e. has unsaved changes). * * @return true if the part is dirty, false otherwise */ virtual bool IsDirty() const = 0; /** * Return an arbitrary property from the reference. If the part has been * instantiated, it just delegates to the part. If not, then it looks in its * own cache of properties. If the property is not available or the part has * never been instantiated, it can return null. * * @param key * The property to return. Must not be null. * @return The String property, or null. */ virtual QString GetPartProperty(const QString& key) const = 0; /** * Add a listener for changes in the arbitrary properties set. * * @param listener * Must not be null. */ //virtual void addPartPropertyListener(IPropertyChangeListener listener) = 0; /** * Remove a listener for changes in the arbitrary properties set. * * @param listener * Must not be null. */ //virtual void removePartPropertyListener(IPropertyChangeListener listener) = 0; }; } // namespace berry #endif /*BERRYIWORKBENCHPARTREFERENCE_H_*/ ",0 "lds the values to be used in the fields callbacks */ private $options; /** * Start up */ public function __construct() { add_action( 'admin_menu', array( $this, 'add_plugin_page' ) ); add_action( 'admin_init', array( $this, 'page_init' ) ); } /** * Add options page */ public function add_plugin_page() { // This page will be under ""Settings"" add_options_page( 'Settings Admin', 'Exiftool Options', 'manage_options', 'speo_exif_options', array( $this, 'create_admin_page' ) ); } /** * Options page callback */ public function create_admin_page() { // Set class property $this->options = get_option( 'speo_options' ); ?>

            Exiftools Settings

            '; submit_button(); ?>
            load( plugin_dir_path( __FILE__ ) . 'list.xml' ); $xpathvar = new Domxpath($xmldoc); $queryResult = $xpathvar->query('//tag/@name'); $possible_values = array(); foreach( $queryResult as $result ){ if( substr( $result->textContent, 0, 9 ) === 'MakerNote' ) continue; $possible_values[ $result->textContent ] = 0; ksort( $possible_values ); } foreach( $possible_values as $value => $bool ) { // $xpath = new Domxpath($xmldoc); // $descs = $xpath->query('//tag[@name=""' . $value . '""]/desc[@lang=""en""]'); // $titles = $xpath->query('//tag[@name=""' . $value . '""]/desc[@lang=""' . substr( $this_lang, 0, 2 ) . '""]'); // foreach( $descs as $desc ) { // $i=1; // $opt_title = '
          1. ' . $value; // foreach( $titles as $title ) { // if( $i > 1 ) // continue; // $opt_title .= '
            (' . $title->textContent . ')'; // $i++; // } // $opt_title .= '
          2. '; //add the actual setting add_settings_field( 'speo_exif_' . $value, // ID $value, // Title array( $this, 'speo_callback' ), // Callback 'speo_exif_options', // Page 'speo_options_all', // Section $value //args ); // } } } /** * Sanitize each setting field as needed * * @param array $input Contains all settings fields as array keys */ public function sanitize( $inputs ) { return $inputs; } /** * Print the Section text */ public function print_section_info() { print 'Check the values you want to retreive from images:
              '; } /** * Get the settings option array and print one of its values */ public function speo_callback( $value ) { // echo '
              ';
                  	// 	var_dump($this->options);
                  	// echo '
              '; printf( '', checked( isset( $this->options[$value] ), true, false ) // ( isset( $this->options[$value] ) ? $this->options[$value] : 'none' ) ); } } if( is_admin() ) $my_settings_page = new SpeoOptions(); ",0 "he terms of the GNU General Public * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with this program. If not, see * . */ package ts3bot.helpers; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Helper for testing method signatures. */ public final class MethodSignatureTester { // Object methods. private static final List objectMethodSignatures = new ArrayList(); static { for (Method m : Object.class.getDeclaredMethods()) { objectMethodSignatures.add(new MethodSignature(m.getName(), m.getParameterTypes())); } } /** * Checks whether specified interface declares all of public methods implementation class declares. * * @param impl * implementation class * @param interf * interface class * @throws RuntimeException * When interface does not declare public method implementation class does */ public static final void hasInterfAllImplPublicMethods(final Class impl, final Class interf) { List interfMethodSignatures = new ArrayList( 100); // Generate interface method signatures. for (Method m : interf.getDeclaredMethods()) { // Interface has only public abstract methods. interfMethodSignatures.add(new MethodSignature(m.getName(), m.getParameterTypes())); } for (Method m : impl.getDeclaredMethods()) { // Checking only public methods. MethodSignature ms; if (Modifier.isPublic(m.getModifiers())) { // Build method signature. ms = new MethodSignature(m.getName(), m.getParameterTypes()); // Don't check methods derived from Object. if (!objectMethodSignatures.contains(ms)) { // Check if interface declares it. if (!interfMethodSignatures.contains(ms)) { throw new RuntimeException( ""Interface '"" + interf.getName() + ""' does not declare method "" + ms.toString() + "" implemented in class '"" + impl.getName() + ""'!""); } } } } } /** * Class that specified method signature in Java. */ private static class MethodSignature { private final String name; private final Class[] params; public MethodSignature(final String name, final Class[] params) { this.name = name; this.params = params; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.name == null) ? 0 : this.name.hashCode()); result = prime * result + ((this.params == null) ? 0 : this.params.hashCode()); return result; } @Override public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (this.getClass() != obj.getClass()) return false; MethodSignature other = (MethodSignature) obj; if (this.name == null) { if (other.name != null) return false; } else if (!this.name.equals(other.name)) return false; if (this.params == null) { if (other.params != null) return false; } else if (this.params.length != other.params.length) return false; for (int i = 0; i < this.params.length; i++) { if (!this.params[i].equals(other.params[i])) { return false; } } return true; } @Override public String toString() { return ""MethodSignature [name="" + this.name + "", params="" + Arrays.toString(this.params) + ""]""; } } } ",0 "tion"" content=""Debugging with GDB"">

              Next: Input/Output, Previous: Environment, Up: Running


              4.5 Your Program's Working Directory

              Each time you start your program with run, it inherits its working directory from the current working directory of gdb. The gdb working directory is initially whatever it inherited from its parent process (typically the shell), but you can specify a new working directory in gdb with the cd command.

              The gdb working directory also serves as a default for the commands that specify files for gdb to operate on. See Commands to Specify Files.

              cd directory
              Set the gdb working directory to directory.


              pwd
              Print the gdb working directory.

              It is generally impossible to find the current working directory of the process being debugged (since a program can change its directory during its run). If you work on a system where gdb is configured with the /proc support, you can use the info proc command (see SVR4 Process Information) to find out the current working directory of the debuggee. ",0 "** * Copyright ¨Ï 2016 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ¡°Software¡±), * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. * THE SOFTWARE IS PROVIDED ¡°AS IS¡±, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *********************************************************************************************************************************************************/ /** ****************************************************************************** * @file ADC/Illumination_RGBLED/W7500x_it.h * @author IOP Team * @version V1.0.0 * @date 26-AUG-2015 * @brief This file contains the headers of the interrupt handlers. ****************************************************************************** * @attention * * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, WIZnet SHALL NOT BE HELD LIABLE FOR ANY * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * *

              © COPYRIGHT 2015 WIZnet Co.,Ltd.

              ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __W7500X_IT_H #define __W7500X_IT_H #ifdef __cplusplus extern ""C"" { #endif /* Includes ------------------------------------------------------------------*/ #include ""W7500x.h"" /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void NMI_Handler(void); void HardFault_Handler(void); void SVC_Handler(void); void PendSV_Handler(void); void SysTick_Handler(void); void SSP0_Handler(void); void SSP1_Handler(void); void UART0_Handler(void); void UART0_Handler(void); void UART1_Handler(void); void UART2_Handler(void); void I2C0_Handler(void); void I2C1_Handler(void); void PORT0_Handler(void); void PORT1_Handler(void); void PORT2_Handler(void); void DMA_Handler(void); void DUALTIMER0_Handler(void); void DUALTIMER1_Handler(void); void PWM0_Handler(void); void PWM1_Handler(void); void PWM2_Handler(void); void PWM3_Handler(void); void PWM4_Handler(void); void PWM5_Handler(void); void PWM6_Handler(void); void PWM7_Handler(void); void ADC_Handler(void); void WZTOE_Handler(void); void EXTI_Handler(void); #endif /* __W7500X_IT_H */ /******************* (C) COPYRIGHT 2015 WIZnet Co.,Ltd. *****END OF FILE****/ ",0 "lity Assurance for Autism Jobs website. May also have other jobs available to other sites.

              Job Requirments

              This job is available to anyone who would like to work in helping Autistics find work, or to help those providing services to Autistics find people to work for them.

              Ideal Candidate

              The candidate will have attention to details, ability to communicate what they notice about services offered by Autism Jobs, and is able to work largely independently.

              Job Location

              Street Address
              Off Site
              Province
              British Columbia (but available to all locations)
              Country
              Canada
              Remote Avalibility
              Full Remote
              Partial Remote
              Potential for future on site work

              How to Apply

              Instructions
              Please Email, or phone
              Email
              info@datsemultimedia.com
              Website
              Autism Jobs
              Phone Number
              250-362-5701
              ",0 "raphics.RectF; import android.graphics.drawable.Drawable; import android.os.Build; import android.support.annotation.NonNull; import android.support.v4.view.ViewCompat; import android.text.TextUtils; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.HorizontalScrollView; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * @author Aidan Follestad (afollestad) */ public class LinearBreadcrumb extends HorizontalScrollView implements View.OnClickListener { public static class Crumb implements Serializable { public Crumb(String path,String attachMsg) { mPath = path; mAttachMsg = attachMsg; } private final String mPath; private final String mAttachMsg; private int mScrollY; private int mScrollOffset; public int getScrollY() { return mScrollY; } public int getScrollOffset() { return mScrollOffset; } public void setScrollY(int scrollY) { this.mScrollY = scrollY; } public void setScrollOffset(int scrollOffset) { this.mScrollOffset = scrollOffset; } public String getPath() { return mPath; } public String getTitle() { return (!TextUtils.isEmpty(mAttachMsg)) ? mAttachMsg : mPath; } public String getmAttachMsg() { return mAttachMsg; } @Override public boolean equals(Object o) { return (o instanceof Crumb) && ((Crumb) o).getPath().equals(getPath()); } @Override public String toString() { return ""Crumb{"" + ""mAttachMsg='"" + mAttachMsg + '\'' + "", mPath='"" + mPath + '\'' + "", mScrollY="" + mScrollY + "", mScrollOffset="" + mScrollOffset + '}'; } } public interface SelectionCallback { void onCrumbSelection(Crumb crumb, String absolutePath, int count, int index); } public LinearBreadcrumb(Context context) { super(context); init(); } public LinearBreadcrumb(Context context, AttributeSet attrs) { super(context, attrs); init(); } public LinearBreadcrumb(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(); } private List mCrumbs; private List mOldCrumbs; private LinearLayout mChildFrame; private int mActive; private SelectionCallback mCallback; private void init() { setMinimumHeight((int) getResources().getDimension(R.dimen.breadcrumb_height)); setClipToPadding(false); mCrumbs = new ArrayList<>(); mChildFrame = new LinearLayout(getContext()); addView(mChildFrame, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT)); } @TargetApi(Build.VERSION_CODES.JELLY_BEAN) private void setAlpha(View view, int alpha) { if (view instanceof ImageView && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { ((ImageView) view).setImageAlpha(alpha); } else { ViewCompat.setAlpha(view, alpha); } } public void addCrumb(@NonNull Crumb crumb, boolean refreshLayout) { LinearLayout view = (LinearLayout) LayoutInflater.from(getContext()).inflate(R.layout.bread_crumb, this, false); view.setTag(mCrumbs.size()); view.setClickable(true); view.setFocusable(true); view.setOnClickListener(this); mChildFrame.addView(view, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); mCrumbs.add(crumb); if (refreshLayout) { mActive = mCrumbs.size() - 1; requestLayout(); } invalidateActivatedAll(); } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); //RTL works fine like this View child = mChildFrame.getChildAt(mActive); if (child != null) smoothScrollTo(child.getLeft(), 0); } public Crumb findCrumb(@NonNull String forDir) { for (int i = 0; i < mCrumbs.size(); i++) { if (mCrumbs.get(i).getPath().equals(forDir)) return mCrumbs.get(i); } return null; } public void clearCrumbs() { try { mOldCrumbs = new ArrayList<>(mCrumbs); mCrumbs.clear(); mChildFrame.removeAllViews(); } catch (IllegalStateException e) { e.printStackTrace(); } } public Crumb getCrumb(int index) { return mCrumbs.get(index); } public void setCallback(SelectionCallback callback) { mCallback = callback; } public boolean setActive(Crumb newActive) { mActive = mCrumbs.indexOf(newActive); for(int i = size()-1;size()>mActive+1;i--){ removeCrumbAt(i); } ((LinearLayout)mChildFrame.getChildAt(mActive)).getChildAt(1).setVisibility(View.GONE); boolean success = mActive > -1; if (success) requestLayout(); return success; } private void invalidateActivatedAll() { for (int i = 0; i < mCrumbs.size(); i++) { Crumb crumb = mCrumbs.get(i); invalidateActivated(mChildFrame.getChildAt(i), mActive == mCrumbs.indexOf(crumb), i < mCrumbs.size() - 1).setText(crumb.getTitle()); } } public void removeCrumbAt(int index) { mCrumbs.remove(index); mChildFrame.removeViewAt(index); } private void updateIndices() { for (int i = 0; i < mChildFrame.getChildCount(); i++) mChildFrame.getChildAt(i).setTag(i); } private boolean isValidPath(String path) { return path == null; } public int size() { return mCrumbs.size(); } private TextView invalidateActivated(View view, boolean isActive, boolean isShowSeparator) { LinearLayout child = (LinearLayout) view; if (isShowSeparator) child.getChildAt(1).setVisibility(View.VISIBLE); return (TextView) child.getChildAt(0); } public int getActiveIndex() { return mActive; } @Override public void onClick(View v) { if (mCallback != null) { int index = (Integer) v.getTag(); if (index >= 0 && index < (size()-1)) { setActive(mCrumbs.get(index)); mCallback.onCrumbSelection(mCrumbs.get(index), getAbsolutePath(mCrumbs.get(index), ""/""), mCrumbs.size(), index); } } } public static class SavedStateWrapper implements Serializable { public final int mActive; public final List mCrumbs; public final int mVisibility; public SavedStateWrapper(LinearBreadcrumb view) { mActive = view.mActive; mCrumbs = view.mCrumbs; mVisibility = view.getVisibility(); } } public SavedStateWrapper getStateWrapper() { return new SavedStateWrapper(this); } public void restoreFromStateWrapper(SavedStateWrapper mSavedState, Activity context) { if (mSavedState != null) { mActive = mSavedState.mActive; for (Crumb c : mSavedState.mCrumbs) { addCrumb(c, false); } requestLayout(); setVisibility(mSavedState.mVisibility); } } public String getAbsolutePath(Crumb crumb, @NonNull String separator) { StringBuilder builder = new StringBuilder(); if (size() > 1 && !crumb.equals(mCrumbs.get(0))) { List crumbs = mCrumbs.subList(1, size()); for (Crumb mCrumb : crumbs) { builder.append(mCrumb.getPath()); builder.append(separator); if (mCrumb.equals(crumb)) { break; } } String path = builder.toString(); return path.substring(0, path.length() -1); } else { return null; } } public String getCurAbsolutePath(@NonNull String separator){ return getAbsolutePath(getCrumb(mActive),separator); } public void addRootCrumb() { clearCrumbs(); addCrumb(new Crumb(""/"",""root""), true); } public void addPath(@NonNull String path,@NonNull String sha, @NonNull String separator) { clearCrumbs(); addCrumb(new Crumb("""",""""), false); String[] paths = path.split(separator); Crumb lastCrumb = null; for (String splitPath : paths) { lastCrumb = new Crumb(splitPath,sha); addCrumb(lastCrumb, false); } if (lastCrumb != null) { setActive(lastCrumb); } } }",0 "
              #**#",0 "ang.System.*; import org.rooms.*; import org.resources.AudioPack; import org.resources.Collisions; import org.resources.Element; import org.resources.ImagePack; import org.resources.VisibleObject; import org.walls.DamageableWall; import org.walls.Wall; import org.enemies.*; public class AirBall extends Projectile { public static BufferedImage[] ani = airani; public AirBall(float X, float Y, float vx, float vy) { image = ani[0]; dead = false; color = red; x = X; y = Y; vX = vx * 2.5f; vY = vy * 2.5f; life = lifeCapacity = -1 - (int) round(150 * random()); w = h = 22; if (vX == 0 && vY == 0) { vX = 5 * (float) random() - 2.5f; vY = 5 * (float) random() - 2.5f; } if (abs(vX) > abs(vY)) { h = 13; w = 20; } // int counter=0; // while(hypot(vX,vY)<1&&counter<10){counter++;vX*=2;vY*=2;} if (abs(abs(atan((double) vY / vX)) - PI / 4) > PI / 8) image = ani[abs(vX) > abs(vY) ? (vX < 0 ? 0 : 1) : (vY > 0 ? 2 : 3)]; else { image = ani[vX > 0 ? (vY < 0 ? 4 : 6) : (vY < 0 ? 5 : 7)]; w = h = 13; } synchronized (sync) { livePros++; } } public void run() { // boolean frame=Clock.frame; if (life != 0) { if (life > 0) image = ani[11]; if (life > 3) image = ani[10]; if (life > 6) image = ani[9]; if (life > 8) image = ani[8]; // Clock.waitFor(frame=!frame); // if(Clock.dead)break; if (life < 0) { vX *= .98; vY *= .98; x += vX; y -= vY; } if (life == -200) { vY = vX = 0; life = 10; w = h = 16; image = ani[8]; x += round(10 * random()); y += round(10 * random()); } life--; boolean collided = false; for (int i = 0; i < Room.walls.size(); i++) { Wall wal = Room.walls.get(i); if (vY == 0 && vX == 0) break; if ((x < wal.x + wal.w && x + w > wal.x) && (y < wal.y + wal.h && y + h > wal.y)) { collided = true; if (wal.damagable) { w = h = 16; ((DamageableWall) wal).life -= 5; // if // (Jump.kraidLife<=0&&Jump.countdown<0){Jump.countdown=500; // AudioPack.playAudio(""Ima Firen Mah Lazor!.wav"",0.1); // } } } } synchronized (Room.enemies) { for (VisibleObject en : Room.enemies) { if (Collisions.collides(this, en)) { if (life < 0 || life > 2) { ((Enemy) en).vMultiplier = -1; } if (life < 0) { ((Enemy) en).damage(Element.AIR, 12); image = ani[8]; collided = true; } } } } if (collided) { vY = vX = 0; life = 10; w = h = 16; image = ani[8]; x += round(10 * random()); y += round(10 * random()); // AudioPack.playAudio(""BExplosion2.wav"",0.05); AudioPack.playClip(boom); } } else dead = true; } } ",0 "bachelorpraktikum.visualisierbar.model.Element.Type; public class ElementShapeableTest extends ShapeableImplementationTest { @Override protected Shapeable getShapeable() { Context context = new Context(); Node node = Node.in(context).create(""node"", new Coordinates(0, 0)); return Element.in(context).create(""element"", Type.HauptSignal, node, State.FAHRT); } } ",0 "S NOTICE: This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation, and provided that the following conditions are met: * Redistributions of source code must retain this COPYING CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the PATENT MARKING NOTICE (below), and the PATENT RIGHTS GRANT (below). * Redistributions in binary form must reproduce this COPYING CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the PATENT MARKING NOTICE (below), and the PATENT RIGHTS GRANT (below) in the documentation and/or other materials provided with the distribution. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. COPYRIGHT NOTICE: TokuFT, Tokutek Fractal Tree Indexing Library. Copyright (C) 2007-2013 Tokutek, Inc. DISCLAIMER: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. UNIVERSITY PATENT NOTICE: The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it. PATENT MARKING NOTICE: This software is covered by US Patent No. 8,185,551. This software is covered by US Patent No. 8,489,638. PATENT RIGHTS GRANT: ""THIS IMPLEMENTATION"" means the copyrightable works distributed by Tokutek as part of the Fractal Tree project. ""PATENT CLAIMS"" means the claims of patents that are owned or licensable by Tokutek, both currently or in the future; and that in the absence of this license would be infringed by THIS IMPLEMENTATION or by using or running THIS IMPLEMENTATION. ""PATENT CHALLENGE"" shall mean a challenge to the validity, patentability, enforceability and/or non-infringement of any of the PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS. Tokutek hereby grants to you, for the term and geographical scope of the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, transfer, and otherwise run, modify, and propagate the contents of THIS IMPLEMENTATION, where such license applies only to the PATENT CLAIMS. This grant does not include claims that would be infringed only as a consequence of further modifications of THIS IMPLEMENTATION. If you or your agent or licensee institute or order or agree to the institution of patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that THIS IMPLEMENTATION constitutes direct or contributory patent infringement, or inducement of patent infringement, then any rights granted to you under this License shall terminate as of the date such litigation is filed. If you or your agent or exclusive licensee institute or order or agree to the institution of a PATENT CHALLENGE, then Tokutek may terminate any rights granted to you under this License. */ #pragma once #ident ""Copyright (c) 2007-2013 Tokutek Inc. All rights reserved."" #include ""cachetable/cachetable-internal.h"" // // Dummy callbacks for checkpointing // static void dummy_log_fassociate(CACHEFILE UU(cf), void* UU(p)) { } static void dummy_close_usr(CACHEFILE UU(cf), int UU(i), void* UU(p), bool UU(b), LSN UU(lsn)) { } static void dummy_free_usr(CACHEFILE UU(cf), void* UU(p)) { } static void dummy_chckpnt_usr(CACHEFILE UU(cf), int UU(i), void* UU(p)) { } static void dummy_begin(LSN UU(lsn), void* UU(p)) { } static void dummy_end(CACHEFILE UU(cf), int UU(i), void* UU(p)) { } static void dummy_note_pin(CACHEFILE UU(cf), void* UU(p)) { } static void dummy_note_unpin(CACHEFILE UU(cf), void* UU(p)) { } // // Helper function to set dummy functions in given cachefile. // static UU() void create_dummy_functions(CACHEFILE cf) { void *ud = NULL; toku_cachefile_set_userdata(cf, ud, &dummy_log_fassociate, &dummy_close_usr, &dummy_free_usr, &dummy_chckpnt_usr, &dummy_begin, &dummy_end, &dummy_note_pin, &dummy_note_unpin); }; ",0 "** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QWIZARD_WIN_P_H #define QWIZARD_WIN_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #ifndef QT_NO_WIZARD #ifndef QT_NO_STYLE_WINDOWSVISTA #include #include #include #include #include QT_BEGIN_NAMESPACE class QVistaBackButton : public QAbstractButton { public: QVistaBackButton(QWidget *widget); QSize sizeHint() const; inline QSize minimumSizeHint() const { return sizeHint(); } void enterEvent(QEvent *event); void leaveEvent(QEvent *event); void paintEvent(QPaintEvent *event); }; class QWizard; class QVistaHelper : public QObject { public: QVistaHelper(QWizard *wizard); ~QVistaHelper(); enum TitleBarChangeType { NormalTitleBar, ExtendedTitleBar }; bool setDWMTitleBar(TitleBarChangeType type); void setTitleBarIconAndCaptionVisible(bool visible); void mouseEvent(QEvent *event); bool handleWinEvent(MSG *message, long *result); void resizeEvent(QResizeEvent *event); void paintEvent(QPaintEvent *event); QVistaBackButton *backButton() const { return backButton_; } void disconnectBackButton() { if (backButton_) backButton_->disconnect(); } void hideBackButton() { if (backButton_) backButton_->hide(); } void setWindowPosHack(); QColor basicWindowFrameColor(); enum VistaState { VistaAero, VistaBasic, Classic, Dirty }; static VistaState vistaState(); static int titleBarSize() { return frameSize() + captionSize(); } static int topPadding() { return 8; } static int topOffset() { return titleBarSize() + (vistaState() == VistaAero ? 13 : 3); } private: static HFONT getCaptionFont(HANDLE hTheme); bool drawTitleText(QPainter *painter, const QString &text, const QRect &rect, HDC hdc); static bool drawBlackRect(const QRect &rect, HDC hdc); static int frameSize() { return GetSystemMetrics(SM_CYSIZEFRAME); } static int captionSize() { return GetSystemMetrics(SM_CYCAPTION); } static int backButtonSize() { return 31; } // ### should be queried from back button itself static int iconSize() { return 16; } // Standard Aero static int padding() { return 7; } // Standard Aero static int leftMargin() { return backButtonSize() + padding(); } static int glowSize() { return 10; } int titleOffset(); bool resolveSymbols(); void drawTitleBar(QPainter *painter); void setMouseCursor(QPoint pos); void collapseTopFrameStrut(); bool winEvent(MSG *message, long *result); void mouseMoveEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event); bool eventFilter(QObject *obj, QEvent *event); static bool is_vista; static VistaState cachedVistaState; static bool isCompositionEnabled(); static bool isThemeActive(); enum Changes { resizeTop, movePosition, noChange } change; QPoint pressedPos; bool pressed; QRect rtTop; QRect rtTitle; QWizard *wizard; QVistaBackButton *backButton_; }; QT_END_NAMESPACE #endif // QT_NO_STYLE_WINDOWSVISTA #endif // QT_NO_WIZARD #endif // QWIZARD_WIN_P_H ",0 "ork for PHP 5.1.6 or newer * * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * Postgre Database Adapter Class * * Note: _DB is an extender class that the app controller * creates dynamically based on whether the active record * class is being used or not. * * @package CodeIgniter * @subpackage Drivers * @category Database * @author EllisLab Dev Team * @link http://codeigniter.com/user_guide/database/ */ class CI_DB_postgre_driver extends CI_DB { var $dbdriver = 'postgre'; var $_escape_char = '""'; // clause and character used for LIKE escape sequences var $_like_escape_str = "" ESCAPE '%s' ""; var $_like_escape_chr = '!'; /** * The syntax to count rows is slightly different across different * database engines, so this string appears in each driver and is * used for the count_all() and count_all_results() functions. */ var $_count_string = ""SELECT COUNT(*) AS ""; var $_random_keyword = ' RANDOM()'; // database specific random keyword /** * Connection String * * @access private * @return string */ function _connect_string() { $components = array( 'hostname' => 'host', 'port' => 'port', 'database' => 'dbname', 'username' => 'user', 'password' => 'password' ); $connect_string = """"; foreach ($components as $key => $val) { if (isset($this->$key) && $this->$key != '') { $connect_string .= "" $val="".$this->$key; } } return trim($connect_string); } // -------------------------------------------------------------------- /** * Non-persistent database connection * * @access private called by the base class * @return resource */ function db_connect() { return @pg_connect($this->_connect_string()); } // -------------------------------------------------------------------- /** * Persistent database connection * * @access private called by the base class * @return resource */ function db_pconnect() { return @pg_pconnect($this->_connect_string()); } // -------------------------------------------------------------------- /** * Reconnect * * Keep / reestablish the db connection if no queries have been * sent for a length of time exceeding the server's idle timeout * * @access public * @return void */ function reconnect() { if (pg_ping($this->conn_id) === FALSE) { $this->conn_id = FALSE; } } // -------------------------------------------------------------------- /** * Select the database * * @access private called by the base class * @return resource */ function db_select() { // Not needed for Postgre so we'll return TRUE return TRUE; } // -------------------------------------------------------------------- /** * Set client character set * * @access public * @param string * @param string * @return resource */ function db_set_charset($charset, $collation) { // @todo - add support if needed return TRUE; } // -------------------------------------------------------------------- /** * Version number query string * * @access public * @return string */ function _version() { return ""SELECT version() AS ver""; } // -------------------------------------------------------------------- /** * Execute the query * * @access private called by the base class * @param string an SQL query * @return resource */ function _execute($sql) { $sql = $this->_prep_query($sql); return @pg_query($this->conn_id, $sql); } // -------------------------------------------------------------------- /** * Prep the query * * If needed, each database adapter can prep the query string * * @access private called by execute() * @param string an SQL query * @return string */ function _prep_query($sql) { return $sql; } // -------------------------------------------------------------------- /** * Begin Transaction * * @access public * @return bool */ function trans_begin($test_mode = FALSE) { if ( ! $this->trans_enabled) { return TRUE; } // When transactions are nested we only begin/commit/rollback the outermost ones if ($this->_trans_depth > 0) { return TRUE; } // Reset the transaction failure flag. // If the $test_mode flag is set to TRUE transactions will be rolled back // even if the queries produce a successful result. $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; return @pg_exec($this->conn_id, ""begin""); } // -------------------------------------------------------------------- /** * Commit Transaction * * @access public * @return bool */ function trans_commit() { if ( ! $this->trans_enabled) { return TRUE; } // When transactions are nested we only begin/commit/rollback the outermost ones if ($this->_trans_depth > 0) { return TRUE; } return @pg_exec($this->conn_id, ""commit""); } // -------------------------------------------------------------------- /** * Rollback Transaction * * @access public * @return bool */ function trans_rollback() { if ( ! $this->trans_enabled) { return TRUE; } // When transactions are nested we only begin/commit/rollback the outermost ones if ($this->_trans_depth > 0) { return TRUE; } return @pg_exec($this->conn_id, ""rollback""); } // -------------------------------------------------------------------- /** * Escape String * * @access public * @param string * @param bool whether or not the string will be used in a LIKE condition * @return string */ function escape_str($str, $like = FALSE) { if (is_array($str)) { foreach ($str as $key => $val) { $str[$key] = $this->escape_str($val, $like); } return $str; } $str = pg_escape_string($str); // escape LIKE condition wildcards if ($like === TRUE) { $str = str_replace( array('%', '_', $this->_like_escape_chr), array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr), $str); } return $str; } // -------------------------------------------------------------------- /** * Affected Rows * * @access public * @return integer */ function affected_rows() { return @pg_affected_rows($this->result_id); } // -------------------------------------------------------------------- /** * Insert ID * * @access public * @return integer */ function insert_id() { $v = $this->_version(); $v = $v['server']; $table = func_num_args() > 0 ? func_get_arg(0) : NULL; $column = func_num_args() > 1 ? func_get_arg(1) : NULL; if ($table == NULL && $v >= '8.1') { $sql='SELECT LASTVAL() as ins_id'; } elseif ($table != NULL && $column != NULL && $v >= '8.0') { $sql = sprintf(""SELECT pg_get_serial_sequence('%s','%s') as seq"", $table, $column); $query = $this->query($sql); $row = $query->row(); $sql = sprintf(""SELECT CURRVAL('%s') as ins_id"", $row->seq); } elseif ($table != NULL) { // seq_name passed in table parameter $sql = sprintf(""SELECT CURRVAL('%s') as ins_id"", $table); } else { return pg_last_oid($this->result_id); } $query = $this->query($sql); $row = $query->row(); return $row->ins_id; } // -------------------------------------------------------------------- /** * ""Count All"" query * * Generates a platform-specific query string that counts all records in * the specified database * * @access public * @param string * @return string */ function count_all($table = '') { if ($table == '') { return 0; } $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . "" FROM "" . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); if ($query->num_rows() == 0) { return 0; } $row = $query->row(); $this->_reset_select(); return (int) $row->numrows; } // -------------------------------------------------------------------- /** * Show table query * * Generates a platform-specific query string so that the table names can be fetched * * @access private * @param boolean * @return string */ function _list_tables($prefix_limit = FALSE) { $sql = ""SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'""; if ($prefix_limit !== FALSE AND $this->dbprefix != '') { $sql .= "" AND table_name LIKE '"".$this->escape_like_str($this->dbprefix).""%' "".sprintf($this->_like_escape_str, $this->_like_escape_chr); } return $sql; } // -------------------------------------------------------------------- /** * Show column query * * Generates a platform-specific query string so that the column names can be fetched * * @access public * @param string the table name * @return string */ function _list_columns($table = '') { return ""SELECT column_name FROM information_schema.columns WHERE table_name ='"".$table.""'""; } // -------------------------------------------------------------------- /** * Field data query * * Generates a platform-specific query so that the column data can be retrieved * * @access public * @param string the table name * @return object */ function _field_data($table) { return ""SELECT * FROM "".$table."" LIMIT 1""; } // -------------------------------------------------------------------- /** * The error message string * * @access private * @return string */ function _error_message() { return pg_last_error($this->conn_id); } // -------------------------------------------------------------------- /** * The error message number * * @access private * @return integer */ function _error_number() { return ''; } // -------------------------------------------------------------------- /** * Escape the SQL Identifiers * * This function escapes column and table names * * @access private * @param string * @return string */ function _escape_identifiers($item) { if ($this->_escape_char == '') { return $item; } foreach ($this->_reserved_identifiers as $id) { if (strpos($item, '.'.$id) !== FALSE) { $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); // remove duplicates if the user already included the escape return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); } } if (strpos($item, '.') !== FALSE) { $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; } else { $str = $this->_escape_char.$item.$this->_escape_char; } // remove duplicates if the user already included the escape return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); } // -------------------------------------------------------------------- /** * From Tables * * This function implicitly groups FROM tables so there is no confusion * about operator precedence in harmony with SQL standards * * @access public * @param type * @return type */ function _from_tables($tables) { if ( ! is_array($tables)) { $tables = array($tables); } return implode(', ', $tables); } // -------------------------------------------------------------------- /** * Insert statement * * Generates a platform-specific insert string from the supplied data * * @access public * @param string the table name * @param array the insert keys * @param array the insert values * @return string */ function _insert($table, $keys, $values) { return ""INSERT INTO "".$table."" ("".implode(', ', $keys)."") VALUES ("".implode(', ', $values)."")""; } // -------------------------------------------------------------------- /** * Insert_batch statement * * Generates a platform-specific insert string from the supplied data * * @access public * @param string the table name * @param array the insert keys * @param array the insert values * @return string */ function _insert_batch($table, $keys, $values) { return ""INSERT INTO "".$table."" ("".implode(', ', $keys)."") VALUES "".implode(', ', $values); } // -------------------------------------------------------------------- /** * Update statement * * Generates a platform-specific update string from the supplied data * * @access public * @param string the table name * @param array the update data * @param array the where clause * @param array the orderby clause * @param array the limit clause * @return string */ function _update($table, $values, $where, $orderby = array(), $limit = FALSE) { foreach ($values as $key => $val) { $valstr[] = $key."" = "".$val; } $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; $orderby = (count($orderby) >= 1)?' ORDER BY '.implode("", "", $orderby):''; $sql = ""UPDATE "".$table."" SET "".implode(', ', $valstr); $sql .= ($where != '' AND count($where) >=1) ? "" WHERE "".implode("" "", $where) : ''; $sql .= $orderby.$limit; return $sql; } // -------------------------------------------------------------------- /** * Truncate statement * * Generates a platform-specific truncate string from the supplied data * If the database does not support the truncate() command * This function maps to ""DELETE FROM table"" * * @access public * @param string the table name * @return string */ function _truncate($table) { return ""TRUNCATE "".$table; } // -------------------------------------------------------------------- /** * Delete statement * * Generates a platform-specific delete string from the supplied data * * @access public * @param string the table name * @param array the where clause * @param string the limit clause * @return string */ function _delete($table, $where = array(), $like = array(), $limit = FALSE) { $conditions = ''; if (count($where) > 0 OR count($like) > 0) { $conditions = ""\nWHERE ""; $conditions .= implode(""\n"", $this->ar_where); if (count($where) > 0 && count($like) > 0) { $conditions .= "" AND ""; } $conditions .= implode(""\n"", $like); } $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; return ""DELETE FROM "".$table.$conditions.$limit; } // -------------------------------------------------------------------- /** * Limit string * * Generates a platform-specific LIMIT clause * * @access public * @param string the sql query string * @param integer the number of rows to limit the query to * @param integer the offset value * @return string */ function _limit($sql, $limit, $offset) { $sql .= ""LIMIT "".$limit; if ($offset > 0) { $sql .= "" OFFSET "".$offset; } return $sql; } // -------------------------------------------------------------------- /** * Close DB Connection * * @access public * @param resource * @return void */ function _close($conn_id) { @pg_close($conn_id); } } /* End of file postgre_driver.php */ /* Location: ./system/database/drivers/postgre/postgre_driver.php */",0 " background-color: rgb(255, 255, 255);"">
              reordc_c
              A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

              Procedure
              Abstract
              Required_Reading
              Keywords
              Brief_I/O
              Detailed_Input
              Detailed_Output
              Parameters
              Exceptions
              Files
              Particulars
              Examples
              Restrictions
              Literature_References
              Author_and_Institution
              Version
              Index_Entries

              Procedure

                 void reordc_c ( ConstSpiceInt  * iorder,
                                 SpiceInt         ndim,
                                 SpiceInt         lenvals,
                                 void           * array    ) 
              
              

              Abstract

               
                 Re-order the elements of an array of character strings 
                 according to a given order vector. 
               

              Required_Reading

               
                 None. 
               

              Keywords

               
                 ARRAY,  SORT 
               
              
              

              Brief_I/O

               
                 VARIABLE  I/O  DESCRIPTION 
                 --------  ---  -------------------------------------------------- 
                 iorder     I   Order vector to be used to re-order array. 
                 ndim       I   Dimension of array. 
                 lenvals    I   String length.
                 array     I/O  Array to be re-ordered. 
               

              Detailed_Input

               
                 iorder      is the order vector to be used to re-order the input 
                             array. The first element of iorder is the index of 
                             the first item of the re-ordered array, and so on. 
              
                             Note that the order imposed by reordc_c is not the 
                             same order that would be imposed by a sorting 
                             routine. In general, the order vector will have 
                             been created (by one of the order routines) for 
                             a related array, as illustrated in the example below. 
              
                             The elements of iorder range from zero to ndim-1.
              
                 ndim        is the number of elements in the input array. 
              
                 lenvals     is the declared length of the strings in the input
                             string array, including null terminators.  The input   
                             array should be declared with dimension 
              
                                [ndim][lenvals]
              
                 array       on input, is an array containing some number of 
                             elements in unspecified order. 
               

              Detailed_Output

               
                 array       on output, is the same array, with the elements 
                             in re-ordered as specified by iorder. 
               

              Parameters

               
                 None. 
               

              Exceptions

               
                 1) If the input string array pointer is null, the error
                    SPICE(NULLPOINTER) will be signaled.
               
                 2) If the input array string's length is less than 2, the error
                    SPICE(STRINGTOOSHORT) will be signaled.
              
                 3) If memory cannot be allocated to create a Fortran-style version of
                    the input order vector, the error SPICE(MALLOCFAILED) is signaled.
               
                 4) If ndim < 2, this routine executes a no-op.  This case is 
                    not an error.
              

              Files

               
                 None. 
               

              Particulars

               
                 reordc_c uses a cyclical algorithm to re-order the elements of 
                 the array in place. After re-ordering, element iorder[0] of 
                 the input array is the first element of the output array, 
                 element iorder[1] of the input array is the second element of 
                 the output array, and so on. 
              
                 The order vector used by reordc_c is typically created for 
                 a related array by one of the order*_c routines, as shown in 
                 the example below. 
               

              Examples

               
                 In the following example, the order*_c and reord*_c routines are 
                 used to sort four related arrays (containing the names, 
                 masses, integer ID codes, and visual magnitudes for a group 
                 of satellites). This is representative of the typical use of 
                 these routines. 
              
                    #include "SpiceUsr.h"
                         .
                         .
                         .
                    /.
                    Sort the object arrays by name. 
                    ./ 
              
                    orderc_c ( namlen, names, n,  iorder ); 
              
                    reordc_c ( iorder, n, namlen, names  );
                    reordd_c ( iorder, n,         masses ); 
                    reordi_c ( iorder, n,         codes  ); 
                    reordd_c ( iorder, n,         vmags  );
              

              Restrictions

               
                 None. 
               

              Literature_References

               
                 None. 
               

              Author_and_Institution

               
                 N.J. Bachman    (JPL)
                 W.L. Taber      (JPL) 
                 I.M. Underwood  (JPL) 
               

              Version

               
                 -CSPICE Version 1.0.0, 10-JUL-2002 (NJB) (WLT) (IMU)
              

              Index_Entries

               
                 reorder a character array 
               
              Tue Jul 15 14:31:41 2014
              ",0 "ata-ng-class=""activeView.path === 'manage-users' ? 'df-section-3-round' : 'df-section-all-round'"" df-fs-height> ",0 "l rights reserved. * @license GNU General Public License version 2 or later; see LICENSE * */ if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> "" rel=""stylesheet""/>
              "">
              "" value=""title; ?>"" data-minlength=""2"" data-maxlength=""200"" data-msg="""">
              options); ?>
              lang('yes'), 'no'=>lang('no'), ); if(isset($options->show_title)) $default = $options->show_title; else $default = ''; echo form_dropdown('options[show_title]', $show_title, $default, 'class=""form-control input-sm""'); ?>
              1, '2'=>2, '3'=>3, '4'=>4, '6'=>6, ); if(isset($options->cols)) $default = $options->cols; else $default = ''; echo form_dropdown('options[cols]', $cols, $default, 'class=""form-control input-sm""'); ?>
              lang('m_product_admin_setting_lastest_title'), 'future'=>lang('m_product_admin_setting_future_title'), 'sale_price'=>lang('m_product_admin_setting_sale_title'), ); if(isset($options->show_product)) $default = $options->show_product; else $default = ''; echo form_dropdown('options[show_product]', $show_product, $default, 'class=""form-control input-sm""'); ?>
              count) && $options->count != '') echo $options->count; else echo 8; ?>"" placeholder=""""/>
              params, true); ?>
              "" id=""margin-left""> "" id=""margin-right""> "" id=""margin-top""> "" id=""margin-bottom"">
              "" id=""border-left""> "" id=""border-right""> "" id=""border-top""> "" id=""border-bottom"">
              "" id=""padding-left""> "" id=""padding-right""> "" id=""padding-top""> "" id=""padding-bottom"">
              "">
              "">
              '; echo ''; }else { echo '
              '; } ?>
              ""> ', type: 'iframe'} );"">
              ",0 " Success! '.$handleMsg.' '; } if(isset($reports)){ $nReports = 0; while ($row = $reports->fetch_assoc()) { ++$nReports; echo '

              '.$row['location'].'

              '.$row['description'].'

              '.date('M j, Y - g:i A', strtotime($row['time'])).'

              '; } if($nReports == 0){ echo ''; } }else echo ''; ?> ",0 "pliance with the License. You may obtain * a copy of the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an * ""AS IS"" basis, WITHOUT WARRANTY OF ANY KIND, either express * or implied. See the License for the specific language governing * rights and limitations under the License. * * * The Original Code is OIOSAML Java Service Provider. * * The Initial Developer of the Original Code is Trifork A/S. Portions * created by Trifork A/S are Copyright (C) 2008 Danish National IT * and Telecom Agency (http://www.itst.dk). All Rights Reserved. * * Contributor(s): * Joakim Recht * Rolf Njor Jensen * Aage Nielsen * */ package dk.itst.oiosaml.sp.service; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import dk.itst.oiosaml.logging.Logger; import dk.itst.oiosaml.logging.LoggerFactory; import org.apache.commons.configuration.Configuration; import org.opensaml.DefaultBootstrap; import org.opensaml.xml.ConfigurationException; import dk.itst.oiosaml.common.SAMLUtil; import dk.itst.oiosaml.configuration.FileConfiguration; import dk.itst.oiosaml.configuration.SAMLConfiguration; import dk.itst.oiosaml.configuration.SAMLConfigurationFactory; import dk.itst.oiosaml.error.Layer; import dk.itst.oiosaml.error.WrappedException; import dk.itst.oiosaml.logging.Audit; import dk.itst.oiosaml.logging.Operation; import dk.itst.oiosaml.sp.UserAssertion; import dk.itst.oiosaml.sp.UserAssertionHolder; import dk.itst.oiosaml.sp.bindings.BindingHandler; import dk.itst.oiosaml.sp.develmode.DevelMode; import dk.itst.oiosaml.sp.develmode.DevelModeImpl; import dk.itst.oiosaml.sp.metadata.CRLChecker; import dk.itst.oiosaml.sp.metadata.IdpMetadata; import dk.itst.oiosaml.sp.metadata.SPMetadata; import dk.itst.oiosaml.sp.service.session.Request; import dk.itst.oiosaml.sp.service.session.SessionCleaner; import dk.itst.oiosaml.sp.service.session.SessionHandler; import dk.itst.oiosaml.sp.service.session.SessionHandlerFactory; import dk.itst.oiosaml.sp.service.util.Constants; /** * Servlet filter for checking if the user is authenticated. * *

              * If the user is authenticated, a session attribute, * {@link Constants#SESSION_USER_ASSERTION} is set to contain a * {@link UserAssertion} representing the user. The application layer can access * this object to retrieve SAML attributes for the user. *

              * *

              * If the user is not authenticated, a <AuthnRequest> is created and sent * to the IdP. The protocol used for this is selected automatically based on th * available bindings in the SP and IdP metadata. *

              * *

              * The atual redirects are done by {@link BindingHandler} objects. *

              * *

              * Discovery profile is supported by looking at a request parameter named * _saml_idp. If the parameter does not exist, the browser is redirected to * {@link Constants#DISCOVERY_LOCATION}, which reads the domain cookie. If the * returned value contains ids, one of the ids is selected. If none of the ids * in the list is registered, an exception is thrown. If no value has been set, * the first configured IdP is selected automatically. *

              * * @author Joakim Recht * @author Rolf Njor Jensen * @author Aage Nielsen */ public class SPFilter implements Filter { private static final Logger log = LoggerFactory.getLogger(SPFilter.class); private CRLChecker crlChecker = new CRLChecker(); private boolean filterInitialized; private SAMLConfiguration conf; private String hostname; private SessionHandlerFactory sessionHandlerFactory; private AtomicBoolean cleanerRunning = new AtomicBoolean(false); private DevelMode develMode; /** * Static initializer for bootstrapping OpenSAML. */ static { try { DefaultBootstrap.bootstrap(); } catch (ConfigurationException e) { throw new WrappedException(Layer.DATAACCESS, e); } } public void destroy() { SessionCleaner.stopCleaner(); crlChecker.stopChecker(); if (sessionHandlerFactory != null) { sessionHandlerFactory.close(); } SessionHandlerFactory.Factory.close(); } /** * Check whether the user is authenticated i.e. having session with a valid * assertion. If the user is not authenticated an <AuthnRequest> is * sent to the Login Site. * * @param request * The servletRequest * @param response * The servletResponse */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (log.isDebugEnabled()) log.debug(""OIOSAML-J SP Filter invoked""); if (!(request instanceof HttpServletRequest)) { throw new RuntimeException(""Not supported operation...""); } HttpServletRequest servletRequest = ((HttpServletRequest) request); Audit.init(servletRequest); if (!isFilterInitialized()) { try { Configuration conf = SAMLConfigurationFactory.getConfiguration().getSystemConfiguration(); setRuntimeConfiguration(conf); } catch (IllegalStateException e) { request.getRequestDispatcher(""/saml/configure"").forward(request, response); return; } } if (conf.getSystemConfiguration().getBoolean(Constants.PROP_DEVEL_MODE, false)) { log.warn(""Running in debug mode, skipping regular filter""); develMode.doFilter(servletRequest, (HttpServletResponse) response, chain, conf.getSystemConfiguration()); return; } if (cleanerRunning.compareAndSet(false, true)) { SessionCleaner.startCleaner(sessionHandlerFactory.getHandler(), ((HttpServletRequest) request).getSession().getMaxInactiveInterval(), 30); } SessionHandler sessionHandler = sessionHandlerFactory.getHandler(); if (servletRequest.getServletPath().equals(conf.getSystemConfiguration().getProperty(Constants.PROP_SAML_SERVLET))) { log.debug(""Request to SAML servlet, access granted""); chain.doFilter(new SAMLHttpServletRequest(servletRequest, hostname, null), response); return; } final HttpSession session = servletRequest.getSession(); if (log.isDebugEnabled()) log.debug(""sessionId....:"" + session.getId()); Boolean forceAuthn = false; if(request.getParameterMap().containsKey(Constants.QUERY_STRING_FORCE_AUTHN)) { String forceAuthnAsString = request.getParameter(Constants.QUERY_STRING_FORCE_AUTHN); forceAuthn = forceAuthnAsString.toLowerCase().equals(""true""); } // Is the user logged in? if (sessionHandler.isLoggedIn(session.getId()) && session.getAttribute(Constants.SESSION_USER_ASSERTION) != null && !forceAuthn) { int actualAssuranceLevel = sessionHandler.getAssertion(session.getId()).getAssuranceLevel(); int assuranceLevel = conf.getSystemConfiguration().getInt(Constants.PROP_ASSURANCE_LEVEL); if ((actualAssuranceLevel > 0) && (actualAssuranceLevel < assuranceLevel)) { sessionHandler.logOut(session); log.warn(""Assurance level too low: "" + actualAssuranceLevel + "", required: "" + assuranceLevel); throw new RuntimeException(""Assurance level too low: "" + actualAssuranceLevel + "", required: "" + assuranceLevel); } UserAssertion ua = (UserAssertion) session.getAttribute(Constants.SESSION_USER_ASSERTION); if (log.isDebugEnabled()) log.debug(""Everything is ok... Assertion: "" + ua); Audit.log(Operation.ACCESS, servletRequest.getRequestURI()); try { UserAssertionHolder.set(ua); HttpServletRequestWrapper requestWrap = new SAMLHttpServletRequest(servletRequest, ua, hostname); chain.doFilter(requestWrap, response); return; } finally { UserAssertionHolder.set(null); } } else { session.removeAttribute(Constants.SESSION_USER_ASSERTION); UserAssertionHolder.set(null); saveRequestAndGotoLogin((HttpServletResponse) response, servletRequest); } } protected void saveRequestAndGotoLogin(HttpServletResponse response, HttpServletRequest request) throws ServletException, IOException { SessionHandler sessionHandler = sessionHandlerFactory.getHandler(); String relayState = sessionHandler.saveRequest(Request.fromHttpRequest(request)); String protocol = conf.getSystemConfiguration().getString(Constants.PROP_PROTOCOL, ""saml20""); String loginUrl = conf.getSystemConfiguration().getString(Constants.PROP_SAML_SERVLET, ""/saml""); String protocolUrl = conf.getSystemConfiguration().getString(Constants.PROP_PROTOCOL + ""."" + protocol); if (protocolUrl == null) { throw new RuntimeException(""No protocol url configured for "" + Constants.PROP_PROTOCOL + ""."" + protocol); } loginUrl += protocolUrl; if (log.isDebugEnabled()) log.debug(""Redirecting to "" + protocol + "" login handler at "" + loginUrl); RequestDispatcher dispatch = request.getRequestDispatcher(loginUrl); dispatch.forward(new SAMLHttpServletRequest(request, hostname, relayState), response); } public void init(FilterConfig filterConfig) throws ServletException { conf = SAMLConfigurationFactory.getConfiguration(); if (conf.isConfigured()) { try { Configuration conf = SAMLConfigurationFactory.getConfiguration().getSystemConfiguration(); if (conf.getBoolean(Constants.PROP_DEVEL_MODE, false)) { develMode = new DevelModeImpl(); setConfiguration(conf); setFilterInitialized(true); return; } setRuntimeConfiguration(conf); setFilterInitialized(true); return; } catch (IllegalStateException e) { log.error(""Unable to configure"", e); } } setFilterInitialized(false); } private void setRuntimeConfiguration(Configuration conf) { restartCRLChecker(conf); setFilterInitialized(true); setConfiguration(conf); if (!IdpMetadata.getInstance().enableDiscovery()) { log.info(""Discovery profile disabled, only one metadata file found""); } else { if (conf.getString(Constants.DISCOVERY_LOCATION) == null) { throw new IllegalStateException(""Discovery location cannot be null when discovery profile is active""); } } setHostname(); sessionHandlerFactory = SessionHandlerFactory.Factory.newInstance(conf); sessionHandlerFactory.getHandler().resetReplayProtection(conf.getInt(Constants.PROP_NUM_TRACKED_ASSERTIONIDS)); log.info(""Home url: "" + conf.getString(Constants.PROP_HOME)); log.info(""Assurance level: "" + conf.getInt(Constants.PROP_ASSURANCE_LEVEL)); log.info(""SP entity ID: "" + SPMetadata.getInstance().getEntityID()); log.info(""Base hostname: "" + hostname); } private void setHostname() { String url = SPMetadata.getInstance().getDefaultAssertionConsumerService().getLocation(); setHostname(url.substring(0, url.indexOf('/', 8))); } private void restartCRLChecker(Configuration conf) { crlChecker.stopChecker(); int period = conf.getInt(Constants.PROP_CRL_CHECK_PERIOD, 600); if (period > 0) { crlChecker.startChecker(period, IdpMetadata.getInstance(), conf); } } public void setHostname(String hostname) { this.hostname = hostname; } public void setFilterInitialized(boolean b) { filterInitialized = b; } public boolean isFilterInitialized() { return filterInitialized; } public void setConfiguration(Configuration configuration) { SAMLConfigurationFactory.getConfiguration().setConfiguration(configuration); conf = SAMLConfigurationFactory.getConfiguration(); } public void setSessionHandlerFactory(SessionHandlerFactory sessionHandlerFactory) { this.sessionHandlerFactory = sessionHandlerFactory; } public void setDevelMode(DevelMode develMode) { this.develMode = develMode; } } ",0 "this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.camel.component.seda; import org.apache.camel.ContextTestSupport; import org.apache.camel.builder.RouteBuilder; /** * @version */ public class SedaInOnlyTest extends ContextTestSupport { public void testInOnly() throws Exception { getMockEndpoint(""mock:result"").expectedBodiesReceived(""Hello World""); template.sendBody(""direct:start"", ""Hello World""); assertMockEndpointsSatisfied(); } @Override protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from(""direct:start"").to(""seda:foo""); from(""seda:foo"").to(""mock:result""); } }; } } ",0 " | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2013 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | | CiviCRM is free software; you can copy, modify, and distribute it | | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | | | | You should have received a copy of the GNU Affero General Public | | License and the CiviCRM Licensing Exception along | | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ */ /** * * @package CRM * @copyright CiviCRM LLC (c) 2004-2013 * $Id$ * */ /** * This class contains all the function that are called using AJAX */ class CRM_Core_Page_AJAX_Location { /** * FIXME: we should make this method like getLocBlock() OR use the same method and * remove this one. * * Function to obtain the location of given contact-id. * This method is used by on-behalf-of form to dynamically generate poulate the * location field values for selected permissioned contact. */ function getPermissionedLocation() { $cid = CRM_Utils_Type::escape($_GET['cid'], 'Integer'); if ($_GET['ufId']) { $ufId = CRM_Utils_Type::escape($_GET['ufId'], 'Integer'); } elseif ($_GET['relContact']) { $relContact = CRM_Utils_Type::escape($_GET['relContact'], 'Integer'); } $values = array(); $entityBlock = array('contact_id' => $cid); $location = CRM_Core_BAO_Location::getValues($entityBlock); $config = CRM_Core_Config::singleton(); $addressSequence = array_flip($config->addressSequence()); if ($relContact) { $elements = array( ""phone_1_phone"" => $location['phone'][1]['phone'], ""email_1_email"" => $location['email'][1]['email'], ); if (array_key_exists('street_address', $addressSequence)) { $elements[""address_1_street_address""] = $location['address'][1]['street_address']; } if (array_key_exists('supplemental_address_1', $addressSequence)) { $elements['address_1_supplemental_address_1'] = $location['address'][1]['supplemental_address_1']; } if (array_key_exists('supplemental_address_2', $addressSequence)) { $elements['address_1_supplemental_address_2'] = $location['address'][1]['supplemental_address_2']; } if (array_key_exists('city', $addressSequence)) { $elements['address_1_city'] = $location['address'][1]['city']; } if (array_key_exists('postal_code', $addressSequence)) { $elements['address_1_postal_code'] = $location['address'][1]['postal_code']; $elements['address_1_postal_code_suffix'] = $location['address'][1]['postal_code_suffix']; } if (array_key_exists('country', $addressSequence)) { $elements['address_1_country_id'] = $location['address'][1]['country_id']; } if (array_key_exists('state_province', $addressSequence)) { $elements['address_1_state_province_id'] = $location['address'][1]['state_province_id']; } } else { $profileFields = CRM_Core_BAO_UFGroup::getFields($ufId, FALSE, CRM_Core_Action::VIEW, NULL, NULL, FALSE, NULL, FALSE, NULL, CRM_Core_Permission::CREATE, NULL ); $website = CRM_Core_BAO_Website::getValues($entityBlock, $values); foreach ($location as $fld => $values) { if (is_array($values) && !empty($values)) { $locType = $values[1]['location_type_id']; if ($fld == 'email') { $elements[""onbehalf_{$fld}-{$locType}""] = array( 'type' => 'Text', 'value' => $location[$fld][1][$fld], ); unset($profileFields[""{$fld}-{$locType}""]); } elseif ($fld == 'phone') { $phoneTypeId = $values[1]['phone_type_id']; $elements[""onbehalf_{$fld}-{$locType}-{$phoneTypeId}""] = array( 'type' => 'Text', 'value' => $location[$fld][1][$fld], ); unset($profileFields[""{$fld}-{$locType}-{$phoneTypeId}""]); } elseif ($fld == 'im') { $providerId = $values[1]['provider_id']; $elements[""onbehalf_{$fld}-{$locType}""] = array( 'type' => 'Text', 'value' => $location[$fld][1][$fld], ); $elements[""onbehalf_{$fld}-{$locType}provider_id""] = array( 'type' => 'Select', 'value' => $location[$fld][1]['provider_id'], ); unset($profileFields[""{$fld}-{$locType}-{$providerId}""]); } } } if (!empty($website)) { foreach ($website as $key => $val) { $websiteTypeId = $values[1]['website_type_id']; $elements[""onbehalf_url-1""] = array( 'type' => 'Text', 'value' => $website[1]['url'], ); $elements[""onbehalf_url-1-website_type_id""] = array( 'type' => 'Select', 'value' => $website[1]['website_type_id'], ); unset($profileFields[""url-1""]); } } $locTypeId = $location['address'][1]['location_type_id']; $addressFields = array( 'street_address', 'supplemental_address_1', 'supplemental_address_2', 'city', 'postal_code', 'country', 'state_province', ); foreach ($addressFields as $field) { if (array_key_exists($field, $addressSequence)) { $addField = $field; if (in_array($field, array( 'state_province', 'country'))) { $addField = ""{$field}_id""; } $elements[""onbehalf_{$field}-{$locTypeId}""] = array( 'type' => 'Text', 'value' => $location['address'][1][$addField], ); unset($profileFields[""{$field}-{$locTypeId}""]); } } //set custom field defaults $defaults = array(); CRM_Core_BAO_UFGroup::setProfileDefaults($cid, $profileFields, $defaults, TRUE, NULL, NULL, TRUE); if (!empty($defaults)) { foreach ($profileFields as $key => $val) { if (array_key_exists($key, $defaults)) { $htmlType = CRM_Utils_Array::value('html_type', $val); if ($htmlType == 'Radio') { $elements[""onbehalf[{$key}]""]['type'] = $htmlType; $elements[""onbehalf[{$key}]""]['value'] = $defaults[$key]; } elseif ($htmlType == 'CheckBox') { foreach ($defaults[$key] as $k => $v) { $elements[""onbehalf[{$key}][{$k}]""]['type'] = $htmlType; $elements[""onbehalf[{$key}][{$k}]""]['value'] = $v; } } elseif ($htmlType == 'Multi-Select') { foreach ($defaults[$key] as $k => $v) { $elements[""onbehalf_{$key}""]['type'] = $htmlType; $elements[""onbehalf_{$key}""]['value'][$k] = $v; } } elseif ($htmlType == 'Autocomplete-Select') { $elements[""onbehalf_{$key}""]['type'] = $htmlType; $elements[""onbehalf_{$key}""]['value'] = $defaults[$key]; $elements[""onbehalf_{$key}""]['id'] = $defaults[""{$key}_id""]; } else { $elements[""onbehalf_{$key}""]['type'] = $htmlType; $elements[""onbehalf_{$key}""]['value'] = $defaults[$key]; } } else { $elements[""onbehalf_{$key}""]['value'] = ''; } } } } echo json_encode($elements); CRM_Utils_System::civiExit(); } function jqState($config) { if (!isset($_GET['_value']) || empty($_GET['_value']) ) { CRM_Utils_System::civiExit(); } $result = CRM_Core_PseudoConstant::stateProvinceForCountry($_GET['_value']); $elements = array(array('name' => ts('- select a state -'), 'value' => '', )); foreach ($result as $id => $name) { $elements[] = array( 'name' => $name, 'value' => $id, ); } echo json_encode($elements); CRM_Utils_System::civiExit(); } function jqCounty($config) { if (CRM_Utils_System::isNull($_GET['_value'])) { $elements = array(array('name' => ts('- select state -'), 'value' => '', )); } else { $result = CRM_Core_PseudoConstant::countyForState($_GET['_value']); $elements = array(array('name' => ts('- select -'), 'value' => '', )); foreach ($result as $id => $name) { $elements[] = array( 'name' => $name, 'value' => $id, ); } if ($elements == array( array('name' => ts('- select -'), 'value' => ''))) { $elements = array(array('name' => ts('- no counties -'), 'value' => '', )); } } echo json_encode($elements); CRM_Utils_System::civiExit(); } function getLocBlock() { // i wish i could retrieve loc block info based on loc_block_id, // Anyway, lets retrieve an event which has loc_block_id set to 'lbid'. if ($_POST['lbid']) { $params = array('1' => array($_POST['lbid'], 'Integer')); $eventId = CRM_Core_DAO::singleValueQuery('SELECT id FROM civicrm_event WHERE loc_block_id=%1 LIMIT 1', $params); } // now lets use the event-id obtained above, to retrieve loc block information. if ($eventId) { $params = array('entity_id' => $eventId, 'entity_table' => 'civicrm_event'); // second parameter is of no use, but since required, lets use the same variable. $location = CRM_Core_BAO_Location::getValues($params, $params); } $result = array(); $addressOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_options', TRUE, NULL, TRUE ); // lets output only required fields. foreach ($addressOptions as $element => $isSet) { if ($isSet && (!in_array($element, array( 'im', 'openid')))) { if (in_array($element, array( 'country', 'state_province', 'county'))) { $element .= '_id'; } elseif ($element == 'address_name') { $element = 'name'; } $fld = ""address[1][{$element}]""; $value = CRM_Utils_Array::value($element, $location['address'][1]); $value = $value ? $value : """"; $result[str_replace(array( '][', '[', ""]""), array('_', '_', ''), $fld)] = $value; } } foreach (array( 'email', 'phone_type_id', 'phone') as $element) { $block = ($element == 'phone_type_id') ? 'phone' : $element; for ($i = 1; $i < 3; $i++) { $fld = ""{$block}[{$i}][{$element}]""; $value = CRM_Utils_Array::value($element, $location[$block][$i]); $value = $value ? $value : """"; $result[str_replace(array( '][', '[', ""]""), array('_', '_', ''), $fld)] = $value; } } // set the message if loc block is being used by more than one event. $result['count_loc_used'] = CRM_Event_BAO_Event::countEventsUsingLocBlockId($_POST['lbid']); echo json_encode($result); CRM_Utils_System::civiExit(); } } ",0 "on Team * @brief PCD Extended HAL module driver. * This file provides firmware functions to manage the following * functionalities of the USB Peripheral Controller: * + Extended features functions * ****************************************************************************** * @attention * *

              © Copyright (c) 2019 STMicroelectronics. * All rights reserved.

              * * This software component is licensed by ST under BSD 3-Clause license, * the ""License""; You may not use this file except in compliance with the * License. You may obtain a copy of the License at: * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include ""stm32wbxx_hal.h"" /** @addtogroup STM32WBxx_HAL_Driver * @{ */ /** @defgroup PCDEx PCDEx * @brief PCD Extended HAL module driver * @{ */ #ifdef HAL_PCD_MODULE_ENABLED #if defined (USB) /* Private types -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private constants ---------------------------------------------------------*/ /* Private macros ------------------------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ /** @defgroup PCDEx_Exported_Functions PCDEx Exported Functions * @{ */ /** @defgroup PCDEx_Exported_Functions_Group1 Peripheral Control functions * @brief PCDEx control functions * @verbatim =============================================================================== ##### Extended features functions ##### =============================================================================== [..] This section provides functions allowing to: (+) Update FIFO configuration @endverbatim * @{ */ /** * @brief Configure PMA for EP * @param hpcd Device instance * @param ep_addr endpoint address * @param ep_kind endpoint Kind * USB_SNG_BUF: Single Buffer used * USB_DBL_BUF: Double Buffer used * @param pmaadress: EP address in The PMA: In case of single buffer endpoint * this parameter is 16-bit value providing the address * in PMA allocated to endpoint. * In case of double buffer endpoint this parameter * is a 32-bit value providing the endpoint buffer 0 address * in the LSB part of 32-bit value and endpoint buffer 1 address * in the MSB part of 32-bit value. * @retval HAL status */ HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr, uint16_t ep_kind, uint32_t pmaadress) { PCD_EPTypeDef *ep; /* initialize ep structure*/ if ((0x80U & ep_addr) == 0x80U) { ep = &hpcd->IN_ep[ep_addr & EP_ADDR_MSK]; } else { ep = &hpcd->OUT_ep[ep_addr]; } /* Here we check if the endpoint is single or double Buffer*/ if (ep_kind == PCD_SNG_BUF) { /* Single Buffer */ ep->doublebuffer = 0U; /* Configure the PMA */ ep->pmaadress = (uint16_t)pmaadress; } else /* USB_DBL_BUF */ { /* Double Buffer Endpoint */ ep->doublebuffer = 1U; /* Configure the PMA */ ep->pmaaddr0 = (uint16_t)(pmaadress & 0xFFFFU); ep->pmaaddr1 = (uint16_t)((pmaadress & 0xFFFF0000U) >> 16); } return HAL_OK; } /** * @brief Activate BatteryCharging feature. * @param hpcd PCD handle * @retval HAL status */ HAL_StatusTypeDef HAL_PCDEx_ActivateBCD(PCD_HandleTypeDef *hpcd) { USB_TypeDef *USBx = hpcd->Instance; hpcd->battery_charging_active = 1U; /* Enable BCD feature */ USBx->BCDR |= USB_BCDR_BCDEN; /* Enable DCD : Data Contact Detect */ USBx->BCDR &= ~(USB_BCDR_PDEN); USBx->BCDR &= ~(USB_BCDR_SDEN); USBx->BCDR |= USB_BCDR_DCDEN; return HAL_OK; } /** * @brief Deactivate BatteryCharging feature. * @param hpcd PCD handle * @retval HAL status */ HAL_StatusTypeDef HAL_PCDEx_DeActivateBCD(PCD_HandleTypeDef *hpcd) { USB_TypeDef *USBx = hpcd->Instance; hpcd->battery_charging_active = 0U; /* Disable BCD feature */ USBx->BCDR &= ~(USB_BCDR_BCDEN); return HAL_OK; } /** * @brief Handle BatteryCharging Process. * @param hpcd PCD handle * @retval HAL status */ void HAL_PCDEx_BCD_VBUSDetect(PCD_HandleTypeDef *hpcd) { USB_TypeDef *USBx = hpcd->Instance; uint32_t tickstart = HAL_GetTick(); /* Wait Detect flag or a timeout is happen*/ while ((USBx->BCDR & USB_BCDR_DCDET) == 0U) { /* Check for the Timeout */ if ((HAL_GetTick() - tickstart) > 1000U) { #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->BCDCallback(hpcd, PCD_BCD_ERROR); #else HAL_PCDEx_BCD_Callback(hpcd, PCD_BCD_ERROR); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ return; } } HAL_Delay(200U); /* Data Pin Contact ? Check Detect flag */ if ((USBx->BCDR & USB_BCDR_DCDET) == USB_BCDR_DCDET) { #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->BCDCallback(hpcd, PCD_BCD_CONTACT_DETECTION); #else HAL_PCDEx_BCD_Callback(hpcd, PCD_BCD_CONTACT_DETECTION); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } /* Primary detection: checks if connected to Standard Downstream Port (without charging capability) */ USBx->BCDR &= ~(USB_BCDR_DCDEN); HAL_Delay(50U); USBx->BCDR |= (USB_BCDR_PDEN); HAL_Delay(50U); /* If Charger detect ? */ if ((USBx->BCDR & USB_BCDR_PDET) == USB_BCDR_PDET) { /* Start secondary detection to check connection to Charging Downstream Port or Dedicated Charging Port */ USBx->BCDR &= ~(USB_BCDR_PDEN); HAL_Delay(50U); USBx->BCDR |= (USB_BCDR_SDEN); HAL_Delay(50U); /* If CDP ? */ if ((USBx->BCDR & USB_BCDR_SDET) == USB_BCDR_SDET) { /* Dedicated Downstream Port DCP */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->BCDCallback(hpcd, PCD_BCD_DEDICATED_CHARGING_PORT); #else HAL_PCDEx_BCD_Callback(hpcd, PCD_BCD_DEDICATED_CHARGING_PORT); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } else { /* Charging Downstream Port CDP */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->BCDCallback(hpcd, PCD_BCD_CHARGING_DOWNSTREAM_PORT); #else HAL_PCDEx_BCD_Callback(hpcd, PCD_BCD_CHARGING_DOWNSTREAM_PORT); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } } else /* NO */ { /* Standard Downstream Port */ #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->BCDCallback(hpcd, PCD_BCD_STD_DOWNSTREAM_PORT); #else HAL_PCDEx_BCD_Callback(hpcd, PCD_BCD_STD_DOWNSTREAM_PORT); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } /* Battery Charging capability discovery finished Start Enumeration */ (void)HAL_PCDEx_DeActivateBCD(hpcd); #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) hpcd->BCDCallback(hpcd, PCD_BCD_DISCOVERY_COMPLETED); #else HAL_PCDEx_BCD_Callback(hpcd, PCD_BCD_DISCOVERY_COMPLETED); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ } /** * @brief Activate LPM feature. * @param hpcd PCD handle * @retval HAL status */ HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd) { USB_TypeDef *USBx = hpcd->Instance; hpcd->lpm_active = 1U; hpcd->LPM_State = LPM_L0; USBx->LPMCSR |= USB_LPMCSR_LMPEN; USBx->LPMCSR |= USB_LPMCSR_LPMACK; return HAL_OK; } /** * @brief Deactivate LPM feature. * @param hpcd PCD handle * @retval HAL status */ HAL_StatusTypeDef HAL_PCDEx_DeActivateLPM(PCD_HandleTypeDef *hpcd) { USB_TypeDef *USBx = hpcd->Instance; hpcd->lpm_active = 0U; USBx->LPMCSR &= ~(USB_LPMCSR_LMPEN); USBx->LPMCSR &= ~(USB_LPMCSR_LPMACK); return HAL_OK; } /** * @brief Send LPM message to user layer callback. * @param hpcd PCD handle * @param msg LPM message * @retval HAL status */ __weak void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg) { /* Prevent unused argument(s) compilation warning */ UNUSED(hpcd); UNUSED(msg); /* NOTE : This function should not be modified, when the callback is needed, the HAL_PCDEx_LPM_Callback could be implemented in the user file */ } /** * @brief Send BatteryCharging message to user layer callback. * @param hpcd PCD handle * @param msg LPM message * @retval HAL status */ __weak void HAL_PCDEx_BCD_Callback(PCD_HandleTypeDef *hpcd, PCD_BCD_MsgTypeDef msg) { /* Prevent unused argument(s) compilation warning */ UNUSED(hpcd); UNUSED(msg); /* NOTE : This function should not be modified, when the callback is needed, the HAL_PCDEx_BCD_Callback could be implemented in the user file */ } /** * @} */ /** * @} */ #endif /* defined (USB) */ #endif /* HAL_PCD_MODULE_ENABLED */ /** * @} */ /** * @} */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ ",0 "er 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. // /////////////////////////////////////////////////////////////////////////////// namespace fproject\amf\auth; class AuthResult { /** * General Failure */ const FAILURE = 0; /** * Failure due to identity not being found. */ const FAILURE_IDENTITY_NOT_FOUND = -1; /** * Failure due to identity being ambiguous. */ const FAILURE_IDENTITY_AMBIGUOUS = -2; /** * Failure due to invalid credential being supplied. */ const FAILURE_CREDENTIAL_INVALID = -3; /** * Failure due to uncategorized reasons. */ const FAILURE_UNCATEGORIZED = -4; /** * Authentication success. */ const SUCCESS = 1; /** * Authentication result code * * @var int */ protected $_code; /** * The identity used in the authentication attempt * * @var mixed */ protected $_identity; /** * An array of string reasons why the authentication attempt was unsuccessful * * If authentication was successful, this should be an empty array. * * @var array */ protected $_messages; /** * Sets the result code, identity, and failure messages * * @param int $code * @param mixed $identity * @param array $messages */ public function __construct($code, $identity, array $messages = array()) { $code = (int) $code; if ($code < self::FAILURE_UNCATEGORIZED) { $code = self::FAILURE; } elseif ($code > self::SUCCESS ) { $code = 1; } $this->_code = $code; $this->_identity = $identity; $this->_messages = $messages; } /** * Returns whether the result represents a successful authentication attempt * * @return boolean */ public function isValid() { return ($this->_code > 0) ? true : false; } /** * getCode() - Get the result code for this authentication attempt * * @return int */ public function getCode() { return $this->_code; } /** * Returns the identity used in the authentication attempt * * @return mixed */ public function getIdentity() { return $this->_identity; } /** * Returns an array of string reasons why the authentication attempt was unsuccessful * * If authentication was successful, this method returns an empty array. * * @return array */ public function getMessages() { return $this->_messages; } } ",0 "r"" floatLabel=""never""> filter_list close ",0 "information regarding copyright * ownership. Elasticsearch licenses this file to you 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. */ package org.elasticsearch.index.query; import com.fasterxml.jackson.core.io.JsonStringEncoder; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.search.TermQuery; import org.apache.lucene.search.spans.SpanTermQuery; import org.elasticsearch.common.ParsingException; import org.elasticsearch.common.lucene.BytesRefs; import org.elasticsearch.index.mapper.MappedFieldType; import org.elasticsearch.search.internal.SearchContext; import java.io.IOException; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.instanceOf; public class SpanTermQueryBuilderTests extends AbstractTermQueryTestCase { @Override protected SpanTermQueryBuilder doCreateTestQueryBuilder() { String fieldName = randomFrom(STRING_FIELD_NAME, STRING_ALIAS_FIELD_NAME, randomAlphaOfLengthBetween(1, 10)); Object value; if (frequently()) { value = randomAlphaOfLengthBetween(1, 10); } else { // generate unicode string in 10% of cases JsonStringEncoder encoder = JsonStringEncoder.getInstance(); value = new String(encoder.quoteAsString(randomUnicodeOfLength(10))); } return createQueryBuilder(fieldName, value); } @Override protected SpanTermQueryBuilder createQueryBuilder(String fieldName, Object value) { return new SpanTermQueryBuilder(fieldName, value); } @Override protected void doAssertLuceneQuery(SpanTermQueryBuilder queryBuilder, Query query, SearchContext context) throws IOException { assertThat(query, instanceOf(SpanTermQuery.class)); SpanTermQuery spanTermQuery = (SpanTermQuery) query; String expectedFieldName = expectedFieldName(queryBuilder.fieldName); assertThat(spanTermQuery.getTerm().field(), equalTo(expectedFieldName)); MappedFieldType mapper = context.getQueryShardContext().fieldMapper(queryBuilder.fieldName()); if (mapper != null) { Term term = ((TermQuery) mapper.termQuery(queryBuilder.value(), null)).getTerm(); assertThat(spanTermQuery.getTerm(), equalTo(term)); } else { assertThat(spanTermQuery.getTerm().bytes(), equalTo(BytesRefs.toBytesRef(queryBuilder.value()))); } } /** * @param amount a number of clauses that will be returned * @return the array of random {@link SpanTermQueryBuilder} with same field name */ public SpanTermQueryBuilder[] createSpanTermQueryBuilders(int amount) { SpanTermQueryBuilder[] clauses = new SpanTermQueryBuilder[amount]; SpanTermQueryBuilder first = createTestQueryBuilder(false, true); clauses[0] = first; for (int i = 1; i < amount; i++) { // we need same field name in all clauses, so we only randomize value SpanTermQueryBuilder spanTermQuery = new SpanTermQueryBuilder(first.fieldName(), getRandomValueForFieldName(first.fieldName())); if (randomBoolean()) { spanTermQuery.queryName(randomAlphaOfLengthBetween(1, 10)); } clauses[i] = spanTermQuery; } return clauses; } public void testFromJson() throws IOException { String json = ""{ \""span_term\"" : { \""user\"" : { \""value\"" : \""kimchy\"", \""boost\"" : 2.0 } }}""; SpanTermQueryBuilder parsed = (SpanTermQueryBuilder) parseQuery(json); checkGeneratedJson(json, parsed); assertEquals(json, ""kimchy"", parsed.value()); assertEquals(json, 2.0, parsed.boost(), 0.0001); } public void testParseFailsWithMultipleFields() throws IOException { String json = ""{\n"" + "" \""span_term\"" : {\n"" + "" \""message1\"" : {\n"" + "" \""term\"" : \""this\""\n"" + "" },\n"" + "" \""message2\"" : {\n"" + "" \""term\"" : \""this\""\n"" + "" }\n"" + "" }\n"" + ""}""; ParsingException e = expectThrows(ParsingException.class, () -> parseQuery(json)); assertEquals(""[span_term] query doesn't support multiple fields, found [message1] and [message2]"", e.getMessage()); String shortJson = ""{\n"" + "" \""span_term\"" : {\n"" + "" \""message1\"" : \""this\"",\n"" + "" \""message2\"" : \""this\""\n"" + "" }\n"" + ""}""; e = expectThrows(ParsingException.class, () -> parseQuery(shortJson)); assertEquals(""[span_term] query doesn't support multiple fields, found [message1] and [message2]"", e.getMessage()); } public void testWithMetaDataField() throws IOException { QueryShardContext context = createShardContext(); for (String field : new String[]{""field1"", ""field2""}) { SpanTermQueryBuilder spanTermQueryBuilder = new SpanTermQueryBuilder(field, ""toto""); Query query = spanTermQueryBuilder.toQuery(context); Query expected = new SpanTermQuery(new Term(field, ""toto"")); assertEquals(expected, query); } } } ",0 "ept 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. */ package org.jivesoftware.smackx.iot.data.provider; import java.io.IOException; import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smackx.iot.data.element.IoTDataRequest; public class IoTDataRequestProvider extends IQProvider { @Override public IoTDataRequest parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws IOException { int seqNr = ParserUtils.getIntegerAttributeOrThrow(parser, ""seqnr"", ""IoT data request without sequence number""); boolean momentary = ParserUtils.getBooleanAttribute(parser, ""momentary"", false); return new IoTDataRequest(seqNr, momentary); } } ",0 "type Demo"">

              Phenotype Demo

              Not much to see here,
              check output on browser console
              ",0 "t org.fax4j.FaxJob; import org.fax4j.common.Logger; import org.fax4j.spi.AbstractFax4JClientSpi; import org.fax4j.util.Connection; import org.fax4j.util.ReflectionHelper; /** * This class implements the fax client service provider interface.
              * This parial implementation will invoke the requests by sending emails to a mail server that supports * conversion between email messages and fax messages.
              * The mail SPI supports persistent connection to enable to reuse the same connection for all fax * operation invocations or to create a new connection for each fax operation invocation.
              * By default the SPI will create a new connection for each operation invocation however the * org.fax4j.spi.mail.persistent.connection set to true will enable to reuse the connection.
              * To set the user/password values of the mail connection the following 2 properties must be defined: * org.fax4j.spi.mail.user.name and org.fax4j.spi.mail.password
              * All properties defined in the fax4j configuration will be passed to the mail connection therefore it is * possible to define mail specific properties (see java mail for more info) in the fax4j properties.
              * Implementing SPI class will have to implement the createXXXFaxJobMessage methods.
              * These methods will return the message to be sent for that fax job operation. In case the method * returns null, this class will throw an UnsupportedOperationException exception. *
              * The configuration of the fax4j framework is made up of 3 layers.
              * The configuration is based on simple properties.
              * Each layer overrides the lower layers by adding/changing the property values.
              * The first layer is the internal fax4j.properties file located in the fax4j jar.
              * This layer contains the preconfigured values for the fax4j framework and can be changed * by updating these properties in the higher layers.
              * The second layer is the external fax4j.properties file that is located on the classpath.
              * This file is optional and provides the ability to override the internal configuration for the * entire fax4j framework.
              * The top most layer is the optional java.util.Properties object provided by the external classes * when creating a new fax client.
              * These properties enable to override the configuration of the lower 2 layers.
              *
              * SPI Status (Draft, Beta, Stable): Stable
              *
              * Below table describes the configuration values relevant for this class.
              * Configuration: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
              NameDescriptionPreconfigured ValueDefault ValueMandatory
              org.fax4j.spi.mail.persistent.connectionTrue to reuse the same mail connection for all fax activites, false to create a * new mail connection for each fax activity.falsefalsefalse
              org.fax4j.spi.mail.connection.factory.class.nameThe connection factory class nameorg.fax4j.spi.email.MailConnectionFactoryImplorg.fax4j.spi.email.MailConnectionFactoryImplfalse
              org.fax4j.spi.mail.user.nameThe mail account user name.nonenonefalse
              org.fax4j.spi.mail.passwordThe mail account password.nonenonefalse
              javax mail propertiesAny of the javax mail properties can be defined in the fax4j properties.
              * These properties will be passed to the java mail framework.
              mail.transport.protocol=smtp
              * mail.smtp.port=25
              nonefalse
              *
              * Limitations:
              *
                *
              • This SPI is based on the java mail infrastructure, therefore this SPI cannot * connect to mail servers through a proxy server. *
              • This SPI provides only partial implementation (this is an abstract class). *
              *
              * Dependencies:
              *
                *
              • Required jar files: mail-1.4.jar, activation-1.1.jar *
              *
              * * @author Sagie Gur-Ari * @version 1.12 * @since 0.1 */ public abstract class AbstractMailFaxClientSpi extends AbstractFax4JClientSpi { /** * The use persistent connection flag which defines if the SPI will use a new * connection for each request or will reuse the same connection */ private boolean usePersistentConnection; /**The mail connection factory*/ private MailConnectionFactory connectionFactory; /**The mail connection*/ private Connection connection; /** * This class holds the SPI configuration constants. * * @author Sagie Gur-Ari * @version 1.03 * @since 0.1 */ public enum FaxClientSpiConfigurationConstants { /** * The use persistent connection property key which defines if the SPI will use a new * connection for each request or will reuse the same connection */ USE_PERSISTENT_CONNECTION_PROPERTY_KEY(""org.fax4j.spi.mail.persistent.connection""), /**The connection factory class name*/ CONNECTION_FACTORY_CLASS_NAME_PROPERTY_KEY(""org.fax4j.spi.mail.connection.factory.class.name""), /**The user name used to connect to the mail server*/ USER_NAME_PROPERTY_KEY(""org.fax4j.spi.mail.user.name""), /**The password used to connect to the mail server*/ PASSWORD_PROPERTY_KEY(""org.fax4j.spi.mail.password""); /**The string value*/ private String value; /** * This is the class constructor. * * @param value * The string value */ private FaxClientSpiConfigurationConstants(String value) { this.value=value; } /** * This function returns the string value. * * @return The string value */ @Override public final String toString() { return this.value; } } /** * This is the default constructor. */ public AbstractMailFaxClientSpi() { super(); } /** * This function initializes the fax client SPI. */ @Override protected void initializeImpl() { //get logger Logger logger=this.getLogger(); //get use persistent connection value this.usePersistentConnection=Boolean.parseBoolean(this.getConfigurationValue(FaxClientSpiConfigurationConstants.USE_PERSISTENT_CONNECTION_PROPERTY_KEY)); logger.logDebug(new Object[]{""Using persistent connection: "",String.valueOf(this.usePersistentConnection)},null); //setup connection factory String className=this.getConfigurationValue(FaxClientSpiConfigurationConstants.CONNECTION_FACTORY_CLASS_NAME_PROPERTY_KEY); this.connectionFactory=this.createMailConnectionFactoryImpl(className); if(this.connectionFactory==null) { throw new FaxException(""Mail connection factory is not available.""); } } /** * Creates and returns the mail connection factory. * * @param className * The connection factory class name * @return The mail connection factory */ protected final MailConnectionFactory createMailConnectionFactoryImpl(String className) { String factoryClassName=className; if(factoryClassName==null) { factoryClassName=MailConnectionFactoryImpl.class.getName(); } //create new instance MailConnectionFactory factory=(MailConnectionFactory)ReflectionHelper.createInstance(factoryClassName); //initialize factory.initialize(this); return factory; } /** * Releases the connection if open. * * @throws Throwable * Any throwable */ @Override protected void finalize() throws Throwable { //get reference Connection mailConnection=this.connection; //release connection this.closeMailConnection(mailConnection); super.finalize(); } /** * Creates and returns the mail connection to be used to send the fax * via mail. * * @return The mail connection */ protected Connection createMailConnection() { //create new connection Connection mailConnection=this.connectionFactory.createConnection(); //log debug Logger logger=this.getLogger(); logger.logInfo(new Object[]{""Created mail connection.""},null); return mailConnection; } /** * This function closes the provided mail connection. * * @param mailConnection * The mail connection to close * @throws IOException * Never thrown */ protected void closeMailConnection(Connection mailConnection) throws IOException { if(mailConnection!=null) { //get logger Logger logger=this.getLogger(); //release connection logger.logInfo(new Object[]{""Closing mail connection.""},null); mailConnection.close(); } } /** * Returns the mail connection to be used to send the fax * via mail. * * @return The mail connection */ protected Connection getMailConnection() { Connection mailConnection=null; if(this.usePersistentConnection) { synchronized(this) { if(this.connection==null) { //create new connection this.connection=this.createMailConnection(); } } //get connection mailConnection=this.connection; } else { //create new connection mailConnection=this.createMailConnection(); } return mailConnection; } /** * This function will send the mail message. * * @param faxJob * The fax job object containing the needed information * @param mailConnection * The mail connection (will be released if not persistent) * @param message * The message to send */ protected void sendMail(FaxJob faxJob,Connection mailConnection,Message message) { if(message==null) { this.throwUnsupportedException(); } else { //get holder MailResourcesHolder mailResourcesHolder=mailConnection.getResource(); //get transport Transport transport=mailResourcesHolder.getTransport(); try { //send message message.saveChanges(); if(transport==null) { Transport.send(message,message.getAllRecipients()); } else { transport.sendMessage(message,message.getAllRecipients()); } } catch(Throwable throwable) { throw new FaxException(""Unable to send message."",throwable); } finally { if(!this.usePersistentConnection) { try { //close connection this.closeMailConnection(mailConnection); } catch(Exception exception) { //log error Logger logger=this.getLogger(); logger.logInfo(new Object[]{""Error while releasing mail connection.""},exception); } } } } } /** * This function will submit a new fax job.
              * The fax job ID may be populated by this method in the provided * fax job object. * * @param faxJob * The fax job object containing the needed information */ @Override protected void submitFaxJobImpl(FaxJob faxJob) { //get connection Connection mailConnection=this.getMailConnection(); //get holder MailResourcesHolder mailResourcesHolder=mailConnection.getResource(); //create message Message message=this.createSubmitFaxJobMessage(faxJob,mailResourcesHolder); //send message this.sendMail(faxJob,mailConnection,message); } /** * This function will suspend an existing fax job. * * @param faxJob * The fax job object containing the needed information */ @Override protected void suspendFaxJobImpl(FaxJob faxJob) { //get connection Connection mailConnection=this.getMailConnection(); //get holder MailResourcesHolder mailResourcesHolder=mailConnection.getResource(); //create message Message message=this.createSuspendFaxJobMessage(faxJob,mailResourcesHolder); //send message this.sendMail(faxJob,mailConnection,message); } /** * This function will resume an existing fax job. * * @param faxJob * The fax job object containing the needed information */ @Override protected void resumeFaxJobImpl(FaxJob faxJob) { //get connection Connection mailConnection=this.getMailConnection(); //get holder MailResourcesHolder mailResourcesHolder=mailConnection.getResource(); //create message Message message=this.createResumeFaxJobMessage(faxJob,mailResourcesHolder); //send message this.sendMail(faxJob,mailConnection,message); } /** * This function will cancel an existing fax job. * * @param faxJob * The fax job object containing the needed information */ @Override protected void cancelFaxJobImpl(FaxJob faxJob) { //get connection Connection mailConnection=this.getMailConnection(); //get holder MailResourcesHolder mailResourcesHolder=mailConnection.getResource(); //create message Message message=this.createCancelFaxJobMessage(faxJob,mailResourcesHolder); //send message this.sendMail(faxJob,mailConnection,message); } /** * This function will create the message used to invoke the fax * job action.
              * If this method returns null, the SPI will throw an UnsupportedOperationException. * * @param faxJob * The fax job object containing the needed information * @param mailResourcesHolder * The mail resources holder * @return The message to send (if null, the SPI will throw an UnsupportedOperationException) */ protected abstract Message createSubmitFaxJobMessage(FaxJob faxJob,MailResourcesHolder mailResourcesHolder); /** * This function will create the message used to invoke the fax * job action.
              * If this method returns null, the SPI will throw an UnsupportedOperationException. * * @param faxJob * The fax job object containing the needed information * @param mailResourcesHolder * The mail resources holder * @return The message to send (if null, the SPI will throw an UnsupportedOperationException) */ protected abstract Message createSuspendFaxJobMessage(FaxJob faxJob,MailResourcesHolder mailResourcesHolder); /** * This function will create the message used to invoke the fax * job action.
              * If this method returns null, the SPI will throw an UnsupportedOperationException. * * @param faxJob * The fax job object containing the needed information * @param mailResourcesHolder * The mail resources holder * @return The message to send (if null, the SPI will throw an UnsupportedOperationException) */ protected abstract Message createResumeFaxJobMessage(FaxJob faxJob,MailResourcesHolder mailResourcesHolder); /** * This function will create the message used to invoke the fax * job action.
              * If this method returns null, the SPI will throw an UnsupportedOperationException. * * @param faxJob * The fax job object containing the needed information * @param mailResourcesHolder * The mail resources holder * @return The message to send (if null, the SPI will throw an UnsupportedOperationException) */ protected abstract Message createCancelFaxJobMessage(FaxJob faxJob,MailResourcesHolder mailResourcesHolder); }",0 """ media=""all"" href=""../style.css"" type=""text/css""/>

              Jordie Lane's panel show appearances

              Jordie Lane has appeared in 1 episodes between 2009-2009. Note that these appearances may be for more than one person if multiple people have the same name.

              2009
              1. 2009-11-04 / Spicks and Specks
              ",0 " file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_DEBUGINFO_DWARFCOMPILEUNIT_H #define LLVM_LIB_DEBUGINFO_DWARFCOMPILEUNIT_H #include ""llvm/DebugInfo/DWARF/DWARFUnit.h"" namespace llvm { class DWARFCompileUnit : public DWARFUnit { public: DWARFCompileUnit(DWARFContext &Context, const DWARFSection &Section, const DWARFDebugAbbrev *DA, StringRef RS, StringRef SS, StringRef SOS, StringRef AOS, bool LE, const DWARFUnitSectionBase &UnitSection) : DWARFUnit(Context, Section, DA, RS, SS, SOS, AOS, LE, UnitSection) {} void dump(raw_ostream &OS); // VTable anchor. ~DWARFCompileUnit() override; }; } #endif ",0 "iendly"" content=""True"" /> バンガロール滞在日誌みたいな
              バンガロール滞在日誌みたいな インドのバンガロールで過ごす日々を綴るやつ

              hotel

              週末旅行日誌! 北インド編2 - #バンガロールの空港でワンデイホテルに泊まったよ!

              つーかな。更新遅いってな。 怠慢かよ! って思うじゃん? 弁明させてくれ。 インドでは画像のアップロードに耐えられるネット環境なんてほとんど手に入れようがないんだよ(涙) それで結局、月曜日は疲れ過ぎてたしで今日なわけですわ。 まあどれだけネット環境を欲したかはおいおい書いていくんで進めていきましょうか。 前回の通りなんやかんやでデリーに行けなく…
              india, north_india, trip, hotel
              ",0 "n tampilkan_list(posisi) { loading(); $('#frame_data').load(base_url+'report/regular_list/'+posisi); } function list_filter(posisi) { var filter = $('input:radio[name=filter]:checked').val(); var kata_kunci = $('#nomor_pemesanan').val(); var no_va = $('#no_va').val(); var id_cluster = $('#nama_cluster').val(); var kategori = encodeURI($('#nama_kategori').val()); if(!filter) { alert(""Anda belum memilih jenis pencarian""); } else { if(filter == ""nomor_pemesanan"") { if(!kata_kunci) { alert(""Nomor pemesanan yang akan dicari masih kosong !""); } else { loading(); $('#frame_data').load(base_url+'report/regular_cari_list/'+posisi+'/'+filter+'/0/0/'+kata_kunci); } } if(filter == ""no_va"") { if(!no_va) { alert(""Nomor Virtual Account yang akan dicari masih kosong !""); } else { loading(); $('#frame_data').load(base_url+'report/regular_cari_list/'+posisi+'/'+filter+'/0/0/'+no_va); } } else if(filter == ""cluster"") { loading(); $('#frame_data').load(base_url+'report/regular_cari_list/'+posisi+'/'+filter+'/'+id_cluster+'/'+kategori+'/0'); } } } function hapus_pemesanan(id_pemesanan, id_unit, posisi){ if(confirm(""Yakin akan menghapus data?"")){ $.post(base_url+'report/regular_delete/'+id_pemesanan+'/'+id_unit, function(){ tampilkan_list(posisi); }); } return false; } function verify(id_pemesanan) { $.post(base_url+'report/verify_transaksi/'+id_pemesanan, function(result) { var status = result.split(""|""); if (status[0] == ""Sold"") { tampilkan_list(0); } else { if (status[0] == ""Booked"") { $(""#status_pemesanan_""+id_pemesanan).html(""""+status[0]+""""); } if (status[0] == ""Tanda Jadi"") { $(""#status_pemesanan_""+id_pemesanan).html(""""+status[0]+""""); } $(""#status_verify_""+id_pemesanan).html(""""+status[1]+""""); $(""#tanggal_exp_""+id_pemesanan).html(status[2]); $(""#tanggal_tanda_jadi_""+id_pemesanan).html(status[3]); } }); } function refund(id_pemesanan) { if(confirm(""Yakin akan data ini akan refund?"")){ $.post(base_url+'report/refund/'+id_pemesanan, function(result) { var status = result.split(""|""); $(""#status_pemesanan_""+id_pemesanan).html(""""+status[0]+""""); $(""#status_verify_""+id_pemesanan).html(""""+status[1]+""""); }); } return false; } function interval_timeout() { window.setInterval(function(){ scheduler_timeout(); }, 5000); } function scheduler_timeout(){ $.ajax({url: base_url+'scheduler/timeout', success:function(result){ if(result == ""found"") { tampilkan_list(0); } }}); } scheduler_timeout(); interval_timeout(); load->view('top_profile_v'); # Load menu dashboard $this->load->view('menu_v'); ?>
              ",0 "r license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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 Chaitra Radhakrishna, Language Technology Institute, School of Computer Science, Carnegie-Mellon University. * email: wei.zhang@cs.cmu.edu * * */ package Wordnet; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Queue; //import java.util.Map; import java.util.Set; public class SetUtil { public static boolean calculauteIntersection(Set wordList1, Set wordList2) { Set allWords = populateWordset(wordList1, wordList2); // int M11 = 0; Iterator wordList = allWords.iterator(); while (wordList.hasNext()) { String word = wordList.next(); boolean freq1 = wordList1.contains(word); boolean freq2 = wordList2.contains(word); if (freq1 && freq2) { return true; } } return false; } public static Set checkSet(Set set) { if (set == null) set = new HashSet(); return set; } static Set populateWordset(Set wordList1, Set wordList2) { Set allWords = new HashSet(); Set wordIterator = null; Iterator iterator = null; // wordIterator = wordList1.keySet(); iterator = wordList1.iterator(); while (iterator.hasNext()) { allWords.add(iterator.next()); } // wordIterator = wordList2.keySet(); iterator = wordList2.iterator(); while (iterator.hasNext()) { allWords.add(iterator.next()); } return allWords; } public static Set addStringArray(Set set, String[] array) { set = checkSet(set); for (String string : array) { set.add(string); } return set; } public static Queue addStringArraytoQueue(Queue set , String[] array) { //set = checkSet(set); for (String string : array) { set.add(string); } return set; } public static Set addStringList(Set set, List array) { set = checkSet(set); for (String string : array) { set.add(string); } return set; } public static List setToList(Set set)// List array) { ArrayList list = new ArrayList(); set = checkSet(set); for (String string : set) { list.add(string); } return list; } } ",0 " certain /// area using StarCraft's internal data structures. class UnitFinder { public: /// Default constructor. UnitFinder(); /// Constructs and searches for all units within the given bounds. UnitFinder(int left, int top, int right, int bottom); /// Searches for all units within the given bounds, using StarCraft's /// internal data structures. This is much more efficient than manually /// looping through the entire unit table or linked list. void search(int left, int top, int right, int bottom); /// Returns the number of units found by UnitFinder::search() call. /// If no searches have been conducted, returns 0. int getUnitCount() const; /// Returns the unit at the given index. Invalid index returns NULL instead. CUnit* getUnit(int index) const; /// Iterates through all units found, calling func() once for each unit. template void forEach(Callback &func) const; /// Returns the first unit for which match() returns true. /// If there are no matches, returns nullptr. template CUnit* getFirst(Callback &match) const; /// Returns the unit for which score() returns the highest nonnegative /// integer. If there are no units, returns nullptr. /// Note: If score() returns a negative value, the unit is ignored. template CUnit* getBest(Callback &score) const; /// Searches the area given by (@p left, @p top, @p right, @p bottom), /// returning the nearest unit to @p sourceUnit for which match(unit) /// evaluates to true. If there are no matches, returns nullptr. /// This does not use unit collision boxes for calculating distances. template static CUnit* getNearestTarget(int left, int top, int right, int bottom, const CUnit* sourceUnit, Callback& match); /// Searches the entire map, returning the nearest unit to @p sourceUnit /// for which match(unit) evaluates to true. If there are no matches, /// returns nullptr. /// This does not use unit collision boxes for calculating distances. template static CUnit* getNearestTarget(const CUnit* sourceUnit, Callback& match); private: //This function is meant to be used by other getNearest() functions. //Do NOT use this function in the game code! template static CUnit* getNearest(int x, int y, int boundsLeft, int boundsTop, int boundsRight, int boundsBottom, UnitFinderData* left, UnitFinderData* top, UnitFinderData* right, UnitFinderData* bottom, Callback &match, const CUnit *sourceUnit); static UnitFinderData* getStartX(); static UnitFinderData* getStartY(); static UnitFinderData* getEndX(); static UnitFinderData* getEndY(); int unitCount; CUnit* units[UNIT_ARRAY_LENGTH]; }; //-------- Template member function definitions --------// template void UnitFinder::forEach(Callback &func) const { for (int i = 0; i < this->getUnitCount(); ++i) func(this->getUnit(i)); } template CUnit* UnitFinder::getFirst(Callback &match) const { for (int i = 0; i < this->getUnitCount(); ++i) if (match(this->getUnit(i))) return this->getUnit(i); return nullptr; } template CUnit* UnitFinder::getBest(Callback &score) const { int bestScore = -1; CUnit *bestUnit = nullptr; for (int i = 0; i < this->getUnitCount(); ++i) { const int score = score(this->getUnit(i)); if (score > bestScore) { bestUnit = this->getUnit(i); bestScore = score; } } return bestUnit; } //-------- UnitFinder::getNearest() family --------// //Based on function @ 0x004E8320 template CUnit* UnitFinder::getNearest(int x, int y, int boundsLeft, int boundsTop, int boundsRight, int boundsBottom, UnitFinderData* left, UnitFinderData* top, UnitFinderData* right, UnitFinderData* bottom, Callback &match, const CUnit *sourceUnit) { using scbw::getDistanceFast; int bestDistance = getDistanceFast(0, 0, std::max(x - boundsLeft, boundsRight - x), std::max(y - boundsTop, boundsBottom - y)); CUnit *bestUnit = nullptr; bool canContinueSearch, hasFoundBestUnit; do { canContinueSearch = false; hasFoundBestUnit = false; //Search to the left if (getStartX() <= left) { CUnit *unit = CUnit::getFromIndex(left->unitIndex); if (boundsLeft <= unit->getX()) { if (boundsTop <= unit->getY() && unit->getY() < boundsBottom) { if (unit != sourceUnit && match(unit)) { int distance = getDistanceFast(x, y, unit->getX(), unit->getY()); if (distance < bestDistance) { bestDistance = distance; bestUnit = unit; hasFoundBestUnit = true; } } } } else left = getStartX() - 1; canContinueSearch = true; --left; } //Search to the right if (right < getEndX()) { CUnit *unit = CUnit::getFromIndex(right->unitIndex); if (unit->getX() < boundsRight) { if (boundsTop <= unit->getY() && unit->getY() < boundsBottom) { if (unit != sourceUnit && match(unit)) { int distance = getDistanceFast(x, y, unit->getX(), unit->getY()); if (distance < bestDistance) { bestDistance = distance; bestUnit = unit; hasFoundBestUnit = true; } } } } else right = getEndX(); canContinueSearch = true; ++right; } //Search upwards if (getStartY() <= top) { CUnit *unit = CUnit::getFromIndex(top->unitIndex); if (boundsTop <= unit->getY()) { if (boundsLeft <= unit->getX() && unit->getX() < boundsRight) { if (unit != sourceUnit && match(unit)) { int distance = getDistanceFast(x, y, unit->getX(), unit->getY()); if (distance < bestDistance) { bestDistance = distance; bestUnit = unit; hasFoundBestUnit = true; } } } } else top = getStartY() - 1; canContinueSearch = true; --top; } //Search downwards if (bottom < getEndY()) { CUnit *unit = CUnit::getFromIndex(bottom->unitIndex); if (unit->getY() < boundsBottom) { if (boundsLeft <= unit->getX() && unit->getX() < boundsRight) { if (unit != sourceUnit && match(unit)) { int distance = getDistanceFast(x, y, unit->getX(), unit->getY()); if (distance < bestDistance) { bestDistance = distance; bestUnit = unit; hasFoundBestUnit = true; } } } } else bottom = getEndY(); canContinueSearch = true; ++bottom; } //Reduce the search bounds if (hasFoundBestUnit) { boundsLeft = std::max(boundsLeft, x - bestDistance); boundsRight = std::min(boundsRight, x + bestDistance); boundsTop = std::max(boundsTop, y - bestDistance); boundsBottom = std::max(boundsBottom, y + bestDistance); } } while (canContinueSearch); return bestUnit; } template CUnit* UnitFinder::getNearestTarget(int left, int top, int right, int bottom, const CUnit* sourceUnit, Callback& match) { UnitFinderData *searchLeft, *searchTop, *searchRight, *searchBottom; //If the unit sprite is hidden if (sourceUnit->sprite->flags & 0x20) { UnitFinderData temp; temp.position = sourceUnit->getX(); searchRight = std::lower_bound(getStartX(), getEndX(), temp); searchLeft = searchRight - 1; temp.position = sourceUnit->getY(); searchBottom = std::lower_bound(getStartY(), getEndY(), temp); searchTop = searchBottom - 1; } else { searchLeft = getStartX() + sourceUnit->finderIndex.right - 1; searchRight = getStartX() + sourceUnit->finderIndex.left + 1; searchTop = getStartY() + sourceUnit->finderIndex.bottom - 1; searchBottom = getStartY() + sourceUnit->finderIndex.top + 1; } return getNearest(sourceUnit->getX(), sourceUnit->getY(), left, top, right, bottom, searchLeft, searchTop, searchRight, searchBottom, match, sourceUnit); } template CUnit* UnitFinder::getNearestTarget(const CUnit* sourceUnit, Callback& match) { return getNearestTarget(0, 0, mapTileSize->width * 32, mapTileSize->height * 32, sourceUnit, match); } } //scbw ",0 "ute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.sonar.server.almsettings.ws; import org.sonar.api.server.ServerSide; import org.sonar.db.DbClient; import org.sonar.db.DbSession; import org.sonar.db.alm.setting.ALM; import org.sonar.db.alm.setting.AlmSettingDto; import org.sonar.db.project.ProjectDto; import org.sonar.server.almsettings.MultipleAlmFeatureProvider; import org.sonar.server.component.ComponentFinder; import org.sonar.server.exceptions.BadRequestException; import org.sonar.server.exceptions.NotFoundException; import org.sonar.server.user.UserSession; import org.sonarqube.ws.AlmSettings; import static java.lang.String.format; import static org.sonar.api.web.UserRole.ADMIN; @ServerSide public class AlmSettingsSupport { private final DbClient dbClient; private final UserSession userSession; private final ComponentFinder componentFinder; private final MultipleAlmFeatureProvider multipleAlmFeatureProvider; public AlmSettingsSupport(DbClient dbClient, UserSession userSession, ComponentFinder componentFinder, MultipleAlmFeatureProvider multipleAlmFeatureProvider) { this.dbClient = dbClient; this.userSession = userSession; this.componentFinder = componentFinder; this.multipleAlmFeatureProvider = multipleAlmFeatureProvider; } public MultipleAlmFeatureProvider getMultipleAlmFeatureProvider() { return multipleAlmFeatureProvider; } public void checkAlmSettingDoesNotAlreadyExist(DbSession dbSession, String almSetting) { dbClient.almSettingDao().selectByKey(dbSession, almSetting) .ifPresent(a -> { throw new IllegalArgumentException(format(""An ALM setting with key '%s' already exists"", a.getKey())); }); } public void checkAlmMultipleFeatureEnabled(ALM alm) { try (DbSession dbSession = dbClient.openSession(false)) { if (!multipleAlmFeatureProvider.enabled() && !dbClient.almSettingDao().selectByAlm(dbSession, alm).isEmpty()) { throw BadRequestException.create(""A "" + alm + "" setting is already defined""); } } } public ProjectDto getProjectAsAdmin(DbSession dbSession, String projectKey) { return getProject(dbSession, projectKey, ADMIN); } public ProjectDto getProject(DbSession dbSession, String projectKey, String projectPermission) { ProjectDto project = componentFinder.getProjectByKey(dbSession, projectKey); userSession.checkProjectPermission(projectPermission, project); return project; } public AlmSettingDto getAlmSetting(DbSession dbSession, String almSetting) { return dbClient.almSettingDao().selectByKey(dbSession, almSetting) .orElseThrow(() -> new NotFoundException(format(""ALM setting with key '%s' cannot be found"", almSetting))); } public static AlmSettings.Alm toAlmWs(ALM alm) { switch (alm) { case GITHUB: return AlmSettings.Alm.github; case BITBUCKET: return AlmSettings.Alm.bitbucket; case BITBUCKET_CLOUD: return AlmSettings.Alm.bitbucketcloud; case AZURE_DEVOPS: return AlmSettings.Alm.azure; case GITLAB: return AlmSettings.Alm.gitlab; default: throw new IllegalStateException(format(""Unknown ALM '%s'"", alm.name())); } } } ",0 "// (http://creativecommons.org/licenses/GPL/2.0/) // (http://www.gnu.org/licenses/gpl.html) ////////////////////////////////////////////////////////////////////// #ifndef _ENVWIDGET_H_ #define _ENVWIDGET_H_ /// Widget to display an envelope graph. /// The number of segments and range of each segment /// are set at runtime. If the susOn flag is set, /// the envelope is extended to fill the entire display /// area with the last segment treated as the release. /// Otherwise, the envelope graphi is drawn without /// a sustain portion and ends at the total time /// for the segments. When setting the time range, the /// value should be longer than the total time of the /// segments. Likewise, the amplitude range should be /// set to the maximum amplitude value of the envelope /// or greater. class EnvelopeWidget : public SynthWidget { private: int numSegs; SegVals *vals; float start; int susOn; int border; float tmRange; float ampRange; wdgColor frClr; public: EnvelopeWidget(); ~EnvelopeWidget(); /// Set the time range. /// @param t total time to display (in seconds) void SetTime(float t) { tmRange = t; } /// Set the amplitude level range. /// @param a maximum amplitude void SetLevel(float a) { ampRange = a; } /// Set the start value. /// @param st starting level void SetStart(float st) { start = st; } /// Set the sustain flag. /// @param on sustain on when non-zero void SetSus(int on) { susOn = on; } /// Set the number of segments /// @param n number of segments void SetSegs(int n); /// Set values for one segment. /// @param n segment number (zero-based) /// @param rt rate in seconds /// @param lvl amplitude level at end of segment void SetVal(int n, float rt, float lvl); virtual int Load(XmlSynthElem *elem); /// Redraw the widget. virtual void Paint(DrawContext dc); }; #endif ",0 "terfaces provided as part of the Hyperic Plug-in Development * Kit or the Hyperic Client Development Kit - this is merely considered * normal use of the program, and does *not* fall under the heading of * ""derived work"". * * Copyright (C) [2004, 2005, 2006], Hyperic, Inc. * This file is part of HQ. * * HQ is free software; you can redistribute it and/or modify * it under the terms version 2 of the GNU General Public License as * published by the Free Software Foundation. This program is distributed * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA. */ package org.hyperic.util.xmlparser; import org.hyperic.util.StringUtil; import org.jdom.Attribute; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.File; import java.io.PrintStream; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import org.xml.sax.EntityResolver; /** * The main entry point && bulk of XmlParser. The parsing routine * takes an entry-point tag, which provides information about subtags, * attributes it takes, etc. Tags can implement various interfaces * to tell the parser to call back when certain conditions are met. * This class takes the role of both a minimal validator as well as * a traversal mechanism for building data objects out of XML. */ public class XmlParser { private XmlParser(){} private static void checkAttributes(Element elem, XmlTagHandler tag, XmlFilterHandler filter) throws XmlAttrException { boolean handlesAttrs = tag instanceof XmlAttrHandler; XmlAttr[] attrs; if(handlesAttrs) attrs = ((XmlAttrHandler)tag).getAttributes(); else attrs = new XmlAttr[0]; // Ensure out all the required && optional attributes for(int i=0; i 1){ throw new XmlTooManyTagException(elem, name); } break; case XmlTagInfo.ONE_OR_MORE: threshold++; case XmlTagInfo.ZERO_OR_MORE: if(val < threshold){ throw new XmlMissingTagException(elem, name); } break; } hash.remove(name); } // Now check for excess sub-tags if(hash.size() != 0){ Set keys = hash.keySet(); throw new XmlTooManyTagException(elem, (String)keys.iterator().next()); } // Recurse to all sub-tags for(Iterator i=elem.getChildren().iterator(); i.hasNext(); ){ Element child = (Element)i.next(); for(int j=0; j ""%20"" and bombs try { is = new FileInputStream(in); doc = builder.build(is); } catch (IOException exc) { throw new XmlParseException(exc.getMessage()); } catch (JDOMException exc) { throw new XmlParseException(exc.getMessage()); } finally { if (is != null) { try { is.close(); } catch (IOException e) {} } } generalParse(tag, doc); } /** General parsing used by both parse methods above */ private static void generalParse(XmlTagHandler tag, Document doc) throws XmlParseException { Element root = doc.getRootElement(); if(!root.getName().equalsIgnoreCase(tag.getName())){ throw new XmlParseException(""Incorrect root tag. Expected <""+ tag.getName() + ""> but got <"" + root.getName() + "">""); } XmlParser.processNode(root, tag, new DummyFilter()); } private static void dumpAttrs(XmlAttr[] attrs, String typeName, int type, PrintStream out, int indent) { String printMsg; boolean printed = false; int lineBase, lineLen; if(attrs.length == 0) return; lineLen = 0; printMsg = ""- Has "" + typeName + "" attributes: ""; lineBase = indent + printMsg.length(); // Required attributes for(int i=0; i 70){ out.println(); out.print(StringUtil.repeatChars(' ', lineBase)); lineLen = lineBase; } } if(printed) out.println(); } private static void dumpNode(XmlTagHandler tag, PrintStream out, int indent) throws XmlTagException { XmlTagInfo[] subTags = tag.getSubTags(); out.println(StringUtil.repeatChars(' ', indent) + ""Tag <"" + tag.getName() + "">:""); if(tag instanceof XmlAttrHandler){ XmlAttr[] attrs; attrs = ((XmlAttrHandler)tag).getAttributes(); if(attrs.length == 0) out.println(StringUtil.repeatChars(' ', indent) + ""- has no required or optional attributes""); XmlParser.dumpAttrs(attrs, ""REQUIRED"", XmlAttr.REQUIRED, out, indent); XmlParser.dumpAttrs(attrs, ""OPTIONAL"", XmlAttr.OPTIONAL, out, indent); } else { out.println(StringUtil.repeatChars(' ', indent) + ""- has no required or optional attributes""); } if(tag instanceof XmlUnAttrHandler) out.println(StringUtil.repeatChars(' ', indent) + ""- handles arbitrary attributes""); subTags = tag.getSubTags(); if(subTags.length == 0){ out.println(StringUtil.repeatChars(' ', indent) + ""- has no subtags""); } else { for(int i=0; i, which ""); switch(type){ case XmlTagInfo.REQUIRED: out.println(""is REQUIRED""); break; case XmlTagInfo.OPTIONAL: out.println(""is OPTIONAL""); break; case XmlTagInfo.ONE_OR_MORE: out.println(""is REQUIRED at least ONCE""); break; case XmlTagInfo.ZERO_OR_MORE: out.println(""can be specified any # of times""); break; } XmlParser.dumpNode(subTags[i].getTag(), out, indent + 4); } } } public static void dump(XmlTagHandler root, PrintStream out){ try { XmlParser.dumpNode(root, out, 0); } catch(XmlTagException exc){ out.println(""Error traversing tags: "" + exc.getMessage()); } } private static String bold(String text) { return """" + text + """"; } private static String tag(String name) { return bold(""<"" + name + "">""); } private static String listitem(String name, String desc) { String item = """" + name + """"; if (desc != null) { item += """" + desc + """"; } return item; } private static void dumpAttrsWiki(XmlAttr[] attrs, String typeName, int type, PrintStream out, int indent) { boolean printed = false; if (attrs.length == 0) { return; } // Required attributes for (int i=0; i*: ""); } if (tag instanceof XmlAttrHandler) { XmlAttr[] attrs; attrs = ((XmlAttrHandler)tag).getAttributes(); dumpAttrsWiki(attrs, ""*REQUIRED*"", XmlAttr.REQUIRED, out, indent+1); dumpAttrsWiki(attrs, ""*OPTIONAL*"", XmlAttr.OPTIONAL, out, indent+1); } subTags = tag.getSubTags(); if (subTags.length != 0) { for (int i=0; i* "" + desc); dumpNodeWiki(subTags[i].getTag(), out, indent+1); } } } public static void dumpWiki(XmlTagHandler root, PrintStream out){ try { dumpNodeWiki(root, out, 1); } catch(XmlTagException exc){ out.println(""Error traversing tags: "" + exc.getMessage()); } } } ",0 "ense version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef _NVS_H_ #define _NVS_H_ #include #include #define NVS_STS_SHUTDOWN (1 << 0) #define NVS_STS_SUSPEND (1 << 1) #define NVS_STS_SYS_N (2) #define NVS_STS_SPEW_MSG (1 << (NVS_STS_SYS_N + 0)) #define NVS_STS_SPEW_DATA (1 << (NVS_STS_SYS_N + 1)) #define NVS_STS_SPEW_BUF (1 << (NVS_STS_SYS_N + 2)) #define NVS_STS_SPEW_IRQ (1 << (NVS_STS_SYS_N + 3)) #define NVS_STS_SPEW_MSK (NVS_STS_SPEW_MSG | \ NVS_STS_SPEW_DATA | \ NVS_STS_SPEW_BUF | \ NVS_STS_SPEW_IRQ) #define NVS_STS_DBG_N (NVS_STS_SYS_N + 4) #define NVS_STS_EXT_N (NVS_STS_DBG_N) #define NVS_STS_MSK ((1 << NVS_STS_DBG_N) - 1) #define NVS_CHANNEL_N_MAX (5) #define NVS_FLOAT_SIGNIFICANCE_MICRO (1000000) /* IIO_VAL_INT_PLUS_MICRO */ #define NVS_FLOAT_SIGNIFICANCE_NANO (1000000000) /* IIO_VAL_INT_PLUS_NANO */ /* from AOS sensors.h */ #define SENSOR_TYPE_ACCELEROMETER (1) #define SENSOR_TYPE_MAGNETIC_FIELD (2) #define SENSOR_TYPE_ORIENTATION (3) #define SENSOR_TYPE_GYROSCOPE (4) #define SENSOR_TYPE_LIGHT (5) #define SENSOR_TYPE_PRESSURE (6) #define SENSOR_TYPE_TEMPERATURE (7) #define SENSOR_TYPE_PROXIMITY (8) #define SENSOR_TYPE_GRAVITY (9) #define SENSOR_TYPE_LINEAR_ACCELERATION (10) #define SENSOR_TYPE_ROTATION_VECTOR (11) #define SENSOR_TYPE_RELATIVE_HUMIDITY (12) #define SENSOR_TYPE_AMBIENT_TEMPERATURE (13) #define SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED (14) #define SENSOR_TYPE_GAME_ROTATION_VECTOR (15) #define SENSOR_TYPE_GYROSCOPE_UNCALIBRATED (16) #define SENSOR_TYPE_SIGNIFICANT_MOTION (17) #define SENSOR_TYPE_STEP_DETECTOR (18) #define SENSOR_TYPE_STEP_COUNTER (19) #define SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR (20) #define SENSOR_TYPE_HEART_RATE (21) #define SENSOR_TYPE_TILT_DETECTOR (22) #define SENSOR_TYPE_WAKE_GESTURE (23) #define SENSOR_TYPE_GLANCE_GESTURE (24) #define SENSOR_TYPE_PICK_UP_GESTURE (25) /* from AOS sensors.h */ #define SENSOR_FLAG_WAKE_UP (0x1) #define SENSOR_FLAG_ON_CHANGE_MODE (0x2) #define SENSOR_FLAG_ONE_SHOT_MODE (0x4) #define SENSOR_FLAG_SPECIAL_REPORTING_MODE (0x6) #define REPORTING_MODE_MASK (0xE) #define REPORTING_MODE_SHIFT (1) /* end AOS sensors.h */ /* unconfigurable flags */ #define SENSOR_FLAG_READONLY_MASK (REPORTING_MODE_MASK) enum nvs_float_significance { NVS_FLOAT_MICRO = 0, /* IIO_VAL_INT_PLUS_MICRO */ NVS_FLOAT_NANO, /* IIO_VAL_INT_PLUS_NANO */ NVS_FLOAT_N_MAX, }; struct nvs_float { int ival; int fval; }; struct sensor_cfg { const char *name; /* sensor name */ int snsr_id; /* sensor ID */ int kbuf_sz; /* kernel buffer size (n bytes) */ int timestamp_sz; /* hub: timestamp size (n bytes) */ int snsr_data_n; /* hub: number of data bytes */ unsigned int ch_n; /* number of channels */ int ch_sz; /* channel size (n bytes) */ void *ch_inf; /* if hub then NULL */ /* the following is for android struct sensor_t */ const char *part; const char *vendor; int version; struct nvs_float max_range; struct nvs_float resolution; struct nvs_float milliamp; int delay_us_min; int delay_us_max; unsigned int fifo_rsrv_evnt_cnt; unsigned int fifo_max_evnt_cnt; unsigned int flags; /* end of android struct sensor_t data */ signed char matrix[9]; /* device orientation on platform */ /* interpolation calibration */ int uncal_lo; int uncal_hi; int cal_lo; int cal_hi; /* thresholds */ int thresh_lo; int thresh_hi; int report_n; /* report count for on-change sensor */ enum nvs_float_significance float_significance; /* global scale/offset allows for a 1st order polynomial on the data * e.g. data * scale + offset */ struct nvs_float scale; struct nvs_float offset; unsigned int ch_n_max; /* NVS_CHANNEL_N_MAX */ /* channel scale/offset allows for a 1st order polynomial per channel * e.g. channel_data * channel_scale + channel_offset */ struct nvs_float scales[NVS_CHANNEL_N_MAX]; struct nvs_float offsets[NVS_CHANNEL_N_MAX]; }; struct nvs_fn_dev { /** * enable - enable/disable the device * @client: clients private data * @snsr_id: sensor ID * @enable: 0 = off * 1 = on * -1 = query status * * Returns device enable state or a negative error code. * * Note that the enable value may be a bitmap of the enabled * channel. */ int (*enable)(void *client, int snsr_id, int enable); /** * batch - see Android definition of batch * http://source.android.com/devices/sensors/batching.html * @client: clients private data * @snsr_id: sensor ID * @flags: see Android definition of flags (currently obsolete) * @period: period timeout in microseconds * @timeout: batch timeout in microseconds * * Returns 0 on success or a negative error code. * * Note that period should be implemented for setting delay if * batching is not supported. */ int (*batch)(void *client, int snsr_id, int flags, unsigned int period, unsigned int timeout); /** * flush - see Android definition of flush * http://source.android.com/devices/sensors/batching.html * @client: clients private data * @snsr_id: sensor ID * * Returns 0 on success or a negative error code. * * Note that if not implemented at the device level, it is * implemented in the NVS layer. In other words, if the device * does not support batching, leave this NULL. */ int (*flush)(void *client, int snsr_id); /** * resolution - set device resolution * @client: clients private data * @snsr_id: sensor ID * @resolution: resolution value * * Returns 0 on success or a negative error code. * If a value > 0 is returned then sensor_cfg->resolution is * updated as described in the below note. This allows drivers * with multiple sensors to only have to implement the device * specific function for certain sensors and allow the NVS * layer to handle the others. * * Note that if not implemented, resolution changes will change * sensor_cfg->resolution. If implemented, it is expected * that the resolution value will be device-specific. In other * words, only the device layer will understand the value which * will typically be used to change the mode. */ int (*resolution)(void *client, int snsr_id, int resolution); /** * max_range - set device max_range * @client: clients private data * @snsr_id: sensor ID * @max_range: max_range value * * Returns 0 on success or a negative error code. * If a value > 0 is returned then sensor_cfg->max_range is * updated as described in the below note. This allows drivers * with multiple sensors to only have to implement the device * specific function for certain sensors and allow the NVS * layer to handle the others. * * Note that if not implemented, max_range changes will change * sensor_cfg->max_range. If implemented, it is expected * that the max_range value will be device-specific. In other * words, only the device layer will understand the value which * will typically be used to change the mode. */ int (*max_range)(void *client, int snsr_id, int max_range); /** * scale - set device scale * @client: clients private data * @snsr_id: sensor ID * @channel: channel index * @scale: scale value * * Returns 0 on success or a negative error code. * If a value > 0 is returned then sensor_cfg->scale is updated * as described in the below note. This allows drivers with * multiple sensors to only have to implement the device * specific function for certain sensors and allow the NVS * layer to handle the others. * * Note that if not implemented, scale changes will change * sensor_cfg->scale. If implemented, it is expected * that the scale value will be device-specific. In other words, * only the device layer will understand the value which will * typically be used to change the mode. */ int (*scale)(void *client, int snsr_id, int channel, int scale); /** * offset - set device offset * @client: clients private data * @snsr_id: sensor ID * @channel: channel index * @offset: offset value * * Returns 0 on success or a negative error code. * If a value > 0 is returned then sensor_cfg->offset is updated * as described in the below note. This allows drivers with * multiple sensors to only have to implement the device * specific function for certain sensors and allow the NVS * layer to handle the others. * * Note that if not implemented, offset changes will change * sensor_cfg->offset. If implemented, it is expected * that the offset value will be device-specific. In other * words, only the device layer will understand the value which * will typically be used to set calibration. */ int (*offset)(void *client, int snsr_id, int channel, int offset); /** * thresh_lo - set device low threshold * @client: clients private data * @snsr_id: sensor ID * @thresh_lo: low threshold value * * Returns 0 on success or a negative error code. * If a value > 0 is returned then sensor_cfg->thresh_lo is * updated as described in the below note. This allows drivers * with multiple sensors to only have to implement the device * specific function for certain sensors and allow the NVS * layer to handle the others. * * Note that if not implemented, thresh_lo changes will change * sensor_cfg->thresh_lo. If implemented, it is expected * that the thresh_lo value will be device-specific. In other * words, only the device layer will understand the value. */ int (*thresh_lo)(void *client, int snsr_id, int thresh_lo); /** * thresh_hi - set device high threshold * @client: clients private data * @snsr_id: sensor ID * @thresh_hi: high threshold value * * Returns 0 on success or a negative error code. * If a value > 0 is returned then sensor_cfg->thresh_hi is * updated as described in the below note. This allows drivers * with multiple sensors to only have to implement the device * specific function for certain sensors and allow the NVS * layer to handle the others. * * Note that if not implemented, thresh_hi changes will change * sensor_cfg->thresh_hi. If implemented, it is expected * that the thresh_hi value will be device-specific. In other * words, only the device layer will understand the value. */ int (*thresh_hi)(void *client, int snsr_id, int thresh_hi); /** * reset - device reset * @client: clients private data * @snsr_id: sensor ID * * Returns 0 on success or a negative error code. * * Note a < 0 value for snsr_id is another reset option, * e.g. global device reset such as on a sensor hub. * Note mutex is locked for this function. */ int (*reset)(void *client, int snsr_id); /** * self_test - device self-test * @client: clients private data * @snsr_id: sensor ID * @buf: character buffer to write to * * Returns 0 on success or a negative error code if buf == NULL. * if buf != NULL, return number of characters. * Note mutex is locked for this function. */ int (*self_test)(void *client, int snsr_id, char *buf); /** * regs - device register dump * @client: clients private data * @snsr_id: sensor ID * @buf: character buffer to write to * * Returns buf count or a negative error code. */ int (*regs)(void *client, int snsr_id, char *buf); /** * nvs_write - nvs attribute write extension * @client: clients private data * @snsr_id: sensor ID * @nvs: value written to nvs attribute * * Returns 0 on success or a negative error code. * * Used to extend the functionality of the nvs attribute. */ int (*nvs_write)(void *client, int snsr_id, unsigned int nvs); /** * nvs_read - nvs attribute read extension * @client: clients private data * @snsr_id: sensor ID * @buf: character buffer to write to * * Returns buf count or a negative error code. * * Used to extend the functionality of the nvs attribute. */ int (*nvs_read)(void *client, int snsr_id, char *buf); /** * sts - status flags * used by both device and NVS layers * See NVS_STS_ defines */ unsigned int *sts; /** * errs - error counter * used by both device and NVS layers */ unsigned int *errs; }; struct nvs_fn_if { int (*probe)(void **handle, void *dev_client, struct device *dev, struct nvs_fn_dev *fn_dev, struct sensor_cfg *snsr_cfg); int (*remove)(void *handle); void (*shutdown)(void *handle); void (*nvs_mutex_lock)(void *handle); void (*nvs_mutex_unlock)(void *handle); int (*suspend)(void *handle); int (*resume)(void *handle); int (*handler)(void *handle, void *buffer, s64 ts); }; extern const char * const nvs_float_significances[]; struct nvs_fn_if *nvs_iio(void); int nvs_of_dt(const struct device_node *np, struct sensor_cfg *cfg, const char *dev_name); int nvs_vreg_dis(struct device *dev, struct regulator_bulk_data *vreg); int nvs_vregs_disable(struct device *dev, struct regulator_bulk_data *vregs, unsigned int vregs_n); int nvs_vreg_en(struct device *dev, struct regulator_bulk_data *vreg); int nvs_vregs_enable(struct device *dev, struct regulator_bulk_data *vregs, unsigned int vregs_n); void nvs_vregs_exit(struct device *dev, struct regulator_bulk_data *vregs, unsigned int vregs_n); int nvs_vregs_init(struct device *dev, struct regulator_bulk_data *vregs, unsigned int vregs_n, char **vregs_name); int nvs_vregs_sts(struct regulator_bulk_data *vregs, unsigned int vregs_n); s64 nvs_timestamp(void); #endif /* _NVS_H_ */ ",0 "th, initial-scale=1.0""> AngularJS ",0 "t { PyObject_HEAD int co_argcount; /* #arguments, except *args */ int co_nlocals; /* #local variables */ int co_stacksize; /* #entries needed for evaluation stack */ int co_flags; /* CO_..., see below */ PyObject *co_code; /* instruction opcodes */ PyObject *co_consts; /* list (constants used) */ PyObject *co_names; /* list of strings (names used) */ PyObject *co_varnames; /* tuple of strings (local variable names) */ PyObject *co_freevars; /* tuple of strings (free variable names) */ PyObject *co_cellvars; /* tuple of strings (cell variable names) */ /* The rest doesn't count for hash/cmp */ PyObject *co_filename; /* string (where it was loaded from) */ PyObject *co_name; /* string (name, for reference) */ int co_firstlineno; /* first source line number */ PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) */ } PyCodeObject; /* Masks for co_flags above */ #define CO_OPTIMIZED 0x0001 #define CO_NEWLOCALS 0x0002 #define CO_VARARGS 0x0004 #define CO_VARKEYWORDS 0x0008 #define CO_NESTED 0x0010 #define CO_GENERATOR 0x0020 /* The CO_NOFREE flag is set if there are no free or cell variables. This information is redundant, but it allows a single flag test to determine whether there is any extra work to be done when the call frame it setup. */ #define CO_NOFREE 0x0040 /* XXX Temporary hack. Until generators are a permanent part of the language, we need a way for a code object to record that generators were *possible* when it was compiled. This is so code dynamically compiled *by* a code object knows whether to allow yield stmts. In effect, this passes on the ""from __future__ import generators"" state in effect when the code block was compiled. */ #define CO_GENERATOR_ALLOWED 0x1000 /* no longer used in an essential way */ #define CO_FUTURE_DIVISION 0x2000 PyAPI_DATA(PyTypeObject) PyCode_Type; #define PyCode_Check(op) ((op)->ob_type == &PyCode_Type) #define PyCode_GetNumFree(op) (PyTuple_GET_SIZE((op)->co_freevars)) #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */ /* Public interface */ struct _node; /* Declare the existence of this type */ PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *); PyAPI_FUNC(PyCodeObject *) PyCode_New( int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *); /* same as struct above */ PyAPI_FUNC(int) PyCode_Addr2Line(PyCodeObject *, int); /* Future feature support */ typedef struct { int ff_found_docstring; int ff_last_lineno; int ff_features; } PyFutureFeatures; PyAPI_FUNC(PyFutureFeatures *) PyNode_Future(struct _node *, const char *); PyAPI_FUNC(PyCodeObject *) PyNode_CompileFlags(struct _node *, const char *, PyCompilerFlags *); #define FUTURE_NESTED_SCOPES ""nested_scopes"" #define FUTURE_GENERATORS ""generators"" #define FUTURE_DIVISION ""division"" /* for internal use only */ #define _PyCode_GETCODEPTR(co, pp) \ ((*(co)->co_code->ob_type->tp_as_buffer->bf_getreadbuffer) \ ((co)->co_code, 0, (void **)(pp))) #ifdef __cplusplus } #endif #endif /* !Py_COMPILE_H */ ",0 " } .visible { display: inline; }

              Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed mattis enim vitae orci. Phasellus libero. Maecenas nisl arcu, consequat congue, commodo nec, commodo ultricies, turpis. Quisque sapien nunc, posuere vitae, rutrum et, luctus at, pede. Pellentesque massa ante, ornare id, aliquam vitae, ultrices porttitor, pede. Nullam sit amet nisl elementum elit convallis malesuada. Phasellus magna sem, semper quis, faucibus ut, rhoncus non, mi. Duis pellentesque, felis eu adipiscing ullamcorper, odio urna consequat arcu, at posuere ante quam non dolor. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis scelerisque. Donec lacus neque, vehicula in, eleifend vitae, venenatis ac, felis. Donec arcu. Nam sed tortor nec ipsum aliquam ullamcorper. Duis accumsan metus eu urna. Aenean vitae enim. Integer lacus. Vestibulum venenatis erat eu odio. Praesent id metus.

              Seguir leyendo ",0 "ce Supplies for {{ department.name }}

              {{ c.EVENT_NAME }} Office Supplies Form

              {{ csrf_token() }} Once you've filled out the form above, or if your department doesn't need any office supplies, please click the button below.

              {% endblock %} ",0 "org/1999/xhtml""> Natural Europe Pathways <?php echo isset($title) ? ' | ' . strip_formatting($title) : ''; ?> ""/> ""/> ""/> ""/> ""/> ""/> ""/> "" /> ""/> '0'){ } else{ echo ' '; } ?> 0){ ?> ""/>
              ",0 "pensource.org/licenses/gpl-2.0.php GNU GPL v2 * @package vanillicon */ /** * Class VanilliconPlugin */ class VanilliconPlugin extends Gdn_Plugin { /** * Set up the plugin. */ public function setup() { $this->structure(); } /** * Perform any necessary database or configuration updates. */ public function structure() { touchConfig('Plugins.Vanillicon.Type', 'v2'); } /** * Set the vanillicon on the user' profile. * * @param ProfileController $sender * @param array $args */ public function profileController_afterAddSideMenu_handler($sender, $args) { if (!$sender->User->Photo) { $sender->User->Photo = userPhotoDefaultUrl($sender->User, ['Size' => 200]); } } /** * The settings page for vanillicon. * * @param Gdn_Controller $sender */ public function settingsController_vanillicon_create($sender) { $sender->permission('Garden.Settings.Manage'); $cf = new ConfigurationModule($sender); $items = [ 'v1' => 'Vanillicon 1', 'v2' => 'Vanillicon 2' ]; $cf->initialize([ 'Plugins.Vanillicon.Type' => [ 'LabelCode' => 'Vanillicon Set', 'Control' => 'radiolist', 'Description' => 'Which vanillicon set do you want to use?', 'Items' => $items, 'Options' => ['display' => 'after'], 'Default' => 'v1' ] ]); $sender->setData('Title', sprintf(t('%s Settings'), 'Vanillicon')); $cf->renderAll(); } /** * Overrides allowing admins to set the default avatar, since it has no effect when Vanillicon is on. * Adds messages to the top of avatar settings page and to the help panel asset. * * @param SettingsController $sender */ public function settingsController_avatarSettings_handler($sender) { // We check if Gravatar is enabled before adding any messages as Gravatar overrides Vanillicon. if (!Gdn::addonManager()->isEnabled('gravatar', \Vanilla\Addon::TYPE_ADDON)) { $message = t('You\'re using Vanillicon avatars as your default avatars.'); $message .= ' '.t('To set a custom default avatar, disable the Vanillicon plugin.'); $messages = $sender->data('messages', []); $messages = array_merge($messages, [$message]); $sender->setData('messages', $messages); $sender->setData('canSetDefaultAvatar', false); $help = t('Your users\' default avatars are Vanillicon avatars.'); helpAsset(t('How are my users\' default avatars set?'), $help); } } } if (!function_exists('userPhotoDefaultUrl')) { /** * Calculate the user's default photo url. * * @param array|object $user The user to examine. * @param array $options An array of options. * - Size: The size of the photo. * @return string Returns the vanillicon url for the user. */ function userPhotoDefaultUrl($user, $options = []) { static $iconSize = null, $type = null; if ($iconSize === null) { $thumbSize = c('Garden.Thumbnail.Size'); $iconSize = $thumbSize <= 50 ? 50 : 100; } if ($type === null) { $type = c('Plugins.Vanillicon.Type'); } $size = val('Size', $options, $iconSize); $email = val('Email', $user); if (!$email) { $email = val('UserID', $user, 100); } $hash = md5($email); $px = substr($hash, 0, 1); switch ($type) { case 'v2': $photoUrl = ""//w$px.vanillicon.com/v2/{$hash}.svg""; break; default: $photoUrl = ""//w$px.vanillicon.com/{$hash}_{$size}.png""; break; } return $photoUrl; } } ",0 "ms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /*=========================================================================== * Copyright (c) Texas Instruments Inc 2010-12 * * Use of this software is controlled by the terms and conditions found in the * license agreement under which this software has been supplied or provided. * ============================================================================ */ /*=========================================================================== // PASM - PRU Assembler //--------------------------------------------------------------------------- // // File : pru_ins.h // // Description: // Defines a data structre PRU_INST that can completely describe a // PRU opcode. // //--------------------------------------------------------------------------- // Revision: // 21-Jun-13: 0.84 - Open source version ============================================================================*/ typedef struct _PRU_ARG { uint Type; uint Flags; /* Flags for RegisterBit type */ #define PA_FLG_REGPOINTER 0x0001 #define PA_FLG_POSTINC 0x0002 #define PA_FLG_PREDEC 0x0004 uint Value; /* Reg #, Imm Val, Count Val */ uint Field; /* Field for Registers */ uint Bit; /* Bit # for RegisterBit type */ } PRU_ARG; #define ARGTYPE_REGISTER 1 /* Standard register and field */ #define ARGTYPE_IMMEDIATE 2 /* Immediate value */ #define ARGTYPE_COUNT 3 /* Count for burst */ #define ARGTYPE_R0BYTE 4 /* Byte from R0 */ #define ARGTYPE_CONSTANT 5 /* Constant Table Index */ #define ARGTYPE_OFFSET 6 /* 10 bit offset for jumps */ #define ARGTYPE_REGISTERBIT 7 /* Register in Rxx.Txx format Field=bitno */ #define FIELDTYPE_7_0 0 /* Bits 7:0 */ #define FIELDTYPE_15_8 1 /* Bits 15:8 */ #define FIELDTYPE_23_16 2 /* Bits 23:16 */ #define FIELDTYPE_31_24 3 /* Bits 31:24 */ #define FIELDTYPE_15_0 4 /* Bits 15:0 */ #define FIELDTYPE_23_8 5 /* Bits 23:8 */ #define FIELDTYPE_31_16 6 /* Bits 31:16 */ #define FIELDTYPE_31_0 7 /* Bits 31:0 */ #define FIELDTYPE_OFF_0 0 /* Offset bit 0 */ #define FIELDTYPE_OFF_8 1 /* Offset bit 8 */ #define FIELDTYPE_OFF_16 2 /* Offset bit 16 */ #define FIELDTYPE_OFF_24 3 /* Offset bit 24 */ extern char *FieldText[]; typedef struct _PRU_INST { uint Op; /* Operation */ uint ArgCnt; /* Argument Count */ PRU_ARG Arg[4]; /* Arguments */ } PRU_INST; #define OP_ADD 1 #define OP_ADC 2 #define OP_SUB 3 #define OP_SUC 4 #define OP_LSL 5 #define OP_LSR 6 #define OP_RSB 7 #define OP_RSC 8 #define OP_AND 9 #define OP_OR 10 #define OP_XOR 11 #define OP_NOT 12 #define OP_MIN 13 #define OP_MAX 14 #define OP_CLR 15 #define OP_SET 16 #define OP_LDI 17 #define OP_LBBO 18 #define OP_LBCO 19 #define OP_SBBO 20 #define OP_SBCO 21 #define OP_LFC 22 #define OP_STC 23 #define OP_JAL 24 #define OP_JMP 25 #define OP_QBGT 26 #define OP_QBLT 27 #define OP_QBEQ 28 #define OP_QBGE 29 #define OP_QBLE 30 #define OP_QBNE 31 #define OP_QBA 32 #define OP_QBBS 33 #define OP_QBBC 34 #define OP_LMBD 35 #define OP_CALL 36 #define OP_WBC 37 #define OP_WBS 38 #define OP_MOV 39 #define OP_MVIB 40 #define OP_MVIW 41 #define OP_MVID 42 #define OP_SCAN 43 #define OP_HALT 44 #define OP_SLP 45 #define OP_RET 46 #define OP_ZERO 47 #define OP_FILL 48 #define OP_XIN 49 #define OP_XOUT 50 #define OP_XCHG 51 #define OP_SXIN 52 #define OP_SXOUT 53 #define OP_SXCHG 54 #define OP_LOOP 55 #define OP_ILOOP 56 #define OP_NOP0 57 #define OP_NOP1 58 #define OP_NOP2 59 #define OP_NOP3 60 #define OP_NOP4 61 #define OP_NOP5 62 #define OP_NOP6 63 #define OP_NOP7 64 #define OP_NOP8 65 #define OP_NOP9 66 #define OP_NOPA 67 #define OP_NOPB 68 #define OP_NOPC 69 #define OP_NOPD 70 #define OP_NOPE 71 #define OP_NOPF 72 #define OP_MAXIDX 72 extern char *OpText[]; ",0 "android.view.View.OnClickListener; import android.widget.Button; /** * Description: *
              site: crazyit.org *
              Copyright (C), 2001-2012, Yeeku.H.Lee *
              This program is protected by copyright laws. *
              Program Name: *
              Date: * @author Yeeku.H.Lee kongyeeku@163.com * @version 1.0 */ public class StartActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //»ñȡӦÓóÌÐòÖеÄbn°´Å¥ Button bn = (Button)findViewById(R.id.bn); //Ϊbn°´Å¥°ó¶¨Ê¼þ¼àÌýÆ÷ bn.setOnClickListener(new OnClickListener() { @Override public void onClick(View source) { //´´½¨ÐèÒªÆô¶¯µÄActivity¶ÔÓ¦µÄIntent Intent intent = new Intent(StartActivity.this , SecondActivity.class); //Æô¶¯intent¶ÔÓ¦µÄActivity startActivity(intent); } }); } }",0 "

              {{template.name}}

              {{template.description}}

              Type: {{template.type}}

              {{template.price}}

              ",0 "This file is part of OpenJAUS. OpenJAUS is distributed under the BSD * license. See the LICENSE file for details. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of the University of Florida nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ // File Name: resumeMessage.c // // Written By: Danny Kent (jaus AT dannykent DOT com), Tom Galluzzo (galluzzo AT gmail DOT com) // // Version: 3.3.0b // // Date: 09/08/09 // // Description: This file defines the functionality of a ResumeMessage #include #include #include #include ""jaus.h"" static const int commandCode = JAUS_RESUME; static const int maxDataSizeBytes = 0; static JausBoolean headerFromBuffer(ResumeMessage message, unsigned char *buffer, unsigned int bufferSizeBytes); static JausBoolean headerToBuffer(ResumeMessage message, unsigned char *buffer, unsigned int bufferSizeBytes); static int headerToString(ResumeMessage message, char **buf); static JausBoolean dataFromBuffer(ResumeMessage message, unsigned char *buffer, unsigned int bufferSizeBytes); static int dataToBuffer(ResumeMessage message, unsigned char *buffer, unsigned int bufferSizeBytes); static void dataInitialize(ResumeMessage message); static unsigned int dataSize(ResumeMessage message); // ************************************************************************************************************** // // USER CONFIGURED FUNCTIONS // ************************************************************************************************************** // // Initializes the message-specific fields static void dataInitialize(ResumeMessage message) { // Set initial values of message fields // No Data } // Return boolean of success static JausBoolean dataFromBuffer(ResumeMessage message, unsigned char *buffer, unsigned int bufferSizeBytes) { // int index = 0; if(bufferSizeBytes == message->dataSize) { // Unpack Message Fields from Buffer // No Data return JAUS_TRUE; } else { return JAUS_FALSE; } } // Returns number of bytes put into the buffer static int dataToBuffer(ResumeMessage message, unsigned char *buffer, unsigned int bufferSizeBytes) { int index = 0; if(bufferSizeBytes >= dataSize(message)) { // Pack Message Fields to Buffer buffer = NULL; } return index; } static int dataToString(ResumeMessage message, char **buf) { //message already verified //Setup temporary string buffer unsigned int bufSize = 2; (*buf) = (char*)malloc(sizeof(char)*bufSize); strcpy((*buf), ""\n\0""); return (int)strlen(*buf); } static unsigned int dataSize(ResumeMessage message) { // Constant Size return maxDataSizeBytes; } // ************************************************************************************************************** // // NON-USER CONFIGURED FUNCTIONS // ************************************************************************************************************** // ResumeMessage resumeMessageCreate(void) { ResumeMessage message; message = (ResumeMessage)malloc( sizeof(ResumeMessageStruct) ); if(message == NULL) { return NULL; } // Initialize Values message->properties.priority = JAUS_DEFAULT_PRIORITY; message->properties.ackNak = JAUS_ACK_NAK_NOT_REQUIRED; message->properties.scFlag = JAUS_NOT_SERVICE_CONNECTION_MESSAGE; message->properties.expFlag = JAUS_NOT_EXPERIMENTAL_MESSAGE; message->properties.version = JAUS_VERSION_3_3; message->properties.reserved = 0; message->commandCode = commandCode; message->destination = jausAddressCreate(); message->source = jausAddressCreate(); message->dataFlag = JAUS_SINGLE_DATA_PACKET; message->dataSize = maxDataSizeBytes; message->sequenceNumber = 0; dataInitialize(message); return message; } void resumeMessageDestroy(ResumeMessage message) { jausAddressDestroy(message->source); jausAddressDestroy(message->destination); free(message); } JausBoolean resumeMessageFromBuffer(ResumeMessage message, unsigned char* buffer, unsigned int bufferSizeBytes) { int index = 0; if(headerFromBuffer(message, buffer+index, bufferSizeBytes-index)) { index += JAUS_HEADER_SIZE_BYTES; if(dataFromBuffer(message, buffer+index, bufferSizeBytes-index)) { return JAUS_TRUE; } else { return JAUS_FALSE; } } else { return JAUS_FALSE; } } JausBoolean resumeMessageToBuffer(ResumeMessage message, unsigned char *buffer, unsigned int bufferSizeBytes) { if(bufferSizeBytes < resumeMessageSize(message)) { return JAUS_FALSE; //improper size } else { message->dataSize = dataToBuffer(message, buffer+JAUS_HEADER_SIZE_BYTES, bufferSizeBytes - JAUS_HEADER_SIZE_BYTES); if(headerToBuffer(message, buffer, bufferSizeBytes)) { return JAUS_TRUE; } else { return JAUS_FALSE; // headerToResumeBuffer failed } } } ResumeMessage resumeMessageFromJausMessage(JausMessage jausMessage) { ResumeMessage message; if(jausMessage->commandCode != commandCode) { return NULL; // Wrong message type } else { message = (ResumeMessage)malloc( sizeof(ResumeMessageStruct) ); if(message == NULL) { return NULL; } message->properties.priority = jausMessage->properties.priority; message->properties.ackNak = jausMessage->properties.ackNak; message->properties.scFlag = jausMessage->properties.scFlag; message->properties.expFlag = jausMessage->properties.expFlag; message->properties.version = jausMessage->properties.version; message->properties.reserved = jausMessage->properties.reserved; message->commandCode = jausMessage->commandCode; message->destination = jausAddressCreate(); *message->destination = *jausMessage->destination; message->source = jausAddressCreate(); *message->source = *jausMessage->source; message->dataSize = jausMessage->dataSize; message->dataFlag = jausMessage->dataFlag; message->sequenceNumber = jausMessage->sequenceNumber; // Unpack jausMessage->data if(dataFromBuffer(message, jausMessage->data, jausMessage->dataSize)) { return message; } else { return NULL; } } } JausMessage resumeMessageToJausMessage(ResumeMessage message) { JausMessage jausMessage; jausMessage = (JausMessage)malloc( sizeof(struct JausMessageStruct) ); if(jausMessage == NULL) { return NULL; } jausMessage->properties.priority = message->properties.priority; jausMessage->properties.ackNak = message->properties.ackNak; jausMessage->properties.scFlag = message->properties.scFlag; jausMessage->properties.expFlag = message->properties.expFlag; jausMessage->properties.version = message->properties.version; jausMessage->properties.reserved = message->properties.reserved; jausMessage->commandCode = message->commandCode; jausMessage->destination = jausAddressCreate(); *jausMessage->destination = *message->destination; jausMessage->source = jausAddressCreate(); *jausMessage->source = *message->source; jausMessage->dataSize = dataSize(message); jausMessage->dataFlag = message->dataFlag; jausMessage->sequenceNumber = message->sequenceNumber; jausMessage->data = (unsigned char *)malloc(jausMessage->dataSize); jausMessage->dataSize = dataToBuffer(message, jausMessage->data, jausMessage->dataSize); return jausMessage; } unsigned int resumeMessageSize(ResumeMessage message) { return (unsigned int)(dataSize(message) + JAUS_HEADER_SIZE_BYTES); } char* resumeMessageToString(ResumeMessage message) { if(message) { char* buf1 = NULL; char* buf2 = NULL; char* buf = NULL; int returnVal; //Print the message header to the string buffer returnVal = headerToString(message, &buf1); //Print the message data fields to the string buffer returnVal += dataToString(message, &buf2); buf = (char*)malloc(strlen(buf1)+strlen(buf2)+1); strcpy(buf, buf1); strcat(buf, buf2); free(buf1); free(buf2); return buf; } else { char* buf = ""Invalid Resume Message""; char* msg = (char*)malloc(strlen(buf)+1); strcpy(msg, buf); return msg; } } //********************* PRIVATE HEADER FUNCTIONS **********************// static JausBoolean headerFromBuffer(ResumeMessage message, unsigned char *buffer, unsigned int bufferSizeBytes) { if(bufferSizeBytes < JAUS_HEADER_SIZE_BYTES) { return JAUS_FALSE; } else { // unpack header message->properties.priority = (buffer[0] & 0x0F); message->properties.ackNak = ((buffer[0] >> 4) & 0x03); message->properties.scFlag = ((buffer[0] >> 6) & 0x01); message->properties.expFlag = ((buffer[0] >> 7) & 0x01); message->properties.version = (buffer[1] & 0x3F); message->properties.reserved = ((buffer[1] >> 6) & 0x03); message->commandCode = buffer[2] + (buffer[3] << 8); message->destination->instance = buffer[4]; message->destination->component = buffer[5]; message->destination->node = buffer[6]; message->destination->subsystem = buffer[7]; message->source->instance = buffer[8]; message->source->component = buffer[9]; message->source->node = buffer[10]; message->source->subsystem = buffer[11]; message->dataSize = buffer[12] + ((buffer[13] & 0x0F) << 8); message->dataFlag = ((buffer[13] >> 4) & 0x0F); message->sequenceNumber = buffer[14] + (buffer[15] << 8); return JAUS_TRUE; } } static JausBoolean headerToBuffer(ResumeMessage message, unsigned char *buffer, unsigned int bufferSizeBytes) { JausUnsignedShort *propertiesPtr = (JausUnsignedShort*)&message->properties; if(bufferSizeBytes < JAUS_HEADER_SIZE_BYTES) { return JAUS_FALSE; } else { buffer[0] = (unsigned char)(*propertiesPtr & 0xFF); buffer[1] = (unsigned char)((*propertiesPtr & 0xFF00) >> 8); buffer[2] = (unsigned char)(message->commandCode & 0xFF); buffer[3] = (unsigned char)((message->commandCode & 0xFF00) >> 8); buffer[4] = (unsigned char)(message->destination->instance & 0xFF); buffer[5] = (unsigned char)(message->destination->component & 0xFF); buffer[6] = (unsigned char)(message->destination->node & 0xFF); buffer[7] = (unsigned char)(message->destination->subsystem & 0xFF); buffer[8] = (unsigned char)(message->source->instance & 0xFF); buffer[9] = (unsigned char)(message->source->component & 0xFF); buffer[10] = (unsigned char)(message->source->node & 0xFF); buffer[11] = (unsigned char)(message->source->subsystem & 0xFF); buffer[12] = (unsigned char)(message->dataSize & 0xFF); buffer[13] = (unsigned char)((message->dataFlag & 0xFF) << 4) | (unsigned char)((message->dataSize & 0x0F00) >> 8); buffer[14] = (unsigned char)(message->sequenceNumber & 0xFF); buffer[15] = (unsigned char)((message->sequenceNumber & 0xFF00) >> 8); return JAUS_TRUE; } } static int headerToString(ResumeMessage message, char **buf) { //message existance already verified //Setup temporary string buffer unsigned int bufSize = 500; (*buf) = (char*)malloc(sizeof(char)*bufSize); strcpy((*buf), jausCommandCodeString(message->commandCode) ); strcat((*buf), "" (0x""); sprintf((*buf)+strlen(*buf), ""%04X"", message->commandCode); strcat((*buf), "")\nReserved: ""); jausUnsignedShortToString(message->properties.reserved, (*buf)+strlen(*buf)); strcat((*buf), ""\nVersion: ""); switch(message->properties.version) { case 0: strcat((*buf), ""2.0 and 2.1 compatible""); break; case 1: strcat((*buf), ""3.0 through 3.1 compatible""); break; case 2: strcat((*buf), ""3.2 and 3.3 compatible""); break; default: strcat((*buf), ""Reserved for Future: ""); jausUnsignedShortToString(message->properties.version, (*buf)+strlen(*buf)); break; } strcat((*buf), ""\nExp. Flag: ""); if(message->properties.expFlag == 0) strcat((*buf), ""Not Experimental""); else strcat((*buf), ""Experimental""); strcat((*buf), ""\nSC Flag: ""); if(message->properties.scFlag == 1) strcat((*buf), ""Service Connection""); else strcat((*buf), ""Not Service Connection""); strcat((*buf), ""\nACK/NAK: ""); switch(message->properties.ackNak) { case 0: strcat((*buf), ""None""); break; case 1: strcat((*buf), ""Request ack/nak""); break; case 2: strcat((*buf), ""nak response""); break; case 3: strcat((*buf), ""ack response""); break; default: break; } strcat((*buf), ""\nPriority: ""); if(message->properties.priority < 12) { strcat((*buf), ""Normal Priority ""); jausUnsignedShortToString(message->properties.priority, (*buf)+strlen(*buf)); } else { strcat((*buf), ""Safety Critical Priority ""); jausUnsignedShortToString(message->properties.priority, (*buf)+strlen(*buf)); } strcat((*buf), ""\nSource: ""); jausAddressToString(message->source, (*buf)+strlen(*buf)); strcat((*buf), ""\nDestination: ""); jausAddressToString(message->destination, (*buf)+strlen(*buf)); strcat((*buf), ""\nData Size: ""); jausUnsignedIntegerToString(message->dataSize, (*buf)+strlen(*buf)); strcat((*buf), ""\nData Flag: ""); jausUnsignedIntegerToString(message->dataFlag, (*buf)+strlen(*buf)); switch(message->dataFlag) { case 0: strcat((*buf), "" Only data packet in single-packet stream""); break; case 1: strcat((*buf), "" First data packet in muti-packet stream""); break; case 2: strcat((*buf), "" Normal data packet""); break; case 4: strcat((*buf), "" Retransmitted data packet""); break; case 8: strcat((*buf), "" Last data packet in stream""); break; default: strcat((*buf), "" Unrecognized data flag code""); break; } strcat((*buf), ""\nSequence Number: ""); jausUnsignedShortToString(message->sequenceNumber, (*buf)+strlen(*buf)); return (int)strlen(*buf); } ",0 " copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef HIP_INCLUDE_HIP_HIP_PROFILE_H #define HIP_INCLUDE_HIP_HIP_PROFILE_H #define HIP_SCOPED_MARKER(markerName, group) #define HIP_BEGIN_MARKER(markerName, group) #define HIP_END_MARKER() #endif ",0 "let.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Arrays; import java.util.stream.Collectors; @WebServlet(""/"") public class HomeServlet extends HttpServlet { private final UserService userService; @Inject public HomeServlet(UserService userService){ this.userService = userService; } @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String html = getHtml(); resp.getWriter().write(html); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String body = req.getReader().lines() .collect(Collectors.joining()); User user = new User(); Arrays.stream(body.split(""&"")) .map(pairString -> pairString.split(""="")) .forEach(pair -> { switch (pair[0]){ case ""name"": user.setName(pair[1].replace('+', ' ').trim()); break; case ""age"": user.setAge(pair[1].trim()); } }); userService.add(user); String result = getHtml(); resp.getWriter().write(result); } public String getUserList() { return String.format(""
                %s
              "", this.userService.getAllUsers().stream() .map(user -> String.format(""
            1. %s %s
            2. "", user.getName(), user.getAge())).collect(Collectors.joining(System.lineSeparator()))); } public String getForm() { return ""
              \n"" + "" \n"" + ""\n"" + "" \n"" + ""
              \n""; } public String getHtml() { String form = getForm(); String userList = getUserList(); return ""\n"" + "" \n"" + "" \n"" + "" \n"" + "" Title\n"" + "" \n"" + "" \n"" + form + ""
              "" + userList + ""\n"" + """"; } } ",0 ")) define('BOM', ""\xEF\xBB\xBF""); // polyfill for new sort flag if(!defined('SORT_NATURAL')) define('SORT_NATURAL', 'SORT_NATURAL'); // a super simple autoloader function load($classmap, $base = null) { spl_autoload_register(function($class) use ($classmap, $base) { $class = strtolower($class); if(!isset($classmap[$class])) return false; if($base) { include($base . DS . $classmap[$class]); } else { include($classmap[$class]); } }); } // auto-load all toolkit classes load(array( // classes 'a' => __DIR__ . DS . 'lib' . DS . 'a.php', 'bitmask' => __DIR__ . DS . 'lib' . DS . 'bitmask.php', 'brick' => __DIR__ . DS . 'lib' . DS . 'brick.php', 'c' => __DIR__ . DS . 'lib' . DS . 'c.php', 'cookie' => __DIR__ . DS . 'lib' . DS . 'cookie.php', 'cache' => __DIR__ . DS . 'lib' . DS . 'cache.php', 'cache\\driver' => __DIR__ . DS . 'lib' . DS . 'cache' . DS . 'driver.php', 'cache\\driver\\apc' => __DIR__ . DS . 'lib' . DS . 'cache' . DS . 'driver' . DS . 'apc.php', 'cache\\driver\\file' => __DIR__ . DS . 'lib' . DS . 'cache' . DS . 'driver' . DS . 'file.php', 'cache\\driver\\memcached' => __DIR__ . DS . 'lib' . DS . 'cache' . DS . 'driver' . DS . 'memcached.php', 'cache\\driver\\mock' => __DIR__ . DS . 'lib' . DS . 'cache' . DS . 'driver' . DS . 'mock.php', 'cache\\driver\\session' => __DIR__ . DS . 'lib' . DS . 'cache' . DS . 'driver' . DS . 'session.php', 'cache\\value' => __DIR__ . DS . 'lib' . DS . 'cache' . DS . 'value.php', 'collection' => __DIR__ . DS . 'lib' . DS . 'collection.php', 'crypt' => __DIR__ . DS . 'lib' . DS . 'crypt.php', 'data' => __DIR__ . DS . 'lib' . DS . 'data.php', 'database' => __DIR__ . DS . 'lib' . DS . 'database.php', 'database\\query' => __DIR__ . DS . 'lib' . DS . 'database' . DS . 'query.php', 'db' => __DIR__ . DS . 'lib' . DS . 'db.php', 'detect' => __DIR__ . DS . 'lib' . DS . 'detect.php', 'dimensions' => __DIR__ . DS . 'lib' . DS . 'dimensions.php', 'dir' => __DIR__ . DS . 'lib' . DS . 'dir.php', 'email' => __DIR__ . DS . 'lib' . DS . 'email.php', 'embed' => __DIR__ . DS . 'lib' . DS . 'embed.php', 'error' => __DIR__ . DS . 'lib' . DS . 'error.php', 'errorreporting' => __DIR__ . DS . 'lib' . DS . 'errorreporting.php', 'escape' => __DIR__ . DS . 'lib' . DS . 'escape.php', 'exif' => __DIR__ . DS . 'lib' . DS . 'exif.php', 'exif\\camera' => __DIR__ . DS . 'lib' . DS . 'exif' . DS . 'camera.php', 'exif\\location' => __DIR__ . DS . 'lib' . DS . 'exif' . DS . 'location.php', 'f' => __DIR__ . DS . 'lib' . DS . 'f.php', 'folder' => __DIR__ . DS . 'lib' . DS . 'folder.php', 'header' => __DIR__ . DS . 'lib' . DS . 'header.php', 'html' => __DIR__ . DS . 'lib' . DS . 'html.php', 'i' => __DIR__ . DS . 'lib' . DS . 'i.php', 'l' => __DIR__ . DS . 'lib' . DS . 'l.php', 'media' => __DIR__ . DS . 'lib' . DS . 'media.php', 'obj' => __DIR__ . DS . 'lib' . DS . 'obj.php', 'pagination' => __DIR__ . DS . 'lib' . DS . 'pagination.php', 'password' => __DIR__ . DS . 'lib' . DS . 'password.php', 'r' => __DIR__ . DS . 'lib' . DS . 'r.php', 'redirect' => __DIR__ . DS . 'lib' . DS . 'redirect.php', 'remote' => __DIR__ . DS . 'lib' . DS . 'remote.php', 'response' => __DIR__ . DS . 'lib' . DS . 'response.php', 'router' => __DIR__ . DS . 'lib' . DS . 'router.php', 's' => __DIR__ . DS . 'lib' . DS . 's.php', 'server' => __DIR__ . DS . 'lib' . DS . 'server.php', 'silo' => __DIR__ . DS . 'lib' . DS . 'silo.php', 'sql' => __DIR__ . DS . 'lib' . DS . 'sql.php', 'str' => __DIR__ . DS . 'lib' . DS . 'str.php', 'system' => __DIR__ . DS . 'lib' . DS . 'system.php', 'thumb' => __DIR__ . DS . 'lib' . DS . 'thumb.php', 'timer' => __DIR__ . DS . 'lib' . DS . 'timer.php', 'toolkit' => __DIR__ . DS . 'lib' . DS . 'toolkit.php', 'tpl' => __DIR__ . DS . 'lib' . DS . 'tpl.php', 'upload' => __DIR__ . DS . 'lib' . DS . 'upload.php', 'url' => __DIR__ . DS . 'lib' . DS . 'url.php', 'v' => __DIR__ . DS . 'lib' . DS . 'v.php', 'visitor' => __DIR__ . DS . 'lib' . DS . 'visitor.php', 'xml' => __DIR__ . DS . 'lib' . DS . 'xml.php', 'yaml' => __DIR__ . DS . 'lib' . DS . 'yaml.php', // vendors 'spyc' => __DIR__ . DS . 'vendors' . DS . 'yaml' . DS . 'yaml.php', 'abeautifulsite\\simpleimage' => __DIR__ . DS . 'vendors' . DS . 'abeautifulsite' . DS . 'SimpleImage.php', 'mimereader' => __DIR__ . DS . 'vendors' . DS . 'mimereader' . DS . 'mimereader.php', )); // load all helpers include(__DIR__ . DS . 'helpers.php');",0 " and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * #L% */ /* BSD 2-Clause License Copyright (c) 2018, Michael Doube, Richard Domander, Alessandro Felder All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.bonej.wrapperPlugins.wrapperUtils; import ij.ImagePlus; import java.util.Optional; import java.util.stream.Stream; import net.imagej.axis.Axes; import net.imagej.axis.AxisType; import net.imagej.axis.CalibratedAxis; import net.imagej.axis.TypedAxis; import net.imagej.space.AnnotatedSpace; import net.imagej.units.UnitService; import org.bonej.utilities.AxisUtils; import org.scijava.util.StringUtils; /** * Static utility methods that help display results to the user * * @author Richard Domander */ public final class ResultUtils { private ResultUtils() {} /** * Returns the exponent character of the elements in this space, e.g. '³' for * a spatial 3D space. * * @param space an N-dimensional space. * @param type of the space. * @param type of the axes. * @return the exponent character if the space has 2 - 9 spatial dimensions. * An empty character otherwise. */ public static , A extends TypedAxis> char getExponent(final S space) { final long dimensions = AxisUtils.countSpatialDimensions(space); if (dimensions == 2) { return '\u00B2'; } if (dimensions == 3) { return '\u00B3'; } if (dimensions == 4) { return '\u2074'; } if (dimensions == 5) { return '\u2075'; } if (dimensions == 6) { return '\u2076'; } if (dimensions == 7) { return '\u2077'; } if (dimensions == 8) { return '\u2078'; } if (dimensions == 9) { return '\u2079'; } // Return an ""empty"" character return '\u0000'; } /** * Returns a verbal description of the size of the elements in the given * space, e.g. ""A"" for 2D images and ""V"" for 3D images. * * @param space an N-dimensional space. * @param type of the space. * @param type of the axes. * @return the noun for the size of the elements. */ public static , A extends TypedAxis> String getSizeDescription(final S space) { final long dimensions = AxisUtils.countSpatialDimensions(space); if (dimensions == 2) { return ""A""; } if (dimensions == 3) { return ""V""; } return ""Size""; } /** * Returns the common unit string, e.g. ""mm3"" that describes the * elements in the space. *

              * The common unit is the unit of the first spatial axis if it can be * converted to the units of the other axes. *

              * * @param space an N-dimensional space. * @param type of the space. * @param unitService an {@link UnitService} to convert axis calibrations. * @param exponent an exponent to be added to the unit, e.g. '³'. * @return the unit string with the exponent. */ public static > String getUnitHeader( final S space, final UnitService unitService, final String exponent) { final Optional unit = AxisUtils.getSpatialUnit(space, unitService); if (!unit.isPresent()) { return """"; } final String unitHeader = unit.get(); if (unitHeader.isEmpty()) { // Don't show default units return """"; } return ""("" + unitHeader + exponent + "")""; } /** * Gets the unit of the image calibration, which can be displayed to the user. * * @param imagePlus a ImageJ1 style {@link ImagePlus}. * @return calibration unit, or empty string if there's no unit. */ public static String getUnitHeader(final ImagePlus imagePlus) { final String unit = imagePlus.getCalibration().getUnit(); if (StringUtils.isNullOrEmpty(unit)) { return """"; } return ""("" + unit + "")""; } /** * If needed, converts the given index to the ImageJ1 convention where Z, * Channel and Time axes start from 1. * * @param type type of the axis's dimension. * @param index the index in the axis. * @return index + 1 if type is Z, Channel or Time. Index otherwise. */ public static long toConventionalIndex(final AxisType type, final long index) { final Stream oneAxes = Stream.of(Axes.Z, Axes.CHANNEL, Axes.TIME); if (oneAxes.anyMatch(t -> t.equals(type))) { return index + 1; } return index; } } ",0 "btain 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. */ package com.facebook.presto.thrift.api.udf; import com.facebook.drift.annotations.ThriftConstructor; import com.facebook.drift.annotations.ThriftField; import com.facebook.drift.annotations.ThriftStruct; import com.google.common.collect.ImmutableList; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; import java.util.List; import static com.facebook.drift.annotations.ThriftField.Recursiveness.TRUE; import static com.facebook.drift.annotations.ThriftField.Requiredness.OPTIONAL; import static java.util.Objects.requireNonNull; @Immutable @ThriftStruct public class UdfExecutionFailureInfo { private final String type; private final String message; private final UdfExecutionFailureInfo cause; private final List suppressed; private final List stack; @ThriftConstructor public UdfExecutionFailureInfo( String type, String message, @Nullable UdfExecutionFailureInfo cause, List suppressed, List stack) { this.type = requireNonNull(type, ""type is null""); this.message = requireNonNull(message, ""message is null""); this.cause = cause; this.suppressed = ImmutableList.copyOf(suppressed); this.stack = ImmutableList.copyOf(stack); } @ThriftField(1) public String getType() { return type; } @Nullable @ThriftField(2) public String getMessage() { return message; } @Nullable @ThriftField(value = 3, isRecursive = TRUE, requiredness = OPTIONAL) public UdfExecutionFailureInfo getCause() { return cause; } @ThriftField(4) public List getSuppressed() { return suppressed; } @ThriftField(5) public List getStack() { return stack; } } ",0 " * * * * Original version written by Matthew Dellinger * * mdelling@vt.edu * * * * Re-written by Aaron Lindsay * * aaron@aclindsay.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include #include ""tester.h"" #include ""salloc.h"" #include ""hardware.h"" /* * This is the one copy of the test struct which gets passed around everywhere * to communicate options, global variables to the pieces of the application * which need them. */ static struct test tester = { .options = 0, .workload = 0, .task_list = 0, .tasks = 0, .num_tasks = 0, .locks = 0, .num_locks = -1, .num_processors = 0, .domain_masks = 0, .global_start_time = 0 }; /* * Initialize all the locks for the taskset. */ static void initialize_test_locks() { int i; tester.locks = (chronos_mutex_t *) salloc(sizeof(chronos_mutex_t) * tester.num_locks); if (!tester.locks) fatal_error(""Failed to allocate memory.""); for (i = 0; i < tester.num_locks; i++) chronos_mutex_init(&tester.locks[i]); if (tester.num_locks && !(tester.options->locking & LOCKING)) warning(""Locking not enabled, "" ""but the taskset file specifies locks. Ignoring locks.""); if (!tester.num_locks && (tester.options->locking & LOCKING)) { warning(""Locking enabled, "" ""but the taskset file doesn't specify locks. Turning locking off.""); tester.options->locking = NO_LOCKING; } } static void cleanup_test_locks() { sfree(tester.locks); tester.locks = 0; tester.num_locks = 0; } /* * Read in the taskset file, initializing data structures as we go. * This function handles initializing the test struct as well as all the * task structs, locks, scheduling domain maps, period, utilization, etc. */ static void init_tasks(char *taskset_filename) { int ret, i, seen_group; int c; struct task *curr; FILE *f; //get the number of processors and create that many domain_masks tester.num_processors = get_num_processors(); //initialize domain masks tester.domain_masks = (unsigned long *)salloc(sizeof(unsigned long) * tester.num_processors); if (!tester.domain_masks) fatal_error(""Failed to allocate memory.""); for (i = 0; i < tester.num_processors; i++) { MASK_ZERO(tester.domain_masks[i]); } //open the file from the passed-in filename f = fopen(taskset_filename, ""r""); if (!f) fatal_error(""Failed to open taskset file.""); //read lines from the file and initialize locks/tasks as we go seen_group = 0; while ((c = getc(f)) != EOF) { //ignore comments if (c == '#') { //snarf rest of line while (c != EOF && c != '\n') c = getc(f); //read the line which specifies the number of locks (only one such line is allowed) } else if (c == 'L' && tester.num_locks == -1) { ret = fscanf(f, "" %d "", &tester.num_locks); if (ret == 0 || ret == EOF) fatal_error(""Ill-formed taskset file: "" ""number of locks on 'L' line improperly formatted.""); initialize_test_locks(); //read lines which specify a task in the taskset } else if (c == 'T') { if (tester.num_locks < 0) //number of locks must preceed first task fatal_error(""Ill-formed taskset file: "" ""the number of locks must preceed the first task definition.""); if (seen_group) fatal_error(""Ill-formed taskset file: "" ""no task definition may follow any group line.""); init_task(&tester, f); } else if (c == 'G') { seen_group = 1; init_group(&tester, f); } else fatal_error(""Ill-formed taskset file: "" ""line doesn't begin with either '#', 'T', 'L', or 'G'.""); } fclose(f); if (tester.num_locks < 0) fatal_error(""Number of locks not found in taskset file.""); if (tester.num_tasks <= 0) fatal_error(""No tasks found in taskset file""); //create an array from the task list so access to the tasks is constant-time tester.tasks = (struct task **)salloc(sizeof(struct task *) * tester.num_tasks); if (!tester.tasks) fatal_error(""Failed to allocate memory.""); //go through the list of tasks and point the array elements at them i = 0; curr = tester.task_list; while (curr) { tester.tasks[i] = curr; curr = curr->next; i++; } //initialize the abort device if (init_aborts(&tester.abort_data)) fatal_error(""Failed to initialize abort device.""); } static void cleanup_tasks() { int i; sfree(tester.domain_masks); tester.domain_masks = 0; for (i = 0; i < tester.num_tasks; i++) { if (tester.tasks[i]->my_locks) sfree(tester.tasks[i]->my_locks); sfree(tester.tasks[i]); } tester.task_list = 0; sfree(tester.tasks); tester.tasks = 0; tester.num_tasks = 0; } /* * Zero out the counters before the next run */ static void clear_counters() { tester.sys_total_release = 0; tester.sys_met_release = 0; tester.sys_total_util = 0; tester.sys_met_util = 0; tester.sys_abort_count = 0; tester.max_tardiness = 0; } /* * Get the scheduler constant needed to pass into the call to set_scheduler, * combining the constant for the scheduler itself, as well as other scheduling * features selected by the same constant. */ static int get_scheduler(struct test_app_opts *options) { int sched = options->scheduler; if (options->priority_inheritance) sched |= SCHED_FLAG_PI; if (options->enable_hua) sched |= SCHED_FLAG_HUA; if (options->deadlock_prevention) sched |= SCHED_FLAG_NO_DEADLOCKS; return sched; } static int get_priority(struct test_app_opts *options) { if (options->scheduler & SCHED_GLOBAL_MASK) return TASK_RUN_PRIO; else return -1; } /* Calculate the time required to lock and unlock a resource */ void *get_rt_lock_time(void *p) { chronos_mutex_t r; struct sched_param param; param.sched_priority = TASK_RUN_PRIO; sched_setscheduler(0, SCHED_FIFO, ¶m); chronos_mutex_init(&r); chronos_mutex_lock(&r); chronos_mutex_unlock(&r); chronos_mutex_destroy(&r); return NULL; } /* * Calculate the time required to lock and unlock a resource in a real-time task. */ void calc_lock_time() { pthread_t t1; struct timespec start_time, end_time; unsigned long time = 0, temp_time = 0; struct sched_param param; int i, prio; prio = getpriority(PRIO_PROCESS, 0); param.sched_priority = MAIN_PRIO; sched_setscheduler(0, SCHED_FIFO, ¶m); for (i = 0; i < 100; i++) { clock_gettime(CLOCK_REALTIME, &start_time); pthread_create(&t1, NULL, get_rt_lock_time, NULL); pthread_join(t1, NULL); clock_gettime(CLOCK_REALTIME, &end_time); temp_time = timespec_subtract_ns(&start_time, &end_time); if (temp_time > time) time = temp_time; } tester.lock_time = time / THOUSAND; param.sched_priority = prio; sched_setscheduler(0, SCHED_OTHER, ¶m); } /* * Print statistics from the last run of the tester. */ static void print_results() { if (tester.options->output_format == OUTPUT_VERBOSE) { printf(""set start_time: %ld sec %ld nsec\n"", tester.global_start_time->tv_sec, tester.global_start_time->tv_nsec); printf(""set end_time: %ld sec %ld nsec\n"", tester.global_start_time->tv_sec + tester.options->run_time, tester.global_start_time->tv_nsec); printf(""total tasks: %d,"", tester.sys_total_release); printf(""total deadlines met: %d,"", tester.sys_met_release); printf(""total possible utility: %d,"", tester.sys_total_util); printf(""total utility accrued: %d,"", tester.sys_met_util); printf(""total tasks aborted: %d\n"", tester.sys_abort_count); } else if (tester.options->output_format == OUTPUT_EXCEL) { char *sched_name = get_sched_name(tester.options->scheduler); if (sched_name) printf(""%s,"", sched_name); printf(""%d,"", tester.options->cpu_usage); printf(""=%d/%d,"", tester.sys_met_release, tester.sys_total_release); printf(""=%d/%d,"", tester.sys_met_util, tester.sys_total_util); printf(""=%ld\n"", tester.max_tardiness); } else if (tester.options->output_format == OUTPUT_GNUPLOT) { printf(""%f %f %f %ld\n"", ((double)tester.options->cpu_usage) / 100, ((double)tester.sys_met_release) / ((double)tester.sys_total_release), //deadline satisfaction ratio ((double)tester.sys_met_util) / ((double)tester.sys_total_util), //accrued utility ratio tester.max_tardiness); } else { char *sched_name = get_sched_name(tester.options->scheduler); printf(""%.2f"", ((double)tester.options->cpu_usage) / 100); if (sched_name) printf(""/%s"", sched_name); printf("": Tasks: %d/%d, Utility: %d/%d, "" ""Aborted: %d, Tardiness %ld\n"", tester.sys_met_release, tester.sys_total_release, tester.sys_met_util, tester.sys_total_util, tester.sys_abort_count, tester.max_tardiness); } } /* * Setup for and run one complete run of a taskset in the test application. This * includes initializing the real-time priorities, spawning all threads, joining * them, and tabulating their statistics, and printing the results. */ static void run() { int i; struct sched_param param, old_param; unsigned long main_mask = 0; pthread_barrierattr_t barrierattr; clear_counters(); //clear performance counters pthread_barrierattr_setpshared(&barrierattr, PTHREAD_PROCESS_SHARED); //allow access to this barrier from any process with access to the memory holding it pthread_barrier_init(tester.barrier, &barrierattr, tester.num_tasks); //initialize barrier //set outselves as a real-time task sched_getparam(0, &old_param); param.sched_priority = MAIN_PRIO; if (sched_setscheduler(0, SCHED_FIFO, ¶m) == -1) fatal_error(""sched_setscheduler() failed.""); //set task affinity of this main thread to the first processor MASK_ZERO(main_mask); MASK_SET(main_mask, 0); if (sched_setaffinity(0, sizeof(main_mask), (cpu_set_t *) & main_mask) < 0) fatal_error(""sched_setaffinity() failed.""); //set up the correct scheduler on all the domains we need for (i = 0; i < tester.num_processors && tester.domain_masks[i] != 0; i++) { if (set_scheduler(get_scheduler(tester.options), get_priority(tester.options), tester.domain_masks[i])) fatal_error(""Selection of RT scheduler failed! "" ""Is the scheduler loaded?""); } //some debugging/verbose info if (tester.options->output_format == OUTPUT_VERBOSE) { printf(""Percent of each task's exec time to use: %f\n"", ((double)tester.options->cpu_usage) / 100); printf(""Critical section length: %d\n"", tester.options->cs_length); } //generate timing info for each task for (i = 0; i < tester.num_tasks; i++) { clear_task_stats(tester.tasks[i]); set_lock_usage(tester.tasks[i], &tester); calculate_releases(tester.tasks[i], &tester); if (tester.options->output_format == OUTPUT_VERBOSE) printf(""period: %ld usec \t "" ""usage: %ld unlocked + %ld locked usec\n"", tester.tasks[i]->period, tester.tasks[i]->unlocked_usage, tester.tasks[i]->locked_usage); } //initialize the global_start_time pointer to 0 so it can be reset again by the 'winning' thread tester.global_start_time = 0; //start all the thread groups for (i = 0; i < tester.num_tasks; i++) { if (group_leader(tester.tasks[i])) if (tgroup_create(&tester.tasks[i]->thread.tg, start_task_group, (void *)tester.tasks[i])) fatal_error(""Failed to tgroup_create "" ""one of the task group leader threads.""); } //wait until all the thread groups are done for (i = 0; i < tester.num_tasks; i++) { if (group_leader(tester.tasks[i])) { int ret, status = 0; ret = tgroup_join(&tester.tasks[i]->thread.tg, &status); if (ret) fatal_error(""Failed to tgroup_join "" ""one of the task group leader processes.""); if (status) fatal_error(""tgroup_join joined task group "" ""leader process with non-zero status.""); } } //return us to a normal scheduler and priority sched_setscheduler(0, SCHED_OTHER, &old_param); //accumulate statistics from individual tasks for (i = 0; i < tester.num_tasks; i++) { long tardiness; tester.sys_total_release += tester.tasks[i]->max_releases; tester.sys_met_release += tester.tasks[i]->deadlines_met; tester.sys_total_util += tester.tasks[i]->max_releases * tester.tasks[i]->utility; tester.sys_met_util += tester.tasks[i]->utility_accrued; tester.sys_abort_count += tester.tasks[i]->num_aborted; //if this task's tardiness is less than the current maximum, update it //Note: negative tardiness is 'greater' because tardiness is calculated as (deadline - end_time) tardiness = tester.tasks[i]->max_tardiness; if (tardiness < tester.max_tardiness) tester.max_tardiness = tardiness; } print_results(); //display all statistics corresponding to the output options pthread_barrier_destroy(tester.barrier); //destroy barrier } /* * Given the options passed in on the command line, initialize the application * and call each of the individual runs (will only be one if batch mode is not * enabled). */ void run_test(struct test_app_opts *options) { tester.options = options; //intiailize the memory for the barrier tester.barrier = salloc(sizeof(pthread_barrier_t)); if (!tester.barrier) fatal_error(""pthread_barrier_t memory allocation failed.""); tester.workload = get_workload_struct(tester.options->workload); workload_init_global(&tester); // initialize any global state the current workload has (allocating global memory, etc.) //initialize tasks based on the taskset file init_tasks(options->taskset_filename); //if requested, find the hyper-period and return if (tester.options->no_run) { printf(""No run (-z) flag enabled\n""); printf(""Hyper-period is: %ld seconds\n"", taskset_lcm(&tester) / MILLION); return; } if (options->enable_hua) calc_lock_time(); //calculate how long locking takes (needed to calculate HUA abort handler timing information) //actually run the tests for (; options->cpu_usage <= options->end_usage; options->cpu_usage += options->interval) { run(); if (options->cpu_usage < options->end_usage) sleep(1); } cleanup_test_locks(); cleanup_tasks(); sfree(tester.barrier); } ",0 "ral Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ namespace ErsBase\View\Helper; use Zend\View\Helper\AbstractHelper; #use Zend\View\HelperPluginManager as ServiceManager; use Zend\Session\Container; class Session extends AbstractHelper { #protected $serviceManager; /*public function __construct(ServiceManager $serviceManager) { $this->serviceManager = $serviceManager; }*/ public function __invoke() { $container = new Container('ers'); return $container; } }",0 "

              Welcome to Photon UI!

              Or
              Login With Your Photon Account
              Forgot Your Password?
              ",0 "ed: virtual ISoundDevice::FNUM GetFnumber(uint8_t ch, int16_t offset); virtual void UpdateVolExp(uint8_t ch); virtual void UpdateFreq(uint8_t ch, const FNUM* fnum); virtual void UpdateKey(uint8_t ch, uint8_t keyon); virtual void UpdateVoice(uint8_t ch); virtual void UpdatePanpot(uint8_t ch); public: COPL4ML(CPort* pt, int fsamp); virtual void Init(); }; class COPL4ML2 : public COPL4ML { public: COPL4ML2(CPort* pt, int fsamp); }; #endif //__OPL4_H__ ",0 "P[2] - nuc_pos_dens_sh[j].z; scalar_type T = (PmQ[0] * PmQ[0] + PmQ[1] * PmQ[1] + PmQ[2] * PmQ[2]) * rho; lio_gamma(F_mT, T); } { // START INDEX i1=0, CENTER 1 { scalar_type p1ss_0 = PmA[0] * F_mT[0] + WmP[0] * F_mT[1]; scalar_type p1ss_1 = PmA[0] * F_mT[1] + WmP[0] * F_mT[2]; scalar_type preterm = fit_dens_sh[j + 0] * prefactor_dens * dens[0]; // START INDEX igrad=0 { scalar_type C_force_term = inv_two_zeta_eta * F_mT[1]; C_force_term += WmQ[0] * p1ss_1; scalar_type A_force_term = inv_two_zeta * (F_mT[0] - rho_zeta * F_mT[1]); A_force_term += WmP[0] * p1ss_1; scalar_type B_force_term = PmB[0] * p1ss_0 + A_force_term; A_force_term += PmA[0] * p1ss_0; A_force_term *= 2.0 * ai; B_force_term *= 2.0 * aj; C_force_term *= 2.0 * ac_val_dens_sh[j].x; A_force_term -= F_mT[0]; A_force[0] += preterm * A_force_term; B_force[0] += preterm * B_force_term; C_force[0][tid] += preterm * C_force_term; } // START INDEX igrad=1 { scalar_type C_force_term = WmQ[1] * p1ss_1; scalar_type A_force_term = WmP[1] * p1ss_1; scalar_type B_force_term = PmB[1] * p1ss_0 + A_force_term; A_force_term += PmA[1] * p1ss_0; A_force_term *= 2.0 * ai; B_force_term *= 2.0 * aj; C_force_term *= 2.0 * ac_val_dens_sh[j].x; A_force[1] += preterm * A_force_term; B_force[1] += preterm * B_force_term; C_force[1][tid] += preterm * C_force_term; } // START INDEX igrad=2 { scalar_type C_force_term = WmQ[2] * p1ss_1; scalar_type A_force_term = WmP[2] * p1ss_1; scalar_type B_force_term = PmB[2] * p1ss_0 + A_force_term; A_force_term += PmA[2] * p1ss_0; A_force_term *= 2.0 * ai; B_force_term *= 2.0 * aj; C_force_term *= 2.0 * ac_val_dens_sh[j].x; A_force[2] += preterm * A_force_term; B_force[2] += preterm * B_force_term; C_force[2][tid] += preterm * C_force_term; } } // START INDEX i1=1, CENTER 1 { scalar_type p1ss_0 = PmA[1] * F_mT[0] + WmP[1] * F_mT[1]; scalar_type p1ss_1 = PmA[1] * F_mT[1] + WmP[1] * F_mT[2]; scalar_type preterm = fit_dens_sh[j + 0] * prefactor_dens * dens[1]; // START INDEX igrad=0 { scalar_type C_force_term = WmQ[0] * p1ss_1; scalar_type A_force_term = WmP[0] * p1ss_1; scalar_type B_force_term = PmB[0] * p1ss_0 + A_force_term; A_force_term += PmA[0] * p1ss_0; A_force_term *= 2.0 * ai; B_force_term *= 2.0 * aj; C_force_term *= 2.0 * ac_val_dens_sh[j].x; A_force[0] += preterm * A_force_term; B_force[0] += preterm * B_force_term; C_force[0][tid] += preterm * C_force_term; } // START INDEX igrad=1 { scalar_type C_force_term = inv_two_zeta_eta * F_mT[1]; C_force_term += WmQ[1] * p1ss_1; scalar_type A_force_term = inv_two_zeta * (F_mT[0] - rho_zeta * F_mT[1]); A_force_term += WmP[1] * p1ss_1; scalar_type B_force_term = PmB[1] * p1ss_0 + A_force_term; A_force_term += PmA[1] * p1ss_0; A_force_term *= 2.0 * ai; B_force_term *= 2.0 * aj; C_force_term *= 2.0 * ac_val_dens_sh[j].x; A_force_term -= F_mT[0]; A_force[1] += preterm * A_force_term; B_force[1] += preterm * B_force_term; C_force[1][tid] += preterm * C_force_term; } // START INDEX igrad=2 { scalar_type C_force_term = WmQ[2] * p1ss_1; scalar_type A_force_term = WmP[2] * p1ss_1; scalar_type B_force_term = PmB[2] * p1ss_0 + A_force_term; A_force_term += PmA[2] * p1ss_0; A_force_term *= 2.0 * ai; B_force_term *= 2.0 * aj; C_force_term *= 2.0 * ac_val_dens_sh[j].x; A_force[2] += preterm * A_force_term; B_force[2] += preterm * B_force_term; C_force[2][tid] += preterm * C_force_term; } } // START INDEX i1=2, CENTER 1 { scalar_type p1ss_0 = PmA[2] * F_mT[0] + WmP[2] * F_mT[1]; scalar_type p1ss_1 = PmA[2] * F_mT[1] + WmP[2] * F_mT[2]; scalar_type preterm = fit_dens_sh[j + 0] * prefactor_dens * dens[2]; // START INDEX igrad=0 { scalar_type C_force_term = WmQ[0] * p1ss_1; scalar_type A_force_term = WmP[0] * p1ss_1; scalar_type B_force_term = PmB[0] * p1ss_0 + A_force_term; A_force_term += PmA[0] * p1ss_0; A_force_term *= 2.0 * ai; B_force_term *= 2.0 * aj; C_force_term *= 2.0 * ac_val_dens_sh[j].x; A_force[0] += preterm * A_force_term; B_force[0] += preterm * B_force_term; C_force[0][tid] += preterm * C_force_term; } // START INDEX igrad=1 { scalar_type C_force_term = WmQ[1] * p1ss_1; scalar_type A_force_term = WmP[1] * p1ss_1; scalar_type B_force_term = PmB[1] * p1ss_0 + A_force_term; A_force_term += PmA[1] * p1ss_0; A_force_term *= 2.0 * ai; B_force_term *= 2.0 * aj; C_force_term *= 2.0 * ac_val_dens_sh[j].x; A_force[1] += preterm * A_force_term; B_force[1] += preterm * B_force_term; C_force[1][tid] += preterm * C_force_term; } // START INDEX igrad=2 { scalar_type C_force_term = inv_two_zeta_eta * F_mT[1]; C_force_term += WmQ[2] * p1ss_1; scalar_type A_force_term = inv_two_zeta * (F_mT[0] - rho_zeta * F_mT[1]); A_force_term += WmP[2] * p1ss_1; scalar_type B_force_term = PmB[2] * p1ss_0 + A_force_term; A_force_term += PmA[2] * p1ss_0; A_force_term *= 2.0 * ai; B_force_term *= 2.0 * aj; C_force_term *= 2.0 * ac_val_dens_sh[j].x; A_force_term -= F_mT[0]; A_force[2] += preterm * A_force_term; B_force[2] += preterm * B_force_term; C_force[2][tid] += preterm * C_force_term; } } } } ",0 "sonalizzati da ${0}'; $L['Alerts_Configure_header'] = 'Configura download automatico'; $L['Update_Alerts_label'] = 'Scarica allarmi personalizzati'; $L['Refresh_label'] = 'Download configurazioni allarmi'; $L['last_update_label'] = 'Ultimo aggiornamento'; $L['Type_label'] = 'Allarme'; $L['Instance_label'] = 'Parametro'; $L['Threshold_label'] = 'Soglia'; $L['AlertsAutoUpdates_enabled_label'] = 'Abilita download automatico degli allarmi personalizzati (raccomandato)'; $L['AlertsAutoUpdates_disabled_label'] = 'Disabilita download automatico degli allarmi personalizzati'; $L['df_label'] = 'Spazio disco libero'; $L['load_label'] = 'Carico CPU'; $L['ping_droprate_label'] = 'Tasso di pacchetti persi'; $L['ping_label'] = 'Latenza ping'; $L['swap_label'] = 'Swap libero'; $L['Partition_label'] = 'Partizione'; $L['Host_label'] = 'Host'; $L['Intro_label'] = 'Ogni server ha una lista predefinita di allarmi di default. Solo alcuni possono essere personalizzati.
              Questa pagina mostra solo gli allarmi personalizzati su ${0}.'; $L['Download_label'] = 'Di default, le modifiche agli allarmi fatte su ${0} sono applicate ogni notte.
              Il tasto ""Scarica allarmi personalizzati"" scarica la configurazione subito.'; $L['max_fail_label'] = 'Critica sopra'; $L['min_fail_label'] = 'Critica sotto'; $L['max_warn_label'] = 'Media sopra'; $L['min_warn_label'] = 'Media sotto'; ",0 "uthor BaseX Team 2005-15, BSD License * @author Leo Woerteler */ @SuppressWarnings(""all"") public class OpSubtractDates extends QT3TestSet { /** * * ******************************************************* * Test: K-DatesSubtract-1 * Written by: Frans Englich * Date: 2007-11-22T11:31:21+01:00 * Purpose: Simple testing involving operator '-' between xs:date and xs:date. * ******************************************************* * . */ @org.junit.Test public void kDatesSubtract1() { final XQuery query = new XQuery( ""xs:date(\""1999-07-19\"") - xs:date(\""1969-11-30\"") eq xs:dayTimeDuration(\""P10823D\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(true) ); } /** * * ******************************************************* * Test: K-DatesSubtract-2 * Written by: Frans Englich * Date: 2007-11-22T11:31:21+01:00 * Purpose: Simple testing involving operator '-' between xs:date and xs:date that evaluates to zero. * ******************************************************* * . */ @org.junit.Test public void kDatesSubtract2() { final XQuery query = new XQuery( ""xs:date(\""1999-07-19\"") - xs:date(\""1999-07-19\"") eq xs:dayTimeDuration(\""PT0S\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(true) ); } /** * * ******************************************************* * Test: K-DatesSubtract-3 * Written by: Frans Englich * Date: 2007-11-22T11:31:21+01:00 * Purpose: The '+' operator is not available between xs:date and xs:date. * ******************************************************* * . */ @org.junit.Test public void kDatesSubtract3() { final XQuery query = new XQuery( ""xs:date(\""1999-10-12\"") + xs:date(\""1999-10-12\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( error(""XPTY0004"") ); } /** * * ******************************************************* * Test: K-DatesSubtract-4 * Written by: Frans Englich * Date: 2007-11-22T11:31:21+01:00 * Purpose: The 'div' operator is not available between xs:date and xs:date. * ******************************************************* * . */ @org.junit.Test public void kDatesSubtract4() { final XQuery query = new XQuery( ""xs:date(\""1999-10-12\"") div xs:date(\""1999-10-12\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( error(""XPTY0004"") ); } /** * * ******************************************************* * Test: K-DatesSubtract-5 * Written by: Frans Englich * Date: 2007-11-22T11:31:21+01:00 * Purpose: The '*' operator is not available between xs:date and xs:date. * ******************************************************* * . */ @org.junit.Test public void kDatesSubtract5() { final XQuery query = new XQuery( ""xs:date(\""1999-10-12\"") * xs:date(\""1999-10-12\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( error(""XPTY0004"") ); } /** * * ******************************************************* * Test: K-DatesSubtract-6 * Written by: Frans Englich * Date: 2007-11-22T11:31:21+01:00 * Purpose: The 'mod' operator is not available between xs:date and xs:date. * ******************************************************* * . */ @org.junit.Test public void kDatesSubtract6() { final XQuery query = new XQuery( ""xs:date(\""1999-10-12\"") mod xs:date(\""1999-10-12\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( error(""XPTY0004"") ); } /** * test subtraction of large dates . */ @org.junit.Test public void cbclSubtractDates001() { final XQuery query = new XQuery( ""xs:date(\""-25252734927766554-12-31\"") - xs:date(\""25252734927766554-12-31\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( error(""FODT0001"") ); } /** * test subtraction of large dates . */ @org.junit.Test public void cbclSubtractDates002() { final XQuery query = new XQuery( ""xs:date(\""-25252734927766554-12-31\"") - xs:date(\""25252734927766554-12-31+01:00\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( error(""FODT0001"") ); } /** * test subtraction of large dates . */ @org.junit.Test public void cbclSubtractDates003() { final XQuery query = new XQuery( ""xs:date(\""2008-12-31\"") - xs:date(\""2002-12-31+01:00\"") + implicit-timezone()"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""P2192DT1H"") ); } /** * test subtraction of large dates . */ @org.junit.Test public void cbclSubtractDates004() { final XQuery query = new XQuery( ""xs:date(\""2002-12-31+01:00\"") - xs:date(\""2008-12-31\"") - implicit-timezone()"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""-P2192DT1H"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-1 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator * As per example 1 (for this function)of the F&O specs. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD1() { final XQuery query = new XQuery( ""xs:date(\""2000-10-30\"") - xs:date(\""1999-11-28\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""P337D"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-10 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator used * together with an ""or"" expression. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD10() { final XQuery query = new XQuery( ""fn:string((xs:date(\""1985-07-05Z\"") - xs:date(\""1977-12-02Z\""))) or fn:string((xs:date(\""1985-07-05Z\"") - xs:date(\""1960-11-07Z\"")))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(true) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-11 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator used * as part of a ""div"" expression. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD11() { final XQuery query = new XQuery( ""(xs:date(\""1978-12-12Z\"") - xs:date(\""1978-12-12Z\"")) div xs:dayTimeDuration(\""P17DT10H02M\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""0"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-12 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator used * with a boolean expression and the ""fn:true"" function. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD12() { final XQuery query = new XQuery( ""fn:string((xs:date(\""1980-03-02Z\"") - xs:date(\""2001-09-11Z\""))) and (fn:true())"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(true) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-13 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator used * together with the numeric-equal-operator ""eq"". * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD13() { final XQuery query = new XQuery( ""fn:string((xs:date(\""1980-05-05Z\"") - xs:date(\""1981-12-03Z\""))) eq xs:string(xs:dayTimeDuration(\""P17DT10H02M\""))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(false) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-14 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator used * together with the numeric-equal operator ""ne"". * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD14() { final XQuery query = new XQuery( ""fn:string((xs:date(\""1979-12-12Z\"") - xs:date(\""1979-11-11Z\""))) ne xs:string(xs:dayTimeDuration(\""P17DT10H02M\""))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(true) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-15 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator used * together with the numeric-equal operator ""le"". * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD15() { final XQuery query = new XQuery( ""fn:string((xs:date(\""1978-12-12Z\"") - xs:date(\""1977-03-12Z\""))) le xs:string(xs:dayTimeDuration(\""P17DT10H02M\""))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(false) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-16 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator used * together with the numeric-equal operator ""ge"". * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD16() { final XQuery query = new XQuery( ""fn:string((xs:date(\""1977-12-12Z\"") - xs:date(\""1976-12-12Z\""))) ge xs:string(xs:dayTimeDuration(\""P17DT10H02M\""))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(true) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-17 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator * used as part of a boolean expression (and operator) and the ""fn:false"" function. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD17() { final XQuery query = new XQuery( ""fn:string(xs:date(\""2000-12-12Z\"") - xs:date(\""2000-11-11Z\"")) and fn:false()"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(false) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-18 * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator as * part of a boolean expression (or operator) and the ""fn:false"" function. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD18() { final XQuery query = new XQuery( ""fn:string((xs:date(\""1999-10-23Z\"") - xs:date(\""1998-09-09Z\""))) or fn:false()"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(true) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-19 * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator as * part of a multiplication expression * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD19() { final XQuery query = new XQuery( ""(xs:date(\""1999-10-23Z\"") - xs:date(\""1998-09-09Z\"")) * xs:decimal(2.0)"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""P818D"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-2 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator * as per example 2 (for this operator) from the F&O specs. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD2() { final XQuery query = new XQuery( ""xs:date(\""2000-10-30+05:00\"") - xs:date(\""1999-11-28Z\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""P336DT19H"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-20 * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator as * part of a addition expression * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD20() { final XQuery query = new XQuery( ""(xs:date(\""1999-10-23Z\"") - xs:date(\""1998-09-09Z\"")) + xs:dayTimeDuration(\""P17DT10H02M\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""P426DT10H2M"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-3 * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator as * per example 3 (for this operator) from the F&O specs. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD3() { final XQuery query = new XQuery( ""xs:date(\""2000-10-15-05:00\"") - xs:date(\""2000-10-10+02:00\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""P5DT7H"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-4 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The string value of ""subtract-dates-yielding-DTD"" * operator that return true and used together with fn:not. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD4() { final XQuery query = new XQuery( ""fn:not(fn:string(xs:date(\""1998-09-12Z\"") - xs:date(\""1998-09-21Z\"")))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(false) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-5 * Written By: Carmelo Montanez * Date: July 3, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator that * is used as an argument to the fn:boolean function. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD5() { final XQuery query = new XQuery( ""fn:boolean(fn:string(xs:date(\""1962-03-12Z\"") - xs:date(\""1962-03-12Z\"")))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(true) ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-6 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator that * is used as an argument to the fn:number function. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD6() { final XQuery query = new XQuery( ""fn:number(xs:date(\""1988-01-28Z\"") - xs:date(\""2001-03-02\""))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""NaN"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-7 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator used * as an argument to the ""fn:string"" function). * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD7() { final XQuery query = new XQuery( ""fn:string(xs:date(\""1989-07-05Z\"") - xs:date(\""1962-09-04Z\""))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""P9801D"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-8 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dayTimeDuration-from-date"" operator that * returns a negative value. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD8() { final XQuery query = new XQuery( ""xs:date(\""0001-01-01Z\"") - xs:date(\""2005-07-06Z\"")"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertStringValue(false, ""-P732132D"") ); } /** * * ******************************************************* * Test: op-subtract-dates-yielding-DTD-9 * Written By: Carmelo Montanez * Date: July 6, 2005 * Purpose: Evaluates The ""subtract-dates-yielding-DTD"" operator used * together with an ""and"" expression. * ******************************************************* * . */ @org.junit.Test public void opSubtractDatesYieldingDTD9() { final XQuery query = new XQuery( ""fn:string((xs:date(\""1993-12-09Z\"") - xs:date(\""1992-10-02Z\""))) and fn:string((xs:date(\""1993-12-09Z\"") - xs:date(\""1980-10-20Z\"")))"", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } test( assertBoolean(true) ); } } ",0 "a name=""generator"" content=""rustdoc""> gleam::gl::VertexAttrib2d - Rust

              Module gleam::gl::VertexAttrib2d [] [src]

              Functions

              is_loaded
              load_with
              ",0 " // https://github.com/jumartin/Calendar // // Copyright (c) 2014-2015 Julien Martin // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the ""Software""), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. // #import #import ""MGCDateRange.h"" @class MGCEventView; @protocol MGCMonthPlannerViewDataSource; @protocol MGCMonthPlannerViewDelegate; typedef NS_OPTIONS(NSUInteger, MGCMonthHeaderStyle) { MGCMonthHeaderStyleDefault = 0, MGCMonthHeaderStyleShort = 1 << 0, MGCMonthHeaderStyleHidden = 1 << 1 }; typedef NS_OPTIONS(NSUInteger, MGCMonthPlannerGridStyle) { MGCMonthPlannerGridStyleFill = 1 << 0, MGCMonthPlannerGridStyleVerticalLines = 1 << 1, MGCMonthPlannerGridStyleHorizontalLines = 1 << 2, MGCMonthPlannerGridStyleBottomDayLabel = 1 << 3, MGCMonthPlannerGridStyleDefault = (MGCMonthPlannerGridStyleHorizontalLines|MGCMonthPlannerGridStyleVerticalLines) }; typedef NS_ENUM(NSUInteger, MGCMonthPlannerStyle) { MGCMonthPlannerStyleEvents = 0, MGCMonthPlannerStyleDots = 1, MGCMonthPlannerStyleEmpty = 2 }; typedef NS_ENUM(NSUInteger, MGCMonthPlannerPagingMode) { MGCMonthPlannerPagingModeNone = 0, MGCMonthPlannerPagingModeHeaderTop = 1, MGCMonthPlannerPagingModeHeaderBottom = 2 }; typedef NS_ENUM(NSUInteger, MGCMonthPlannerScrollAlignment) { MGCMonthPlannerScrollAlignmentHeaderTop = 0, MGCMonthPlannerScrollAlignmentHeaderBottom = 1, MGCMonthPlannerScrollAlignmentWeekRow = 2 }; /*! * MGCMonthPlannerView is a view similar to the month view in the Calendar app on iOS. */ @interface MGCMonthPlannerView : UIView /*! @group Configuration and appearance customization */ /*! @abstract The calendar used for formatting the months and dates. @discussion The default value is the logical calendar for the current user (as returned by `[NSCalendar currentCalendar]`) */ @property (nonatomic) NSCalendar *calendar; /*! @abstract Returns the height of a row of days in the month planner view. @discussion The default value is 140. */ @property (nonatomic) CGFloat rowHeight; /*! @abstract Returns the height of the header showing days of week. @discussion The default value is 35. It can be set to 0 to hide the header. */ @property (nonatomic) CGFloat headerHeight; /*! @abstract Returns the height of the header in day cells which displays the date. @discussion The default value is 30. */ @property (nonatomic) CGFloat dayCellHeaderHeight; /*! @abstract The distance between each months and between the months and the edge of the view. */ @property (nonatomic) UIEdgeInsets monthInsets; /*! @abstract Returns the style for the months headers. @discussion If set to MGCMonthHeaderStyleDefault, the header displays the month name and the year. If set to MGCMonthHeaderStyleShort, the header only displays the month name. If set to MGCMonthHeaderStyleHidden, the header is hidden @discussion The alignment of the header changes depending on the value of the gridStyle property. @see gridStyle */ @property (nonatomic) MGCMonthHeaderStyle monthHeaderStyle; /*! @abstract Returns the style of the month planner view. @discussion If set to MGCMonthPlannerStyleEvents, the view displays events cells, similar to the month view in Apple's Calendar app on iPad. If set to MGCMonthPlannerStyleDots, the view only displays dots for days with events, similar to the month view in Apple's Calendar app on iPhone. If set to MGCMonthPlannerStyleEmpty, the view does not display events nor dots. @discussion The default value is MGCMonthPlannerStyleEvents on regular horizontal size, MGCMonthPlannerStyleDots otherwise. */ @property (nonatomic) MGCMonthPlannerStyle style; /*! @abstract Returns the color of the dot displayed when the month planner view style is set to MGCMonthPlannerStyleDots. */ @property (nonatomic) UIColor *eventsDotColor; /*! @abstract Returns the color of the dot displayed when the month planner view style is set to MGCMonthPlannerStyleDots & the day is selected */ @property (nonatomic) UIColor *eventsDaySelectedDotColor; /*! @abstract Returns the style of the months' background grid. @discussion If MGCMonthPlannerGridStyleFill is set, the view fills the grid for the first and last week of the month, and the month header, if displayed, is center-aligned. Otherwise, the grid covers only the days of the months, and the month header, if displayed, is aligned on the first day. */ @property (nonatomic) MGCMonthPlannerGridStyle gridStyle; /*! @abstract String format for dates displayed on top of day cells. @discussion If the value of this property is nil, a default format is used according to the current locale. @see NSDateFormatter dateFormat @see monthPlannerView:attributedStringForDayHeaderAtDate: delegate method */ @property (nonatomic, copy) NSString *dateFormat; /*! @abstract Returns the height of event cells. @discussion The default value is 16. */ @property (nonatomic) CGFloat itemHeight; /*! @abstract Background color for the whole calendar. @discussion The default color is white. */ @property (nonatomic, strong) UIColor *calendarBackgroundColor; /*! @abstract Background color for weekday cells. @discussion The default color is white. */ @property (nonatomic, strong) UIColor *weekDayBackgroundColor; /*! @abstract Background color for weekend day cells. @discussion The default color is light transparent gray. */ @property (nonatomic, strong) UIColor *weekendDayBackgroundColor; /*! @abstract Background color for selected day cell. @discussion The default color is none. */ @property (nonatomic, strong) UIColor *selectedDayBackgroundColor; /*! @abstract Text color for the weekday headers on the top of the view. @discussion The default color is black. */ @property (nonatomic, strong) UIColor *weekdaysLabelTextColor; /*! @abstract Font used for the weekday headers. */ @property (nonatomic, strong) UIFont *weekdaysLabelFont; /*! @abstract Array of strings displayed for the weekday headers. @discussion String at index 0 is for Sunday @discussion If set to nil, default weekday abbreviations are used (like Mon. or M for Monday, depending of the available size) */ @property (nonatomic, strong) NSArray *weekDaysStringArray; /*! @abstract Text color for the month headers. @discussion The default color is black. @see monthHeaderStyle */ @property (nonatomic, strong) UIColor *monthLabelTextColor; /*! @abstract Font used for the month headers. @discussion default is [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline] @see monthHeaderStyle */ @property (nonatomic, strong) UIFont *monthLabelFont; /*! @abstract Determines whether an event can be created with a long-press on the view. @discussion The default value is YES. This has no effect if the style property of the view is not set to MGCMonthPlannerStyleEvents. */ @property (nonatomic) BOOL canCreateEvents; /*! @abstract Determines whether an event can be moved around after a long-press on the view. @discussion The default value is YES. This has no effect if the style property of the view is not set to MGCMonthPlannerStyleEvents. */ @property (nonatomic) BOOL canMoveEvents; /*! @abstract The object that provides the data for the month planner view @discussion The data source must adopt the `MGCMonthPlannerViewDataSource` protocol. The month planner view view maintains a weak reference to the data source object. */ @property (nonatomic, weak) id dataSource; /*! @abstract The object acting as the delegate of the month planner View. @discussion The delegate must adopt the `MGCMonthPlannerViewDelegate` protocol. The Calendar View maintains a weak reference to the delegate object. */ @property (nonatomic, weak) id delegate; /*! @abstract Scrollable range of months. Default is nil, for 'infinite' scrolling. @discussion The range start date is set to the first day of the month, range end to the first day of the month followind end. @discussion If the currently visible month is outside the new range, the view scrolls to the range starting date. */ @property (nonatomic, copy) MGCDateRange *dateRange; @property (nonatomic, copy) NSDate *daySelected; /*! @group Creating event views */ /*! @abstract Registers a class for use in creating new event views for the month planner view. @param viewClass The class of the view that you want to use. @param identifier The reuse identifier to associate with the specified class. This parameter must not be nil and must not be an empty string. @discussion Prior to calling the dequeueReusableCellWithIdentifier:forEventAtIndex:date: method, you must use this method to tell the month planner how to create a new event view. */ - (void)registerClass:(Class)viewClass forEventCellReuseIdentifier:(NSString*)reuseIdentifier; /*! @abstract Returns a reusable event view object located by its identifier. @param identifier A string identifying the view object to be reused. This parameter must not be nil. @param index The index of the event. @param date The date of the event. @return A valid MGCEventView object. @discussion Call this method from your data source object when asked to provide a new event view for the month planner. This method dequeues an existing view if one is available or creates a new one based on the class you previously registered. @warning You must register a class using the registerClass:forEventCellReuseIdentifier: method before calling this method. */ - (MGCEventView*)dequeueReusableCellWithIdentifier:(NSString*)reuseIdentifier forEventAtIndex:(NSUInteger)index date:(NSDate*)date; /*! @group Scrolling and navigation */ /*! @abstract The paging style for the view. @discussion If set MGCMonthPlannerPagingModeNone, paging is disabled. If set to MGCMonthPlannerPagingModeHeaderBottom, scrolling stops below the header. If set to MGCMonthPlannerPagingModeHeaderTop, scrolling stops above the header. */ @property (nonatomic) MGCMonthPlannerPagingMode pagingMode; // deprecated: use scrollToDate:position:animated: instead - (void)scrollToDate:(NSDate*)date animated:(BOOL)animated; /*! @abstract Scrolls the view to make a given date visible. @param date The date to scroll into view. @param alignment If set to MGCMonthPlannerScrollAlignmentWeekRow, the top of the view is aligned with the week row for given date. If set to MGCMonthPlannerScrollAlignmentHeaderBottom, it is aligned with the first row of the month. If set to MGCMonthPlannerScrollAlignmentHeaderTop, it is aligned with the top of the month header. @param animated Specify YES to animate the scrolling behavior or NO to adjust the visible content immediately. @warning If `date` param is not in the scrollable range of dates, an exception is thrown. */ - (void)scrollToDate:(NSDate*)date alignment:(MGCMonthPlannerScrollAlignment)alignment animated:(BOOL)animated; /*! @group Locating days and events */ /*! @abstract Returns the date range of all visible days. @discussion Returns nil if no days are shown. */ @property (nonatomic, readonly) MGCDateRange *visibleDays; /*! @abstract Returns an array of all visible event views currently displayed by the month planner. @return An array of MGCEventView objects. If no event view is visible, this method returns an empty array. */ - (NSArray*)visibleEventCells; /*! @abstract Returns the visible event view with specified index and date. @param index The index of the event. @param date The date of the event. @return The event view or nil if the event view is not visible, or parameters are out of range. */ - (MGCEventView*)cellForEventAtIndex:(NSUInteger)index date:(NSDate*)date; /*! @abstract Returns the event view at the specified point in the month planner view. @param point A point in the month planner view’s coordinate system. @param date If not nil, it will contain on return the date of the event located at point. @param index If not nil, it will contain on return the index of the event located at point. @return The event view at the specified point, or nil if no event was found at the specified point. */ - (MGCEventView*)eventCellAtPoint:(CGPoint)pt date:(NSDate**)date index:(NSUInteger*)index; /*! @abstract Returns the date at the specified point in the month planner view. @param point A point in the month planner view’s coordinate system. @return The date at the specified point, or nil if the date can't be determined. */ - (NSDate*)dayAtPoint:(CGPoint)pt; /*! @group Reloading events */ /*! @abstract Reloads all events in the month planner view. @discussion The view discards any currently displayed visible event views and redisplays them. */ - (void)reloadEvents; /*! @abstract Reloads all events for given date. @param date The date for which to reload events. @discussion The view discards any currently displayed visible event views at date and redisplays them. */ - (void)reloadEventsAtDate:(NSDate*)date; /*! @abstract Reloads all events in given date range. @param range @discussion The view discards any currently displayed visible event views in the range and redisplays them. */ - (void)reloadEventsInRange:(MGCDateRange*)range; /*! @group Managing the selection */ /*! @abstract Determines whether users can select events in the month planner view. @discussion The default value is YES. For more control over the selection of items, you can provide a delegate object and implement the monthPlannerView:shouldSelectEventAtIndex:date: methods of the MGCMonthPlannerViewDelegate protocol. */ @property (nonatomic) BOOL allowsSelection; /*! @abstract Returns the date of the selected event, or nil if no event is selected. */ @property (nonatomic, readonly) NSDate *selectedEventDate; /*! @abstract Returns the index of the selected event at the date given by selectedEventDate. */ @property (nonatomic, readonly) NSUInteger selectedEventIndex; /*! @abstract Returns the event view for the current selection, or nil if no event is selected. */ @property (nonatomic, readonly) MGCEventView *selectedEventView; /*! @abstract Selects the visible event view at specified index and date. @param index The index of the event. @param date The date of the event. @discussion If the allowsSelection property is NO, calling this method has no effect. If there is an existing selection, calling this method replaces the previous selection. @discussion This method does not cause any selection-related delegate methods to be called. */ - (void)selectEventCellAtIndex:(NSUInteger)index date:(NSDate*)date; /*! @abstract Cancels current selection. @discussion If the allowsSelection property is NO, calling this method has no effect. @discussion This method does not cause any selection-related delegate methods to be called. */ - (void)deselectEvent; /*! @abstract Call this method to hide the interactive cell, after an existing event or a new one has been dragged around. */ - (void)endInteraction; @end ////////////////////////////////////////////////////////////////////////////////////////////// // MGCMonthPlannerViewDataSource /*! * An object that adopts the MGCMonthPlannerViewDataSource protocol is responsible for providing the data and views * required by a month planner view. */ @protocol MGCMonthPlannerViewDataSource @required /*! @abstract Asks the data source for the number of events at specified date. (required) */ - (NSInteger)monthPlannerView:(MGCMonthPlannerView*)view numberOfEventsAtDate:(NSDate*)date; /*! @abstract Asks the data source for the date range of the specified event in the month planner view. (required) */ - (MGCDateRange*)monthPlannerView:(MGCMonthPlannerView*)view dateRangeForEventAtIndex:(NSUInteger)index date:(NSDate*)date; /*! @abstract Asks the data source for the view that corresponds to the specified event in the month planner view. (required) */ - (MGCEventView*)monthPlannerView:(MGCMonthPlannerView*)view cellForEventAtIndex:(NSUInteger)index date:(NSDate*)date; @optional /*! @abstract Asks the data source for the view to be displayed when a new event is about to be created. @discussion If this method is not implemented by the data source, a standard event view will be used. */ - (MGCEventView*)monthPlannerView:(MGCMonthPlannerView *)view cellForNewEventAtDate:(NSDate*)date; /*! @abstract Asks the data source if the specified event can be moved around. If the method returns YES, the event view can be dragged and dropped to a different date. @discussion This method is not called if month planner view's canMoveEvents property is set to NO. */ - (BOOL)monthPlannerView:(MGCMonthPlannerView*)view canMoveCellForEventAtIndex:(NSUInteger)index date:(NSDate*)date; @end /*! * The MGCMonthPlannerViewDelegate protocol defines methods that allow you to manage the selection of events in * a month planner view and respond to operations like scrolling and changes in the display. * The methods of this protocol are all optional. */ @protocol MGCMonthPlannerViewDelegate @optional /*! @abstract Asks the delegate for the attributed string of the day header for given date. @param view The month planner view requesting the information. @param date The date for the header. @return The attributed string to draw. */ - (NSAttributedString*)monthPlannerView:(MGCMonthPlannerView*)view attributedStringForDayHeaderAtDate:(NSDate*)date; /*! @abstract Tells the delegate that the month planner view was scrolled. */ - (void)monthPlannerViewDidScroll:(MGCMonthPlannerView*)view; /*! @abstract Tells the delegate that a day cell was selected. @param view The month planner view object notifying about the selection change. @param date The date for the corresponding cell. */ - (void)monthPlannerView:(MGCMonthPlannerView*)view didSelectDayCellAtDate:(NSDate*)date; /*! @abstract Tells the delegate that a day cell was selected. @param view The month planner view object notifying about the selection change. @param date The date for the corresponding cell. */ - (void)monthPlannerView:(MGCMonthPlannerView*)view didShowCell:(MGCEventView*)cell forNewEventAtDate:(NSDate*)date; - (void)monthPlannerView:(MGCMonthPlannerView*)view willStartMovingEventAtIndex:(NSUInteger)index date:(NSDate*)date; - (void)monthPlannerView:(MGCMonthPlannerView*)view didMoveEventAtIndex:(NSUInteger)index date:(NSDate*)dateOld toDate:(NSDate*)dayNew; /*! @group Managing the selection of events */ /*! @abstract Asks the delegate if the specified event should be selected. @param view The month planner view object making the request. @param index The index of the event. @param date The day of the event. @return YES if the event should be selected or NO if it should not. @discussion The month planner view calls this method when the user tries to select an event. It does not call this method when you programmatically set the selection. @discussion If you do not implement this method, the default return value is YES. */ - (BOOL)monthPlannerView:(MGCMonthPlannerView*)view shouldSelectEventAtIndex:(NSUInteger)index date:(NSDate*)date; /*! @abstract Tells the delegate that the specified event was selected. @param view The month planner view object notifying about the selection change. @param index The index of the event. @param date The day of the event. @return YES if the event should be selected or NO if it should not. @discussion The month planner view calls this method when the user successfully selects an event. It does not call this method when you programmatically set the selection. */ - (void)monthPlannerView:(MGCMonthPlannerView*)view didSelectEventAtIndex:(NSUInteger)index date:(NSDate*)date; /*! @abstract Asks the delegate if the specified event should be deselected. @param view The month planner view object notifying about the selection change. @param index The index of the event. @param date The day of the event. @return YES if the event should be selected or NO if it should not. @discussion The month planner view calls this method when the user tries to deselect an already selected event. It does not call this method when you programmatically set the selection. */ - (BOOL)monthPlannerView:(MGCMonthPlannerView*)view shouldDeselectEventAtIndex:(NSUInteger)index date:(NSDate*)date; /*! @abstract Tells the delegate that the specified event was deselected. @param view The month planner view object notifying about the selection change. @param index The index of the event. @param date The day of the event. @return YES if the event should be selected or NO if it should not. @discussion This does not get called when you programmatically deselect an event with the deselectEvent method */ - (void)monthPlannerView:(MGCMonthPlannerView*)view didDeselectEventAtIndex:(NSUInteger)index date:(NSDate*)date; @end ",0 "lfotiadis.crossyscore.R; import com.michaelfotiadis.crossyscore.ui.core.common.viewholder.BaseViewHolder; import butterknife.Bind; public final class ListAvatarViewHolder extends BaseViewHolder { private static final int LAYOUT_ID = R.layout.list_item_single_image; @Bind(R.id.image) protected ImageView image; public ListAvatarViewHolder(final View view) { super(view); } public static int getLayoutId() { return LAYOUT_ID; } }",0 " import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.Timer; import org.squirrel.managers.PrisonerControllor; import org.squirrel.managers.inputManager; import org.squirrel.objects.Player; import org.squirrel.ui.Hud; import org.squirrel.world.World; public class Game extends JPanel implements ActionListener{ private static final long serialVersionUID = -8805039320208612585L; public static String name = JOptionPane.showInputDialog(null,""What is your name?"",""Welcome to Prison Survival"", JOptionPane.QUESTION_MESSAGE); Timer gameLoop; Player player; PrisonerControllor prict; Hud hud; World world1; public Game(){ setFocusable(true); gameLoop = new Timer(10, this); gameLoop.start(); player = new Player(300, 300); prict = new PrisonerControllor(); hud = new Hud(); world1 = new World(); addKeyListener(new inputManager(player)); } public void paint(Graphics g){ super.paint(g); Graphics2D g2d = (Graphics2D) g; //Camera int offsetMaxX = 1600 - 800; int offsetMaxY = 1200 - 600; int offsetMinX = 0; int offsetMinY = 0; int camX = player.getxPos() - 800 /2; int camY = player.getyPos() - 600 /2; //if (camX > offsetMaxX){ // camX = offsetMaxX; //} //else if (camX < offsetMinX){ // camX = offsetMinX; //} //if (camY > offsetMaxY){ // camY = offsetMaxY; //} //else if (camY < offsetMinY){ // camY = offsetMinY; //} g2d.translate(-camX, -camY); // Render everything world1.draw(g2d); hud.draw(g2d); prict.draw(g2d); player.draw(g2d); g.translate(camX, camY); } @Override public void actionPerformed(ActionEvent e) { try { player.update(); hud.update(); prict.update(); world1.update(); repaint(); } catch (Exception e1) { e1.printStackTrace(); } } } ",0 "Basic() { $backend = new PrincipalBackend\Mock(); $pc = new PrincipalCollection($backend); $this->assertTrue($pc instanceof PrincipalCollection); $this->assertEquals('principals', $pc->getName()); } /** * @depends testBasic */ public function testGetChildren() { $backend = new PrincipalBackend\Mock(); $pc = new PrincipalCollection($backend); $children = $pc->getChildren(); $this->assertTrue(is_array($children)); foreach ($children as $child) { $this->assertTrue($child instanceof IPrincipal); } } /** * @depends testBasic * @expectedException \Sabre\DAV\Exception\MethodNotAllowed */ public function testGetChildrenDisable() { $backend = new PrincipalBackend\Mock(); $pc = new PrincipalCollection($backend); $pc->disableListing = true; $children = $pc->getChildren(); } public function testFindByUri() { $backend = new PrincipalBackend\Mock(); $pc = new PrincipalCollection($backend); $this->assertEquals('principals/user1', $pc->findByUri('mailto:user1.sabredav@sabredav.org')); $this->assertNull($pc->findByUri('mailto:fake.user.sabredav@sabredav.org')); $this->assertNull($pc->findByUri('')); } } ",0 "ith or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THIS SOFTWARE IS PROVIDED ""AS IS"" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #define _XOPEN_SOURCE 500 #include #include #include #include #include ""lilv_internal.h"" static void lilv_node_set_numerics_from_string(LilvNode* val) { char* locale; char* endptr; switch (val->type) { case LILV_VALUE_URI: case LILV_VALUE_BLANK: case LILV_VALUE_STRING: break; case LILV_VALUE_INT: // FIXME: locale kludge, need a locale independent strtol locale = lilv_strdup(setlocale(LC_NUMERIC, NULL)); setlocale(LC_NUMERIC, ""POSIX""); val->val.int_val = strtol(val->str_val, &endptr, 10); setlocale(LC_NUMERIC, locale); free(locale); break; case LILV_VALUE_FLOAT: // FIXME: locale kludge, need a locale independent strtod locale = lilv_strdup(setlocale(LC_NUMERIC, NULL)); setlocale(LC_NUMERIC, ""POSIX""); val->val.float_val = strtod(val->str_val, &endptr); setlocale(LC_NUMERIC, locale); free(locale); break; case LILV_VALUE_BOOL: val->val.bool_val = (!strcmp(val->str_val, ""true"")); break; } } /** Note that if @a type is numeric or boolean, the returned value is corrupt * until lilv_node_set_numerics_from_string is called. It is not * automatically called from here to avoid overhead and imprecision when the * exact string value is known. */ LilvNode* lilv_node_new(LilvWorld* world, LilvNodeType type, const char* str) { LilvNode* val = malloc(sizeof(struct LilvNodeImpl)); val->world = world; val->type = type; switch (type) { case LILV_VALUE_URI: val->val.uri_val = sord_new_uri(world->world, (const uint8_t*)str); val->str_val = (char*)sord_node_get_string(val->val.uri_val); break; case LILV_VALUE_BLANK: val->val.uri_val = sord_new_blank(world->world, (const uint8_t*)str); val->str_val = (char*)sord_node_get_string(val->val.uri_val); case LILV_VALUE_STRING: case LILV_VALUE_INT: case LILV_VALUE_FLOAT: case LILV_VALUE_BOOL: val->str_val = lilv_strdup(str); break; } return val; } /** Create a new LilvNode from @a node, or return NULL if impossible */ LilvNode* lilv_node_new_from_node(LilvWorld* world, const SordNode* node) { LilvNode* result = NULL; SordNode* datatype_uri = NULL; LilvNodeType type = LILV_VALUE_STRING; switch (sord_node_get_type(node)) { case SORD_URI: result = malloc(sizeof(struct LilvNodeImpl)); result->world = (LilvWorld*)world; result->type = LILV_VALUE_URI; result->val.uri_val = sord_node_copy(node); result->str_val = (char*)sord_node_get_string(result->val.uri_val); break; case SORD_BLANK: result = malloc(sizeof(struct LilvNodeImpl)); result->world = (LilvWorld*)world; result->type = LILV_VALUE_BLANK; result->val.uri_val = sord_node_copy(node); result->str_val = (char*)sord_node_get_string(result->val.uri_val); break; case SORD_LITERAL: datatype_uri = sord_node_get_datatype(node); if (datatype_uri) { if (sord_node_equals(datatype_uri, world->xsd_boolean_node)) type = LILV_VALUE_BOOL; else if (sord_node_equals(datatype_uri, world->xsd_decimal_node) || sord_node_equals(datatype_uri, world->xsd_double_node)) type = LILV_VALUE_FLOAT; else if (sord_node_equals(datatype_uri, world->xsd_integer_node)) type = LILV_VALUE_INT; else LILV_ERRORF(""Unknown datatype `%s'\n"", sord_node_get_string(datatype_uri)); } result = lilv_node_new(world, type, (const char*)sord_node_get_string(node)); switch (result->type) { case LILV_VALUE_INT: case LILV_VALUE_FLOAT: case LILV_VALUE_BOOL: lilv_node_set_numerics_from_string(result); default: break; } break; default: assert(false); } return result; } LILV_API LilvNode* lilv_new_uri(LilvWorld* world, const char* uri) { return lilv_node_new(world, LILV_VALUE_URI, uri); } LILV_API LilvNode* lilv_new_string(LilvWorld* world, const char* str) { return lilv_node_new(world, LILV_VALUE_STRING, str); } LILV_API LilvNode* lilv_new_int(LilvWorld* world, int val) { char str[32]; snprintf(str, sizeof(str), ""%d"", val); LilvNode* ret = lilv_node_new(world, LILV_VALUE_INT, str); ret->val.int_val = val; return ret; } LILV_API LilvNode* lilv_new_float(LilvWorld* world, float val) { char str[32]; snprintf(str, sizeof(str), ""%f"", val); LilvNode* ret = lilv_node_new(world, LILV_VALUE_FLOAT, str); ret->val.float_val = val; return ret; } LILV_API LilvNode* lilv_new_bool(LilvWorld* world, bool val) { LilvNode* ret = lilv_node_new(world, LILV_VALUE_BOOL, val ? ""true"" : ""false""); ret->val.bool_val = val; return ret; } LILV_API LilvNode* lilv_node_duplicate(const LilvNode* val) { if (val == NULL) return NULL; LilvNode* result = malloc(sizeof(struct LilvNodeImpl)); result->world = val->world; result->type = val->type; switch (val->type) { case LILV_VALUE_URI: case LILV_VALUE_BLANK: result->val.uri_val = sord_node_copy(val->val.uri_val); result->str_val = (char*)sord_node_get_string(result->val.uri_val); break; default: result->str_val = lilv_strdup(val->str_val); result->val = val->val; } return result; } LILV_API void lilv_node_free(LilvNode* val) { if (val) { switch (val->type) { case LILV_VALUE_URI: case LILV_VALUE_BLANK: sord_node_free(val->world->world, val->val.uri_val); break; default: free(val->str_val); } free(val); } } LILV_API bool lilv_node_equals(const LilvNode* value, const LilvNode* other) { if (value == NULL && other == NULL) return true; else if (value == NULL || other == NULL) return false; else if (value->type != other->type) return false; switch (value->type) { case LILV_VALUE_URI: return sord_node_equals(value->val.uri_val, other->val.uri_val); case LILV_VALUE_BLANK: case LILV_VALUE_STRING: return !strcmp(value->str_val, other->str_val); case LILV_VALUE_INT: return (value->val.int_val == other->val.int_val); case LILV_VALUE_FLOAT: return (value->val.float_val == other->val.float_val); case LILV_VALUE_BOOL: return (value->val.bool_val == other->val.bool_val); } return false; /* shouldn't get here */ } LILV_API char* lilv_node_get_turtle_token(const LilvNode* value) { size_t len = 0; char* result = NULL; char* locale = NULL; switch (value->type) { case LILV_VALUE_URI: len = strlen(value->str_val) + 3; result = calloc(len, 1); snprintf(result, len, ""<%s>"", value->str_val); break; case LILV_VALUE_BLANK: len = strlen(value->str_val) + 3; result = calloc(len, 1); snprintf(result, len, ""_:%s"", value->str_val); break; case LILV_VALUE_STRING: case LILV_VALUE_BOOL: result = lilv_strdup(value->str_val); break; case LILV_VALUE_INT: // INT64_MAX is 9223372036854775807 (19 digits) + 1 for sign // FIXME: locale kludge, need a locale independent snprintf locale = lilv_strdup(setlocale(LC_NUMERIC, NULL)); len = 20; result = calloc(len, 1); setlocale(LC_NUMERIC, ""POSIX""); snprintf(result, len, ""%d"", value->val.int_val); setlocale(LC_NUMERIC, locale); break; case LILV_VALUE_FLOAT: // FIXME: locale kludge, need a locale independent snprintf locale = lilv_strdup(setlocale(LC_NUMERIC, NULL)); len = 20; // FIXME: proper maximum value? result = calloc(len, 1); setlocale(LC_NUMERIC, ""POSIX""); snprintf(result, len, ""%f"", value->val.float_val); setlocale(LC_NUMERIC, locale); break; } free(locale); return result; } LILV_API bool lilv_node_is_uri(const LilvNode* value) { return (value && value->type == LILV_VALUE_URI); } LILV_API const char* lilv_node_as_uri(const LilvNode* value) { assert(lilv_node_is_uri(value)); return value->str_val; } const SordNode* lilv_node_as_node(const LilvNode* value) { assert(lilv_node_is_uri(value)); return value->val.uri_val; } LILV_API bool lilv_node_is_blank(const LilvNode* value) { return (value && value->type == LILV_VALUE_BLANK); } LILV_API const char* lilv_node_as_blank(const LilvNode* value) { assert(lilv_node_is_blank(value)); return value->str_val; } LILV_API bool lilv_node_is_literal(const LilvNode* value) { if (!value) return false; switch (value->type) { case LILV_VALUE_STRING: case LILV_VALUE_INT: case LILV_VALUE_FLOAT: return true; default: return false; } } LILV_API bool lilv_node_is_string(const LilvNode* value) { return (value && value->type == LILV_VALUE_STRING); } LILV_API const char* lilv_node_as_string(const LilvNode* value) { return value->str_val; } LILV_API bool lilv_node_is_int(const LilvNode* value) { return (value && value->type == LILV_VALUE_INT); } LILV_API int lilv_node_as_int(const LilvNode* value) { assert(value); assert(lilv_node_is_int(value)); return value->val.int_val; } LILV_API bool lilv_node_is_float(const LilvNode* value) { return (value && value->type == LILV_VALUE_FLOAT); } LILV_API float lilv_node_as_float(const LilvNode* value) { assert(lilv_node_is_float(value) || lilv_node_is_int(value)); if (lilv_node_is_float(value)) return value->val.float_val; else // lilv_node_is_int(value) return (float)value->val.int_val; } LILV_API bool lilv_node_is_bool(const LilvNode* value) { return (value && value->type == LILV_VALUE_BOOL); } LILV_API bool lilv_node_as_bool(const LilvNode* value) { assert(value); assert(lilv_node_is_bool(value)); return value->val.bool_val; } ",0 ".h"" #include #include #include int qedi_do_not_recover; static struct dentry *qedi_dbg_root; void qedi_dbg_host_init(struct qedi_dbg_ctx *qedi, const struct qedi_debugfs_ops *dops, const struct file_operations *fops) { char host_dirname[32]; sprintf(host_dirname, ""host%u"", qedi->host_no); qedi->bdf_dentry = debugfs_create_dir(host_dirname, qedi_dbg_root); while (dops) { if (!(dops->name)) break; debugfs_create_file(dops->name, 0600, qedi->bdf_dentry, qedi, fops); dops++; fops++; } } void qedi_dbg_host_exit(struct qedi_dbg_ctx *qedi) { debugfs_remove_recursive(qedi->bdf_dentry); qedi->bdf_dentry = NULL; } void qedi_dbg_init(char *drv_name) { qedi_dbg_root = debugfs_create_dir(drv_name, NULL); } void qedi_dbg_exit(void) { debugfs_remove_recursive(qedi_dbg_root); qedi_dbg_root = NULL; } static ssize_t qedi_dbg_do_not_recover_enable(struct qedi_dbg_ctx *qedi_dbg) { if (!qedi_do_not_recover) qedi_do_not_recover = 1; QEDI_INFO(qedi_dbg, QEDI_LOG_DEBUGFS, ""do_not_recover=%d\n"", qedi_do_not_recover); return 0; } static ssize_t qedi_dbg_do_not_recover_disable(struct qedi_dbg_ctx *qedi_dbg) { if (qedi_do_not_recover) qedi_do_not_recover = 0; QEDI_INFO(qedi_dbg, QEDI_LOG_DEBUGFS, ""do_not_recover=%d\n"", qedi_do_not_recover); return 0; } static struct qedi_list_of_funcs qedi_dbg_do_not_recover_ops[] = { { ""enable"", qedi_dbg_do_not_recover_enable }, { ""disable"", qedi_dbg_do_not_recover_disable }, { NULL, NULL } }; const struct qedi_debugfs_ops qedi_debugfs_ops[] = { { ""gbl_ctx"", NULL }, { ""do_not_recover"", qedi_dbg_do_not_recover_ops}, { ""io_trace"", NULL }, { NULL, NULL } }; static ssize_t qedi_dbg_do_not_recover_cmd_write(struct file *filp, const char __user *buffer, size_t count, loff_t *ppos) { size_t cnt = 0; struct qedi_dbg_ctx *qedi_dbg = (struct qedi_dbg_ctx *)filp->private_data; struct qedi_list_of_funcs *lof = qedi_dbg_do_not_recover_ops; if (*ppos) return 0; while (lof) { if (!(lof->oper_str)) break; if (!strncmp(lof->oper_str, buffer, strlen(lof->oper_str))) { cnt = lof->oper_func(qedi_dbg); break; } lof++; } return (count - cnt); } static ssize_t qedi_dbg_do_not_recover_cmd_read(struct file *filp, char __user *buffer, size_t count, loff_t *ppos) { size_t cnt = 0; if (*ppos) return 0; cnt = sprintf(buffer, ""do_not_recover=%d\n"", qedi_do_not_recover); cnt = min_t(int, count, cnt - *ppos); *ppos += cnt; return cnt; } static int qedi_gbl_ctx_show(struct seq_file *s, void *unused) { struct qedi_fastpath *fp = NULL; struct qed_sb_info *sb_info = NULL; struct status_block_e4 *sb = NULL; struct global_queue *que = NULL; int id; u16 prod_idx; struct qedi_ctx *qedi = s->private; unsigned long flags; seq_puts(s, "" DUMP CQ CONTEXT:\n""); for (id = 0; id < MIN_NUM_CPUS_MSIX(qedi); id++) { spin_lock_irqsave(&qedi->hba_lock, flags); seq_printf(s, ""=========FAST CQ PATH [%d] ==========\n"", id); fp = &qedi->fp_array[id]; sb_info = fp->sb_info; sb = sb_info->sb_virt; prod_idx = (sb->pi_array[QEDI_PROTO_CQ_PROD_IDX] & STATUS_BLOCK_E4_PROD_INDEX_MASK); seq_printf(s, ""SB PROD IDX: %d\n"", prod_idx); que = qedi->global_queues[fp->sb_id]; seq_printf(s, ""DRV CONS IDX: %d\n"", que->cq_cons_idx); seq_printf(s, ""CQ complete host memory: %d\n"", fp->sb_id); seq_puts(s, ""=========== END ==================\n\n\n""); spin_unlock_irqrestore(&qedi->hba_lock, flags); } return 0; } static int qedi_dbg_gbl_ctx_open(struct inode *inode, struct file *file) { struct qedi_dbg_ctx *qedi_dbg = inode->i_private; struct qedi_ctx *qedi = container_of(qedi_dbg, struct qedi_ctx, dbg_ctx); return single_open(file, qedi_gbl_ctx_show, qedi); } static int qedi_io_trace_show(struct seq_file *s, void *unused) { int id, idx = 0; struct qedi_ctx *qedi = s->private; struct qedi_io_log *io_log; unsigned long flags; seq_puts(s, "" DUMP IO LOGS:\n""); spin_lock_irqsave(&qedi->io_trace_lock, flags); idx = qedi->io_trace_idx; for (id = 0; id < QEDI_IO_TRACE_SIZE; id++) { io_log = &qedi->io_trace_buf[idx]; seq_printf(s, ""iodir-%d:"", io_log->direction); seq_printf(s, ""tid-0x%x:"", io_log->task_id); seq_printf(s, ""cid-0x%x:"", io_log->cid); seq_printf(s, ""lun-%d:"", io_log->lun); seq_printf(s, ""op-0x%02x:"", io_log->op); seq_printf(s, ""0x%02x%02x%02x%02x:"", io_log->lba[0], io_log->lba[1], io_log->lba[2], io_log->lba[3]); seq_printf(s, ""buflen-%d:"", io_log->bufflen); seq_printf(s, ""sgcnt-%d:"", io_log->sg_count); seq_printf(s, ""res-0x%08x:"", io_log->result); seq_printf(s, ""jif-%lu:"", io_log->jiffies); seq_printf(s, ""blk_req_cpu-%d:"", io_log->blk_req_cpu); seq_printf(s, ""req_cpu-%d:"", io_log->req_cpu); seq_printf(s, ""intr_cpu-%d:"", io_log->intr_cpu); seq_printf(s, ""blk_rsp_cpu-%d\n"", io_log->blk_rsp_cpu); idx++; if (idx == QEDI_IO_TRACE_SIZE) idx = 0; } spin_unlock_irqrestore(&qedi->io_trace_lock, flags); return 0; } static int qedi_dbg_io_trace_open(struct inode *inode, struct file *file) { struct qedi_dbg_ctx *qedi_dbg = inode->i_private; struct qedi_ctx *qedi = container_of(qedi_dbg, struct qedi_ctx, dbg_ctx); return single_open(file, qedi_io_trace_show, qedi); } const struct file_operations qedi_dbg_fops[] = { qedi_dbg_fileops_seq(qedi, gbl_ctx), qedi_dbg_fileops(qedi, do_not_recover), qedi_dbg_fileops_seq(qedi, io_trace), { }, }; ",0 " * @property integer $firm_id * @property integer $profession_id * @property string $salary * @property string $note * @property integer $workplace_id * @property integer $rec_status_id * @property integer $user_id * @property string $dc * * @property Resume[] $resumes * @property Profession $profession * @property Workplace $workplace * @property User $user * @property RecStatus $recStatus * @property Firm $firm */ class Vacancy extends \yii\db\ActiveRecord { /** * @inheritdoc */ public static function tableName() { return '{{%vacancy}}'; } /** * @inheritdoc */ public function rules() { return [ [['note', 'date'], 'filter', 'filter' => 'trim'], [['note', 'date', 'user_id'], 'default'], [['rec_status_id'], 'default', 'value' => 1], [['user_id'], 'default', 'value' => Yii::$app->user->id], [['date'], 'default', 'value' => Yii::$app->formatter->asDate(time())], [['firm_id', 'profession_id', 'workplace_id'], 'required'], [['date'], 'date', 'format' => 'dd.mm.yyyy'], [['note'], 'string'], [['firm_id', 'profession_id', 'workplace_id', 'rec_status_id', 'user_id'], 'integer'], [['dc'], 'safe'], [['salary'], 'number'], ]; } /** * @inheritdoc */ public function beforeSave($insert) { if (parent::beforeSave($insert)) { $this->date = $this->date ? Yii::$app->formatter->asDate($this->date,'php:Y-m-d') : null; return true; } else { return false; } } /** * @inheritdoc */ public function afterFind() { $this->date = $this->date ? Yii::$app->formatter->asDate($this->date) : null; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => Yii::t('app', 'ID'), 'date' => Yii::t('app', 'Дата'), 'firm_id' => Yii::t('app', 'Фирма-работодатель'), 'profession_id' => Yii::t('app', 'Должность'), 'salary' => Yii::t('app', 'Зарплата'), 'note' => Yii::t('app', 'Описание'), 'workplace_id' => Yii::t('app', 'Рабочее место'), 'rec_status_id' => Yii::t('app', 'Состояние записи'), 'user_id' => Yii::t('app', 'Кем добавлена запись'), 'dc' => Yii::t('app', 'Когда добавлена запись'), ]; } /** * @return \yii\db\ActiveQuery */ public function getResumes() { return $this->hasMany(Resume::className(), ['vacancy_id' => 'id']); } /** * @return \yii\db\ActiveQuery */ public function getProfession() { return $this->hasOne(Profession::className(), ['id' => 'profession_id']); } /** * @return \yii\db\ActiveQuery */ public function getWorkplace() { return $this->hasOne(Workplace::className(), ['id' => 'workplace_id']); } /** * @return \yii\db\ActiveQuery */ public function getUser() { return $this->hasOne(User::className(), ['id' => 'user_id']); } /** * @return \yii\db\ActiveQuery */ public function getRecStatus() { return $this->hasOne(RecStatus::className(), ['id' => 'rec_status_id']); } /** * @return \yii\db\ActiveQuery */ public function getFirm() { return $this->hasOne(Firm::className(), ['id' => 'firm_id']); } /** * @inheritdoc * @return \app\models\queries\VacancyQuery the active query used by this AR class. */ public static function find() { return new \app\models\queries\VacancyQuery(get_called_class()); } } ",0 "32814"">

              You are currently offline.

              ",0 "\StoreBundle\Form\ProductType; class DefaultController extends Controller { public function indexAction() { // just setup a fresh $product object (no dummy data) $product = new Product(); $form = $this->get('form.factory')->create(new ProductType(), $product); $request = $this->get('request'); if ($request->getMethod() == 'POST') { $form->bindRequest($request); if ($form->isValid()) { // perform some action, such as save the object to the database return $this->redirect($this->generateUrl('store_product_success')); } } return $this->render('AcmeStoreBundle:Default:index.html.twig', array( 'form' => $form->createView(), )); } public function successAction() { return $this->render('AcmeStoreBundle:Default:success.html.twig'); } } ",0 "atic $COUNT_ATTR = ""count""; function render($attr, $inner_content = null, $code = """") { $default_attr = array( Inc_Testimonials_Carousel::$POST_ID_ATTR => '', Inc_Testimonials_Carousel::$COUNT_ATTR => '3', Inc_Carousel_Settings::$CS_AUTO_ATTR => '5',); extract(shortcode_atts($default_attr, $attr)); $content = ''; if (empty($post_id)) { if (isset($inner_content) && !empty($inner_content)) { $inner_content = str_replace(""[bq"", ""
            3. [bq"", $inner_content); $inner_content = str_replace(""[/bq]"", ""[/bq]
            4. "", $inner_content); $inner_content = do_shortcode($this->prepare_content($inner_content)); } } else { $inner_content = ''; $post = Post_Util::get_post_by_id($post_id); if ($post) { $count = empty($count) ? 9999 : intval($count); $shortcodes = Post_Util::get_all_shortcodes_of_type('bq', $post); if (count($shortcodes) > 0) { $i = 0; foreach ($shortcodes as $sc) { if ($i < $count) { $inner_content .= '
            5. ' . do_shortcode($sc) . '
            6. '; } $i++; } } } else { return $this->get_error(""No post find with the ID: "" . $post_id); } } if (isset($inner_content) && !empty($inner_content)) { $id = uniqid('tc-'); $content .= ""
                $inner_content
              ""; $carousel_setting = new Inc_Carousel_Settings('#' . $id, $attr, $default_attr); $content .= $carousel_setting->get_carousel_settings(); } return $content; } function get_names() { return array('testimonials_carousel'); } function get_visual_editor_form() { $content = '
              '; $content .= '
              '; $content .= '

              ' . __('Insert the page ID which contains the testimonials', INCEPTIO_THEME_NAME) . '

              '; $content .= '
              '; $content .= ''; $content .= ''; $content .= '
              '; $content .= '
              '; $content .= ''; $content .= ''; $content .= '
              '; $content .= '
              '; $content .= ''; $content .= '
              '; $content .= '
              '; $content .= '
              '; return $content; } function get_group_title() { return __('Dynamic Elements', INCEPTIO_THEME_NAME); } function get_title() { return __('Testimonials Carousel', INCEPTIO_THEME_NAME); } } ",0 " under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * Copyright 2013 IBM Corporation * Author: Mahesh Salgaonkar */ #undef DEBUG #define pr_fmt(fmt) ""mce_power: "" fmt #include #include #include #include #include static void flush_tlb_206(unsigned int num_sets, unsigned int action) { unsigned long rb; unsigned int i; switch (action) { case TLB_INVAL_SCOPE_GLOBAL: rb = TLBIEL_INVAL_SET; break; case TLB_INVAL_SCOPE_LPID: rb = TLBIEL_INVAL_SET_LPID; break; default: BUG(); break; } asm volatile(""ptesync"" : : : ""memory""); for (i = 0; i < num_sets; i++) { asm volatile(""tlbiel %0"" : : ""r"" (rb)); rb += 1 << TLBIEL_INVAL_SET_SHIFT; } asm volatile(""ptesync"" : : : ""memory""); } /* * Generic routines to flush TLB on POWER processors. These routines * are used as flush_tlb hook in the cpu_spec. * * action => TLB_INVAL_SCOPE_GLOBAL: Invalidate all TLBs. * TLB_INVAL_SCOPE_LPID: Invalidate TLB for current LPID. */ void __flush_tlb_power7(unsigned int action) { flush_tlb_206(POWER7_TLB_SETS, action); } void __flush_tlb_power8(unsigned int action) { flush_tlb_206(POWER8_TLB_SETS, action); } void __flush_tlb_power9(unsigned int action) { unsigned int num_sets; if (radix_enabled()) num_sets = POWER9_TLB_SETS_RADIX; else num_sets = POWER9_TLB_SETS_HASH; flush_tlb_206(num_sets, action); } /* flush SLBs and reload */ #ifdef CONFIG_PPC_STD_MMU_64 static void flush_and_reload_slb(void) { struct slb_shadow *slb; unsigned long i, n; /* Invalidate all SLBs */ asm volatile(""slbmte %0,%0; slbia"" : : ""r"" (0)); #ifdef CONFIG_KVM_BOOK3S_HANDLER /* * If machine check is hit when in guest or in transition, we will * only flush the SLBs and continue. */ if (get_paca()->kvm_hstate.in_guest) return; #endif /* For host kernel, reload the SLBs from shadow SLB buffer. */ slb = get_slb_shadow(); if (!slb) return; n = min_t(u32, be32_to_cpu(slb->persistent), SLB_MIN_SIZE); /* Load up the SLB entries from shadow SLB */ for (i = 0; i < n; i++) { unsigned long rb = be64_to_cpu(slb->save_area[i].esid); unsigned long rs = be64_to_cpu(slb->save_area[i].vsid); rb = (rb & ~0xFFFul) | i; asm volatile(""slbmte %0,%1"" : : ""r"" (rs), ""r"" (rb)); } } #endif static void flush_erat(void) { asm volatile(PPC_INVALIDATE_ERAT : : :""memory""); } #define MCE_FLUSH_SLB 1 #define MCE_FLUSH_TLB 2 #define MCE_FLUSH_ERAT 3 static int mce_flush(int what) { #ifdef CONFIG_PPC_STD_MMU_64 if (what == MCE_FLUSH_SLB) { flush_and_reload_slb(); return 1; } #endif if (what == MCE_FLUSH_ERAT) { flush_erat(); return 1; } if (what == MCE_FLUSH_TLB) { if (cur_cpu_spec && cur_cpu_spec->flush_tlb) { cur_cpu_spec->flush_tlb(TLB_INVAL_SCOPE_GLOBAL); return 1; } } return 0; } #define SRR1_MC_LOADSTORE(srr1) ((srr1) & PPC_BIT(42)) struct mce_ierror_table { unsigned long srr1_mask; unsigned long srr1_value; bool nip_valid; /* nip is a valid indicator of faulting address */ unsigned int error_type; unsigned int error_subtype; unsigned int initiator; unsigned int severity; }; static const struct mce_ierror_table mce_p7_ierror_table[] = { { 0x00000000001c0000, 0x0000000000040000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000001c0000, 0x0000000000080000, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_PARITY, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000001c0000, 0x00000000000c0000, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000001c0000, 0x0000000000100000, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_INDETERMINATE, /* BOTH */ MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000001c0000, 0x0000000000140000, true, MCE_ERROR_TYPE_TLB, MCE_TLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000001c0000, 0x0000000000180000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_PAGE_TABLE_WALK_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000001c0000, 0x00000000001c0000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0, 0, 0, 0, 0, 0 } }; static const struct mce_ierror_table mce_p8_ierror_table[] = { { 0x00000000081c0000, 0x0000000000040000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000000080000, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_PARITY, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x00000000000c0000, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000000100000, true, MCE_ERROR_TYPE_ERAT,MCE_ERAT_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000000140000, true, MCE_ERROR_TYPE_TLB, MCE_TLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000000180000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_PAGE_TABLE_WALK_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x00000000001c0000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000008000000, true, MCE_ERROR_TYPE_LINK,MCE_LINK_ERROR_IFETCH_TIMEOUT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000008040000, true, MCE_ERROR_TYPE_LINK,MCE_LINK_ERROR_PAGE_TABLE_WALK_IFETCH_TIMEOUT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0, 0, 0, 0, 0, 0 } }; static const struct mce_ierror_table mce_p9_ierror_table[] = { { 0x00000000081c0000, 0x0000000000040000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000000080000, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_PARITY, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x00000000000c0000, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000000100000, true, MCE_ERROR_TYPE_ERAT,MCE_ERAT_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000000140000, true, MCE_ERROR_TYPE_TLB, MCE_TLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000000180000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_PAGE_TABLE_WALK_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000008000000, true, MCE_ERROR_TYPE_LINK,MCE_LINK_ERROR_IFETCH_TIMEOUT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000008040000, true, MCE_ERROR_TYPE_LINK,MCE_LINK_ERROR_PAGE_TABLE_WALK_IFETCH_TIMEOUT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x00000000080c0000, true, MCE_ERROR_TYPE_RA, MCE_RA_ERROR_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000008100000, true, MCE_ERROR_TYPE_RA, MCE_RA_ERROR_PAGE_TABLE_WALK_IFETCH, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000000081c0000, 0x0000000008140000, false, MCE_ERROR_TYPE_RA, MCE_RA_ERROR_STORE, MCE_INITIATOR_CPU, MCE_SEV_FATAL, }, /* ASYNC is fatal */ { 0x00000000081c0000, 0x0000000008180000, false, MCE_ERROR_TYPE_LINK,MCE_LINK_ERROR_STORE_TIMEOUT, MCE_INITIATOR_CPU, MCE_SEV_FATAL, }, /* ASYNC is fatal */ { 0x00000000081c0000, 0x00000000081c0000, true, MCE_ERROR_TYPE_RA, MCE_RA_ERROR_PAGE_TABLE_WALK_IFETCH_FOREIGN, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0, 0, 0, 0, 0, 0 } }; struct mce_derror_table { unsigned long dsisr_value; bool dar_valid; /* dar is a valid indicator of faulting address */ unsigned int error_type; unsigned int error_subtype; unsigned int initiator; unsigned int severity; }; static const struct mce_derror_table mce_p7_derror_table[] = { { 0x00008000, false, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_LOAD_STORE, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00004000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_PAGE_TABLE_WALK_LOAD_STORE, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000800, true, MCE_ERROR_TYPE_ERAT, MCE_ERAT_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000400, true, MCE_ERROR_TYPE_TLB, MCE_TLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000100, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_PARITY, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000080, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000040, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_INDETERMINATE, /* BOTH */ MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0, false, 0, 0, 0, 0 } }; static const struct mce_derror_table mce_p8_derror_table[] = { { 0x00008000, false, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_LOAD_STORE, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00004000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_PAGE_TABLE_WALK_LOAD_STORE, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00002000, true, MCE_ERROR_TYPE_LINK, MCE_LINK_ERROR_LOAD_TIMEOUT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00001000, true, MCE_ERROR_TYPE_LINK, MCE_LINK_ERROR_PAGE_TABLE_WALK_LOAD_STORE_TIMEOUT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000800, true, MCE_ERROR_TYPE_ERAT, MCE_ERAT_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000400, true, MCE_ERROR_TYPE_TLB, MCE_TLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000200, true, MCE_ERROR_TYPE_ERAT, MCE_ERAT_ERROR_MULTIHIT, /* SECONDARY ERAT */ MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000100, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_PARITY, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000080, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0, false, 0, 0, 0, 0 } }; static const struct mce_derror_table mce_p9_derror_table[] = { { 0x00008000, false, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_LOAD_STORE, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00004000, true, MCE_ERROR_TYPE_UE, MCE_UE_ERROR_PAGE_TABLE_WALK_LOAD_STORE, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00002000, true, MCE_ERROR_TYPE_LINK, MCE_LINK_ERROR_LOAD_TIMEOUT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00001000, true, MCE_ERROR_TYPE_LINK, MCE_LINK_ERROR_PAGE_TABLE_WALK_LOAD_STORE_TIMEOUT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000800, true, MCE_ERROR_TYPE_ERAT, MCE_ERAT_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000400, true, MCE_ERROR_TYPE_TLB, MCE_TLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000200, false, MCE_ERROR_TYPE_USER, MCE_USER_ERROR_TLBIE, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000100, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_PARITY, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000080, true, MCE_ERROR_TYPE_SLB, MCE_SLB_ERROR_MULTIHIT, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000040, true, MCE_ERROR_TYPE_RA, MCE_RA_ERROR_LOAD, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000020, false, MCE_ERROR_TYPE_RA, MCE_RA_ERROR_PAGE_TABLE_WALK_LOAD_STORE, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000010, false, MCE_ERROR_TYPE_RA, MCE_RA_ERROR_PAGE_TABLE_WALK_LOAD_STORE_FOREIGN, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0x00000008, false, MCE_ERROR_TYPE_RA, MCE_RA_ERROR_LOAD_STORE_FOREIGN, MCE_INITIATOR_CPU, MCE_SEV_ERROR_SYNC, }, { 0, false, 0, 0, 0, 0 } }; static int mce_handle_ierror(struct pt_regs *regs, const struct mce_ierror_table table[], struct mce_error_info *mce_err, uint64_t *addr) { uint64_t srr1 = regs->msr; int handled = 0; int i; *addr = 0; for (i = 0; table[i].srr1_mask; i++) { if ((srr1 & table[i].srr1_mask) != table[i].srr1_value) continue; /* attempt to correct the error */ switch (table[i].error_type) { case MCE_ERROR_TYPE_SLB: handled = mce_flush(MCE_FLUSH_SLB); break; case MCE_ERROR_TYPE_ERAT: handled = mce_flush(MCE_FLUSH_ERAT); break; case MCE_ERROR_TYPE_TLB: handled = mce_flush(MCE_FLUSH_TLB); break; } /* now fill in mce_error_info */ mce_err->error_type = table[i].error_type; switch (table[i].error_type) { case MCE_ERROR_TYPE_UE: mce_err->u.ue_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_SLB: mce_err->u.slb_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_ERAT: mce_err->u.erat_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_TLB: mce_err->u.tlb_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_USER: mce_err->u.user_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_RA: mce_err->u.ra_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_LINK: mce_err->u.link_error_type = table[i].error_subtype; break; } mce_err->severity = table[i].severity; mce_err->initiator = table[i].initiator; if (table[i].nip_valid) *addr = regs->nip; return handled; } mce_err->error_type = MCE_ERROR_TYPE_UNKNOWN; mce_err->severity = MCE_SEV_ERROR_SYNC; mce_err->initiator = MCE_INITIATOR_CPU; return 0; } static int mce_handle_derror(struct pt_regs *regs, const struct mce_derror_table table[], struct mce_error_info *mce_err, uint64_t *addr) { uint64_t dsisr = regs->dsisr; int handled = 0; int found = 0; int i; *addr = 0; for (i = 0; table[i].dsisr_value; i++) { if (!(dsisr & table[i].dsisr_value)) continue; /* attempt to correct the error */ switch (table[i].error_type) { case MCE_ERROR_TYPE_SLB: if (mce_flush(MCE_FLUSH_SLB)) handled = 1; break; case MCE_ERROR_TYPE_ERAT: if (mce_flush(MCE_FLUSH_ERAT)) handled = 1; break; case MCE_ERROR_TYPE_TLB: if (mce_flush(MCE_FLUSH_TLB)) handled = 1; break; } /* * Attempt to handle multiple conditions, but only return * one. Ensure uncorrectable errors are first in the table * to match. */ if (found) continue; /* now fill in mce_error_info */ mce_err->error_type = table[i].error_type; switch (table[i].error_type) { case MCE_ERROR_TYPE_UE: mce_err->u.ue_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_SLB: mce_err->u.slb_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_ERAT: mce_err->u.erat_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_TLB: mce_err->u.tlb_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_USER: mce_err->u.user_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_RA: mce_err->u.ra_error_type = table[i].error_subtype; break; case MCE_ERROR_TYPE_LINK: mce_err->u.link_error_type = table[i].error_subtype; break; } mce_err->severity = table[i].severity; mce_err->initiator = table[i].initiator; if (table[i].dar_valid) *addr = regs->dar; found = 1; } if (found) return handled; mce_err->error_type = MCE_ERROR_TYPE_UNKNOWN; mce_err->severity = MCE_SEV_ERROR_SYNC; mce_err->initiator = MCE_INITIATOR_CPU; return 0; } static long mce_handle_ue_error(struct pt_regs *regs) { long handled = 0; /* * On specific SCOM read via MMIO we may get a machine check * exception with SRR0 pointing inside opal. If that is the * case OPAL may have recovery address to re-read SCOM data in * different way and hence we can recover from this MC. */ if (ppc_md.mce_check_early_recovery) { if (ppc_md.mce_check_early_recovery(regs)) handled = 1; } return handled; } static long mce_handle_error(struct pt_regs *regs, const struct mce_derror_table dtable[], const struct mce_ierror_table itable[]) { struct mce_error_info mce_err = { 0 }; uint64_t addr; uint64_t srr1 = regs->msr; long handled; if (SRR1_MC_LOADSTORE(srr1)) handled = mce_handle_derror(regs, dtable, &mce_err, &addr); else handled = mce_handle_ierror(regs, itable, &mce_err, &addr); if (!handled && mce_err.error_type == MCE_ERROR_TYPE_UE) handled = mce_handle_ue_error(regs); save_mce_event(regs, handled, &mce_err, regs->nip, addr); return handled; } long __machine_check_early_realmode_p7(struct pt_regs *regs) { /* P7 DD1 leaves top bits of DSISR undefined */ regs->dsisr &= 0x0000ffff; return mce_handle_error(regs, mce_p7_derror_table, mce_p7_ierror_table); } long __machine_check_early_realmode_p8(struct pt_regs *regs) { return mce_handle_error(regs, mce_p8_derror_table, mce_p8_ierror_table); } long __machine_check_early_realmode_p9(struct pt_regs *regs) { return mce_handle_error(regs, mce_p9_derror_table, mce_p9_ierror_table); } ",0 "ic License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // FIREwork is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with FIREwork. If not, see . // // FIREwork Copyright (C) 2008 - 2011 Julien Bert #include void convert_root2bin(char* src, char* trg) { Int_t crystalID1; Int_t crystalID2; Int_t rsectorID1; Int_t rsectorID2; Float_t globalPosX1; Float_t globalPosX2; Float_t globalPosY1; Float_t globalPosY2; Float_t globalPosZ1; Float_t globalPosZ2; Double_t time1; Double_t time2; Int_t nbytes = 0; Int_t nbevents; Int_t i; FILE * output; // prepare output output = fopen(trg, ""ab""); // Open tree file TFile *f = new TFile(src); TTree *T = (TTree*)f->Get(""Coincidences""); // Bind variables T->SetBranchAddress(""crystalID1"", &crystalID1); T->SetBranchAddress(""crystalID2"", &crystalID2); T->SetBranchAddress(""rsectorID1"", &rsectorID1); T->SetBranchAddress(""rsectorID2"", &rsectorID2); T->SetBranchAddress(""globalPosX1"", &globalPosX1); T->SetBranchAddress(""globalPosX2"", &globalPosX2); T->SetBranchAddress(""globalPosY1"", &globalPosY1); T->SetBranchAddress(""globalPosY2"", &globalPosY2); T->SetBranchAddress(""globalPosZ1"", &globalPosZ1); T->SetBranchAddress(""globalPosZ2"", &globalPosZ2); T->SetBranchAddress(""time1"", &time1); T->SetBranchAddress(""time2"", &time2); Int_t nbevents = T->GetEntries(); printf(""Number of events: %i\n"", nbevents); // Read leafs //nbevents = 10000; for (i=0; iGetEntry(i); //fprintf(output, ""%i %i %i %i %f %f %f %f %f %f %le %le\n"", crystalID1, crystalID2, rsectorID1, rsectorID2, globalPosX1, globalPosX2, globalPosY1, globalPosY2, globalPosZ1, globalPosZ2, time1, time2); //fprintf(output, ""%f %f %f %f %f %f %le %le\n"", globalPosX1, globalPosY1, globalPosZ1, globalPosX2, globalPosY2, globalPosZ2, time1, time2); //fprintf(output, ""%i %i %i %i\n"", crystalID1, rsectorID1, crystalID2, rsectorID2); fwrite(&crystalID1, sizeof(int), 1, output); fwrite(&rsectorID1, sizeof(int), 1, output); fwrite(&crystalID2, sizeof(int), 1, output); fwrite(&rsectorID2, sizeof(int), 1, output); } fclose(output); } ",0 "contributions from numerous individuals and organizations. * Please see the COPYING and CONTRIBUTORS files for details. */ #ifndef __ASYNC_IO_H__ #define __ASYNC_IO_H__ #if HAVE_DISKIO_MODULE_AIO #if _SQUID_WINDOWS_ #include ""DiskIO/AIO/aio_win32.h"" #else #if HAVE_AIO_H #include #endif #endif #include ""mem/forward.h"" #define MAX_ASYNCOP 128 typedef enum { AQ_STATE_NONE, /* Not active/uninitialised */ AQ_STATE_SETUP /* Initialised */ } async_queue_state_t; typedef enum { AQ_ENTRY_FREE, AQ_ENTRY_USED } async_queue_entry_state_t; typedef enum { AQ_ENTRY_NONE, AQ_ENTRY_READ, AQ_ENTRY_WRITE } async_queue_entry_type_t; typedef struct _async_queue_entry async_queue_entry_t; typedef struct _async_queue async_queue_t; /* An async queue entry */ class AIODiskFile; struct _async_queue_entry { async_queue_entry_state_t aq_e_state; async_queue_entry_type_t aq_e_type; /* 64-bit environments with non-GCC complain about the type mismatch on Linux */ #if defined(__USE_FILE_OFFSET64) && !defined(__GNUC__) struct aiocb64 aq_e_aiocb; #else struct aiocb aq_e_aiocb; #endif AIODiskFile *theFile; void *aq_e_callback_data; FREE *aq_e_free; int aq_e_fd; void *aq_e_buf; }; /* An async queue */ struct _async_queue { async_queue_state_t aq_state; async_queue_entry_t aq_queue[MAX_ASYNCOP]; /* queued ops */ int aq_numpending; /* Num of pending ops */ }; #endif /* HAVE_DISKIO_MODULE_AIO */ #endif /* __ASYNC_IO_H_ */ ",0 "1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an ""AS IS"" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is Mozilla JavaScript Shell project. * * The Initial Developer of the Original Code is * Alex Fritze. * Portions created by the Initial Developer are Copyright (C) 2003 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Alex Fritze * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the ""GPL""), or * the GNU Lesser General Public License Version 2.1 or later (the ""LGPL""), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #ifndef __NS_JSSHSERVER_H__ #define __NS_JSSHSERVER_H__ #include ""nsIJSShServer.h"" #include ""nsCOMPtr.h"" #include ""nsIServerSocket.h"" #include ""nsStringAPI.h"" class nsJSShServer : public nsIJSShServer { public: NS_DECL_ISUPPORTS NS_DECL_NSIJSSHSERVER nsJSShServer(); ~nsJSShServer(); private: nsCOMPtr mServerSocket; PRUint32 mServerPort; nsCString mServerStartupURI; PRBool mServerLoopbackOnly; }; #endif // __NS_JSSHSERVER_H__ ",0 " that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category pear * @package PEAR * @author Stig Bakken * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Common.php 6775 2007-05-22 12:39:39Z andrew.hill@openads.org $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ /** * base class */ require_once 'PEAR.php'; /** * PEAR commands base class * * @category pear * @package PEAR * @author Stig Bakken * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.5.4 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ class PEAR_Command_Common extends PEAR { // {{{ properties /** * PEAR_Config object used to pass user system and configuration * on when executing commands * * @var PEAR_Config */ var $config; /** * @var PEAR_Registry * @access protected */ var $_registry; /** * User Interface object, for all interaction with the user. * @var object */ var $ui; var $_deps_rel_trans = array( 'lt' => '<', 'le' => '<=', 'eq' => '=', 'ne' => '!=', 'gt' => '>', 'ge' => '>=', 'has' => '==' ); var $_deps_type_trans = array( 'pkg' => 'package', 'ext' => 'extension', 'php' => 'PHP', 'prog' => 'external program', 'ldlib' => 'external library for linking', 'rtlib' => 'external runtime library', 'os' => 'operating system', 'websrv' => 'web server', 'sapi' => 'SAPI backend' ); // }}} // {{{ constructor /** * PEAR_Command_Common constructor. * * @access public */ function PEAR_Command_Common(&$ui, &$config) { parent::PEAR(); $this->config = &$config; $this->ui = &$ui; } // }}} // {{{ getCommands() /** * Return a list of all the commands defined by this class. * @return array list of commands * @access public */ function getCommands() { $ret = array(); foreach (array_keys($this->commands) as $command) { $ret[$command] = $this->commands[$command]['summary']; } return $ret; } // }}} // {{{ getShortcuts() /** * Return a list of all the command shortcuts defined by this class. * @return array shortcut => command * @access public */ function getShortcuts() { $ret = array(); foreach (array_keys($this->commands) as $command) { if (isset($this->commands[$command]['shortcut'])) { $ret[$this->commands[$command]['shortcut']] = $command; } } return $ret; } // }}} // {{{ getOptions() function getOptions($command) { $shortcuts = $this->getShortcuts(); if (isset($shortcuts[$command])) { $command = $shortcuts[$command]; } if (isset($this->commands[$command]) && isset($this->commands[$command]['options'])) { return $this->commands[$command]['options']; } else { return null; } } // }}} // {{{ getGetoptArgs() function getGetoptArgs($command, &$short_args, &$long_args) { $short_args = """"; $long_args = array(); if (empty($this->commands[$command]) || empty($this->commands[$command]['options'])) { return; } reset($this->commands[$command]['options']); while (list($option, $info) = each($this->commands[$command]['options'])) { $larg = $sarg = ''; if (isset($info['arg'])) { if ($info['arg']{0} == '(') { $larg = '=='; $sarg = '::'; $arg = substr($info['arg'], 1, -1); } else { $larg = '='; $sarg = ':'; $arg = $info['arg']; } } if (isset($info['shortopt'])) { $short_args .= $info['shortopt'] . $sarg; } $long_args[] = $option . $larg; } } // }}} // {{{ getHelp() /** * Returns the help message for the given command * * @param string $command The command * @return mixed A fail string if the command does not have help or * a two elements array containing [0]=>help string, * [1]=> help string for the accepted cmd args */ function getHelp($command) { $config = &PEAR_Config::singleton(); if (!isset($this->commands[$command])) { return ""No such command \""$command\""""; } $help = null; if (isset($this->commands[$command]['doc'])) { $help = $this->commands[$command]['doc']; } if (empty($help)) { // XXX (cox) Fallback to summary if there is no doc (show both?) if (!isset($this->commands[$command]['summary'])) { return ""No help for command \""$command\""""; } $help = $this->commands[$command]['summary']; } if (preg_match_all('/{config\s+([^\}]+)}/e', $help, $matches)) { foreach($matches[0] as $k => $v) { $help = preg_replace(""/$v/"", $config->get($matches[1][$k]), $help); } } return array($help, $this->getHelpArgs($command)); } // }}} // {{{ getHelpArgs() /** * Returns the help for the accepted arguments of a command * * @param string $command * @return string The help string */ function getHelpArgs($command) { if (isset($this->commands[$command]['options']) && count($this->commands[$command]['options'])) { $help = ""Options:\n""; foreach ($this->commands[$command]['options'] as $k => $v) { if (isset($v['arg'])) { if ($v['arg'][0] == '(') { $arg = substr($v['arg'], 1, -1); $sapp = "" [$arg]""; $lapp = ""[=$arg]""; } else { $sapp = "" $v[arg]""; $lapp = ""=$v[arg]""; } } else { $sapp = $lapp = """"; } if (isset($v['shortopt'])) { $s = $v['shortopt']; $help .= "" -$s$sapp, --$k$lapp\n""; } else { $help .= "" --$k$lapp\n""; } $p = "" ""; $doc = rtrim(str_replace(""\n"", ""\n$p"", $v['doc'])); $help .= "" $doc\n""; } return $help; } return null; } // }}} // {{{ run() function run($command, $options, $params) { if (empty($this->commands[$command]['function'])) { // look for shortcuts foreach (array_keys($this->commands) as $cmd) { if (isset($this->commands[$cmd]['shortcut']) && $this->commands[$cmd]['shortcut'] == $command) { if (empty($this->commands[$cmd]['function'])) { return $this->raiseError(""unknown command `$command'""); } else { $func = $this->commands[$cmd]['function']; } $command = $cmd; break; } } } else { $func = $this->commands[$command]['function']; } return $this->$func($command, $options, $params); } // }}} } ?> ",0 "riteria; use Thelia\Core\Template\Element\BaseLoop; use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResultRow; use Thelia\Core\Template\Element\PropelSearchLoopInterface; use Thelia\Core\Template\Loop\Argument\Argument; use Thelia\Core\Template\Loop\Argument\ArgumentCollection; use Thelia\Type; class AdminCommentLoop extends BaseLoop implements PropelSearchLoopInterface { protected function getArgDefinitions() { return new ArgumentCollection( Argument::createIntListTypeArgument('id'), Argument::createAlphaNumStringTypeArgument('element_key'), Argument::createIntListTypeArgument('element_id'), new Argument( 'order', new Type\TypeCollection( new Type\EnumListType( [ 'id', 'id_reverse', 'created', 'created_reverse', 'updated', 'updated_reverse' ] ) ), 'manual' ) ); } public function buildModelCriteria() { $search = AdminCommentQuery::create(); $id = $this->getId(); if (null !== $id) { $search->filterById($id, Criteria::IN); } $elementKey = $this->getElementKey(); if (null !== $elementKey) { $search->filterByElementKey($elementKey, Criteria::IN); } $elementId = $this->getElementId(); if (null !== $elementId) { $search->filterByElementId($elementId, Criteria::IN); } $orders = $this->getOrder(); if (null !== $orders) { foreach ($orders as $order) { switch ($order) { case ""id"": $search->orderById(Criteria::ASC); break; case ""id_reverse"": $search->orderById(Criteria::DESC); break; case ""created"": $search->addAscendingOrderByColumn('created_at'); break; case ""created_reverse"": $search->addDescendingOrderByColumn('created_at'); break; case ""updated"": $search->addAscendingOrderByColumn('updated_at'); break; case ""updated_reverse"": $search->addDescendingOrderByColumn('updated_at'); break; } } } return $search; } public function parseResults(LoopResult $loopResult) { /** @var AdminComment $comment */ foreach ($loopResult->getResultDataCollection() as $comment) { $loopResultRow = new LoopResultRow($comment); $admin = $comment->getAdmin(); $adminName = $admin ? $admin->getFirstname().' '.$admin->getLastname() : """"; $loopResultRow ->set('ID', $comment->getId()) ->set('ADMIN_ID', $comment->getAdminId()) ->set('ADMIN_NAME', $adminName) ->set('COMMENT', $comment->getComment()) ->set('ELEMENT_KEY', $comment->getElementKey()) ->set('ELEMENT_ID', $comment->getElementId()) ->set('CREATED_AT', $comment->getCreatedAt()) ->set('UPDATED_AT', $comment->getUpdatedAt()); $this->addOutputFields($loopResultRow, $comment); $loopResult->addRow($loopResultRow); } return $loopResult; } }",0 "s to show the posts that belong to the category Author: Robert Felty Version: 2.0.3 Author URI: http://robfelty.com Tags: sidebar, widget, categories, menu, navigation, posts Copyright 2007-2010 Robert Felty This file is part of Collapsing Categories Collapsing Categories is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Collapsing Categories is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Collapsing Categories; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ $url = get_settings('siteurl'); global $collapsCatVersion; $collapsCatVersion = '2.0.3'; if (!is_admin()) { add_action('wp_enqueue_scripts', array('collapsCat', 'add_scripts')); add_action( 'wp_head', array('collapsCat','get_head')); } else { // call upgrade function if current version is lower than actual version $dbversion = get_option('collapsCatVersion'); if (!$dbversion || $collapsCatVersion != $dbversion) collapscat::init(); } add_action('init', array('collapsCat','init_textdomain')); register_activation_hook(__FILE__, array('collapsCat','init')); class collapsCat { function add_scripts() { wp_enqueue_script('jquery'); } function init_textdomain() { $plugin_dir = basename(dirname(__FILE__)) . '/languages/'; load_plugin_textdomain( 'collapsing-categories', WP_PLUGIN_DIR . $plugin_dir, $plugin_dir ); } function init() { global $collapsCatVersion; include('collapsCatStyles.php'); $defaultStyles=compact('selected','default','block','noArrows','custom'); $dbversion = get_option('collapsCatVersion'); if ($collapsCatVersion != $dbversion && $selected!='custom') { $style = $defaultStyles[$selected]; update_option( 'collapsCatStyle', $style); update_option( 'collapsCatVersion', $collapsCatVersion); } if( function_exists('add_option') ) { update_option( 'collapsCatOrigStyle', $style); update_option( 'collapsCatDefaultStyles', $defaultStyles); } if (!get_option('collapsCatOptions')) { include('defaults.php'); update_option('collapsCatOptions', $defaults); } if (!get_option('collapsCatStyle')) { add_option( 'collapsCatStyle', $style); } if (!get_option('collapsCatSidebarId')) { add_option( 'collapsCatSidebarId', 'sidebar'); } if (!get_option('collapsCatVersion')) { add_option( 'collapsCatVersion', $collapsCatVersion); } } function get_head() { echo ""\n""; } function phpArrayToJS($array,$name) { /* generates javscript code to create an array from a php array */ $script = ""try { $name"" . ""['catTest'] = 'test'; } catch (err) { $name = new Object(); }\n""; foreach ($array as $key => $value){ $script .= $name . ""['$key'] = '"" . addslashes(str_replace(""\n"", '', $value)) . ""';\n""; } return($script); } function set_styles() { $widget_options = get_option('widget_collapscat'); include('collapsCatStyles.php'); $css = ''; $oldStyle=true; foreach ($widget_options as $key=>$value) { $id = ""widget-collapscat-$key-top""; if (isset($value['style'])) { $oldStyle=false; $style = $defaultStyles[$value['style']]; $css .= str_replace('{ID}', '#' . $id, $style); } } if ($oldStyle) $css=stripslashes(get_option('collapsCatStyle')); return($css); } } include_once( 'collapscatlist.php' ); function collapsCat($args='', $print=true) { global $collapsCatItems; if (!is_admin()) { list($posts, $categories, $parents, $options) = get_collapscat_fromdb($args); list($collapsCatText, $postsInCat) = list_categories($posts, $categories, $parents, $options); $url = get_settings('siteurl'); extract($options); include('symbols.php'); if ($print) { print($collapsCatText); echo ""
            7. \n""; } else { return(array($collapsCatText, $postsInCat)); } } } $version = get_bloginfo('version'); if (preg_match('/^(2\.[8-9]|3\..*)/', $version)) include('collapscatwidget.php'); ?> ",0 " 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. */ package android.support.design.widget; import android.graphics.drawable.Drawable; import android.graphics.drawable.DrawableContainer; import android.util.Log; import java.lang.reflect.Method; /** Caution. Gross hacks ahead. */ class DrawableUtils { private static final String LOG_TAG = ""DrawableUtils""; private static Method sSetConstantStateMethod; private static boolean sSetConstantStateMethodFetched; private DrawableUtils() {} static boolean setContainerConstantState( DrawableContainer drawable, Drawable.ConstantState constantState) { // We can use getDeclaredMethod() on v9+ return setContainerConstantStateV9(drawable, constantState); } private static boolean setContainerConstantStateV9( DrawableContainer drawable, Drawable.ConstantState constantState) { if (!sSetConstantStateMethodFetched) { try { sSetConstantStateMethod = DrawableContainer.class.getDeclaredMethod( ""setConstantState"", DrawableContainer.DrawableContainerState.class); sSetConstantStateMethod.setAccessible(true); } catch (NoSuchMethodException e) { Log.e(LOG_TAG, ""Could not fetch setConstantState(). Oh well.""); } sSetConstantStateMethodFetched = true; } if (sSetConstantStateMethod != null) { try { sSetConstantStateMethod.invoke(drawable, constantState); return true; } catch (Exception e) { Log.e(LOG_TAG, ""Could not invoke setConstantState(). Oh well.""); } } return false; } } ",0 " 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. */ #include #include #include #include #include #include #include ""win_shadow.h"" #define TAG SERVER_TAG(""shadow.win"") void win_shadow_input_synchronize_event(winShadowSubsystem* subsystem, rdpShadowClient* client, UINT32 flags) { } void win_shadow_input_keyboard_event(winShadowSubsystem* subsystem, rdpShadowClient* client, UINT16 flags, UINT16 code) { INPUT event; event.type = INPUT_KEYBOARD; event.ki.wVk = 0; event.ki.wScan = code; event.ki.dwFlags = KEYEVENTF_SCANCODE; event.ki.dwExtraInfo = 0; event.ki.time = 0; if (flags & KBD_FLAGS_RELEASE) event.ki.dwFlags |= KEYEVENTF_KEYUP; if (flags & KBD_FLAGS_EXTENDED) event.ki.dwFlags |= KEYEVENTF_EXTENDEDKEY; SendInput(1, &event, sizeof(INPUT)); } void win_shadow_input_unicode_keyboard_event(winShadowSubsystem* subsystem, rdpShadowClient* client, UINT16 flags, UINT16 code) { INPUT event; event.type = INPUT_KEYBOARD; event.ki.wVk = 0; event.ki.wScan = code; event.ki.dwFlags = KEYEVENTF_UNICODE; event.ki.dwExtraInfo = 0; event.ki.time = 0; if (flags & KBD_FLAGS_RELEASE) event.ki.dwFlags |= KEYEVENTF_KEYUP; SendInput(1, &event, sizeof(INPUT)); } void win_shadow_input_mouse_event(winShadowSubsystem* subsystem, rdpShadowClient* client, UINT16 flags, UINT16 x, UINT16 y) { INPUT event; float width; float height; ZeroMemory(&event, sizeof(INPUT)); event.type = INPUT_MOUSE; if (flags & PTR_FLAGS_WHEEL) { event.mi.dwFlags = MOUSEEVENTF_WHEEL; event.mi.mouseData = flags & WheelRotationMask; if (flags & PTR_FLAGS_WHEEL_NEGATIVE) event.mi.mouseData *= -1; SendInput(1, &event, sizeof(INPUT)); } else { width = (float) GetSystemMetrics(SM_CXSCREEN); height = (float) GetSystemMetrics(SM_CYSCREEN); event.mi.dx = (LONG)((float) x * (65535.0f / width)); event.mi.dy = (LONG)((float) y * (65535.0f / height)); event.mi.dwFlags = MOUSEEVENTF_ABSOLUTE; if (flags & PTR_FLAGS_MOVE) { event.mi.dwFlags |= MOUSEEVENTF_MOVE; SendInput(1, &event, sizeof(INPUT)); } event.mi.dwFlags = MOUSEEVENTF_ABSOLUTE; if (flags & PTR_FLAGS_BUTTON1) { if (flags & PTR_FLAGS_DOWN) event.mi.dwFlags |= MOUSEEVENTF_LEFTDOWN; else event.mi.dwFlags |= MOUSEEVENTF_LEFTUP; SendInput(1, &event, sizeof(INPUT)); } else if (flags & PTR_FLAGS_BUTTON2) { if (flags & PTR_FLAGS_DOWN) event.mi.dwFlags |= MOUSEEVENTF_RIGHTDOWN; else event.mi.dwFlags |= MOUSEEVENTF_RIGHTUP; SendInput(1, &event, sizeof(INPUT)); } else if (flags & PTR_FLAGS_BUTTON3) { if (flags & PTR_FLAGS_DOWN) event.mi.dwFlags |= MOUSEEVENTF_MIDDLEDOWN; else event.mi.dwFlags |= MOUSEEVENTF_MIDDLEUP; SendInput(1, &event, sizeof(INPUT)); } } } void win_shadow_input_extended_mouse_event(winShadowSubsystem* subsystem, rdpShadowClient* client, UINT16 flags, UINT16 x, UINT16 y) { INPUT event; float width; float height; ZeroMemory(&event, sizeof(INPUT)); if ((flags & PTR_XFLAGS_BUTTON1) || (flags & PTR_XFLAGS_BUTTON2)) { event.type = INPUT_MOUSE; if (flags & PTR_FLAGS_MOVE) { width = (float) GetSystemMetrics(SM_CXSCREEN); height = (float) GetSystemMetrics(SM_CYSCREEN); event.mi.dx = (LONG)((float) x * (65535.0f / width)); event.mi.dy = (LONG)((float) y * (65535.0f / height)); event.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; SendInput(1, &event, sizeof(INPUT)); } event.mi.dx = event.mi.dy = event.mi.dwFlags = 0; if (flags & PTR_XFLAGS_DOWN) event.mi.dwFlags |= MOUSEEVENTF_XDOWN; else event.mi.dwFlags |= MOUSEEVENTF_XUP; if (flags & PTR_XFLAGS_BUTTON1) event.mi.mouseData = XBUTTON1; else if (flags & PTR_XFLAGS_BUTTON2) event.mi.mouseData = XBUTTON2; SendInput(1, &event, sizeof(INPUT)); } } int win_shadow_invalidate_region(winShadowSubsystem* subsystem, int x, int y, int width, int height) { rdpShadowServer* server; rdpShadowSurface* surface; RECTANGLE_16 invalidRect; server = subsystem->server; surface = server->surface; invalidRect.left = x; invalidRect.top = y; invalidRect.right = x + width; invalidRect.bottom = y + height; EnterCriticalSection(&(surface->lock)); region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion), &invalidRect); LeaveCriticalSection(&(surface->lock)); return 1; } int win_shadow_surface_copy(winShadowSubsystem* subsystem) { int x, y; int width; int height; int count; int status = 1; int nDstStep = 0; DWORD DstFormat; BYTE* pDstData = NULL; rdpShadowServer* server; rdpShadowSurface* surface; RECTANGLE_16 surfaceRect; RECTANGLE_16 invalidRect; const RECTANGLE_16* extents; server = subsystem->server; surface = server->surface; if (ArrayList_Count(server->clients) < 1) { region16_clear(&(surface->invalidRegion)); return 1; } surfaceRect.left = surface->x; surfaceRect.top = surface->y; surfaceRect.right = surface->x + surface->width; surfaceRect.bottom = surface->y + surface->height; region16_intersect_rect(&(surface->invalidRegion), &(surface->invalidRegion), &surfaceRect); if (region16_is_empty(&(surface->invalidRegion))) return 1; extents = region16_extents(&(surface->invalidRegion)); CopyMemory(&invalidRect, extents, sizeof(RECTANGLE_16)); shadow_capture_align_clip_rect(&invalidRect, &surfaceRect); x = invalidRect.left; y = invalidRect.top; width = invalidRect.right - invalidRect.left; height = invalidRect.bottom - invalidRect.top; if (0) { x = 0; y = 0; width = surface->width; height = surface->height; } WLog_INFO(TAG, ""SurfaceCopy x: %d y: %d width: %d height: %d right: %d bottom: %d"", x, y, width, height, x + width, y + height); #if defined(WITH_WDS_API) { rdpGdi* gdi; shwContext* shw; rdpContext* context; shw = subsystem->shw; context = (rdpContext*) shw; gdi = context->gdi; pDstData = gdi->primary_buffer; nDstStep = gdi->width * 4; DstFormat = gdi->dstFormat; } #elif defined(WITH_DXGI_1_2) DstFormat = PIXEL_FORMAT_BGRX32; status = win_shadow_dxgi_fetch_frame_data(subsystem, &pDstData, &nDstStep, x, y, width, height); #endif if (status <= 0) return status; freerdp_image_copy(surface->data, surface->format, surface->scanline, x - surface->x, y - surface->y, width, height, pDstData, DstFormat, nDstStep, 0, 0, NULL, FREERDP_FLIP_NONE); ArrayList_Lock(server->clients); count = ArrayList_Count(server->clients); shadow_subsystem_frame_update((rdpShadowSubsystem*)subsystem); ArrayList_Unlock(server->clients); region16_clear(&(surface->invalidRegion)); return 1; } #if defined(WITH_WDS_API) void* win_shadow_subsystem_thread(winShadowSubsystem* subsystem) { DWORD status; DWORD nCount; HANDLE events[32]; HANDLE StopEvent; StopEvent = subsystem->server->StopEvent; nCount = 0; events[nCount++] = StopEvent; events[nCount++] = subsystem->RdpUpdateEnterEvent; while (1) { status = WaitForMultipleObjects(nCount, events, FALSE, INFINITE); if (WaitForSingleObject(StopEvent, 0) == WAIT_OBJECT_0) { break; } if (WaitForSingleObject(subsystem->RdpUpdateEnterEvent, 0) == WAIT_OBJECT_0) { win_shadow_surface_copy(subsystem); ResetEvent(subsystem->RdpUpdateEnterEvent); SetEvent(subsystem->RdpUpdateLeaveEvent); } } ExitThread(0); return NULL; } #elif defined(WITH_DXGI_1_2) void* win_shadow_subsystem_thread(winShadowSubsystem* subsystem) { int fps; DWORD status; DWORD nCount; UINT64 cTime; DWORD dwTimeout; DWORD dwInterval; UINT64 frameTime; HANDLE events[32]; HANDLE StopEvent; StopEvent = subsystem->server->StopEvent; nCount = 0; events[nCount++] = StopEvent; fps = 16; dwInterval = 1000 / fps; frameTime = GetTickCount64() + dwInterval; while (1) { dwTimeout = INFINITE; cTime = GetTickCount64(); dwTimeout = (DWORD)((cTime > frameTime) ? 0 : frameTime - cTime); status = WaitForMultipleObjects(nCount, events, FALSE, dwTimeout); if (WaitForSingleObject(StopEvent, 0) == WAIT_OBJECT_0) { break; } if ((status == WAIT_TIMEOUT) || (GetTickCount64() > frameTime)) { int dxgi_status; dxgi_status = win_shadow_dxgi_get_next_frame(subsystem); if (dxgi_status > 0) dxgi_status = win_shadow_dxgi_get_invalid_region(subsystem); if (dxgi_status > 0) win_shadow_surface_copy(subsystem); dwInterval = 1000 / fps; frameTime += dwInterval; } } ExitThread(0); return NULL; } #endif int win_shadow_enum_monitors(MONITOR_DEF* monitors, int maxMonitors) { HDC hdc; int index; int desktopWidth; int desktopHeight; DWORD iDevNum = 0; int numMonitors = 0; MONITOR_DEF* monitor; DISPLAY_DEVICE displayDevice; ZeroMemory(&displayDevice, sizeof(DISPLAY_DEVICE)); displayDevice.cb = sizeof(DISPLAY_DEVICE); if (EnumDisplayDevices(NULL, iDevNum, &displayDevice, 0)) { hdc = CreateDC(displayDevice.DeviceName, NULL, NULL, NULL); desktopWidth = GetDeviceCaps(hdc, HORZRES); desktopHeight = GetDeviceCaps(hdc, VERTRES); index = 0; numMonitors = 1; monitor = &monitors[index]; monitor->left = 0; monitor->top = 0; monitor->right = desktopWidth; monitor->bottom = desktopHeight; monitor->flags = 1; DeleteDC(hdc); } return numMonitors; } int win_shadow_subsystem_init(winShadowSubsystem* subsystem) { int status; MONITOR_DEF* virtualScreen; subsystem->numMonitors = win_shadow_enum_monitors(subsystem->monitors, 16); #if defined(WITH_WDS_API) status = win_shadow_wds_init(subsystem); #elif defined(WITH_DXGI_1_2) status = win_shadow_dxgi_init(subsystem); #endif virtualScreen = &(subsystem->virtualScreen); virtualScreen->left = 0; virtualScreen->top = 0; virtualScreen->right = subsystem->width; virtualScreen->bottom = subsystem->height; virtualScreen->flags = 1; WLog_INFO(TAG, ""width: %d height: %d"", subsystem->width, subsystem->height); return 1; } int win_shadow_subsystem_uninit(winShadowSubsystem* subsystem) { if (!subsystem) return -1; #if defined(WITH_WDS_API) win_shadow_wds_uninit(subsystem); #elif defined(WITH_DXGI_1_2) win_shadow_dxgi_uninit(subsystem); #endif return 1; } int win_shadow_subsystem_start(winShadowSubsystem* subsystem) { HANDLE thread; if (!subsystem) return -1; if (!(thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) win_shadow_subsystem_thread, (void*) subsystem, 0, NULL))) { WLog_ERR(TAG, ""Failed to create thread""); return -1; } return 1; } int win_shadow_subsystem_stop(winShadowSubsystem* subsystem) { if (!subsystem) return -1; return 1; } void win_shadow_subsystem_free(winShadowSubsystem* subsystem) { if (!subsystem) return; win_shadow_subsystem_uninit(subsystem); free(subsystem); } winShadowSubsystem* win_shadow_subsystem_new() { winShadowSubsystem* subsystem; subsystem = (winShadowSubsystem*) calloc(1, sizeof(winShadowSubsystem)); if (!subsystem) return NULL; subsystem->SynchronizeEvent = (pfnShadowSynchronizeEvent) win_shadow_input_synchronize_event; subsystem->KeyboardEvent = (pfnShadowKeyboardEvent) win_shadow_input_keyboard_event; subsystem->UnicodeKeyboardEvent = (pfnShadowUnicodeKeyboardEvent) win_shadow_input_unicode_keyboard_event; subsystem->MouseEvent = (pfnShadowMouseEvent) win_shadow_input_mouse_event; subsystem->ExtendedMouseEvent = (pfnShadowExtendedMouseEvent) win_shadow_input_extended_mouse_event; return subsystem; } FREERDP_API int Win_ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints) { pEntryPoints->New = (pfnShadowSubsystemNew) win_shadow_subsystem_new; pEntryPoints->Free = (pfnShadowSubsystemFree) win_shadow_subsystem_free; pEntryPoints->Init = (pfnShadowSubsystemInit) win_shadow_subsystem_init; pEntryPoints->Uninit = (pfnShadowSubsystemInit) win_shadow_subsystem_uninit; pEntryPoints->Start = (pfnShadowSubsystemStart) win_shadow_subsystem_start; pEntryPoints->Stop = (pfnShadowSubsystemStop) win_shadow_subsystem_stop; pEntryPoints->EnumMonitors = (pfnShadowEnumMonitors) win_shadow_enum_monitors; return 1; } ",0 "* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include ""board.h"" #include ""emc.h"" DECLARE_GLOBAL_DATA_PTR; const struct tegra2_sysinfo sysinfo = { CONFIG_TEGRA2_BOARD_STRING }; /* * Routine: timer_init * Description: init the timestamp and lastinc value */ int timer_init(void) { return 0; } void __pin_mux_usb(void) { } void pin_mux_usb(void) __attribute__((weak, alias(""__pin_mux_usb""))); void __pin_mux_spi(void) { } void pin_mux_spi(void) __attribute__((weak, alias(""__pin_mux_spi""))); /* * Routine: power_det_init * Description: turn off power detects */ static void power_det_init(void) { #if defined(CONFIG_TEGRA2) struct pmc_ctlr *const pmc = (struct pmc_ctlr *)TEGRA2_PMC_BASE; /* turn off power detects */ writel(0, &pmc->pmc_pwr_det_latch); writel(0, &pmc->pmc_pwr_det); #endif } /* * Routine: board_init * Description: Early hardware init. */ int board_init(void) { __maybe_unused int err; /* Do clocks and UART first so that printf() works */ clock_init(); clock_verify(); #ifdef CONFIG_SPI_UART_SWITCH gpio_config_uart(); #endif #ifdef CONFIG_TEGRA_SPI pin_mux_spi(); spi_init(); #endif /* boot param addr */ gd->bd->bi_boot_params = (NV_PA_SDRAM_BASE + 0x100); power_det_init(); #ifdef CONFIG_TEGRA_I2C #ifndef CONFIG_SYS_I2C_INIT_BOARD #error ""You must define CONFIG_SYS_I2C_INIT_BOARD to use i2c on Nvidia boards"" #endif i2c_init_board(); # ifdef CONFIG_TEGRA_PMU if (pmu_set_nominal()) debug(""Failed to select nominal voltages\n""); # ifdef CONFIG_TEGRA_CLOCK_SCALING err = board_emc_init(); if (err) debug(""Memory controller init failed: %d\n"", err); # endif # endif /* CONFIG_TEGRA_PMU */ #endif /* CONFIG_TEGRA_I2C */ #ifdef CONFIG_USB_EHCI_TEGRA pin_mux_usb(); board_usb_init(gd->fdt_blob); #endif #ifdef CONFIG_TEGRA2_LP0 /* prepare the WB code to LP0 location */ warmboot_prepare_code(TEGRA_LP0_ADDR, TEGRA_LP0_SIZE); #endif return 0; } #ifdef CONFIG_BOARD_EARLY_INIT_F static void __gpio_early_init(void) { } void gpio_early_init(void) __attribute__((weak, alias(""__gpio_early_init""))); int board_early_init_f(void) { board_init_uart_f(); /* Initialize periph GPIOs */ gpio_early_init(); #ifdef CONFIG_SPI_UART_SWITCH gpio_early_init_uart(); #else gpio_config_uart(); #endif return 0; } #endif /* EARLY_INIT */ ",0 "rt com.fsck.k9.mail.K9MailLib; import com.fsck.k9.mail.filter.FixedLengthInputStream; import com.fsck.k9.mail.filter.PeekableInputStream; import timber.log.Timber; import static com.fsck.k9.mail.K9MailLib.DEBUG_PROTOCOL_IMAP; class ImapResponseParser { private PeekableInputStream inputStream; private ImapResponse response; private Exception exception; public ImapResponseParser(PeekableInputStream in) { this.inputStream = in; } public ImapResponse readResponse() throws IOException { return readResponse(null); } /** * Reads the next response available on the stream and returns an {@code ImapResponse} object that represents it. */ public ImapResponse readResponse(ImapResponseCallback callback) throws IOException { try { int peek = inputStream.peek(); if (peek == '+') { readContinuationRequest(callback); } else if (peek == '*') { readUntaggedResponse(callback); } else { readTaggedResponse(callback); } if (exception != null) { throw new ImapResponseParserException(""readResponse(): Exception in callback method"", exception); } return response; } finally { response = null; exception = null; } } private void readContinuationRequest(ImapResponseCallback callback) throws IOException { parseCommandContinuationRequest(); response = ImapResponse.newContinuationRequest(callback); skipIfSpace(); String rest = readStringUntilEndOfLine(); response.add(rest); } private void readUntaggedResponse(ImapResponseCallback callback) throws IOException { parseUntaggedResponse(); response = ImapResponse.newUntaggedResponse(callback); readTokens(response); } private void readTaggedResponse(ImapResponseCallback callback) throws IOException { String tag = parseTaggedResponse(); response = ImapResponse.newTaggedResponse(callback, tag); readTokens(response); } List readStatusResponse(String tag, String commandToLog, String logId, UntaggedHandler untaggedHandler) throws IOException, NegativeImapResponseException { List responses = new ArrayList(); ImapResponse response; do { response = readResponse(); if (K9MailLib.isDebug() && DEBUG_PROTOCOL_IMAP) { Timber.v(""%s<<<%s"", logId, response); } if (response.getTag() != null && !response.getTag().equalsIgnoreCase(tag)) { Timber.w(""After sending tag %s, got tag response from previous command %s for %s"", tag, response, logId); Iterator responseIterator = responses.iterator(); while (responseIterator.hasNext()) { ImapResponse delResponse = responseIterator.next(); if (delResponse.getTag() != null || delResponse.size() < 2 || ( !equalsIgnoreCase(delResponse.get(1), Responses.EXISTS) && !equalsIgnoreCase(delResponse.get(1), Responses.EXPUNGE))) { responseIterator.remove(); } } response = null; continue; } if (response.getTag() == null && untaggedHandler != null) { untaggedHandler.handleAsyncUntaggedResponse(response); } responses.add(response); } while (response == null || response.getTag() == null); if (response.size() < 1 || !equalsIgnoreCase(response.get(0), Responses.OK)) { String message = ""Command: "" + commandToLog + ""; response: "" + response.toString(); throw new NegativeImapResponseException(message, responses); } return responses; } private void readTokens(ImapResponse response) throws IOException { response.clear(); Object firstToken = readToken(response); checkTokenIsString(firstToken); String symbol = (String) firstToken; response.add(symbol); if (isStatusResponse(symbol)) { parseResponseText(response); } else if (equalsIgnoreCase(symbol, Responses.LIST) || equalsIgnoreCase(symbol, Responses.LSUB)) { parseListResponse(response); } else { Object token; while ((token = readToken(response)) != null) { if (!(token instanceof ImapList)) { response.add(token); } } } } /** * Parse {@code resp-text} tokens *

              * Responses ""OK"", ""PREAUTH"", ""BYE"", ""NO"", ""BAD"", and continuation request responses can * contain {@code resp-text} tokens. We parse the {@code resp-text-code} part as tokens and * read the rest as sequence of characters to avoid the parser interpreting things like * ""{123}"" as start of a literal. *

              *

              Example:

              *

              * {@code * OK [UIDVALIDITY 3857529045] UIDs valid} *

              *

              * See RFC 3501, Section 9 Formal Syntax (resp-text) *

              * * @param parent * The {@link ImapResponse} instance that holds the parsed tokens of the response. * * @throws IOException * If there's a network error. * * @see #isStatusResponse(String) */ private void parseResponseText(ImapResponse parent) throws IOException { skipIfSpace(); int next = inputStream.peek(); if (next == '[') { parseList(parent, '[', ']'); skipIfSpace(); } String rest = readStringUntilEndOfLine(); if (rest != null && !rest.isEmpty()) { // The rest is free-form text. parent.add(rest); } } private void parseListResponse(ImapResponse response) throws IOException { expect(' '); parseList(response, '(', ')'); expect(' '); String delimiter = parseQuotedOrNil(); response.add(delimiter); expect(' '); String name = parseString(); response.add(name); expect('\r'); expect('\n'); } private void skipIfSpace() throws IOException { if (inputStream.peek() == ' ') { expect(' '); } } /** * Reads the next token of the response. The token can be one of: String - * for NIL, QUOTED, NUMBER, ATOM. Object - for LITERAL. * ImapList - for PARENTHESIZED LIST. Can contain any of the above * elements including List. * * @return The next token in the response or null if there are no more * tokens. */ private Object readToken(ImapResponse response) throws IOException { while (true) { Object token = parseToken(response); if (token == null || !(token.equals("")"") || token.equals(""]""))) { return token; } } } private Object parseToken(ImapList parent) throws IOException { while (true) { int ch = inputStream.peek(); if (ch == '(') { return parseList(parent, '(', ')'); } else if (ch == '[') { return parseList(parent, '[', ']'); } else if (ch == ')') { expect(')'); return "")""; } else if (ch == ']') { expect(']'); return ""]""; } else if (ch == '""') { return parseQuoted(); } else if (ch == '{') { return parseLiteral(); } else if (ch == ' ') { expect(' '); } else if (ch == '\r') { expect('\r'); expect('\n'); return null; } else if (ch == '\n') { expect('\n'); return null; } else if (ch == '\t') { expect('\t'); } else { return parseBareString(true); } } } private String parseString() throws IOException { int ch = inputStream.peek(); if (ch == '""') { return parseQuoted(); } else if (ch == '{') { return (String) parseLiteral(); } else { return parseBareString(false); } } private boolean parseCommandContinuationRequest() throws IOException { expect('+'); return true; } private void parseUntaggedResponse() throws IOException { expect('*'); expect(' '); } private String parseTaggedResponse() throws IOException { return readStringUntil(' '); } private ImapList parseList(ImapList parent, char start, char end) throws IOException { expect(start); ImapList list = new ImapList(); parent.add(list); String endString = String.valueOf(end); Object token; while (true) { token = parseToken(list); if (token == null) { return null; } else if (token.equals(endString)) { break; } else if (!(token instanceof ImapList)) { list.add(token); } } return list; } private String parseBareString(boolean allowBrackets) throws IOException { StringBuilder sb = new StringBuilder(); int ch; while (true) { ch = inputStream.peek(); if (ch == -1) { throw new IOException(""parseBareString(): end of stream reached""); } if (ch == '(' || ch == ')' || (allowBrackets && (ch == '[' || ch == ']')) || ch == '{' || ch == ' ' || ch == '""' || (ch >= 0x00 && ch <= 0x1f) || ch == 0x7f) { if (sb.length() == 0) { throw new IOException(String.format(""parseBareString(): (%04x %c)"", ch, ch)); } return sb.toString(); } else { sb.append((char) inputStream.read()); } } } /** * A ""{"" has been read. Read the rest of the size string, the space and then notify the callback with an * {@code InputStream}. */ private Object parseLiteral() throws IOException { expect('{'); int size = Integer.parseInt(readStringUntil('}')); expect('\r'); expect('\n'); if (size == 0) { return """"; } if (response.getCallback() != null) { FixedLengthInputStream fixed = new FixedLengthInputStream(inputStream, size); Exception callbackException = null; Object result = null; try { result = response.getCallback().foundLiteral(response, fixed); } catch (IOException e) { throw e; } catch (Exception e) { callbackException = e; } boolean someDataWasRead = fixed.available() != size; if (someDataWasRead) { if (result == null && callbackException == null) { throw new AssertionError(""Callback consumed some data but returned no result""); } fixed.skipRemaining(); } if (callbackException != null) { if (exception == null) { exception = callbackException; } return ""EXCEPTION""; } if (result != null) { return result; } } byte[] data = new byte[size]; int read = 0; while (read != size) { int count = inputStream.read(data, read, size - read); if (count == -1) { throw new IOException(""parseLiteral(): end of stream reached""); } read += count; } return new String(data, ""US-ASCII""); } private String parseQuoted() throws IOException { expect('""'); StringBuilder sb = new StringBuilder(); int ch; boolean escape = false; while ((ch = inputStream.read()) != -1) { if (!escape && ch == '\\') { // Found the escape character escape = true; } else if (!escape && ch == '""') { return sb.toString(); } else { sb.append((char) ch); escape = false; } } throw new IOException(""parseQuoted(): end of stream reached""); } private String parseQuotedOrNil() throws IOException { int peek = inputStream.peek(); if (peek == '""') { return parseQuoted(); } else { parseNil(); return null; } } private void parseNil() throws IOException { expect('N'); expect('I'); expect('L'); } private String readStringUntil(char end) throws IOException { StringBuilder sb = new StringBuilder(); int ch; while ((ch = inputStream.read()) != -1) { if (ch == end) { return sb.toString(); } else { sb.append((char) ch); } } throw new IOException(""readStringUntil(): end of stream reached. "" + ""Read: \"""" + sb.toString() + ""\"" while waiting for "" + formatChar(end)); } private String formatChar(char value) { return value < 32 ? ""["" + Integer.toString(value) + ""]"" : ""'"" + value + ""'""; } private String readStringUntilEndOfLine() throws IOException { String rest = readStringUntil('\r'); expect('\n'); return rest; } private void expect(char expected) throws IOException { int readByte = inputStream.read(); if (readByte != expected) { throw new IOException(String.format(""Expected %04x (%c) but got %04x (%c)"", (int) expected, expected, readByte, (char) readByte)); } } private boolean isStatusResponse(String symbol) { return symbol.equalsIgnoreCase(Responses.OK) || symbol.equalsIgnoreCase(Responses.NO) || symbol.equalsIgnoreCase(Responses.BAD) || symbol.equalsIgnoreCase(Responses.PREAUTH) || symbol.equalsIgnoreCase(Responses.BYE); } static boolean equalsIgnoreCase(Object token, String symbol) { if (token == null || !(token instanceof String)) { return false; } return symbol.equalsIgnoreCase((String) token); } private void checkTokenIsString(Object token) throws IOException { if (!(token instanceof String)) { throw new IOException(""Unexpected non-string token: "" + token.getClass().getSimpleName() + "" - "" + token); } } } ",0 "ontent=""text/html; charset=US-ASCII""> Struct hash<unsigned short>
              Home Libraries People FAQ More

              Struct hash<unsigned short>

              boost::hash<unsigned short>

              Synopsis

              // In header: <boost/container_hash/hash.hpp>
              
              
              struct hash<unsigned short> {
                std::size_t operator()(unsigned short) const;
              };

              Description

              std::size_t operator()(unsigned short val) const;

              Returns:

              Unspecified in TR1, except that equal arguments yield the same result.

              hash_value(val) in Boost.

              Throws:

              Doesn't throw

              Copyright © 2005-2008 Daniel James

              Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


              ",0 "
              Loading...
              sa_alarm radiotftp.c
              sa_io radiotftp.c
              serialportFd radiotftp.c
              signalCount radiotftp.c
              src message_t
              src_port message_t
              syncword radiotftp.c
              Searching...
              No Matches
              ",0 " href=""../../../images/logo-icon.svg"" rel=""icon"" type=""image/svg"">

              LOWER_HALF_BLOCK

              const val LOWER_HALF_BLOCK: Char
              Content copied to clipboard

              Sources

              (source)
              Link copied to clipboard
              © 2020 CopyrightSponsored and developed by dokka
              ",0 " and license information view LICENSE file distributed with this source code. * @version //autogentag// * @package tests */ class eZDBTestSuite extends ezpDatabaseTestSuite { public function __construct() { parent::__construct(); $this->setName( ""eZDB Test Suite"" ); $this->addTestSuite( 'eZPostgreSQLDBTest' ); $this->addTestSuite( 'eZDBInterfaceTest' ); $this->addTestSuite( 'eZMySQLiDBFKTest' ); $this->addTestSuite( 'eZMySQLCharsetTest' ); } public static function suite() { return new self(); } } ?> ",0 " import weka.classifiers.misc.InputMappedClassifier; import weka.core.Attribute; import weka.core.DenseInstance; import weka.core.FastVector; import weka.core.Instance; import weka.core.Instances; import weka.core.SelectedTag; import weka.core.stemmers.SnowballStemmer; import weka.core.stopwords.WordsFromFile; import weka.filters.Filter; import weka.filters.unsupervised.attribute.StringToWordVector; public class PragmaticClassifier { private String ClassifierPath=""""; //private Classifier classifier; InputMappedClassifier classifier = new InputMappedClassifier(); public PragmaticClassifier(String path) { ClassifierPath = path; try { classifier.setModelPath(ClassifierPath); classifier.setTrim(true); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } public String Classify(Table t) { String prediction = """"; Instances ins = null; // Declare attributes Attribute Attribute1 = new Attribute(""num_of_rows""); Attribute Attribute2 = new Attribute(""num_of_columns""); Attribute Attribute3 = new Attribute(""num_of_header_rows""); Attribute Attribute4 = new Attribute(""percentage_of_numeric_cells""); Attribute Attribute5 = new Attribute(""percentage_of_seminumeric_cells""); Attribute Attribute6 = new Attribute(""percentage_of_string_cells""); Attribute Attribute7 = new Attribute(""percentage_of_empty_cells""); Attribute Attribute8 = new Attribute(""header_strings"",(FastVector)null); Attribute Attribute9 = new Attribute(""stub_strings"",(FastVector)null); Attribute Attribute10 = new Attribute(""caption"",(FastVector)null); Attribute Attribute11 = new Attribute(""footer"",(FastVector)null); FastVector fvClassVal = new FastVector(3); fvClassVal.addElement(""findings""); fvClassVal.addElement(""settings""); fvClassVal.addElement(""support-knowledge""); Attribute ClassAttribute = new Attribute(""table_class"", fvClassVal); // Declare the feature vector FastVector fvWekaAttributes = new FastVector(11); String header = """"; String stub = """"; int empty = 0; int string = 0; int seminum = 0; int num = 0; int cells_num = 0; if (t.cells != null) for (int i = 0; i < t.cells.length; i++) { for (int k = 0; k < t.cells[i].length; k++) { cells_num++; if(t.cells[i][k]==null||t.cells[i][k].getCell_content()==null) continue; if(Utilities.isSpaceOrEmpty(t.cells[i][k].getCell_content())) { empty++; } else if (t.cells[i][k].getCellType().equals(""Partially Numeric"")) { seminum++; } else if (t.cells[i][k].getCellType().equals(""Numeric"")) { num++; } else if (t.cells[i][k].getCellType().equals(""Text"")) { string++; } if (t.cells[i][k].isIs_header()) header += t.cells[i][k].getCell_content() + "" ""; if (t.cells[i][k].isIs_stub()) stub += t.cells[i][k].getCell_content() + "" ""; } } float perc_num = (float)num/(float)cells_num; float perc_seminum = (float)seminum/(float)cells_num; float perc_string = (float)string/(float)cells_num; float perc_empty = (float)empty/(float)cells_num; fvWekaAttributes.addElement(Attribute1); fvWekaAttributes.addElement(Attribute2); fvWekaAttributes.addElement(Attribute3); fvWekaAttributes.addElement(Attribute4); fvWekaAttributes.addElement(Attribute5); fvWekaAttributes.addElement(Attribute6); fvWekaAttributes.addElement(Attribute7); fvWekaAttributes.addElement(Attribute8); fvWekaAttributes.addElement(Attribute9); fvWekaAttributes.addElement(Attribute10); fvWekaAttributes.addElement(Attribute11); fvWekaAttributes.addElement(ClassAttribute); Instances Instances = new Instances(""Rel"", fvWekaAttributes, 0); Instance iExample = new DenseInstance(12); if(t.getTable_caption()==null) { t.setTable_caption(""""); } Attribute attribute = (Attribute)fvWekaAttributes.elementAt(0); iExample.setValue((Attribute)fvWekaAttributes.elementAt(0), t.getNum_of_rows()); iExample.setValue((Attribute)fvWekaAttributes.elementAt(1), t.getNum_of_columns()); iExample.setValue((Attribute)fvWekaAttributes.elementAt(2), t.stat.getNum_of_header_rows()); iExample.setValue((Attribute)fvWekaAttributes.elementAt(3), perc_num); iExample.setValue((Attribute)fvWekaAttributes.elementAt(4), perc_seminum); iExample.setValue((Attribute)fvWekaAttributes.elementAt(5), perc_string); iExample.setValue((Attribute)fvWekaAttributes.elementAt(6), perc_empty); iExample.setValue((Attribute)fvWekaAttributes.elementAt(7), header); iExample.setValue((Attribute)fvWekaAttributes.elementAt(8), stub); iExample.setValue((Attribute)fvWekaAttributes.elementAt(9), t.getTable_caption()); iExample.setValue((Attribute)fvWekaAttributes.elementAt(10), t.getTable_footer()); Instances.add(iExample); Instances.setClassIndex(11); StringToWordVector filter = new StringToWordVector(); filter.setAttributeIndices(""first-last""); filter.setMinTermFreq(1); filter.setIDFTransform(true); filter.setTFTransform(true); filter.setLowerCaseTokens(true); filter.setNormalizeDocLength(new SelectedTag(StringToWordVector.FILTER_NORMALIZE_ALL, StringToWordVector.TAGS_FILTER)); filter.setOutputWordCounts(true); SnowballStemmer stemmer = new SnowballStemmer(); //stemmer.setStemmer(""English""); filter.setStemmer(stemmer); WordsFromFile sw = new WordsFromFile(); sw.setStopwords(new File(""Models/stop-words-english1.txt"")); filter.setStopwordsHandler(sw); Instances newData; try { filter.setInputFormat(Instances); filter.input(Instances.instance(0)); filter.batchFinished(); ins= Filter.useFilter(Instances,filter); } catch (Exception e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { double result = classifier.classifyInstance(ins.firstInstance()); ins.firstInstance().setClassValue(result); prediction=ins.firstInstance().classAttribute().value((int)result); t.PragmaticClass = prediction; System.out.println(t.PragmaticClass); new File(t.PragmaticClass).mkdirs(); PrintWriter writer = new PrintWriter(t.PragmaticClass+File.separator+t.getDocumentFileName()+t.getTable_title()+"".html"", ""UTF-8""); writer.println(t.getXml()); writer.close(); Statistics.addPragmaticTableType(prediction); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return prediction; } public String Classify2(Table t,String class1, String class2) { String prediction = """"; Instances ins = null; // Declare attributes Attribute Attribute1 = new Attribute(""num_of_rows""); Attribute Attribute2 = new Attribute(""num_of_columns""); Attribute Attribute3 = new Attribute(""num_of_header_rows""); Attribute Attribute4 = new Attribute(""percentage_of_numeric_cells""); Attribute Attribute5 = new Attribute(""percentage_of_seminumeric_cells""); Attribute Attribute6 = new Attribute(""percentage_of_string_cells""); Attribute Attribute7 = new Attribute(""percentage_of_empty_cells""); Attribute Attribute8 = new Attribute(""header_strings"",(FastVector)null); Attribute Attribute9 = new Attribute(""stub_strings"",(FastVector)null); Attribute Attribute10 = new Attribute(""caption"",(FastVector)null); Attribute Attribute11 = new Attribute(""footer"",(FastVector)null); FastVector fvClassVal = new FastVector(2); fvClassVal.addElement(class1); fvClassVal.addElement(class2); Attribute ClassAttribute = new Attribute(""table_class"", fvClassVal); // Declare the feature vector FastVector fvWekaAttributes = new FastVector(11); String header = """"; String stub = """"; int empty = 0; int string = 0; int seminum = 0; int num = 0; int cells_num = 0; if (t.cells != null) for (int i = 0; i < t.cells.length; i++) { for (int k = 0; k < t.cells[i].length; k++) { cells_num++; if(t.cells[i][k]==null||t.cells[i][k].getCell_content()==null) continue; if(Utilities.isSpaceOrEmpty(t.cells[i][k].getCell_content())) { empty++; } else if (t.cells[i][k].getCellType().equals(""Partially Numeric"")) { seminum++; } else if (t.cells[i][k].getCellType().equals(""Numeric"")) { num++; } else if (t.cells[i][k].getCellType().equals(""Text"")) { string++; } if (t.cells[i][k].isIs_header()) header += t.cells[i][k].getCell_content() + "" ""; if (t.cells[i][k].isIs_stub()) stub += t.cells[i][k].getCell_content() + "" ""; } } float perc_num = (float)num/(float)cells_num; float perc_seminum = (float)seminum/(float)cells_num; float perc_string = (float)string/(float)cells_num; float perc_empty = (float)empty/(float)cells_num; fvWekaAttributes.addElement(Attribute1); fvWekaAttributes.addElement(Attribute2); fvWekaAttributes.addElement(Attribute3); fvWekaAttributes.addElement(Attribute4); fvWekaAttributes.addElement(Attribute5); fvWekaAttributes.addElement(Attribute6); fvWekaAttributes.addElement(Attribute7); fvWekaAttributes.addElement(Attribute8); fvWekaAttributes.addElement(Attribute9); fvWekaAttributes.addElement(Attribute10); fvWekaAttributes.addElement(Attribute11); fvWekaAttributes.addElement(ClassAttribute); Instances Instances = new Instances(""Rel"", fvWekaAttributes, 0); Instance iExample = new DenseInstance(12); Attribute attribute = (Attribute)fvWekaAttributes.elementAt(0); iExample.setValue((Attribute)fvWekaAttributes.elementAt(0), t.getNum_of_rows()); iExample.setValue((Attribute)fvWekaAttributes.elementAt(1), t.getNum_of_columns()); iExample.setValue((Attribute)fvWekaAttributes.elementAt(2), t.stat.getNum_of_header_rows()); iExample.setValue((Attribute)fvWekaAttributes.elementAt(3), perc_num); iExample.setValue((Attribute)fvWekaAttributes.elementAt(4), perc_seminum); iExample.setValue((Attribute)fvWekaAttributes.elementAt(5), perc_string); iExample.setValue((Attribute)fvWekaAttributes.elementAt(6), perc_empty); iExample.setValue((Attribute)fvWekaAttributes.elementAt(7), header); iExample.setValue((Attribute)fvWekaAttributes.elementAt(8), stub); iExample.setValue((Attribute)fvWekaAttributes.elementAt(9), t.getTable_caption()); iExample.setValue((Attribute)fvWekaAttributes.elementAt(10), t.getTable_footer()); Instances.add(iExample); Instances.setClassIndex(11); StringToWordVector filter = new StringToWordVector(); filter.setAttributeIndices(""first-last""); filter.setMinTermFreq(1); filter.setIDFTransform(true); filter.setTFTransform(true); filter.setLowerCaseTokens(true); filter.setNormalizeDocLength(new SelectedTag(StringToWordVector.FILTER_NORMALIZE_ALL, StringToWordVector.TAGS_FILTER)); filter.setOutputWordCounts(true); SnowballStemmer stemmer = new SnowballStemmer(); //stemmer.setStemmer(""English""); filter.setStemmer(stemmer); WordsFromFile sw = new WordsFromFile(); sw.setStopwords(new File(""Models/stop-words-english1.txt"")); filter.setStopwordsHandler(sw); Instances newData; try { filter.setInputFormat(Instances); filter.input(Instances.instance(0)); filter.batchFinished(); ins= Filter.useFilter(Instances,filter); } catch (Exception e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { double result = classifier.classifyInstance(ins.firstInstance()); ins.firstInstance().setClassValue(result); prediction=ins.firstInstance().classAttribute().value((int)result); t.PragmaticClass = prediction; System.out.println(t.PragmaticClass); new File(t.PragmaticClass).mkdirs(); PrintWriter writer = new PrintWriter(t.PragmaticClass+File.separator+t.getDocumentFileName()+t.getTable_title()+"".html"", ""UTF-8""); writer.println(t.getXml()); writer.close(); Statistics.addPragmaticTableType(prediction); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return prediction; } } ",0 "d! - A-Frame""> ",0 "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. */ package io.siddhi.core.query.processor; import io.siddhi.core.util.Scheduler; /** * Parent interface for Processors which need access to Siddhi {@link Scheduler} */ public interface SchedulingProcessor extends Processor { Scheduler getScheduler(); void setScheduler(Scheduler scheduler); } ",0 "2015-2020 Teclib' and contributors. * * http://glpi-project.org * * based on GLPI - Gestionnaire Libre de Parc Informatique * Copyright (C) 2003-2014 by the INDEPNET Development Team. * * --------------------------------------------------------------------- * * LICENSE * * This file is part of GLPI. * * GLPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GLPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GLPI. If not, see . * --------------------------------------------------------------------- */ include ('../inc/includes.php'); Session::checkRight(""reports"", READ); Html::header(Report::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], ""tools"", ""report""); Report::title(); // Titre echo ""
              ""; echo """"; echo """"; // 3. Selection d'affichage pour generer la liste echo """"; echo """"; echo """"; echo """"; echo """"; echo """"; echo ""
              "".__(""Equipment's report by year"").""
              "".__('Item type').""""; $values = [0 => __('All')]; foreach ($CFG_GLPI[""contract_types""] as $itemtype) { if ($item = getItemForItemtype($itemtype)) { $values[$itemtype] = $item->getTypeName(); } } Dropdown::showFromArray('item_type', $values, ['value' => 0, 'multiple' => true]); echo ""

              ""._n('Date', 'Dates', 1).""

              ""; $y = date(""Y""); $values = [ 0 => __('All')]; for ($i=($y-10); $i<($y+10); $i++) { $values[$i] = $i; } Dropdown::showFromArray('year', $values, ['value' => $y, 'multiple' => true]); echo ""
              ""; echo ""
              ""; Html::closeForm(); Html::footer(); ",0 "software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ This file is part of DarkStar-server source code. =========================================================================== */ #ifndef _CITEMCONTAINER_H #define _CITEMCONTAINER_H #include ""../common/cbasetypes.h"" enum CONTAINER_ID { LOC_INVENTORY = 0, LOC_MOGSAFE = 1, LOC_STORAGE = 2, LOC_TEMPITEMS = 3, LOC_MOGLOCKER = 4, LOC_MOGSATCHEL = 5, LOC_MOGSACK = 6, LOC_MOGCASE = 7, LOC_WARDROBE = 8, LOC_MOGSAFE2 = 9 }; #define MAX_CONTAINER_ID 10 #define MAX_CONTAINER_SIZE 120 #define ERROR_SLOTID 255 /************************************************************************ * * * * * * ************************************************************************/ class CItem; class CItemContainer { public: CItemContainer(uint16 LocationID); ~CItemContainer(); uint16 GetID(); uint16 GetBuff(); // планируемый размер хранилища (размер без ограничений) uint8 GetSize(); uint8 GetFreeSlotsCount(); // количество свободных ячеек в хранилище uint8 AddBuff(int8 buff); // планируемый размер хранилища (размер без ограничений) uint8 AddSize(int8 size); // увеличиваем/уменьшаем размер контейнера uint8 SetSize(uint8 size); uint8 SearchItem(uint16 ItemID); // поиск предмета в хранилище uint8 SearchItemWithSpace(uint16 ItemID, uint32 quantity); //search for item that has space to accomodate x items added uint8 InsertItem(CItem* PItem); // добавляем заранее созданный предмет в свободную ячейку uint8 InsertItem(CItem* PItem, uint8 slotID); // добавляем заранее созданный предмет в выбранную ячейку uint32 SortingPacket; // количество запросов на сортировку за такт uint32 LastSortingTime; // время последней сортировки контейнера CItem* GetItem(uint8 slotID); // получаем указатель на предмет, находящийся в указанной ячейка. void Clear(); // Remove all items from container template void ForEachItem(F func, Args&&... args) { for (uint8 SlotID = 0; SlotID <= m_size; ++SlotID) { if (m_ItemList[SlotID]) { func(m_ItemList[SlotID], std::forward(args)...); } } } private: uint16 m_id; uint16 m_buff; uint8 m_size; uint8 m_count; CItem* m_ItemList[MAX_CONTAINER_SIZE+1]; }; #endif",0 "ief Defines the amount of power drawn by a device from * a power source. * * Used as generic amount parameter for BaseBatteries ""draw""-method. * * Can be either an instantaneous draw of a certain energy amount * in mWs (type=ENERGY) or a draw of a certain current in mA over * time (type=CURRENT). * * Can be sub-classed for more complex power draws. * * @ingroup baseModules * @ingroup power */ class MIXIM_API DrawAmount { public: /** @brief The type of the amount to draw.*/ enum PowerType { CURRENT, /** @brief Current in mA over time. */ ENERGY /** @brief Single fixed energy draw in mWs */ }; protected: /** @brief Stores the type of the amount.*/ int type; /** @brief Stores the actual amount.*/ double value; public: /** @brief Initializes with passed type and value.*/ DrawAmount(int type = CURRENT, double value = 0): type(type), value(value) {} virtual ~DrawAmount() {} /** @brief Returns the type of power drawn as PowerType. */ virtual int getType() const { return type; } /** @brief Returns the actual amount of power drawn. */ virtual double getValue() const { return value; } /** @brief Sets the type of power drawn. */ virtual void setType(int t) { type = t; } /** @brief Sets the actual amount of power drawn. */ virtual void setValue(double v) { value = v; } }; /** * @brief Base class for any power source. * * See ""SimpleBattery"" for an example implementation. * * @ingroup baseModules * @ingroup power * @see SimpleBattery */ class MIXIM_API BaseBattery : public BaseModule { private: /** @brief Copy constructor is not allowed. */ BaseBattery(const BaseBattery&); /** @brief Assignment operator is not allowed. */ BaseBattery& operator=(const BaseBattery&); public: BaseBattery() : BaseModule() {} BaseBattery(unsigned stacksize) : BaseModule(stacksize) {} /** * @brief Registers a power draining device with this battery. * * Takes the name of the device as well as a number of accounts * the devices draws power for (like rx, tx, idle for a radio device). * * Returns an ID by which the device can identify itself to the * battery. * * Has to be implemented by actual battery implementations. */ virtual int registerDevice(const std::string& name, int numAccounts) = 0; /** * @brief Draws power from the battery. * * The actual amount and type of power drawn is defined by the passed * DrawAmount parameter. Can be an fixed single amount or an amount * drawn over time. * The drainID identifies the device which drains the power. * ""Account"" identifies the account the power is drawn from. It is * used for statistical evaluation only to see which activity of a * device has used how much power. It does not affect functionality. */ virtual void draw(int drainID, DrawAmount& amount, int account) = 0; /** * @name State-of-charge interface * * @brief Other host modules should use these interfaces to obtain * the state-of-charge of the battery. Do NOT use BatteryState * interfaces, which should be used only by Battery Stats modules. */ /*@{*/ /** @brief get voltage (future support for non-voltage regulated h/w */ virtual double getVoltage() const = 0; /** @brief current state of charge of the battery, relative to its * rated nominal capacity [0..1] */ virtual double estimateResidualRelative() const = 0; /** @brief current state of charge of the battery (mW-s) */ virtual double estimateResidualAbs() const = 0; /** @brief Current state of the battery. */ virtual HostState::States getState() const = 0; /*@}*/ }; #endif ",0 "nc. * * 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. */ /** * Extends the BaseFacebook class with the intent of using * PHP sessions to store user ids and access tokens. */ class Facebook extends BaseFacebook { /** * Identical to the parent constructor, except that * we start a PHP session to store the user ID and * access token if during the course of execution * we discover them. * * @param Array $config the application configuration. * @see BaseFacebook::__construct in facebook.php */ public function __construct($config) { if (!session_id()) { session_start(); } parent::__construct($config); } protected static $kSupportedKeys = array('state', 'code', 'access_token', 'user_id'); /** * Provides the implementations of the inherited abstract * methods. The implementation uses PHP sessions to maintain * a store for authorization codes, user ids, CSRF states, and * access tokens. */ protected function setPersistentData($key, $value) { if (!in_array($key, self::$kSupportedKeys)) { self::errorLog('Unsupported key passed to setPersistentData.'); return; } $session_var_name = $this->constructSessionVariableName($key); $_SESSION[$session_var_name] = $value; } protected function getPersistentData($key, $default = false) { if (!in_array($key, self::$kSupportedKeys)) { self::errorLog('Unsupported key passed to getPersistentData.'); return $default; } $session_var_name = $this->constructSessionVariableName($key); return isset($_SESSION[$session_var_name]) ? $_SESSION[$session_var_name] : $default; } protected function clearPersistentData($key) { if (!in_array($key, self::$kSupportedKeys)) { self::errorLog('Unsupported key passed to clearPersistentData.'); return; } $session_var_name = $this->constructSessionVariableName($key); unset($_SESSION[$session_var_name]); } protected function clearAllPersistentData() { foreach (self::$kSupportedKeys as $key) { $this->clearPersistentData($key); } } protected function constructSessionVariableName($key) { return implode('_', array('fb', $this->getAppId(), $key)); } } ",0 "stributed with this source code. */ declare(strict_types=1); namespace eZ\Publish\API\Repository\Values\Content\RelationList\Item; use eZ\Publish\API\Repository\Lists\UnauthorizedListItem; use eZ\Publish\API\Repository\Values\Content\RelationList\RelationListItemInterface; use eZ\Publish\API\Repository\Values\Content\Relation; /** * Item of relation list. */ final class UnauthorizedRelationListItem extends UnauthorizedListItem implements RelationListItemInterface { public function getRelation(): ?Relation { return null; } public function hasRelation(): bool { return false; } } ",0 "his work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.asterix.common.utils; import java.util.LinkedHashMap; import java.util.Map; import org.apache.hyracks.storage.am.common.api.ITreeIndexFrame; import org.apache.hyracks.storage.am.lsm.common.impls.AbstractLSMIndexFileManager; import org.apache.hyracks.storage.am.lsm.common.impls.ConcurrentMergePolicyFactory; /** * A static class that stores storage constants */ public class StorageConstants { public static final String STORAGE_ROOT_DIR_NAME = ""storage""; public static final String PARTITION_DIR_PREFIX = ""partition_""; /** * Any file that shares the same directory as the LSM index files must * begin with ""."". Otherwise {@link AbstractLSMIndexFileManager} will try to * use them as index files. */ public static final String INDEX_CHECKPOINT_FILE_PREFIX = "".idx_checkpoint_""; public static final String METADATA_FILE_NAME = "".metadata""; public static final String MASK_FILE_PREFIX = "".mask_""; public static final String COMPONENT_MASK_FILE_PREFIX = MASK_FILE_PREFIX + ""C_""; public static final float DEFAULT_TREE_FILL_FACTOR = 1.00f; public static final String DEFAULT_COMPACTION_POLICY_NAME = ConcurrentMergePolicyFactory.NAME; public static final String DEFAULT_FILTERED_DATASET_COMPACTION_POLICY_NAME = ""correlated-prefix""; public static final Map DEFAULT_COMPACTION_POLICY_PROPERTIES; /** * The storage version of AsterixDB related artifacts (e.g. log files, checkpoint files, etc..). */ private static final int LOCAL_STORAGE_VERSION = 5; /** * The storage version of AsterixDB stack. */ public static final int VERSION = LOCAL_STORAGE_VERSION + ITreeIndexFrame.Constants.VERSION; static { DEFAULT_COMPACTION_POLICY_PROPERTIES = new LinkedHashMap<>(); DEFAULT_COMPACTION_POLICY_PROPERTIES.put(ConcurrentMergePolicyFactory.MAX_COMPONENT_COUNT, ""30""); DEFAULT_COMPACTION_POLICY_PROPERTIES.put(ConcurrentMergePolicyFactory.MIN_MERGE_COMPONENT_COUNT, ""3""); DEFAULT_COMPACTION_POLICY_PROPERTIES.put(ConcurrentMergePolicyFactory.MAX_MERGE_COMPONENT_COUNT, ""10""); DEFAULT_COMPACTION_POLICY_PROPERTIES.put(ConcurrentMergePolicyFactory.SIZE_RATIO, ""1.2""); } private StorageConstants() { } } ",0 "le>Coq bench
              « Up

              contrib:sudoku 8.4.dev Not compatible with this Coq

              (2014-12-12 02:40:34 UTC)

              Lint

              Command
              ruby lint.rb unstable ../unstable/packages/coq:contrib:sudoku/coq:contrib:sudoku.8.4.dev
              Return code
              0
              Duration
              0 s
              Output
              The package is valid.
              

              Dry install

              Dry install with the current Coq version:

              Command
              opam install -y --dry-run coq:contrib:sudoku.8.4.dev coq.dev
              Return code
              768
              Duration
              0 s
              Output
              [NOTE] Package coq is already installed (current version is dev).
              The following dependencies couldn't be met:
                - coq:contrib:sudoku -> coq <= 8.4.dev
              Your request can't be satisfied:
                - Conflicting version constraints for coq
              No solution found, exiting
              

              Dry install without Coq, to test if the problem was incompatibility with the current Coq version:

              Command
              opam remove -y coq; opam install -y --dry-run coq:contrib:sudoku.8.4.dev
              Return code
              0
              Duration
              3 s
              Output
              The following actions will be performed:
               - remove    coq.dev
              === 1 to remove ===
              =-=- Removing Packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
              Removing coq.dev.
              [WARNING] Directory /home/bench/.opam/system/lib/coq is not empty, not removing
              The following actions will be performed:
               - install   coq.8.4pl4                            [required by coq:contrib:sudoku]
               - install   coq:contrib:sudoku.8.4.dev
              === 2 to install ===
              =-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
              =-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
              Building coq.8.4pl4:
                ./configure -configdir /home/bench/.opam/system/lib/coq/config -mandir /home/bench/.opam/system/man -docdir /home/bench/.opam/system/doc --prefix /home/bench/.opam/system --usecamlp5 --camlp5dir /home/bench/.opam/system/lib/camlp5 --coqide no
                make -j4 world
                make -j4 states
                make install
              Installing coq.8.4pl4.
              Building coq:contrib:sudoku.8.4.dev:
                coq_makefile -f Make -o Makefile
                make -j4
                make install
              Installing coq:contrib:sudoku.8.4.dev.
              

              Install dependencies

              Command
              true
              Return code
              0
              Duration
              0 s

              Install

              Command
              true
              Return code
              0
              Duration
              0 s

              Installation size

              No files were installed.

              Uninstall

              Command
              true
              Return code
              0
              Duration
              0 s
              Missing removes
              none
              Wrong removes
              none

              Sources are on GitHub. © Guillaume Claret.

              ",0 "T> { private Node head = null, tail = head; private int size = 0; @Override public void addAtIndex(int index, T data) { if (index < 0 || index > this.size()) { throw new IndexOutOfBoundsException(); } if (index == 0) { this.addToFront(data); } else if (index == this.size()) { this.addToBack(data); } else { Node current = head; if (index == 1) { current.setNext(new Node(data, current.getNext())); } else { for (int i = 0; i < index - 1; i++) { current = current.getNext(); } Node temp = current; current = new Node(data, temp); } size++; } } @Override public T get(int index) { if (index < 0 || index >= size) { throw new IndexOutOfBoundsException(); } Node current = head; for (int i = 0; i < index; i++) { current = current.getNext(); } return current.getData(); } @Override public T removeAtIndex(int index) { if (index < 0 || index >= this.size()) { throw new IndexOutOfBoundsException(); } if (index == 0) { T data = head.getData(); head = head.getNext(); tail.setNext(head); size--; return data; } else { Node before = tail; Node current = head; for (int i = 0; i < index; i++) { before = current; current = current.getNext(); } T data = current.getData(); before.setNext(current.getNext()); size--; return data; } } @Override public void addToFront(T t) { if (this.isEmpty()) { head = new Node(t, tail); tail = head; tail.setNext(head); size++; return; } Node node = new Node(t, head); head = node; tail.setNext(head); size++; } @Override public void addToBack(T t) { if (this.isEmpty()) { tail = new Node(t); head = tail; tail.setNext(head); head.setNext(tail); size++; } else { Node temp = tail; tail = new Node(t, head); temp.setNext(tail); size++; } } @Override public T removeFromFront() { if (this.isEmpty()) { return null; } Node ret = head; head = head.getNext(); tail.setNext(head); size--; return ret.getData(); } @Override public T removeFromBack() { if (this.isEmpty()) { return null; } Node iterate = head; while (iterate.getNext() != tail) { iterate = iterate.getNext(); } iterate.setNext(head); Node ret = tail; tail = iterate; size--; return ret.getData(); } @SuppressWarnings(""unchecked"") @Override public T[] toList() { Object[] list = new Object[this.size()]; int i = 0; Node current = head; while (i < this.size()) { list[i] = current.getData(); current = current.getNext(); i++; } return ((T[]) list); } @Override public boolean isEmpty() { return (this.size() == 0); } @Override public int size() { return size; } @Override public void clear() { head = null; tail = null; size = 0; } /** * Reference to the head node of the linked list. * Normally, you would not do this, but we need it * for grading your work. * * @return Node representing the head of the linked list */ public Node getHead() { return head; } /** * Reference to the tail node of the linked list. * Normally, you would not do this, but we need it * for grading your work. * * @return Node representing the tail of the linked list */ public Node getTail() { return tail; } /** * This method is for your testing purposes. * You may choose to implement it if you wish. */ @Override public String toString() { return """"; } } ",0 "@author Vlad Dobrovolskiy * @since 4.5.2 */ class AddVpnUserData extends AbstractDataType { /** * Required * Password for the username * * @var string */ public $password; /** * Required * Username for the vpn user * * @var string */ public $username; /** * An optional account for the vpn user. * Must be used with domainId. * * @var string */ public $account; /** * An optional domainId for the vpn user. * If the account parameter is used, domainId must also be used. * * @var string */ public $domainid; /** * Add vpn user to the specific project * * @var string */ public $projectid; /** * Constructor * * @param string $password Password for the username * @param string $username Username for the vpn user */ public function __construct($password, $username) { $this->password = $password; $this->username = $username; } } ",0 " * Run the migrations. * * @return void */ public function up() { Schema::create('platforms', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->string('short_name'); $table->string('slug')->unique(); $table->string('logo'); $table->string('banner'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('platforms'); } } ",0 "html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en_US"" lang=""en_US""> Qt 4.8: QStyleOptionComboBox Class Reference

              QStyleOptionComboBox Class Reference

              The QStyleOptionComboBox class is used to describe the parameter for drawing a combobox. More...

               #include <QStyleOptionComboBox>

              Inherits: QStyleOptionComplex.

              Inherited by:

              Public Types

              enum StyleOptionType { Type }
              enum StyleOptionVersion { Version }

              Public Functions

              QStyleOptionComboBox ()
              QStyleOptionComboBox ( const QStyleOptionComboBox & other )

              Public Variables

              QIcon currentIcon
              QString currentText
              bool editable
              bool frame
              QSize iconSize
              QRect popupRect

              Detailed Description

              The QStyleOptionComboBox class is used to describe the parameter for drawing a combobox.

              QStyleOptionButton contains all the information that QStyle functions need to draw QComboBox.

              For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.

              For an example demonstrating how style options can be used, see the Styles example.

              See also QStyleOption, QStyleOptionComplex, and QComboBox.

              Member Type Documentation

              enum QStyleOptionComboBox::StyleOptionType

              This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.

              ConstantValueDescription
              QStyleOptionComboBox::TypeSO_ComboBoxThe type of style option provided (SO_ComboBox for this class).

              The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles.

              See also StyleOptionVersion.

              enum QStyleOptionComboBox::StyleOptionVersion

              This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.

              ConstantValueDescription
              QStyleOptionComboBox::Version11

              The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.

              See also StyleOptionType.

              Member Function Documentation

              QStyleOptionComboBox::QStyleOptionComboBox ()

              Creates a QStyleOptionComboBox, initializing the members variables to their default values.

              QStyleOptionComboBox::QStyleOptionComboBox ( const QStyleOptionComboBox & other )

              Constructs a copy of the other style option.

              Member Variable Documentation

              QIcon QStyleOptionComboBox::currentIcon

              This variable holds the icon for the current item of the combo box.

              The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

              QString QStyleOptionComboBox::currentText

              This variable holds the text for the current item of the combo box.

              The default value is an empty string.

              bool QStyleOptionComboBox::editable

              This variable holds whether or not the combobox is editable or not.

              the default value is false

              See also QComboBox::isEditable().

              bool QStyleOptionComboBox::frame

              This variable holds whether the combo box has a frame.

              The default value is true.

              QSize QStyleOptionComboBox::iconSize

              This variable holds the icon size for the current item of the combo box.

              The default value is QSize(-1, -1), i.e. an invalid size.

              QRect QStyleOptionComboBox::popupRect

              This variable holds the popup rectangle for the combobox.

              The default value is a null rectangle, i.e. a rectangle with both the width and the height set to 0.

              This variable is currently unused. You can safely ignore it.

              See also QStyle::SC_ComboBoxListBoxPopup.

              © 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.

              All other trademarks are property of their respective owners. Privacy Policy


              Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.

              Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.

              ",0 "software and associated documentation files (the // ""Software""), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. package com.viromedia.bridge.component.node; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ThemedReactContext; /** * SceneManager for building a {@link VRTScene} * corresponding to the ViroScene.js control. */ public class VRTSceneManagerImpl extends VRTSceneManager { public VRTSceneManagerImpl(ReactApplicationContext context) { super(context); } @Override public String getName() { return ""VRTScene""; } @Override protected VRTScene createViewInstance(ThemedReactContext reactContext) { return new VRTScene(reactContext); } } ",0 "ute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation version 2. * * This program is distributed ""as is"" WITHOUT ANY WARRANTY of any * kind, whether express or implied; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef __CONFIG_AM335X_EVM_H #define __CONFIG_AM335X_EVM_H #include #define MACH_TYPE_TIAM335EVM 3589 /* Until the next sync */ #define CONFIG_MACH_TYPE MACH_TYPE_TIAM335EVM /* Clock Defines */ #define V_OSCK 24000000 /* Clock output from T2 */ #define V_SCLK (V_OSCK) /* Custom script for NOR */ #define CONFIG_SYS_LDSCRIPT ""board/ti/am335x/u-boot.lds"" /* Always 128 KiB env size */ #define CONFIG_ENV_SIZE (128 << 10) #ifdef CONFIG_NAND #define NANDARGS \ ""mtdids="" MTDIDS_DEFAULT ""\0"" \ ""mtdparts="" MTDPARTS_DEFAULT ""\0"" \ ""nandargs=setenv bootargs console=${console} "" \ ""${optargs} "" \ ""root=${nandroot} "" \ ""rootfstype=${nandrootfstype}\0"" \ ""dfu_alt_info_nand="" DFU_ALT_INFO_NAND ""\0"" \ ""nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0"" \ ""nandrootfstype=ubifs rootwait=1\0"" \ ""nandsrcaddr=0x280000\0"" \ ""nandboot=echo Booting from nand ...; "" \ ""run nandargs; "" \ ""nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; "" \ ""bootz ${loadaddr}\0"" \ ""nandimgsize=0x500000\0"" #else #define NANDARGS """" #endif #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #ifndef CONFIG_SPL_BUILD #define CONFIG_EXTRA_ENV_SETTINGS \ ""loadaddr=0x80200000\0"" \ ""fdtaddr=0x80F80000\0"" \ ""fdt_high=0xffffffff\0"" \ ""boot_fdt=try\0"" \ ""rdaddr=0x81000000\0"" \ ""bootpart=0:2\0"" \ ""bootdir=/boot\0"" \ ""bootfile=zImage\0"" \ ""fdtfile=undefined\0"" \ ""console=ttyO0,115200n8\0"" \ ""optargs=\0"" \ ""dfu_alt_info_mmc="" DFU_ALT_INFO_MMC ""\0"" \ ""dfu_alt_info_emmc=rawemmc mmc 0 3751936\0"" \ ""mmcdev=0\0"" \ ""mmcroot=/dev/mmcblk0p2 ro\0"" \ ""mmcrootfstype=ext4 rootwait\0"" \ ""rootpath=/export/rootfs\0"" \ ""nfsopts=nolock\0"" \ ""static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}"" \ ""::off\0"" \ ""ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0"" \ ""ramrootfstype=ext2\0"" \ ""mmcargs=setenv bootargs console=${console} "" \ ""${optargs} "" \ ""root=${mmcroot} "" \ ""rootfstype=${mmcrootfstype}\0"" \ ""spiroot=/dev/mtdblock4 rw\0"" \ ""spirootfstype=jffs2\0"" \ ""spisrcaddr=0xe0000\0"" \ ""spiimgsize=0x362000\0"" \ ""spibusno=0\0"" \ ""spiargs=setenv bootargs console=${console} "" \ ""${optargs} "" \ ""root=${spiroot} "" \ ""rootfstype=${spirootfstype}\0"" \ ""netargs=setenv bootargs console=${console} "" \ ""${optargs} "" \ ""root=/dev/nfs "" \ ""nfsroot=${serverip}:${rootpath},${nfsopts} rw "" \ ""ip=dhcp\0"" \ ""bootenv=uEnv.txt\0"" \ ""loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0"" \ ""importbootenv=echo Importing environment from mmc ...; "" \ ""env import -t $loadaddr $filesize\0"" \ ""dfu_alt_info_ram="" DFU_ALT_INFO_RAM ""\0"" \ ""ramargs=setenv bootargs console=${console} "" \ ""${optargs} "" \ ""root=${ramroot} "" \ ""rootfstype=${ramrootfstype}\0"" \ ""loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0"" \ ""loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0"" \ ""loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0"" \ ""mmcloados=run mmcargs; "" \ ""if test ${boot_fdt} = yes || test ${boot_fdt} = try; then "" \ ""if run loadfdt; then "" \ ""bootz ${loadaddr} - ${fdtaddr}; "" \ ""else "" \ ""if test ${boot_fdt} = try; then "" \ ""bootz; "" \ ""else "" \ ""echo WARN: Cannot load the DT; "" \ ""fi; "" \ ""fi; "" \ ""else "" \ ""bootz; "" \ ""fi;\0"" \ ""mmcboot=mmc dev ${mmcdev}; "" \ ""if mmc rescan; then "" \ ""echo SD/MMC found on device ${mmcdev};"" \ ""if run loadbootenv; then "" \ ""echo Loaded environment from ${bootenv};"" \ ""run importbootenv;"" \ ""fi;"" \ ""if test -n $uenvcmd; then "" \ ""echo Running uenvcmd ...;"" \ ""run uenvcmd;"" \ ""fi;"" \ ""if run loadimage; then "" \ ""run mmcloados;"" \ ""fi;"" \ ""fi;\0"" \ ""spiboot=echo Booting from spi ...; "" \ ""run spiargs; "" \ ""sf probe ${spibusno}:0; "" \ ""sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; "" \ ""bootz ${loadaddr}\0"" \ ""netboot=echo Booting from network ...; "" \ ""setenv autoload no; "" \ ""dhcp; "" \ ""tftp ${loadaddr} ${bootfile}; "" \ ""tftp ${fdtaddr} ${fdtfile}; "" \ ""run netargs; "" \ ""bootz ${loadaddr} - ${fdtaddr}\0"" \ ""ramboot=echo Booting from ramdisk ...; "" \ ""run ramargs; "" \ ""bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0"" \ ""findfdt=""\ ""if test $board_name = A335BONE; then "" \ ""setenv fdtfile am335x-bone.dtb; fi; "" \ ""if test $board_name = A335BNLT; then "" \ ""setenv fdtfile am335x-boneblack.dtb; fi; "" \ ""if test $board_name = A33515BB; then "" \ ""setenv fdtfile am335x-evm.dtb; fi; "" \ ""if test $board_name = A335X_SK; then "" \ ""setenv fdtfile am335x-evmsk.dtb; fi; "" \ ""if test $fdtfile = undefined; then "" \ ""echo WARNING: Could not determine device tree to use; fi; \0"" \ NANDARGS #endif #define CONFIG_BOOTCOMMAND \ ""run findfdt; "" \ ""run mmcboot;"" \ ""setenv mmcdev 1; "" \ ""setenv bootpart 1:2; "" \ ""run mmcboot;"" \ ""run nandboot;"" /* NS16550 Configuration */ #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */ #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */ #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */ #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */ #define CONFIG_BAUDRATE 115200 /* I2C Configuration */ #define CONFIG_CMD_EEPROM #define CONFIG_ENV_EEPROM_IS_ON_I2C #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 #define CONFIG_SYS_I2C_MULTI_EEPROMS /* PMIC support */ #define CONFIG_POWER_TPS65217 #define CONFIG_POWER_TPS65910 /* SPL */ #ifndef CONFIG_NOR_BOOT #define CONFIG_SPL_POWER_SUPPORT #define CONFIG_SPL_YMODEM_SUPPORT /* CPSW support */ #define CONFIG_SPL_ETH_SUPPORT /* USB gadget RNDIS */ #define CONFIG_SPL_MUSB_NEW_SUPPORT /* General network SPL, both CPSW and USB gadget RNDIS */ #define CONFIG_SPL_NET_SUPPORT #define CONFIG_SPL_ENV_SUPPORT #define CONFIG_SPL_NET_VCI_STRING ""AM335x U-Boot SPL"" /* SPI flash. */ #define CONFIG_SPL_SPI_SUPPORT #define CONFIG_SPL_SPI_FLASH_SUPPORT #define CONFIG_SPL_SPI_LOAD #define CONFIG_SPL_SPI_BUS 0 #define CONFIG_SPL_SPI_CS 0 #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 #define CONFIG_SPL_LDSCRIPT ""$(CPUDIR)/am33xx/u-boot-spl.lds"" #ifdef CONFIG_NAND #define CONFIG_SYS_NAND_5_ADDR_CYCLE #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ CONFIG_SYS_NAND_PAGE_SIZE) #define CONFIG_SYS_NAND_PAGE_SIZE 2048 #define CONFIG_SYS_NAND_OOBSIZE 64 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ 10, 11, 12, 13, 14, 15, 16, 17, \ 18, 19, 20, 21, 22, 23, 24, 25, \ 26, 27, 28, 29, 30, 31, 32, 33, \ 34, 35, 36, 37, 38, 39, 40, 41, \ 42, 43, 44, 45, 46, 47, 48, 49, \ 50, 51, 52, 53, 54, 55, 56, 57, } #define CONFIG_SYS_NAND_ECCSIZE 512 #define CONFIG_SYS_NAND_ECCBYTES 14 #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 #endif #endif /* * For NOR boot, we must set this to the start of where NOR is mapped * in memory. */ #ifdef CONFIG_NOR_BOOT #define CONFIG_SYS_TEXT_BASE 0x08000000 #endif /* * USB configuration. We enable MUSB support, both for host and for * gadget. We set USB0 as peripheral and USB1 as host, based on the * board schematic and physical port wired to each. Then for host we * add mass storage support and for gadget we add both RNDIS ethernet * and DFU. */ #define CONFIG_USB_MUSB_DSPS #define CONFIG_ARCH_MISC_INIT #define CONFIG_MUSB_GADGET #define CONFIG_MUSB_PIO_ONLY #define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT #define CONFIG_USB_GADGET #define CONFIG_USBDOWNLOAD_GADGET #define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_GADGET_VBUS_DRAW 2 #define CONFIG_MUSB_HOST #define CONFIG_AM335X_USB0 #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL #define CONFIG_AM335X_USB1 #define CONFIG_AM335X_USB1_MODE MUSB_HOST #ifdef CONFIG_MUSB_HOST #define CONFIG_CMD_USB #define CONFIG_USB_STORAGE #endif #ifdef CONFIG_MUSB_GADGET #define CONFIG_USB_ETHER #define CONFIG_USB_ETH_RNDIS #define CONFIG_USBNET_HOST_ADDR ""de:ad:be:af:00:00"" /* USB TI's IDs */ #define CONFIG_G_DNL_VENDOR_NUM 0x0403 #define CONFIG_G_DNL_PRODUCT_NUM 0xBD00 #define CONFIG_G_DNL_MANUFACTURER ""Texas Instruments"" #endif /* CONFIG_MUSB_GADGET */ #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT) /* disable host part of MUSB in SPL */ #undef CONFIG_MUSB_HOST /* * Disable CPSW SPL support so we fit within the 101KiB limit. */ #undef CONFIG_SPL_ETH_SUPPORT #endif /* USB Device Firmware Update support */ #define CONFIG_DFU_FUNCTION #define CONFIG_DFU_MMC #define CONFIG_CMD_DFU #define DFU_ALT_INFO_MMC \ ""boot part 0 1;"" \ ""rootfs part 0 2;"" \ ""MLO fat 0 1;"" \ ""MLO.raw mmc 100 100;"" \ ""u-boot.img.raw mmc 300 400;"" \ ""spl-os-args.raw mmc 80 80;"" \ ""spl-os-image.raw mmc 900 2000;"" \ ""spl-os-args fat 0 1;"" \ ""spl-os-image fat 0 1;"" \ ""u-boot.img fat 0 1;"" \ ""uEnv.txt fat 0 1"" #ifdef CONFIG_NAND #define CONFIG_DFU_NAND #define DFU_ALT_INFO_NAND \ ""SPL part 0 1;"" \ ""SPL.backup1 part 0 2;"" \ ""SPL.backup2 part 0 3;"" \ ""SPL.backup3 part 0 4;"" \ ""u-boot part 0 5;"" \ ""u-boot-spl-os part 0 6;"" \ ""kernel part 0 8;"" \ ""rootfs part 0 9"" #endif #define CONFIG_DFU_RAM #define DFU_ALT_INFO_RAM \ ""kernel ram 0x80200000 0xD80000;"" \ ""fdt ram 0x80F80000 0x80000;"" \ ""ramdisk ram 0x81000000 0x4000000"" /* * Default to using SPI for environment, etc. * 0x000000 - 0x020000 : SPL (128KiB) * 0x020000 - 0x0A0000 : U-Boot (512KiB) * 0x0A0000 - 0x0BFFFF : First copy of U-Boot Environment (128KiB) * 0x0C0000 - 0x0DFFFF : Second copy of U-Boot Environment (128KiB) * 0x0E0000 - 0x442000 : Linux Kernel * 0x442000 - 0x800000 : Userland */ #if defined(CONFIG_SPI_BOOT) #define CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_SYS_REDUNDAND_ENVIRONMENT #define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED #define CONFIG_ENV_SECT_SIZE (4 << 10) /* 4 KB sectors */ #define CONFIG_ENV_OFFSET (768 << 10) /* 768 KiB in */ #define CONFIG_ENV_OFFSET_REDUND (896 << 10) /* 896 KiB in */ #define MTDIDS_DEFAULT ""nor0=m25p80-flash.0"" #define MTDPARTS_DEFAULT ""mtdparts=m25p80-flash.0:128k(SPL),"" \ ""512k(u-boot),128k(u-boot-env1),"" \ ""128k(u-boot-env2),3464k(kernel),"" \ ""-(rootfs)"" #elif defined(CONFIG_EMMC_BOOT) #undef CONFIG_ENV_IS_NOWHERE #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SYS_MMC_ENV_PART 2 #define CONFIG_ENV_OFFSET 0x0 #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_SYS_REDUNDAND_ENVIRONMENT #endif /* SPI flash. */ #define CONFIG_CMD_SF #define CONFIG_SPI_FLASH #define CONFIG_SPI_FLASH_WINBOND #define CONFIG_SF_DEFAULT_SPEED 24000000 /* Network. */ #define CONFIG_PHY_GIGE #define CONFIG_PHYLIB #define CONFIG_PHY_ADDR 0 #define CONFIG_PHY_SMSC /* NAND support */ #ifdef CONFIG_NAND #define CONFIG_CMD_NAND #define GPMC_NAND_ECC_LP_x16_LAYOUT 1 #if !defined(CONFIG_SPI_BOOT) && !defined(CONFIG_NOR_BOOT) #define MTDIDS_DEFAULT ""nand0=omap2-nand.0"" #define MTDPARTS_DEFAULT ""mtdparts=omap2-nand.0:128k(SPL),"" \ ""128k(SPL.backup1),"" \ ""128k(SPL.backup2),"" \ ""128k(SPL.backup3),1792k(u-boot),"" \ ""128k(u-boot-spl-os),"" \ ""128k(u-boot-env),5m(kernel),-(rootfs)"" #define CONFIG_ENV_IS_IN_NAND #define CONFIG_ENV_OFFSET 0x260000 /* environment starts here */ #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ #endif #endif /* * NOR Size = 16 MiB * Number of Sectors/Blocks = 128 * Sector Size = 128 KiB * Word length = 16 bits * Default layout: * 0x000000 - 0x07FFFF : U-Boot (512 KiB) * 0x080000 - 0x09FFFF : First copy of U-Boot Environment (128 KiB) * 0x0A0000 - 0x0BFFFF : Second copy of U-Boot Environment (128 KiB) * 0x0C0000 - 0x4BFFFF : Linux Kernel (4 MiB) * 0x4C0000 - 0xFFFFFF : Userland (11 MiB + 256 KiB) */ #if defined(CONFIG_NOR) #undef CONFIG_SYS_NO_FLASH #define CONFIG_CMD_FLASH #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE #define CONFIG_SYS_FLASH_PROTECTION #define CONFIG_SYS_FLASH_CFI #define CONFIG_FLASH_CFI_DRIVER #define CONFIG_FLASH_CFI_MTD #define CONFIG_SYS_MAX_FLASH_SECT 128 #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_FLASH_BASE (0x08000000) #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #ifdef CONFIG_NOR_BOOT #define CONFIG_ENV_IS_IN_FLASH #define CONFIG_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ #define CONFIG_ENV_OFFSET (512 << 10) /* 512 KiB */ #define CONFIG_ENV_OFFSET_REDUND (768 << 10) /* 768 KiB */ #define MTDIDS_DEFAULT ""nor0=physmap-flash.0"" #define MTDPARTS_DEFAULT ""mtdparts=physmap-flash.0:"" \ ""512k(u-boot),"" \ ""128k(u-boot-env1),"" \ ""128k(u-boot-env2),"" \ ""4m(kernel),-(rootfs)"" #endif #endif /* NOR support */ #endif /* ! __CONFIG_AM335X_EVM_H */ ",0 " content=""Cooland"">

              PARTNEŘI

              Domácí Květinářství

              Květinářství, kde se pěstují, váží a prodávají kytice z českého venkova, pěstované pod širým nebem s láskou a péčí.

              Od roku 2016 je Domácí květinářství součástí iniciativy komunitou podporovaného zemědělství KPZ CooLAND.

              www.domacikvetinarstvi.cz

              Ekumenická akademie

              Akademie prosazuje alternativní přístupy při řešení současných světových ekonomických, sociálních a ekologických problémů a zároveň je přenáší do praxe v podobě konkrétních projektů.

              CooLAND je partnerem kampaně Pěstuj planetu a dále spolupracuje s Ekumenickou akademií na realizaci společných akcí jako např. Férová Letná.

              http://www.ekumakad.cz/

              Farma Lukava

              Rodinná ekologická farma hospodařící v Jindřichovicích pod Smrkem a Dětřichovci, kde se zabývá především chovem dojných ovcí a zpracováním ovčího mléka.

              Od roku 2016 je farma součástí iniciativy komunitou podporovaného zemědělství KPZ CooLAND.

              http://www.lukava.net/

              Glopolis

              Nezávislé analytické centrum (think-tank) se zaměřením na globální výzvy a příslušné odpovědi České republiky a EU.

              CooLAND se aktivně účastnil diskusí v rámci festivalu Země na talíři a spolupracuje na šíření filmů v rámci ozvěn tohoto festivalu. Spolupracujeme na projektu Menu pro změnu.

              http://glopolis.org/cs/

              Harvest Films

              Občanské sdružení hledá a nabízí divákům filmy, které dokáží zajímavým a srozumitelným způsobem uchopit, vysvětlit a prezentovat vědecká témata.

              CooLAND se podílel na přípravě a realizaci projektu Učíme se filmem a pravidelně se zapojuje do organizace Life Sciences Film Festivalu.

              http://www.harvestfilms.cz/

              Institut cirkulární ekonomiky

              Nevládní organizace, která v podmínkách ČR usiluje o rozvoj cirkulární ekonomiky - konceptu založeného na vytváření funkčních vztahů mezi lidskou společností a přírodou.

              CooLAND se v roli moderátora účastní vybraných diskusí v rámci projektu Buzz Talks.

              http://incien.org/

              Kytky od potoka

              Květinářství, kde vážou netradiční kytice z květin, které si sami pěstují nebo sbírají na loukách, v lesích nebo i na rumištích.

              CooLAND si kupuje kytky od potoka pro radost a potěšení a občas také holkám pomůžeme nějakou tu kytku zasadit.

              http://www.kytkyodpotoka.cz/

              Na ovoce

              Na ovoce slouží jako komunitní platforma lidem, kteří chtějí zodpovědně využívat přírodní bohatství v podobě volně rostoucích ovocných stromů, keřů či bylinek. Iniciativa se rozhodla taková místa nejen mapovat, ale také přispívat k jejich udržitelnosti, zakládat nová a dbát na hodnoty, které rostliny pro člověka představují, tím přispívat ke zvýšení biodiverzity a udržení pozitiv kulturní krajiny, ve které člověk žije.

              CooLAND ve spolupráci s Na ovoce realizuje projekt Pražské sady a jejich popularizace

              https://na-ovoce.cz/

              PRO-BIO LIGA

              PRO-BIO liga je samostatnou spotřebitelskou pobočkou největšího českého spolku ekologických hospodářů – Svazu ekologických zemědělců PRO-BIO Šumperk. Posláním PRO-BIO ligy je informovat a chránit spotřebitele potravin, přispívat k celoživotnímu vzdělávání a zvyšovat všeobecnou ekogramotnost.

              CooLAND spolupracuje s PRO-BIO liga na realizaci přednášek a workshopů o ochraně zemědělské půdy.

              www.biospotrebitel.cz

              Statek Karel Tachecí

              Ekologický zemědělec hospodařící v Budyni nad Ohří, kde pěstuje zeleninu, obiloviny, mák a další rostliny bez použití chemie a umělých hnojiv.

              CooLAND s Karlem Tachecím spolupracuje od roku 2015 a je prvním zemědělcem, který se stal součástí iniciativy komunitou podporovaného zemědělství KPZ CooLAND.

              http://www.tacheci.cz/

              Kevin V. Ton

              Kevin V. Ton patří mezi fotografy „uličníky“, tématem jeho fotografií je totiž především běžný život na ulici. Na jeho fotografiích se často objevují lidé, kteří žijí na okraji společnosti, mimo systém, a proto své fotografie Kevin chápe jako pouliční a sociální dokument.

              Kevin V. Ton svými fotografiemi pravidelně dokumentuje akce a setkání KPZ CooLAND. CooLAND ve spolupráci s PRO-BIO LIGA realizoval výstavu “Láska ke krajině prochází žaludkem” - fotografie Kevina Tona s příběhem první sezóny KPZ CooLAND.

              http://www.kevin-v-ton.com

              PRO - BIO s r.o.

              PRO-BIO, obchodní společnost s r. o. je první český výrobce a významný dodavatel širokého sortimentu kvalitních biopotravin. Podporuje a rozvíjí ekologické zemědělství, svou činností přispívá k zachování zdravé planety. Vrací zapomenuté tradiční plodiny a potraviny do života lidí.

              CooLAND spolupracuje s PRO - BIO na výzkumu vlivu ekologického hospodaření na krajinu.

              www.probio.cz

              Pozemkový úřad Nymburk

              Pozemkové úřady mají mimo jiné na starosti realizaci pozemkových úprav. Ty jsou jedním z nejefektivnějších nástrojů, jak pomoci zemědělské krajině k tomu, aby byla zdravá a zároveň v ní mohli hospodařit zodpovědní zemědělci.

              CooLAND s Pozemkovým úřadem Nymburk spolupracuje při osvětě v oblasti pozemkových úprav a pořádá exkurze na realizovaná opatření v krajině.

              http://www.spucr.cz/

              KOALICE A SÍTĚ

              Asociace místních potravinových iniciativ AMPI

              Poslání Asociace místních potravinových iniciativ (AMPI) je podporovat blízký vztah lidí ke krajině, ve které žijí, a to prostřednictvím rozvoje místních potravinových systémů (komunitou podporovaného zemědělství, komunitních zahrad aj.) v České republice, které zde zastřešuje.

              CooLAND se jako člen AMPI podílí na organizaci akcí, realizaci projektů, spoluprací se zahraničními partnery a šíření myšlenky komunitou podporovaného zemědělství u nás. Jsme společnými koordinátory projektu Erasmus + Projekty mobility osob / Vzdělávání dospělých s názvem: Learning toward Access to Land.

              http://asociaceampi.cz

              Iniciativa potravinové suverenity

              Iniciativa vznikla v roce 2015 jako diskusní platforma jednotlivců i organizací a klade si za cíl prosazovat potravinovou suverenitu jako politický koncept přístupu k zemědělství a potravinářství v ČR i v Evropě, propojovat aktéry v ČR, napomáhat vzniku a rozvoji aktivit podporující potravinovou suverenitu a fungovat jako spojka na podobné iniciativy v dzahraničí.

              CooLAND je jedním ze zakládajících členů iniciativy a v roce 2015 jsme byli spolupořadatelem prvního Fóra potravinové suverenity v ČR.

              https://potravinovasuverenita.cz/

              Českomoravská komora pozemkových úprav

              Českomoravská komora pro pozemkové úpravy (ČMKPÚ) byla založena již v r. 1990, jako zájmové sdružení pracovníků v oboru pozemkových úprav. Sdružuje projektanty, pracovníky státní správy – pozemkových a dalších úřadů, pracovníky výzkumných ústavů a vysokých škol, pracovníky dodavatelských stavebních organizací i další zájemce. Od svého vzniku spolupracovala a stále spolupracuje na tvorbě a novelizaci zákonů, vyhlášek, vládních nařízení, metodik, norem a dalších směrnic, souvisejících s oborem pozemkových úprav.

              CooLAND spolupracuje s ČMKPÚ popularizací tématu pozemkových úprav pořádáním exkurzí a psaním popularizačních článků, jelikož pozemkové úpravy jsou jedním z efektivních nástrojů pro ochranu zemědělské půdy.

              http://www.cmkpu.cz/cmkpu/

              URGENCI

              URGENCI je mezinárodní síť pro rozvoj komunitou podporovaného zemědělství, která sdružuje jednotlivé občany, malé farmáře, spotřebitele i aktivisty a politiky, jejichž cílem je utváření solidárního partnerství mezi producentem a spotřebitelem potravin.

              CooLAND je součástí sítě od roku 2015. Jsme součástí CSA Research Group, jejímž výstupem je například publikace o stavu evropských KPZ: Overview of Community Supported Agriculture in Europe.

              http://urgenci.net/

              Česká společnost ornitologická

              Česká společnost ornitologická je dobrovolým spolkem profesionálů i amatérů, zabývajících se výzkumem a ochranou ptáků, zájemců o pozorování ptáků a milovníků přírody.

              CooLAND se zabývá ochranou ptáků žijících v zemědělské krajině podporou šetrného hospodaření. Zároveň využíváme metodiky ČSO pro výzkum ptačích populací jako indikátoru správného hospodaření zemědělských subjektů.

              www.cso.cz

              PODPORUJÍ NÁS

              Člověk v tísni

              Nevládní nezisková organizace vycházející z myšlenek humanismu, svobody, rovnosti a solidarity, usilující o otevřenou, informovanou, angažovanou a zodpovědnou společnost k problémům doma i za hranicemi naší země.

              V roce 2016 nám Člověk v tísni umožnil uspořádat v prostorách svého centra Langhans výstavu fotografií “Láska ke krajině prochází žaludkem”.

              V roce 2015 jsem podávali grant Ministerstva průmyslu a obchodu na rozvoj ekologického zemědělství v Gruzii, kde byla místní mise Člověka v tísni lokálním partnerem.

              https://www.clovekvtisni.cz

              Czech PR

              Společnost poskytuje poradenské služby v oblasti vztahů s veřejností v České republice, provádí analýzy mediálního trhu a poskytuje komplexní služby v oblasti public relations.

              V roce 2016 nám agentura pomohla s analýzou našich vlastních strategických cílů a rozvojem CooLAND.

              http://www.czechpr.cz/

              Kavárna Havran Café

              Havran Café je malá a útulná kavárna v pražském Karlíně.

              CooLAND má v Havran Café svojí základnu, kde se scházíme a plánujeme. Od roku 2015 zde také každé úterý máme místo pro výdej zeleniny v rámci KPZ CooLAND.

              https://www.facebook.com/havrancafe/

              Nadace Via

              Posláním nadace je otevírání cest k umění žít spolu a umění darovat. Nadace podporuje, vzdělává a propojuje lidi, kteří společně pečují o své okolí a kteří darují druhým.

              CooLAND byl v roce 2015-16 zařazen do projektu VIADUKT, který se zaměřuje na vzdělávání lidí z neziskovek.

              http://www.nadacevia.cz/

              ",0 "ception implements Serializable { private static final long serialVersionUID = 7786141544419367058L; public BuildMetadataServiceException(){ super(); } public BuildMetadataServiceException(String message, Throwable cause){ super(message, cause); } public BuildMetadataServiceException(Throwable cause){ super(cause); } public BuildMetadataServiceException(String msg){ super(msg); } } ",0 "ce 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. */ package com.example.contactcenterinsights; // [START contactcenterinsights_create_issue_model] import com.google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient; import com.google.cloud.contactcenterinsights.v1.IssueModel; import com.google.cloud.contactcenterinsights.v1.LocationName; import java.io.IOException; public class CreateIssueModel { public static void main(String[] args) throws Exception, IOException { // TODO(developer): Replace this variable before running the sample. String projectId = ""my_project_id""; createIssueModel(projectId); } public static IssueModel createIssueModel(String projectId) throws Exception, IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the ""close"" method on the client to safely clean up any remaining background resources. try (ContactCenterInsightsClient client = ContactCenterInsightsClient.create()) { // Construct a parent resource. LocationName parent = LocationName.of(projectId, ""us-central1""); // Construct an issue model. IssueModel issueModel = IssueModel.newBuilder() .setDisplayName(""my-model"") .setInputDataConfig( IssueModel.InputDataConfig.newBuilder().setFilter(""medium=\""CHAT\"""").build()) .build(); // Call the Insights client to create an issue model. IssueModel response = client.createIssueModelAsync(parent, issueModel).get(); System.out.printf(""Created %s%n"", response.getName()); return response; } } } // [END contactcenterinsights_create_issue_model] ",0 "rosystems, Inc. * * See the file ""license.terms"" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id$ */ #include ""tkMenubutton.h"" #include ""tkMacInt.h"" #include #define kShadowOffset (3) /* amount to offset shadow from frame */ #define kTriangleWidth (11) /* width of the triangle */ #define kTriangleHeight (6) /* height of the triangle */ #define kTriangleMargin (5) /* margin around triangle */ /* * Declaration of Unix specific button structure. */ typedef struct MacMenuButton { TkMenuButton info; /* Generic button info. */ } MacMenuButton; /* * The structure below defines menubutton class behavior by means of * procedures that can be invoked from generic window code. */ TkClassProcs tkpMenubuttonClass = { NULL, /* createProc. */ TkMenuButtonWorldChanged, /* geometryProc. */ NULL /* modalProc. */ }; /* *---------------------------------------------------------------------- * * TkpCreateMenuButton -- * * Allocate a new TkMenuButton structure. * * Results: * Returns a newly allocated TkMenuButton structure. * * Side effects: * Registers an event handler for the widget. * *---------------------------------------------------------------------- */ TkMenuButton * TkpCreateMenuButton( Tk_Window tkwin) { MacMenuButton *butPtr = (MacMenuButton *)ckalloc(sizeof(MacMenuButton)); return (TkMenuButton *) butPtr; } /* *---------------------------------------------------------------------- * * TkpDisplayMenuButton -- * * This procedure is invoked to display a menubutton widget. * * Results: * None. * * Side effects: * Commands are output to X to display the menubutton in its * current mode. * *---------------------------------------------------------------------- */ void TkpDisplayMenuButton( ClientData clientData) /* Information about widget. */ { TkMenuButton *mbPtr = (TkMenuButton *) clientData; GC gc; Tk_3DBorder border; int x = 0; /* Initialization needed only to stop * compiler warning. */ int y; Tk_Window tkwin = mbPtr->tkwin; int width, height; MacMenuButton * macMBPtr = (MacMenuButton *) mbPtr; GWorldPtr destPort; CGrafPtr saveWorld; GDHandle saveDevice; MacDrawable *macDraw; mbPtr->flags &= ~REDRAW_PENDING; if ((mbPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { return; } GetGWorld(&saveWorld, &saveDevice); destPort = TkMacGetDrawablePort(Tk_WindowId(tkwin)); SetGWorld(destPort, NULL); macDraw = (MacDrawable *) Tk_WindowId(tkwin); if ((mbPtr->state == STATE_DISABLED) && (mbPtr->disabledFg != NULL)) { gc = mbPtr->disabledGC; } else if ((mbPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(mbPtr->tkwin)) { gc = mbPtr->activeTextGC; } else { gc = mbPtr->normalTextGC; } border = mbPtr->normalBorder; /* * In order to avoid screen flashes, this procedure redraws * the menu button in a pixmap, then copies the pixmap to the * screen in a single operation. This means that there's no * point in time where the on-sreen image has been cleared. */ Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), 0, TK_RELIEF_FLAT); /* * Display image or bitmap or text for button. */ if (mbPtr->image != None) { Tk_SizeOfImage(mbPtr->image, &width, &height); imageOrBitmap: TkComputeAnchor(mbPtr->anchor, tkwin, 0, 0, width + mbPtr->indicatorWidth, height, &x, &y); if (mbPtr->image != NULL) { Tk_RedrawImage(mbPtr->image, 0, 0, width, height, Tk_WindowId(tkwin), x, y); } else { XCopyPlane(mbPtr->display, mbPtr->bitmap, Tk_WindowId(tkwin), gc, 0, 0, (unsigned) width, (unsigned) height, x, y, 1); } } else if (mbPtr->bitmap != None) { Tk_SizeOfBitmap(mbPtr->display, mbPtr->bitmap, &width, &height); goto imageOrBitmap; } else { TkComputeAnchor(mbPtr->anchor, tkwin, mbPtr->padX, mbPtr->padY, mbPtr->textWidth + mbPtr->indicatorWidth, mbPtr->textHeight, &x, &y); Tk_DrawTextLayout(mbPtr->display, Tk_WindowId(tkwin), gc, mbPtr->textLayout, x, y, 0, -1); } /* * If the menu button is disabled with a stipple rather than a special * foreground color, generate the stippled effect. */ if ((mbPtr->state == STATE_DISABLED) && ((mbPtr->disabledFg != NULL) || (mbPtr->image != NULL))) { XFillRectangle(mbPtr->display, Tk_WindowId(tkwin), mbPtr->disabledGC, mbPtr->inset, mbPtr->inset, (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset), (unsigned) (Tk_Height(tkwin) - 2*mbPtr->inset)); } /* * Draw the cascade indicator for the menu button on the * right side of the window, if desired. */ if (mbPtr->indicatorOn) { int w, h, i; Rect r; r.left = macDraw->xOff + Tk_Width(tkwin) - mbPtr->inset - mbPtr->indicatorWidth; r.top = macDraw->yOff + Tk_Height(tkwin)/2 - mbPtr->indicatorHeight/2; r.right = macDraw->xOff + Tk_Width(tkwin) - mbPtr->inset - kTriangleMargin; r.bottom = macDraw->yOff + Tk_Height(tkwin)/2 + mbPtr->indicatorHeight/2; h = mbPtr->indicatorHeight; w = mbPtr->indicatorWidth - 1 - kTriangleMargin; for (i = 0; i < h; i++) { MoveTo(r.left + i, r.top + i); LineTo(r.left + i + w, r.top + i); w -= 2; } } /* * Draw the border and traversal highlight last. This way, if the * menu button's contents overflow onto the border they'll be covered * up by the border. */ TkMacSetUpClippingRgn(Tk_WindowId(tkwin)); if (mbPtr->borderWidth > 0) { Rect r; r.left = macDraw->xOff + mbPtr->highlightWidth + mbPtr->borderWidth; r.top = macDraw->yOff + mbPtr->highlightWidth + mbPtr->borderWidth; r.right = macDraw->xOff + Tk_Width(tkwin) - mbPtr->highlightWidth - mbPtr->borderWidth; r.bottom = macDraw->yOff + Tk_Height(tkwin) - mbPtr->highlightWidth - mbPtr->borderWidth; FrameRect(&r); PenSize(mbPtr->borderWidth - 1, mbPtr->borderWidth - 1); MoveTo(r.right, r.top + kShadowOffset); LineTo(r.right, r.bottom); LineTo(r.left + kShadowOffset, r.bottom); } if (mbPtr->highlightWidth != 0) { GC fgGC, bgGC; bgGC = Tk_GCForColor(mbPtr->highlightBgColorPtr, Tk_WindowId(tkwin)); if (mbPtr->flags & GOT_FOCUS) { fgGC = Tk_GCForColor(mbPtr->highlightColorPtr, Tk_WindowId(tkwin)); TkpDrawHighlightBorder(tkwin, fgGC, bgGC, mbPtr->highlightWidth, Tk_WindowId(tkwin)); } else { TkpDrawHighlightBorder(tkwin, bgGC, bgGC, mbPtr->highlightWidth, Tk_WindowId(tkwin)); } } SetGWorld(saveWorld, saveDevice); } /* *---------------------------------------------------------------------- * * TkpDestroyMenuButton -- * * Free data structures associated with the menubutton control. * * Results: * None. * * Side effects: * Restores the default control state. * *---------------------------------------------------------------------- */ void TkpDestroyMenuButton( TkMenuButton *mbPtr) { } /* *---------------------------------------------------------------------- * * TkpComputeMenuButtonGeometry -- * * After changes in a menu button's text or bitmap, this procedure * recomputes the menu button's geometry and passes this information * along to the geometry manager for the window. * * Results: * None. * * Side effects: * The menu button's window may change size. * *---------------------------------------------------------------------- */ void TkpComputeMenuButtonGeometry(mbPtr) register TkMenuButton *mbPtr; /* Widget record for menu button. */ { int width, height, mm, pixels; mbPtr->inset = mbPtr->highlightWidth + mbPtr->borderWidth; if (mbPtr->image != None) { Tk_SizeOfImage(mbPtr->image, &width, &height); if (mbPtr->width > 0) { width = mbPtr->width; } if (mbPtr->height > 0) { height = mbPtr->height; } } else if (mbPtr->bitmap != None) { Tk_SizeOfBitmap(mbPtr->display, mbPtr->bitmap, &width, &height); if (mbPtr->width > 0) { width = mbPtr->width; } if (mbPtr->height > 0) { height = mbPtr->height; } } else { Tk_FreeTextLayout(mbPtr->textLayout); mbPtr->textLayout = Tk_ComputeTextLayout(mbPtr->tkfont, mbPtr->text, -1, mbPtr->wrapLength, mbPtr->justify, 0, &mbPtr->textWidth, &mbPtr->textHeight); width = mbPtr->textWidth; height = mbPtr->textHeight; if (mbPtr->width > 0) { width = mbPtr->width * Tk_TextWidth(mbPtr->tkfont, ""0"", 1); } if (mbPtr->height > 0) { Tk_FontMetrics fm; Tk_GetFontMetrics(mbPtr->tkfont, &fm); height = mbPtr->height * fm.linespace; } width += 2*mbPtr->padX; height += 2*mbPtr->padY; } if (mbPtr->indicatorOn) { mm = WidthMMOfScreen(Tk_Screen(mbPtr->tkwin)); pixels = WidthOfScreen(Tk_Screen(mbPtr->tkwin)); mbPtr->indicatorHeight= kTriangleHeight; mbPtr->indicatorWidth = kTriangleWidth + kTriangleMargin; width += mbPtr->indicatorWidth; } else { mbPtr->indicatorHeight = 0; mbPtr->indicatorWidth = 0; } Tk_GeometryRequest(mbPtr->tkwin, (int) (width + 2*mbPtr->inset), (int) (height + 2*mbPtr->inset)); Tk_SetInternalBorder(mbPtr->tkwin, mbPtr->inset); } ",0 "ontent=""IE=edge"" /> 归档 | Ice summer bug's notes ",0 "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. */ package org.drools.workbench.screens.guided.dtree.backend.server.indexing.classes; public class Applicant { private int age; public int getAge() { return age; } } ",0 "enerated by javadoc (version 1.7.0_21) on Sun Jul 28 12:47:49 EDT 2013 --> Uses of Class com.thinkaurelius.titan.graphdb.internal.AbstractElement (Titan-Site: Static Webpages and Docs 0.3.2 API)
              • Prev
              • Next

              Uses of Class
              com.thinkaurelius.titan.graphdb.internal.AbstractElement

              • Prev
              • Next

              Copyright © 2012–2013. All rights reserved.

              ",0 "hts reserved. * Distributed under the Terms of Use in http://www.unicode.org/copyright.html. * * @copyright 2008-2013 Yii Software LLC (http://www.yiiframework.com/license/) */ return array ( 'version' => '5798', 'numberSymbols' => array ( 'alias' => '', 'decimal' => '.', 'group' => ',', 'list' => ';', 'percentSign' => '%', 'plusSign' => '+', 'minusSign' => '-', 'exponential' => 'E', 'perMille' => '‰', 'infinity' => '∞', 'nan' => 'NaN', ), 'decimalFormat' => '#,##0.###', 'scientificFormat' => '#E0', 'percentFormat' => '#,##0%', 'currencyFormat' => '¤ #,##0.00', 'currencySymbols' => array ( 'AUD' => 'AU$', 'BRL' => 'R$', 'CAD' => 'CA$', 'CNY' => 'CN¥', 'EUR' => '€', 'GBP' => '£', 'HKD' => 'HK$', 'ILS' => '₪', 'INR' => '₹', 'JPY' => 'JP¥', 'KRW' => '₩', 'MXN' => 'MX$', 'NZD' => 'NZ$', 'THB' => '฿', 'TWD' => 'NT$', 'USD' => 'US$', 'VND' => '₫', 'XAF' => 'FCFA', 'XCD' => 'EC$', 'XOF' => 'CFA', 'XPF' => 'CFPF', 'NGN' => '₦', ), 'monthNames' => array ( 'wide' => array ( 1 => 'Zwat Juwung', 2 => 'Zwat Swiyang', 3 => 'Zwat Tsat', 4 => 'Zwat Nyai', 5 => 'Zwat Tswon', 6 => 'Zwat Ataah', 7 => 'Zwat Anatat', 8 => 'Zwat Arinai', 9 => 'Zwat Akubunyung', 10 => 'Zwat Swag', 11 => 'Zwat Mangjuwang', 12 => 'Zwat Swag-Ma-Suyang', ), 'abbreviated' => array ( 1 => 'Juw', 2 => 'Swi', 3 => 'Tsa', 4 => 'Nya', 5 => 'Tsw', 6 => 'Ata', 7 => 'Ana', 8 => 'Ari', 9 => 'Aku', 10 => 'Swa', 11 => 'Man', 12 => 'Mas', ), ), 'monthNamesSA' => array ( 'narrow' => array ( 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => '10', 11 => '11', 12 => '12', ), ), 'weekDayNames' => array ( 'wide' => array ( 0 => 'Ladi', 1 => 'Tanii', 2 => 'Talata', 3 => 'Larba', 4 => 'Lamit', 5 => 'Juma', 6 => 'Asabat', ), 'abbreviated' => array ( 0 => 'Lad', 1 => 'Tan', 2 => 'Tal', 3 => 'Lar', 4 => 'Lam', 5 => 'Jum', 6 => 'Asa', ), ), 'weekDayNamesSA' => array ( 'narrow' => array ( 0 => '1', 1 => '2', 2 => '3', 3 => '4', 4 => '5', 5 => '6', 6 => '7', ), ), 'eraNames' => array ( 'abbreviated' => array ( 0 => 'GM', 1 => 'M', ), 'wide' => array ( 0 => 'Gabanin Miladi', 1 => 'Miladi', ), 'narrow' => array ( 0 => 'GM', 1 => 'M', ), ), 'dateFormats' => array ( 'full' => 'EEEE, y MMMM dd', 'long' => 'y MMMM d', 'medium' => 'y MMM d', 'short' => 'yy/MM/dd', ), 'timeFormats' => array ( 'full' => 'HH:mm:ss zzzz', 'long' => 'HH:mm:ss z', 'medium' => 'HH:mm:ss', 'short' => 'HH:mm', ), 'dateTimeFormat' => '{1} {0}', 'amName' => 'AM', 'pmName' => 'PM', 'orientation' => 'ltr', 'pluralRules' => array ( 0 => 'n==1', 1 => 'true', ), ); ",0 "0-9\]\[^\{\]"" 1 } } */ /* { dg-final { scan-assembler-times ""vpmovzxbq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]"" 1 } } */ /* { dg-final { scan-assembler-times ""vpmovzxbq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}"" 1 } } */ #include volatile __m128i s; volatile __m512i res; volatile __mmask8 m; void extern avx512f_test (void) { res = _mm512_cvtepu8_epi64 (s); res = _mm512_mask_cvtepu8_epi64 (res, m, s); res = _mm512_maskz_cvtepu8_epi64 (m, s); } ",0 "rm.container.Interface; import org.wildfly.swarm.spi.api.Customizer; import org.wildfly.swarm.spi.runtime.annotations.Post; import org.wildfly.swarm.webservices.WebServicesFraction; /** * @author Bob McWhirter */ @Post @ApplicationScoped public class WSDLHostCustomizer implements Customizer { @Inject Interface iface; @Inject WebServicesFraction fraction; @Override public void customize() { if (fraction.wsdlHost() == null) { fraction.wsdlHost(this.iface.getExpression()); } } } ",0 " to any person obtaining a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package mrkoopa.jfbx; public interface FbxCameraStereo extends FbxCamera { } ",0 ". */ /* * Copyright 2004,2005 The Apache Software Foundation. * * 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. */ package com.sun.org.apache.xerces.internal.impl.dv.xs; import java.math.BigInteger; import javax.xml.datatype.DatatypeConstants; import javax.xml.datatype.Duration; import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException; import com.sun.org.apache.xerces.internal.impl.dv.ValidationContext; /** * Used to validate the type * * @xerces.internal * * @author Ankit Pasricha, IBM * * @version $Id: YearMonthDurationDV.java,v 1.6 2010-11-01 04:39:47 joehw Exp $ */ class YearMonthDurationDV extends DurationDV { public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { try { return parse(content, DurationDV.YEARMONTHDURATION_TYPE); } catch (Exception ex) { throw new InvalidDatatypeValueException(""cvc-datatype-valid.1.2.1"", new Object[]{content, ""yearMonthDuration""}); } } protected Duration getDuration(DateTimeData date) { int sign = 1; if ( date.year<0 || date.month<0) { sign = -1; } return datatypeFactory.newDuration(sign == 1, date.year != DatatypeConstants.FIELD_UNDEFINED?BigInteger.valueOf(sign*date.year):null, date.month != DatatypeConstants.FIELD_UNDEFINED?BigInteger.valueOf(sign*date.month):null, null, null, null, null); } } ",0 "* * Class AbstractPaymentResponse * @package Mpay24\Responses * * @author mPAY24 GmbH * @author Stefan Polzer * @filesource AbstractPaymentResponse.php * @license MIT */ abstract class AbstractPaymentResponse extends AbstractResponse { /** * @var int */ protected $mpayTid; /** * @var int */ protected $errNo; /** * @var string */ protected $errText; /** * @var string */ protected $location; /** * AbstractPaymentResponse constructor. * * @param string $response */ public function __construct($response) { parent::__construct($response); } /** * @return int */ public function getMpayTid() { return $this->mpayTid; } /** * @return int */ public function getErrNo() { return $this->errNo; } /** * @return string */ public function getErrText() { return $this->errText; } /** * @return string */ public function getLocation() { return $this->location; } /** * Parse the SelectPaymentResponse message and save the data to the corresponding attributes * * @param \DOMElement $body */ protected function parseResponse($body) { if (!$body instanceof \DOMElement) { return; } if ($body->getElementsByTagName('mpayTID')->length > 0) { $this->mpayTid = (int)$body->getElementsByTagName('mpayTID')->item(0)->nodeValue; } if ($body->getElementsByTagName('errNo')->length > 0) { $this->errNo = (int)$body->getElementsByTagName('errNo')->item(0)->nodeValue; } if ($body->getElementsByTagName('errText')->length > 0) { $this->errText = $body->getElementsByTagName('errText')->item(0)->nodeValue; } if ($body->getElementsByTagName('location')->length > 0) { $this->location = $body->getElementsByTagName('location')->item(0)->nodeValue; } } } ",0 "work for additional information regarding * copyright ownership. The ASF licenses this file to You 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. */ package org.apache.geode.distributed.internal.membership; import org.apache.geode.distributed.internal.DMStats; import org.apache.geode.distributed.internal.DistributionConfig; import org.apache.geode.distributed.internal.LocatorStats; import org.apache.geode.distributed.internal.membership.gms.NetLocator; import org.apache.geode.internal.admin.remote.RemoteTransportConfig; import org.apache.geode.internal.security.SecurityService; import java.io.File; import java.net.InetAddress; /** * This is the SPI for a provider of membership services. * * @see org.apache.geode.distributed.internal.membership.NetMember */ public interface MemberServices { /** * Return a new NetMember, possibly for a different host * * @param i the name of the host for the specified NetMember, the current host (hopefully) if * there are any problems. * @param port the membership port * @param splitBrainEnabled whether the member has this feature enabled * @param canBeCoordinator whether the member can be membership coordinator * @param payload the payload to be associated with the resulting object * @param version TODO * @return the new NetMember */ public abstract NetMember newNetMember(InetAddress i, int port, boolean splitBrainEnabled, boolean canBeCoordinator, MemberAttributes payload, short version); /** * Return a new NetMember representing current host * * @param i an InetAddress referring to the current host * @param port the membership port being used * * @return the new NetMember */ public abstract NetMember newNetMember(InetAddress i, int port); /** * Return a new NetMember representing current host * * @param s a String referring to the current host * @param p the membership port being used * @return the new member */ public abstract NetMember newNetMember(String s, int p); /** * Create a new MembershipManager * * @param listener the listener to notify for callbacks * @param transport holds configuration information that can be used by the manager to configure * itself * @param stats a gemfire statistics collection object for communications stats * * @return a MembershipManager */ public abstract MembershipManager newMembershipManager(DistributedMembershipListener listener, DistributionConfig config, RemoteTransportConfig transport, DMStats stats, SecurityService securityService); /** * currently this is a test method but it ought to be used by InternalLocator to create the peer * location TcpHandler */ public abstract NetLocator newLocatorHandler(InetAddress bindAddress, File stateFile, String locatorString, boolean usePreferredCoordinators, boolean networkPartitionDetectionEnabled, LocatorStats stats, String securityUDPDHAlgo); } ",0 " of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !--> OMeta/JS 2.0 Workspace
              important info:
              go to project:

              OMeta/JS 2.0 Workspace

              Instructions
              The text area below (source) works like a Smalltalk workspace:
            8. To evaluate some code, just select it and press the button.
            9. Pressing without a selection evaluates the line that the cursor is on.
            10. is like , but it also prints the result.
            11. Also, you can press to save the current project.
              Play Area
              Source


              Translation
              Transcript
              To learn more about OMeta, click here.
              ",0 "s (useful to generate conditional code) */ #unassert keyclass #assert keyclass(Short) #unassert keys #assert keys(primitive) #unassert valueclass #assert valueclass(Float) #unassert values #assert values(primitive) /* Current type and class (and size, if applicable) */ #define KEY_TYPE short #define VALUE_TYPE float #define KEY_CLASS Short #define VALUE_CLASS Float #if #keyclass(Object) || #keyclass(Reference) #define KEY_GENERIC_CLASS K #define KEY_GENERIC_TYPE K #define KEY_GENERIC #define KEY_GENERIC_WILDCARD #define KEY_EXTENDS_GENERIC #define KEY_SUPER_GENERIC #define KEY_GENERIC_CAST (K) #define KEY_GENERIC_ARRAY_CAST (K[]) #define KEY_GENERIC_BIG_ARRAY_CAST (K[][]) #else #define KEY_GENERIC_CLASS KEY_CLASS #define KEY_GENERIC_TYPE KEY_TYPE #define KEY_GENERIC #define KEY_GENERIC_WILDCARD #define KEY_EXTENDS_GENERIC #define KEY_SUPER_GENERIC #define KEY_GENERIC_CAST #define KEY_GENERIC_ARRAY_CAST #define KEY_GENERIC_BIG_ARRAY_CAST #endif #if #valueclass(Object) || #valueclass(Reference) #define VALUE_GENERIC_CLASS V #define VALUE_GENERIC_TYPE V #define VALUE_GENERIC #define VALUE_EXTENDS_GENERIC #define VALUE_GENERIC_CAST (V) #define VALUE_GENERIC_ARRAY_CAST (V[]) #else #define VALUE_GENERIC_CLASS VALUE_CLASS #define VALUE_GENERIC_TYPE VALUE_TYPE #define VALUE_GENERIC #define VALUE_EXTENDS_GENERIC #define VALUE_GENERIC_CAST #define VALUE_GENERIC_ARRAY_CAST #endif #if #keyclass(Object) || #keyclass(Reference) #if #valueclass(Object) || #valueclass(Reference) #define KEY_VALUE_GENERIC #define KEY_VALUE_EXTENDS_GENERIC #else #define KEY_VALUE_GENERIC #define KEY_VALUE_EXTENDS_GENERIC #endif #else #if #valueclass(Object) || #valueclass(Reference) #define KEY_VALUE_GENERIC #define KEY_VALUE_EXTENDS_GENERIC #else #define KEY_VALUE_GENERIC #define KEY_VALUE_EXTENDS_GENERIC #endif #endif /* Value methods */ #define KEY_VALUE shortValue #define VALUE_VALUE floatValue /* Interfaces (keys) */ #define COLLECTION ShortCollection #define SET ShortSet #define HASH ShortHash #define SORTED_SET ShortSortedSet #define STD_SORTED_SET ShortSortedSet #define FUNCTION Short2FloatFunction #define MAP Short2FloatMap #define SORTED_MAP Short2FloatSortedMap #if #keyclass(Object) || #keyclass(Reference) #define STD_SORTED_MAP SortedMap #define STRATEGY Strategy #else #define STD_SORTED_MAP Short2FloatSortedMap #define STRATEGY PACKAGE.ShortHash.Strategy #endif #define LIST ShortList #define BIG_LIST ShortBigList #define STACK ShortStack #define PRIORITY_QUEUE ShortPriorityQueue #define INDIRECT_PRIORITY_QUEUE ShortIndirectPriorityQueue #define INDIRECT_DOUBLE_PRIORITY_QUEUE ShortIndirectDoublePriorityQueue #define KEY_ITERATOR ShortIterator #define KEY_ITERABLE ShortIterable #define KEY_BIDI_ITERATOR ShortBidirectionalIterator #define KEY_LIST_ITERATOR ShortListIterator #define KEY_BIG_LIST_ITERATOR ShortBigListIterator #define STD_KEY_ITERATOR ShortIterator #define KEY_COMPARATOR ShortComparator /* Interfaces (values) */ #define VALUE_COLLECTION FloatCollection #define VALUE_ARRAY_SET FloatArraySet #define VALUE_ITERATOR FloatIterator #define VALUE_LIST_ITERATOR FloatListIterator /* Abstract implementations (keys) */ #define ABSTRACT_COLLECTION AbstractShortCollection #define ABSTRACT_SET AbstractShortSet #define ABSTRACT_SORTED_SET AbstractShortSortedSet #define ABSTRACT_FUNCTION AbstractShort2FloatFunction #define ABSTRACT_MAP AbstractShort2FloatMap #define ABSTRACT_FUNCTION AbstractShort2FloatFunction #define ABSTRACT_SORTED_MAP AbstractShort2FloatSortedMap #define ABSTRACT_LIST AbstractShortList #define ABSTRACT_BIG_LIST AbstractShortBigList #define SUBLIST ShortSubList #define ABSTRACT_PRIORITY_QUEUE AbstractShortPriorityQueue #define ABSTRACT_STACK AbstractShortStack #define KEY_ABSTRACT_ITERATOR AbstractShortIterator #define KEY_ABSTRACT_BIDI_ITERATOR AbstractShortBidirectionalIterator #define KEY_ABSTRACT_LIST_ITERATOR AbstractShortListIterator #define KEY_ABSTRACT_BIG_LIST_ITERATOR AbstractShortBigListIterator #if #keyclass(Object) #define KEY_ABSTRACT_COMPARATOR Comparator #else #define KEY_ABSTRACT_COMPARATOR AbstractShortComparator #endif /* Abstract implementations (values) */ #define VALUE_ABSTRACT_COLLECTION AbstractFloatCollection #define VALUE_ABSTRACT_ITERATOR AbstractFloatIterator #define VALUE_ABSTRACT_BIDI_ITERATOR AbstractFloatBidirectionalIterator /* Static containers (keys) */ #define COLLECTIONS ShortCollections #define SETS ShortSets #define SORTED_SETS ShortSortedSets #define LISTS ShortLists #define BIG_LISTS ShortBigLists #define MAPS Short2FloatMaps #define FUNCTIONS Short2FloatFunctions #define SORTED_MAPS Short2FloatSortedMaps #define PRIORITY_QUEUES ShortPriorityQueues #define HEAPS ShortHeaps #define SEMI_INDIRECT_HEAPS ShortSemiIndirectHeaps #define INDIRECT_HEAPS ShortIndirectHeaps #define ARRAYS ShortArrays #define BIG_ARRAYS ShortBigArrays #define ITERATORS ShortIterators #define BIG_LIST_ITERATORS ShortBigListIterators #define COMPARATORS ShortComparators /* Static containers (values) */ #define VALUE_COLLECTIONS FloatCollections #define VALUE_SETS FloatSets #define VALUE_ARRAYS FloatArrays /* Implementations */ #define OPEN_HASH_SET ShortOpenCustomHashSet #define OPEN_HASH_BIG_SET ShortOpenCustomHashBigSet #define OPEN_DOUBLE_HASH_SET ShortOpenCustomDoubleHashSet #define OPEN_HASH_MAP Short2FloatOpenCustomHashMap #define STRIPED_OPEN_HASH_MAP StripedShort2FloatOpenCustomHashMap #define OPEN_DOUBLE_HASH_MAP Short2FloatOpenCustomDoubleHashMap #define ARRAY_SET ShortArraySet #define ARRAY_MAP Short2FloatArrayMap #define LINKED_OPEN_HASH_SET ShortLinkedOpenHashSet #define AVL_TREE_SET ShortAVLTreeSet #define RB_TREE_SET ShortRBTreeSet #define AVL_TREE_MAP Short2FloatAVLTreeMap #define RB_TREE_MAP Short2FloatRBTreeMap #define ARRAY_LIST ShortArrayList #define BIG_ARRAY_BIG_LIST ShortBigArrayBigList #define ARRAY_FRONT_CODED_LIST ShortArrayFrontCodedList #define HEAP_PRIORITY_QUEUE ShortHeapPriorityQueue #define HEAP_SEMI_INDIRECT_PRIORITY_QUEUE ShortHeapSemiIndirectPriorityQueue #define HEAP_INDIRECT_PRIORITY_QUEUE ShortHeapIndirectPriorityQueue #define HEAP_SESQUI_INDIRECT_DOUBLE_PRIORITY_QUEUE ShortHeapSesquiIndirectDoublePriorityQueue #define HEAP_INDIRECT_DOUBLE_PRIORITY_QUEUE ShortHeapIndirectDoublePriorityQueue #define ARRAY_FIFO_QUEUE ShortArrayFIFOQueue #define ARRAY_PRIORITY_QUEUE ShortArrayPriorityQueue #define ARRAY_INDIRECT_PRIORITY_QUEUE ShortArrayIndirectPriorityQueue #define ARRAY_INDIRECT_DOUBLE_PRIORITY_QUEUE ShortArrayIndirectDoublePriorityQueue /* Synchronized wrappers */ #define SYNCHRONIZED_COLLECTION SynchronizedShortCollection #define SYNCHRONIZED_SET SynchronizedShortSet #define SYNCHRONIZED_SORTED_SET SynchronizedShortSortedSet #define SYNCHRONIZED_FUNCTION SynchronizedShort2FloatFunction #define SYNCHRONIZED_MAP SynchronizedShort2FloatMap #define SYNCHRONIZED_LIST SynchronizedShortList /* Unmodifiable wrappers */ #define UNMODIFIABLE_COLLECTION UnmodifiableShortCollection #define UNMODIFIABLE_SET UnmodifiableShortSet #define UNMODIFIABLE_SORTED_SET UnmodifiableShortSortedSet #define UNMODIFIABLE_FUNCTION UnmodifiableShort2FloatFunction #define UNMODIFIABLE_MAP UnmodifiableShort2FloatMap #define UNMODIFIABLE_LIST UnmodifiableShortList #define UNMODIFIABLE_KEY_ITERATOR UnmodifiableShortIterator #define UNMODIFIABLE_KEY_BIDI_ITERATOR UnmodifiableShortBidirectionalIterator #define UNMODIFIABLE_KEY_LIST_ITERATOR UnmodifiableShortListIterator /* Other wrappers */ #define KEY_READER_WRAPPER ShortReaderWrapper #define KEY_DATA_INPUT_WRAPPER ShortDataInputWrapper /* Methods (keys) */ #define NEXT_KEY nextShort #define PREV_KEY previousShort #define FIRST_KEY firstShortKey #define LAST_KEY lastShortKey #define GET_KEY getShort #define REMOVE_KEY removeShort #define READ_KEY readShort #define WRITE_KEY writeShort #define DEQUEUE dequeueShort #define DEQUEUE_LAST dequeueLastShort #define SUBLIST_METHOD shortSubList #define SINGLETON_METHOD shortSingleton #define FIRST firstShort #define LAST lastShort #define TOP topShort #define PEEK peekShort #define POP popShort #define KEY_ITERATOR_METHOD shortIterator #define KEY_LIST_ITERATOR_METHOD shortListIterator #define KEY_EMPTY_ITERATOR_METHOD emptyShortIterator #define AS_KEY_ITERATOR asShortIterator #define TO_KEY_ARRAY toShortArray #define ENTRY_GET_KEY getShortKey #define REMOVE_FIRST_KEY removeFirstShort #define REMOVE_LAST_KEY removeLastShort #define PARSE_KEY parseShort #define LOAD_KEYS loadShorts #define LOAD_KEYS_BIG loadShortsBig #define STORE_KEYS storeShorts /* Methods (values) */ #define NEXT_VALUE nextFloat #define PREV_VALUE previousFloat #define READ_VALUE readFloat #define WRITE_VALUE writeFloat #define VALUE_ITERATOR_METHOD floatIterator #define ENTRY_GET_VALUE getFloatValue #define REMOVE_FIRST_VALUE removeFirstFloat #define REMOVE_LAST_VALUE removeLastFloat /* Methods (keys/values) */ #define ENTRYSET short2FloatEntrySet /* Methods that have special names depending on keys (but the special names depend on values) */ #if #keyclass(Object) || #keyclass(Reference) #define GET_VALUE getFloat #define REMOVE_VALUE removeFloat #else #define GET_VALUE get #define REMOVE_VALUE remove #endif /* Equality */ #ifdef Custom #define KEY_EQUALS(x,y) ( strategy.equals( (x), KEY_GENERIC_CAST (y) ) ) #else #if #keyclass(Object) #define KEY_EQUALS(x,y) ( (x) == null ? (y) == null : (x).equals(y) ) #define KEY_EQUALS_NOT_NULL(x,y) ( (x).equals(y) ) #else #define KEY_EQUALS(x,y) ( (x) == (y) ) #define KEY_EQUALS_NOT_NULL(x,y) ( (x) == (y) ) #endif #endif #if #valueclass(Object) #define VALUE_EQUALS(x,y) ( (x) == null ? (y) == null : (x).equals(y) ) #else #define VALUE_EQUALS(x,y) ( (x) == (y) ) #endif /* Object/Reference-only definitions (keys) */ #if #keyclass(Object) || #keyclass(Reference) #define REMOVE remove #define KEY_OBJ2TYPE(x) (x) #define KEY_CLASS2TYPE(x) (x) #define KEY2OBJ(x) (x) #if #keyclass(Object) #ifdef Custom #define KEY2JAVAHASH(x) ( strategy.hashCode( KEY_GENERIC_CAST (x)) ) #define KEY2INTHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( strategy.hashCode( KEY_GENERIC_CAST (x)) ) ) #define KEY2LONGHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)strategy.hashCode( KEY_GENERIC_CAST (x)) ) ) #else #define KEY2JAVAHASH(x) ( (x) == null ? 0 : (x).hashCode() ) #define KEY2INTHASH(x) ( (x) == null ? 0x87fcd5c : it.unimi.dsi.fastutil.HashCommon.murmurHash3( (x).hashCode() ) ) #define KEY2LONGHASH(x) ( (x) == null ? 0x810879608e4259ccL : it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)(x).hashCode() ) ) #endif #else #define KEY2JAVAHASH(x) ( (x) == null ? 0 : System.identityHashCode(x) ) #define KEY2INTHASH(x) ( (x) == null ? 0x87fcd5c : it.unimi.dsi.fastutil.HashCommon.murmurHash3( System.identityHashCode(x) ) ) #define KEY2LONGHASH(x) ( (x) == null ? 0x810879608e4259ccL : it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)System.identityHashCode(x) ) ) #endif #define KEY_CMP(x,y) ( ((Comparable)(x)).compareTo(y) ) #define KEY_CMP_EQ(x,y) ( ((Comparable)(x)).compareTo(y) == 0 ) #define KEY_LESS(x,y) ( ((Comparable)(x)).compareTo(y) < 0 ) #define KEY_LESSEQ(x,y) ( ((Comparable)(x)).compareTo(y) <= 0 ) #define KEY_NULL (null) #else /* Primitive-type-only definitions (keys) */ #define REMOVE rem #define KEY_CLASS2TYPE(x) ((x).KEY_VALUE()) #define KEY_OBJ2TYPE(x) (KEY_CLASS2TYPE((KEY_CLASS)(x))) #define KEY2OBJ(x) (KEY_CLASS.valueOf(x)) #if #keyclass(Boolean) #define KEY_CMP_EQ(x,y) ( (x) == (y) ) #define KEY_NULL (false) #define KEY_CMP(x,y) ( !(x) && (y) ? -1 : ( (x) == (y) ? 0 : 1 ) ) #define KEY_LESS(x,y) ( !(x) && (y) ) #define KEY_LESSEQ(x,y) ( !(x) || (y) ) #else #define KEY_NULL ((KEY_TYPE)0) #if #keyclass(Float) || #keyclass(Double) #define KEY_CMP_EQ(x,y) ( KEY_CLASS.compare((x),(y)) == 0 ) #define KEY_CMP(x,y) ( KEY_CLASS.compare((x),(y)) ) #define KEY_LESS(x,y) ( KEY_CLASS.compare((x),(y)) < 0 ) #define KEY_LESSEQ(x,y) ( KEY_CLASS.compare((x),(y)) <= 0 ) #else #define KEY_CMP_EQ(x,y) ( (x) == (y) ) #define KEY_CMP(x,y) ( (x) < (y) ? -1 : ( (x) == (y) ? 0 : 1 ) ) #define KEY_LESS(x,y) ( (x) < (y) ) #define KEY_LESSEQ(x,y) ( (x) <= (y) ) #endif #if #keyclass(Float) #define KEY2LEXINT(x) fixFloat(x) #elif #keyclass(Double) #define KEY2LEXINT(x) fixDouble(x) #else #define KEY2LEXINT(x) (x) #endif #endif #ifdef Custom #define KEY2JAVAHASH(x) ( strategy.hashCode(x) ) #define KEY2INTHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( strategy.hashCode(x) ) ) #define KEY2LONGHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)strategy.hashCode(x) ) ) #else #if #keyclass(Float) #define KEY2JAVAHASH(x) it.unimi.dsi.fastutil.HashCommon.float2int(x) #define KEY2INTHASH(x) it.unimi.dsi.fastutil.HashCommon.murmurHash3( it.unimi.dsi.fastutil.HashCommon.float2int(x) ) #define KEY2LONGHASH(x) it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)it.unimi.dsi.fastutil.HashCommon.float2int(x) ) #elif #keyclass(Double) #define KEY2JAVAHASH(x) it.unimi.dsi.fastutil.HashCommon.double2int(x) #define KEY2INTHASH(x) (int)it.unimi.dsi.fastutil.HashCommon.murmurHash3(Double.doubleToRawLongBits(x)) #define KEY2LONGHASH(x) it.unimi.dsi.fastutil.HashCommon.murmurHash3(Double.doubleToRawLongBits(x)) #elif #keyclass(Long) #define KEY2JAVAHASH(x) it.unimi.dsi.fastutil.HashCommon.long2int(x) #define KEY2INTHASH(x) (int)it.unimi.dsi.fastutil.HashCommon.murmurHash3(x) #define KEY2LONGHASH(x) it.unimi.dsi.fastutil.HashCommon.murmurHash3(x) #elif #keyclass(Boolean) #define KEY2JAVAHASH(x) ((x) ? 1231 : 1237) #define KEY2INTHASH(x) ((x) ? 0xfab5368 : 0xcba05e7b) #define KEY2LONGHASH(x) ((x) ? 0x74a19fc8b6428188L : 0xbaeca2031a4fd9ecL) #else #define KEY2JAVAHASH(x) (x) #define KEY2INTHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (x) ) ) #define KEY2LONGHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)(x) ) ) #endif #endif #endif /* Object/Reference-only definitions (values) */ #if #valueclass(Object) || #valueclass(Reference) #define VALUE_OBJ2TYPE(x) (x) #define VALUE_CLASS2TYPE(x) (x) #define VALUE2OBJ(x) (x) #if #valueclass(Object) #define VALUE2JAVAHASH(x) ( (x) == null ? 0 : (x).hashCode() ) #else #define VALUE2JAVAHASH(x) ( (x) == null ? 0 : System.identityHashCode(x) ) #endif #define VALUE_NULL (null) #define OBJECT_DEFAULT_RETURN_VALUE (this.defRetValue) #else /* Primitive-type-only definitions (values) */ #define VALUE_CLASS2TYPE(x) ((x).VALUE_VALUE()) #define VALUE_OBJ2TYPE(x) (VALUE_CLASS2TYPE((VALUE_CLASS)(x))) #define VALUE2OBJ(x) (VALUE_CLASS.valueOf(x)) #if #valueclass(Float) || #valueclass(Double) || #valueclass(Long) #define VALUE_NULL (0) #define VALUE2JAVAHASH(x) it.unimi.dsi.fastutil.HashCommon.float2int(x) #elif #valueclass(Boolean) #define VALUE_NULL (false) #define VALUE2JAVAHASH(x) (x ? 1231 : 1237) #else #if #valueclass(Integer) #define VALUE_NULL (0) #else #define VALUE_NULL ((VALUE_TYPE)0) #endif #define VALUE2JAVAHASH(x) (x) #endif #define OBJECT_DEFAULT_RETURN_VALUE (null) #endif #include ""drv/OpenCustomHashMap.drv"" ",0 "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 */ /** * Copyright [2009-2010] [dennis zhuang(killme2008@gmail.com)] 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 */ package net.rubyeye.xmemcached.command.text; import java.util.Collection; import java.util.concurrent.CountDownLatch; import net.rubyeye.xmemcached.command.Command; import net.rubyeye.xmemcached.command.CommandType; import net.rubyeye.xmemcached.transcoders.CachedData; /** * Get command for text protocol * * @author dennis * */ public class TextGetOneCommand extends TextGetCommand { public TextGetOneCommand(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch) { super(key, keyBytes, cmdType, latch); } @Override public void dispatch() { if (this.mergeCount < 0) { // single get if (this.returnValues.get(this.getKey()) == null) { if (!this.wasFirst) { decodeError(); } else { this.countDownLatch(); } } else { CachedData data = this.returnValues.get(this.getKey()); setResult(data); this.countDownLatch(); } } else { // merge get // Collection mergeCommands = mergeCommands.values(); getIoBuffer().free(); for (Command nextCommand : mergeCommands.values()) { TextGetCommand textGetCommand = (TextGetCommand) nextCommand; textGetCommand.countDownLatch(); if (textGetCommand.assocCommands != null) { for (Command assocCommand : textGetCommand.assocCommands) { assocCommand.countDownLatch(); } } } } } } ",0 "ed by javadoc on Fri Nov 26 15:38:56 EST 2010 --> Xerces Native Interface: Package org.apache.xerces.xni org.apache.xerces.xni
              Interfaces 
              Augmentations
              NamespaceContext
              XMLAttributes
              XMLDocumentFragmentHandler
              XMLDocumentHandler
              XMLDTDContentModelHandler
              XMLDTDHandler
              XMLLocator
              XMLResourceIdentifier
              Classes 
              QName
              XMLString
              Exceptions 
              XNIException
              ",0 "CENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_InfoCard * @subpackage Zend_InfoCard_Xml * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** * Zend_InfoCard_Xml_Element */ require_once 'Zend/InfoCard/Xml/Element.php'; /** * Represents a SecurityTokenReference XML block * * @category Zend * @package Zend_InfoCard * @subpackage Zend_InfoCard_Xml * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_InfoCard_Xml_SecurityTokenReference extends Zend_InfoCard_Xml_Element { /** * Base64 Binary Encoding URI */ const ENCODING_BASE64BIN = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'; /** * Return an instance of the object based on the input XML * * @param string $xmlData The SecurityTokenReference XML Block * @return Zend_InfoCard_Xml_SecurityTokenReference * @throws Zend_InfoCard_Xml_Exception */ static public function getInstance($xmlData) { if($xmlData instanceof Zend_InfoCard_Xml_Element) { $strXmlData = $xmlData->asXML(); } else if (is_string($xmlData)) { $strXmlData = $xmlData; } else { throw new Zend_InfoCard_Xml_Exception(""Invalid Data provided to create instance""); } $sxe = simplexml_load_string($strXmlData); if($sxe->getName() != ""SecurityTokenReference"") { throw new Zend_InfoCard_Xml_Exception(""Invalid XML Block provided for SecurityTokenReference""); } return simplexml_load_string($strXmlData, ""Zend_InfoCard_Xml_SecurityTokenReference""); } /** * Return the Key Identifier XML Object * * @return Zend_InfoCard_Xml_Element * @throws Zend_InfoCard_Xml_Exception */ protected function _getKeyIdentifier() { $this->registerXPathNamespace('o', 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'); list($keyident) = $this->xpath('//o:KeyIdentifier'); if(!($keyident instanceof Zend_InfoCard_Xml_Element)) { throw new Zend_InfoCard_Xml_Exception(""Failed to retrieve Key Identifier""); } return $keyident; } /** * Return the Key URI identifying the thumbprint type used * * @return string The thumbprint type URI * @throws Zend_InfoCard_Xml_Exception */ public function getKeyThumbprintType() { $keyident = $this->_getKeyIdentifier(); $dom = self::convertToDOM($keyident); if(!$dom->hasAttribute('ValueType')) { throw new Zend_InfoCard_Xml_Exception(""Key Identifier did not provide a type for the value""); } return $dom->getAttribute('ValueType'); } /** * Return the thumbprint encoding type used as a URI * * @return string the URI of the thumbprint encoding used * @throws Zend_InfoCard_Xml_Exception */ public function getKeyThumbprintEncodingType() { $keyident = $this->_getKeyIdentifier(); $dom = self::convertToDOM($keyident); if(!$dom->hasAttribute('EncodingType')) { throw new Zend_InfoCard_Xml_Exception(""Unable to determine the encoding type for the key identifier""); } return $dom->getAttribute('EncodingType'); } /** * Get the key reference data used to identify the public key * * @param bool $decode if true, will return a decoded version of the key * @return string the key reference thumbprint, either in binary or encoded form * @throws Zend_InfoCard_Xml_Exception */ public function getKeyReference($decode = true) { $keyIdentifier = $this->_getKeyIdentifier(); $dom = self::convertToDOM($keyIdentifier); $encoded = $dom->nodeValue; if(empty($encoded)) { throw new Zend_InfoCard_Xml_Exception(""Could not find the Key Reference Encoded Value""); } if($decode) { $decoded = """"; switch($this->getKeyThumbprintEncodingType()) { case self::ENCODING_BASE64BIN: if(version_compare(PHP_VERSION, ""5.2.0"", "">="")) { $decoded = base64_decode($encoded, true); } else { $decoded = base64_decode($encoded); } break; default: throw new Zend_InfoCard_Xml_Exception(""Unknown Key Reference Encoding Type: {$this->getKeyThumbprintEncodingType()}""); } if(!$decoded || empty($decoded)) { throw new Zend_InfoCard_Xml_Exception(""Failed to decode key reference""); } return $decoded; } return $encoded; } } ",0 ".org/1999/xhtml"">

              widoh

              Widoh Projects

              Whatever the technology project, the more playful the better. No business cases required.

              CSS copyright: © 2008, Cefn Hoile, inspired by Adam Particka's orangray.
              ",0 "a name=""generator"" content=""rustdoc""> wayland_kbd::ffi::keysyms::XKB_KEY_F14 - Rust

              wayland_kbd::ffi::keysyms

              wayland_kbd::ffi::keysyms::XKB_KEY_F14 [] [src]

              pub const XKB_KEY_F14: u32 = 0xffcb

              Keyboard Shortcuts

              ?
              Show this help dialog
              S
              Focus the search field
              Move up in search results
              Move down in search results
              Go to active search result

              Search Tricks

              Prefix searches with a type followed by a colon (e.g. fn:) to restrict the search to a given type.

              Accepted types are: fn, mod, struct, enum, trait, type, macro, and const.

              Search functions by type signature (e.g. vec -> usize)

              ",0 " 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. *******************************************************************************/ package com.intuit.wasabi.auditlogobjects; import com.intuit.wasabi.eventlog.events.BucketCreateEvent; import com.intuit.wasabi.eventlog.events.BucketEvent; import com.intuit.wasabi.eventlog.events.ChangeEvent; import com.intuit.wasabi.eventlog.events.EventLogEvent; import com.intuit.wasabi.eventlog.events.ExperimentChangeEvent; import com.intuit.wasabi.eventlog.events.ExperimentCreateEvent; import com.intuit.wasabi.eventlog.events.ExperimentEvent; import com.intuit.wasabi.eventlog.events.SimpleEvent; import com.intuit.wasabi.experimentobjects.Bucket; import com.intuit.wasabi.experimentobjects.Experiment; import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; import java.lang.reflect.Field; /** * Tests for {@link AuditLogEntryFactory}. */ public class AuditLogEntryFactoryTest { @Test public void testCreateFromEvent() throws Exception { new AuditLogEntryFactory(); EventLogEvent[] events = new EventLogEvent[]{ new SimpleEvent(""SimpleEvent""), new ExperimentChangeEvent(Mockito.mock(Experiment.class), ""Property"", ""before"", ""after""), new ExperimentCreateEvent(Mockito.mock(Experiment.class)), new BucketCreateEvent(Mockito.mock(Experiment.class), Mockito.mock(Bucket.class)) }; Field[] fields = AuditLogEntry.class.getFields(); for (Field field : fields) { field.setAccessible(true); } for (EventLogEvent event : events) { AuditLogEntry aleFactory = AuditLogEntryFactory.createFromEvent(event); AuditLogEntry aleManual = new AuditLogEntry( event.getTime(), event.getUser(), AuditLogAction.getActionForEvent(event), event instanceof ExperimentEvent ? ((ExperimentEvent) event).getExperiment() : null, event instanceof BucketEvent ? ((BucketEvent) event).getBucket().getLabel() : null, event instanceof ChangeEvent ? ((ChangeEvent) event).getPropertyName() : null, event instanceof ChangeEvent ? ((ChangeEvent) event).getBefore() : null, event instanceof ChangeEvent ? ((ChangeEvent) event).getAfter() : null ); for (Field field : fields) { Assert.assertEquals(field.get(aleManual), field.get(aleFactory)); } } } } ",0 "f the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . namespace format_theunittest\output\course_format; use renderable; use templatable; use stdClass; /** * Fixture for an invalid output for testing get_output_classname. * * @package core_course * @copyright 2021 Ferran Recio (ferran@moodle.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class invalidoutput implements renderable, templatable { /** * Export some data. * * @param renderer_base $output typically, the renderer that's calling this function * @return stdClass data context for a mustache template */ public function export_for_template(\renderer_base $output): stdClass { return (object)[ 'something' => 'invalid', ]; } } ",0 "h> #include #include #include #include ""dispatch_test.h"" #define _test_print(_file, _line, _desc, \ _expr, _fmt1, _val1, _fmt2, _val2) do { \ const char* _exprstr = _expr ? ""PASS"" : ""FAIL""; \ char _linestr[BUFSIZ]; \ if (!_expr) { \ snprintf(_linestr, sizeof(_linestr), \ "" (%s:%ld)"", _file, _line); \ } else { \ _linestr[0] = 0; \ } \ if (_fmt2 == 0) { \ printf(""\tValue: "" _fmt1 ""\n"" \ ""[%s] %s%s\n"", \ _val1, \ _exprstr, \ _desc, \ _linestr); \ } else { \ printf(""\tActual: "" _fmt1 ""\n"" \ ""\tExpected: "" _fmt2 ""\n"" \ ""[%s] %s%s\n"", \ _val1, \ _val2, \ _exprstr, \ _desc, \ _linestr); \ } \ if (!_expr) { \ printf(""\t%s:%ld\n"", _file, _line); \ } \ fflush(stdout); \ } while (0); void test_start(const char* desc) { printf(""\n==================================================\n""); printf(""[TEST] %s\n"", desc); printf(""[PID] %d\n"", getpid()); printf(""==================================================\n\n""); usleep(100000); // give 'gdb --waitfor=' a chance to find this proc } #define test_ptr_null(a,b) _test_ptr_null(__FILE__, __LINE__, a, b) void _test_ptr_null(const char* file, long line, const char* desc, const void* ptr) { _test_print(file, line, desc, (ptr == NULL), ""%p"", ptr, ""%p"", (void*)0); } #define test_ptr_notnull(a,b) _test_ptr_notnull(__FILE__, __LINE__, a, b) void _test_ptr_notnull(const char* file, long line, const char* desc, const void* ptr) { _test_print(file, line, desc, (ptr != NULL), ""%p"", ptr, ""%p"", ptr ?: (void*)~0); } #define test_ptr(a,b,c) _test_ptr(__FILE__, __LINE__, a, b, c) void _test_ptr(const char* file, long line, const char* desc, const void* actual, const void* expected) { _test_print(file, line, desc, (actual == expected), ""%p"", actual, ""%p"", expected); } #define test_long(a,b,c) _test_long(__FILE__, __LINE__, a, b, c) void _test_long(const char* file, long line, const char* desc, long actual, long expected) { _test_print(file, line, desc, (actual == expected), ""%ld"", actual, ""%ld"", expected); } #define test_long_less_than(a, b, c) _test_long_less_than(__FILE__, __LINE__, a, b, c) void _test_long_less_than(const char* file, long line, const char* desc, long actual, long expected_max) { _test_print(file, line, desc, (actual < expected_max), ""%ld"", actual, ""<%ld"", expected_max); } #define test_double_less_than(d, v, m) _test_double_less_than(__FILE__, __LINE__, d, v, m) void _test_double_less_than(const char* file, long line, const char* desc, double val, double max_expected) { _test_print(file, line, desc, (val < max_expected), ""%f"", val, ""<%f"", max_expected); } #define test_double_less_than_or_equal(d, v, m) _test_double_less_than(__FILE__, __LINE__, d, v, m) void _test_double_less_than_or_equal(const char* file, long line, const char* desc, double val, double max_expected) { _test_print(file, line, desc, (val <= max_expected), ""%f"", val, ""<%f"", max_expected); } #define test_errno(a,b,c) _test_errno(__FILE__, __LINE__, a, b, c) void _test_errno(const char* file, long line, const char* desc, long actual, long expected) { char* actual_str; char* expected_str; asprintf(&actual_str, ""%ld\t%s"", actual, actual ? strerror(actual) : """"); asprintf(&expected_str, ""%ld\t%s"", expected, expected ? strerror(expected) : """"); _test_print(file, line, desc, (actual == expected), ""%s"", actual_str, ""%s"", expected_str); free(actual_str); free(expected_str); } //#include extern char **environ; void test_stop(void) { test_stop_after_delay((void *)(intptr_t)0); } void test_stop_after_delay(void *delay) { #if HAVE_LEAKS int res; pid_t pid; char pidstr[10]; #endif if (delay != NULL) { sleep((int)(intptr_t)delay); } #if HAVE_LEAKS if (getenv(""NOLEAKS"")) _exit(EXIT_SUCCESS); /* leaks doesn't work against debug variant malloc */ if (getenv(""DYLD_IMAGE_SUFFIX"")) _exit(EXIT_SUCCESS); snprintf(pidstr, sizeof(pidstr), ""%d"", getpid()); char* args[] = { ""./leaks-wrapper"", pidstr, NULL }; res = posix_spawnp(&pid, args[0], NULL, NULL, args, environ); if (res == 0 && pid > 0) { int status; waitpid(pid, &status, 0); test_long(""Leaks"", status, 0); } else { perror(args[0]); } #endif _exit(EXIT_SUCCESS); } ",0 "stribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above * copyright notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the United States Government nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package gov.hhs.fha.nhinc.patientdiscovery.nhin.deferred.response.proxy; import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType; import gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetSystemType; import gov.hhs.fha.nhinc.aspect.NwhinInvocationEvent; import gov.hhs.fha.nhinc.patientdiscovery.aspect.PRPAIN201306UV02EventDescriptionBuilder; import gov.hhs.fha.nhinc.patientdiscovery.aspect.MCCIIN000002UV01EventDescriptionBuilder; import org.hl7.v3.MCCIIN000002UV01; import org.hl7.v3.PRPAIN201306UV02; /** * * @author JHOPPESC */ public class NhinPatientDiscoveryDeferredRespProxyNoOpImpl implements NhinPatientDiscoveryDeferredRespProxy { @NwhinInvocationEvent(beforeBuilder = PRPAIN201306UV02EventDescriptionBuilder.class, afterReturningBuilder = MCCIIN000002UV01EventDescriptionBuilder.class, serviceType = ""Patient Discovery Deferred Response"", version = ""1.0"") public MCCIIN000002UV01 respondingGatewayPRPAIN201306UV02(PRPAIN201306UV02 body, AssertionType assertion, NhinTargetSystemType target) { return new MCCIIN000002UV01(); } } ",0 "ense PBDigg is free software and use is subject to license terms */ class search { /** * 搜索类型 */ var $_searchtype; /** * 搜索条件语句 */ var $_searchsql = ''; /** * 搜索基本表 */ var $_basetable; /** * 返回限定 */ var $_limit = ''; /** * 搜索hash */ var $_cacheHash = ''; /** * 记录总数 */ var $_resultNum; /** * 分页参数 */ var $_mult = ''; /** * 搜索匹配正则 */ var $_pattern = array('%','_','*'); var $_replace = array('\%','\_','%'); /** * 数据库实例 */ var $DB = null; var $db_prefix = ''; /** * 是否缓存搜索 */ var $_ifcache; /** * 缓存周期 */ var $_cacheTime = 600; function search($type, $cache = false) { $this->__construct($type, $cache); } function __construct($type, $cache = false) { if (in_array($type, array('article', 'comment', 'attachment', 'author'))) { global $page, $pagesize, $DB, $db_prefix; $this->DB = $DB; $this->db_prefix = $db_prefix; $this->_searchtype = $type; $this->_ifcache = $cache ? true : false; $this->_limit = sqlLimit($page, $pagesize); switch ($this->_searchtype) { case 'article': $this->_basetable = 't'; break; case 'comment': $this->_basetable = 'c'; break; case 'attachment': $this->_basetable = 'a'; break; case 'author': $this->_basetable = 'm'; break; } } } function getMult() { return $this->_mult; } function getResultNum() { return intval($this->_resultNum); } function exportResults($condition) { global $searchhash; if (!is_array($condition)) return; $cached = false; if ($this->_ifcache && isset($searchhash) && preg_match('~^[a-z0-9]{32}$~', $searchhash)) { $cached = $this->getCache($searchhash); } if (!$cached) { foreach ($condition as $k => $v) { $this->$k($v); } $this->_cacheHash = md5(md5($this->_searchsql).$this->_searchtype); $this->_ifcache && $cached = $this->getCache($this->_cacheHash); } $this->_searchsql && $this->_searchsql = ' WHERE '.substr($this->_searchsql, 4); return $this->{$this->_searchtype}($cached); } function getCache($searchhash) { global $timestamp; $cacheData = $this->DB->fetch_one(""SELECT num, ids, exptime FROM {$this->db_prefix}scaches WHERE hash = '$searchhash' AND exptime > '$timestamp'""); if ($cacheData && $cacheData['ids']) { $this->_resultNum = (int)$cacheData['num']; $newids = ''; $ids = explode(',', $cacheData['ids']); foreach ($ids as $v) { $newids .= (int)$v.','; } $newids && $newids = substr($newids, 0, -1); switch ($this->_searchtype) { case 'article': $this->_searchsql = "" AND t.tid IN ($newids)""; break; case 'comment': $this->_searchsql = "" AND c.rid IN ($newids)""; break; case 'attachment': $this->_searchsql = "" AND a.aid IN ($newids)""; break; case 'author': $this->_searchsql = "" AND m.uid IN ($newids)""; break; } $newids != $cacheData['ids'] && $this->DB->db_exec(""UPDATE {$this->db_prefix}scaches SET ids = '"".addslashes($newids).""' WHERE hash = '$searchhash' AND exptime = '"".$cacheData['exptime'].""'""); $this->_mult = '&searchhash='.$searchhash; return true; } } function buildCache($ids) { global $timestamp; $this->DB->db_exec(""DELETE FROM {$this->db_prefix}scaches WHERE exptime <= '$timestamp'""); $this->DB->db_exec(""INSERT INTO {$this->db_prefix}scaches (hash,keywords,num,ids,searchip,searchtime,exptime) VALUES ('"".$this->_cacheHash.""','','"".$this->_resultNum.""','$ids','','','"".($timestamp + $this->_cacheTime).""')""); $this->_mult = '&searchhash='.$this->_cacheHash; } function article($cached) { $anonymity = getSingleLang('common', 'common_anonymity'); if ($this->_ifcache && !$cached) { $query = $this->DB->db_query(""SELECT t.tid FROM {$this->db_prefix}threads t "".$this->_searchsql); $ids = ''; $num = 0; while ($rs = $this->DB->fetch_all($query)) { $ids .= (int)$rs['tid'].','; $num++; } if ($ids) { $this->_resultNum = (int)$num; $ids = substr($ids, 0, -1); $this->buildCache($ids); $this->_searchsql = "" WHERE t.tid IN ($ids)""; unset($ids, $num); } } if (!isset($this->_resultNum)) { $rs = $this->DB->fetch_one(""SELECT COUNT(*) num FROM {$this->db_prefix}threads t "".$this->_searchsql); $this->_resultNum = (int)$rs['num']; } $query = $this->DB->db_query(""SELECT t.tid, t.subject, t.author, t.postdate, t.postip FROM {$this->db_prefix}threads t "".$this->_searchsql.$this->_limit); $article = array(); while ($rs = $this->DB->fetch_all($query)) { $rs['postdate'] = gdate($rs['postdate'], 'Y-m-d H:i'); !$rs['author'] && $rs['author'] = $anonymity; $article[] = $rs; } return $article; } function comment($cached) { $anonymity = getSingleLang('common', 'common_anonymity'); if ($this->_ifcache && !$cached) { $query = $this->DB->db_query(""SELECT c.rid FROM {$this->db_prefix}comments c "".$this->_searchsql); $ids = ''; $num = 0; while ($rs = $this->DB->fetch_all($query)) { $ids .= (int)$rs['rid'].','; $num++; } if ($ids) { $this->_resultNum = (int)$num; $ids = substr($ids, 0, -1); $this->buildCache($ids); $this->_searchsql = "" WHERE c.rid IN ($ids)""; unset($ids, $num); } } if (!isset($this->_resultNum)) { $rs = $this->DB->fetch_one(""SELECT COUNT(*) num FROM {$this->db_prefix}comments c "".$this->_searchsql); $this->_resultNum = (int)$rs['num']; } $query = $this->DB->db_query(""SELECT c.rid, c.content, c.author, c.postdate, c.postip FROM {$this->db_prefix}comments c "".$this->_searchsql.$this->_limit); $comment = array(); while ($rs = $this->DB->fetch_all($query)) { $rs['postdate'] = gdate($rs['postdate'], 'Y-m-d H:i'); $rs['content'] = PBSubStr($rs['content'], 50); !$rs['author'] && $rs['author'] = $anonymity; $comment[] = $rs; } return $comment; } // function author() // { // $this->_sql = ""SELECT * FROM {$this->db_prefix}threads t""; // } function attachment($cached) { $anonymity = getSingleLang('common', 'common_anonymity'); if ($this->_ifcache && !$cached) { $query = $this->DB->db_query(""SELECT a.aid FROM {$this->db_prefix}attachments a "".$this->_searchsql); $ids = ''; $num = 0; while ($rs = $this->DB->fetch_all($query)) { $ids .= (int)$rs['aid'].','; $num++; } if ($ids) { $this->_resultNum = (int)$num; $ids = substr($ids, 0, -1); $this->buildCache($ids); $this->_searchsql = "" WHERE a.aid IN ($ids)""; unset($ids, $num); } } if (!isset($this->_resultNum)) { $rs = $this->DB->fetch_one(""SELECT COUNT(*) num FROM {$this->db_prefix}attachments a "".$this->_searchsql); $this->_resultNum = (int)$rs['num']; } $query = $this->DB->db_query(""SELECT a.aid, a.tid, a.uid, a.filename, a.filesize, a.uploaddate, a.downloads FROM {$this->db_prefix}attachments a "".$this->_searchsql.$this->_limit); $attachment = array(); while ($rs = $this->DB->fetch_all($query)) { $rs['uploaddate'] = gdate($rs['uploaddate'], 'Y-m-d H:i'); $rs['filename'] = htmlspecialchars($rs['filename']); $rs['filesize'] = getRealSize($rs['filesize']); $attachment[] = $rs; } return $attachment; } function cid($cid) { !is_array($cid) && $cid = explode(',', $cid); $newcid = ''; foreach ($cid as $v) { $v && is_numeric($v) && $newcid .= $newcid ? ',' : '' . (int)$v; } if ($newcid) { $this->_searchsql .= "" AND "".$this->_basetable."".cid IN ($newcid)""; $this->_mult .= '&cid='.$newcid; } } function mid($mid) { global $module; !is_array($mid) && $mid = explode(',', $mid); $newmid = ''; if (!is_object($module)) { require_once PBDIGG_ROOT.'include/module.class.php'; $module = new module(); } foreach ($mid as $v) { $v && is_numeric($v) && in_array($mid, $module->getModuleId()) && $newmid .= $newmid ? ',' : '' . (int)$v; } if ($newmid) { $this->_searchsql .= "" AND "".$this->_basetable."".module IN ($newmid)""; $this->_mult .= '&mid='.$newmid; } } function uid($uid) { !is_array($uid) && $uid = explode(',', $uid); $newuid = ''; foreach ($uid as $v) { $v && is_numeric($v) && $newuid .= $newuid ? ',' : '' . (int)$v; } if ($newuid) { $this->_searchsql .= "" AND "".$this->_basetable."".uid IN ($newuid)""; $this->_mult .= '&uid='.$newuid; } } function authors($author) { $author = strip_tags(trim($author)); $_author = explode(',', $author); $authorCondition = ''; foreach ($_author as $value) { if (trim($value) && (strlen($value) <= 20)) { $authorCondition .= "" OR username LIKE '"".str_replace($this->_pattern, $this->_replace, preg_replace('~\*{2,}~i', '*', $value)).""'""; } } if ($authorCondition) { $query = $this->DB->db_query(""SELECT uid FROM {$this->db_prefix}members WHERE "".substr($authorCondition, 3)); $uids = ''; while ($rs = $this->DB->fetch_all($query)) { $uids .= "","".(int)$rs['uid']; } $this->_searchsql .= $uids ? ' AND '.$this->_basetable.'.uid IN ('.substr($uids, 1).')' : ' AND 0'; $this->_mult .= '&authors='.rawurlencode($author); } } function tags($tags) { $tags = strip_tags(trim($tags)); $_tags = explode(',', $tags); $tagCondition = ''; foreach ($_tags as $value) { if (trim($value) && (strlen($value) <= 30)) { $tagCondition .= "" OR tg.tagname LIKE '"".str_replace($this->_pattern, $this->_replace, preg_replace('/\*{2,}/i', '*', $value)).""'""; } } if ($tagCondition) { $query = $this->DB->db_query(""SELECT tc.tid FROM {$this->db_prefix}tagcache tc INNER JOIN {$this->db_prefix}tags tg USING (tagid) WHERE "".substr($tagCondition, 3)); $tids = ''; while ($rs = $this->DB->fetch_all($query)) { $tids .= "","".(int)$rs['tid']; } $this->_searchsql .= $tids ? ' AND '.$this->_basetable.'.tid IN ('.substr($tids, 1).')' : ' AND 0'; $this->_mult .= '&tags='.rawurlencode($tags); } } /** * @param string $datefield 时间字段 */ function searchdate($params) { foreach ($params as $k => $v) { if (preg_replace('~[a-z]~i', '', $k)) return; list ($more, $less) = $v; if ($more && preg_match('~^\d{4}-\d{1,2}-\d{1,2}$~i', $more)) { $this->_searchsql .= "" AND {$this->_basetable}.$k >= "".pStrToTime($more.' 0:0:0'); $this->_mult .= '&'.$k.'more='.$more; } if ($less && preg_match('~^\d{4}-\d{1,2}-\d{1,2}$~i', $less)) { $this->_searchsql .= "" AND {$this->_basetable}.$k < "".pStrToTime($less.' 0:0:0'); $this->_mult .= '&'.$k.'less='.$less; } } } function searchscope($params) { foreach ($params as $k => $v) { if (preg_replace('~[a-z]~i', '', $k)) return; list ($more, $less) = $v; if (is_numeric($more) && $more != -1) { $more = (int)$more; $this->_searchsql .= "" AND {$this->_basetable}.$k >= $more""; $this->_mult .= '&'.$k.'more='.$more; } if (is_numeric($less) && $less != -1) { $less = (int)$less; $this->_searchsql .= "" AND {$this->_basetable}.$k < $less""; $this->_mult .= '&'.$k.'less='.$less; } } } function postip($ip) { if ($ip && preg_match('~^[0-9\*\.]+$~i', $ip)) { $this->_searchsql .= "" AND "".$this->_basetable."".postip "".((strpos($ip, '*') === FALSE) ? ("" = '$ip'"") : "" LIKE '"".str_replace('*', '%', preg_replace('~\*{2,}~i', '*', $ip)).""'""); $this->_mult .= '&postip='.rawurlencode($ip); } } function isimg($bool) { if ($bool) { $this->_searchsql .= ' AND '.$this->_basetable.'.isimg = 1'; $this->_mult .= '&isimg=1'; } } function linkhost($linkhost) { if ($linkhost && preg_match('~^[-_a-z0-9\.\~!\$&\'\(\)\*\+,;=:@\|/]+$~i', $linkhost)) { $this->_searchsql .= "" AND "".$this->_basetable."".linkhost "".(strpos($linkhost, '*') === FALSE ? "" = '$linkhost'"" : "" LIKE '"".str_replace('*', '%', preg_replace('~\*{2,}~i', '*', $linkhost)).""'""); $this->_mult .= '&linkhost='.rawurlencode($linkhost);; } } } ?>",0 "le>pi-agm: Not compatible 👼

              « Up

              pi-agm 1.2.6 Not compatible 👼

              📅 (2021-11-06 23:39:54 UTC)

              Context

              # Packages matching: installed
              # Name              # Installed # Synopsis
              base-bigarray       base
              base-threads        base
              base-unix           base
              camlp5              7.14        Preprocessor-pretty-printer of OCaml
              conf-findutils      1           Virtual package relying on findutils
              conf-perl           1           Virtual package relying on perl
              coq                 8.8.0       Formal proof management system
              num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
              ocaml               4.08.1      The OCaml compiler (virtual package)
              ocaml-base-compiler 4.08.1      Official release 4.08.1
              ocaml-config        1           OCaml Switch Configuration
              ocamlfind           1.9.1       A library manager for OCaml
              # opam file:
              opam-version: "2.0"
              maintainer: "yves.bertot@inria.fr"
              homepage: "http://www-sop.inria.fr/members/Yves.Bertot/"
              bug-reports: "yves.bertot@inria.fr"
              license: "CECILL-B"
              build: [["coq_makefile" "-f" "_CoqProject" "-o" "Makefile" ]
                     [ make "-j" "%{jobs}%" ]]
              install: [ make "install" "DEST='%{lib}%/coq/user-contrib/pi_agm'" ]
              depends: [
                "ocaml"
                "coq" {>= "8.12"}
                "coq-coquelicot" {>= "3" & < "4~"}
                "coq-interval" {>= "4"}
              ]
              dev-repo: "git+https://github.com/ybertot/pi-agm.git"
              tags: [ "keyword:real analysis" "keyword:pi" "category:Mathematics/Real Calculus and Topology" "logpath:agm" "date:2020-06-23" ]
              authors: [ "Yves Bertot <yves.bertot@inria.fr>" ]
              synopsis:
                "Computing thousands or millions of digits of PI with arithmetic-geometric means"
              description: """
              This is a proof of correctness for two algorithms to compute PI to high
              precision using arithmetic-geometric means.  A first file contains
              the calculus-based proofs for an abstract view of the algorithm, where all
              numbers are real numbers.  A second file describes how to approximate all
              computations using large integers.  Other files describe the second algorithm
              which is close to the one used in mpfr, for instance.
              The whole development can be used to produce mathematically proved and
              formally verified approximations of PI."""
              url {
                src: "https://github.com/ybertot/pi-agm/archive/v1.2.6.zip"
                checksum: "sha256=f690dd8e464acafb4c14437a0ad09545a11f4ebd6771b05f4e7f74ca5c08a7ff"
              }
              

              Lint

              Command
              true
              Return code
              0

              Dry install 🏜️

              Dry install with the current Coq version:

              Command
              opam install -y --show-action coq-pi-agm.1.2.6 coq.8.8.0
              Return code
              5120
              Output
              [NOTE] Package coq is already installed (current version is 8.8.0).
              The following dependencies couldn't be met:
                - coq-pi-agm -> coq >= 8.12
              Your request can't be satisfied:
                - No available version of coq satisfies the constraints
              No solution found, exiting
              

              Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

              Command
              opam remove -y coq; opam install -y --show-action --unlock-base coq-pi-agm.1.2.6
              Return code
              0

              Install dependencies

              Command
              true
              Return code
              0
              Duration
              0 s

              Install 🚀

              Command
              true
              Return code
              0
              Duration
              0 s

              Installation size

              No files were installed.

              Uninstall 🧹

              Command
              true
              Return code
              0
              Missing removes
              none
              Wrong removes
              none

              Sources are on GitHub © Guillaume Claret 🐣

              ",0 "cular Liquids * * Copyright 2010 - 2014, The Regents of the University of Minnesota * Distributed under the terms of the GNU General Public License. */ #include // base class namespace McMd { using namespace Util; class System; /** * A TetherPotential for MC simulations. * * \ingroup McMd_Tether_Module */ class McTetherPotential : public TetherPotential { #if 0 public: /** * Constructor. */ McTetherPotential(); /** * Destructor. */ virtual ~McTetherPotential(); /** * Calculate the tether energy for a specified Atom. * * \param atom Atom object of interest * \return tether potential energy of atom */ virtual double atomEnergy(const Atom& atom) const = 0; #endif }; } #endif #endif ",0 " * Copyright (c) 2014 - 2015, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 * @filesource */ defined('BASEPATH') OR exit('No direct script access allowed'); /** * Database Forge Class * * @category Database * @author EllisLab Dev Team * @link http://codeigniter.com/user_guide/database/ */ abstract class CI_DB_forge { /** * Database object * * @var object */ protected $db; /** * Fields data * * @var array */ public $fields = array(); /** * Keys data * * @var array */ public $keys = array(); /** * Primary Keys data * * @var array */ public $primary_keys = array(); /** * Database character set * * @var string */ public $db_char_set = ''; // -------------------------------------------------------------------- /** * CREATE DATABASE statement * * @var string */ protected $_create_database = 'CREATE DATABASE %s'; /** * DROP DATABASE statement * * @var string */ protected $_drop_database = 'DROP DATABASE %s'; /** * CREATE TABLE statement * * @var string */ protected $_create_table = ""%s %s (%s\n)""; /** * CREATE TABLE IF statement * * @var string */ protected $_create_table_if = 'CREATE TABLE IF NOT EXISTS'; /** * CREATE TABLE keys flag * * Whether table keys are created from within the * CREATE TABLE statement. * * @var bool */ protected $_create_table_keys = FALSE; /** * DROP TABLE IF EXISTS statement * * @var string */ protected $_drop_table_if = 'DROP TABLE IF EXISTS'; /** * RENAME TABLE statement * * @var string */ protected $_rename_table = 'ALTER TABLE %s RENAME TO %s;'; /** * UNSIGNED support * * @var bool|array */ protected $_unsigned = TRUE; /** * NULL value representation in CREATE/ALTER TABLE statements * * @var string */ protected $_null = ''; /** * DEFAULT value representation in CREATE/ALTER TABLE statements * * @var string */ protected $_default = ' DEFAULT '; // -------------------------------------------------------------------- /** * Class constructor * * @param object &$db Database object * @return void */ public function __construct(&$db) { $this->db =& $db; log_message('info', 'Database Forge Class Initialized'); } // -------------------------------------------------------------------- /** * Create database * * @param string $db_name * @return bool */ public function create_database($db_name) { if ($this->_create_database === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } elseif ( ! $this->db->query(sprintf($this->_create_database, $db_name, $this->db->char_set, $this->db->dbcollat))) { return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE; } if ( ! empty($this->db->data_cache['db_names'])) { $this->db->data_cache['db_names'][] = $db_name; } return TRUE; } // -------------------------------------------------------------------- /** * Drop database * * @param string $db_name * @return bool */ public function drop_database($db_name) { if ($this->_drop_database === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } elseif ( ! $this->db->query(sprintf($this->_drop_database, $db_name))) { return ($this->db->db_debug) ? $this->db->display_error('db_unable_to_drop') : FALSE; } if ( ! empty($this->db->data_cache['db_names'])) { $key = array_search(strtolower($db_name), array_map('strtolower', $this->db->data_cache['db_names']), TRUE); if ($key !== FALSE) { unset($this->db->data_cache['db_names'][$key]); } } return TRUE; } // -------------------------------------------------------------------- /** * Add Key * * @param string $key * @param bool $primary * @return CI_DB_forge */ public function add_key($key, $primary = FALSE) { // DO NOT change this! This condition is only applicable // for PRIMARY keys because you can only have one such, // and therefore all fields you add to it will be included // in the same, composite PRIMARY KEY. // // It's not the same for regular indexes. if ($primary === TRUE && is_array($key)) { foreach ($key as $one) { $this->add_key($one, $primary); } return $this; } if ($primary === TRUE) { $this->primary_keys[] = $key; } else { $this->keys[] = $key; } return $this; } // -------------------------------------------------------------------- /** * Add Field * * @param array $field * @return CI_DB_forge */ public function add_field($field) { if (is_string($field)) { if ($field === 'id') { $this->add_field(array( 'id' => array( 'type' => 'INT', 'constraint' => 9, 'auto_increment' => TRUE ) )); $this->add_key('id', TRUE); } else { if (strpos($field, ' ') === FALSE) { show_error('Field information is required for that operation.'); } $this->fields[] = $field; } } if (is_array($field)) { $this->fields = array_merge($this->fields, $field); } return $this; } // -------------------------------------------------------------------- /** * Create Table * * @param string $table Table name * @param bool $if_not_exists Whether to add IF NOT EXISTS condition * @param array $attributes Associative array of table attributes * @return bool */ public function create_table($table, $if_not_exists = FALSE, array $attributes = array()) { if ($table === '') { show_error('A table name is required for that operation.'); } else { $table = $this->db->dbprefix.$table; } if (count($this->fields) === 0) { show_error('Field information is required.'); } $sql = $this->_create_table($table, $if_not_exists, $attributes); if (is_bool($sql)) { $this->_reset(); if ($sql === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } } if (($result = $this->db->query($sql)) !== FALSE) { empty($this->db->data_cache['table_names']) OR $this->db->data_cache['table_names'][] = $table; // Most databases don't support creating indexes from within the CREATE TABLE statement if ( ! empty($this->keys)) { for ($i = 0, $sqls = $this->_process_indexes($table), $c = count($sqls); $i < $c; $i++) { $this->db->query($sqls[$i]); } } } $this->_reset(); return $result; } // -------------------------------------------------------------------- /** * Create Table * * @param string $table Table name * @param bool $if_not_exists Whether to add 'IF NOT EXISTS' condition * @param array $attributes Associative array of table attributes * @return mixed */ protected function _create_table($table, $if_not_exists, $attributes) { if ($if_not_exists === TRUE && $this->_create_table_if === FALSE) { if ($this->db->table_exists($table)) { return TRUE; } else { $if_not_exists = FALSE; } } $sql = ($if_not_exists) ? sprintf($this->_create_table_if, $this->db->escape_identifiers($table)) : 'CREATE TABLE'; $columns = $this->_process_fields(TRUE); for ($i = 0, $c = count($columns); $i < $c; $i++) { $columns[$i] = ($columns[$i]['_literal'] !== FALSE) ? ""\n\t"".$columns[$i]['_literal'] : ""\n\t"".$this->_process_column($columns[$i]); } $columns = implode(',', $columns) .$this->_process_primary_keys($table); // Are indexes created from within the CREATE TABLE statement? (e.g. in MySQL) if ($this->_create_table_keys === TRUE) { $columns .= $this->_process_indexes($table); } // _create_table will usually have the following format: ""%s %s (%s\n)"" $sql = sprintf($this->_create_table.'%s', $sql, $this->db->escape_identifiers($table), $columns, $this->_create_table_attr($attributes) ); return $sql; } // -------------------------------------------------------------------- /** * CREATE TABLE attributes * * @param array $attributes Associative array of table attributes * @return string */ protected function _create_table_attr($attributes) { $sql = ''; foreach (array_keys($attributes) as $key) { if (is_string($key)) { $sql .= ' '.strtoupper($key).' '.$attributes[$key]; } } return $sql; } // -------------------------------------------------------------------- /** * Drop Table * * @param string $table_name Table name * @param bool $if_exists Whether to add an IF EXISTS condition * @return bool */ public function drop_table($table_name, $if_exists = FALSE) { if ($table_name === '') { return ($this->db->db_debug) ? $this->db->display_error('db_table_name_required') : FALSE; } if (($query = $this->_drop_table($this->db->dbprefix.$table_name, $if_exists)) === TRUE) { return TRUE; } $query = $this->db->query($query); // Update table list cache if ($query && ! empty($this->db->data_cache['table_names'])) { $key = array_search(strtolower($this->db->dbprefix.$table_name), array_map('strtolower', $this->db->data_cache['table_names']), TRUE); if ($key !== FALSE) { unset($this->db->data_cache['table_names'][$key]); } } return $query; } // -------------------------------------------------------------------- /** * Drop Table * * Generates a platform-specific DROP TABLE string * * @param string $table Table name * @param bool $if_exists Whether to add an IF EXISTS condition * @return string */ protected function _drop_table($table, $if_exists) { $sql = 'DROP TABLE'; if ($if_exists) { if ($this->_drop_table_if === FALSE) { if ( ! $this->db->table_exists($table)) { return TRUE; } } else { $sql = sprintf($this->_drop_table_if, $this->db->escape_identifiers($table)); } } return $sql.' '.$this->db->escape_identifiers($table); } // -------------------------------------------------------------------- /** * Rename Table * * @param string $table_name Old table name * @param string $new_table_name New table name * @return bool */ public function rename_table($table_name, $new_table_name) { if ($table_name === '' OR $new_table_name === '') { show_error('A table name is required for that operation.'); return FALSE; } elseif ($this->_rename_table === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } $result = $this->db->query(sprintf($this->_rename_table, $this->db->escape_identifiers($this->db->dbprefix.$table_name), $this->db->escape_identifiers($this->db->dbprefix.$new_table_name)) ); if ($result && ! empty($this->db->data_cache['table_names'])) { $key = array_search(strtolower($this->db->dbprefix.$table_name), array_map('strtolower', $this->db->data_cache['table_names']), TRUE); if ($key !== FALSE) { $this->db->data_cache['table_names'][$key] = $this->db->dbprefix.$new_table_name; } } return $result; } // -------------------------------------------------------------------- /** * Column Add * * @todo Remove deprecated $_after option in 3.1+ * @param string $table Table name * @param array $field Column definition * @param string $_after Column for AFTER clause (deprecated) * @return bool */ public function add_column($table, $field, $_after = NULL) { // Work-around for literal column definitions is_array($field) OR $field = array($field); foreach (array_keys($field) as $k) { // Backwards-compatibility work-around for MySQL/CUBRID AFTER clause (remove in 3.1+) if ($_after !== NULL && is_array($field[$k]) && ! isset($field[$k]['after'])) { $field[$k]['after'] = $_after; } $this->add_field(array($k => $field[$k])); } $sqls = $this->_alter_table('ADD', $this->db->dbprefix.$table, $this->_process_fields()); $this->_reset(); if ($sqls === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } for ($i = 0, $c = count($sqls); $i < $c; $i++) { if ($this->db->query($sqls[$i]) === FALSE) { return FALSE; } } return TRUE; } // -------------------------------------------------------------------- /** * Column Drop * * @param string $table Table name * @param string $column_name Column name * @return bool */ public function drop_column($table, $column_name) { $sql = $this->_alter_table('DROP', $this->db->dbprefix.$table, $column_name); if ($sql === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } return $this->db->query($sql); } // -------------------------------------------------------------------- /** * Column Modify * * @param string $table Table name * @param string $field Column definition * @return bool */ public function modify_column($table, $field) { // Work-around for literal column definitions is_array($field) OR $field = array($field); foreach (array_keys($field) as $k) { $this->add_field(array($k => $field[$k])); } if (count($this->fields) === 0) { show_error('Field information is required.'); } $sqls = $this->_alter_table('CHANGE', $this->db->dbprefix.$table, $this->_process_fields()); $this->_reset(); if ($sqls === FALSE) { return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE; } for ($i = 0, $c = count($sqls); $i < $c; $i++) { if ($this->db->query($sqls[$i]) === FALSE) { return FALSE; } } return TRUE; } // -------------------------------------------------------------------- /** * ALTER TABLE * * @param string $alter_type ALTER type * @param string $table Table name * @param mixed $field Column definition * @return string|string[] */ protected function _alter_table($alter_type, $table, $field) { $sql = 'ALTER TABLE '.$this->db->escape_identifiers($table).' '; // DROP has everything it needs now. if ($alter_type === 'DROP') { return $sql.'DROP COLUMN '.$this->db->escape_identifiers($field); } $sql .= ($alter_type === 'ADD') ? 'ADD ' : $alter_type.' COLUMN '; $sqls = array(); for ($i = 0, $c = count($field); $i < $c; $i++) { $sqls[] = $sql .($field[$i]['_literal'] !== FALSE ? $field[$i]['_literal'] : $this->_process_column($field[$i])); } return $sqls; } // -------------------------------------------------------------------- /** * Process fields * * @param bool $create_table * @return array */ protected function _process_fields($create_table = FALSE) { $fields = array(); foreach ($this->fields as $key => $attributes) { if (is_int($key) && ! is_array($attributes)) { $fields[] = array('_literal' => $attributes); continue; } $attributes = array_change_key_case($attributes, CASE_UPPER); if ($create_table === TRUE && empty($attributes['TYPE'])) { continue; } isset($attributes['TYPE']) && $this->_attr_type($attributes); $field = array( 'name' => $key, 'new_name' => isset($attributes['NAME']) ? $attributes['NAME'] : NULL, 'type' => isset($attributes['TYPE']) ? $attributes['TYPE'] : NULL, 'length' => '', 'unsigned' => '', 'null' => '', 'unique' => '', 'default' => '', 'auto_increment' => '', '_literal' => FALSE ); isset($attributes['TYPE']) && $this->_attr_unsigned($attributes, $field); if ($create_table === FALSE) { if (isset($attributes['AFTER'])) { $field['after'] = $attributes['AFTER']; } elseif (isset($attributes['FIRST'])) { $field['first'] = (bool) $attributes['FIRST']; } } $this->_attr_default($attributes, $field); if (isset($attributes['NULL'])) { if ($attributes['NULL'] === TRUE) { $field['null'] = empty($this->_null) ? '' : ' '.$this->_null; } else { $field['null'] = ' NOT NULL'; } } elseif ($create_table === TRUE) { $field['null'] = ' NOT NULL'; } $this->_attr_auto_increment($attributes, $field); $this->_attr_unique($attributes, $field); if (isset($attributes['COMMENT'])) { $field['comment'] = $this->db->escape($attributes['COMMENT']); } if (isset($attributes['TYPE']) && ! empty($attributes['CONSTRAINT'])) { switch (strtoupper($attributes['TYPE'])) { case 'ENUM': case 'SET': $attributes['CONSTRAINT'] = $this->db->escape($attributes['CONSTRAINT']); default: $field['length'] = is_array($attributes['CONSTRAINT']) ? '('.implode(',', $attributes['CONSTRAINT']).')' : '('.$attributes['CONSTRAINT'].')'; break; } } $fields[] = $field; } return $fields; } // -------------------------------------------------------------------- /** * Process column * * @param array $field * @return string */ protected function _process_column($field) { return $this->db->escape_identifiers($field['name']) .' '.$field['type'].$field['length'] .$field['unsigned'] .$field['default'] .$field['null'] .$field['auto_increment'] .$field['unique']; } // -------------------------------------------------------------------- /** * Field attribute TYPE * * Performs a data type mapping between different databases. * * @param array &$attributes * @return void */ protected function _attr_type(&$attributes) { // Usually overridden by drivers } // -------------------------------------------------------------------- /** * Field attribute UNSIGNED * * Depending on the _unsigned property value: * * - TRUE will always set $field['unsigned'] to 'UNSIGNED' * - FALSE will always set $field['unsigned'] to '' * - array(TYPE) will set $field['unsigned'] to 'UNSIGNED', * if $attributes['TYPE'] is found in the array * - array(TYPE => UTYPE) will change $field['type'], * from TYPE to UTYPE in case of a match * * @param array &$attributes * @param array &$field * @return void */ protected function _attr_unsigned(&$attributes, &$field) { if (empty($attributes['UNSIGNED']) OR $attributes['UNSIGNED'] !== TRUE) { return; } // Reset the attribute in order to avoid issues if we do type conversion $attributes['UNSIGNED'] = FALSE; if (is_array($this->_unsigned)) { foreach (array_keys($this->_unsigned) as $key) { if (is_int($key) && strcasecmp($attributes['TYPE'], $this->_unsigned[$key]) === 0) { $field['unsigned'] = ' UNSIGNED'; return; } elseif (is_string($key) && strcasecmp($attributes['TYPE'], $key) === 0) { $field['type'] = $key; return; } } return; } $field['unsigned'] = ($this->_unsigned === TRUE) ? ' UNSIGNED' : ''; } // -------------------------------------------------------------------- /** * Field attribute DEFAULT * * @param array &$attributes * @param array &$field * @return void */ protected function _attr_default(&$attributes, &$field) { if ($this->_default === FALSE) { return; } if (array_key_exists('DEFAULT', $attributes)) { if ($attributes['DEFAULT'] === NULL) { $field['default'] = empty($this->_null) ? '' : $this->_default.$this->_null; // Override the NULL attribute if that's our default $attributes['NULL'] = TRUE; $field['null'] = empty($this->_null) ? '' : ' '.$this->_null; } else { $field['default'] = $this->_default.$this->db->escape($attributes['DEFAULT']); } } } // -------------------------------------------------------------------- /** * Field attribute UNIQUE * * @param array &$attributes * @param array &$field * @return void */ protected function _attr_unique(&$attributes, &$field) { if ( ! empty($attributes['UNIQUE']) && $attributes['UNIQUE'] === TRUE) { $field['unique'] = ' UNIQUE'; } } // -------------------------------------------------------------------- /** * Field attribute AUTO_INCREMENT * * @param array &$attributes * @param array &$field * @return void */ protected function _attr_auto_increment(&$attributes, &$field) { if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'int') !== FALSE) { $field['auto_increment'] = ' AUTO_INCREMENT'; } } // -------------------------------------------------------------------- /** * Process primary keys * * @param string $table Table name * @return string */ protected function _process_primary_keys($table) { $sql = ''; for ($i = 0, $c = count($this->primary_keys); $i < $c; $i++) { if ( ! isset($this->fields[$this->primary_keys[$i]])) { unset($this->primary_keys[$i]); } } if (count($this->primary_keys) > 0) { $sql .= "",\n\tCONSTRAINT "".$this->db->escape_identifiers('pk_'.$table) .' PRIMARY KEY('.implode(', ', $this->db->escape_identifiers($this->primary_keys)).')'; } return $sql; } // -------------------------------------------------------------------- /** * Process indexes * * @param string $table * @return string */ protected function _process_indexes($table) { $sqls = array(); for ($i = 0, $c = count($this->keys); $i < $c; $i++) { if (is_array($this->keys[$i])) { for ($i2 = 0, $c2 = count($this->keys[$i]); $i2 < $c2; $i2++) { if ( ! isset($this->fields[$this->keys[$i][$i2]])) { unset($this->keys[$i][$i2]); continue; } } } elseif ( ! isset($this->fields[$this->keys[$i]])) { unset($this->keys[$i]); continue; } is_array($this->keys[$i]) OR $this->keys[$i] = array($this->keys[$i]); $sqls[] = 'CREATE INDEX '.$this->db->escape_identifiers($table.'_'.implode('_', $this->keys[$i])) .' ON '.$this->db->escape_identifiers($table) .' ('.implode(', ', $this->db->escape_identifiers($this->keys[$i])).');'; } return $sqls; } // -------------------------------------------------------------------- /** * Reset * * Resets table creation vars * * @return void */ protected function _reset() { $this->fields = $this->keys = $this->primary_keys = array(); } } ",0 "ou can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include ""config.h"" #include #include #include #include #include #include #include #include #define MYNAME ""lxctest1"" int main(int argc, char *argv[]) { struct lxc_container *c; int ret = 1; if ((c = lxc_container_new(MYNAME, NULL)) == NULL) { fprintf(stderr, ""%d: error opening lxc_container %s\n"", __LINE__, MYNAME); ret = 1; goto out; } if (c->is_defined(c)) { fprintf(stderr, ""%d: %s thought it was defined\n"", __LINE__, MYNAME); goto out; } if (!c->set_config_item(c, ""lxc.net.0.type"", ""veth"")) { fprintf(stderr, ""%d: failed to set network type\n"", __LINE__); goto out; } c->set_config_item(c, ""lxc.net.0.link"", ""lxcbr0""); c->set_config_item(c, ""lxc.net.0.flags"", ""up""); if (!c->createl(c, ""busybox"", NULL, NULL, 0, NULL)) { fprintf(stderr, ""%d: failed to create a container\n"", __LINE__); goto out; } if (!c->is_defined(c)) { fprintf(stderr, ""%d: %s thought it was not defined\n"", __LINE__, MYNAME); goto out; } c->clear_config(c); c->load_config(c, NULL); c->want_daemonize(c, true); if (!c->startl(c, 0, NULL)) { fprintf(stderr, ""%d: failed to start %s\n"", __LINE__, MYNAME); goto out; } /* Wait for init to be ready for SIGPWR */ sleep(20); if (!c->shutdown(c, 120)) { fprintf(stderr, ""%d: failed to shut down %s\n"", __LINE__, MYNAME); if (!c->stop(c)) fprintf(stderr, ""%d: failed to kill %s\n"", __LINE__, MYNAME); goto out; } if (!c->destroy(c)) { fprintf(stderr, ""%d: error deleting %s\n"", __LINE__, MYNAME); goto out; } if (c->is_defined(c)) { fprintf(stderr, ""%d: %s thought it was defined\n"", __LINE__, MYNAME); goto out; } fprintf(stderr, ""all lxc_container tests passed for %s\n"", c->name); ret = 0; out: if (c && c->is_defined(c)) c->destroy(c); lxc_container_put(c); exit(ret); } ",0 "lic License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EchoPet is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with EchoPet. If not, see . */ package com.dsh105.echopet.compat.nms.v1_14_R1.entity.type; import com.dsh105.echopet.compat.api.entity.EntityPetType; import com.dsh105.echopet.compat.api.entity.EntitySize; import com.dsh105.echopet.compat.api.entity.IPet; import com.dsh105.echopet.compat.api.entity.PetType; import com.dsh105.echopet.compat.api.entity.SizeCategory; import com.dsh105.echopet.compat.api.entity.type.nms.IEntityEvokerPet; import net.minecraft.server.v1_14_R1.DataWatcher; import net.minecraft.server.v1_14_R1.DataWatcherObject; import net.minecraft.server.v1_14_R1.DataWatcherRegistry; import net.minecraft.server.v1_14_R1.EntityInsentient; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.World; /** * @since Nov 19, 2016 */ @EntitySize(width = 0.6F, height = 1.95F) @EntityPetType(petType = PetType.EVOKER) public class EntityEvokerPet extends EntityIllagerAbstractPet implements IEntityEvokerPet{ // EntityIllagerWizard private static final DataWatcherObject c = DataWatcher.a(EntityEvokerPet.class, DataWatcherRegistry.a);// some sorta spell shit public EntityEvokerPet(EntityTypes type, World world){ super(type, world); } public EntityEvokerPet(EntityTypes type, World world, IPet pet){ super(type, world, pet); } public EntityEvokerPet(World world){ this(EntityTypes.EVOKER, world); } public EntityEvokerPet(World world, IPet pet){ this(EntityTypes.EVOKER, world, pet); } @Override protected void initDatawatcher(){ super.initDatawatcher(); this.datawatcher.register(c, (byte) 0); } @Override public SizeCategory getSizeCategory(){ return SizeCategory.REGULAR; } } ",0 "VERSION_LONG_OPTIONS \ {""version"", no_argument, NULL, 'V'}, \ {""protocols"", required_argument, NULL, 'O'} #define OFP_VERSION_OPTION_HANDLERS \ case 'V': \ ovs_print_version(OFP10_VERSION, OFP13_VERSION); \ exit(EXIT_SUCCESS); \ \ case 'O': \ set_allowed_ofp_versions(optarg); \ break; uint32_t get_allowed_ofp_versions(void); void set_allowed_ofp_versions(const char *string); void mask_allowed_ofp_versions(uint32_t); void add_allowed_ofp_versions(uint32_t); void ofp_version_usage(void); #endif ",0 "itle>Quick Start HowTo
              Apache Software Foundation | Jakarta Project | Apache Tomcat

              Quick Start HowTo

              Introduction

              This document describes the configuration files used by JK on the Web Server side for the 'impatients':

              • workers.properties is a mandatory file used by the webserver and which is the same for all JK implementations (Apache/IIS/NES).
              • WebServers add-ons to be set on the webserver side.

              We'll give here minimum servers configuration and an example workers.properties to be able to install and check quickly your configuration.


              Minimum workers.properties

              Here is a minimum workers.properties , using just ajp13 to connect your Apache webserver to the Tomcat engine, complete documentation is available in Workers HowTo .

              # Define 1 real worker using ajp13
              worker.list=worker1
              # Set properties for worker1 (ajp13)
              worker.worker1.type=ajp13
              worker.worker1.host=localhost
              worker.worker1.port=8009
              worker.worker1.lbfactor=50
              worker.worker1.cachesize=10
              worker.worker1.cache_timeout=600
              worker.worker1.socket_keepalive=1
              worker.worker1.socket_timeout=300


              Minimum Apache WebServer configuration

              Here is a minimun informations about Apache configuration, a complete documentation is available in Apache HowTo .

              You should first have mod_jk.so (unix) or mod_jk.dll (Windows) installed in your Apache module directory (see your Apache documentation to locate it).

              Usual locations for modules directory on Unix:

              • /usr/lib/apache/
              • /usr/lib/apache2/
              • /usr/local/apache/libexec/

              Usual locations for modules directory on Windows :

              • C:\Program Files\Apache Group\Apache\modules\
              • C:\Program Files\Apache Group\Apache2\modules\

              You'll find prebuilt binaries here

              Here is the minimum which should be set in httpd.conf directly or included from another file:

              Usual locations for configuration directory on Unix:

              • /etc/httpd/conf/
              • /etc/httpd2/conf/
              • /usr/local/apache/conf/

              Usual locations for configuration directory on Windows :

              • C:\Program Files\Apache Group\Apache\conf\
              • C:\Program Files\Apache Group\Apache2\conf\

              # Load mod_jk module
              # Update this path to match your modules location
              LoadModule jk_module libexec/mod_jk.so
              # Declare the module for <IfModule directive>
              AddModule mod_jk.c
              # Where to find workers.properties
              # Update this path to match your conf directory location (put workers.properties next to httpd.conf)
              JkWorkersFile /etc/httpd/conf/workers.properties
              # Where to put jk logs
              # Update this path to match your logs directory location (put mod_jk.log next to access_log)
              JkLogFile /var/log/httpd/mod_jk.log
              # Set the jk log level [debug/error/info]
              JkLogLevel info
              # Select the log format
              JkLogStampFormat ""[%a %b %d %H:%M:%S %Y] ""
              # JkOptions indicate to send SSL KEY SIZE,
              JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
              # JkRequestLogFormat set the request format
              JkRequestLogFormat ""%w %V %T""
              # Send everything for context /examples to worker named worker1 (ajp13)
              JkMount /examples/* worker1


              Minimum Domino WebServer configuration

              A complete documentation is available in Domino HowTo .

              This paragraph has not been written yet, but you can contribute to it.


              Minimum IIS WebServer configuration

              A complete documentation is available in IIS HowTo .

              This paragraph has not been written yet, but you can contribute to it.


              Minimum NES/iPlanet WebServer configuration

              A complete documentation is available in Netscape/iPlanet HowTo .

              This paragraph has not been written yet, but you can contribute to it.


              Test your configuration

              (Re)start the Web server and browse to the http://localhost/examples/


              ",0 " com.nosolojava.fsm.runtime.Context; import com.nosolojava.fsm.runtime.executable.Elif; import com.nosolojava.fsm.runtime.executable.Else; import com.nosolojava.fsm.runtime.executable.Executable; import com.nosolojava.fsm.runtime.executable.If; public class BasicIf extends BasicConditional implements If { private static final long serialVersionUID = -415238773021486012L; private final List elifs = new ArrayList(); private final Else elseOperation; public BasicIf(String condition) { this(condition, null, null, null); } public BasicIf(String condition, List executables) { this(condition, null, null, executables); } public BasicIf(String condition, Else elseOperation, List executables) { this(condition, null, elseOperation, executables); } public BasicIf(String condition, List elifs, Else elseOperation, List executables) { super(condition, executables); if (elifs != null) { this.elifs.addAll(elifs); } this.elseOperation = elseOperation; } @Override public boolean runIf(Context context) { boolean result = false; // if condition fails if (super.runIf(context)) { result = true; } else { // try with elifs boolean enterElif = false; Iterator iterElif = elifs.iterator(); Elif elif; while (!enterElif && iterElif.hasNext()) { elif = iterElif.next(); enterElif = elif.runIf(context); } // if no elif and else if (!enterElif && this.elseOperation != null) { elseOperation.run(context); } } return result; } public List getElifs() { return this.elifs; } public void addElif(Elif elif) { this.elifs.add(elif); } public void addElifs(List elifs) { this.elifs.addAll(elifs); } public void clearAndSetElifs(List elifs) { this.elifs.clear(); addElifs(elifs); } } ",0 "is part of GEPI. * * GEPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GEPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GEPI; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ // On empêche l'accès direct au fichier if (basename($_SERVER[""SCRIPT_NAME""])==basename(__File__)){ die(); }; ?>

              Bilans des incidents pour la période du: au

              $incidents_titre) { if ($titre!=='L\'Etablissement' || ($titre=='L\'Etablissement' && !is_null($affichage_etab) ) ) {?>
              "">
              Bilan des incidents concernant :
              Pas d'incidents avec les critères sélectionnés...


              ';?>
              "">
              Bilan individuel
              Pas d'incidents avec les critères sélectionnés...

              Bilan des incidents concernant :

              avec les filtres selectionnés

              colspan=""3"" class='nouveau'>Nombres d'incidents sur la période: % sur la période/Etab:
              colspan=""2"" class='nouveau'>Nombre total de mesures prises pour ces incidents : % sur la période/Etab:
              colspan=""2"" class='nouveau'>Nombre total de mesures demandées pour ces incidents : % sur la période/Etab:
              colspan=""2"" class='nouveau'>Nombre total de sanctions prises pour ces incidents: % sur la période/Etab:
              colspan=""2"" class='nouveau'>Nombre total d'heures de retenues pour ces incidents: % sur la période/Etab:
              colspan=""2"" class='nouveau'>Nombre total de jours d'exclusions pour ces incidents: % sur la période/Etab:
              "">
              DateDéclarantHeureNature Cat.DescriptionSuivi
              date; ?>declarant; ?>heure; ?> nature; ?>id_categorie))echo $incident->sigle_categorie;else echo'-'; ?>description; ?> id_incident]))echo'

              Aucun protagoniste défini pour cet incident

              '; else { ?> id_incident] as $protagoniste) {?>
              prenom.' '.$protagoniste->nom.'
              '; echo $protagoniste->statut.' '; if($protagoniste->classe) echo $protagoniste->classe .' - '; else echo ' - ' ; if($protagoniste->qualite=="""") echo'Aucun rôle affecté.
              '; else echo $protagoniste->qualite.'
              '; ?>
              id_incident][$protagoniste->login])) { ?>

              Mesures :

              id_incident][$protagoniste->login] as $mesure) { $alt_c=$alt_c*(-1); ?> "">
              NatureMesure
              mesure; ?> type.' par '.$mesure->login_u; ?>
              id_incident][$protagoniste->login])) { ?>

              Sanctions :

              id_incident][$protagoniste->login] as $sanction) { $alt_d=$alt_d*(-1); ?> "">
              NatureEffectuéeDate Durée
              nature; ?> effectuee; ?> nature=='retenue')echo $sanction->ret_date; if($sanction->nature=='exclusion')echo 'Du '.$sanction->exc_date_debut.' au '.$sanction->exc_date_fin; if($sanction->nature=='travail')echo 'Pour le '.$sanction->trv_date_retour;?> nature=='retenue') { echo $sanction->ret_duree.' heure'; if ($sanction->ret_duree >1) echo 's'; }else if($sanction->nature=='exclusion') { echo $sanction->exc_duree.' jour'; if ($sanction->exc_duree >1) echo 's'; }else{ echo'-'; } ?>


              Retour aux selections
              "">
              Bilan individuel"">
              >
              >Individu Incidents >Mesures prises >Sanctions prises >Heures de retenues >Jours d'exclusion
              NomPrénom Classe NombreNombre%/EtabNombre%/EtabNombre%/EtabNombre%/Etab
              ""> "".$totaux_indiv[$eleve]['prenom'].""""; echo ""
              ""; echo $totaux_indiv[$eleve]['prenom']; ?>
              Total 0) echo round(100*($totaux_par_classe[$titre]['mesures']/$totaux['L\'Etablissement']['mesures_prises']),2); else echo'0';?> 0) echo round(100*($totaux_par_classe[$titre]['sanctions']/$totaux['L\'Etablissement']['sanctions']),2); else echo'0';?> 0) echo round(100*($totaux_par_classe[$titre]['heures_retenues']/$totaux['L\'Etablissement']['heures_retenues']),2); else echo'0';?> 0) echo round(100*($totaux_par_classe[$titre]['jours_exclusions']/$totaux['L\'Etablissement']['jours_exclusions']),2);else echo'0';?>
              ",0 "of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** * Resets the emoticons mapping into the default value * * @package core * @copyright 2010 David Mudrak * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require(__DIR__ . '/../config.php'); require_once($CFG->libdir.'/adminlib.php'); admin_externalpage_setup('resetemoticons'); $confirm = optional_param('confirm', false, PARAM_BOOL); if (!$confirm or !confirm_sesskey()) { echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('confirmation', 'admin')); echo $OUTPUT->confirm(get_string('emoticonsreset', 'admin'), new moodle_url($PAGE->url, array('confirm' => 1)), new moodle_url('/admin/settings.php', array('section' => 'htmlsettings'))); echo $OUTPUT->footer(); die(); } $manager = get_emoticon_manager(); set_config('emoticons', $manager->encode_stored_config($manager->default_emoticons())); redirect(new moodle_url('/admin/settings.php', array('section' => 'htmlsettings'))); ",0 "libraries * ---------------------------------------------------------------------- * CollectiveAccess * Open-source collections management software * ---------------------------------------------------------------------- * * Software by Whirl-i-Gig (http://www.whirl-i-gig.com) * Copyright 2009-2010 Whirl-i-Gig * * For more information visit http://www.CollectiveAccess.org * * This program is free software; you may redistribute it and/or modify it under * the terms of the provided license as published by Whirl-i-Gig * * CollectiveAccess is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * This source code is free and modifiable under the terms of * GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See * the ""license.txt"" file for details, or visit the CollectiveAccess web site at * http://www.CollectiveAccess.org * * @package CollectiveAccess * @subpackage Misc * @license http://www.gnu.org/copyleft/gpl.html GNU Public License version 3 * * ---------------------------------------------------------------------- */ /** * */ require_once(__CA_LIB_DIR__.'/core/Configuration.php'); /* * Globals used by Javascript load manager */ /** * Contains configuration object for javascript.conf file */ $g_javascript_config = null; /** * Contains list of Javascript libraries to load */ $g_javascript_load_list = null; /** * Contains array of complementary Javasscript code to load */ $g_javascript_complementary = null; class JavascriptLoadManager { # -------------------------------------------------------------------------------- # -------------------------------------------------------------------------------- static function init() { global $g_javascript_config, $g_javascript_load_list; $o_config = Configuration::load(); $g_javascript_config = Configuration::load($o_config->get('javascript_config')); $g_javascript_load_list = array(); JavascriptLoadManager::register('_default'); } # -------------------------------------------------------------------------------- /** * Causes the specified Javascript library (or libraries) to be loaded for the current request. * There are two ways you can trigger loading of Javascript: * (1) If you pass via the $ps_package parameter a loadSet name defined in javascript.conf then all of the libraries in that loadSet will be loaded * (2) If you pass a package and library name (via $ps_package and $ps_library) then the specified library will be loaded * * Whether you use a loadSet or a package/library combination, if it doesn't have a definition in javascript.conf nothing will be loaded. * * @param $ps_package (string) - The package name containing the library to be loaded *or* a loadSet name. LoadSets describe a set of libraries to be loaded as a unit. * @param $ps_library (string) - The name of the library contained in $ps_package to be loaded. * @return bool - false if load failed, true if load succeeded */ static function register($ps_package, $ps_library=null) { global $g_javascript_config, $g_javascript_load_list; if (!$g_javascript_config) { JavascriptLoadManager::init(); } $va_packages = $g_javascript_config->getAssoc('packages'); if ($ps_library) { // register package/library $va_pack_path = explode('/', $ps_package); $vs_main_package = array_shift($va_pack_path); if (!($va_list = $va_packages[$vs_main_package])) { return false; } while(sizeof($va_pack_path) > 0) { $vs_pack = array_shift($va_pack_path); $va_list = $va_list[$vs_pack]; } if ($va_list[$ps_library]) { $g_javascript_load_list[$ps_package.'/'.$va_list[$ps_library]] = true; return true; } } else { // register loadset $va_loadsets = $g_javascript_config->getAssoc('loadSets'); if ($va_loadset = $va_loadsets[$ps_package]) { $vs_loaded_ok = true; foreach($va_loadset as $vs_path) { $va_tmp = explode('/', $vs_path); $vs_library = array_pop($va_tmp); $vs_package = join('/', $va_tmp); if (!JavascriptLoadManager::register($vs_package, $vs_library)) { $vs_loaded_ok = false; } } return $vs_loaded_ok; } } return false; } # -------------------------------------------------------------------------------- /** * Causes the specified Javascript code to be loaded. * * @param $ps_scriptcontent (string) - script content to load * @return (bool) - false if empty code, true if load succeeded */ static function addComplementaryScript($ps_content=null) { global $g_javascript_config, $g_javascript_load_list, $g_javascript_complementary; if (!$g_javascript_config) { JavascriptLoadManager::init(); } if (!$ps_content) return false; $g_javascript_complementary[]=$ps_content; return true; } # -------------------------------------------------------------------------------- /** * Returns HTML to load registered libraries. Typically you'll output this HTML in the of your page. * * @param $ps_baseurlpath (string) - URL path containing the application's ""js"" directory. * @return string - HTML loading registered libraries */ static function getLoadHTML($ps_baseurlpath) { global $g_javascript_config, $g_javascript_load_list, $g_javascript_complementary; if (!$g_javascript_config) { JavascriptLoadManager::init(); } $vs_buf = ''; if (is_array($g_javascript_load_list)) { foreach($g_javascript_load_list as $vs_lib => $vn_x) { if (preg_match('!(http[s]{0,1}://.*)!', $vs_lib, $va_matches)) { $vs_url = $va_matches[1]; } else { $vs_url = ""{$ps_baseurlpath}/js/{$vs_lib}""; } $vs_buf .= ""\n""; } } if (is_array($g_javascript_complementary)) { foreach($g_javascript_complementary as $vs_code) { $vs_buf .= ""\n""; } } return $vs_buf; } # -------------------------------------------------------------------------------- } ?>",0 "atus=no,menubar=no,scrollbars=yes,resizable=yes"");}
              條目 福無雙至,禍不單行
              注音 ㄈㄨˊ ㄨˊ ㄕㄨㄤ ㄓˋ ㄏㄨㄛˋ ㄅㄨˋ ㄉㄢ ㄒ|ㄥˊ
              漢語拼音 fú wú shuāng zhì huò bù dān xíng
              釋義 (諺語)比喻福祐不會接連而來,禍害卻會接踵而至。文明小史˙第五十回:*自來福無雙至,禍不單行。*亦作*福不重至,禍必重來**福無重受日,禍有並來時*
              附錄 修訂本參考資料
              ",0 "text/css"" href=""../style.css""/>

              This test verifies that render does not lose scene context.

              This test works by redefining the fillStyle on the bar on mouseover. The bar is immediately rendered, and then the label's text property is set to the evaluated fillStyle. This property value can be queried because rendering does not blindly erase the scene and index attributes associated with bar after rendering. ",0 "machine/gen_latch.h"" #include ""machine/input_merger.h"" #include ""sound/msm5232.h"" #include ""machine/taito68705interface.h"" #include ""sound/ta7630.h"" #include ""sound/ay8910.h"" #include ""emupal.h"" #include ""tilemap.h"" class flstory_state : public driver_device { public: flstory_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_videoram(*this, ""videoram""), m_spriteram(*this, ""spriteram""), m_scrlram(*this, ""scrlram""), m_workram(*this, ""workram""), m_maincpu(*this, ""maincpu""), m_audiocpu(*this, ""audiocpu""), m_bmcu(*this, ""bmcu""), m_msm(*this, ""msm""), m_ay(*this, ""aysnd""), m_ta7630(*this, ""ta7630""), m_gfxdecode(*this, ""gfxdecode""), m_palette(*this, ""palette""), m_soundlatch(*this, ""soundlatch""), m_soundlatch2(*this, ""soundlatch2""), m_soundnmi(*this, ""soundnmi""), m_extraio1(*this, ""EXTRA_P1"") { } void common(machine_config &config); void flstory(machine_config &config); void rumba(machine_config &config); void onna34ro(machine_config &config); void victnine(machine_config &config); void onna34ro_mcu(machine_config &config); protected: virtual void machine_start() override; private: /* memory pointers */ required_shared_ptr m_videoram; required_shared_ptr m_spriteram; required_shared_ptr m_scrlram; optional_shared_ptr m_workram; /* video-related */ tilemap_t *m_bg_tilemap; std::vector m_paletteram; std::vector m_paletteram_ext; uint8_t m_gfxctrl; uint8_t m_char_bank; uint8_t m_palette_bank; /* sound-related */ uint8_t m_snd_ctrl0; uint8_t m_snd_ctrl1; uint8_t m_snd_ctrl2; uint8_t m_snd_ctrl3; /* protection sims */ uint8_t m_from_mcu; int m_mcu_select; /* devices */ required_device m_maincpu; required_device m_audiocpu; optional_device m_bmcu; required_device m_msm; required_device m_ay; required_device m_ta7630; required_device m_gfxdecode; required_device m_palette; required_device m_soundlatch; required_device m_soundlatch2; required_device m_soundnmi; optional_ioport m_extraio1; uint8_t snd_flag_r(); void snd_reset_w(uint8_t data); uint8_t flstory_mcu_status_r(); uint8_t victnine_mcu_status_r(); void flstory_videoram_w(offs_t offset, uint8_t data); void flstory_palette_w(offs_t offset, uint8_t data); uint8_t flstory_palette_r(offs_t offset); void flstory_gfxctrl_w(uint8_t data); uint8_t victnine_gfxctrl_r(); void victnine_gfxctrl_w(uint8_t data); void flstory_scrlram_w(offs_t offset, uint8_t data); void sound_control_0_w(uint8_t data); void sound_control_1_w(uint8_t data); void sound_control_2_w(uint8_t data); void sound_control_3_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); TILE_GET_INFO_MEMBER(victnine_get_tile_info); TILE_GET_INFO_MEMBER(get_rumba_tile_info); DECLARE_MACHINE_RESET(flstory); DECLARE_VIDEO_START(flstory); DECLARE_VIDEO_START(victnine); DECLARE_MACHINE_RESET(rumba); DECLARE_VIDEO_START(rumba); DECLARE_MACHINE_RESET(ta7630); uint32_t screen_update_flstory(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_victnine(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_rumba(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void flstory_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); void victnine_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void base_map(address_map &map); void flstory_map(address_map &map); void onna34ro_map(address_map &map); void onna34ro_mcu_map(address_map &map); void rumba_map(address_map &map); void sound_map(address_map &map); void victnine_map(address_map &map); }; #endif // MAME_INCLUDES_FLSTORY_H ",0 "hub.ageofwar.telejam.methods.GetUpdates; import java.io.IOException; import java.util.Collections; import java.util.Objects; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.function.LongUnaryOperator; /** * Utility class that reads new updates received from a bot. * * @author Michi Palazzo */ public final class UpdateReader implements AutoCloseable { private final Bot bot; private final ConcurrentLinkedQueue updates; private final LongUnaryOperator backOff; private long lastUpdateId; /** * Constructs an UpdateReader. * * @param bot the bot that receive updates * @param backOff back off to be used when long polling fails */ public UpdateReader(Bot bot, LongUnaryOperator backOff) { this.bot = Objects.requireNonNull(bot); this.backOff = Objects.requireNonNull(backOff); updates = new ConcurrentLinkedQueue<>(); lastUpdateId = -1; } /** * Constructs an UpdateReader. * * @param bot the bot that receive updates */ public UpdateReader(Bot bot) { this(bot, a -> 500L); } /** * Returns the number of updates that can be read from this update reader without blocking by the * next invocation read method for this update reader. The next invocation * might be the same thread or another thread. * If the available updates are more than {@code Integer.MAX_VALUE}, returns * {@code Integer.MAX_VALUE}. * * @return the number of updates that can be read from this update reader * without blocking by the next invocation read method */ public int available() { return updates.size(); } /** * Tells whether this stream is ready to be read. * * @return true if the next read() is guaranteed not to block for input, * false otherwise. Note that returning false does not guarantee that the * next read will block. */ public boolean ready() { return !updates.isEmpty(); } /** * Reads one update from the stream. * * @return the read update * @throws IOException if an I/O Exception occurs * @throws InterruptedException if any thread has interrupted the current * thread while waiting for updates */ public Update read() throws IOException, InterruptedException { if (!ready()) { for (long attempts = 0; getUpdates() == 0; attempts++) { Thread.sleep(backOff.applyAsLong(attempts)); } } return updates.remove(); } /** * Retrieves new updates received from the bot. * * @return number of updates received * @throws IOException if an I/O Exception occurs */ public int getUpdates() throws IOException { try { Update[] newUpdates = getUpdates(lastUpdateId + 1); Collections.addAll(updates, newUpdates); if (newUpdates.length > 0) { lastUpdateId = newUpdates[newUpdates.length - 1].getId(); } return newUpdates.length; } catch (Throwable e) { if (!(e instanceof TelegramException)) { lastUpdateId++; } throw e; } } /** * Discards buffered updates and all received updates. * * @throws IOException if an I/O Exception occurs */ public void discardAll() throws IOException { Update[] newUpdate = getUpdates(-1); if (newUpdate.length == 1) { lastUpdateId = newUpdate[0].getId(); } updates.clear(); } private Update[] getUpdates(long offset) throws IOException { GetUpdates getUpdates = new GetUpdates() .offset(offset) .allowedUpdates(); return bot.execute(getUpdates); } @Override public void close() throws IOException { try { Update nextUpdate = updates.peek(); getUpdates(nextUpdate != null ? nextUpdate.getId() : lastUpdateId + 1); lastUpdateId = -1; updates.clear(); } catch (IOException e) { throw new IOException(""Unable to close update reader"", e); } } } ",0 "//============================================================================= package ORG.as220.tinySQL.util; /** * Here you can specify where the PreparedStastement should put a * parametr's value inside a text, this place is marked by the * start of the string until reach the parameter see the example bellow;
              *

              String stSQL = ""select NOME, STREET from PERSON where ID = * ?"";
              * The parameter is located in the 43th position, so you must inicialize this * objet as;
              *

              ParameterPosition pp = new ParameterPosition( 0, 43 );
              * We need do this because tinySQLPreparedStastement use this * information to put the value stored inside StatementParameter * after the end of the position with this, * tinySQLPreparedStatement can cut a mount of SQL * before the ? and put value. When the whole process is finished we have * the complete SQL statement ready to the database work. * @author Edson Alves Pereira - 29/12/2001 * @version $Revision: 1.2 $ */ public class ParameterPosition { private int iStart; private int iEnd; public ParameterPosition() { iStart = 0; iEnd = 0; } public ParameterPosition(int iStart_, int iEnd_) { setStart(iStart_); setEnd(iEnd_); } public void setStart(int iStart_) { if (iStart_ >= 0) iStart = iStart_; } public int getStart() { return iStart; } public void setEnd(int iEnd_) { if (iEnd_ >= 0) iEnd = iEnd_; } public int getEnd() { return iEnd; } } ",0 "his 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. */ package com.google.mr4c.message; import com.google.mr4c.util.MR4CLogging; import java.io.IOException; import java.net.URI; import org.slf4j.Logger; public class DefaultMessageHandler implements MessageHandler { protected static final Logger s_log = MR4CLogging.getLogger(DefaultMessageHandler.class); public void setURI(URI uri) {} public void handleMessage(Message msg) throws IOException { s_log.info(""Message sent to default handler for topic [{}] : [{}]"", msg.getTopic(), msg.getContent()); } } ",0 " | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * @author PocketMine Team * @link http://www.pocketmine.net/ * * */ namespace pocketmine\network\protocol; #include class RemoveBlockPacket extends DataPacket{ const NETWORK_ID = Info::REMOVE_BLOCK_PACKET; public $x; public $y; public $z; public function getName(){ return ""RemoveBlockPacket""; } public function decode(){ $this->getBlockCoords($this->x, $this->y, $this->z); } public function encode(){ } } ",0 "2015-2021 Teclib' and contributors. * * http://glpi-project.org * * based on GLPI - Gestionnaire Libre de Parc Informatique * Copyright (C) 2003-2014 by the INDEPNET Development Team. * * --------------------------------------------------------------------- * * LICENSE * * This file is part of GLPI. * * GLPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GLPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GLPI. If not, see . * --------------------------------------------------------------------- */ if (!defined('GLPI_ROOT')) { die(""Sorry. You can't access this file directly""); } use Glpi\Toolbox\VersionParser; /** * Update class **/ class Update { private $args = []; private $DB; private $migration; private $version; private $dbversion; private $language; /** * Constructor * * @param object $DB Database instance * @param array $args Command line arguments; default to empty array */ public function __construct($DB, $args = []) { $this->DB = $DB; $this->args = $args; } /** * Initialize session for update * * @return void */ public function initSession() { if (is_writable(GLPI_SESSION_DIR)) { Session::setPath(); } else { if (isCommandLine()) { die(""Can't write in "".GLPI_SESSION_DIR.""\n""); } } Session::start(); if (isCommandLine()) { // Init debug variable $_SESSION = ['glpilanguage' => (isset($this->args['lang']) ? $this->args['lang'] : 'en_GB')]; $_SESSION[""glpi_currenttime""] = date(""Y-m-d H:i:s""); } // Init debug variable // Only show errors Toolbox::setDebugMode(Session::DEBUG_MODE, 0, 0, 1); } /** * Get current values (versions, lang, ...) * * @return array */ public function getCurrents() { $currents = []; $DB = $this->DB; if (!$DB->tableExists('glpi_config') && !$DB->tableExists('glpi_configs')) { //very, very old version! $currents = [ 'version' => '0.1', 'dbversion' => '0.1', 'language' => 'en_GB' ]; } else if (!$DB->tableExists(""glpi_configs"")) { // < 0.78 // Get current version $result = $DB->request([ 'SELECT' => ['version', 'language'], 'FROM' => 'glpi_config' ])->current(); $currents['version'] = trim($result['version']); $currents['dbversion'] = $currents['version']; $currents['language'] = trim($result['language']); } else if ($DB->fieldExists('glpi_configs', 'version')) { // < 0.85 // Get current version and language $result = $DB->request([ 'SELECT' => ['version', 'language'], 'FROM' => 'glpi_configs' ])->current(); $currents['version'] = trim($result['version']); $currents['dbversion'] = $currents['version']; $currents['language'] = trim($result['language']); } else { $currents = Config::getConfigurationValues( 'core', ['version', 'dbversion', 'language'] ); if (!isset($currents['dbversion'])) { $currents['dbversion'] = $currents['version']; } } $this->version = $currents['version']; $this->dbversion = $currents['dbversion']; $this->language = $currents['language']; return $currents; } /** * Run updates * * @param string $current_version Current version * @param bool $force_latest Force replay of latest migration * * @return void */ public function doUpdates($current_version = null, bool $force_latest = false) { if ($current_version === null) { if ($this->version === null) { throw new \RuntimeException('Cannot process updates without any version specified!'); } $current_version = $this->version; } $DB = $this->DB; // To prevent problem of execution time ini_set(""max_execution_time"", ""0""); if (version_compare($current_version, '0.80', 'lt')) { die('Upgrade is not supported before 0.80!'); die(1); } // Update process desactivate all plugins $plugin = new Plugin(); $plugin->unactivateAll(); if (version_compare($current_version, '0.80', '<') || version_compare($current_version, GLPI_VERSION, '>')) { $message = sprintf( __('Unsupported version (%1$s)'), $current_version ); if (isCommandLine()) { echo ""$message\n""; die(1); } else { $this->migration->displayWarning($message, true); die(1); } } $migrations = $this->getMigrationsToDo($current_version, $force_latest); foreach ($migrations as $file => $function) { include_once($file); $function(); } if (($myisam_count = $DB->getMyIsamTables()->count()) > 0) { $message = sprintf(__('%d tables are using the deprecated MyISAM storage engine.'), $myisam_count) . ' ' . sprintf(__('Run the ""php bin/console %1$s"" command to migrate them.'), 'glpi:migration:myisam_to_innodb'); $this->migration->displayError($message); } if (($datetime_count = $DB->getTzIncompatibleTables()->count()) > 0) { $message = sprintf(__('%1$s columns are using the deprecated datetime storage field type.'), $datetime_count) . ' ' . sprintf(__('Run the ""php bin/console %1$s"" command to migrate them.'), 'glpi:migration:timestamps'); $this->migration->displayError($message); } /* * FIXME: Remove `$DB->use_utf8mb4` condition GLPI 10.1. * This condition is here only to prevent having this message on every migration GLPI 10.0. * Indeed, as migration command was not available in previous versions, users may not understand * why this is considered as an error. */ if ($DB->use_utf8mb4 && ($non_utf8mb4_count = $DB->getNonUtf8mb4Tables()->count()) > 0) { $message = sprintf(__('%1$s tables are using the deprecated utf8mb3 storage charset.'), $non_utf8mb4_count) . ' ' . sprintf(__('Run the ""php bin/console %1$s"" command to migrate them.'), 'glpi:migration:utf8mb4'); $this->migration->displayError($message); } // Update version number and default langage and new version_founded ---- LEAVE AT THE END Config::setConfigurationValues('core', ['version' => GLPI_VERSION, 'dbversion' => GLPI_SCHEMA_VERSION, 'language' => $this->language, 'founded_new_version' => '']); if (defined('GLPI_SYSTEM_CRON')) { // Downstream packages may provide a good system cron $DB->updateOrDie( 'glpi_crontasks', [ 'mode' => 2 ], [ 'name' => ['!=', 'watcher'], 'allowmode' => ['&', 2] ] ); } // Reset telemetry if its state is running, assuming it remained stuck due to telemetry service issue (see #7492). $crontask_telemetry = new CronTask(); $crontask_telemetry->getFromDBbyName(""Telemetry"", ""telemetry""); if ($crontask_telemetry->fields['state'] === CronTask::STATE_RUNNING) { $crontask_telemetry->resetDate(); $crontask_telemetry->resetState(); } //generate security key if missing, and update db $glpikey = new GLPIKey(); if (!$glpikey->keyExists() && !$glpikey->generate()) { $this->migration->displayWarning(__('Unable to create security key file! You have to run ""php bin/console glpi:security:change_key"" command to manually create this file.'), true); } } /** * Set migration * * @param Migration $migration Migration instance * * @return Update */ public function setMigration(Migration $migration) { $this->migration = $migration; return $this; } /** * Check if expected security key file is missing. * * @return bool */ public function isExpectedSecurityKeyFileMissing(): bool { $expected_key_path = $this->getExpectedSecurityKeyFilePath(); if ($expected_key_path === null) { return false; } return !file_exists($expected_key_path); } /** * Returns expected security key file path. * Will return null for GLPI versions that was not yet handling a custom security key. * * @return string|null */ public function getExpectedSecurityKeyFilePath(): ?string { $glpikey = new GLPIKey(); return $glpikey->getExpectedKeyPath($this->getCurrents()['version']); } /** * Get migrations that have to be ran. * * @param string $current_version * @param bool $force_latest * * @return array */ public function getMigrationsToDo(string $current_version, bool $force_latest = false): array { $migrations = []; $current_version = VersionParser::getNormalizedVersion($current_version); $pattern = '/^update_(?\d+\.\d+\.(?:\d+|x))_to_(?\d+\.\d+\.(?:\d+|x))\.php$/'; $migration_iterator = new DirectoryIterator(GLPI_ROOT . '/install/migrations/'); foreach ($migration_iterator as $file) { $versions_matches = []; if ($file->isDir() || $file->isDot() || preg_match($pattern, $file->getFilename(), $versions_matches) !== 1) { continue; } $force_migration = false; if ($current_version === '9.2.2' && $versions_matches['target_version'] === '9.2.2') { //9.2.2 upgrade script was not run from the release, see https://github.com/glpi-project/glpi/issues/3659 $force_migration = true; } else if ($force_latest && version_compare($versions_matches['target_version'], $current_version, '=')) { $force_migration = true; } if (version_compare($versions_matches['target_version'], $current_version, '>') || $force_migration) { $migrations[$file->getRealPath()] = preg_replace( '/^update_(\d+)\.(\d+)\.(\d+|x)_to_(\d+)\.(\d+)\.(\d+|x)\.php$/', 'update$1$2$3to$4$5$6', $file->getBasename() ); } } ksort($migrations); return $migrations; } } ",0 "/ package io.github.nucleuspowered.nucleus.core.scaffold.command.modifier.impl; import io.github.nucleuspowered.nucleus.core.scaffold.command.ICommandContext; import io.github.nucleuspowered.nucleus.core.scaffold.command.annotation.CommandModifier; import io.github.nucleuspowered.nucleus.core.scaffold.command.control.CommandControl; import io.github.nucleuspowered.nucleus.core.scaffold.command.modifier.ICommandModifier; import io.github.nucleuspowered.nucleus.core.services.INucleusServiceCollection; import net.kyori.adventure.text.Component; import java.util.Optional; public class RequiresEconomyModifier implements ICommandModifier { @Override public Optional testRequirement(final ICommandContext source, final CommandControl control, final INucleusServiceCollection serviceCollection, final CommandModifier modifier) { if (!serviceCollection.economyServiceProvider().serviceExists()) { return Optional.of(serviceCollection.messageProvider().getMessageFor(source.cause().audience(), ""command.economyrequired"")); } return Optional.empty(); } } ",0 "enerated by javadoc (version 1.7.0_17) on Mon May 06 00:15:52 EDT 2013 --> Uses of Class org.spongycastle.asn1.x509.ReasonFlags

              JavaScript is disabled on your browser.
              • Prev
              • Next

              Uses of Class
              org.spongycastle.asn1.x509.ReasonFlags

              • Prev
              • Next
              ",0 "ce 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: sligocki@google.com (Shawn Ligocki) #ifndef NET_INSTAWEB_HTTP_PUBLIC_CACHE_URL_ASYNC_FETCHER_H_ #define NET_INSTAWEB_HTTP_PUBLIC_CACHE_URL_ASYNC_FETCHER_H_ #include ""net/instaweb/http/public/url_async_fetcher.h"" #include ""pagespeed/kernel/base/basictypes.h"" #include ""pagespeed/kernel/base/string.h"" namespace net_instaweb { class AsyncFetch; class Hasher; class Histogram; class HTTPCache; class MessageHandler; class NamedLockManager; class Variable; // Composes an asynchronous URL fetcher with an http cache, to // generate an asynchronous caching URL fetcher. // // This fetcher will asynchronously check the cache. If the url // is found in cache and is still valid, the fetch's callback will be // called right away. This includes any cached failures or that URL // is uncacheable, unless set_ignore_recent_fetch_failed(true) is called. // Otherwise (if fetcher != NULL) an async fetch will be performed in the // fetcher, the result of which will be written into the cache. In case the // fetch fails and there is a stale response in the cache, we serve the stale // response. // // If fetcher == NULL, this will only perform a cache lookup and then call // the callback immediately. // // In case of cache hit and resource is about to expire (80% of TTL or 5 mins // which ever is minimum), it will trigger background fetch to freshen the value // in cache. Background fetch only be triggered only if async_op_hooks_ != NULL, // otherwise, fetcher object accessed by BackgroundFreshenFetch may be deleted // by the time origin fetch finishes. // // TODO(sligocki): In order to use this for fetching resources for rewriting // we'd need to integrate resource locking in this class. Do we want that? class CacheUrlAsyncFetcher : public UrlAsyncFetcher { public: // Interface for managing async operations in CacheUrlAsyncFetcher. It helps // to protect the lifetime of the injected objects. class AsyncOpHooks { public: AsyncOpHooks() {} virtual ~AsyncOpHooks(); // Called when CacheUrlAsyncFetcher is about to start async operation. virtual void StartAsyncOp() = 0; // Called when async operation is ended. virtual void FinishAsyncOp() = 0; }; // None of these are owned by CacheUrlAsyncFetcher. CacheUrlAsyncFetcher(const Hasher* lock_hasher, NamedLockManager* lock_manager, HTTPCache* cache, const GoogleString& fragment, AsyncOpHooks* async_op_hooks, UrlAsyncFetcher* fetcher) : lock_hasher_(lock_hasher), lock_manager_(lock_manager), http_cache_(cache), fragment_(fragment), fetcher_(fetcher), async_op_hooks_(async_op_hooks), backend_first_byte_latency_(NULL), fallback_responses_served_(NULL), fallback_responses_served_while_revalidate_(NULL), num_conditional_refreshes_(NULL), num_proactively_freshen_user_facing_request_(NULL), respect_vary_(false), ignore_recent_fetch_failed_(false), serve_stale_if_fetch_error_(false), default_cache_html_(false), proactively_freshen_user_facing_request_(false), own_fetcher_(false), serve_stale_while_revalidate_threshold_sec_(0) { } virtual ~CacheUrlAsyncFetcher(); virtual bool SupportsHttps() const { return fetcher_->SupportsHttps(); } virtual void Fetch(const GoogleString& url, MessageHandler* message_handler, AsyncFetch* base_fetch); // HTTP status code used to indicate that we failed the Fetch because // result was not found in cache. (Only happens if fetcher_ == NULL). static const int kNotInCacheStatus; HTTPCache* http_cache() const { return http_cache_; } UrlAsyncFetcher* fetcher() const { return fetcher_; } void set_backend_first_byte_latency_histogram(Histogram* x) { backend_first_byte_latency_ = x; } Histogram* backend_first_byte_latency_histogram() const { return backend_first_byte_latency_; } void set_fallback_responses_served(Variable* x) { fallback_responses_served_ = x; } Variable* fallback_responses_served() const { return fallback_responses_served_; } void set_fallback_responses_served_while_revalidate(Variable* x) { fallback_responses_served_while_revalidate_ = x; } Variable* fallback_responses_served_while_revalidate() const { return fallback_responses_served_while_revalidate_; } void set_num_conditional_refreshes(Variable* x) { num_conditional_refreshes_ = x; } Variable* num_conditional_refreshes() const { return num_conditional_refreshes_; } void set_num_proactively_freshen_user_facing_request(Variable* x) { num_proactively_freshen_user_facing_request_ = x; } Variable* num_proactively_freshen_user_facing_request() const { return num_proactively_freshen_user_facing_request_; } void set_respect_vary(bool x) { respect_vary_ = x; } bool respect_vary() const { return respect_vary_; } void set_ignore_recent_fetch_failed(bool x) { ignore_recent_fetch_failed_ = x; } bool ignore_recent_fetch_failed() const { return ignore_recent_fetch_failed_; } void set_serve_stale_if_fetch_error(bool x) { serve_stale_if_fetch_error_ = x; } bool serve_stale_if_fetch_error() const { return serve_stale_if_fetch_error_; } void set_serve_stale_while_revalidate_threshold_sec(int64 x) { serve_stale_while_revalidate_threshold_sec_ = x; } int64 serve_stale_while_revalidate_threshold_sec() const { return serve_stale_while_revalidate_threshold_sec_; } void set_default_cache_html(bool x) { default_cache_html_ = x; } bool default_cache_html() const { return default_cache_html_; } void set_proactively_freshen_user_facing_request(bool x) { proactively_freshen_user_facing_request_ = x; } bool proactively_freshen_user_facing_request() const { return proactively_freshen_user_facing_request_; } void set_own_fetcher(bool x) { own_fetcher_ = x; } private: // Not owned by CacheUrlAsyncFetcher. const Hasher* lock_hasher_; NamedLockManager* lock_manager_; HTTPCache* http_cache_; GoogleString fragment_; UrlAsyncFetcher* fetcher_; // may be NULL. AsyncOpHooks* async_op_hooks_; Histogram* backend_first_byte_latency_; // may be NULL. Variable* fallback_responses_served_; // may be NULL. Variable* fallback_responses_served_while_revalidate_; // may be NULL. Variable* num_conditional_refreshes_; // may be NULL. Variable* num_proactively_freshen_user_facing_request_; // may be NULL. bool respect_vary_; bool ignore_recent_fetch_failed_; bool serve_stale_if_fetch_error_; bool default_cache_html_; bool proactively_freshen_user_facing_request_; bool own_fetcher_; // set true to transfer ownership of fetcher to this. int64 serve_stale_while_revalidate_threshold_sec_; DISALLOW_COPY_AND_ASSIGN(CacheUrlAsyncFetcher); }; } // namespace net_instaweb #endif // NET_INSTAWEB_HTTP_PUBLIC_CACHE_URL_ASYNC_FETCHER_H_ ",0 "*************************** * SugarCRM is a customer relationship management program developed by * SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the * Free Software Foundation with the addition of the following permission added * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the ""Powered by * SugarCRM"" logo. If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * ""Powered by SugarCRM"". ********************************************************************************/ /********************************************************************************* * Description: This file is used to override the default Meta-data EditView behavior * to provide customization specific to the Calls module. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. * All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ require_once ('include/MVC/View/views/view.edit.php') ; require_once ('modules/ModuleBuilder/parsers/ParserFactory.php') ; require_once ('modules/ModuleBuilder/MB/AjaxCompose.php') ; require_once 'modules/ModuleBuilder/parsers/constants.php' ; //require_once('include/Utils.php'); class ViewLayoutView extends ViewEdit { function ViewLayoutView () { $GLOBALS [ 'log' ]->debug ( 'in ViewLayoutView' ) ; $this->editModule = $_REQUEST [ 'view_module' ] ; $this->editLayout = $_REQUEST [ 'view' ] ; $this->package = null; $this->fromModuleBuilder = isset ( $_REQUEST [ 'MB' ] ) || !empty($_REQUEST [ 'view_package' ]); if ($this->fromModuleBuilder) { $this->package = $_REQUEST [ 'view_package' ] ; } else { global $app_list_strings ; $moduleNames = array_change_key_case ( $app_list_strings [ 'moduleList' ] ) ; $this->translatedEditModule = $moduleNames [ strtolower ( $this->editModule ) ] ; } } /** * @see SugarView::_getModuleTitleParams() */ protected function _getModuleTitleParams() { global $mod_strings; return array( translate('LBL_MODULE_NAME','Administration'), $mod_strings['LBL_MODULEBUILDER'], ); } // DO NOT REMOVE - overrides parent ViewEdit preDisplay() which attempts to load a bean for a non-existent module function preDisplay () { } function display ($preview = false) { global $mod_strings ; $parser = ParserFactory::getParser($this->editLayout,$this->editModule,$this->package); $history = $parser->getHistory () ; $smarty = new Sugar_Smarty ( ) ; //Add in the module we are viewing to our current mod strings if (! $this->fromModuleBuilder) { global $current_language; $editModStrings = return_module_language($current_language, $this->editModule); $mod_strings = sugarArrayMerge($editModStrings, $mod_strings); } $smarty->assign('mod', $mod_strings); $smarty->assign('MOD', $mod_strings); // assign buttons $images = array ( 'icon_save' => 'studio_save' , 'icon_publish' => 'studio_publish' , 'icon_address' => 'icon_Address' , 'icon_emailaddress' => 'icon_EmailAddress' , 'icon_phone' => 'icon_Phone' ) ; foreach ( $images as $image => $file ) { $smarty->assign ( $image, SugarThemeRegistry::current()->getImage($file) ) ; } $requiredFields = implode($parser->getRequiredFields () , ','); $slashedRequiredFields = addslashes($requiredFields); $buttons = array ( ) ; if ($preview) { $smarty->assign ( 'layouttitle', translate ( 'LBL_LAYOUT_PREVIEW', 'ModuleBuilder' ) ) ; } else { $smarty->assign ( 'layouttitle', translate ( 'LBL_CURRENT_LAYOUT', 'ModuleBuilder' ) ) ; if (! $this->fromModuleBuilder) { $buttons [] = array ( 'id' => 'saveBtn' , 'text' => translate ( 'LBL_BTN_SAVE' ) , 'actionScript' => ""onclick='if(Studio2.checkGridLayout()) Studio2.handleSave();'"" ) ; $buttons [] = array ( 'id' => 'publishBtn' , 'text' => translate ( 'LBL_BTN_SAVEPUBLISH' ) , 'actionScript' => ""onclick='if(Studio2.checkGridLayout()) Studio2.handlePublish();'"" ) ; $buttons [] = array ( 'id' => 'spacer' , 'width' => '50px' ) ; $buttons [] = array ( 'id' => 'historyBtn' , 'text' => translate ( 'LBL_HISTORY' ) , 'actionScript' => ""onclick='ModuleBuilder.history.browse(\""{$this->editModule}\"", \""{$this->editLayout}\"")'"") ; $buttons [] = array ( 'id' => 'historyDefault' , 'text' => translate ( 'LBL_RESTORE_DEFAULT' ) , 'actionScript' => ""onclick='ModuleBuilder.history.revert(\""{$this->editModule}\"", \""{$this->editLayout}\"", \""{$history->getLast()}\"", \""\"")'"" ) ; } else { $buttons [] = array ( 'id' => 'saveBtn' , 'text' => $GLOBALS [ 'mod_strings' ] [ 'LBL_BTN_SAVE' ] , 'actionScript' => ""onclick='if(Studio2.checkGridLayout()) Studio2.handlePublish();'"" ) ; $buttons [] = array ( 'id' => 'spacer' , 'width' => '50px' ) ; $buttons [] = array ( 'id' => 'historyBtn' , 'text' => translate ( 'LBL_HISTORY' ) , 'actionScript' => ""onclick='ModuleBuilder.history.browse(\""{$this->editModule}\"", \""{$this->editLayout}\"")'"" ) ; $buttons [] = array ( 'id' => 'historyDefault' , 'text' => translate ( 'LBL_RESTORE_DEFAULT' ) , 'actionScript' => ""onclick='ModuleBuilder.history.revert(\""{$this->editModule}\"", \""{$this->editLayout}\"", \""{$history->getLast()}\"", \""\"")'"" ) ; } } $html = """" ; foreach ( $buttons as $button ) { if ($button['id'] == ""spacer"") { $html .= "" ""; } else { $html .= """" ; } } $smarty->assign ( 'buttons', $html ) ; // assign fields and layout $smarty->assign ( 'available_fields', $parser->getAvailableFields () ) ; $smarty->assign ( 'required_fields', $requiredFields) ; $smarty->assign ( 'layout', $parser->getLayout () ) ; $smarty->assign ( 'view_module', $this->editModule ) ; $smarty->assign ( 'view', $this->editLayout ) ; $smarty->assign ( 'maxColumns', $parser->getMaxColumns() ) ; $smarty->assign ( 'nextPanelId', $parser->getFirstNewPanelId() ) ; $smarty->assign ( 'displayAsTabs', $parser->getUseTabs() ) ; $smarty->assign ( 'fieldwidth', 150 ) ; $smarty->assign ( 'translate', $this->fromModuleBuilder ? false : true ) ; if ($this->fromModuleBuilder) { $smarty->assign ( 'fromModuleBuilder', $this->fromModuleBuilder ) ; $smarty->assign ( 'view_package', $this->package ) ; } $labels = array ( MB_EDITVIEW => 'LBL_EDITVIEW' , MB_DETAILVIEW => 'LBL_DETAILVIEW' , MB_QUICKCREATE => 'LBL_QUICKCREATE', ) ; $layoutLabel = 'LBL_LAYOUTS' ; $layoutView = 'layouts' ; $ajax = new AjaxCompose ( ) ; $viewType; $translatedViewType = '' ; if ( isset ( $labels [ strtolower ( $this->editLayout ) ] ) ) $translatedViewType = translate ( $labels [ strtolower( $this->editLayout ) ] , 'ModuleBuilder' ) ; if ($this->fromModuleBuilder) { $ajax->addCrumb ( translate ( 'LBL_MODULEBUILDER', 'ModuleBuilder' ), 'ModuleBuilder.main(""mb"")' ) ; $ajax->addCrumb ( $this->package, 'ModuleBuilder.getContent(""module=ModuleBuilder&action=package&package=' . $this->package . '"")' ) ; $ajax->addCrumb ( $this->editModule, 'ModuleBuilder.getContent(""module=ModuleBuilder&action=module&view_package=' . $this->package . '&view_module=' . $this->editModule . '"")' ) ; $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent(""module=ModuleBuilder&MB=true&action=wizard&view='.$layoutView.'&view_module=' . $this->editModule . '&view_package=' . $this->package . '"")' ) ; $ajax->addCrumb ( $translatedViewType, '' ) ; } else { $ajax->addCrumb ( translate ( 'LBL_STUDIO', 'ModuleBuilder' ), 'ModuleBuilder.main(""studio"")' ) ; $ajax->addCrumb ( $this->translatedEditModule, 'ModuleBuilder.getContent(""module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '"")' ) ; $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent(""module=ModuleBuilder&action=wizard&view='.$layoutView.'&view_module=' . $this->editModule . '"")' ) ; $ajax->addCrumb ( $translatedViewType, '' ) ; } // set up language files $smarty->assign ( 'language', $parser->getLanguage() ) ; // for sugar_translate in the smarty template $smarty->assign('from_mb',$this->fromModuleBuilder); if ($this->fromModuleBuilder) { $mb = new ModuleBuilder ( ) ; $module = & $mb->getPackageModule ( $this->package, $this->editModule ) ; $smarty->assign('current_mod_strings', $module->getModStrings()); } $ajax->addSection ( 'center', $translatedViewType, $smarty->fetch ( 'modules/ModuleBuilder/tpls/layoutView.tpl' ) ) ; if ($preview) { echo $smarty->fetch ( 'modules/ModuleBuilder/tpls/Preview/layoutView.tpl' ); } else { echo $ajax->getJavascript () ; } } } ",0 " 3:28 AM * To change this template use File | Settings | File Templates. */ public enum BSONType { Double(BSON.NUMBER), String(BSON.STRING), Object(BSON.OBJECT), Array(BSON.ARRAY), BinaryData(BSON.BINARY), ObjectId(BSON.OID), Boolean(BSON.BOOLEAN), Date(BSON.DATE), Null(BSON.NULL), RegularExpression(BSON.REGEX), Code(BSON.CODE), Symbol(BSON.SYMBOL), CodeWithScope(BSON.CODE_W_SCOPE), Integer(BSON.NUMBER_INT), Timestamp(BSON.TIMESTAMP), Long(BSON.NUMBER_LONG), MinKey(BSON.MINKEY), MaxKey(BSON.MAXKEY); private final byte _typeCode; BSONType(byte typeCode) { _typeCode = typeCode; } byte getTypeCode() { return _typeCode; } } ",0 "ct ' * Polynomial Factor'. * *

              * The following features are supported: *

                *
              • {@link tools.descartes.dlim.PolynomialFactor#getFactor Factor}
              • *
              • {@link tools.descartes.dlim.PolynomialFactor#getOffset Offset}
              • *
              *

              * * @see tools.descartes.dlim.DlimPackage#getPolynomialFactor() * @model * @generated */ public interface PolynomialFactor extends EObject { /** * Returns the value of the 'Factor' attribute. The default * value is ""0.0"". *

              * If the meaning of the 'Factor' attribute isn't clear, there * really should be more of a description here... *

              * * * @return the value of the 'Factor' attribute. * @see #setFactor(double) * @see tools.descartes.dlim.DlimPackage#getPolynomialFactor_Factor() * @model default=""0.0"" derived=""true"" * @generated */ double getFactor(); /** * Sets the value of the ' * {@link tools.descartes.dlim.PolynomialFactor#getFactor Factor}' * attribute. * * @param value * the new value of the 'Factor' attribute. * @see #getFactor() * @generated */ void setFactor(double value); /** * Returns the value of the 'Offset' attribute. The default * value is ""0.0"". *

              * If the meaning of the 'Offset' attribute isn't clear, there * really should be more of a description here... *

              * * * @return the value of the 'Offset' attribute. * @see #setOffset(double) * @see tools.descartes.dlim.DlimPackage#getPolynomialFactor_Offset() * @model default=""0.0"" derived=""true"" * @generated */ double getOffset(); /** * Sets the value of the ' * {@link tools.descartes.dlim.PolynomialFactor#getOffset Offset}' * attribute. * * @param value * the new value of the 'Offset' attribute. * @see #getOffset() * @generated */ void setOffset(double value); } // PolynomialFactor ",0 "ort org.nd4j.base.Preconditions; import org.nd4j.linalg.api.buffer.DataType; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.api.ops.DynamicCustomOp; import org.tensorflow.framework.AttrValue; import org.tensorflow.framework.GraphDef; import org.tensorflow.framework.NodeDef; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; /** * Fake quantization operation. * Quantized into range [0, 2^numBits - 1] when narrowRange is false, or [1, 2^numBits - 1] when narrowRange is true. * Note that numBits must be in range 2 to 16 (inclusive). * @author Alex Black */ public class FakeQuantWithMinMaxVars extends DynamicCustomOp { protected boolean narrowRange; protected int numBits; public FakeQuantWithMinMaxVars(SameDiff sd, SDVariable input, SDVariable min, SDVariable max, boolean narrowRange, int numBits){ super(sd, new SDVariable[]{input, min, max}); Preconditions.checkState(numBits >= 2 && numBits <= 16, ""NumBits arg must be in range 2 to 16 inclusive, got %s"", numBits); this.narrowRange = narrowRange; this.numBits = numBits; addArgs(); } public FakeQuantWithMinMaxVars(INDArray x, INDArray min, INDArray max, int num_bits, boolean narrow) { Preconditions.checkArgument(min.isVector() && max.isVector() && min.length() == max.length(), ""FakeQuantWithMinMaxVars: min and max should be 1D tensors with the same length""); addInputArgument(x,min,max); addIArgument(num_bits); addBArgument(narrow); } public FakeQuantWithMinMaxVars(){ } protected void addArgs(){ iArguments.clear(); bArguments.clear(); addIArgument(numBits); addBArgument(narrowRange); } @Override public String opName(){ return ""fake_quant_with_min_max_vars""; } @Override public String tensorflowName(){ return ""FakeQuantWithMinMaxVars""; } @Override public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map attributesForNode, GraphDef graph) { if(attributesForNode.containsKey(""narrow_range"")){ this.narrowRange = attributesForNode.get(""narrow_range"").getB(); } this.numBits = (int)attributesForNode.get(""num_bits"").getI(); addArgs(); } @Override public List calculateOutputDataTypes(List inputDataTypes){ Preconditions.checkState(inputDataTypes != null && inputDataTypes.size() == 3, ""Expected exactly 3 inputs, got %s"", inputDataTypes); return Collections.singletonList(inputDataTypes.get(0)); } @Override public List doDiff(List gradients){ return Arrays.asList(sameDiff.zerosLike(arg(0)), sameDiff.zerosLike(arg(1)), sameDiff.zerosLike(arg(2))); } } ",0 "***************************************************************************/ /* * Copyright (C) 2000 - 2016, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions, and the following disclaimer, * without modification. * 2. Redistributions in binary form must reproduce at minimum a disclaimer * substantially similar to the ""NO WARRANTY"" disclaimer below * (""Disclaimer"") and any redistribution must be conditioned upon * including a substantially similar Disclaimer requirement for further * binary redistribution. * 3. Neither the names of the above-listed copyright holders nor the names * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * Alternatively, this software may be distributed under the terms of the * GNU General Public License (""GPL"") version 2 as published by the Free * Software Foundation. * * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. */ #include #include #include #include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME (""rscalc"") /* Local prototypes */ static UINT8 AcpiRsCountSetBits ( UINT16 BitField); static ACPI_RS_LENGTH AcpiRsStructOptionLength ( ACPI_RESOURCE_SOURCE *ResourceSource); static UINT32 AcpiRsStreamOptionLength ( UINT32 ResourceLength, UINT32 MinimumTotalLength); /******************************************************************************* * * FUNCTION: AcpiRsCountSetBits * * PARAMETERS: BitField - Field in which to count bits * * RETURN: Number of bits set within the field * * DESCRIPTION: Count the number of bits set in a resource field. Used for * (Short descriptor) interrupt and DMA lists. * ******************************************************************************/ static UINT8 AcpiRsCountSetBits ( UINT16 BitField) { UINT8 BitsSet; ACPI_FUNCTION_ENTRY (); for (BitsSet = 0; BitField; BitsSet++) { /* Zero the least significant bit that is set */ BitField &= (UINT16) (BitField - 1); } return (BitsSet); } /******************************************************************************* * * FUNCTION: AcpiRsStructOptionLength * * PARAMETERS: ResourceSource - Pointer to optional descriptor field * * RETURN: Status * * DESCRIPTION: Common code to handle optional ResourceSourceIndex and * ResourceSource fields in some Large descriptors. Used during * list-to-stream conversion * ******************************************************************************/ static ACPI_RS_LENGTH AcpiRsStructOptionLength ( ACPI_RESOURCE_SOURCE *ResourceSource) { ACPI_FUNCTION_ENTRY (); /* * If the ResourceSource string is valid, return the size of the string * (StringLength includes the NULL terminator) plus the size of the * ResourceSourceIndex (1). */ if (ResourceSource->StringPtr) { return ((ACPI_RS_LENGTH) (ResourceSource->StringLength + 1)); } return (0); } /******************************************************************************* * * FUNCTION: AcpiRsStreamOptionLength * * PARAMETERS: ResourceLength - Length from the resource header * MinimumTotalLength - Minimum length of this resource, before * any optional fields. Includes header size * * RETURN: Length of optional string (0 if no string present) * * DESCRIPTION: Common code to handle optional ResourceSourceIndex and * ResourceSource fields in some Large descriptors. Used during * stream-to-list conversion * ******************************************************************************/ static UINT32 AcpiRsStreamOptionLength ( UINT32 ResourceLength, UINT32 MinimumAmlResourceLength) { UINT32 StringLength = 0; ACPI_FUNCTION_ENTRY (); /* * The ResourceSourceIndex and ResourceSource are optional elements of * some Large-type resource descriptors. */ /* * If the length of the actual resource descriptor is greater than the * ACPI spec-defined minimum length, it means that a ResourceSourceIndex * exists and is followed by a (required) null terminated string. The * string length (including the null terminator) is the resource length * minus the minimum length, minus one byte for the ResourceSourceIndex * itself. */ if (ResourceLength > MinimumAmlResourceLength) { /* Compute the length of the optional string */ StringLength = ResourceLength - MinimumAmlResourceLength - 1; } /* * Round the length up to a multiple of the native word in order to * guarantee that the entire resource descriptor is native word aligned */ return ((UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (StringLength)); } /******************************************************************************* * * FUNCTION: AcpiRsGetAmlLength * * PARAMETERS: Resource - Pointer to the resource linked list * ResourceListSize - Size of the resource linked list * SizeNeeded - Where the required size is returned * * RETURN: Status * * DESCRIPTION: Takes a linked list of internal resource descriptors and * calculates the size buffer needed to hold the corresponding * external resource byte stream. * ******************************************************************************/ ACPI_STATUS AcpiRsGetAmlLength ( ACPI_RESOURCE *Resource, ACPI_SIZE ResourceListSize, ACPI_SIZE *SizeNeeded) { ACPI_SIZE AmlSizeNeeded = 0; ACPI_RESOURCE *ResourceEnd; ACPI_RS_LENGTH TotalSize; ACPI_FUNCTION_TRACE (RsGetAmlLength); /* Traverse entire list of internal resource descriptors */ ResourceEnd = ACPI_ADD_PTR (ACPI_RESOURCE, Resource, ResourceListSize); while (Resource < ResourceEnd) { /* Validate the descriptor type */ if (Resource->Type > ACPI_RESOURCE_TYPE_MAX) { return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); } /* Sanity check the length. It must not be zero, or we loop forever */ if (!Resource->Length) { return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); } /* Get the base size of the (external stream) resource descriptor */ TotalSize = AcpiGbl_AmlResourceSizes [Resource->Type]; /* * Augment the base size for descriptors with optional and/or * variable-length fields */ switch (Resource->Type) { case ACPI_RESOURCE_TYPE_IRQ: /* Length can be 3 or 2 */ if (Resource->Data.Irq.DescriptorLength == 2) { TotalSize--; } break; case ACPI_RESOURCE_TYPE_START_DEPENDENT: /* Length can be 1 or 0 */ if (Resource->Data.Irq.DescriptorLength == 0) { TotalSize--; } break; case ACPI_RESOURCE_TYPE_VENDOR: /* * Vendor Defined Resource: * For a Vendor Specific resource, if the Length is between 1 and 7 * it will be created as a Small Resource data type, otherwise it * is a Large Resource data type. */ if (Resource->Data.Vendor.ByteLength > 7) { /* Base size of a Large resource descriptor */ TotalSize = sizeof (AML_RESOURCE_LARGE_HEADER); } /* Add the size of the vendor-specific data */ TotalSize = (ACPI_RS_LENGTH) (TotalSize + Resource->Data.Vendor.ByteLength); break; case ACPI_RESOURCE_TYPE_END_TAG: /* * End Tag: * We are done -- return the accumulated total size. */ *SizeNeeded = AmlSizeNeeded + TotalSize; /* Normal exit */ return_ACPI_STATUS (AE_OK); case ACPI_RESOURCE_TYPE_ADDRESS16: /* * 16-Bit Address Resource: * Add the size of the optional ResourceSource info */ TotalSize = (ACPI_RS_LENGTH) (TotalSize + AcpiRsStructOptionLength ( &Resource->Data.Address16.ResourceSource)); break; case ACPI_RESOURCE_TYPE_ADDRESS32: /* * 32-Bit Address Resource: * Add the size of the optional ResourceSource info */ TotalSize = (ACPI_RS_LENGTH) (TotalSize + AcpiRsStructOptionLength ( &Resource->Data.Address32.ResourceSource)); break; case ACPI_RESOURCE_TYPE_ADDRESS64: /* * 64-Bit Address Resource: * Add the size of the optional ResourceSource info */ TotalSize = (ACPI_RS_LENGTH) (TotalSize + AcpiRsStructOptionLength ( &Resource->Data.Address64.ResourceSource)); break; case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: /* * Extended IRQ Resource: * Add the size of each additional optional interrupt beyond the * required 1 (4 bytes for each UINT32 interrupt number) */ TotalSize = (ACPI_RS_LENGTH) (TotalSize + ((Resource->Data.ExtendedIrq.InterruptCount - 1) * 4) + /* Add the size of the optional ResourceSource info */ AcpiRsStructOptionLength ( &Resource->Data.ExtendedIrq.ResourceSource)); break; case ACPI_RESOURCE_TYPE_GPIO: TotalSize = (ACPI_RS_LENGTH) (TotalSize + (Resource->Data.Gpio.PinTableLength * 2) + Resource->Data.Gpio.ResourceSource.StringLength + Resource->Data.Gpio.VendorLength); break; case ACPI_RESOURCE_TYPE_SERIAL_BUS: TotalSize = AcpiGbl_AmlResourceSerialBusSizes [ Resource->Data.CommonSerialBus.Type]; TotalSize = (ACPI_RS_LENGTH) (TotalSize + Resource->Data.I2cSerialBus.ResourceSource.StringLength + Resource->Data.I2cSerialBus.VendorLength); break; default: break; } /* Update the total */ AmlSizeNeeded += TotalSize; /* Point to the next object */ Resource = ACPI_ADD_PTR (ACPI_RESOURCE, Resource, Resource->Length); } /* Did not find an EndTag resource descriptor */ return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG); } /******************************************************************************* * * FUNCTION: AcpiRsGetListLength * * PARAMETERS: AmlBuffer - Pointer to the resource byte stream * AmlBufferLength - Size of AmlBuffer * SizeNeeded - Where the size needed is returned * * RETURN: Status * * DESCRIPTION: Takes an external resource byte stream and calculates the size * buffer needed to hold the corresponding internal resource * descriptor linked list. * ******************************************************************************/ ACPI_STATUS AcpiRsGetListLength ( UINT8 *AmlBuffer, UINT32 AmlBufferLength, ACPI_SIZE *SizeNeeded) { ACPI_STATUS Status; UINT8 *EndAml; UINT8 *Buffer; UINT32 BufferSize; UINT16 Temp16; UINT16 ResourceLength; UINT32 ExtraStructBytes; UINT8 ResourceIndex; UINT8 MinimumAmlResourceLength; AML_RESOURCE *AmlResource; ACPI_FUNCTION_TRACE (RsGetListLength); *SizeNeeded = ACPI_RS_SIZE_MIN; /* Minimum size is one EndTag */ EndAml = AmlBuffer + AmlBufferLength; /* Walk the list of AML resource descriptors */ while (AmlBuffer < EndAml) { /* Validate the Resource Type and Resource Length */ Status = AcpiUtValidateResource (NULL, AmlBuffer, &ResourceIndex); if (ACPI_FAILURE (Status)) { /* * Exit on failure. Cannot continue because the descriptor length * may be bogus also. */ return_ACPI_STATUS (Status); } AmlResource = (void *) AmlBuffer; /* Get the resource length and base (minimum) AML size */ ResourceLength = AcpiUtGetResourceLength (AmlBuffer); MinimumAmlResourceLength = AcpiGbl_ResourceAmlSizes[ResourceIndex]; /* * Augment the size for descriptors with optional * and/or variable length fields */ ExtraStructBytes = 0; Buffer = AmlBuffer + AcpiUtGetResourceHeaderLength (AmlBuffer); switch (AcpiUtGetResourceType (AmlBuffer)) { case ACPI_RESOURCE_NAME_IRQ: /* * IRQ Resource: * Get the number of bits set in the 16-bit IRQ mask */ ACPI_MOVE_16_TO_16 (&Temp16, Buffer); ExtraStructBytes = AcpiRsCountSetBits (Temp16); break; case ACPI_RESOURCE_NAME_DMA: /* * DMA Resource: * Get the number of bits set in the 8-bit DMA mask */ ExtraStructBytes = AcpiRsCountSetBits (*Buffer); break; case ACPI_RESOURCE_NAME_VENDOR_SMALL: case ACPI_RESOURCE_NAME_VENDOR_LARGE: /* * Vendor Resource: * Get the number of vendor data bytes */ ExtraStructBytes = ResourceLength; /* * There is already one byte included in the minimum * descriptor size. If there are extra struct bytes, * subtract one from the count. */ if (ExtraStructBytes) { ExtraStructBytes--; } break; case ACPI_RESOURCE_NAME_END_TAG: /* * End Tag: This is the normal exit */ return_ACPI_STATUS (AE_OK); case ACPI_RESOURCE_NAME_ADDRESS32: case ACPI_RESOURCE_NAME_ADDRESS16: case ACPI_RESOURCE_NAME_ADDRESS64: /* * Address Resource: * Add the size of the optional ResourceSource */ ExtraStructBytes = AcpiRsStreamOptionLength ( ResourceLength, MinimumAmlResourceLength); break; case ACPI_RESOURCE_NAME_EXTENDED_IRQ: /* * Extended IRQ Resource: * Using the InterruptTableLength, add 4 bytes for each additional * interrupt. Note: at least one interrupt is required and is * included in the minimum descriptor size (reason for the -1) */ ExtraStructBytes = (Buffer[1] - 1) * sizeof (UINT32); /* Add the size of the optional ResourceSource */ ExtraStructBytes += AcpiRsStreamOptionLength ( ResourceLength - ExtraStructBytes, MinimumAmlResourceLength); break; case ACPI_RESOURCE_NAME_GPIO: /* Vendor data is optional */ if (AmlResource->Gpio.VendorLength) { ExtraStructBytes += AmlResource->Gpio.VendorOffset - AmlResource->Gpio.PinTableOffset + AmlResource->Gpio.VendorLength; } else { ExtraStructBytes += AmlResource->LargeHeader.ResourceLength + sizeof (AML_RESOURCE_LARGE_HEADER) - AmlResource->Gpio.PinTableOffset; } break; case ACPI_RESOURCE_NAME_SERIAL_BUS: MinimumAmlResourceLength = AcpiGbl_ResourceAmlSerialBusSizes[ AmlResource->CommonSerialBus.Type]; ExtraStructBytes += AmlResource->CommonSerialBus.ResourceLength - MinimumAmlResourceLength; break; default: break; } /* * Update the required buffer size for the internal descriptor structs * * Important: Round the size up for the appropriate alignment. This * is a requirement on IA64. */ if (AcpiUtGetResourceType (AmlBuffer) == ACPI_RESOURCE_NAME_SERIAL_BUS) { BufferSize = AcpiGbl_ResourceStructSerialBusSizes[ AmlResource->CommonSerialBus.Type] + ExtraStructBytes; } else { BufferSize = AcpiGbl_ResourceStructSizes[ResourceIndex] + ExtraStructBytes; } BufferSize = (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (BufferSize); *SizeNeeded += BufferSize; ACPI_DEBUG_PRINT ((ACPI_DB_RESOURCES, ""Type %.2X, AmlLength %.2X InternalLength %.2X\n"", AcpiUtGetResourceType (AmlBuffer), AcpiUtGetDescriptorLength (AmlBuffer), BufferSize)); /* * Point to the next resource within the AML stream using the length * contained in the resource descriptor header */ AmlBuffer += AcpiUtGetDescriptorLength (AmlBuffer); } /* Did not find an EndTag resource descriptor */ return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG); } /******************************************************************************* * * FUNCTION: AcpiRsGetPciRoutingTableLength * * PARAMETERS: PackageObject - Pointer to the package object * BufferSizeNeeded - UINT32 pointer of the size buffer * needed to properly return the * parsed data * * RETURN: Status * * DESCRIPTION: Given a package representing a PCI routing table, this * calculates the size of the corresponding linked list of * descriptions. * ******************************************************************************/ ACPI_STATUS AcpiRsGetPciRoutingTableLength ( ACPI_OPERAND_OBJECT *PackageObject, ACPI_SIZE *BufferSizeNeeded) { UINT32 NumberOfElements; ACPI_SIZE TempSizeNeeded = 0; ACPI_OPERAND_OBJECT **TopObjectList; UINT32 Index; ACPI_OPERAND_OBJECT *PackageElement; ACPI_OPERAND_OBJECT **SubObjectList; BOOLEAN NameFound; UINT32 TableIndex; ACPI_FUNCTION_TRACE (RsGetPciRoutingTableLength); NumberOfElements = PackageObject->Package.Count; /* * Calculate the size of the return buffer. * The base size is the number of elements * the sizes of the * structures. Additional space for the strings is added below. * The minus one is to subtract the size of the UINT8 Source[1] * member because it is added below. * * But each PRT_ENTRY structure has a pointer to a string and * the size of that string must be found. */ TopObjectList = PackageObject->Package.Elements; for (Index = 0; Index < NumberOfElements; Index++) { /* Dereference the subpackage */ PackageElement = *TopObjectList; /* We must have a valid Package object */ if (!PackageElement || (PackageElement->Common.Type != ACPI_TYPE_PACKAGE)) { return_ACPI_STATUS (AE_AML_OPERAND_TYPE); } /* * The SubObjectList will now point to an array of the * four IRQ elements: Address, Pin, Source and SourceIndex */ SubObjectList = PackageElement->Package.Elements; /* Scan the IrqTableElements for the Source Name String */ NameFound = FALSE; for (TableIndex = 0; TableIndex < PackageElement->Package.Count && !NameFound; TableIndex++) { if (*SubObjectList && /* Null object allowed */ ((ACPI_TYPE_STRING == (*SubObjectList)->Common.Type) || ((ACPI_TYPE_LOCAL_REFERENCE == (*SubObjectList)->Common.Type) && ((*SubObjectList)->Reference.Class == ACPI_REFCLASS_NAME)))) { NameFound = TRUE; } else { /* Look at the next element */ SubObjectList++; } } TempSizeNeeded += (sizeof (ACPI_PCI_ROUTING_TABLE) - 4); /* Was a String type found? */ if (NameFound) { if ((*SubObjectList)->Common.Type == ACPI_TYPE_STRING) { /* * The length String.Length field does not include the * terminating NULL, add 1 */ TempSizeNeeded += ((ACPI_SIZE) (*SubObjectList)->String.Length + 1); } else { TempSizeNeeded += AcpiNsGetPathnameLength ( (*SubObjectList)->Reference.Node); } } else { /* * If no name was found, then this is a NULL, which is * translated as a UINT32 zero. */ TempSizeNeeded += sizeof (UINT32); } /* Round up the size since each element must be aligned */ TempSizeNeeded = ACPI_ROUND_UP_TO_64BIT (TempSizeNeeded); /* Point to the next ACPI_OPERAND_OBJECT */ TopObjectList++; } /* * Add an extra element to the end of the list, essentially a * NULL terminator */ *BufferSizeNeeded = TempSizeNeeded + sizeof (ACPI_PCI_ROUTING_TABLE); return_ACPI_STATUS (AE_OK); } ",0 " Zalewski * @license MIT */ namespace Wtk\Response\Header\Field; use Wtk\Response\Header\Field\AbstractField; use Wtk\Response\Header\Field\FieldInterface; /** * Basic implementation - simple Value Object for Header elements * * @author Wojtek Zalewski */ class Field extends AbstractField implements FieldInterface { /** * Field name * * @var string */ protected $name; /** * Field value * * @var mixed */ protected $value; /** * * @param string $name * @param mixed $value */ public function __construct($name, $value) { $this->name = $name; /** * @todo: is is object, than it has to * implement toString method * We have to check for it now. */ $this->value = $value; } /** * Returns field name * * @return string */ public function getName() { return $this->name; } /** * Returns header field value * * @return string */ public function getValue() { return $this->value; } } ",0 "
              Cargando...
              Buscando...
              Nada coincide
              ",0 "ICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_Feed * @subpackage UnitTests * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: ImportTest.php 8649 2008-03-07 19:49:02Z darby $ */ /** * Test helper */ require_once dirname(__FILE__) . '/../../TestHelper.php'; /** * @see Zend_Feed */ require_once 'Zend/Feed.php'; /** * @see Zend_Feed_Builder */ require_once 'Zend/Feed/Builder.php'; /** * @see Zend_Http_Client_Adapter_Test */ require_once 'Zend/Http/Client/Adapter/Test.php'; /** * @see Zend_Http_Client */ require_once 'Zend/Http/Client.php'; /** * @category Zend * @package Zend_Feed * @subpackage UnitTests * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Feed_ImportTest extends PHPUnit_Framework_TestCase { protected $_client; protected $_feedDir; /** * HTTP client test adapter * * @var Zend_Http_Client_Adapter_Test */ protected $_adapter; public function setUp() { $this->_adapter = new Zend_Http_Client_Adapter_Test(); Zend_Feed::setHttpClient(new Zend_Http_Client(null, array('adapter' => $this->_adapter))); $this->_client = Zend_Feed::getHttpClient(); $this->_feedDir = dirname(__FILE__) . '/_files'; } /** * Test an atom feed generated by google's Blogger platform */ public function testAtomGoogle() { $this->_importAtomValid('AtomTestGoogle.xml'); } /** * Test an atom feed generated by mozillaZine.org */ public function testAtomMozillazine() { $this->_importAtomValid('AtomTestMozillazine.xml'); } /** * Test an atom feed generated by O'Reilly */ public function testAtomOReilly() { $this->_importAtomValid('AtomTestOReilly.xml'); } /** * Test an atom feed generated by PlanetPHP */ public function testAtomPlanetPHP() { $this->_importAtomValid('AtomTestPlanetPHP.xml'); } /** * Test a small atom feed */ public function testAtomSample1() { $this->_importAtomValid('AtomTestSample1.xml'); } /** * Test a small atom feed without any entries */ public function testAtomSample2() { $this->_importAtomValid('AtomTestSample2.xml'); } /** * Test an atom feed with a tag missing */ public function testAtomSample3() { $this->_importInvalid('AtomTestSample3.xml'); } /** * Test an atom feed with links within entries */ public function testAtomSample4() { $this->_importAtomValid('AtomTestSample4.xml'); } /** * Test a RSS feed generated by UserLand Frontier v9.5 */ public function testRssHarvardLaw() { $this->_importRssValid('RssTestHarvardLaw.xml'); } /** * Test a RSS feed generated by PlanetPHP */ public function testRssPlanetPHP() { $this->_importRssValid('RssTestPlanetPHP.xml'); } /** * Test a RSS feed generated by Slashdot */ public function testRssSlashdot() { $this->_importRssValid('RssTestSlashdot.xml'); } /** * Test a RSS feed generated by CNN */ public function testRssCNN() { $this->_importRssValid('RssTestCNN.xml'); } /** * Test a valid RSS 0.91 sample */ public function testRss091Sample1() { $this->_importRssValid('RssTest091Sample1.xml'); } /** * Test a valid RSS 0.91 sample */ public function testRss092Sample1() { $this->_importRssValid('RssTest092Sample1.xml'); } /** * Test a valid RSS 1.0 sample */ public function testRss100Sample1() { $this->_importRssValid('RssTest100Sample1.xml'); } /** * Test a valid RSS 1.0 sample with some extensions in it */ public function testRss100Sample2() { $this->_importRssValid('RssTest100Sample2.xml'); } /** * Test a valid RSS 2.0 sample */ public function testRss200Sample1() { $this->_importRssValid('RssTest200Sample1.xml'); } /** * Test the import of a RSS feed from an array */ public function testRssImportFullArray() { $feed = Zend_Feed::importArray($this->_getFullArray(), 'rss'); $this->assertType('Zend_Feed_Rss', $feed); } /** * Test the import of a RSS feed from an array */ public function testAtomImportFullArray() { $feed = Zend_Feed::importArray($this->_getFullArray(), 'atom'); } /** * Test the import of a RSS feed from a builder */ public function testRssImportFullBuilder() { $feed = Zend_Feed::importBuilder(new Zend_Feed_Builder($this->_getFullArray()), 'rss'); $this->assertType('Zend_Feed_Rss', $feed); } /** * Test the import of a full iTunes RSS feed from a builder */ public function testRssImportFulliTunesBuilder() { $array = $this->_getFullArray(); $array['itunes']['author'] = 'iTunes Author'; $array['itunes']['owner'] = array('name' => 'iTunes Owner', 'email' => 'itunes@example.com'); $array['itunes']['image'] = 'http://www.example/itunes.png'; $array['itunes']['subtitle'] = 'iTunes subtitle'; $array['itunes']['summary'] = 'iTunes summary'; $array['itunes']['explicit'] = 'clean'; $array['itunes']['block'] = 'no'; $array['itunes']['new-feed-url'] = 'http://www.example/itunes.xml'; $feed = Zend_Feed::importBuilder(new Zend_Feed_Builder($array), 'rss'); $this->assertType('Zend_Feed_Rss', $feed); } /** * Test the import of an Atom feed from a builder */ public function testAtomImportFullBuilder() { $feed = Zend_Feed::importBuilder(new Zend_Feed_Builder($this->_getFullArray()), 'atom'); } /** * Test the import of an Atom feed from a builder */ public function testAtomImportFullBuilderValid() { $feed = Zend_Feed::importBuilder(new Zend_Feed_Builder($this->_getFullArray()), 'atom'); $feed = Zend_Feed::importString($feed->saveXml()); $this->assertType('Zend_Feed_Atom', $feed); } /** * Check the validity of the builder import (rss) */ public function testRssImportFullBuilderValid() { $feed = Zend_Feed::importBuilder(new Zend_Feed_Builder($this->_getFullArray()), 'rss'); $this->assertType('Zend_Feed_Rss', $feed); $feed = Zend_Feed::importString($feed->saveXml()); $this->assertType('Zend_Feed_Rss', $feed); } /** * Test the return of a link() call (atom) */ public function testAtomGetLink() { $feed = Zend_Feed::importBuilder(new Zend_Feed_Builder($this->_getFullArray()), 'atom'); $this->assertType('Zend_Feed_Atom', $feed); $feed = Zend_Feed::importString($feed->saveXml()); $this->assertType('Zend_Feed_Atom', $feed); $href = $feed->link('self'); $this->assertEquals('http://www.example.com', $href); } /** * Imports an invalid feed and ensure everything works as expected * even if XDebug is running (ZF-2590). */ public function testImportInvalidIsXdebugAware() { if (!function_exists('xdebug_is_enabled')) { $this->markTestIncomplete('XDebug not installed'); } $response = new Zend_Http_Response(200, array(), ''); $this->_adapter->setResponse($response); try { $feed = Zend_Feed::import('http://localhost'); $this->fail('Expected Zend_Feed_Exception not thrown'); } catch (Zend_Feed_Exception $e) { $this->assertType('Zend_Feed_Exception', $e); $this->assertRegExp('/(XDebug is running|Empty string)/', $e->getMessage()); } } /** * Returns the array used by Zend_Feed::importArray * and Zend_Feed::importBuilder tests * * @return array */ protected function _getFullArray() { $array = array('title' => 'Title of the feed', 'link' => 'http://www.example.com', 'description' => 'Description of the feed', 'author' => 'Olivier Sirven', 'email' => 'olivier@elma.fr', 'webmaster' => 'olivier@elma.fr', 'charset' => 'iso-8859-15', 'lastUpdate' => time(), 'published' => strtotime('2007-02-27'), 'copyright' => 'Common Creative', 'image' => 'http://www.example/images/icon.png', 'language' => 'en', 'ttl' => 60, 'rating' => ' (PICS-1.1 ""http://www.gcf.org/v2.5"" labels on ""1994.11.05T08:15-0500"" exp ""1995.12.31T23:59-0000"" for ""http://www.greatdocs.com/foo.html"" by ""George Sanderson, Jr."" ratings (suds 0.5 density 0 color/hue 1))', 'cloud' => array('domain' => 'rpc.sys.com', 'path' => '/rpc', 'registerProcedure' => 'webServices.pingMe', 'protocol' => 'xml-rpc'), 'textInput' => array('title' => 'subscribe', 'description' => 'enter your email address to subscribe by mail', 'name' => 'email', 'link' => 'http://www.example.com/subscribe'), 'skipHours' => array(1, 13, 17), 'skipDays' => array('Saturday', 'Sunday'), 'itunes' => array('block' => 'no', 'keywords' => 'example,itunes,podcast', 'category' => array(array('main' => 'Technology', 'sub' => 'Gadgets'), array('main' => 'Music'))), 'entries' => array(array('guid' => time(), 'title' => 'First article', 'link' => 'http://www.example.com', 'description' => 'First article description', 'content' => 'First article content', 'lastUpdate' => time(), 'comments' => 'http://www.example.com/#comments', 'commentRss' => 'http://www.example.com/comments.xml', 'source' => array('title' => 'Original title', 'url' => 'http://www.domain.com'), 'category' => array(array('term' => 'test category', 'scheme' => 'http://www.example.com/scheme'), array('term' => 'another category') ), 'enclosure' => array(array('url' => 'http://www.example.com/podcast.mp3', 'type' => 'audio/mpeg', 'length' => '12216320' ), array('url' => 'http://www.example.com/podcast2.mp3', 'type' => 'audio/mpeg', 'length' => '1221632' ) ) ), array('title' => 'Second article', 'link' => 'http://www.example.com/two', 'description' => 'Second article description', 'content' => 'Second article content', 'lastUpdate' => time(), 'comments' => 'http://www.example.com/two/#comments', 'category' => array(array('term' => 'test category')), ) ) ); return $array; } /** * Import an invalid atom feed */ protected function _importAtomValid($filename) { $response = new Zend_Http_Response(200, array(), file_get_contents(""$this->_feedDir/$filename"")); $this->_adapter->setResponse($response); $feed = Zend_Feed::import('http://localhost'); $this->assertType('Zend_Feed_Atom', $feed); } /** * Import a valid rss feed */ protected function _importRssValid($filename) { $response = new Zend_Http_Response(200, array(), file_get_contents(""$this->_feedDir/$filename"")); $this->_adapter->setResponse($response); $feed = Zend_Feed::import('http://localhost'); $this->assertType('Zend_Feed_Rss', $feed); } /** * Imports an invalid feed */ protected function _importInvalid($filename) { $response = new Zend_Http_Response(200, array(), file_get_contents(""$this->_feedDir/$filename"")); $this->_adapter->setResponse($response); try { $feed = Zend_Feed::import('http://localhost'); $this->fail('Expected Zend_Feed_Exception not thrown'); } catch (Zend_Feed_Exception $e) { $this->assertType('Zend_Feed_Exception', $e); } } } ",0 "s not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ namespace ParkManager\Application\Command\User; use Rollerworks\Component\SplitToken\SplitToken; final class ConfirmPasswordReset { /** * @param string $password The password in hashed format */ public function __construct(public SplitToken $token, public string $password) { } } ",0 "of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.iluwatar.factorykit; public class Bow implements Weapon { @Override public String toString() { return ""Bow""; } } ",0 " the LICENSE file. #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ #define CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ #include #include #include ""base/file_path.h"" #include ""base/memory/weak_ptr.h"" #include ""base/sequenced_task_runner_helpers.h"" #include ""chrome/browser/profiles/profile.h"" #include ""chrome/common/content_settings.h"" #include ""content/public/browser/browser_message_filter.h"" #include ""third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"" class CookieSettings; struct ExtensionHostMsg_Request_Params; class ExtensionInfoMap; class GURL; namespace net { class URLRequestContextGetter; } // This class filters out incoming Chrome-specific IPC messages for the renderer // process on the IPC thread. class ChromeRenderMessageFilter : public content::BrowserMessageFilter { public: ChromeRenderMessageFilter(int render_process_id, Profile* profile, net::URLRequestContextGetter* request_context); // Notification detail classes. class FPSDetails { public: FPSDetails(int routing_id, float fps) : routing_id_(routing_id), fps_(fps) {} int routing_id() const { return routing_id_; } float fps() const { return fps_; } private: int routing_id_; float fps_; }; class V8HeapStatsDetails { public: V8HeapStatsDetails(size_t v8_memory_allocated, size_t v8_memory_used) : v8_memory_allocated_(v8_memory_allocated), v8_memory_used_(v8_memory_used) {} size_t v8_memory_allocated() const { return v8_memory_allocated_; } size_t v8_memory_used() const { return v8_memory_used_; } private: size_t v8_memory_allocated_; size_t v8_memory_used_; }; // content::BrowserMessageFilter methods: virtual bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok) OVERRIDE; virtual void OverrideThreadForMessage( const IPC::Message& message, content::BrowserThread::ID* thread) OVERRIDE; private: friend class content::BrowserThread; friend class base::DeleteHelper; virtual ~ChromeRenderMessageFilter(); #if !defined(DISABLE_NACL) void OnLaunchNaCl(const GURL& manifest_url, int socket_count, IPC::Message* reply_msg); void OnGetReadonlyPnaclFd(const std::string& filename, IPC::Message* reply_msg); void OnNaClCreateTemporaryFile(IPC::Message* reply_msg); #endif void OnDnsPrefetch(const std::vector& hostnames); void OnResourceTypeStats(const WebKit::WebCache::ResourceTypeStats& stats); void OnUpdatedCacheStats(const WebKit::WebCache::UsageStats& stats); void OnFPS(int routing_id, float fps); void OnV8HeapStats(int v8_memory_allocated, int v8_memory_used); void OnOpenChannelToExtension(int routing_id, const std::string& source_extension_id, const std::string& target_extension_id, const std::string& channel_name, int* port_id); void OpenChannelToExtensionOnUIThread(int source_process_id, int source_routing_id, int receiver_port_id, const std::string& source_extension_id, const std::string& target_extension_id, const std::string& channel_name); void OnOpenChannelToTab(int routing_id, int tab_id, const std::string& extension_id, const std::string& channel_name, int* port_id); void OpenChannelToTabOnUIThread(int source_process_id, int source_routing_id, int receiver_port_id, int tab_id, const std::string& extension_id, const std::string& channel_name); void OnGetExtensionMessageBundle(const std::string& extension_id, IPC::Message* reply_msg); void OnGetExtensionMessageBundleOnFileThread( const FilePath& extension_path, const std::string& extension_id, const std::string& default_locale, IPC::Message* reply_msg); void OnExtensionAddListener(const std::string& extension_id, const std::string& event_name); void OnExtensionRemoveListener(const std::string& extension_id, const std::string& event_name); void OnExtensionAddLazyListener(const std::string& extension_id, const std::string& event_name); void OnExtensionRemoveLazyListener(const std::string& extension_id, const std::string& event_name); void OnExtensionAddFilteredListener(const std::string& extension_id, const std::string& event_name, const base::DictionaryValue& filter, bool lazy); void OnExtensionRemoveFilteredListener(const std::string& extension_id, const std::string& event_name, const base::DictionaryValue& filter, bool lazy); void OnExtensionCloseChannel(int port_id, bool connection_error); void OnExtensionRequestForIOThread( int routing_id, const ExtensionHostMsg_Request_Params& params); void OnExtensionShouldUnloadAck(const std::string& extension_id, int sequence_id); void OnExtensionUnloadAck(const std::string& extension_id); void OnExtensionGenerateUniqueID(int* unique_id); void OnExtensionResumeRequests(int route_id); void OnAllowDatabase(int render_view_id, const GURL& origin_url, const GURL& top_origin_url, const string16& name, const string16& display_name, bool* allowed); void OnAllowDOMStorage(int render_view_id, const GURL& origin_url, const GURL& top_origin_url, bool local, bool* allowed); void OnAllowFileSystem(int render_view_id, const GURL& origin_url, const GURL& top_origin_url, bool* allowed); void OnAllowIndexedDB(int render_view_id, const GURL& origin_url, const GURL& top_origin_url, const string16& name, bool* allowed); void OnCanTriggerClipboardRead(const GURL& origin, bool* allowed); void OnCanTriggerClipboardWrite(const GURL& origin, bool* allowed); void OnGetCookies(const GURL& url, const GURL& first_party_for_cookies, IPC::Message* reply_msg); void OnSetCookie(const IPC::Message& message, const GURL& url, const GURL& first_party_for_cookies, const std::string& cookie); int render_process_id_; // The Profile associated with our renderer process. This should only be // accessed on the UI thread! Profile* profile_; // Copied from the profile so that it can be read on the IO thread. bool off_the_record_; scoped_refptr request_context_; scoped_refptr extension_info_map_; // Used to look up permissions at database creation time. scoped_refptr cookie_settings_; base::WeakPtrFactory weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(ChromeRenderMessageFilter); }; #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RENDER_MESSAGE_FILTER_H_ ",0 " * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #define STATE_MAX_MW 20000 #define STATE_STEP_MW 500 #define NSTATES (STATE_MAX_MW / STATE_STEP_MW + 1) static unsigned int capping_states[NSTATES]; inline unsigned int count_state(int mw) { int state; state = mw > 0 ? mw / STATE_STEP_MW + 1 : 0; return min(state, NSTATES - 1); } static void oc_throttle_alarm(struct sysedp_reactive_capping_platform_data *h) { mutex_lock(&h->mutex); h->cur_capping_mw += h->step_alarm_mw; h->cur_capping_mw = min(h->cur_capping_mw, h->max_capping_mw); cancel_delayed_work(&h->work); sysedp_set_state(&h->sysedpc, count_state(h->cur_capping_mw)); schedule_delayed_work(&h->work, msecs_to_jiffies(h->relax_ms)); mutex_unlock(&h->mutex); } static void oc_throttle_work(struct work_struct *work) { struct sysedp_reactive_capping_platform_data *h; h = container_of(to_delayed_work(work), struct sysedp_reactive_capping_platform_data, work); mutex_lock(&h->mutex); h->cur_capping_mw -= h->step_relax_mw; h->cur_capping_mw = max(h->cur_capping_mw, 0); sysedp_set_state(&h->sysedpc, count_state(h->cur_capping_mw)); if (h->cur_capping_mw) schedule_delayed_work(&h->work, msecs_to_jiffies(h->relax_ms)); mutex_unlock(&h->mutex); } static irqreturn_t sysedp_reactive_capping_irq_handler(int irq, void *data) { if (!data) return IRQ_NONE; oc_throttle_alarm(data); if (((struct sysedp_reactive_capping_platform_data *)data) ->threshold_warning) { printk_ratelimited(""%s\n"", ((struct sysedp_reactive_capping_platform_data *)data) ->threshold_warning); } return IRQ_HANDLED; } static void of_sysedp_reactive_capping_get_pdata(struct platform_device *pdev, struct sysedp_reactive_capping_platform_data **pdata) { struct device_node *np = pdev->dev.of_node; struct device_node *np_sysedpc; struct sysedp_reactive_capping_platform_data *obj_ptr; int i; u32 lenp, val, irq_flags; const char *c_ptr; const void *ptr; int ret; int max_capping_mw, step_alarm_mw, step_relax_mw, relax_ms; struct { char *name; int *var_ptr; } srcintlist[] = { {""nvidia,max_capping_mw"", &max_capping_mw}, {""nvidia,step_alarm_mw"", &step_alarm_mw}, {""nvidia,step_relax_mw"", &step_relax_mw}, {""nvidia,relax_ms"", &relax_ms}, }; *pdata = NULL; obj_ptr = devm_kzalloc(&pdev->dev, sizeof(struct sysedp_reactive_capping_platform_data), GFP_KERNEL); if (!obj_ptr) return; np_sysedpc = of_get_child_by_name(np, ""sysedpc""); if (!np_sysedpc) return; ptr = of_get_property(np_sysedpc, ""nvidia,name"", &lenp); if (!ptr) return; ret = of_property_read_string(np_sysedpc, ""nvidia,name"", &c_ptr); if (ret) { dev_err(&pdev->dev, ""The name of this DT entry is not set!\n""); return; } strncpy(obj_ptr->sysedpc.name, c_ptr, SYSEDP_NAME_LEN); obj_ptr->sysedpc.name[SYSEDP_NAME_LEN-1] = 0; for (i = 0; i < ARRAY_SIZE(srcintlist); i++) { ret = of_property_read_u32(np, srcintlist[i].name, &val); if (ret) { dev_err(&pdev->dev, ""The device node, %s, failed to read \""%s\""!\n"", obj_ptr->sysedpc.name, srcintlist[i].name); return; } *srcintlist[i].var_ptr = (int)val; } obj_ptr->max_capping_mw = max_capping_mw; obj_ptr->step_alarm_mw = step_alarm_mw; obj_ptr->step_relax_mw = step_relax_mw; obj_ptr->relax_ms = relax_ms; ret = of_property_read_string(np, ""nvidia,threshold_warning"", &(obj_ptr->threshold_warning)); if (ret) { dev_info(&pdev->dev, ""No Threshold Warning string found.\n""); obj_ptr->threshold_warning = NULL; } /* Only interrupt at index 0 is expected per reactive capping node. */ obj_ptr->irq = irq_of_parse_and_map(np, 0); if (obj_ptr->irq == 0) { dev_err(&pdev->dev, ""The device node, %s, failed to map interrupts!\n"", obj_ptr->sysedpc.name); return; } /* Parse index 1, irq flags, directly from the interrupts array */ ret = of_property_read_u32_index(np, ""interrupts"", 1, &irq_flags); if (ret) { dev_err(&pdev->dev, ""The device node, %s, failed to get the irq flags!\n"", obj_ptr->sysedpc.name); return; } obj_ptr->irq_flags = (int)irq_flags; *pdata = obj_ptr; return; } static int sysedp_reactive_capping_probe(struct platform_device *pdev) { int ret, i; struct sysedp_reactive_capping_platform_data *pdata = NULL; if (pdev->dev.of_node) of_sysedp_reactive_capping_get_pdata(pdev, &pdata); else pdata = pdev->dev.platform_data; if (!pdata) return -EINVAL; /* update static capping_states table */ for (i = 0; i < NSTATES; i++) capping_states[i] = i * STATE_STEP_MW; /* sysedpc consumer name must be initialized */ if (pdata->sysedpc.name[0] == '\0') return -EINVAL; pdata->sysedpc.states = capping_states; pdata->sysedpc.num_states = ARRAY_SIZE(capping_states); ret = sysedp_register_consumer(&pdata->sysedpc); if (ret) { pr_err(""sysedp_reactive_capping_probe: consumer register failed (%d)\n"", ret); return ret; } mutex_init(&pdata->mutex); INIT_DELAYED_WORK(&pdata->work, oc_throttle_work); ret = request_threaded_irq(pdata->irq, NULL, sysedp_reactive_capping_irq_handler, pdata->irq_flags, pdata->sysedpc.name, pdata); if (ret) { pr_err(""sysedp_reactive_capping_probe: request_threaded_irq failed (%d)\n"", ret); sysedp_unregister_consumer(&pdata->sysedpc); return ret; } return 0; } static const struct of_device_id sysedp_reactive_capping_of_match[] = { { .compatible = ""nvidia,tegra124-sysedp_reactive_capping"", }, { }, }; MODULE_DEVICE_TABLE(of, sysedp_reactive_capping_of_match); static struct platform_driver sysedp_reactive_capping_driver = { .probe = sysedp_reactive_capping_probe, .driver = { .name = ""sysedp_reactive_capping"", .owner = THIS_MODULE, .of_match_table = sysedp_reactive_capping_of_match, } }; static __init int sysedp_reactive_capping_init(void) { return platform_driver_register(&sysedp_reactive_capping_driver); } late_initcall(sysedp_reactive_capping_init); ",0 "; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.multipart.MultipartResolver; public class MultipartHandler { private static Logger logger = LoggerFactory .getLogger(MultipartHandler.class); private MultipartResolver multipartResolver; private MultipartHttpServletRequest multipartHttpServletRequest = null; private MultiValueMap multiValueMap = new LinkedMultiValueMap(); private MultiValueMap multiFileMap; public MultipartHandler(MultipartResolver multipartResolver) { this.multipartResolver = multipartResolver; } public void handle(HttpServletRequest request) { if (request instanceof MultipartHttpServletRequest) { logger.debug(""force cast to MultipartHttpServletRequest""); MultipartHttpServletRequest req = (MultipartHttpServletRequest) request; this.multiFileMap = req.getMultiFileMap(); logger.debug(""multiFileMap : {}"", multiFileMap); this.handleMultiValueMap(req); logger.debug(""multiValueMap : {}"", multiValueMap); return; } if (multipartResolver.isMultipart(request)) { logger.debug(""is multipart : {}"", multipartResolver.isMultipart(request)); this.multipartHttpServletRequest = multipartResolver .resolveMultipart(request); logger.debug(""multipartHttpServletRequest : {}"", multipartHttpServletRequest); this.multiFileMap = multipartHttpServletRequest.getMultiFileMap(); logger.debug(""multiFileMap : {}"", multiFileMap); this.handleMultiValueMap(multipartHttpServletRequest); logger.debug(""multiValueMap : {}"", multiValueMap); } else { this.handleMultiValueMap(request); logger.debug(""multiValueMap : {}"", multiValueMap); } } public void clear() { if (multipartHttpServletRequest == null) { return; } multipartResolver.cleanupMultipart(multipartHttpServletRequest); } public void handleMultiValueMap(HttpServletRequest request) { Map parameterMap = request.getParameterMap(); for (Map.Entry entry : parameterMap.entrySet()) { String key = entry.getKey(); for (String value : entry.getValue()) { multiValueMap.add(key, value); } } } public MultiValueMap getMultiValueMap() { return multiValueMap; } public MultiValueMap getMultiFileMap() { return multiFileMap; } } ",0 "n 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. */ package com.jetbrains.python.inspections.quickfix; import com.intellij.codeInsight.intention.LowPriorityAction; import com.intellij.codeInspection.LocalQuickFix; import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.codeInspection.ex.InspectionProfileModifiableModelKt; import com.intellij.openapi.project.Project; import com.intellij.psi.PsiElement; import com.intellij.psi.util.QualifiedName; import com.jetbrains.python.inspections.unresolvedReference.PyUnresolvedReferencesInspection; import org.jetbrains.annotations.NotNull; /** * @author yole */ public class AddIgnoredIdentifierQuickFix implements LocalQuickFix, LowPriorityAction { public static final String END_WILDCARD = "".*""; @NotNull private final QualifiedName myIdentifier; private final boolean myIgnoreAllAttributes; public AddIgnoredIdentifierQuickFix(@NotNull QualifiedName identifier, boolean ignoreAllAttributes) { myIdentifier = identifier; myIgnoreAllAttributes = ignoreAllAttributes; } @NotNull @Override public String getName() { if (myIgnoreAllAttributes) { return ""Mark all unresolved attributes of '"" + myIdentifier + ""' as ignored""; } else { return ""Ignore unresolved reference '"" + myIdentifier + ""'""; } } @NotNull @Override public String getFamilyName() { return ""Ignore unresolved reference""; } @Override public boolean startInWriteAction() { return false; } @Override public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement context = descriptor.getPsiElement(); InspectionProfileModifiableModelKt.modifyAndCommitProjectProfile(project, model -> { PyUnresolvedReferencesInspection inspection = (PyUnresolvedReferencesInspection)model.getUnwrappedTool(PyUnresolvedReferencesInspection.class.getSimpleName(), context); String name = myIdentifier.toString(); if (myIgnoreAllAttributes) { name += END_WILDCARD; } assert inspection != null; if (!inspection.ignoredIdentifiers.contains(name)) { inspection.ignoredIdentifiers.add(name); } }); } } ",0 "of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** * Strings for component 'plagiarism_turnitin', language 'hu', branch 'MOODLE_22_STABLE' * * @package plagiarism_turnitin * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $string['adminlogin'] = 'Bejelentkezés a Turnitin alá rendszergazdaként'; $string['compareinstitution'] = 'Leadott fájlok és beadott dolgozatok összehasonlítása intézményen belül'; $string['compareinstitution_help'] = 'Csak akkor érhető el, ha egyedi csomópontot állított be/vásárolt. Ha bizonytalan, állítsa ""Nem""-re.'; $string['compareinternet'] = 'Leadott fájlok összehasonlítása az internettel'; $string['compareinternet_help'] = 'Ezzel összehasonlíthatja a leadott munkákat azon internetes tartalmakkal, amelyeket a Turnitin jelenleg nyomon követ.'; $string['comparejournals'] = 'Leadott fájlok összehasonlítása folyóraitokkal, közleményekkel.'; $string['comparejournals_help'] = 'Ezzel összehasonlíthatja a leadott munkákat azon folyóraitokkal, közleményekkel, amelyeket a Turnitin jelenleg nyomon követ.'; $string['comparestudents'] = 'Leadott fájlok összehasonlítása más tanulók állományaival'; $string['comparestudents_help'] = 'Ezzel összehasonlíthatja a leadott munkákat más tanulók állományaival'; $string['configdefault'] = 'Ez az alapbeállítás a feladatok létrehozására való oldalon. Csakis plagiarism/turnitin:enableturnitin jogosultsággal rendelkező felhasználók módosíthatják a beállítást egyéni feladatra.'; $string['configusetiimodule'] = 'Turnitin-leadás bekapcsolása'; $string['defaultsdesc'] = 'Ha egy tevékenységmodulban bekapcsolja a Turnitint, az alábbiak lesznek az alapbeállítások.'; $string['defaultupdated'] = 'A Turnitin alapbeállításai frissítve.'; $string['draftsubmit'] = 'Mikor kell a fájlt a Turnitinba leadni?'; $string['excludebiblio'] = 'A szakirodalom kihagyása'; $string['excludebiblio_help'] = 'A szakirodalom az eredetiségi jelentés megtekintésekor ki-be kapcsolható. Ez a beállítás az első fájl leadása után nem módosítható.'; $string['excludematches'] = 'Csekély egyezések kihagyása'; $string['excludematches_help'] = 'A csekély mértékű egyezéseket százalék vagy szószám alapján kihagyhatja - az alábbi négyzetben válassza ki, melyiket kívánja használni.'; $string['excludequoted'] = 'Idézet kihagyása'; $string['excludequoted_help'] = 'Az idézetek az eredetiségi jelentés megtekintésekor ki-be kapcsolhatók. Ez a beállítás az első fájl leadása után nem módosítható.'; $string['file'] = 'Állomány'; $string['filedeleted'] = 'Az állomány a sorból törölve'; $string['fileresubmitted'] = 'Az állomány újbóli leadásra besorolva'; $string['module'] = 'Modul'; $string['name'] = 'Név'; $string['percentage'] = 'Százalék'; $string['pluginname'] = 'Turnitin plágium-ellenőrző segédprogram'; $string['reportgen'] = 'Mikor készüljenek eredetiségi jelentések?'; $string['reportgen_help'] = 'Ezzel adhatja meg, hogy mikor készüljenek el az eredetiségi jelentések'; $string['reportgenduedate'] = 'Határidőre'; $string['reportgenimmediate'] = 'Haladéktalanul (az első jelentés a végső)'; $string['reportgenimmediateoverwrite'] = 'Haladéktalanul (a jelentések felülírhatók)'; $string['resubmit'] = 'Újbóli leadás'; $string['savedconfigfailure'] = 'Nem sikerül csatlakoztatni/hitelesíteni a Turnitint - lehet, hogy rossz titkos kulcs/felhasználó azonosító párt használ, vagy a szerver nem tud az alkalmazással összekapcsolódni.'; $string['savedconfigsuccess'] = 'A Turnitin-beállítások elmentve, a tanári fiók létrejött'; $string['showstudentsreport'] = 'A hasonlósági jelentés megmutatása a tanulónak'; $string['showstudentsreport_help'] = 'A hasonlósági jelentés lebontva jeleníti meg a leadott munka azon részeit, amelyeket átvettek, valamint azt a helyet, ahol a Turnitin először észlelte ezt a tartalmat.'; $string['showstudentsscore'] = 'Hasonlósági arány megmutatása a tanulónak'; $string['showstudentsscore_help'] = 'A hasonlósági arány a leadott munkának az a százaléka, amely más tartalmakkal egyezik - a magas arány rendszerint rosszat jelent.'; $string['showwhenclosed'] = 'A tevékenység lezárásakor'; $string['similarity'] = 'Hasonlóság'; $string['status'] = 'Állapot'; $string['studentdisclosure'] = 'Tanulói nyilvánosságra hozatal'; $string['studentdisclosure_help'] = 'A szöveget az állományfeltöltő oldalon minden tanuló látja'; $string['studentdisclosuredefault'] = 'Minden feltöltött állományt megvizsgál a Turnitin.com plágium-ellenőrzője'; $string['submitondraft'] = 'Állomány leadása az első feltöltés alkalmával'; $string['submitonfinal'] = 'Állomány leadása, amikor a tanuló osztályozásra küldi be'; $string['teacherlogin'] = 'Bejelentkezés a Turnitin alá tanárként'; $string['tii'] = 'Turnitin'; $string['tiiaccountid'] = 'Turnitin felhasználói azonosító'; $string['tiiaccountid_help'] = 'Ez a felhasználói azonosítója, melyet a Turnitin.com-tól kapott'; $string['tiiapi'] = 'Turnitin alkalmazás'; $string['tiiapi_help'] = 'Ez a Turnitin alkalmazás címe - többnyire https://api.turnitin.com/api.asp'; $string['tiiconfigerror'] = 'Portál-beállítási hiba történt az állomány Turnitinhez küldése közben.'; $string['tiiemailprefix'] = 'Tanulói e-mail előtagja'; $string['tiiemailprefix_help'] = 'Állítsa be ezt, ha nem akarja, hogy a tanulók bejelentkezzenek a turnitin.com portálra és teljes jelentéseket tekintsenek meg.'; $string['tiienablegrademark'] = 'A Grademark (kísérleti) bekapcsolása'; $string['tiienablegrademark_help'] = 'A Grademark a Turnitin egyik választható funkciója. Használatához fel kell vennie a Turnitin-szolgáltatások közé. Bekapcsolása esetén a leadott oldalak lassan jelennek meg.'; $string['tiierror'] = 'TII-hiba'; $string['tiierror1007'] = 'A Turnitin nem tudta feldolgozni a fájlt, mert túl nagy.'; $string['tiierror1008'] = 'Hiba történt a fájl Turnitinhez küldése közben.-'; $string['tiierror1009'] = 'A Turnitin nem tudta feldolgozni a fájlt, mert nem támogatja a típusát. Érvényes állományformák: MS Word, Acrobat PDF, Postscript, egyszerű szöveg, HTML, WordPerfect és Rich Text.'; $string['tiierror1010'] = 'A Turnitin nem tudta feldolgozni a fájlt, mert 100-nál kevesebb nem nyomtatható karaktert tartalmaz.'; $string['tiierror1011'] = 'A Turnitin nem tudta feldolgozni a fájlt, mert hibás a formája és szóközök vannak a betűk között.'; $string['tiierror1012'] = 'A Turnitin nem tudta feldolgozni a fájlt, mert hossza meghaladja a megengedettet.'; $string['tiierror1013'] = 'A Turnitin nem tudta feldolgozni a fájlt, mert 20-nál kevesebb szót tartalmaz.'; $string['tiierror1020'] = 'A Turnitin nem tudta feldolgozni a fájlt, mert nem támogatott karaktereket tartalmaz.'; $string['tiierror1023'] = 'A Turnitin nem tudta feldolgozni a pdf-fájlt, mert jelszóval védett és képeket tartalmaz.'; $string['tiierror1024'] = 'A Turnitin nem tudta feldolgozni a fájlt, mert nem felel meg az érvényes dolgozat feltételeinek.'; $string['tiierrorpaperfail'] = 'A Turnitin nem tudta feldolgozni a fájlt.'; $string['tiierrorpending'] = 'A fájl vár a Turnitinhez való leadásra.'; $string['tiiexplain'] = 'A Turnitin kereskedelmi termék, a szolgáltatásra elő kell fizetni. További információk: http://docs.moodle.org/en/Turnitin_administration'; $string['tiiexplainerrors'] = 'AZ oldalon szerepelnek azok a Turnitinhez leadott fájlok, amelyek hibásként vannak megjelölve. A hibakódokat és leírásukat lásd: :docs.moodle.org/en/Turnitin_errors
              Az állományok visszaállítása után a cron megpróbálja ismét leadni őket a Turnitinhez.
              Törlésük esetén viszont nem lehet őket ismételten leadni, ezért eltűnnek a tanárok és a tanulók elől a hibák is.'; $string['tiisecretkey'] = 'Titkos Turnitin-kulcs'; $string['tiisecretkey_help'] = 'Ennek beszerzéséhez jelentkezzen be a Turnitin.com alá portálja rendszergazdájaként.'; $string['tiisenduseremail'] = 'Felhasználói e-mail elküldése'; $string['tiisenduseremail_help'] = 'E-mail küldése a TII-rendszerben létrehozott összes felhasználónak olyan ugrópointtal, amelyről ideiglenes jelszóval be tudnak jelentkezni a www.turnitin.com portálra.'; $string['turnitin'] = 'Turnitin'; $string['turnitin:enable'] = 'Tanár számára a Turnitin ki-be kapcsolásának engedélyezése adott modulon belül.'; $string['turnitin:viewfullreport'] = 'Tanár számára a Turnitintól kapott teljes jelentés megtekintésének engedélyezése'; $string['turnitin:viewsimilarityscore'] = 'Tanár számára a Turnitintól kapott hasonlósági pont megtekintésének engedélyezése'; $string['turnitin_attemptcodes'] = 'Hibakódok automatikus újbóli leadáshoz'; $string['turnitin_attemptcodes_help'] = 'Olyan hibakódok, amilyeneket a Turnitin 2. próbálkozásra általában elfogad (a mező módosítása a szervert tovább terhelheti)'; $string['turnitin_attempts'] = 'Újrapróbálkozások száma'; $string['turnitin_attempts_help'] = 'A megadott kódok Turnitinnek való újbóli leadásának a száma. 1 újrapróbálkozás azt jelenti, hogy a megadott hibakódok leadására kétszer kerül sor.'; $string['turnitin_institutionnode'] = 'Intézményi csomópont bekapcsolása'; $string['turnitin_institutionnode_help'] = 'Ha a fiókjához intézményi csomópontot állított be, ennek bekapcsolásával választhatja ki a csomópontot feladatok létrehozása során. MEGJEGYZÉS: ha nincs intézményi csomópontja, ennek bekapcsolása esetén a dolgozat leadása nem fog sikerülni.'; $string['turnitindefaults'] = 'A Turnitin alapbeállításai'; $string['turnitinerrors'] = 'Turnitin-hibák'; $string['useturnitin'] = 'A Turnitin bekapcsolása'; $string['wordcount'] = 'Szószám'; ",0 "tListValue & operator = (TextListValue&); TextListValue & operator = (const QCString&); bool operator ==(TextListValue&); bool operator !=(TextListValue& x) {return !(*this==x);} bool operator ==(const QCString& s) {TextListValue a(s);return(*this==a);} bool operator != (const QCString& s) {return !(*this == s);} virtual ~TextListValue(); void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} void _parse(); void _assemble(); const char * className() const { return ""TextListValue""; } // End of automatically generated code // ",0 "une @ GuardSquare * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package proguard.gui.splash; import java.awt.*; /** * This interface describes objects that can paint themselves, possibly varying * as a function of time. * * @author Eric Lafortune */ public interface Sprite { /** * Paints the object. * * @param graphics the Graphics to paint on. * @param time the time since the start of the animation, expressed in * milliseconds. */ public void paint(Graphics graphics, long time); } ",0 "4 Chinotec Technologies Company * * This program is free software; you can redistribute it and/or * modify it under the terms of the Clarified Artistic License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * Clarified Artistic License for more details. * * You should have received a copy of the Clarified Artistic License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // ZAP: 2011/08/04 Changed for cleanup // ZAP: 2011/11/20 Set order // ZAP: 2012/03/15 Changed to reset the message of the ManualRequestEditorDialog // when a new session is created. Added the key configuration to the // ManualRequestEditorDialog. // ZAP: 2012/03/17 Issue 282 Added getAuthor() // ZAP: 2012/04/25 Added @Override annotation to all appropriate methods. // ZAP: 2012/07/02 ManualRequestEditorDialog changed to receive Message instead // of HttpMessage. Changed logger to static. // ZAP: 2012/07/29 Issue 43: added sessionScopeChanged event // ZAP: 2012/08/01 Issue 332: added support for Modes // ZAP: 2012/11/21 Heavily refactored extension to support non-HTTP messages. // ZAP: 2013/01/25 Added method removeManualSendEditor(). // ZAP: 2013/02/06 Issue 499: NullPointerException while uninstalling an add-on // with a manual request editor // ZAP: 2014/03/23 Issue 1094: Change ExtensionManualRequestEditor to only add view components if in GUI mode // ZAP: 2014/08/14 Issue 1292: NullPointerException while attempting to remove an unregistered ManualRequestEditorDialog // ZAP: 2014/12/12 Issue 1449: Added help button // ZAP: 2015/03/16 Issue 1525: Further database independence changes package org.parosproxy.paros.extension.manualrequest; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import org.parosproxy.paros.Constant; import org.parosproxy.paros.control.Control; import org.parosproxy.paros.control.Control.Mode; import org.parosproxy.paros.extension.ExtensionAdaptor; import org.parosproxy.paros.extension.ExtensionHook; import org.parosproxy.paros.extension.ExtensionLoader; import org.parosproxy.paros.extension.SessionChangedListener; import org.parosproxy.paros.extension.ViewDelegate; import org.parosproxy.paros.extension.manualrequest.http.impl.ManualHttpRequestEditorDialog; import org.parosproxy.paros.model.Session; import org.zaproxy.zap.extension.httppanel.Message; public class ExtensionManualRequestEditor extends ExtensionAdaptor implements SessionChangedListener { private Map, ManualRequestEditorDialog> dialogues = new HashMap<>(); /** * Name of this extension. */ public static final String NAME = ""ExtensionManualRequest""; public ExtensionManualRequestEditor() { super(); initialize(); } public ExtensionManualRequestEditor(String name) { super(name); } private void initialize() { this.setName(NAME); this.setOrder(36); } @Override public void initView(ViewDelegate view) { super.initView(view); // add default manual request editor ManualRequestEditorDialog httpSendEditorDialog = new ManualHttpRequestEditorDialog(true, ""manual"", ""ui.dialogs.manreq""); httpSendEditorDialog.setTitle(Constant.messages.getString(""manReq.dialog.title"")); addManualSendEditor(httpSendEditorDialog); } /** * Should be called before extension is initialized via its * {@link #hook(ExtensionHook)} method. * * @param dialogue */ public void addManualSendEditor(ManualRequestEditorDialog dialogue) { dialogues.put(dialogue.getMessageType(), dialogue); } public void removeManualSendEditor(Class messageType) { // remove from list ManualRequestEditorDialog dialogue = dialogues.remove(messageType); if (dialogue != null) { // remove from GUI dialogue.clear(); dialogue.dispose(); if (getView() != null) { // unload menu items ExtensionLoader extLoader = Control.getSingleton().getExtensionLoader(); extLoader.removeToolsMenuItem(dialogue.getMenuItem()); } } } /** * Get special manual send editor to add listeners, etc. * * @param type * @return */ public ManualRequestEditorDialog getManualSendEditor(Class type) { return dialogues.get(type); } @Override public void hook(ExtensionHook extensionHook) { super.hook(extensionHook); if (getView() != null) { for (Entry, ManualRequestEditorDialog> dialogue : dialogues.entrySet()) { extensionHook.getHookMenu().addToolsMenuItem(dialogue.getValue().getMenuItem()); } extensionHook.addSessionListener(this); } } @Override public String getAuthor() { return Constant.PAROS_TEAM; } @Override public void sessionChanged(Session session) { for (Entry, ManualRequestEditorDialog> dialogue : dialogues.entrySet()) { dialogue.getValue().clear(); dialogue.getValue().setDefaultMessage(); } } @Override public void sessionAboutToChange(Session session) { } @Override public void sessionScopeChanged(Session session) { } @Override public void sessionModeChanged(Mode mode) { Boolean isEnabled = null; switch (mode) { case safe: isEnabled = false; break; case protect: case standard: case attack: isEnabled = true; break; } if (isEnabled != null) { for (Entry, ManualRequestEditorDialog> dialog : dialogues.entrySet()) { dialog.getValue().setEnabled(isEnabled); } } } /** * No database tables used, so all supported */ @Override public boolean supportsDb(String type) { return true; } }",0 " */ /* OCaml */ /* */ /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ /* */ /* Copyright 2001 Institut National de Recherche en Informatique et */ /* en Automatique. */ /* */ /* All rights reserved. This file is distributed under the terms of */ /* the GNU Lesser General Public License version 2.1, with the */ /* special exception on linking described in the file LICENSE. */ /* */ /**************************************************************************/ #define CAML_INTERNALS /* Registration of global memory roots */ #include ""caml/mlvalues.h"" #include ""caml/roots.h"" #include ""caml/globroots.h"" #include ""caml/skiplist.h"" /* The three global root lists. Each is represented by a skip list with the key being the address of the root. (The associated data field is unused.) */ struct skiplist caml_global_roots = SKIPLIST_STATIC_INITIALIZER; /* mutable roots, don't know whether old or young */ struct skiplist caml_global_roots_young = SKIPLIST_STATIC_INITIALIZER; /* generational roots pointing to minor or major heap */ struct skiplist caml_global_roots_old = SKIPLIST_STATIC_INITIALIZER; /* generational roots pointing to major heap */ /* The invariant of the generational roots is the following: - If the global root contains a pointer to the minor heap, then the root is in [caml_global_roots_young]; - If the global root contains a pointer to the major heap, then the root is in [caml_global_roots_old] or in [caml_global_roots_young]; - Otherwise (the root contains a pointer outside of the heap or an integer), then neither [caml_global_roots_young] nor [caml_global_roots_old] contain it. */ /* Insertion and deletion */ Caml_inline void caml_insert_global_root(struct skiplist * list, value * r) { caml_skiplist_insert(list, (uintnat) r, 0); } Caml_inline void caml_delete_global_root(struct skiplist * list, value * r) { caml_skiplist_remove(list, (uintnat) r); } /* Iterate a GC scanning action over a global root list */ static void caml_iterate_global_roots(scanning_action f, struct skiplist * rootlist) { FOREACH_SKIPLIST_ELEMENT(e, rootlist, { value * r = (value *) (e->key); f(*r, r); }) } /* Register a global C root of the mutable kind */ CAMLexport void caml_register_global_root(value *r) { CAMLassert (((intnat) r & 3) == 0); /* compact.c demands this (for now) */ caml_insert_global_root(&caml_global_roots, r); } /* Un-register a global C root of the mutable kind */ CAMLexport void caml_remove_global_root(value *r) { caml_delete_global_root(&caml_global_roots, r); } enum gc_root_class { YOUNG, OLD, UNTRACKED }; static enum gc_root_class classify_gc_root(value v) { if(!Is_block(v)) return UNTRACKED; if(Is_young(v)) return YOUNG; #ifndef NO_NAKED_POINTERS if(!Is_in_heap(v)) return UNTRACKED; #endif return OLD; } /* Register a global C root of the generational kind */ CAMLexport void caml_register_generational_global_root(value *r) { CAMLassert (((intnat) r & 3) == 0); /* compact.c demands this (for now) */ switch(classify_gc_root(*r)) { case YOUNG: caml_insert_global_root(&caml_global_roots_young, r); break; case OLD: caml_insert_global_root(&caml_global_roots_old, r); break; case UNTRACKED: break; } } /* Un-register a global C root of the generational kind */ CAMLexport void caml_remove_generational_global_root(value *r) { switch(classify_gc_root(*r)) { case OLD: caml_delete_global_root(&caml_global_roots_old, r); /* Fallthrough: the root can be in the young list while actually being in the major heap. */ case YOUNG: caml_delete_global_root(&caml_global_roots_young, r); break; case UNTRACKED: break; } } /* Modify the value of a global C root of the generational kind */ CAMLexport void caml_modify_generational_global_root(value *r, value newval) { enum gc_root_class c; /* See PRs #4704, #607 and #8656 */ switch(classify_gc_root(newval)) { case YOUNG: c = classify_gc_root(*r); if(c == OLD) caml_delete_global_root(&caml_global_roots_old, r); if(c != YOUNG) caml_insert_global_root(&caml_global_roots_young, r); break; case OLD: /* If the old class is YOUNG, then we do not need to do anything: It is OK to have a root in roots_young that suddenly points to the old generation -- the next minor GC will take care of that. */ if(classify_gc_root(*r) == UNTRACKED) caml_insert_global_root(&caml_global_roots_old, r); break; case UNTRACKED: caml_remove_generational_global_root(r); break; } *r = newval; } /* Scan all global roots */ void caml_scan_global_roots(scanning_action f) { caml_iterate_global_roots(f, &caml_global_roots); caml_iterate_global_roots(f, &caml_global_roots_young); caml_iterate_global_roots(f, &caml_global_roots_old); } /* Scan global roots for a minor collection */ void caml_scan_global_young_roots(scanning_action f) { caml_iterate_global_roots(f, &caml_global_roots); caml_iterate_global_roots(f, &caml_global_roots_young); /* Move young roots to old roots */ FOREACH_SKIPLIST_ELEMENT(e, &caml_global_roots_young, { value * r = (value *) (e->key); caml_insert_global_root(&caml_global_roots_old, r); }); caml_skiplist_empty(&caml_global_roots_young); } ",0 "ment other dimension doesn't change.

              All boxes should end up the same size. The green box is the reference one.

              ",0 " org.cloudfoundry.autoscaler.data.couchdb.dao.AppInstanceMetricsDAO; import org.cloudfoundry.autoscaler.data.couchdb.dao.base.TypedCouchDbRepositorySupport; import org.cloudfoundry.autoscaler.data.couchdb.document.AppInstanceMetrics; import org.ektorp.ComplexKey; import org.ektorp.CouchDbConnector; import org.ektorp.ViewQuery; import org.ektorp.support.View; public class AppInstanceMetricsDAOImpl extends CommonDAOImpl implements AppInstanceMetricsDAO { @View(name = ""byAll"", map = ""function(doc) { if (doc.type == 'AppInstanceMetrics' ) emit([doc.appId, doc.appType, doc.timestamp], doc._id)}"") private static class AppInstanceMetricsRepository_All extends TypedCouchDbRepositorySupport { public AppInstanceMetricsRepository_All(CouchDbConnector db) { super(AppInstanceMetrics.class, db, ""AppInstanceMetrics_byAll""); } public List getAllRecords() { return queryView(""byAll""); } } @View(name = ""by_appId"", map = ""function(doc) { if (doc.type=='AppInstanceMetrics' && doc.appId) { emit([doc.appId], doc._id) } }"") private static class AppInstanceMetricsRepository_ByAppId extends TypedCouchDbRepositorySupport { public AppInstanceMetricsRepository_ByAppId(CouchDbConnector db) { super(AppInstanceMetrics.class, db, ""AppInstanceMetrics_ByAppId""); } public List findByAppId(String appId) { ComplexKey key = ComplexKey.of(appId); return queryView(""by_appId"", key); } } @View(name = ""by_appId_between"", map = ""function(doc) { if (doc.type=='AppInstanceMetrics' && doc.appId && doc.timestamp) { emit([doc.appId, doc.timestamp], doc._id) } }"") private static class AppInstanceMetricsRepository_ByAppIdBetween extends TypedCouchDbRepositorySupport { public AppInstanceMetricsRepository_ByAppIdBetween(CouchDbConnector db) { super(AppInstanceMetrics.class, db, ""AppInstanceMetrics_ByAppIdBetween""); } public List findByAppIdBetween(String appId, long startTimestamp, long endTimestamp) throws Exception { ComplexKey startKey = ComplexKey.of(appId, startTimestamp); ComplexKey endKey = ComplexKey.of(appId, endTimestamp); ViewQuery q = createQuery(""by_appId_between"").includeDocs(true).startKey(startKey).endKey(endKey); List returnvalue = null; String[] input = beforeConnection(""QUERY"", new String[] { ""by_appId_between"", appId, String.valueOf(startTimestamp), String.valueOf(endTimestamp) }); try { returnvalue = db.queryView(q, AppInstanceMetrics.class); } catch (Exception e) { e.printStackTrace(); } afterConnection(input); return returnvalue; } } @View(name = ""by_serviceId_before"", map = ""function(doc) { if (doc.type=='AppInstanceMetrics' && doc.serviceId && doc.timestamp) { emit([ doc.serviceId, doc.timestamp], doc._id) } }"") private static class AppInstanceMetricsRepository_ByServiceId_Before extends TypedCouchDbRepositorySupport { public AppInstanceMetricsRepository_ByServiceId_Before(CouchDbConnector db) { super(AppInstanceMetrics.class, db, ""AppInstanceMetrics_ByServiceId""); } public List findByServiceIdBefore(String serviceId, long olderThan) throws Exception { ComplexKey startKey = ComplexKey.of(serviceId, 0); ComplexKey endKey = ComplexKey.of(serviceId, olderThan); ViewQuery q = createQuery(""by_serviceId_before"").includeDocs(true).startKey(startKey).endKey(endKey); List returnvalue = null; String[] input = beforeConnection(""QUERY"", new String[] { ""by_serviceId_before"", serviceId, String.valueOf(0), String.valueOf(olderThan) }); try { returnvalue = db.queryView(q, AppInstanceMetrics.class); } catch (Exception e) { e.printStackTrace(); } afterConnection(input); return returnvalue; } } private static final Logger logger = Logger.getLogger(AppInstanceMetricsDAOImpl.class); private AppInstanceMetricsRepository_All metricsRepoAll; private AppInstanceMetricsRepository_ByAppId metricsRepoByAppId; private AppInstanceMetricsRepository_ByAppIdBetween metricsRepoByAppIdBetween; private AppInstanceMetricsRepository_ByServiceId_Before metricsRepoByServiceIdBefore; public AppInstanceMetricsDAOImpl(CouchDbConnector db) { metricsRepoAll = new AppInstanceMetricsRepository_All(db); metricsRepoByAppId = new AppInstanceMetricsRepository_ByAppId(db); metricsRepoByAppIdBetween = new AppInstanceMetricsRepository_ByAppIdBetween(db); metricsRepoByServiceIdBefore = new AppInstanceMetricsRepository_ByServiceId_Before(db); } public AppInstanceMetricsDAOImpl(CouchDbConnector db, boolean initDesignDocument) { this(db); if (initDesignDocument) { try { initAllRepos(); } catch (Exception e) { logger.error(e.getMessage(), e); } } } @Override public List findAll() { // TODO Auto-generated method stub return this.metricsRepoAll.getAllRecords(); } @Override public List findByAppId(String appId) { // TODO Auto-generated method stub return this.metricsRepoByAppId.findByAppId(appId); } @Override public List findByAppIdBetween(String appId, long startTimestamp, long endTimestamp) throws Exception { // TODO Auto-generated method stub return this.metricsRepoByAppIdBetween.findByAppIdBetween(appId, startTimestamp, endTimestamp); } @Override public List findByServiceIdBefore(String serviceId, long olderThan) throws Exception { // TODO Auto-generated method stub return this.metricsRepoByServiceIdBefore.findByServiceIdBefore(serviceId, olderThan); } @Override public List findByAppIdAfter(String appId, long timestamp) throws Exception { try { return findByAppIdBetween(appId, timestamp, System.currentTimeMillis()); } catch (Exception e) { logger.error(e.getMessage(), e); } return null; } @SuppressWarnings(""unchecked"") @Override public TypedCouchDbRepositorySupport getDefaultRepo() { // TODO Auto-generated method stub return (TypedCouchDbRepositorySupport) this.metricsRepoAll; } @SuppressWarnings(""unchecked"") @Override public List> getAllRepos() { // TODO Auto-generated method stub List> repoList = new ArrayList>(); repoList.add((TypedCouchDbRepositorySupport) this.metricsRepoAll); repoList.add((TypedCouchDbRepositorySupport) this.metricsRepoByAppId); repoList.add((TypedCouchDbRepositorySupport) this.metricsRepoByAppIdBetween); repoList.add((TypedCouchDbRepositorySupport) this.metricsRepoByServiceIdBefore); return repoList; } } ",0 " it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ #include ""config.h"" #include ""system.h"" #include ""coretypes.h"" #include ""backend.h"" #include ""predict.h"" #include ""tree.h"" #include ""gimple.h"" #include ""fold-const.h"" #include ""cfgloop.h"" #include ""gimple-iterator.h"" #include ""tree-cfg.h"" #include ""tree-ssa-threadupdate.h"" #include ""params.h"" #include ""tree-ssa-loop.h"" #include ""cfganal.h"" #include ""tree-pass.h"" #include ""gimple-ssa.h"" #include ""tree-phinodes.h"" static int max_threaded_paths; /* Simple helper to get the last statement from BB, which is assumed to be a control statement. Return NULL if the last statement is not a control statement. */ static gimple * get_gimple_control_stmt (basic_block bb) { gimple_stmt_iterator gsi = gsi_last_nondebug_bb (bb); if (gsi_end_p (gsi)) return NULL; gimple *stmt = gsi_stmt (gsi); enum gimple_code code = gimple_code (stmt); if (code == GIMPLE_COND || code == GIMPLE_SWITCH || code == GIMPLE_GOTO) return stmt; return NULL; } /* Return true if the CFG contains at least one path from START_BB to END_BB. When a path is found, record in PATH the blocks from END_BB to START_BB. VISITED_BBS is used to make sure we don't fall into an infinite loop. Bound the recursion to basic blocks belonging to LOOP. */ static bool fsm_find_thread_path (basic_block start_bb, basic_block end_bb, vec *&path, hash_set *visited_bbs, loop_p loop) { if (loop != start_bb->loop_father) return false; if (start_bb == end_bb) { vec_safe_push (path, start_bb); return true; } if (!visited_bbs->add (start_bb)) { edge e; edge_iterator ei; FOR_EACH_EDGE (e, ei, start_bb->succs) if (fsm_find_thread_path (e->dest, end_bb, path, visited_bbs, loop)) { vec_safe_push (path, start_bb); return true; } } return false; } /* Examine jump threading path PATH to which we want to add BBI. If the resulting path is profitable to thread, then return the final taken edge from the path, NULL otherwise. NAME is the SSA_NAME of the variable we found to have a constant value on PATH. ARG is the value of that SSA_NAME. BBI will be appended to PATH when we have a profitable jump threading path. Callers are responsible for removing BBI from PATH in that case. */ static edge profitable_jump_thread_path (vec *&path, basic_block bbi, tree name, tree arg) { /* Note BBI is not in the path yet, hence the +1 in the test below to make sure BBI is accounted for in the path length test. */ int path_length = path->length (); if (path_length + 1 > PARAM_VALUE (PARAM_MAX_FSM_THREAD_LENGTH)) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, ""FSM jump-thread path not considered: "" ""the number of basic blocks on the path "" ""exceeds PARAM_MAX_FSM_THREAD_LENGTH.\n""); return NULL; } if (max_threaded_paths <= 0) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, ""FSM jump-thread path not considered: "" ""the number of previously recorded FSM paths to "" ""thread exceeds PARAM_MAX_FSM_THREAD_PATHS.\n""); return NULL; } /* Add BBI to the path. From this point onward, if we decide we the path is not profitable to thread, we must remove BBI from the path. */ vec_safe_push (path, bbi); ++path_length; int n_insns = 0; gimple_stmt_iterator gsi; int j; loop_p loop = (*path)[0]->loop_father; bool path_crosses_loops = false; bool threaded_through_latch = false; bool multiway_branch_in_path = false; bool threaded_multiway_branch = false; /* Count the number of instructions on the path: as these instructions will have to be duplicated, we will not record the path if there are too many instructions on the path. Also check that all the blocks in the path belong to a single loop. */ for (j = 0; j < path_length; j++) { basic_block bb = (*path)[j]; /* Remember, blocks in the path are stored in opposite order in the PATH array. The last entry in the array represents the block with an outgoing edge that we will redirect to the jump threading path. Thus we don't care about that block's loop father, nor how many statements are in that block because it will not be copied or whether or not it ends in a multiway branch. */ if (j < path_length - 1) { if (bb->loop_father != loop) { path_crosses_loops = true; break; } /* PHIs in the path will create degenerate PHIS in the copied path which will then get propagated away, so looking at just the duplicate path the PHIs would seem unimportant. But those PHIs, because they're assignments to objects typically with lives that exist outside the thread path, will tend to generate PHIs (or at least new PHI arguments) at points where we leave the thread path and rejoin the original blocks. So we do want to account for them. We ignore virtual PHIs. We also ignore cases where BB has a single incoming edge. That's the most common degenerate PHI we'll see here. Finally we ignore PHIs that are associated with the value we're tracking as that object likely dies. */ if (EDGE_COUNT (bb->succs) > 1 && EDGE_COUNT (bb->preds) > 1) { for (gphi_iterator gsip = gsi_start_phis (bb); !gsi_end_p (gsip); gsi_next (&gsip)) { gphi *phi = gsip.phi (); tree dst = gimple_phi_result (phi); /* Note that if both NAME and DST are anonymous SSA_NAMEs, then we do not have enough information to consider them associated. */ if ((SSA_NAME_VAR (dst) != SSA_NAME_VAR (name) || !SSA_NAME_VAR (dst)) && !virtual_operand_p (dst)) ++n_insns; } } for (gsi = gsi_after_labels (bb); !gsi_end_p (gsi); gsi_next_nondebug (&gsi)) { gimple *stmt = gsi_stmt (gsi); /* Do not count empty statements and labels. */ if (gimple_code (stmt) != GIMPLE_NOP && !(gimple_code (stmt) == GIMPLE_ASSIGN && gimple_assign_rhs_code (stmt) == ASSERT_EXPR) && !is_gimple_debug (stmt)) ++n_insns; } /* We do not look at the block with the threaded branch in this loop. So if any block with a last statement that is a GIMPLE_SWITCH or GIMPLE_GOTO is seen, then we have a multiway branch on our path. The block in PATH[0] is special, it's the block were we're going to be able to eliminate its branch. */ gimple *last = last_stmt (bb); if (last && (gimple_code (last) == GIMPLE_SWITCH || gimple_code (last) == GIMPLE_GOTO)) { if (j == 0) threaded_multiway_branch = true; else multiway_branch_in_path = true; } } /* Note if we thread through the latch, we will want to include the last entry in the array when determining if we thread through the loop latch. */ if (loop->latch == bb) threaded_through_latch = true; } /* We are going to remove the control statement at the end of the last block in the threading path. So don't count it against our statement count. */ n_insns--; gimple *stmt = get_gimple_control_stmt ((*path)[0]); gcc_assert (stmt); /* We have found a constant value for ARG. For GIMPLE_SWITCH and GIMPLE_GOTO, we use it as-is. However, for a GIMPLE_COND we need to substitute, fold and simplify so we can determine the edge taken out of the last block. */ if (gimple_code (stmt) == GIMPLE_COND) { enum tree_code cond_code = gimple_cond_code (stmt); /* We know the underyling format of the condition. */ arg = fold_binary (cond_code, boolean_type_node, arg, gimple_cond_rhs (stmt)); } /* If this path threaded through the loop latch back into the same loop and the destination does not dominate the loop latch, then this thread would create an irreducible loop. We have to know the outgoing edge to figure this out. */ edge taken_edge = find_taken_edge ((*path)[0], arg); /* There are cases where we may not be able to extract the taken edge. For example, a computed goto to an absolute address. Handle those cases gracefully. */ if (taken_edge == NULL) { path->pop (); return NULL; } bool creates_irreducible_loop = false; if (threaded_through_latch && loop == taken_edge->dest->loop_father && (determine_bb_domination_status (loop, taken_edge->dest) == DOMST_NONDOMINATING)) creates_irreducible_loop = true; if (path_crosses_loops) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, ""FSM jump-thread path not considered: "" ""the path crosses loops.\n""); path->pop (); return NULL; } if (n_insns >= PARAM_VALUE (PARAM_MAX_FSM_THREAD_PATH_INSNS)) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, ""FSM jump-thread path not considered: "" ""the number of instructions on the path "" ""exceeds PARAM_MAX_FSM_THREAD_PATH_INSNS.\n""); path->pop (); return NULL; } /* We avoid creating irreducible inner loops unless we thread through a multiway branch, in which case we have deemed it worth losing other loop optimizations later. We also consider it worth creating an irreducible inner loop if the number of copied statement is low relative to the length of the path -- in that case there's little the traditional loop optimizer would have done anyway, so an irreducible loop is not so bad. */ if (!threaded_multiway_branch && creates_irreducible_loop && (n_insns * PARAM_VALUE (PARAM_FSM_SCALE_PATH_STMTS) > path_length * PARAM_VALUE (PARAM_FSM_SCALE_PATH_BLOCKS))) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, ""FSM would create irreducible loop without threading "" ""multiway branch.\n""); path->pop (); return NULL; } /* If this path does not thread through the loop latch, then we are using the FSM threader to find old style jump threads. This is good, except the FSM threader does not re-use an existing threading path to reduce code duplication. So for that case, drastically reduce the number of statements we are allowed to copy. */ if (!(threaded_through_latch && threaded_multiway_branch) && (n_insns * PARAM_VALUE (PARAM_FSM_SCALE_PATH_STMTS) >= PARAM_VALUE (PARAM_MAX_JUMP_THREAD_DUPLICATION_STMTS))) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, ""FSM did not thread around loop and would copy too "" ""many statements.\n""); path->pop (); return NULL; } /* When there is a multi-way branch on the path, then threading can explode the CFG due to duplicating the edges for that multi-way branch. So like above, only allow a multi-way branch on the path if we actually thread a multi-way branch. */ if (!threaded_multiway_branch && multiway_branch_in_path) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, ""FSM Thread through multiway branch without threading "" ""a multiway branch.\n""); path->pop (); return NULL; } return taken_edge; } /* PATH is vector of blocks forming a jump threading path in reverse order. TAKEN_EDGE is the edge taken from path[0]. Convert that path into the form used by register_jump_thread and register the path. */ static void convert_and_register_jump_thread_path (vec *&path, edge taken_edge) { vec *jump_thread_path = new vec (); /* Record the edges between the blocks in PATH. */ for (unsigned int j = 0; j < path->length () - 1; j++) { basic_block bb1 = (*path)[path->length () - j - 1]; basic_block bb2 = (*path)[path->length () - j - 2]; /* This can happen when we have an SSA_NAME as a PHI argument and its initialization block is the head of the PHI argument's edge. */ if (bb1 == bb2) continue; edge e = find_edge (bb1, bb2); gcc_assert (e); jump_thread_edge *x = new jump_thread_edge (e, EDGE_FSM_THREAD); jump_thread_path->safe_push (x); } /* As a consequence of the test for duplicate blocks in the path above, we can get a path with no blocks. This happens if a conditional can be fully evaluated at compile time using just defining statements in the same block as the test. When we no longer push the block associated with a PHI argument onto the stack, then this as well as the test in the loop above can be removed. */ if (jump_thread_path->length () == 0) { jump_thread_path->release (); delete jump_thread_path; path->pop (); return; } /* Add the edge taken when the control variable has value ARG. */ jump_thread_edge *x = new jump_thread_edge (taken_edge, EDGE_NO_COPY_SRC_BLOCK); jump_thread_path->safe_push (x); register_jump_thread (jump_thread_path); --max_threaded_paths; /* Remove BBI from the path. */ path->pop (); } /* We trace the value of the SSA_NAME NAME back through any phi nodes looking for places where it gets a constant value and save the path. Stop after having recorded MAX_PATHS jump threading paths. */ static void fsm_find_control_statement_thread_paths (tree name, hash_set *visited_bbs, vec *&path, bool seen_loop_phi) { /* If NAME appears in an abnormal PHI, then don't try to trace its value back through PHI nodes. */ if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name)) return; gimple *def_stmt = SSA_NAME_DEF_STMT (name); basic_block var_bb = gimple_bb (def_stmt); if (var_bb == NULL) return; /* We allow the SSA chain to contains PHIs and simple copies and constant initializations. */ if (gimple_code (def_stmt) != GIMPLE_PHI && gimple_code (def_stmt) != GIMPLE_ASSIGN) return; if (gimple_code (def_stmt) == GIMPLE_PHI && (gimple_phi_num_args (def_stmt) >= (unsigned) PARAM_VALUE (PARAM_FSM_MAXIMUM_PHI_ARGUMENTS))) return; if (gimple_code (def_stmt) == GIMPLE_ASSIGN && gimple_assign_rhs_code (def_stmt) != INTEGER_CST && gimple_assign_rhs_code (def_stmt) != SSA_NAME) return; /* Avoid infinite recursion. */ if (visited_bbs->add (var_bb)) return; int next_path_length = 0; basic_block last_bb_in_path = path->last (); if (loop_containing_stmt (def_stmt)->header == gimple_bb (def_stmt)) { /* Do not walk through more than one loop PHI node. */ if (seen_loop_phi) return; seen_loop_phi = true; } /* Following the chain of SSA_NAME definitions, we jumped from a definition in LAST_BB_IN_PATH to a definition in VAR_BB. When these basic blocks are different, append to PATH the blocks from LAST_BB_IN_PATH to VAR_BB. */ if (var_bb != last_bb_in_path) { edge e; int e_count = 0; edge_iterator ei; vec *next_path; vec_alloc (next_path, 10); /* When VAR_BB == LAST_BB_IN_PATH, then the first block in the path will already be in VISITED_BBS. When they are not equal, then we must ensure that first block is accounted for to ensure we do not create bogus jump threading paths. */ visited_bbs->add ((*path)[0]); FOR_EACH_EDGE (e, ei, last_bb_in_path->preds) { hash_set *visited_bbs = new hash_set; if (fsm_find_thread_path (var_bb, e->src, next_path, visited_bbs, e->src->loop_father)) ++e_count; delete visited_bbs; /* If there is more than one path, stop. */ if (e_count > 1) { vec_free (next_path); return; } } /* Stop if we have not found a path: this could occur when the recursion is stopped by one of the bounds. */ if (e_count == 0) { vec_free (next_path); return; } /* Make sure we haven't already visited any of the nodes in NEXT_PATH. Don't add them here to avoid pollution. */ for (unsigned int i = 0; i < next_path->length () - 1; i++) { if (visited_bbs->contains ((*next_path)[i])) { vec_free (next_path); return; } } /* Now add the nodes to VISISTED_BBS. */ for (unsigned int i = 0; i < next_path->length () - 1; i++) visited_bbs->add ((*next_path)[i]); /* Append all the nodes from NEXT_PATH to PATH. */ vec_safe_splice (path, next_path); next_path_length = next_path->length (); vec_free (next_path); } gcc_assert (path->last () == var_bb); /* Iterate over the arguments of PHI. */ unsigned int i; if (gimple_code (def_stmt) == GIMPLE_PHI) { gphi *phi = as_a (def_stmt); for (i = 0; i < gimple_phi_num_args (phi); i++) { tree arg = gimple_phi_arg_def (phi, i); basic_block bbi = gimple_phi_arg_edge (phi, i)->src; /* Skip edges pointing outside the current loop. */ if (!arg || var_bb->loop_father != bbi->loop_father) continue; if (TREE_CODE (arg) == SSA_NAME) { vec_safe_push (path, bbi); /* Recursively follow SSA_NAMEs looking for a constant definition. */ fsm_find_control_statement_thread_paths (arg, visited_bbs, path, seen_loop_phi); path->pop (); continue; } if (TREE_CODE (arg) != INTEGER_CST) continue; /* If this is a profitable jump thread path, then convert it into the canonical form and register it. */ edge taken_edge = profitable_jump_thread_path (path, bbi, name, arg); if (taken_edge) convert_and_register_jump_thread_path (path, taken_edge); } } else if (gimple_code (def_stmt) == GIMPLE_ASSIGN) { tree arg = gimple_assign_rhs1 (def_stmt); if (TREE_CODE (arg) == SSA_NAME) fsm_find_control_statement_thread_paths (arg, visited_bbs, path, seen_loop_phi); else { edge taken_edge = profitable_jump_thread_path (path, var_bb, name, arg); if (taken_edge) convert_and_register_jump_thread_path (path, taken_edge); } } /* Remove all the nodes that we added from NEXT_PATH. */ if (next_path_length) vec_safe_truncate (path, (path->length () - next_path_length)); } /* Search backwards from BB looking for paths where NAME (an SSA_NAME) is a constant. Record such paths for jump threading. It is assumed that BB ends with a control statement and that by finding a path where NAME is a constant, we can thread the path. */ void find_jump_threads_backwards (basic_block bb) { if (!flag_expensive_optimizations || optimize_function_for_size_p (cfun)) return; gimple *stmt = get_gimple_control_stmt (bb); if (!stmt) return; enum gimple_code code = gimple_code (stmt); tree name = NULL; if (code == GIMPLE_SWITCH) name = gimple_switch_index (as_a (stmt)); else if (code == GIMPLE_GOTO) name = gimple_goto_dest (stmt); else if (code == GIMPLE_COND) { if (TREE_CODE (gimple_cond_lhs (stmt)) == SSA_NAME && TREE_CODE (gimple_cond_rhs (stmt)) == INTEGER_CST && (INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt))) || POINTER_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt))))) name = gimple_cond_lhs (stmt); } if (!name || TREE_CODE (name) != SSA_NAME) return; vec *bb_path; vec_alloc (bb_path, 10); vec_safe_push (bb_path, bb); hash_set *visited_bbs = new hash_set; max_threaded_paths = PARAM_VALUE (PARAM_MAX_FSM_THREAD_PATHS); fsm_find_control_statement_thread_paths (name, visited_bbs, bb_path, false); delete visited_bbs; vec_free (bb_path); } namespace { const pass_data pass_data_thread_jumps = { GIMPLE_PASS, ""thread"", OPTGROUP_NONE, TV_TREE_SSA_THREAD_JUMPS, ( PROP_cfg | PROP_ssa ), 0, 0, 0, ( TODO_cleanup_cfg | TODO_update_ssa ), }; class pass_thread_jumps : public gimple_opt_pass { public: pass_thread_jumps (gcc::context *ctxt) : gimple_opt_pass (pass_data_thread_jumps, ctxt) {} opt_pass * clone (void) { return new pass_thread_jumps (m_ctxt); } virtual bool gate (function *); virtual unsigned int execute (function *); }; bool pass_thread_jumps::gate (function *fun ATTRIBUTE_UNUSED) { return (flag_expensive_optimizations && ! optimize_function_for_size_p (cfun)); } unsigned int pass_thread_jumps::execute (function *fun) { /* Try to thread each block with more than one successor. */ basic_block bb; FOR_EACH_BB_FN (bb, fun) { if (EDGE_COUNT (bb->succs) > 1) find_jump_threads_backwards (bb); } thread_through_all_blocks (true); return 0; } } gimple_opt_pass * make_pass_thread_jumps (gcc::context *ctxt) { return new pass_thread_jumps (ctxt); } ",0 "TermStatusBarBaseComponent.h"" NS_ASSUME_NONNULL_BEGIN // A base class for components that show text. // This class only knows how to show static text. Subclasses may choose to configure it by overriding // stringValue, attributedStringValue, statusBarComponentUpdateCadence, and statusBarComponentUpdate. @interface iTermStatusBarTextComponent : iTermStatusBarBaseComponent @property (nonatomic, readonly, nullable) NSArray *stringVariants; @property (nonatomic, readonly) NSTextField *textField; - (CGFloat)widthForString:(NSString *)string; - (void)updateTextFieldIfNeeded; - (NSTextField *)newTextField; - (nullable NSString *)stringValueForCurrentWidth; @end NS_ASSUME_NONNULL_END ",0 " */ class Database { /** * @var Connection */ private $connection; /** * Initailize connection. * @param Connection $connection */ public function __construct(Connection $connection) { $this->setConnection($connection); } /** * Get Connection object * @return Connection */ public function getConnection() { return $this->connection; } /** * Sets Connection object * @param Connection $connection */ public function setConnection(Connection $connection) { $this->connection = $connection; } /** * Gets all details related to a particular DB table * @param $tableName * @return obj Table * @throws \Exception */ public function getTable($tableName) { $exists = $this->getConnection()->getSchemaManager()->tablesExist([$tableName]); if (!$exists) { throw new \Exception(sprintf('Table %s does not exist', $tableName)); } $table = $this->getConnection()->getSchemaManager()->listTableDetails($tableName); return $table; } /** * Get details from all the table present in a DB Table. * @return \Doctrine\DBAL\Schema\Table[] */ public function getAllTables() { $tables = $this->getConnection()->getSchemaManager()->listTables(); return $tables; } /** * Gets table details from specified table name. * @param array $tableNames * @return array * @throws \Exception */ public function getTables(array $tableNames) { $tables = []; foreach ($tableNames as $tableName) { $tables[] = $this->getTable($tableName); } return $tables; } } ",0 "nty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ package net.sourceforge.clonekeenplus; import java.lang.String; import java.util.ArrayList; import java.util.Arrays; import java.lang.reflect.Field; // Autogenerated by hand with a command: // grep 'SDLK_' SDL_keysym.h | sed 's/SDLK_\([a-zA-Z0-9_]\+\).*[=] \([0-9]\+\).*/public static final int SDLK_\1 = \2;/' >> Keycodes.java class SDL_1_2_Keycodes { public static final int SDLK_UNKNOWN = 0; public static final int SDLK_BACKSPACE = 8; public static final int SDLK_TAB = 9; public static final int SDLK_CLEAR = 12; public static final int SDLK_RETURN = 13; public static final int SDLK_PAUSE = 19; public static final int SDLK_ESCAPE = 27; public static final int SDLK_SPACE = 32; public static final int SDLK_EXCLAIM = 33; public static final int SDLK_QUOTEDBL = 34; public static final int SDLK_HASH = 35; public static final int SDLK_DOLLAR = 36; public static final int SDLK_AMPERSAND = 38; public static final int SDLK_QUOTE = 39; public static final int SDLK_LEFTPAREN = 40; public static final int SDLK_RIGHTPAREN = 41; public static final int SDLK_ASTERISK = 42; public static final int SDLK_PLUS = 43; public static final int SDLK_COMMA = 44; public static final int SDLK_MINUS = 45; public static final int SDLK_PERIOD = 46; public static final int SDLK_SLASH = 47; public static final int SDLK_0 = 48; public static final int SDLK_1 = 49; public static final int SDLK_2 = 50; public static final int SDLK_3 = 51; public static final int SDLK_4 = 52; public static final int SDLK_5 = 53; public static final int SDLK_6 = 54; public static final int SDLK_7 = 55; public static final int SDLK_8 = 56; public static final int SDLK_9 = 57; public static final int SDLK_COLON = 58; public static final int SDLK_SEMICOLON = 59; public static final int SDLK_LESS = 60; public static final int SDLK_EQUALS = 61; public static final int SDLK_GREATER = 62; public static final int SDLK_QUESTION = 63; public static final int SDLK_AT = 64; public static final int SDLK_LEFTBRACKET = 91; public static final int SDLK_BACKSLASH = 92; public static final int SDLK_RIGHTBRACKET = 93; public static final int SDLK_CARET = 94; public static final int SDLK_UNDERSCORE = 95; public static final int SDLK_BACKQUOTE = 96; public static final int SDLK_a = 97; public static final int SDLK_b = 98; public static final int SDLK_c = 99; public static final int SDLK_d = 100; public static final int SDLK_e = 101; public static final int SDLK_f = 102; public static final int SDLK_g = 103; public static final int SDLK_h = 104; public static final int SDLK_i = 105; public static final int SDLK_j = 106; public static final int SDLK_k = 107; public static final int SDLK_l = 108; public static final int SDLK_m = 109; public static final int SDLK_n = 110; public static final int SDLK_o = 111; public static final int SDLK_p = 112; public static final int SDLK_q = 113; public static final int SDLK_r = 114; public static final int SDLK_s = 115; public static final int SDLK_t = 116; public static final int SDLK_u = 117; public static final int SDLK_v = 118; public static final int SDLK_w = 119; public static final int SDLK_x = 120; public static final int SDLK_y = 121; public static final int SDLK_z = 122; public static final int SDLK_DELETE = 127; public static final int SDLK_WORLD_0 = 160; public static final int SDLK_WORLD_1 = 161; public static final int SDLK_WORLD_2 = 162; public static final int SDLK_WORLD_3 = 163; public static final int SDLK_WORLD_4 = 164; public static final int SDLK_WORLD_5 = 165; public static final int SDLK_WORLD_6 = 166; public static final int SDLK_WORLD_7 = 167; public static final int SDLK_WORLD_8 = 168; public static final int SDLK_WORLD_9 = 169; public static final int SDLK_WORLD_10 = 170; public static final int SDLK_WORLD_11 = 171; public static final int SDLK_WORLD_12 = 172; public static final int SDLK_WORLD_13 = 173; public static final int SDLK_WORLD_14 = 174; public static final int SDLK_WORLD_15 = 175; public static final int SDLK_WORLD_16 = 176; public static final int SDLK_WORLD_17 = 177; public static final int SDLK_WORLD_18 = 178; public static final int SDLK_WORLD_19 = 179; public static final int SDLK_WORLD_20 = 180; public static final int SDLK_WORLD_21 = 181; public static final int SDLK_WORLD_22 = 182; public static final int SDLK_WORLD_23 = 183; public static final int SDLK_WORLD_24 = 184; public static final int SDLK_WORLD_25 = 185; public static final int SDLK_WORLD_26 = 186; public static final int SDLK_WORLD_27 = 187; public static final int SDLK_WORLD_28 = 188; public static final int SDLK_WORLD_29 = 189; public static final int SDLK_WORLD_30 = 190; public static final int SDLK_WORLD_31 = 191; public static final int SDLK_WORLD_32 = 192; public static final int SDLK_WORLD_33 = 193; public static final int SDLK_WORLD_34 = 194; public static final int SDLK_WORLD_35 = 195; public static final int SDLK_WORLD_36 = 196; public static final int SDLK_WORLD_37 = 197; public static final int SDLK_WORLD_38 = 198; public static final int SDLK_WORLD_39 = 199; public static final int SDLK_WORLD_40 = 200; public static final int SDLK_WORLD_41 = 201; public static final int SDLK_WORLD_42 = 202; public static final int SDLK_WORLD_43 = 203; public static final int SDLK_WORLD_44 = 204; public static final int SDLK_WORLD_45 = 205; public static final int SDLK_WORLD_46 = 206; public static final int SDLK_WORLD_47 = 207; public static final int SDLK_WORLD_48 = 208; public static final int SDLK_WORLD_49 = 209; public static final int SDLK_WORLD_50 = 210; public static final int SDLK_WORLD_51 = 211; public static final int SDLK_WORLD_52 = 212; public static final int SDLK_WORLD_53 = 213; public static final int SDLK_WORLD_54 = 214; public static final int SDLK_WORLD_55 = 215; public static final int SDLK_WORLD_56 = 216; public static final int SDLK_WORLD_57 = 217; public static final int SDLK_WORLD_58 = 218; public static final int SDLK_WORLD_59 = 219; public static final int SDLK_WORLD_60 = 220; public static final int SDLK_WORLD_61 = 221; public static final int SDLK_WORLD_62 = 222; public static final int SDLK_WORLD_63 = 223; public static final int SDLK_WORLD_64 = 224; public static final int SDLK_WORLD_65 = 225; public static final int SDLK_WORLD_66 = 226; public static final int SDLK_WORLD_67 = 227; public static final int SDLK_WORLD_68 = 228; public static final int SDLK_WORLD_69 = 229; public static final int SDLK_WORLD_70 = 230; public static final int SDLK_WORLD_71 = 231; public static final int SDLK_WORLD_72 = 232; public static final int SDLK_WORLD_73 = 233; public static final int SDLK_WORLD_74 = 234; public static final int SDLK_WORLD_75 = 235; public static final int SDLK_WORLD_76 = 236; public static final int SDLK_WORLD_77 = 237; public static final int SDLK_WORLD_78 = 238; public static final int SDLK_WORLD_79 = 239; public static final int SDLK_WORLD_80 = 240; public static final int SDLK_WORLD_81 = 241; public static final int SDLK_WORLD_82 = 242; public static final int SDLK_WORLD_83 = 243; public static final int SDLK_WORLD_84 = 244; public static final int SDLK_WORLD_85 = 245; public static final int SDLK_WORLD_86 = 246; public static final int SDLK_WORLD_87 = 247; public static final int SDLK_WORLD_88 = 248; public static final int SDLK_WORLD_89 = 249; public static final int SDLK_WORLD_90 = 250; public static final int SDLK_WORLD_91 = 251; public static final int SDLK_WORLD_92 = 252; public static final int SDLK_WORLD_93 = 253; public static final int SDLK_WORLD_94 = 254; public static final int SDLK_WORLD_95 = 255; public static final int SDLK_KP0 = 256; public static final int SDLK_KP1 = 257; public static final int SDLK_KP2 = 258; public static final int SDLK_KP3 = 259; public static final int SDLK_KP4 = 260; public static final int SDLK_KP5 = 261; public static final int SDLK_KP6 = 262; public static final int SDLK_KP7 = 263; public static final int SDLK_KP8 = 264; public static final int SDLK_KP9 = 265; public static final int SDLK_KP_PERIOD = 266; public static final int SDLK_KP_DIVIDE = 267; public static final int SDLK_KP_MULTIPLY = 268; public static final int SDLK_KP_MINUS = 269; public static final int SDLK_KP_PLUS = 270; public static final int SDLK_KP_ENTER = 271; public static final int SDLK_KP_EQUALS = 272; public static final int SDLK_UP = 273; public static final int SDLK_DOWN = 274; public static final int SDLK_RIGHT = 275; public static final int SDLK_LEFT = 276; public static final int SDLK_INSERT = 277; public static final int SDLK_HOME = 278; public static final int SDLK_END = 279; public static final int SDLK_PAGEUP = 280; public static final int SDLK_PAGEDOWN = 281; public static final int SDLK_F1 = 282; public static final int SDLK_F2 = 283; public static final int SDLK_F3 = 284; public static final int SDLK_F4 = 285; public static final int SDLK_F5 = 286; public static final int SDLK_F6 = 287; public static final int SDLK_F7 = 288; public static final int SDLK_F8 = 289; public static final int SDLK_F9 = 290; public static final int SDLK_F10 = 291; public static final int SDLK_F11 = 292; public static final int SDLK_F12 = 293; public static final int SDLK_F13 = 294; public static final int SDLK_F14 = 295; public static final int SDLK_F15 = 296; public static final int SDLK_NUMLOCK = 300; public static final int SDLK_CAPSLOCK = 301; public static final int SDLK_SCROLLOCK = 302; public static final int SDLK_RSHIFT = 303; public static final int SDLK_LSHIFT = 304; public static final int SDLK_RCTRL = 305; public static final int SDLK_LCTRL = 306; public static final int SDLK_RALT = 307; public static final int SDLK_LALT = 308; public static final int SDLK_RMETA = 309; public static final int SDLK_LMETA = 310; public static final int SDLK_LSUPER = 311; public static final int SDLK_RSUPER = 312; public static final int SDLK_MODE = 313; public static final int SDLK_COMPOSE = 314; public static final int SDLK_HELP = 315; public static final int SDLK_PRINT = 316; public static final int SDLK_SYSREQ = 317; public static final int SDLK_BREAK = 318; public static final int SDLK_MENU = 319; public static final int SDLK_POWER = 320; public static final int SDLK_EURO = 321; public static final int SDLK_UNDO = 322; public static final int SDLK_NO_REMAP = 512; } // Autogenerated by hand with a command: // grep 'SDL_SCANCODE_' SDL_scancode.h | sed 's/SDL_SCANCODE_\([a-zA-Z0-9_]\+\).*[=] \([0-9]\+\).*/public static final int SDLK_\1 = \2;/' >> Keycodes.java class SDL_1_3_Keycodes { public static final int SDLK_UNKNOWN = 0; public static final int SDLK_A = 4; public static final int SDLK_B = 5; public static final int SDLK_C = 6; public static final int SDLK_D = 7; public static final int SDLK_E = 8; public static final int SDLK_F = 9; public static final int SDLK_G = 10; public static final int SDLK_H = 11; public static final int SDLK_I = 12; public static final int SDLK_J = 13; public static final int SDLK_K = 14; public static final int SDLK_L = 15; public static final int SDLK_M = 16; public static final int SDLK_N = 17; public static final int SDLK_O = 18; public static final int SDLK_P = 19; public static final int SDLK_Q = 20; public static final int SDLK_R = 21; public static final int SDLK_S = 22; public static final int SDLK_T = 23; public static final int SDLK_U = 24; public static final int SDLK_V = 25; public static final int SDLK_W = 26; public static final int SDLK_X = 27; public static final int SDLK_Y = 28; public static final int SDLK_Z = 29; public static final int SDLK_1 = 30; public static final int SDLK_2 = 31; public static final int SDLK_3 = 32; public static final int SDLK_4 = 33; public static final int SDLK_5 = 34; public static final int SDLK_6 = 35; public static final int SDLK_7 = 36; public static final int SDLK_8 = 37; public static final int SDLK_9 = 38; public static final int SDLK_0 = 39; public static final int SDLK_RETURN = 40; public static final int SDLK_ESCAPE = 41; public static final int SDLK_BACKSPACE = 42; public static final int SDLK_TAB = 43; public static final int SDLK_SPACE = 44; public static final int SDLK_MINUS = 45; public static final int SDLK_EQUALS = 46; public static final int SDLK_LEFTBRACKET = 47; public static final int SDLK_RIGHTBRACKET = 48; public static final int SDLK_BACKSLASH = 49; public static final int SDLK_NONUSHASH = 50; public static final int SDLK_SEMICOLON = 51; public static final int SDLK_APOSTROPHE = 52; public static final int SDLK_GRAVE = 53; public static final int SDLK_COMMA = 54; public static final int SDLK_PERIOD = 55; public static final int SDLK_SLASH = 56; public static final int SDLK_CAPSLOCK = 57; public static final int SDLK_F1 = 58; public static final int SDLK_F2 = 59; public static final int SDLK_F3 = 60; public static final int SDLK_F4 = 61; public static final int SDLK_F5 = 62; public static final int SDLK_F6 = 63; public static final int SDLK_F7 = 64; public static final int SDLK_F8 = 65; public static final int SDLK_F9 = 66; public static final int SDLK_F10 = 67; public static final int SDLK_F11 = 68; public static final int SDLK_F12 = 69; public static final int SDLK_PRINTSCREEN = 70; public static final int SDLK_SCROLLLOCK = 71; public static final int SDLK_PAUSE = 72; public static final int SDLK_INSERT = 73; public static final int SDLK_HOME = 74; public static final int SDLK_PAGEUP = 75; public static final int SDLK_DELETE = 76; public static final int SDLK_END = 77; public static final int SDLK_PAGEDOWN = 78; public static final int SDLK_RIGHT = 79; public static final int SDLK_LEFT = 80; public static final int SDLK_DOWN = 81; public static final int SDLK_UP = 82; public static final int SDLK_NUMLOCKCLEAR = 83; public static final int SDLK_KP_DIVIDE = 84; public static final int SDLK_KP_MULTIPLY = 85; public static final int SDLK_KP_MINUS = 86; public static final int SDLK_KP_PLUS = 87; public static final int SDLK_KP_ENTER = 88; public static final int SDLK_KP_1 = 89; public static final int SDLK_KP_2 = 90; public static final int SDLK_KP_3 = 91; public static final int SDLK_KP_4 = 92; public static final int SDLK_KP_5 = 93; public static final int SDLK_KP_6 = 94; public static final int SDLK_KP_7 = 95; public static final int SDLK_KP_8 = 96; public static final int SDLK_KP_9 = 97; public static final int SDLK_KP_0 = 98; public static final int SDLK_KP_PERIOD = 99; public static final int SDLK_NONUSBACKSLASH = 100; public static final int SDLK_APPLICATION = 101; public static final int SDLK_POWER = 102; public static final int SDLK_KP_EQUALS = 103; public static final int SDLK_F13 = 104; public static final int SDLK_F14 = 105; public static final int SDLK_F15 = 106; public static final int SDLK_F16 = 107; public static final int SDLK_F17 = 108; public static final int SDLK_F18 = 109; public static final int SDLK_F19 = 110; public static final int SDLK_F20 = 111; public static final int SDLK_F21 = 112; public static final int SDLK_F22 = 113; public static final int SDLK_F23 = 114; public static final int SDLK_F24 = 115; public static final int SDLK_EXECUTE = 116; public static final int SDLK_HELP = 117; public static final int SDLK_MENU = 118; public static final int SDLK_SELECT = 119; public static final int SDLK_STOP = 120; public static final int SDLK_AGAIN = 121; public static final int SDLK_UNDO = 122; public static final int SDLK_CUT = 123; public static final int SDLK_COPY = 124; public static final int SDLK_PASTE = 125; public static final int SDLK_FIND = 126; public static final int SDLK_MUTE = 127; public static final int SDLK_VOLUMEUP = 128; public static final int SDLK_VOLUMEDOWN = 129; public static final int SDLK_KP_COMMA = 133; public static final int SDLK_KP_EQUALSAS400 = 134; public static final int SDLK_INTERNATIONAL1 = 135; public static final int SDLK_INTERNATIONAL2 = 136; public static final int SDLK_INTERNATIONAL3 = 137; public static final int SDLK_INTERNATIONAL4 = 138; public static final int SDLK_INTERNATIONAL5 = 139; public static final int SDLK_INTERNATIONAL6 = 140; public static final int SDLK_INTERNATIONAL7 = 141; public static final int SDLK_INTERNATIONAL8 = 142; public static final int SDLK_INTERNATIONAL9 = 143; public static final int SDLK_LANG1 = 144; public static final int SDLK_LANG2 = 145; public static final int SDLK_LANG3 = 146; public static final int SDLK_LANG4 = 147; public static final int SDLK_LANG5 = 148; public static final int SDLK_LANG6 = 149; public static final int SDLK_LANG7 = 150; public static final int SDLK_LANG8 = 151; public static final int SDLK_LANG9 = 152; public static final int SDLK_ALTERASE = 153; public static final int SDLK_SYSREQ = 154; public static final int SDLK_CANCEL = 155; public static final int SDLK_CLEAR = 156; public static final int SDLK_PRIOR = 157; public static final int SDLK_RETURN2 = 158; public static final int SDLK_SEPARATOR = 159; public static final int SDLK_OUT = 160; public static final int SDLK_OPER = 161; public static final int SDLK_CLEARAGAIN = 162; public static final int SDLK_CRSEL = 163; public static final int SDLK_EXSEL = 164; public static final int SDLK_KP_00 = 176; public static final int SDLK_KP_000 = 177; public static final int SDLK_THOUSANDSSEPARATOR = 178; public static final int SDLK_DECIMALSEPARATOR = 179; public static final int SDLK_CURRENCYUNIT = 180; public static final int SDLK_CURRENCYSUBUNIT = 181; public static final int SDLK_KP_LEFTPAREN = 182; public static final int SDLK_KP_RIGHTPAREN = 183; public static final int SDLK_KP_LEFTBRACE = 184; public static final int SDLK_KP_RIGHTBRACE = 185; public static final int SDLK_KP_TAB = 186; public static final int SDLK_KP_BACKSPACE = 187; public static final int SDLK_KP_A = 188; public static final int SDLK_KP_B = 189; public static final int SDLK_KP_C = 190; public static final int SDLK_KP_D = 191; public static final int SDLK_KP_E = 192; public static final int SDLK_KP_F = 193; public static final int SDLK_KP_XOR = 194; public static final int SDLK_KP_POWER = 195; public static final int SDLK_KP_PERCENT = 196; public static final int SDLK_KP_LESS = 197; public static final int SDLK_KP_GREATER = 198; public static final int SDLK_KP_AMPERSAND = 199; public static final int SDLK_KP_DBLAMPERSAND = 200; public static final int SDLK_KP_VERTICALBAR = 201; public static final int SDLK_KP_DBLVERTICALBAR = 202; public static final int SDLK_KP_COLON = 203; public static final int SDLK_KP_HASH = 204; public static final int SDLK_KP_SPACE = 205; public static final int SDLK_KP_AT = 206; public static final int SDLK_KP_EXCLAM = 207; public static final int SDLK_KP_MEMSTORE = 208; public static final int SDLK_KP_MEMRECALL = 209; public static final int SDLK_KP_MEMCLEAR = 210; public static final int SDLK_KP_MEMADD = 211; public static final int SDLK_KP_MEMSUBTRACT = 212; public static final int SDLK_KP_MEMMULTIPLY = 213; public static final int SDLK_KP_MEMDIVIDE = 214; public static final int SDLK_KP_PLUSMINUS = 215; public static final int SDLK_KP_CLEAR = 216; public static final int SDLK_KP_CLEARENTRY = 217; public static final int SDLK_KP_BINARY = 218; public static final int SDLK_KP_OCTAL = 219; public static final int SDLK_KP_DECIMAL = 220; public static final int SDLK_KP_HEXADECIMAL = 221; public static final int SDLK_LCTRL = 224; public static final int SDLK_LSHIFT = 225; public static final int SDLK_LALT = 226; public static final int SDLK_LGUI = 227; public static final int SDLK_RCTRL = 228; public static final int SDLK_RSHIFT = 229; public static final int SDLK_RALT = 230; public static final int SDLK_RGUI = 231; public static final int SDLK_MODE = 257; public static final int SDLK_AUDIONEXT = 258; public static final int SDLK_AUDIOPREV = 259; public static final int SDLK_AUDIOSTOP = 260; public static final int SDLK_AUDIOPLAY = 261; public static final int SDLK_AUDIOMUTE = 262; public static final int SDLK_MEDIASELECT = 263; public static final int SDLK_WWW = 264; public static final int SDLK_MAIL = 265; public static final int SDLK_CALCULATOR = 266; public static final int SDLK_COMPUTER = 267; public static final int SDLK_AC_SEARCH = 268; public static final int SDLK_AC_HOME = 269; public static final int SDLK_AC_BACK = 270; public static final int SDLK_AC_FORWARD = 271; public static final int SDLK_AC_STOP = 272; public static final int SDLK_AC_REFRESH = 273; public static final int SDLK_AC_BOOKMARKS = 274; public static final int SDLK_BRIGHTNESSDOWN = 275; public static final int SDLK_BRIGHTNESSUP = 276; public static final int SDLK_DISPLAYSWITCH = 277; public static final int SDLK_KBDILLUMTOGGLE = 278; public static final int SDLK_KBDILLUMDOWN = 279; public static final int SDLK_KBDILLUMUP = 280; public static final int SDLK_EJECT = 281; public static final int SDLK_SLEEP = 282; public static final int SDLK_NO_REMAP = 512; } class SDL_Keys { public static String [] names = null; public static Integer [] values = null; public static String [] namesSorted = null; public static Integer [] namesSortedIdx = null; public static Integer [] namesSortedBackIdx = null; static final int JAVA_KEYCODE_LAST = 255; // Android 2.3 added several new gaming keys, Android 3.1 added even more - keep in sync with javakeycodes.h static { ArrayList Names = new ArrayList (); ArrayList Values = new ArrayList (); Field [] fields = SDL_1_2_Keycodes.class.getDeclaredFields(); if( Globals.Using_SDL_1_3 ) { fields = SDL_1_3_Keycodes.class.getDeclaredFields(); } try { for(Field f: fields) { Values.add(f.getInt(null)); Names.add(f.getName().substring(5).toUpperCase()); } } catch(IllegalAccessException e) {}; // Sort by value for( int i = 0; i < Values.size(); i++ ) { for( int j = i; j < Values.size(); j++ ) { if( Values.get(i) > Values.get(j) ) { int x = Values.get(i); Values.set(i, Values.get(j)); Values.set(j, x); String s = Names.get(i); Names.set(i, Names.get(j)); Names.set(j, s); } } } names = Names.toArray(new String[0]); values = Values.toArray(new Integer[0]); namesSorted = Names.toArray(new String[0]); namesSortedIdx = new Integer[values.length]; namesSortedBackIdx = new Integer[values.length]; Arrays.sort(namesSorted); for( int i = 0; i < namesSorted.length; i++ ) { for( int j = 0; j < namesSorted.length; j++ ) { if( namesSorted[i].equals( names[j] ) ) { namesSortedIdx[i] = j; namesSortedBackIdx[j] = i; break; } } } } } ",0 "ore information. #import @class SA_DiceBag; @class SA_DiceExpression; /************************************************/ #pragma mark SA_DiceEvaluator class declaration /************************************************/ @interface SA_DiceEvaluator : NSObject /************************/ #pragma mark - Properties /************************/ @property NSUInteger maxDieCount; @property NSUInteger maxDieSize; /****************************/ #pragma mark - Public methods /****************************/ -(SA_DiceExpression *) resultOfExpression:(SA_DiceExpression *)expression; @end ",0 " Optimized BLAS libraries */ /* By Kazushige Goto */ /* */ /* Copyright (c) The University of Texas, 2009. All rights reserved. */ /* UNIVERSITY EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES CONCERNING */ /* THIS SOFTWARE AND DOCUMENTATION, INCLUDING ANY WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE, */ /* NON-INFRINGEMENT AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY */ /* THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF */ /* TRADE. NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO */ /* THE USE OF THE SOFTWARE OR DOCUMENTATION. */ /* Under no circumstances shall University be liable for incidental, */ /* special, indirect, direct or consequential damages or loss of */ /* profits, interruption of business, or related expenses which may */ /* arise from use of Software or Documentation, including but not */ /* limited to those resulting from defects in Software and/or */ /* Documentation, or loss or inaccuracy of data of any kind. */ /*********************************************************************/ #include #include ""common.h"" #ifndef SMP #define blas_cpu_number 1 #else int blas_cpu_number = 1; int blas_get_cpu_number(void){ return blas_cpu_number; } #endif #define FIXED_PAGESIZE 4096 void *sa = NULL; void *sb = NULL; static double static_buffer[BUFFER_SIZE/sizeof(double)]; void *blas_memory_alloc(int numproc){ if (sa == NULL){ #if 1 sa = (void *)qalloc(QFAST, BUFFER_SIZE); #else sa = (void *)malloc(BUFFER_SIZE); #endif sb = (void *)&static_buffer[0]; } return sa; } void blas_memory_free(void *free_area){ return; } ",0 "enerated by javadoc (version 1.7.0_45) on Fri Dec 04 23:17:14 GMT 2015 --> Uses of Class org.apache.solr.update.processor.ParseBooleanFieldUpdateProcessorFactory (Solr 5.4.0 API)
              • Prev
              • Next

              Uses of Class
              org.apache.solr.update.processor.ParseBooleanFieldUpdateProcessorFactory

              No usage of org.apache.solr.update.processor.ParseBooleanFieldUpdateProcessorFactory
              • Prev
              • Next

              Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.

              ",0 "enerated by javadoc (version 1.7.0_75) on Sat May 16 22:22:30 CEST 2015 --> StreamMessage.Type
              org.apache.cassandra.streaming.messages

              Enum StreamMessage.Type

              • java.lang.Object
                • java.lang.Enum<StreamMessage.Type>
                  • org.apache.cassandra.streaming.messages.StreamMessage.Type
                • Method Detail

                  • values

                    public static StreamMessage.Type[] values()
                    Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
                    for (StreamMessage.Type c : StreamMessage.Type.values())
                        System.out.println(c);
                    
                    Returns:
                    an array containing the constants of this enum type, in the order they are declared
                  • valueOf

                    public static StreamMessage.Type valueOf(java.lang.String name)
                    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
                    Parameters:
                    name - the name of the enum constant to be returned.
                    Returns:
                    the enum constant with the specified name
                    Throws:
                    java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
                    java.lang.NullPointerException - if the argument is null
              ",0 ".Logger.model.files.LogFile; public class FileAppender extends BaseAppender { private File file; public FileAppender(Layout layout) { super(layout); this.setFile(new LogFile()); } public void setFile(File file) { this.file = file; } @Override public void append(String message) { this.file.write(message); } @Override public String toString() { return String.format(""%s, File size: %d"", super.toString(), this.file.getSize()); } } ",0 " * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ #pragma once #include #include #include #include namespace Aws { namespace Connect { namespace Model { /** */ class AWS_CONNECT_API UpdateUserHierarchyRequest : public ConnectRequest { public: UpdateUserHierarchyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return ""UpdateUserHierarchy""; } Aws::String SerializePayload() const override; /** *

              The identifier of the hierarchy group.

              */ inline const Aws::String& GetHierarchyGroupId() const{ return m_hierarchyGroupId; } /** *

              The identifier of the hierarchy group.

              */ inline bool HierarchyGroupIdHasBeenSet() const { return m_hierarchyGroupIdHasBeenSet; } /** *

              The identifier of the hierarchy group.

              */ inline void SetHierarchyGroupId(const Aws::String& value) { m_hierarchyGroupIdHasBeenSet = true; m_hierarchyGroupId = value; } /** *

              The identifier of the hierarchy group.

              */ inline void SetHierarchyGroupId(Aws::String&& value) { m_hierarchyGroupIdHasBeenSet = true; m_hierarchyGroupId = std::move(value); } /** *

              The identifier of the hierarchy group.

              */ inline void SetHierarchyGroupId(const char* value) { m_hierarchyGroupIdHasBeenSet = true; m_hierarchyGroupId.assign(value); } /** *

              The identifier of the hierarchy group.

              */ inline UpdateUserHierarchyRequest& WithHierarchyGroupId(const Aws::String& value) { SetHierarchyGroupId(value); return *this;} /** *

              The identifier of the hierarchy group.

              */ inline UpdateUserHierarchyRequest& WithHierarchyGroupId(Aws::String&& value) { SetHierarchyGroupId(std::move(value)); return *this;} /** *

              The identifier of the hierarchy group.

              */ inline UpdateUserHierarchyRequest& WithHierarchyGroupId(const char* value) { SetHierarchyGroupId(value); return *this;} /** *

              The identifier of the user account.

              */ inline const Aws::String& GetUserId() const{ return m_userId; } /** *

              The identifier of the user account.

              */ inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; } /** *

              The identifier of the user account.

              */ inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; } /** *

              The identifier of the user account.

              */ inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); } /** *

              The identifier of the user account.

              */ inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); } /** *

              The identifier of the user account.

              */ inline UpdateUserHierarchyRequest& WithUserId(const Aws::String& value) { SetUserId(value); return *this;} /** *

              The identifier of the user account.

              */ inline UpdateUserHierarchyRequest& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;} /** *

              The identifier of the user account.

              */ inline UpdateUserHierarchyRequest& WithUserId(const char* value) { SetUserId(value); return *this;} /** *

              The identifier of the Amazon Connect instance.

              */ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

              The identifier of the Amazon Connect instance.

              */ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

              The identifier of the Amazon Connect instance.

              */ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

              The identifier of the Amazon Connect instance.

              */ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

              The identifier of the Amazon Connect instance.

              */ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

              The identifier of the Amazon Connect instance.

              */ inline UpdateUserHierarchyRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

              The identifier of the Amazon Connect instance.

              */ inline UpdateUserHierarchyRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

              The identifier of the Amazon Connect instance.

              */ inline UpdateUserHierarchyRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} private: Aws::String m_hierarchyGroupId; bool m_hierarchyGroupIdHasBeenSet; Aws::String m_userId; bool m_userIdHasBeenSet; Aws::String m_instanceId; bool m_instanceIdHasBeenSet; }; } // namespace Model } // namespace Connect } // namespace Aws ",0 " dependent initialization code for the Freescale * 523x CPUs. * * Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com) * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com) */ /***************************************************************************/ #include #include #include #include #include #include #include #include /***************************************************************************/ struct mcf_gpio_chip mcf_gpio_chips[] = { MCFGPS(PIRQ, 1, 7, MCFEPORT_EPDDR, MCFEPORT_EPDR, MCFEPORT_EPPDR), MCFGPF(ADDR, 13, 3), MCFGPF(DATAH, 16, 8), MCFGPF(DATAL, 24, 8), MCFGPF(BUSCTL, 32, 8), MCFGPF(BS, 40, 4), MCFGPF(CS, 49, 7), MCFGPF(SDRAM, 56, 6), MCFGPF(FECI2C, 64, 4), MCFGPF(UARTH, 72, 2), MCFGPF(UARTL, 80, 8), MCFGPF(QSPI, 88, 5), MCFGPF(TIMER, 96, 8), MCFGPF(ETPU, 104, 3), }; unsigned int mcf_gpio_chips_size = ARRAY_SIZE(mcf_gpio_chips); /***************************************************************************/ #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) static void __init m523x_qspi_init(void) { u16 par; /* setup QSPS pins for QSPI with gpio CS control */ writeb(0x1f, MCFGPIO_PAR_QSPI); /* and CS2 & CS3 as gpio */ par = readw(MCFGPIO_PAR_TIMER); par &= 0x3f3f; writew(par, MCFGPIO_PAR_TIMER); } #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ /***************************************************************************/ static void __init m523x_fec_init(void) { u16 par; u8 v; /* Set multi-function pins to ethernet use */ par = readw(MCF_IPSBAR + 0x100082); writew(par | 0xf00, MCF_IPSBAR + 0x100082); v = readb(MCF_IPSBAR + 0x100078); writeb(v | 0xc0, MCF_IPSBAR + 0x100078); } /***************************************************************************/ void __init config_BSP(char *commandp, int size) { mach_sched_init = hw_timer_init; m523x_fec_init(); #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) m523x_qspi_init(); #endif } /***************************************************************************/ ",0 "ext/html; charset=utf-8""> amCharts Data Loader Example
              ",0 " Width
              column
              ",0 "ble of USB keyboard control blocks */ struct usbkbd usbkbds[NUSBKBD]; /** USB device driver structure for the usbkbd driver */ static struct usb_device_driver usbkbd_driver = { .name = ""USB keyboard driver (HID boot protocol)"", .bind_device = usbKbdBindDevice, .unbind_device = usbKbdUnbindDevice, }; /** * Initializes the specified USB keyboard. * * This actually only prepares the corresponding keyboard structure for use and * does not depend on a physical keyboard being attached. The physical keyboard * is recognized only when it is attached, and any read requests to the device * will block until that point. */ devcall usbKbdInit(device *devptr) { usb_status_t status; struct usbkbd *kbd; kbd = &usbkbds[devptr->minor]; /* Already initialized? */ if (kbd->initialized) { goto err; } /* Initialize input queue. */ kbd->isema = semcreate(0); if (SYSERR == kbd->isema) { goto err; } /* Allocate USB transfer request for keyboard data. */ kbd->intr = usb_alloc_xfer_request(8); if (NULL == kbd->intr) { goto err_semfree; } kbd->initialized = TRUE; /* Register the keyboard USB device driver with the USB subsystem. * (no-op if already registered). */ status = usb_register_device_driver(&usbkbd_driver); if (status != USB_STATUS_SUCCESS) { goto err_free_req; } return OK; err_free_req: kbd->initialized = FALSE; usb_free_xfer_request(kbd->intr); err_semfree: semfree(kbd->isema); err: return SYSERR; } ",0 "sole\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Drupal\Console\Command\ContainerAwareCommand; class RebuildCommand extends ContainerAwareCommand { protected function configure() { $this ->setName('router:rebuild') ->setDescription($this->trans('commands.router.rebuild.description')); } protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln(''); $output->writeln('[+] '.$this->trans('commands.router.rebuild.messages.rebuilding').''); $container = $this->getContainer(); $router_builder = $container->get('router.builder'); $router_builder->rebuild(); $output->writeln('[+] '.$this->trans('commands.router.rebuild.messages.completed').''); } } ",0 "e Ushahidi\Koauth * @copyright Ushahidi - http://www.ushahidi.com * @license MIT License http://opensource.org/licenses/MIT */ abstract class Koauth_Controller_OAuth extends Controller { protected $_oauth2_server; protected $_skip_oauth_response = FALSE; /** * @var array Map of HTTP methods -> actions */ protected $_action_map = array ( Http_Request::POST => 'post', // Typically Create.. Http_Request::GET => 'get', Http_Request::PUT => 'put', // Typically Update.. Http_Request::DELETE => 'delete', ); public function before() { parent::before(); // Get the basic verb based action.. $action = $this->_action_map[$this->request->method()]; // If this is a custom action, lets make sure we use it. if ($this->request->action() != '_none') { $action .= '_'.$this->request->action(); } // Override the action $this->request->action($action); // Set up OAuth2 objects $this->_oauth2_server = new Koauth_OAuth2_Server(); } public function after() { if (! $this->_skip_oauth_response) { $this->_oauth2_server->processResponse($this->response); } } /** * Authorize Requests */ public function action_get_authorize() { if (! ($params = $this->_oauth2_server->validateAuthorizeRequest(Koauth_OAuth2_Request::createFromRequest($this->request), new OAuth2_Response())) ) { return; } // Show authorize yes/no $this->_skip_oauth_response = TRUE; $view = View::factory('oauth/authorize'); $view->scopes = explode(',', $params['scope']); $view->params = $params; $this->response->body($view->render()); } /** * Authorize Requests */ public function action_post_authorize() { $authorized = (bool) $this->request->post('authorize'); $this->_oauth2_server->handleAuthorizeRequest(Koauth_OAuth2_Request::createFromRequest($this->request), new OAuth2_Response(), $authorized); } /** * Token Requests */ public function action_get_token() { $this->_oauth2_server->handleTokenRequest(Koauth_OAuth2_Request::createFromRequest($this->request), new OAuth2_Response()); } /** * Token Requests */ public function action_post_token() { $this->_oauth2_server->handleTokenRequest(Koauth_OAuth2_Request::createFromRequest($this->request), new OAuth2_Response()); } } ",0 "ity->configs->get_value('aiowps_enable_rename_login_page') == '1') { add_action( 'widgets_init', array(&$this, 'remove_standard_wp_meta_widget' )); add_filter( 'retrieve_password_message', array(&$this, 'decode_reset_pw_msg'), 10, 4); //Fix for non decoded html entities in password reset link } add_action('admin_notices', array(&$this,'reapply_htaccess_rules_notice')); if(isset($_REQUEST['aiowps_reapply_htaccess'])){ if(strip_tags($_REQUEST['aiowps_reapply_htaccess']) == 1){ include_once ('wp-security-installer.php'); if(AIOWPSecurity_Installer::reactivation_tasks()){ echo '

              The AIOWPS .htaccess rules were successfully re-inserted.

              '; }else{ echo '

              AIOWPS encountered an error when trying to write to your .htaccess file. Please check the logs.

              '; } }elseif(strip_tags($_REQUEST['aiowps_reapply_htaccess']) == 2){ //Don't re-write the rules and just delete the temp config item delete_option('aiowps_temp_configs'); } } if($aio_wp_security->configs->get_value('aiowps_prevent_site_display_inside_frame') == '1'){ send_frame_options_header(); //send X-Frame-Options: SAMEORIGIN in HTTP header } if($aio_wp_security->configs->get_value('aiowps_remove_wp_generator_meta_info') == '1'){ add_filter('the_generator', array(&$this,'remove_wp_generator_meta_info')); } //For the cookie based brute force prevention feature if($aio_wp_security->configs->get_value('aiowps_enable_brute_force_attack_prevention') == 1){ $bfcf_secret_word = $aio_wp_security->configs->get_value('aiowps_brute_force_secret_word'); if(isset($_GET[$bfcf_secret_word])){ //If URL contains secret word in query param then set cookie and then redirect to the login page AIOWPSecurity_Utility::set_cookie_value($bfcf_secret_word, ""1""); AIOWPSecurity_Utility::redirect_to_url(AIOWPSEC_WP_URL.""/wp-admin""); } } //For user unlock request feature if(isset($_POST['aiowps_unlock_request']) || isset($_POST['aiowps_wp_submit_unlock_request'])){ nocache_headers(); remove_action('wp_head','head_addons',7); include_once(AIO_WP_SECURITY_PATH.'/other-includes/wp-security-unlock-request.php'); exit(); } if(isset($_GET['aiowps_auth_key'])){ //If URL contains unlock key in query param then process the request $unlock_key = strip_tags($_GET['aiowps_auth_key']); AIOWPSecurity_User_Login::process_unlock_request($unlock_key); } //For honeypot feature if(isset($_POST['aio_special_field'])){ $special_field_value = strip_tags($_POST['aio_special_field']); if(!empty($special_field_value)){ //This means a robot has submitted the login form! //Redirect back to its localhost AIOWPSecurity_Utility::redirect_to_url('http://127.0.0.1'); } } //For 404 IP lockout feature if($aio_wp_security->configs->get_value('aiowps_enable_404_IP_lockout') == '1'){ if (!is_user_logged_in() || !current_user_can('administrator')) { $this->do_404_lockout_tasks(); } } //For login captcha feature if($aio_wp_security->configs->get_value('aiowps_enable_login_captcha') == '1'){ if (!is_user_logged_in()) { add_action('login_form', array(&$this, 'insert_captcha_question_form')); } } //For custom login form captcha feature, ie, when wp_login_form() function is used to generate login form if($aio_wp_security->configs->get_value('aiowps_enable_custom_login_captcha') == '1'){ if (!is_user_logged_in()) { add_filter( 'login_form_middle', array(&$this, 'insert_captcha_custom_login'), 10, 2); //For cases where the WP wp_login_form() function is used } } //For honeypot feature if($aio_wp_security->configs->get_value('aiowps_enable_login_honeypot') == '1'){ if (!is_user_logged_in()) { add_action('login_form', array(&$this, 'insert_honeypot_hidden_field')); } } //For lost password captcha feature if($aio_wp_security->configs->get_value('aiowps_enable_lost_password_captcha') == '1'){ if (!is_user_logged_in()) { add_action('lostpassword_form', array(&$this, 'insert_captcha_question_form')); add_action('lostpassword_post', array(&$this, 'process_lost_password_form_post')); } } //For registration page captcha feature if (AIOWPSecurity_Utility::is_multisite_install()){ $blog_id = get_current_blog_id(); switch_to_blog($blog_id); if($aio_wp_security->configs->get_value('aiowps_enable_registration_page_captcha') == '1'){ if (!is_user_logged_in()) { add_action('signup_extra_fields', array(&$this, 'insert_captcha_question_form_multi')); //add_action('preprocess_signup_form', array(&$this, 'process_signup_form_multi')); add_filter( 'wpmu_validate_user_signup', array(&$this, 'process_signup_form_multi') ); } } restore_current_blog(); }else{ if($aio_wp_security->configs->get_value('aiowps_enable_registration_page_captcha') == '1'){ if (!is_user_logged_in()) { add_action('register_form', array(&$this, 'insert_captcha_question_form')); } } } //For comment captcha feature if (AIOWPSecurity_Utility::is_multisite_install()){ $blog_id = get_current_blog_id(); switch_to_blog($blog_id); if($aio_wp_security->configs->get_value('aiowps_enable_comment_captcha') == '1'){ add_action( 'comment_form_after_fields', array(&$this, 'insert_captcha_question_form'), 1 ); add_action( 'comment_form_logged_in_after', array(&$this, 'insert_captcha_question_form'), 1 ); add_filter( 'preprocess_comment', array(&$this, 'process_comment_post') ); } restore_current_blog(); }else{ if($aio_wp_security->configs->get_value('aiowps_enable_comment_captcha') == '1'){ add_action( 'comment_form_after_fields', array(&$this, 'insert_captcha_question_form'), 1 ); add_action( 'comment_form_logged_in_after', array(&$this, 'insert_captcha_question_form'), 1 ); add_filter( 'preprocess_comment', array(&$this, 'process_comment_post') ); } } //For buddypress registration captcha feature if($aio_wp_security->configs->get_value('aiowps_enable_bp_register_captcha') == '1'){ add_action('bp_account_details_fields', array(&$this, 'insert_captcha_question_form')); add_action('bp_signup_validate', array(&$this, 'buddy_press_signup_validate_captcha')); } //For feature which displays logged in users $this->update_logged_in_user_transient(); //For block fake googlebots feature if($aio_wp_security->configs->get_value('aiowps_block_fake_googlebots') == '1'){ include_once(AIO_WP_SECURITY_PATH.'/classes/wp-security-bot-protection.php'); AIOWPSecurity_Fake_Bot_Protection::block_fake_googlebots(); } //For 404 event logging if($aio_wp_security->configs->get_value('aiowps_enable_404_logging') == '1'){ add_action('wp_head', array(&$this, 'check_404_event')); } //Add more tasks that need to be executed at init time } function remove_standard_wp_meta_widget() { unregister_widget('WP_Widget_Meta'); } function remove_wp_generator_meta_info() { return ''; } function do_404_lockout_tasks(){ global $aio_wp_security; $redirect_url = $aio_wp_security->configs->get_value('aiowps_404_lock_redirect_url'); //This is the redirect URL for blocked users $visitor_ip = AIOWPSecurity_Utility_IP::get_user_ip_address(); $is_locked = AIOWPSecurity_Utility::check_locked_ip($visitor_ip); if($is_locked){ //redirect blocked user to configured URL AIOWPSecurity_Utility::redirect_to_url($redirect_url); }else{ //allow through } } function update_logged_in_user_transient(){ if(is_user_logged_in()){ $current_user_ip = AIOWPSecurity_Utility_IP::get_user_ip_address(); // get the logged in users list from transients entry $logged_in_users = (AIOWPSecurity_Utility::is_multisite_install() ? get_site_transient('users_online') : get_transient('users_online')); $current_user = wp_get_current_user(); $current_user = $current_user->ID; $current_time = current_time('timestamp'); $current_user_info = array(""user_id"" => $current_user, ""last_activity"" => $current_time, ""ip_address"" => $current_user_ip); //We will store last activity time and ip address in transient entry if($logged_in_users === false || $logged_in_users == NULL){ $logged_in_users = array(); $logged_in_users[] = $current_user_info; AIOWPSecurity_Utility::is_multisite_install() ? set_site_transient('users_online', $logged_in_users, 30 * 60) : set_transient('users_online', $logged_in_users, 30 * 60); } else { $key = 0; $do_nothing = false; $update_existing = false; $item_index = 0; foreach ($logged_in_users as $value) { if($value['user_id'] == $current_user && strcmp($value['ip_address'], $current_user_ip) == 0) { if ($value['last_activity'] < ($current_time - (15 * 60))) { $update_existing = true; $item_index = $key; break; }else{ $do_nothing = true; break; } } $key++; } if($update_existing) { //Update transient if the last activity was less than 15 min ago for this user $logged_in_users[$item_index] = $current_user_info; AIOWPSecurity_Utility::is_multisite_install() ? set_site_transient('users_online', $logged_in_users, 30 * 60) : set_transient('users_online', $logged_in_users, 30 * 60); }else if($do_nothing){ //Do nothing }else{ $logged_in_users[] = $current_user_info; AIOWPSecurity_Utility::is_multisite_install() ? set_site_transient('users_online', $logged_in_users, 30 * 60) : set_transient('users_online', $logged_in_users, 30 * 60); } } } } function insert_captcha_custom_login($cust_html_code, $args) { global $aio_wp_security; $cap_form = '

              '; $cap_form .= '

              '; $maths_question_output = $aio_wp_security->captcha_obj->generate_maths_question(); $cap_form .= $maths_question_output . '

              '; $cust_html_code .= $cap_form; return $cust_html_code; } function insert_captcha_question_form_multi($error) { global $aio_wp_security; $aio_wp_security->captcha_obj->display_captcha_form(); } function process_signup_form_multi($result) { global $aio_wp_security; //Check if captcha enabled if (array_key_exists('aiowps-captcha-answer', $_POST)) //If the register form with captcha was submitted then do some processing { isset($_POST['aiowps-captcha-answer'])?$captcha_answer = strip_tags(trim($_POST['aiowps-captcha-answer'])): $captcha_answer = ''; $captcha_secret_string = $aio_wp_security->configs->get_value('aiowps_captcha_secret_key'); $submitted_encoded_string = base64_encode($_POST['aiowps-captcha-temp-string'].$captcha_secret_string.$captcha_answer); if($submitted_encoded_string !== $_POST['aiowps-captcha-string-info']) { //This means a wrong answer was entered $result['errors']->add('generic', __('ERROR: Your answer was incorrect - please try again.', 'aiowpsecurity')); } } return $result; } function insert_captcha_question_form(){ global $aio_wp_security; $aio_wp_security->captcha_obj->display_captcha_form(); } function insert_honeypot_hidden_field(){ $honey_input = '

              '; $honey_input .= '

              '; echo $honey_input; } function process_comment_post( $comment ) { global $aio_wp_security; if (is_user_logged_in()) { return $comment; } //Don't process captcha for comment replies inside admin menu if (isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'replyto-comment' && (check_ajax_referer('replyto-comment', '_ajax_nonce', false) || check_ajax_referer('replyto-comment', '_ajax_nonce-replyto-comment', false))) { return $comment; } //Don't do captcha for pingback/trackback if ($comment['comment_type'] != '' && $comment['comment_type'] != 'comment') { return $comment; } if (isset($_REQUEST['aiowps-captcha-answer'])) { // If answer is empty if ($_REQUEST['aiowps-captcha-answer'] == ''){ wp_die( __('Please enter an answer in the CAPTCHA field.', 'aiowpsecurity' ) ); } $captcha_answer = trim($_REQUEST['aiowps-captcha-answer']); $captcha_secret_string = $aio_wp_security->configs->get_value('aiowps_captcha_secret_key'); $submitted_encoded_string = base64_encode($_POST['aiowps-captcha-temp-string'].$captcha_secret_string.$captcha_answer); if ($_REQUEST['aiowps-captcha-string-info'] === $submitted_encoded_string){ //Correct answer given return($comment); }else{ //Wrong answer wp_die( __('Error: You entered an incorrect CAPTCHA answer. Please go back and try again.', 'aiowpsecurity')); } } } function process_lost_password_form_post() { global $aio_wp_security; //Check if captcha enabled if ($aio_wp_security->configs->get_value('aiowps_enable_lost_password_captcha') == '1') { if (array_key_exists('aiowps-captcha-answer', $_POST)) //If the lost pass form with captcha was submitted then do some processing { isset($_POST['aiowps-captcha-answer'])?($captcha_answer = strip_tags(trim($_POST['aiowps-captcha-answer']))):($captcha_answer = ''); $captcha_secret_string = $aio_wp_security->configs->get_value('aiowps_captcha_secret_key'); $submitted_encoded_string = base64_encode($_POST['aiowps-captcha-temp-string'].$captcha_secret_string.$captcha_answer); if($submitted_encoded_string !== $_POST['aiowps-captcha-string-info']) { add_filter('allow_password_reset', array(&$this, 'add_lostpassword_captcha_error_msg')); } } } } function add_lostpassword_captcha_error_msg() { //Insert an error just before the password reset process kicks in return new WP_Error('aiowps_captcha_error',__('ERROR: Your answer was incorrect - please try again.', 'aiowpsecurity')); } function check_404_event() { if(is_404()){ //This means a 404 event has occurred - let's log it! AIOWPSecurity_Utility::event_logger('404'); } } function buddy_press_signup_validate_captcha($errors) { global $bp, $aio_wp_security; //Check if captcha enabled if (array_key_exists('aiowps-captcha-answer', $_POST)) //If the register form with captcha was submitted then do some processing { isset($_POST['aiowps-captcha-answer'])?$captcha_answer = strip_tags(trim($_POST['aiowps-captcha-answer'])): $captcha_answer = ''; $captcha_secret_string = $aio_wp_security->configs->get_value('aiowps_captcha_secret_key'); $submitted_encoded_string = base64_encode($_POST['aiowps-captcha-temp-string'].$captcha_secret_string.$captcha_answer); if($submitted_encoded_string !== $_POST['aiowps-captcha-string-info']) { //This means a wrong answer was entered $bp->signup->errors['aiowps-captcha-answer'] = __('Your CAPTCHA answer was incorrect - please try again.', 'aiowpsecurity'); } } return; } //Displays a notice message if the plugin was reactivated after being initially deactivated. //Notice message gives users option of re-applying the aiowps rules which were deleted from the .htaccess when deactivation occurred function reapply_htaccess_rules_notice() { if (get_option('aiowps_temp_configs') !== FALSE){ echo '

              Would you like All In One WP Security & Firewall to re-insert the security rules in your .htaccess file which were cleared when you deactivated the plugin?  Yes  No

              '; } } //This is a fix for cases when the password reset URL in the email was not decoding all html entities properly function decode_reset_pw_msg($message, $key, $user_login, $user_data) { global $aio_wp_security; $message = html_entity_decode($message); return $message; } }",0 " {% for item in result_hidden_fields %}{{ item }}{% endfor %} {% block extrastyle %} {{ block.super }} {% if cl.formset %} {% endif %} {% if cl.formset or action_form %} {% endif %} {{ media.css }} {% if not actions_on_top and not actions_on_bottom %} {% endif %} {% endblock %} {% block extrahead %} {{ block.super }} {{ media.js }} {% if action_form %}{% if actions_on_top or actions_on_bottom %} {% endif %}{% endif %} {% endblock %} {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %} {% if not is_popup %} {% block breadcrumbs %}
              {% trans 'Home' %}{{ cl.opts.app_config.verbose_name }} › {{ cl.opts.verbose_name_plural|capfirst }}
              {% endblock %} {% endif %} {% block coltype %}flex{% endblock %} {% block content %}
              {% endblock %} ",0 "{ public static String join(Collection collection) { return join(collection, """"); } public static String join(Collection collection, String separator) { StringBuilder sb = new StringBuilder(); for (Object o : collection) { sb.append(separator).append(o.toString()); } return sb.substring(separator.length()); } public static List filter(List items, Predicate predicate) { List result = new ArrayList(); for (T item : items) { if (predicate.evaluate(item)) { result.add(item); } } return result; } public static boolean exists(List items, Predicate predicate) { for (T item : items) { if (predicate.evaluate(item)) { return true; } } return false; } public static S reduce(List items, FoldFunction foldFunction) { Iterator iterator = items.iterator(); S first = iterator.next(); return reduce(iterator, first, foldFunction); } public static T reduce(List items, T initial, FoldFunction foldFunction) { return reduce(items.iterator(), initial, foldFunction); } private static T reduce(Iterator items, T initial, FoldFunction foldFunction) { T result = initial; while (items.hasNext()) { result = foldFunction.execute(result, items.next()); } return result; } } ",0 "nsulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe@yahoo.com. Development teams from Power Dominion Enterprise, Precieux Consulting. Project sponsored by GoldSax Foundation, GoldSax Group and executed by GoldSax Manager.*/ $stream = file_get_contents('HITEJINROLAST.txt'); $avgp = ""21500.00""; $high = ""21750.00""; $low = ""21250.00""; echo ""&L="".$stream.""&N=HITEJINRO&""; $temp = file_get_contents(""HITEJINROTEMP.txt"", ""r""); if ($stream != $temp ) { $mhigh = ($avgp + $high)/2; $mlow = ($avgp + $low)/2; $llow = ($low - (($avgp - $low)/2)); $hhigh = ($high + (($high - $avgp)/2)); $diff = $stream - $temp; $diff = number_format($diff, 2, '.', ''); $avgp = number_format($avgp, 2, '.', ''); if ( $stream > $temp ) { if ( ($stream > $mhigh ) && ($stream < $high)) { echo ""&sign=au"" ; } if ( ($stream < $mlow ) && ($stream > $low)) { echo ""&sign=ad"" ; } if ( $stream < $llow ) { echo ""&sign=as"" ; } if ( $stream > $hhigh ) { echo ""&sign=al"" ; } if ( ($stream < $hhigh) && ($stream > $high)) { echo ""&sign=auu"" ; } if ( ($stream > $llow) && ($stream < $low)) { echo ""&sign=add"" ; } //else { echo ""&sign=a"" ; } $filedish = fopen(""C:\wamp\www\malert.txt"", ""a+""); $write = fputs($filedish, ""HITEJINRO:"".$stream. "":Moving up:"".$diff."":"".$high."":"".$low."":"".$avgp.""\r\n""); fclose( $filedish );} if ( $stream < $temp ) { if ( ($stream >$mhigh) && ($stream < $high)) { echo ""&sign=bu"" ; } if ( ($stream < $mlow) && ($stream > $low)) { echo ""&sign=bd"" ; } if ( $stream < $llow ) { echo ""&sign=bs"" ; } if ( $stream > $hhigh ) { echo ""&sign=bl"" ; } if ( ($stream < $hhigh) && ($stream > $high)) { echo ""&sign=buu"" ; } if ( ($stream > $llow) && ($stream < $low)) { echo ""&sign=bdd"" ; } // else { echo ""&sign=b"" ; } $filedish = fopen(""C:\wamp\www\malert.txt"", ""a+""); $write = fputs($filedish, ""HITEJINRO:"".$stream. "":Moving down:"".$diff."":"".$high."":"".$low."":"".$avgp.""\r\n""); fclose( $filedish );} $my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filename= 'HITEJINRO.txt'; $file = fopen($filename, ""a+"" ); fwrite( $file, $stream."":"".$time.""\r\n"" ); fclose( $file ); if (($stream > $mhigh ) && ($temp<= $mhigh )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"".$stream. "":Approaching:PHIGH:"".$high."":Buy Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream < $mhigh ) && ($temp>= $mhigh )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"". $stream."":Moving Down:PHIGH:"".$high."":short Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream > $mlow ) && ($temp<= $mlow )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"".$stream. "":Moving Up:PLOW:"".$low."":Buy Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream < $mlow ) && ($temp>= $mlow )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"". $stream."":Approaching:PLOW:"".$low."":short Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream > $high ) && ($temp<= $high )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"".$stream. "":Breaking:PHIGH:"".$high."":Buy Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream > $hhigh ) && ($temp<= $hhigh )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"".$stream. "":Moving Beyond:PHIGH:"".$high."":Buy Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream < $hhigh ) && ($temp>= $hhigh )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"". $stream. "":Coming near:PHIGH:"".$high."":Buy Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream < $high ) && ($temp>= $high )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"". $stream. "":Retracing:PHIGH:"".$high.""\r\n""); fclose( $filedash ); } if (($stream < $llow ) && ($temp>= $llow )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"". $stream."":Breaking Beyond:PLOW:"".$low."":short Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream < $low ) && ($temp>= $low )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"". $stream."":Breaking:PLOW:"".$low."":short Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream > $llow ) && ($temp<= $llow )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"". $stream."":Coming near:PLOW:"".$low."":short Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream > $low ) && ($temp<= $low )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"". $stream."":Retracing:PLOW:"".$low.""\r\n""); fclose( $filedash ); } if (($stream > $avgp ) && ($temp<= $avgp )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($stream - $low) * (200000/$stream); $risk = (int)$risk; $avgp = number_format($avgp, 2, '.', ''); $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"".$stream. "":Sliding up:PAVG:"".$avgp."":Buy Cost:"".$risk.""\r\n""); fclose( $filedash ); } if (($stream < $avgp ) && ($temp>= $avgp )) {$my_time = date('h:i:s',time()); $seconds2add = 19800; $new_time= strtotime($my_time); $new_time+=$seconds2add; $risk = ($high - $stream) * (200000/$stream); $risk = (int)$risk; $avgp = number_format($avgp, 2, '.', ''); $time = date('h:i:s',$new_time); $filedash = fopen(""C:\wamp\www\alert.txt"", ""a+""); $wrote = fputs($filedash, ""HITEJINRO:"".$stream. "":Sliding down:PAVG:"".$avgp."":Short Cost:"".$risk.""\r\n""); fclose( $filedash ); } } $filedash = fopen(""HITEJINROTEMP.txt"", ""w""); $wrote = fputs($filedash, $stream); fclose( $filedash ); //echo ""&chg="".$json_output['cp'].""&""; ?> /*email to provide support at vancekingsaxbe@powerdominionenterprise.com, businessaffairs@powerdominionenterprise.com, For donations please write to fundraising@powerdominionenterprise.com*/",0 ".OrionService; public class ArraySortService extends OrionService { public static synchronized void sort(byte[] array) { Arrays.sort(array); } public static synchronized void sort(short[] array) { Arrays.sort(array); } public static synchronized void sort(int[] array) { Arrays.sort(array); } public static synchronized void sort(long[] array) { Arrays.sort(array); } public static synchronized void sort(float[] array) { Arrays.sort(array); } public static synchronized void sort(double[] array) { Arrays.sort(array); } public static synchronized void sort(char[] array) { Arrays.sort(array); } public static synchronized void sort(T[] array) { Arrays.sort(array); } public static synchronized void sort(T[] array, Comparator comparator) { Arrays.sort(array, comparator); } }",0 "ge WooCommerce/API * @since 2.6.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * WC_REST_Exception class. */ class WC_REST_Exception extends Exception { /** * Sanitized error code. * * @var string */ protected $error_code; /** * Error extra data. * * @var array */ protected $error_data; /** * Setup exception. * * @param string $code Machine-readable error code, e.g `woocommerce_invalid_product_id`. * @param string $message User-friendly translated error message, e.g. 'Product ID is invalid'. * @param int $http_status_code Proper HTTP status code to respond with, e.g. 400. * @param array $data Extra error data. */ public function __construct( $code, $message, $http_status_code = 400, $data = array() ) { $this->error_code = $code; $this->error_data = array_merge( array( 'status' => $http_status_code ), $data ); parent::__construct( $message, $http_status_code ); } /** * Returns the error code. * * @return string */ public function getErrorCode() { return $this->error_code; } /** * Returns error data. * * @return array */ public function getErrorData() { return $this->error_data; } } ",0 "mf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.InternalEList; import orgomg.cwm.analysis.olap.HierarchyLevelAssociation; import orgomg.cwm.analysis.olap.LevelBasedHierarchy; import orgomg.cwm.analysis.olap.OlapPackage; /** * * An implementation of the model object 'Level Based Hierarchy'. * *

              * The following features are implemented: *

                *
              • {@link orgomg.cwm.analysis.olap.impl.LevelBasedHierarchyImpl#getHierarchyLevelAssociation Hierarchy Level Association}
              • *
              *

              * * @generated */ public class LevelBasedHierarchyImpl extends HierarchyImpl implements LevelBasedHierarchy { /** * The cached value of the '{@link #getHierarchyLevelAssociation() Hierarchy Level Association}' containment reference list. * * * @see #getHierarchyLevelAssociation() * @generated * @ordered */ protected EList hierarchyLevelAssociation; /** * * * @generated */ protected LevelBasedHierarchyImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return OlapPackage.Literals.LEVEL_BASED_HIERARCHY; } /** * * * @generated */ public EList getHierarchyLevelAssociation() { if (hierarchyLevelAssociation == null) { hierarchyLevelAssociation = new EObjectContainmentWithInverseEList(HierarchyLevelAssociation.class, this, OlapPackage.LEVEL_BASED_HIERARCHY__HIERARCHY_LEVEL_ASSOCIATION, OlapPackage.HIERARCHY_LEVEL_ASSOCIATION__LEVEL_BASED_HIERARCHY); } return hierarchyLevelAssociation; } /** * * * @generated */ @SuppressWarnings(""unchecked"") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case OlapPackage.LEVEL_BASED_HIERARCHY__HIERARCHY_LEVEL_ASSOCIATION: return ((InternalEList)(InternalEList)getHierarchyLevelAssociation()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case OlapPackage.LEVEL_BASED_HIERARCHY__HIERARCHY_LEVEL_ASSOCIATION: return ((InternalEList)getHierarchyLevelAssociation()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case OlapPackage.LEVEL_BASED_HIERARCHY__HIERARCHY_LEVEL_ASSOCIATION: return getHierarchyLevelAssociation(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings(""unchecked"") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case OlapPackage.LEVEL_BASED_HIERARCHY__HIERARCHY_LEVEL_ASSOCIATION: getHierarchyLevelAssociation().clear(); getHierarchyLevelAssociation().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case OlapPackage.LEVEL_BASED_HIERARCHY__HIERARCHY_LEVEL_ASSOCIATION: getHierarchyLevelAssociation().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case OlapPackage.LEVEL_BASED_HIERARCHY__HIERARCHY_LEVEL_ASSOCIATION: return hierarchyLevelAssociation != null && !hierarchyLevelAssociation.isEmpty(); } return super.eIsSet(featureID); } } //LevelBasedHierarchyImpl ",0 "the explicit permission of the original author, Alan Cox. * */ /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/v4l/videodev.h,v 1.8 2001/03/03 22:46:31 tsi Exp $ */ #include ""Xmd.h"" #define VID_TYPE_CAPTURE 1 /* Can capture */ #define VID_TYPE_TUNER 2 /* Can tune */ #define VID_TYPE_TELETEXT 4 /* Does teletext */ #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ #define VID_TYPE_CLIPPING 32 /* Can clip */ #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ #define VID_TYPE_SCALES 128 /* Scalable */ #define VID_TYPE_MONOCHROME 256 /* Monochrome only */ #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ struct video_capability { char name[32]; int type; int channels; /* Num channels */ int audios; /* Num audio devices */ int maxwidth; /* Supported width */ int maxheight; /* And height */ int minwidth; /* Supported width */ int minheight; /* And height */ }; struct video_channel { int channel; char name[32]; int tuners; CARD32 flags; #define VIDEO_VC_TUNER 1 /* Channel has a tuner */ #define VIDEO_VC_AUDIO 2 /* Channel has audio */ CARD16 type; #define VIDEO_TYPE_TV 1 #define VIDEO_TYPE_CAMERA 2 CARD16 norm; /* Norm set by channel */ }; struct video_tuner { int tuner; char name[32]; unsigned long rangelow, rangehigh; /* Tuner range */ CARD32 flags; #define VIDEO_TUNER_PAL 1 #define VIDEO_TUNER_NTSC 2 #define VIDEO_TUNER_SECAM 4 #define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */ #define VIDEO_TUNER_NORM 16 /* Tuner can set norm */ #define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */ CARD16 mode; /* PAL/NTSC/SECAM/OTHER */ #define VIDEO_MODE_PAL 0 #define VIDEO_MODE_NTSC 1 #define VIDEO_MODE_SECAM 2 #define VIDEO_MODE_AUTO 3 CARD16 signal; /* Signal strength 16bit scale */ }; struct video_picture { CARD16 brightness; CARD16 hue; CARD16 colour; CARD16 contrast; CARD16 whiteness; /* Black and white only */ CARD16 depth; /* Capture depth */ CARD16 palette; /* Palette in use */ #define VIDEO_PALETTE_GREY 1 /* Linear greyscale */ #define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */ #define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */ #define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */ #define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */ #define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */ #define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */ #define VIDEO_PALETTE_YUYV 8 #define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */ #define VIDEO_PALETTE_YUV420 10 #define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */ #define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */ #define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */ #define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */ #define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */ #define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */ #define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */ #define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */ }; struct video_audio { int audio; /* Audio channel */ CARD16 volume; /* If settable */ CARD16 bass, treble; CARD32 flags; #define VIDEO_AUDIO_MUTE 1 #define VIDEO_AUDIO_MUTABLE 2 #define VIDEO_AUDIO_VOLUME 4 #define VIDEO_AUDIO_BASS 8 #define VIDEO_AUDIO_TREBLE 16 char name[16]; #define VIDEO_SOUND_MONO 1 #define VIDEO_SOUND_STEREO 2 #define VIDEO_SOUND_LANG1 4 #define VIDEO_SOUND_LANG2 8 CARD16 mode; CARD16 balance; /* Stereo balance */ CARD16 step; /* Step actual volume uses */ }; struct video_clip { INT32 x,y; INT32 width, height; struct video_clip *next; /* For user use/driver use only */ }; struct video_window { CARD32 x,y; /* Position of window */ CARD32 width,height; /* Its size */ CARD32 chromakey; CARD32 flags; struct video_clip *clips; /* Set only */ int clipcount; #define VIDEO_WINDOW_INTERLACE 1 #define VIDEO_CLIP_BITMAP -1 /* bitmap is 1024x625, a '1' bit represents a clipped pixel */ #define VIDEO_CLIPMAP_SIZE (128 * 625) }; struct video_capture { CARD32 x,y; /* Offsets into image */ CARD32 width, height; /* Area to capture */ CARD16 decimation; /* Decimation divder */ CARD16 flags; /* Flags for capture */ #define VIDEO_CAPTURE_ODD 0 /* Temporal */ #define VIDEO_CAPTURE_EVEN 1 }; struct video_buffer { void *base; int height,width; int depth; int bytesperline; }; struct video_mmap { unsigned int frame; /* Frame (0 - n) for double buffer */ int height,width; unsigned int format; /* should be VIDEO_PALETTE_* */ }; struct video_key { CARD8 key[8]; CARD32 flags; }; #define VIDEO_MAX_FRAME 32 struct video_mbuf { int size; /* Total memory to map */ int frames; /* Frames */ int offsets[VIDEO_MAX_FRAME]; }; #define VIDEO_NO_UNIT (-1) struct video_unit { int video; /* Video minor */ int vbi; /* VBI minor */ int radio; /* Radio minor */ int audio; /* Audio minor */ int teletext; /* Teletext minor */ }; #define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */ #define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */ #define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */ #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */ #define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */ #define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */ #define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */ #define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */ #define VIDIOCGWIN _IOR('v',9, struct video_window) /* Set the video overlay window */ #define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */ #define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */ #define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */ #define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */ #define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */ #define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */ #define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */ #define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */ #define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */ #define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */ #define VIDIOCGMBUF _IOR('v', 20, struct video_mbuf) /* Memory map buffer info */ #define VIDIOCGUNIT _IOR('v', 21, struct video_unit) /* Get attached units */ #define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get frame buffer */ #define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set frame buffer - root only */ #define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */ #define VID_HARDWARE_BT848 1 #define VID_HARDWARE_QCAM_BW 2 #define VID_HARDWARE_PMS 3 #define VID_HARDWARE_QCAM_C 4 #define VID_HARDWARE_PSEUDO 5 #define VID_HARDWARE_SAA5249 6 #define VID_HARDWARE_AZTECH 7 #define VID_HARDWARE_SF16MI 8 #define VID_HARDWARE_RTRACK 9 #define VID_HARDWARE_ZOLTRIX 10 #define VID_HARDWARE_SAA7146 11 #define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */ #define VID_HARDWARE_RTRACK2 13 #define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */ #define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */ #define VID_HARDWARE_PLANB 16 /* PowerMac motherboard video-in */ #define VID_HARDWARE_BROADWAY 17 /* Broadway project */ #define VID_HARDWARE_GEMTEK 18 #define VID_HARDWARE_TYPHOON 19 #define VID_HARDWARE_VINO 20 /* Reserved for SGI Indy Vino */ /* * Initialiser list */ struct video_init { char *name; int (*init)(struct video_init *); }; #endif ",0 "*/ static enum IdType { DB(1), DW(2), DD(4), LABEL(0); private int size; private IdType(int i) { size = i; } /** * Возвращает тип идентификатора в байтах(для DB,DW,DD) * * @return Тип идентификатора */ int getSize() { return size; } } /** * Добавляет в таблицу новый элемент. Если элемент существует - записывает * строчку как ошибочную. * * @param item Новый элемент */ void add(TableItem item) { if (isExist(item.getName())) { ErrorList.AddError(); } else { super.add(item); } } private static IdTable instance = null; private IdTable() { } /** * Возвращает единственный экземпляр таблицы идентификаторов * * @return Таблица идентификаторов */ static IdTable getInstance() { if (instance == null) { instance = new IdTable(); } return instance; } /** * Элемент таблицы идентификаторов */ static class IdInfo implements TableItem { private final String name; private final String segment; private final int address; private final IdType type; /** * Конструктор элемента таблицы идентификаторов * * @param name Имя нового элемента * @param type Тип нового элемента */ public IdInfo(String name, IdType type) { this.name = name; this.segment = SegTable.getInstance().getCurrentSegment(); this.address = SegTable.getInstance().getCurrentAddress(); this.type = type; } /** * Возвращает тип идентификатора * * @return Тип идентификатора */ public IdType getType() { return type; } /** * Возвращает смещение элемента * * @return Смещение элемента */ public int getAddress() { return address; } /** * Возвращает сегмент в котором объявлен элемент * * @return Сегмент элемента */ public String getSegment() { return segment; } /** * Возвращает имя элемента * * @return Имя элемента */ @Override public String getName() { return name; } /** * Преобразовывает элемент в удобный для чтения вид * * @return Строка для печати */ @Override public String toString() { return String.format(""%1$-8s %2$-8s %3$s:%4$s\n"", name, type.toString(), segment, IOLib.toHex(address, 4)); } } /** * Возвращает таблицу идентификторов в удобном для чтения виде * * @return Строка для печати */ @Override public String toString() { StringBuilder outStr; outStr = new StringBuilder(""Ім'я Тип Адреса\n""); for (TableItem tableItem : list) { outStr = outStr.append(tableItem.toString()); } return outStr.toString(); } } ",0 "id.os.Bundle; import android.support.v4.app.ActivityOptionsCompat; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.support.v4.util.Pair; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.sunnyface.popularmovies.databinding.ActivityMainBinding; import com.sunnyface.popularmovies.libs.Constants; import com.sunnyface.popularmovies.models.Movie; /** * Root Activity. * Loads */ public class MainActivity extends AppCompatActivity implements MainActivityFragment.Callback { private boolean isTableLayout; private FragmentManager fragmentManager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main); Toolbar toolbar = binding.actionBar.toolbar; setSupportActionBar(toolbar); fragmentManager = getSupportFragmentManager(); isTableLayout = binding.movieDetailContainer != null; } @Override public void onItemSelected(Movie movie, View view) { if (isTableLayout) { Bundle args = new Bundle(); args.putBoolean(""isTabletLayout"", true); args.putParcelable(""movie"", movie); DetailFragment fragment = new DetailFragment(); fragment.setArguments(args); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); fragmentTransaction.replace(R.id.movie_detail_container, fragment, Constants.MOVIE_DETAIL_FRAGMENT_TAG); //Replace its key. fragmentTransaction.commit(); } else { Intent intent = new Intent(this, DetailActivity.class); intent.putExtra(""movie"", movie); String movieID = """" + movie.getId(); Log.i(""movieID: "", movieID); // Doing some view transitions with style, // But, we must check if we're running on Android 5.0 or higher to work. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { //KK Bind this to remove findViewByID?????? ImageView thumbnailImageView = (ImageView) view.findViewById(R.id.thumbnail); TextView titleTextView = (TextView) view.findViewById(R.id.title); Pair transition_a = Pair.create((View) thumbnailImageView, ""movie_cover""); Pair transition_b = Pair.create((View) titleTextView, ""movie_title""); ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, transition_a, transition_b); startActivity(intent, options.toBundle()); } else { startActivity(intent); } } } } ",0 "ibute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * */ package br.edu.ufcg.lsd.commune.functionaltests.data.remoteparameters; import br.edu.ufcg.lsd.commune.api.Remote; @Remote public interface MyInterface6 { void myMethod6(MyRemoteParameter2 parameter); } ",0 "t java.util.UUID; public class JoinGameResponse { @JsonProperty @NotNull private UUID gameId; @JsonProperty @NotNull private UUID playerId; @JsonProperty @NotNull private UUID token; public JoinGameResponse() { } public JoinGameResponse(UUID gameId, UUID playerId, UUID token) { this.gameId = gameId; this.playerId = playerId; this.token = token; } public UUID getGameId() { return gameId; } public void setGameId(UUID gameId) { this.gameId = gameId; } public UUID getToken() { return token; } public void setToken(UUID token) { this.token = token; } public UUID getPlayerId() { return playerId; } public void setPlayerId(UUID playerId) { this.playerId = playerId; } } ",0 " Foundation, Inc. Contributed by Doug Kwan This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ #include ""config.h"" #include ""system.h"" #include ""coretypes.h"" #include ""tm.h"" #include ""toplev.h"" #include ""flags.h"" #include ""hash-set.h"" #include ""machmode.h"" #include ""vec.h"" #include ""double-int.h"" #include ""input.h"" #include ""alias.h"" #include ""symtab.h"" #include ""wide-int.h"" #include ""inchash.h"" #include ""tree.h"" #include ""fold-const.h"" #include ""predict.h"" #include ""hard-reg-set.h"" #include ""input.h"" #include ""function.h"" #include ""basic-block.h"" #include ""tree-ssa-alias.h"" #include ""internal-fn.h"" #include ""gimple-expr.h"" #include ""is-a.h"" #include ""gimple.h"" #include ""bitmap.h"" #include ""diagnostic-core.h"" #include ""hash-map.h"" #include ""plugin-api.h"" #include ""ipa-ref.h"" #include ""cgraph.h"" #include ""tree-streamer.h"" #include ""lto-streamer.h"" #include ""lto-section-names.h"" #include ""streamer-hooks.h"" /* Statistics gathered during LTO, WPA and LTRANS. */ struct lto_stats_d lto_stats; /* LTO uses bitmaps with different life-times. So use a separate obstack for all LTO bitmaps. */ static bitmap_obstack lto_obstack; static bool lto_obstack_initialized; const char *section_name_prefix = LTO_SECTION_NAME_PREFIX; /* Set when streaming LTO for offloading compiler. */ bool lto_stream_offload_p; /* Return a string representing LTO tag TAG. */ const char * lto_tag_name (enum LTO_tags tag) { if (lto_tag_is_tree_code_p (tag)) { /* For tags representing tree nodes, return the name of the associated tree code. */ return get_tree_code_name (lto_tag_to_tree_code (tag)); } if (lto_tag_is_gimple_code_p (tag)) { /* For tags representing gimple statements, return the name of the associated gimple code. */ return gimple_code_name[lto_tag_to_gimple_code (tag)]; } switch (tag) { case LTO_null: return ""LTO_null""; case LTO_bb0: return ""LTO_bb0""; case LTO_bb1: return ""LTO_bb1""; case LTO_eh_region: return ""LTO_eh_region""; case LTO_function: return ""LTO_function""; case LTO_eh_table: return ""LTO_eh_table""; case LTO_ert_cleanup: return ""LTO_ert_cleanup""; case LTO_ert_try: return ""LTO_ert_try""; case LTO_ert_allowed_exceptions: return ""LTO_ert_allowed_exceptions""; case LTO_ert_must_not_throw: return ""LTO_ert_must_not_throw""; case LTO_tree_pickle_reference: return ""LTO_tree_pickle_reference""; case LTO_field_decl_ref: return ""LTO_field_decl_ref""; case LTO_function_decl_ref: return ""LTO_function_decl_ref""; case LTO_label_decl_ref: return ""LTO_label_decl_ref""; case LTO_namespace_decl_ref: return ""LTO_namespace_decl_ref""; case LTO_result_decl_ref: return ""LTO_result_decl_ref""; case LTO_ssa_name_ref: return ""LTO_ssa_name_ref""; case LTO_type_decl_ref: return ""LTO_type_decl_ref""; case LTO_type_ref: return ""LTO_type_ref""; case LTO_global_decl_ref: return ""LTO_global_decl_ref""; default: return ""LTO_UNKNOWN""; } } /* Allocate a bitmap from heap. Initializes the LTO obstack if necessary. */ bitmap lto_bitmap_alloc (void) { if (!lto_obstack_initialized) { bitmap_obstack_initialize (<o_obstack); lto_obstack_initialized = true; } return BITMAP_ALLOC (<o_obstack); } /* Free bitmap B. */ void lto_bitmap_free (bitmap b) { BITMAP_FREE (b); } /* Get a section name for a particular type or name. The NAME field is only used if SECTION_TYPE is LTO_section_function_body. For all others it is ignored. The callee of this function is responsible to free the returned name. */ char * lto_get_section_name (int section_type, const char *name, struct lto_file_decl_data *f) { const char *add; char post[32]; const char *sep; if (section_type == LTO_section_function_body) { gcc_assert (name != NULL); if (name[0] == '*') name++; add = name; sep = """"; } else if (section_type < LTO_N_SECTION_TYPES) { add = lto_section_name[section_type]; sep = "".""; } else internal_error (""bytecode stream: unexpected LTO section %s"", name); /* Make the section name unique so that ld -r combining sections doesn't confuse the reader with merged sections. For options don't add a ID, the option reader cannot deal with them and merging should be ok here. */ if (section_type == LTO_section_opts) strcpy (post, """"); else if (f != NULL) sprintf (post, ""."" HOST_WIDE_INT_PRINT_HEX_PURE, f->id); else sprintf (post, ""."" HOST_WIDE_INT_PRINT_HEX_PURE, get_random_seed (false)); return concat (section_name_prefix, sep, add, post, NULL); } /* Show various memory usage statistics related to LTO. */ void print_lto_report (const char *s) { unsigned i; fprintf (stderr, ""[%s] # of input files: "" HOST_WIDE_INT_PRINT_UNSIGNED ""\n"", s, lto_stats.num_input_files); fprintf (stderr, ""[%s] # of input cgraph nodes: "" HOST_WIDE_INT_PRINT_UNSIGNED ""\n"", s, lto_stats.num_input_cgraph_nodes); fprintf (stderr, ""[%s] # of function bodies: "" HOST_WIDE_INT_PRINT_UNSIGNED ""\n"", s, lto_stats.num_function_bodies); for (i = 0; i < NUM_TREE_CODES; i++) if (lto_stats.num_trees[i]) fprintf (stderr, ""[%s] # of '%s' objects read: "" HOST_WIDE_INT_PRINT_UNSIGNED ""\n"", s, get_tree_code_name ((enum tree_code) i), lto_stats.num_trees[i]); if (flag_lto) { fprintf (stderr, ""[%s] Compression: "" HOST_WIDE_INT_PRINT_UNSIGNED "" output bytes, "" HOST_WIDE_INT_PRINT_UNSIGNED "" compressed bytes"", s, lto_stats.num_output_il_bytes, lto_stats.num_compressed_il_bytes); if (lto_stats.num_output_il_bytes > 0) { const float dividend = (float) lto_stats.num_compressed_il_bytes; const float divisor = (float) lto_stats.num_output_il_bytes; fprintf (stderr, "" (ratio: %f)"", dividend / divisor); } fprintf (stderr, ""\n""); } if (flag_wpa) { fprintf (stderr, ""[%s] # of output files: "" HOST_WIDE_INT_PRINT_UNSIGNED ""\n"", s, lto_stats.num_output_files); fprintf (stderr, ""[%s] # of output symtab nodes: "" HOST_WIDE_INT_PRINT_UNSIGNED ""\n"", s, lto_stats.num_output_symtab_nodes); fprintf (stderr, ""[%s] # of output tree pickle references: "" HOST_WIDE_INT_PRINT_UNSIGNED ""\n"", s, lto_stats.num_pickle_refs_output); fprintf (stderr, ""[%s] # of output tree bodies: "" HOST_WIDE_INT_PRINT_UNSIGNED ""\n"", s, lto_stats.num_tree_bodies_output); fprintf (stderr, ""[%s] # callgraph partitions: "" HOST_WIDE_INT_PRINT_UNSIGNED ""\n"", s, lto_stats.num_cgraph_partitions); fprintf (stderr, ""[%s] Compression: "" HOST_WIDE_INT_PRINT_UNSIGNED "" input bytes, "" HOST_WIDE_INT_PRINT_UNSIGNED "" uncompressed bytes"", s, lto_stats.num_input_il_bytes, lto_stats.num_uncompressed_il_bytes); if (lto_stats.num_input_il_bytes > 0) { const float dividend = (float) lto_stats.num_uncompressed_il_bytes; const float divisor = (float) lto_stats.num_input_il_bytes; fprintf (stderr, "" (ratio: %f)"", dividend / divisor); } fprintf (stderr, ""\n""); } for (i = 0; i < LTO_N_SECTION_TYPES; i++) fprintf (stderr, ""[%s] Size of mmap'd section %s: "" HOST_WIDE_INT_PRINT_UNSIGNED "" bytes\n"", s, lto_section_name[i], lto_stats.section_size[i]); } #ifdef LTO_STREAMER_DEBUG struct tree_hash_entry { tree key; intptr_t value; }; struct tree_entry_hasher : typed_noop_remove { typedef tree_hash_entry value_type; typedef tree_hash_entry compare_type; static inline hashval_t hash (const value_type *); static inline bool equal (const value_type *, const compare_type *); }; inline hashval_t tree_entry_hasher::hash (const value_type *e) { return htab_hash_pointer (e->key); } inline bool tree_entry_hasher::equal (const value_type *e1, const compare_type *e2) { return (e1->key == e2->key); } static hash_table *tree_htab; #endif /* Initialization common to the LTO reader and writer. */ void lto_streamer_init (void) { /* Check that all the TS_* handled by the reader and writer routines match exactly the structures defined in treestruct.def. When a new TS_* astructure is added, the streamer should be updated to handle it. */ streamer_check_handled_ts_structures (); #ifdef LTO_STREAMER_DEBUG tree_htab = new hash_table (31); #endif } /* Gate function for all LTO streaming passes. */ bool gate_lto_out (void) { return ((flag_generate_lto || flag_generate_offload || in_lto_p) /* Don't bother doing anything if the program has errors. */ && !seen_error ()); } #ifdef LTO_STREAMER_DEBUG /* Add a mapping between T and ORIG_T, which is the numeric value of the original address of T as it was seen by the LTO writer. This mapping is useful when debugging streaming problems. A debugging session can be started on both reader and writer using ORIG_T as a breakpoint value in both sessions. Note that this mapping is transient and only valid while T is being reconstructed. Once T is fully built, the mapping is removed. */ void lto_orig_address_map (tree t, intptr_t orig_t) { struct tree_hash_entry ent; struct tree_hash_entry **slot; ent.key = t; ent.value = orig_t; slot = tree_htab->find_slot (&ent, INSERT); gcc_assert (!*slot); *slot = XNEW (struct tree_hash_entry); **slot = ent; } /* Get the original address of T as it was seen by the writer. This is only valid while T is being reconstructed. */ intptr_t lto_orig_address_get (tree t) { struct tree_hash_entry ent; struct tree_hash_entry **slot; ent.key = t; slot = tree_htab->find_slot (&ent, NO_INSERT); return (slot ? (*slot)->value : 0); } /* Clear the mapping of T to its original address. */ void lto_orig_address_remove (tree t) { struct tree_hash_entry ent; struct tree_hash_entry **slot; ent.key = t; slot = tree_htab->find_slot (&ent, NO_INSERT); gcc_assert (slot); free (*slot); tree_htab->clear_slot (slot); } #endif /* Check that the version MAJOR.MINOR is the correct version number. */ void lto_check_version (int major, int minor) { if (major != LTO_major_version || minor != LTO_minor_version) fatal_error (""bytecode stream generated with LTO version %d.%d instead "" ""of the expected %d.%d"", major, minor, LTO_major_version, LTO_minor_version); } /* Initialize all the streamer hooks used for streaming GIMPLE. */ void lto_streamer_hooks_init (void) { streamer_hooks_init (); streamer_hooks.write_tree = lto_output_tree; streamer_hooks.read_tree = lto_input_tree; streamer_hooks.input_location = lto_input_location; streamer_hooks.output_location = lto_output_location; } ",0 " # //# Copyright (C) <2015> # //# # //# This program is free software: you can redistribute it and/or modify # //# it under the terms of the GNU Affero General Public License as # //# published by the Free Software Foundation, either version 3 of the # //# License, or (at your option) any later version. # //# # //# This program is distributed in the hope that it will be useful, # //# but WITHOUT ANY WARRANTY; without even the implied warranty of # //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # //# GNU Affero General Public License for more details. # //# # //# You should have received a copy of the GNU Affero General Public License # //# along with this program. If not, see . # //# # //# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of # //# this program. Users of this software do so entirely at their own risk. # //# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time # //# software that it builds, deploys and maintains. # //# # //############################################################################# //#EOH // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814) // Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved. // WARNING: DO NOT MODIFY the content of this file package ims.core.forms.vitalsignstprbp; import ims.framework.delegates.*; abstract public class Handlers implements ims.framework.UILogic, IFormUILogicCode { abstract protected void onFormOpen() throws ims.framework.exceptions.PresentationLogicException; abstract protected void onChkLegendValueChanged() throws ims.framework.exceptions.PresentationLogicException; abstract protected void onBtnViewClick() throws ims.framework.exceptions.PresentationLogicException; abstract protected void onRadioButtongrpShowByValueChanged() throws ims.framework.exceptions.PresentationLogicException; abstract protected void onBtnPrintClick() throws ims.framework.exceptions.PresentationLogicException; public final void setContext(ims.framework.UIEngine engine, GenForm form) { this.engine = engine; this.form = form; this.form.setFormOpenEvent(new FormOpen() { private static final long serialVersionUID = 1L; public void handle(Object[] args) throws ims.framework.exceptions.PresentationLogicException { onFormOpen(); } }); this.form.chkLegend().setValueChangedEvent(new ValueChanged() { private static final long serialVersionUID = 1L; public void handle() throws ims.framework.exceptions.PresentationLogicException { onChkLegendValueChanged(); } }); this.form.btnView().setClickEvent(new Click() { private static final long serialVersionUID = 1L; public void handle() throws ims.framework.exceptions.PresentationLogicException { onBtnViewClick(); } }); this.form.grpShowBy().setValueChangedEvent(new ValueChanged() { private static final long serialVersionUID = 1L; public void handle() throws ims.framework.exceptions.PresentationLogicException { onRadioButtongrpShowByValueChanged(); } }); this.form.btnPrint().setClickEvent(new Click() { private static final long serialVersionUID = 1L; public void handle() throws ims.framework.exceptions.PresentationLogicException { onBtnPrintClick(); } }); } public void free() { this.engine = null; this.form = null; } protected ims.framework.UIEngine engine; protected GenForm form; } ",0 "ved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @org.osgi.annotation.versioning.Version(""1.0.16"") package com.ibm.ws.security.wim.registry.dataobject; ",0 " by javadoc (build 1.6.0_29) on Sat Mar 17 18:04:28 MSK 2012 --> UnsupportedVariantTypeException (POI API Documentation)
              Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
               PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
              SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

              org.apache.poi.hpsf
              Class UnsupportedVariantTypeException

              java.lang.Object
                java.lang.Throwable
                    java.lang.Exception
                        org.apache.poi.hpsf.HPSFException
                            org.apache.poi.hpsf.VariantTypeException
                                org.apache.poi.hpsf.UnsupportedVariantTypeException
              
              All Implemented Interfaces:
              java.io.Serializable
              Direct Known Subclasses:
              ReadingNotSupportedException, WritingNotSupportedException

              public abstract class UnsupportedVariantTypeException
              extends VariantTypeException

              This exception is thrown if HPSF encounters a variant type that isn't supported yet. Although a variant type is unsupported the value can still be retrieved using the VariantTypeException.getValue() method.

              Obviously this class should disappear some day.

              Author:
              Rainer Klute <klute@rainer-klute.de>
              See Also:
              Serialized Form

              Constructor Summary
              UnsupportedVariantTypeException(long variantType, java.lang.Object value)
                        Constructor.
               
              Method Summary
               
              Methods inherited from class org.apache.poi.hpsf.VariantTypeException
              getValue, getVariantType
               
              Methods inherited from class org.apache.poi.hpsf.HPSFException
              getReason
               
              Methods inherited from class java.lang.Throwable
              fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
               
              Methods inherited from class java.lang.Object
              clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
               

              Constructor Detail

              UnsupportedVariantTypeException

              public UnsupportedVariantTypeException(long variantType,
                                                     java.lang.Object value)

              Constructor.

              Parameters:
              variantType - The unsupported variant type
              value - The value who's variant type is not yet supported

              Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
               PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
              SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

              Copyright 2012 The Apache Software Foundation or its licensors, as applicable. ",0 "enerated by javadoc (version 1.7.0_75) on Sun Feb 01 19:31:04 CET 2015 --> G-Index
              A C D G I P S T 

              G

              getAllUsers() - Static method in class scorer.DBManager
              Gets all users.
              getGame() - Method in class scorer.Score
               
              getName() - Method in class scorer.ScorerUser
               
              getScore() - Method in class scorer.Score
               
              getUserByName(String) - Static method in class scorer.DBManager
              Gets a user.
              getUsersByGame(String) - Static method in class scorer.DBManager
              Gets all users that play a game.
              A C D G I P S T 
              ",0 "Bundle\Annotation\Type; use JMS\SerializerBundle\Annotation\Exclude; use JMS\SerializerBundle\Annotation\Groups; use JMS\SerializerBundle\Annotation\Accessor; /** * Terrific\Composition\Entity\Module * * @ORM\Table(name=""module"") * @ORM\Entity(repositoryClass=""Terrific\Composition\Entity\ModuleRepository"") */ class Module { /** * @ORM\Column(name=""id"", type=""integer"") * @ORM\Id * @ORM\GeneratedValue(strategy=""AUTO"") * @Groups({""project_list"", ""project_details"", ""module_list"", ""module_details""}) * @ReadOnly */ private $id; /** * @ORM\Column(name=""in_work"", type=""boolean"") * @Type(""boolean"") * @Groups({""project_list"", ""project_details"", ""module_list"", ""module_details""}) */ private $inWork = false; /** * @ORM\Column(name=""shared"", type=""boolean"") * @Type(""boolean"") * @Groups({""project_list"", ""project_details"", ""module_list"", ""module_details""}) */ private $shared = false; /** * @ORM\Column(name=""title"", type=""string"", length=255) * @Type(""string"") * @Groups({""project_list"", ""project_details"", ""module_list"", ""module_details""}) */ private $title; /** * @ORM\Column(name=""description"", type=""text"") * @Type(""string"") * @Groups({""project_list"", ""project_details"", ""module_list"", ""module_details""}) */ private $description; /** * @ORM\ManyToOne(targetEntity=""Project"") * @Type(""integer"") * @Groups({""module_details""}) */ private $project; /** * @ORM\OneToOne(targetEntity=""Snippet"") * @Type(""Terrific\Composition\Entity\Snippet"") * @Groups({""module_details""}) */ private $markup; /** * @ORM\OneToOne(targetEntity=""Snippet"") * @Type(""Terrific\Composition\Entity\Snippet"") * @Groups({""module_details""}) */ private $style; /** * @ORM\OneToOne(targetEntity=""Snippet"") * @Type(""Terrific\Composition\Entity\Snippet"") * @Groups({""module_details""}) */ private $script; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set title * * @param string $title */ public function setTitle($title) { $this->title = $title; } /** * Get title * * @return string */ public function getTitle() { return $this->title; } /** * Set description * * @param text $description */ public function setDescription($description) { $this->description = $description; } /** * Get description * * @return text */ public function getDescription() { return $this->description; } /** * Set markup * * @param Terrific\Composition\Entity\Snippet $markup */ public function setMarkup(\Terrific\Composition\Entity\Snippet $markup) { $this->markup = $markup; } /** * Get markup * * @return Terrific\Composition\Entity\Snippet */ public function getMarkup() { return $this->markup; } /** * Set style * * @param Terrific\Composition\Entity\Snippet $style */ public function setStyle(\Terrific\Composition\Entity\Snippet $style) { $this->style = $style; } /** * Get style * * @return Terrific\Composition\Entity\Snippet */ public function getStyle() { return $this->style; } /** * Set script * * @param Terrific\Composition\Entity\Snippet $script */ public function setScript(\Terrific\Composition\Entity\Snippet $script) { $this->script = $script; } /** * Get script * * @return Terrific\Composition\Entity\Snippet */ public function getScript() { return $this->script; } /** * Set project * * @param Terrific\Composition\Entity\Project $project * @return Module */ public function setProject(\Terrific\Composition\Entity\Project $project = null) { $this->project = $project; return $this; } /** * Get project * * @return Terrific\Composition\Entity\Project */ public function getProject() { return $this->project; } /** * Set inWork * * @param boolean $inWork * @return Module */ public function setInWork($inWork) { $this->inWork = $inWork; return $this; } /** * Get inWork * * @return boolean */ public function getInWork() { return $this->inWork; } /** * Set shared * * @param boolean $shared * @return Module */ public function setShared($shared) { $this->shared = $shared; return $this; } /** * Get shared * * @return boolean */ public function getShared() { return $this->shared; } }",0 "mber's profile page, * e.g., example.com/user/123. 123 being the users ID. * * Use render($user_profile) to print all profile items, or print a subset * such as render($content['field_example']). Always call render($user_profile) * at the end in order to print all remaining items. If the item is a category, * it will contain all its profile items. By default, $user_profile['summary'] * is provided which contains data on the user's history. Other data can be * included by modules. $user_profile['user_picture'] is available * for showing the account picture. * * Available variables: * - $user_profile: An array of profile items. Use render() to print them. * - Field variables: for each field instance attached to the user a * corresponding variable is defined; e.g., $user->field_example has a * variable $field_example defined. When needing to access a field's raw * values, developers/themers are strongly encouraged to use these * variables. Otherwise they will have to explicitly specify the desired * field language, e.g. $user->field_example['en'], thus overriding any * language negotiation rule that was previously applied. * * @see user-profile-category.tpl.php * Where the html is handled for the group. * @see user-profile-item.tpl.php * Where the html is handled for each item in the group. * @see template_preprocess_user_profile() */ ?>
              >
              ",0 "_VER_MAX 0x0584ffff #define QOS_CONTROL_LEN 2 static const char lbtf_driver_version[] = ""THINFIRM-USB8388-"" DRIVER_RELEASE_VERSION; struct workqueue_struct *lbtf_wq; static const struct ieee80211_channel lbtf_channels[] = { { .center_freq = 2412, .hw_value = 1 }, { .center_freq = 2417, .hw_value = 2 }, { .center_freq = 2422, .hw_value = 3 }, { .center_freq = 2427, .hw_value = 4 }, { .center_freq = 2432, .hw_value = 5 }, { .center_freq = 2437, .hw_value = 6 }, { .center_freq = 2442, .hw_value = 7 }, { .center_freq = 2447, .hw_value = 8 }, { .center_freq = 2452, .hw_value = 9 }, { .center_freq = 2457, .hw_value = 10 }, { .center_freq = 2462, .hw_value = 11 }, { .center_freq = 2467, .hw_value = 12 }, { .center_freq = 2472, .hw_value = 13 }, { .center_freq = 2484, .hw_value = 14 }, }; static const struct ieee80211_rate lbtf_rates[] = { { .bitrate = 10, .hw_value = 0, }, { .bitrate = 20, .hw_value = 1, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, { .bitrate = 55, .hw_value = 2, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, { .bitrate = 110, .hw_value = 3, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, { .bitrate = 60, .hw_value = 5, .flags = 0 }, { .bitrate = 90, .hw_value = 6, .flags = 0 }, { .bitrate = 120, .hw_value = 7, .flags = 0 }, { .bitrate = 180, .hw_value = 8, .flags = 0 }, { .bitrate = 240, .hw_value = 9, .flags = 0 }, { .bitrate = 360, .hw_value = 10, .flags = 0 }, { .bitrate = 480, .hw_value = 11, .flags = 0 }, { .bitrate = 540, .hw_value = 12, .flags = 0 }, }; static void lbtf_cmd_work(struct work_struct *work) { struct lbtf_private *priv = container_of(work, struct lbtf_private, cmd_work); spin_lock_irq(&priv->driver_lock); if (priv->cmd_response_rxed) { priv->cmd_response_rxed = 0; spin_unlock_irq(&priv->driver_lock); lbtf_process_rx_command(priv); spin_lock_irq(&priv->driver_lock); } if (priv->cmd_timed_out && priv->cur_cmd) { struct cmd_ctrl_node *cmdnode = priv->cur_cmd; if (++priv->nr_retries > 10) { lbtf_complete_command(priv, cmdnode, -ETIMEDOUT); priv->nr_retries = 0; } else { priv->cur_cmd = NULL; list_add(&cmdnode->list, &priv->cmdpendingq); } } priv->cmd_timed_out = 0; spin_unlock_irq(&priv->driver_lock); if (!priv->fw_ready) return; if (!priv->cur_cmd) lbtf_execute_next_command(priv); } static int lbtf_setup_firmware(struct lbtf_private *priv) { int ret = -1; memset(priv->current_addr, 0xff, ETH_ALEN); ret = lbtf_update_hw_spec(priv); if (ret) { ret = -1; goto done; } lbtf_set_mac_control(priv); lbtf_set_radio_control(priv); ret = 0; done: return ret; } static void command_timer_fn(unsigned long data) { struct lbtf_private *priv = (struct lbtf_private *)data; unsigned long flags; spin_lock_irqsave(&priv->driver_lock, flags); if (!priv->cur_cmd) { printk(KERN_DEBUG ""libertastf: command timer expired; "" ""no pending command\n""); goto out; } printk(KERN_DEBUG ""libertas: command %x timed out\n"", le16_to_cpu(priv->cur_cmd->cmdbuf->command)); priv->cmd_timed_out = 1; queue_work(lbtf_wq, &priv->cmd_work); out: spin_unlock_irqrestore(&priv->driver_lock, flags); } static int lbtf_init_adapter(struct lbtf_private *priv) { memset(priv->current_addr, 0xff, ETH_ALEN); mutex_init(&priv->lock); priv->vif = NULL; setup_timer(&priv->command_timer, command_timer_fn, (unsigned long)priv); INIT_LIST_HEAD(&priv->cmdfreeq); INIT_LIST_HEAD(&priv->cmdpendingq); spin_lock_init(&priv->driver_lock); if (lbtf_allocate_cmd_buffer(priv)) return -1; return 0; } static void lbtf_free_adapter(struct lbtf_private *priv) { lbtf_free_cmd_buffer(priv); del_timer(&priv->command_timer); } static int lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) { struct lbtf_private *priv = hw->priv; priv->skb_to_tx = skb; queue_work(lbtf_wq, &priv->tx_work); ieee80211_stop_queues(priv->hw); return NETDEV_TX_OK; } static void lbtf_tx_work(struct work_struct *work) { struct lbtf_private *priv = container_of(work, struct lbtf_private, tx_work); unsigned int len; struct ieee80211_tx_info *info; struct txpd *txpd; struct sk_buff *skb = NULL; int err; if ((priv->vif->type == NL80211_IFTYPE_AP) && (!skb_queue_empty(&priv->bc_ps_buf))) skb = skb_dequeue(&priv->bc_ps_buf); else if (priv->skb_to_tx) { skb = priv->skb_to_tx; priv->skb_to_tx = NULL; } else return; len = skb->len; info = IEEE80211_SKB_CB(skb); txpd = (struct txpd *) skb_push(skb, sizeof(struct txpd)); if (priv->surpriseremoved) { dev_kfree_skb_any(skb); return; } memset(txpd, 0, sizeof(struct txpd)); txpd->tx_control |= cpu_to_le32(MRVL_PER_PACKET_RATE | ieee80211_get_tx_rate(priv->hw, info)->hw_value); memcpy(txpd->tx_dest_addr_high, skb->data + sizeof(struct txpd) + 4, ETH_ALEN); txpd->tx_packet_length = cpu_to_le16(len); txpd->tx_packet_location = cpu_to_le32(sizeof(struct txpd)); BUG_ON(priv->tx_skb); spin_lock_irq(&priv->driver_lock); priv->tx_skb = skb; err = priv->hw_host_to_card(priv, MVMS_DAT, skb->data, skb->len); spin_unlock_irq(&priv->driver_lock); if (err) { dev_kfree_skb_any(skb); priv->tx_skb = NULL; } } static int lbtf_op_start(struct ieee80211_hw *hw) { struct lbtf_private *priv = hw->priv; void *card = priv->card; int ret = -1; if (!priv->fw_ready) if (priv->hw_prog_firmware(card)) goto err_prog_firmware; priv->capability = WLAN_CAPABILITY_SHORT_PREAMBLE; priv->radioon = RADIO_ON; priv->mac_control = CMD_ACT_MAC_RX_ON | CMD_ACT_MAC_TX_ON; ret = lbtf_setup_firmware(priv); if (ret) goto err_prog_firmware; if ((priv->fwrelease < LBTF_FW_VER_MIN) || (priv->fwrelease > LBTF_FW_VER_MAX)) { ret = -1; goto err_prog_firmware; } printk(KERN_INFO ""libertastf: Marvell WLAN 802.11 thinfirm adapter\n""); return 0; err_prog_firmware: priv->hw_reset_device(card); return ret; } static void lbtf_op_stop(struct ieee80211_hw *hw) { struct lbtf_private *priv = hw->priv; unsigned long flags; struct sk_buff *skb; struct cmd_ctrl_node *cmdnode; spin_lock_irqsave(&priv->driver_lock, flags); list_for_each_entry(cmdnode, &priv->cmdpendingq, list) { cmdnode->result = -ENOENT; cmdnode->cmdwaitqwoken = 1; wake_up_interruptible(&cmdnode->cmdwait_q); } spin_unlock_irqrestore(&priv->driver_lock, flags); cancel_work_sync(&priv->cmd_work); cancel_work_sync(&priv->tx_work); while ((skb = skb_dequeue(&priv->bc_ps_buf))) dev_kfree_skb_any(skb); priv->radioon = RADIO_OFF; lbtf_set_radio_control(priv); return; } static int lbtf_op_add_interface(struct ieee80211_hw *hw, struct ieee80211_if_init_conf *conf) { struct lbtf_private *priv = hw->priv; if (priv->vif != NULL) return -EOPNOTSUPP; priv->vif = conf->vif; switch (conf->type) { case NL80211_IFTYPE_MESH_POINT: case NL80211_IFTYPE_AP: lbtf_set_mode(priv, LBTF_AP_MODE); break; case NL80211_IFTYPE_STATION: lbtf_set_mode(priv, LBTF_STA_MODE); break; default: priv->vif = NULL; return -EOPNOTSUPP; } lbtf_set_mac_address(priv, (u8 *) conf->mac_addr); return 0; } static void lbtf_op_remove_interface(struct ieee80211_hw *hw, struct ieee80211_if_init_conf *conf) { struct lbtf_private *priv = hw->priv; if (priv->vif->type == NL80211_IFTYPE_AP || priv->vif->type == NL80211_IFTYPE_MESH_POINT) lbtf_beacon_ctrl(priv, 0, 0); lbtf_set_mode(priv, LBTF_PASSIVE_MODE); lbtf_set_bssid(priv, 0, NULL); priv->vif = NULL; } static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed) { struct lbtf_private *priv = hw->priv; struct ieee80211_conf *conf = &hw->conf; if (conf->channel->center_freq != priv->cur_freq) { priv->cur_freq = conf->channel->center_freq; lbtf_set_channel(priv, conf->channel->hw_value); } return 0; } static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, struct dev_addr_list *mclist) { struct lbtf_private *priv = hw->priv; int i; if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE) return mc_count; priv->nr_of_multicastmacaddr = mc_count; for (i = 0; i < mc_count; i++) { if (!mclist) break; memcpy(&priv->multicastlist[i], mclist->da_addr, ETH_ALEN); mclist = mclist->next; } return mc_count; } #define SUPPORTED_FIF_FLAGS (FIF_PROMISC_IN_BSS | FIF_ALLMULTI) static void lbtf_op_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, unsigned int *new_flags, u64 multicast) { struct lbtf_private *priv = hw->priv; int old_mac_control = priv->mac_control; changed_flags &= SUPPORTED_FIF_FLAGS; *new_flags &= SUPPORTED_FIF_FLAGS; if (!changed_flags) return; if (*new_flags & (FIF_PROMISC_IN_BSS)) priv->mac_control |= CMD_ACT_MAC_PROMISCUOUS_ENABLE; else priv->mac_control &= ~CMD_ACT_MAC_PROMISCUOUS_ENABLE; if (*new_flags & (FIF_ALLMULTI) || multicast > MRVDRV_MAX_MULTICAST_LIST_SIZE) { priv->mac_control |= CMD_ACT_MAC_ALL_MULTICAST_ENABLE; priv->mac_control &= ~CMD_ACT_MAC_MULTICAST_ENABLE; } else if (multicast) { priv->mac_control |= CMD_ACT_MAC_MULTICAST_ENABLE; priv->mac_control &= ~CMD_ACT_MAC_ALL_MULTICAST_ENABLE; lbtf_cmd_set_mac_multicast_addr(priv); } else { priv->mac_control &= ~(CMD_ACT_MAC_MULTICAST_ENABLE | CMD_ACT_MAC_ALL_MULTICAST_ENABLE); if (priv->nr_of_multicastmacaddr) { priv->nr_of_multicastmacaddr = 0; lbtf_cmd_set_mac_multicast_addr(priv); } } if (priv->mac_control != old_mac_control) lbtf_set_mac_control(priv); } static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *bss_conf, u32 changes) { struct lbtf_private *priv = hw->priv; struct sk_buff *beacon; if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_INT)) { switch (priv->vif->type) { case NL80211_IFTYPE_AP: case NL80211_IFTYPE_MESH_POINT: beacon = ieee80211_beacon_get(hw, vif); if (beacon) { lbtf_beacon_set(priv, beacon); kfree_skb(beacon); lbtf_beacon_ctrl(priv, 1, bss_conf->beacon_int); } break; default: break; } } if (changes & BSS_CHANGED_BSSID) { bool activate = !is_zero_ether_addr(bss_conf->bssid); lbtf_set_bssid(priv, activate, bss_conf->bssid); } if (changes & BSS_CHANGED_ERP_PREAMBLE) { if (bss_conf->use_short_preamble) priv->preamble = CMD_TYPE_SHORT_PREAMBLE; else priv->preamble = CMD_TYPE_LONG_PREAMBLE; lbtf_set_radio_control(priv); } } static const struct ieee80211_ops lbtf_ops = { .tx = lbtf_op_tx, .start = lbtf_op_start, .stop = lbtf_op_stop, .add_interface = lbtf_op_add_interface, .remove_interface = lbtf_op_remove_interface, .config = lbtf_op_config, .prepare_multicast = lbtf_op_prepare_multicast, .configure_filter = lbtf_op_configure_filter, .bss_info_changed = lbtf_op_bss_info_changed, }; int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb) { struct ieee80211_rx_status stats; struct rxpd *prxpd; int need_padding; unsigned int flags; struct ieee80211_hdr *hdr; prxpd = (struct rxpd *) skb->data; stats.flag = 0; if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) stats.flag |= RX_FLAG_FAILED_FCS_CRC; stats.freq = priv->cur_freq; stats.band = IEEE80211_BAND_2GHZ; stats.signal = prxpd->snr; stats.noise = prxpd->nf; stats.qual = prxpd->snr - prxpd->nf; if (prxpd->rx_rate > 4) --prxpd->rx_rate; stats.rate_idx = prxpd->rx_rate; skb_pull(skb, sizeof(struct rxpd)); hdr = (struct ieee80211_hdr *)skb->data; flags = le32_to_cpu(*(__le32 *)(skb->data + 4)); need_padding = ieee80211_is_data_qos(hdr->frame_control); need_padding ^= ieee80211_has_a4(hdr->frame_control); need_padding ^= ieee80211_is_data_qos(hdr->frame_control) && (*ieee80211_get_qos_ctl(hdr) & IEEE80211_QOS_CONTROL_A_MSDU_PRESENT); if (need_padding) { memmove(skb->data + 2, skb->data, skb->len); skb_reserve(skb, 2); } memcpy(IEEE80211_SKB_RXCB(skb), &stats, sizeof(stats)); ieee80211_rx_irqsafe(priv->hw, skb); return 0; } EXPORT_SYMBOL_GPL(lbtf_rx); struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev) { struct ieee80211_hw *hw; struct lbtf_private *priv = NULL; hw = ieee80211_alloc_hw(sizeof(struct lbtf_private), &lbtf_ops); if (!hw) goto done; priv = hw->priv; if (lbtf_init_adapter(priv)) goto err_init_adapter; priv->hw = hw; priv->card = card; priv->tx_skb = NULL; hw->queues = 1; hw->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING; hw->extra_tx_headroom = sizeof(struct txpd); memcpy(priv->channels, lbtf_channels, sizeof(lbtf_channels)); memcpy(priv->rates, lbtf_rates, sizeof(lbtf_rates)); priv->band.n_bitrates = ARRAY_SIZE(lbtf_rates); priv->band.bitrates = priv->rates; priv->band.n_channels = ARRAY_SIZE(lbtf_channels); priv->band.channels = priv->channels; hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; skb_queue_head_init(&priv->bc_ps_buf); SET_IEEE80211_DEV(hw, dmdev); INIT_WORK(&priv->cmd_work, lbtf_cmd_work); INIT_WORK(&priv->tx_work, lbtf_tx_work); if (ieee80211_register_hw(hw)) goto err_init_adapter; goto done; err_init_adapter: lbtf_free_adapter(priv); ieee80211_free_hw(hw); priv = NULL; done: return priv; } EXPORT_SYMBOL_GPL(lbtf_add_card); int lbtf_remove_card(struct lbtf_private *priv) { struct ieee80211_hw *hw = priv->hw; priv->surpriseremoved = 1; del_timer(&priv->command_timer); lbtf_free_adapter(priv); priv->hw = NULL; ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); return 0; } EXPORT_SYMBOL_GPL(lbtf_remove_card); void lbtf_send_tx_feedback(struct lbtf_private *priv, u8 retrycnt, u8 fail) { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(priv->tx_skb); ieee80211_tx_info_clear_status(info); if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) && !fail) info->flags |= IEEE80211_TX_STAT_ACK; skb_pull(priv->tx_skb, sizeof(struct txpd)); ieee80211_tx_status_irqsafe(priv->hw, priv->tx_skb); priv->tx_skb = NULL; if (!priv->skb_to_tx && skb_queue_empty(&priv->bc_ps_buf)) ieee80211_wake_queues(priv->hw); else queue_work(lbtf_wq, &priv->tx_work); } EXPORT_SYMBOL_GPL(lbtf_send_tx_feedback); void lbtf_bcn_sent(struct lbtf_private *priv) { struct sk_buff *skb = NULL; if (priv->vif->type != NL80211_IFTYPE_AP) return; if (skb_queue_empty(&priv->bc_ps_buf)) { bool tx_buff_bc = 0; while ((skb = ieee80211_get_buffered_bc(priv->hw, priv->vif))) { skb_queue_tail(&priv->bc_ps_buf, skb); tx_buff_bc = 1; } if (tx_buff_bc) { ieee80211_stop_queues(priv->hw); queue_work(lbtf_wq, &priv->tx_work); } } skb = ieee80211_beacon_get(priv->hw, priv->vif); if (skb) { lbtf_beacon_set(priv, skb); kfree_skb(skb); } } EXPORT_SYMBOL_GPL(lbtf_bcn_sent); static int __init lbtf_init_module(void) { lbtf_wq = create_workqueue(""libertastf""); if (lbtf_wq == NULL) { printk(KERN_ERR ""libertastf: couldn't create workqueue\n""); return -ENOMEM; } return 0; } static void __exit lbtf_exit_module(void) { destroy_workqueue(lbtf_wq); } module_init(lbtf_init_module); module_exit(lbtf_exit_module); MODULE_DESCRIPTION(""Libertas WLAN Thinfirm Driver Library""); MODULE_AUTHOR(""Cozybit Inc.""); MODULE_LICENSE(""GPL""); ",0 "Table 2-6. */ #define F_OK 0 /* test if file exists */ #define X_OK 1 /* test if file is executable */ #define W_OK 2 /* test if file is writable */ #define R_OK 4 /* test if file is readable */ /* Values used for whence in lseek(fd, offset, whence). POSIX Table 2-7. */ #define SEEK_SET 0 /* offset is absolute */ #define SEEK_CUR 1 /* offset is relative to current position */ #define SEEK_END 2 /* offset is relative to end of file */ /* This value is required by POSIX Table 2-8. */ #define _POSIX_VERSION 198808L /* which standard is being conformed to */ /* These three definitions are required by POSIX Sec. 8.2.1.2. */ #define STDIN_FILENO 0 /* file descriptor for stdin */ #define STDOUT_FILENO 1 /* file descriptor for stdout */ #define STDERR_FILENO 2 /* file descriptor for stderr */ /* NULL must be defined in according to POSIX Sec. 2.8.1. */ #define NULL ((void *)0) /* The following relate to configurable system variables. POSIX Table 4-2. */ #define _SC_ARG_MAX 1 #define _SC_CHILD_MAX 2 #define _SC_CLOCKS_PER_SEC 3 #define _SC_NGROUPS_MAX 4 #define _SC_OPEN_MAX 5 #define _SC_JOB_CONTROL 6 #define _SC_SAVED_IDS 7 #define _SC_VERSION 8 /* The following relate to configurable pathname variables. POSIX Table 5-2. */ #define _PC_LINK_MAX 1 /* link count */ #define _PC_MAX_CANON 2 /* size of the canonical input queue */ #define _PC_MAX_INPUT 3 /* type-ahead buffer size */ #define _PC_NAME_MAX 4 /* file name size */ #define _PC_PATH_MAX 5 /* pathname size */ #define _PC_PIPE_BUF 6 /* pipe size */ #define _PC_NO_TRUNC 7 /* treatment of long name components */ #define _PC_VDISABLE 8 /* tty disable */ #define _PC_CHOWN_RESTRICTED 9 /* chown restricted or not */ /* POSIX defines several options that may be implemented or not, at the * implementer's whim. This implementer has made the following choices: * * _POSIX_JOB_CONTROL not defined: no job control * _POSIX_SAVED_IDS not defined: no saved uid/gid * _POSIX_NO_TRUNC not defined: long path names are truncated * _POSIX_CHOWN_RESTRICTED defined: you can't give away files * _POSIX_VDISABLE defined: tty functions can be disabled */ #define _POSIX_CHOWN_RESTRICTED #define _POSIX_VDISABLE '\t' /* can't set any control char to tab */ /* Function Prototypes. */ #ifndef _ANSI_H #include #endif _PROTOTYPE( void _exit, (int _status) ); _PROTOTYPE( int access, (char *_path, int _amode) ); _PROTOTYPE( int chdir, (char *_path) ); _PROTOTYPE( int chown, (char *_path, int _owner, int _group) ); _PROTOTYPE( int close, (int _fd) ); _PROTOTYPE( char *ctermid, (char *_s) ); _PROTOTYPE( char *cuserid, (char *_s) ); _PROTOTYPE( int dup, (int _fd) ); _PROTOTYPE( int dup2, (int _fd, int _fd2) ); _PROTOTYPE( int execl, (char *_path, ...) ); _PROTOTYPE( int execle, (char *_path, ...) ); _PROTOTYPE( int execlp, (char *_file, ...) ); _PROTOTYPE( int execv, (char *_path, char *_argv[]) ); _PROTOTYPE( int execve, (char *_path, char *_argv[], char *_envp[]) ); _PROTOTYPE( int execvp, (char *_file, char *_argv[]) ); _PROTOTYPE( pid_t fork, (void) ); _PROTOTYPE( long fpathconf, (int _fd, int _name) ); _PROTOTYPE( char *getcwd, (char *_buf, int _size) ); _PROTOTYPE( gid_t getegid, (void) ); _PROTOTYPE( uid_t geteuid, (void) ); _PROTOTYPE( gid_t getgid, (void) ); _PROTOTYPE( int getgroups, (int _gidsetsize, gid_t _grouplist[]) ); _PROTOTYPE( char *getlogin, (void) ); _PROTOTYPE( pid_t getpgrp, (void) ); _PROTOTYPE( pid_t getpid, (void) ); _PROTOTYPE( pid_t getppid, (void) ); _PROTOTYPE( uid_t getuid, (void) ); _PROTOTYPE( unsigned int alarm, (unsigned int _seconds) ); _PROTOTYPE( unsigned int sleep, (unsigned int _seconds) ); _PROTOTYPE( int isatty, (int _fd) ); _PROTOTYPE( int link, (const char *_path1, const char *_path2) ); _PROTOTYPE( off_t lseek, (int _fd, off_t _offset, int _whence) ); _PROTOTYPE( long pathconf, (char *_path, int _name) ); _PROTOTYPE( int pause, (void) ); _PROTOTYPE( int pipe, (int _fildes[2]) ); _PROTOTYPE( int read, (int _fd, char *_buf, unsigned int _n) ); _PROTOTYPE( int rmdir, (const char *_path) ); _PROTOTYPE( int setgid, (int _gid) ); _PROTOTYPE( int setpgid, (pid_t _pid, pid_t _pgid) ); _PROTOTYPE( pid_t setsid, (void) ); _PROTOTYPE( int setuid, (int _uid) ); _PROTOTYPE( long sysconf, (int _name) ); _PROTOTYPE( pid_t tcgetpgrp, (int _fd) ); _PROTOTYPE( int tcsetpgrp, (int _fd, pid_t _pgrp_id) ); _PROTOTYPE( char *ttyname, (int _fd) ); _PROTOTYPE( int unlink, (const char *_path) ); _PROTOTYPE( int write, (int _fd, char *_buf, unsigned int _n) ); #ifdef _MINIX _PROTOTYPE( char *brk, (char *_addr) ); _PROTOTYPE( int mknod, (const char *_name, int _mode, int _addr) ); _PROTOTYPE( int mknod4, (const char *_name, int _mode, int _addr, unsigned _size) ); _PROTOTYPE( char *mktemp, (char *_template) ); _PROTOTYPE( char *sbrk, (int _incr) ); _PROTOTYPE( int chroot, (const char *_name) ); _PROTOTYPE( int mount, (char *_spec, char *_name, int _flag)); _PROTOTYPE( long ptrace, (int _req, int _pid, long _addr, long _data) ); _PROTOTYPE( int stime, (long *top) ); _PROTOTYPE( int sync, (void) ); _PROTOTYPE( int umount, (const char *_name) ); #endif #endif /* _UNISTD_H */ ",0 "ht (c) 1996-2009, PostgreSQL Global Development Group * * * IDENTIFICATION * $PostgreSQL: pgsql/src/backend/tsearch/dict_ispell.c,v 1.8 2009/01/01 17:23:48 momjian Exp $ * *------------------------------------------------------------------------- */ #include ""postgres.h"" #include ""commands/defrem.h"" #include ""tsearch/dicts/spell.h"" #include ""tsearch/ts_locale.h"" #include ""tsearch/ts_public.h"" #include ""tsearch/ts_utils.h"" #include ""utils/builtins.h"" #include ""utils/memutils.h"" typedef struct { StopList stoplist; IspellDict obj; } DictISpell; Datum dispell_init(PG_FUNCTION_ARGS) { List *dictoptions = (List *) PG_GETARG_POINTER(0); DictISpell *d; bool affloaded = false, dictloaded = false, stoploaded = false; ListCell *l; d = (DictISpell *) palloc0(sizeof(DictISpell)); foreach(l, dictoptions) { DefElem *defel = (DefElem *) lfirst(l); if (pg_strcasecmp(defel->defname, ""DictFile"") == 0) { if (dictloaded) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg(""multiple DictFile parameters""))); NIImportDictionary(&(d->obj), get_tsearch_config_filename(defGetString(defel), ""dict"")); dictloaded = true; } else if (pg_strcasecmp(defel->defname, ""AffFile"") == 0) { if (affloaded) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg(""multiple AffFile parameters""))); NIImportAffixes(&(d->obj), get_tsearch_config_filename(defGetString(defel), ""affix"")); affloaded = true; } else if (pg_strcasecmp(defel->defname, ""StopWords"") == 0) { if (stoploaded) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg(""multiple StopWords parameters""))); readstoplist(defGetString(defel), &(d->stoplist), lowerstr); stoploaded = true; } else { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg(""unrecognized Ispell parameter: \""%s\"""", defel->defname))); } } if (affloaded && dictloaded) { NISortDictionary(&(d->obj)); NISortAffixes(&(d->obj)); } else if (!affloaded) { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg(""missing AffFile parameter""))); } else { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg(""missing DictFile parameter""))); } MemoryContextDeleteChildren(CurrentMemoryContext); PG_RETURN_POINTER(d); } Datum dispell_lexize(PG_FUNCTION_ARGS) { DictISpell *d = (DictISpell *) PG_GETARG_POINTER(0); char *in = (char *) PG_GETARG_POINTER(1); int32 len = PG_GETARG_INT32(2); char *txt; TSLexeme *res; TSLexeme *ptr, *cptr; if (len <= 0) PG_RETURN_POINTER(NULL); txt = lowerstr_with_len(in, len); res = NINormalizeWord(&(d->obj), txt); if (res == NULL) PG_RETURN_POINTER(NULL); ptr = cptr = res; while (ptr->lexeme) { if (searchstoplist(&(d->stoplist), ptr->lexeme)) { pfree(ptr->lexeme); ptr->lexeme = NULL; ptr++; } else { memcpy(cptr, ptr, sizeof(TSLexeme)); cptr++; ptr++; } } cptr->lexeme = NULL; PG_RETURN_POINTER(res); } ",0 "; import net.robobalasko.dfa.core.exceptions.StartNodeMissingException; import javax.swing.*; import javax.swing.border.EmptyBorder; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.text.Document; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class MainFrame extends JFrame { private final Automaton automaton; private JButton checkButton; public MainFrame(final Automaton automaton) throws HeadlessException { super(""DFA Simulator""); this.automaton = automaton; setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); JPanel containerPanel = new JPanel(); containerPanel.setLayout(new BoxLayout(containerPanel, BoxLayout.PAGE_AXIS)); containerPanel.setBorder(new EmptyBorder(20, 20, 20, 20)); setContentPane(containerPanel); CanvasPanel canvasPanel = new CanvasPanel(this, automaton); containerPanel.add(canvasPanel); JPanel checkInputPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); containerPanel.add(checkInputPanel); final JTextField inputText = new JTextField(40); Document document = inputText.getDocument(); document.addDocumentListener(new DocumentListener() { @Override public void insertUpdate(DocumentEvent e) { checkButton.setEnabled(e.getDocument().getLength() > 0); } @Override public void removeUpdate(DocumentEvent e) { checkButton.setEnabled(e.getDocument().getLength() > 0); } @Override public void changedUpdate(DocumentEvent e) { checkButton.setEnabled(e.getDocument().getLength() > 0); } }); checkInputPanel.add(inputText); checkButton = new JButton(""Check""); checkButton.setEnabled(false); checkButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { JOptionPane.showMessageDialog(MainFrame.this, automaton.acceptsString(inputText.getText()) ? ""Input accepted."" : ""Input rejected.""); } catch (StartNodeMissingException ex) { JOptionPane.showMessageDialog(MainFrame.this, ""Missing start node.""); } catch (NodeConnectionMissingException ex) { JOptionPane.showMessageDialog(MainFrame.this, ""Not a good string. Automat doesn't accept it.""); } } }); checkInputPanel.add(checkButton); setResizable(false); setVisible(true); pack(); } } ",0 "g a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * HUBzero is a registered trademark of Purdue University. * * @package hubzero-cms * @author David Benham * @copyright Copyright 2005-2015 HUBzero Foundation, LLC. * @license http://opensource.org/licenses/MIT MIT */ // No direct access defined('_HZEXEC_') or die(); /** * Groups plugin class for Member Options */ class plgGroupsMemberOptions extends \Hubzero\Plugin\Plugin { /** * Affects constructor behavior. If true, language files will be loaded automatically. * * @var boolean */ protected $_autoloadLanguage = true; /** * Return the alias and name for this category of content * * @return array */ public function &onGroupAreas() { $area = array( 'name' => 'memberoptions', 'title' => Lang::txt('GROUP_MEMBEROPTIONS'), 'default_access' => 'registered', 'display_menu_tab' => $this->params->get('display_tab', 0), 'icon' => '2699' ); return $area; } /** * Return data on a group view (this will be some form of HTML) * * @param object $group Current group * @param string $option Name of the component * @param string $authorized User's authorization level * @param integer $limit Number of records to pull * @param integer $limitstart Start of records to pull * @param string $action Action to perform * @param array $access What can be accessed * @param array $areas Active area(s) * @return array */ public function onGroup($group, $option, $authorized, $limit=0, $limitstart=0, $action='', $access, $areas=null) { // The output array we're returning $arr = array( 'html' => '' ); $user = User::getInstance(); $this->group = $group; $this->option = $option; // Things we need from the form $recvEmailOptionID = Request::getInt('memberoptionid', 0); $recvEmailOptionValue = Request::getInt('recvpostemail', 0); include_once(__DIR__ . DS . 'models' . DS . 'memberoption.php'); switch ($action) { case 'editmemberoptions': $arr['html'] .= $this->edit($group, $user, $recvEmailOptionID, $recvEmailOptionValue); break; case 'savememberoptions': $arr['html'] .= $this->save($group, $user, $recvEmailOptionID, $recvEmailOptionValue); break; default: $arr['html'] .= $this->edit($group, $user, $recvEmailOptionID, $recvEmailOptionValue); break; } return $arr; } /** * Edit settings * * @param object $group * @param object $user * @param integer $recvEmailOptionID * @param integer $recvEmailOptionValue * @return string */ protected function edit($group, $user, $recvEmailOptionID, $recvEmailOptionValue) { // Load the options $recvEmailOption = Plugins\Groups\Memberoptions\Models\Memberoption::oneByUserAndOption( $group->get('gidNumber'), $user->get('id'), 'receive-forum-email' ); $view = $this->view('default', 'browse') ->set('recvEmailOptionID', $recvEmailOption->get('id', 0)) ->set('recvEmailOptionValue', $recvEmailOption->get('optionvalue', 0)) ->set('option', $this->option) ->set('group', $this->group); // Return the output return $view->loadTemplate(); } /** * Save settings * * @param object $group * @param object $user * @param integer $recvEmailOptionID * @param integer $recvEmailOptionValue * @return void */ protected function save($group, $user, $recvEmailOptionID, $recvEmailOptionValue) { $postSaveRedirect = Request::getVar('postsaveredirect', ''); // Save the GROUPS_MEMBEROPTION_TYPE_DISCUSSION_NOTIFICIATION setting $row = Plugins\Groups\Memberoptions\Models\Memberoption::blank()->set(array( 'id' => $recvEmailOptionID, 'userid' => $user->get('id'), 'gidNumber' => $group->get('gidNumber'), 'optionname' => 'receive-forum-email', 'optionvalue' => $recvEmailOptionValue )); // Store content if (!$row->save()) { $this->setError($row->getError()); return $this->edit($group, $user, $recvEmailOptionID, $recvEmailOptionValue); } if (Request::getInt('no_html')) { echo json_encode(array('success' => true)); exit(); } if (!$postSaveRedirect) { $postSaveRedirect = Route::url('index.php?option=' . $this->option . '&cn=' . $this->group->get('cn') . '&active=memberoptions&action=edit'); } App::redirect( $postSaveRedirect, Lang::txt('You have successfully updated your email settings') ); } /** * Subscribe a person to emails on enrollment * * @param integer $gidNumber * @param integer $userid * @return void */ public function onGroupUserEnrollment($gidNumber, $userid) { // get group $group = \Hubzero\User\Group::getInstance($gidNumber); // is auto-subscribe on for discussion forum $autosubscribe = $group->get('discussion_email_autosubscribe'); // log variable Log::debug('$discussion_email_autosubscribe' . $autosubscribe); // if were not auto-subscribed then stop if (!$autosubscribe) { return; } include_once(__DIR__ . DS . 'models' . DS . 'memberoption.php'); // see if they've already got something, they shouldn't, but you never know $row = Plugins\Groups\Memberoptions\Models\Memberoption::oneByUserAndOption( $gidNumber, $userid, 'receive-forum-email' ); if ($row->get('id')) { // They already have a record, so ignore. return; } $row->set('gidNumber', $gidNumber); $row->set('userid', $userid); $row->set('optionname', 'receive-forum-email'); $row->set('optionvalue', 1); $row->save(); } } ",0 "r-menu data-bind=""visible: !isInOnboarding()"">

              description:

              pricing:

              How much does the client pay for this ?

              If you check this box, we'll only show this to new clients.

              Enter the number of sessions or appointments included with this .

              Give clients an idea of your regular pricing.

              scheduling info:
              ",0 "-- Generated by javadoc (version 1.7.0_71) on Fri Jul 10 16:43:22 IST 2015 --> Uses of Interface com.ephesoft.gxt.core.shared.dto.propertyAccessors.KVExtractionProperties
              • Prev
              • Next

              Uses of Interface
              com.ephesoft.gxt.core.shared.dto.propertyAccessors.KVExtractionProperties

              • Prev
              • Next
              ",0 "me.core.utils.StringUtils; /** * 分页类 * * @author yufei * @param */ public class Page { private static int BEGIN_PAGE_SIZE = 20; /** 下拉分页列表的递增数量级 */ private static int ADD_PAGE_SIZE_RATIO = 10; public static int DEFAULT_PAGE_SIZE = 10; private static int MAX_PAGE_SIZE = 200; private QueryInfo queryInfo = null; private List queryResult = null; public Page() { this(new QueryInfo()); } public Page(QueryInfo queryInfo) { this.queryInfo = queryInfo; this.queryResult = new ArrayList(15); } /** * @return 下拉分页列表的递增数量级 */ public final static int getAddPageSize() { String addPageSizeRatio = ConfigUtils.getProperty(""add_page_size_ratio""); if (StringUtils.isValid(addPageSizeRatio)) ADD_PAGE_SIZE_RATIO = Integer.parseInt(addPageSizeRatio); return ADD_PAGE_SIZE_RATIO; } /** * @return 默认分页下拉列表的开始值 */ public final static int getBeginPageSize() { String beginPageSize = ConfigUtils.getProperty(""begin_page_size""); if (StringUtils.isValid(beginPageSize)) BEGIN_PAGE_SIZE = Integer.parseInt(beginPageSize); return BEGIN_PAGE_SIZE; } /** * 默认列表记录显示条数 */ public static final int getDefaultPageSize() { String defaultPageSize = ConfigUtils.getProperty(""default_page_size""); if (StringUtils.isValid(defaultPageSize)) DEFAULT_PAGE_SIZE = Integer.parseInt(defaultPageSize); return DEFAULT_PAGE_SIZE; } /** * 默认分页列表显示的最大记录条数 */ public static final int getMaxPageSize() { String maxPageSize = ConfigUtils.getProperty(""max_page_size""); if (StringUtils.isValid(maxPageSize)) { MAX_PAGE_SIZE = Integer.parseInt(maxPageSize); } return MAX_PAGE_SIZE; } public String getBeanName() { return this.queryInfo.getBeanName(); } public int getCurrentPageNo() { return this.queryInfo.getCurrentPageNo(); } public String getKey() { return this.queryInfo.getKey(); } public Integer getNeedRowNum() { return this.getPageSize() - this.getQueryResult().size(); } public long getNextPage() { return this.queryInfo.getNextPage(); } public int getPageCount() { return this.queryInfo.getPageCount(); } public int getPageSize() { return this.queryInfo.getPageSize(); } public List getParams() { return this.queryInfo.getParams(); } public int getPreviousPage() { return this.queryInfo.getPreviousPage(); } public String[] getProperties() { return this.queryInfo.getProperties(); } public List getQueryResult() { return this.queryResult; } public int getRecordCount() { return this.queryInfo.getRecordCount(); } public String getSql() { return this.queryInfo.getSql(); } public boolean isHasResult() { return this.queryResult != null && this.queryResult.size() > 0; } public void setBeanName(String beanNameValue) { this.queryInfo.setBeanName(beanNameValue); } public void setCurrentPageNo(int currentPageNo) { this.queryInfo.setCurrentPageNo(currentPageNo); } public void setKey(String keyValue) { this.queryInfo.setKey(keyValue); } public void setPageCount(int pageCount) { this.queryInfo.setPageCount(pageCount); } public void setPageSize(int pageSize) { this.queryInfo.setPageSize(pageSize); } public void setParams(List paramsValue) { this.queryInfo.setParams(paramsValue); } public void setProperties(String[] propertiesValue) { this.queryInfo.setProperties(propertiesValue); } public void setQueryResult(List list) { this.queryResult = list; } public void setRecordCount(int count) { this.queryInfo.setRecordCount(count); } public void setSql(String sql) { this.queryInfo.setSql(sql); } } ",0 "hould not be modified by hand. */ package com.intel.crtl.GCWA; public final class R { public static final class attr { } public static final class color { public static final int result_color=0x7f070000; } public static final class dimen { public static final int activity_horizontal_margin=0x7f050000; public static final int activity_vertical_margin=0x7f050001; } public static final class drawable { public static final int ic_launcher=0x7f020000; } public static final class id { public static final int action_button=0x7f0a0039; public static final int activity_main=0x7f0a0000; public static final int activity_profile_config=0x7f0a000b; public static final int activity_result=0x7f0a0032; public static final int bucket_size_v=0x7f0a0010; public static final int button_confirm=0x7f0a000c; public static final int button_exe_time=0x7f0a0035; public static final int button_gc=0x7f0a0037; public static final int button_heap=0x7f0a0036; public static final int button_result=0x7f0a000a; public static final int button_set=0x7f0a0004; public static final int button_start=0x7f0a0005; public static final int buttons=0x7f0a0034; public static final int chart=0x7f0a0038; public static final int config_table=0x7f0a000e; public static final int exe_time_v=0x7f0a0031; public static final int execution_time=0x7f0a0009; public static final int lifetime_128_v=0x7f0a002b; public static final int lifetime_16_v=0x7f0a0028; public static final int lifetime_256_v=0x7f0a002c; public static final int lifetime_32_v=0x7f0a0029; public static final int lifetime_512_v=0x7f0a002d; public static final int lifetime_64_v=0x7f0a002a; public static final int lifetime_los_v=0x7f0a002e; public static final int los_dist_byte_v=0x7f0a0021; public static final int los_dist_char_v=0x7f0a0023; public static final int los_dist_desc_byte=0x7f0a0020; public static final int los_dist_desc_char=0x7f0a0022; public static final int los_dist_desc_int=0x7f0a0024; public static final int los_dist_desc_long=0x7f0a0026; public static final int los_dist_int_v=0x7f0a0025; public static final int los_dist_long_v=0x7f0a0027; public static final int los_threshold_v=0x7f0a0011; public static final int profile_list_view=0x7f0a0003; public static final int runtime_info=0x7f0a0008; public static final int scrollView1=0x7f0a000d; public static final int seek_bar=0x7f0a0001; public static final int single_thread=0x7f0a002f; public static final int size_desc_128=0x7f0a0018; public static final int size_desc_16=0x7f0a0012; public static final int size_desc_256=0x7f0a001a; public static final int size_desc_32=0x7f0a0014; public static final int size_desc_512=0x7f0a001c; public static final int size_desc_64=0x7f0a0016; public static final int size_desc_los=0x7f0a001e; public static final int size_dist_128_v=0x7f0a0019; public static final int size_dist_16_v=0x7f0a0013; public static final int size_dist_256_v=0x7f0a001b; public static final int size_dist_32_v=0x7f0a0015; public static final int size_dist_512_v=0x7f0a001d; public static final int size_dist_64_v=0x7f0a0017; public static final int size_dist_los_v=0x7f0a001f; public static final int thread_num=0x7f0a0030; public static final int total_size_v=0x7f0a000f; public static final int vm_type=0x7f0a0033; public static final int workload_result_layout=0x7f0a0007; public static final int workload_setting_layout=0x7f0a0002; public static final int workload_status=0x7f0a0006; } public static final class layout { public static final int activity_main=0x7f030000; public static final int activity_profile_config=0x7f030001; public static final int activity_result=0x7f030002; } public static final class menu { public static final int main=0x7f090000; } public static final class raw { public static final int profile=0x7f040000; } public static final class string { public static final int action_settings=0x7f080000; public static final int app_name=0x7f080001; public static final int bucket_size_default=0x7f080002; public static final int bucket_size_desc=0x7f080003; public static final int button_desc=0x7f080004; public static final int complete_time_desc=0x7f080005; public static final int exe_time_default=0x7f080006; public static final int exe_time_desc=0x7f080007; public static final int execution_time_desc=0x7f080008; public static final int fragment_default=0x7f080009; public static final int fragment_desc=0x7f08000a; public static final int gc_desc=0x7f08000b; public static final int heap_desc=0x7f08000c; public static final int lifetime_128_default=0x7f08000d; public static final int lifetime_16_default=0x7f08000e; public static final int lifetime_256_default=0x7f08000f; public static final int lifetime_32_default=0x7f080010; public static final int lifetime_512_default=0x7f080011; public static final int lifetime_64_default=0x7f080012; public static final int lifetime_desc=0x7f080013; public static final int lifetime_los_default=0x7f080014; public static final int lifetime_smallobject_default=0x7f080015; public static final int los_dist_byte_default=0x7f080016; public static final int los_dist_byte_desc=0x7f080017; public static final int los_dist_char_default=0x7f080018; public static final int los_dist_char_desc=0x7f080019; public static final int los_dist_desc=0x7f08001a; public static final int los_dist_int_default=0x7f08001b; public static final int los_dist_int_desc=0x7f08001c; public static final int los_dist_long_default=0x7f08001d; public static final int los_dist_long_desc=0x7f08001e; public static final int los_threshold_default=0x7f08001f; public static final int los_threshold_desc=0x7f080020; public static final int object_size_128_desc=0x7f080021; public static final int object_size_16_desc=0x7f080022; public static final int object_size_256_desc=0x7f080023; public static final int object_size_32_desc=0x7f080024; public static final int object_size_512_desc=0x7f080025; public static final int object_size_64_desc=0x7f080026; public static final int object_size_dist_desc=0x7f080027; public static final int object_size_los_desc=0x7f080028; public static final int object_size_smaollobject_desc=0x7f080029; public static final int outofmemory_desc=0x7f08002a; public static final int profile_list_dest=0x7f08002b; public static final int runtime_desc=0x7f08002c; public static final int set_profile_button_desc=0x7f08002d; public static final int setting_confirm_button_desc=0x7f08002e; public static final int show_result_button_desc=0x7f08002f; public static final int single_thread_desc=0x7f080030; public static final int size_dist_128_default=0x7f080031; public static final int size_dist_16_default=0x7f080032; public static final int size_dist_256_default=0x7f080033; public static final int size_dist_32_default=0x7f080034; public static final int size_dist_512_default=0x7f080035; public static final int size_dist_64_default=0x7f080036; public static final int size_dist_los_default=0x7f080037; public static final int start_button_desc=0x7f080038; public static final int thread_num_default=0x7f080039; public static final int thread_num_desc=0x7f08003a; public static final int total_size_default=0x7f08003b; public static final int total_size_desc=0x7f08003c; public static final int workload_status_desc=0x7f08003d; } public static final class style { /** API 11 theme customizations can go here. API 14 theme customizations can go here. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. */ public static final int AppBaseTheme=0x7f060000; /** All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f060001; } } ",0 "----- | Base Site URL |-------------------------------------------------------------------------- | | URL to your CodeIgniter root. Typically this will be your base URL, | WITH a trailing slash: | | http://example.com/ | | If this is not set then CodeIgniter will guess the protocol, domain and | path to your installation. | */ $config['base_url'] = 'http://localhost/ci-twig-bootstrap-starter/'; /* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = ''; /* |-------------------------------------------------------------------------- | URI PROTOCOL |-------------------------------------------------------------------------- | | This item determines which server global should be used to retrieve the | URI string. The default setting of 'AUTO' works for most servers. | If your links do not seem to work, try one of the other delicious flavors: | | 'AUTO' Default - auto detects | 'PATH_INFO' Uses the PATH_INFO | 'QUERY_STRING' Uses the QUERY_STRING | 'REQUEST_URI' Uses the REQUEST_URI | 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO | */ $config['uri_protocol'] = 'AUTO'; /* |-------------------------------------------------------------------------- | URL suffix |-------------------------------------------------------------------------- | | This option allows you to add a suffix to all URLs generated by CodeIgniter. | For more information please see the user guide: | | http://codeigniter.com/user_guide/general/urls.html */ $config['url_suffix'] = ''; /* |-------------------------------------------------------------------------- | Default Language |-------------------------------------------------------------------------- | | This determines which set of language files should be used. Make sure | there is an available translation if you intend to use something other | than english. | */ $config['language'] = 'english'; /* |-------------------------------------------------------------------------- | Default Character Set |-------------------------------------------------------------------------- | | This determines which character set is used by default in various methods | that require a character set to be provided. | */ $config['charset'] = 'UTF-8'; /* |-------------------------------------------------------------------------- | Enable/Disable System Hooks |-------------------------------------------------------------------------- | | If you would like to use the 'hooks' feature you must enable it by | setting this variable to TRUE (boolean). See the user guide for details. | */ $config['enable_hooks'] = FALSE; /* |-------------------------------------------------------------------------- | Class Extension Prefix |-------------------------------------------------------------------------- | | This item allows you to set the filename/classname prefix when extending | native libraries. For more information please see the user guide: | | http://codeigniter.com/user_guide/general/core_classes.html | http://codeigniter.com/user_guide/general/creating_libraries.html | */ $config['subclass_prefix'] = 'MY_'; /* |-------------------------------------------------------------------------- | Allowed URL Characters |-------------------------------------------------------------------------- | | This lets you specify with a regular expression which characters are permitted | within your URLs. When someone tries to submit a URL with disallowed | characters they will get a warning message. | | As a security measure you are STRONGLY encouraged to restrict URLs to | as few characters as possible. By default only these are allowed: a-z 0-9~%.:_- | | Leave blank to allow all characters -- but only if you are insane. | | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! | */ $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; /* |-------------------------------------------------------------------------- | Enable Query Strings |-------------------------------------------------------------------------- | | By default CodeIgniter uses search-engine friendly segment based URLs: | example.com/who/what/where/ | | By default CodeIgniter enables access to the $_GET array. If for some | reason you would like to disable it, set 'allow_get_array' to FALSE. | | You can optionally enable standard query string based URLs: | example.com?who=me&what=something&where=here | | Options are: TRUE or FALSE (boolean) | | The other items let you set the query string 'words' that will | invoke your controllers and its functions: | example.com/index.php?c=controller&m=function | | Please note that some of the helpers won't work as expected when | this feature is enabled, since CodeIgniter is designed primarily to | use segment based URLs. | */ $config['allow_get_array'] = TRUE; $config['enable_query_strings'] = FALSE; $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; $config['directory_trigger'] = 'd'; // experimental not currently in use /* |-------------------------------------------------------------------------- | Error Logging Threshold |-------------------------------------------------------------------------- | | If you have enabled error logging, you can set an error threshold to | determine what gets logged. Threshold options are: | You can enable error logging by setting a threshold over zero. The | threshold determines what gets logged. Threshold options are: | | 0 = Disables logging, Error logging TURNED OFF | 1 = Error Messages (including PHP errors) | 2 = Debug Messages | 3 = Informational Messages | 4 = All Messages | | For a live site you'll usually only enable Errors (1) to be logged otherwise | your log files will fill up very fast. | */ $config['log_threshold'] = 0; /* |-------------------------------------------------------------------------- | Error Logging Directory Path |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default | application/logs/ folder. Use a full server path with trailing slash. | */ $config['log_path'] = ''; /* |-------------------------------------------------------------------------- | Date Format for Logs |-------------------------------------------------------------------------- | | Each item that is logged has an associated date. You can use PHP date | codes to set your own date formatting | */ $config['log_date_format'] = 'Y-m-d H:i:s'; /* |-------------------------------------------------------------------------- | Cache Directory Path |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default | system/cache/ folder. Use a full server path with trailing slash. | */ $config['cache_path'] = ''; /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | If you use the Encryption class or the Session class you | MUST set an encryption key. See the user guide for info. | */ $config['encryption_key'] = 'thisisanencryptionkey'; /* |-------------------------------------------------------------------------- | Session Variables |-------------------------------------------------------------------------- | | 'sess_cookie_name' = the name you want for the cookie | 'sess_expiration' = the number of SECONDS you want the session to last. | by default sessions last 7200 seconds (two hours). Set to zero for no expiration. | 'sess_expire_on_close' = Whether to cause the session to expire automatically | when the browser window is closed | 'sess_encrypt_cookie' = Whether to encrypt the cookie | 'sess_use_database' = Whether to save the session data to a database | 'sess_table_name' = The name of the session database table | 'sess_match_ip' = Whether to match the user's IP address when reading the session data | 'sess_match_useragent' = Whether to match the User Agent when reading the session data | 'sess_time_to_update' = how many seconds between CI refreshing Session Information | */ $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_expire_on_close'] = FALSE; $config['sess_encrypt_cookie'] = FALSE; $config['sess_use_database'] = FALSE; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = TRUE; $config['sess_time_to_update'] = 300; /* |-------------------------------------------------------------------------- | Cookie Related Variables |-------------------------------------------------------------------------- | | 'cookie_prefix' = Set a prefix if you need to avoid collisions | 'cookie_domain' = Set to .your-domain.com for site-wide cookies | 'cookie_path' = Typically will be a forward slash | 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists. | */ $config['cookie_prefix'] = """"; $config['cookie_domain'] = """"; $config['cookie_path'] = ""/""; $config['cookie_secure'] = FALSE; /* |-------------------------------------------------------------------------- | Global XSS Filtering |-------------------------------------------------------------------------- | | Determines whether the XSS filter is always active when GET, POST or | COOKIE data is encountered | */ $config['global_xss_filtering'] = FALSE; /* |-------------------------------------------------------------------------- | Cross Site Request Forgery |-------------------------------------------------------------------------- | Enables a CSRF cookie token to be set. When set to TRUE, token will be | checked on a submitted form. If you are accepting user data, it is strongly | recommended CSRF protection be enabled. | | 'csrf_token_name' = The token name | 'csrf_cookie_name' = The cookie name | 'csrf_expire' = The number in seconds the token should expire. */ $config['csrf_protection'] = FALSE; $config['csrf_token_name'] = 'csrf_test_name'; $config['csrf_cookie_name'] = 'csrf_cookie_name'; $config['csrf_expire'] = 7200; /* |-------------------------------------------------------------------------- | Output Compression |-------------------------------------------------------------------------- | | Enables Gzip output compression for faster page loads. When enabled, | the output class will test whether your server supports Gzip. | Even if it does, however, not all browsers support compression | so enable only if you are reasonably sure your visitors can handle it. | | VERY IMPORTANT: If you are getting a blank page when compression is enabled it | means you are prematurely outputting something to your browser. It could | even be a line of whitespace at the end of one of your scripts. For | compression to work, nothing can be sent before the output buffer is called | by the output class. Do not 'echo' any values with compression enabled. | */ $config['compress_output'] = FALSE; /* |-------------------------------------------------------------------------- | Master Time Reference |-------------------------------------------------------------------------- | | Options are 'local' or 'gmt'. This pref tells the system whether to use | your server's local time as the master 'now' reference, or convert it to | GMT. See the 'date helper' page of the user guide for information | regarding date handling. | */ $config['time_reference'] = 'local'; /* |-------------------------------------------------------------------------- | Rewrite PHP Short Tags |-------------------------------------------------------------------------- | | If your PHP installation does not have short tag support enabled CI | can rewrite the tags on-the-fly, enabling you to utilize that syntax | in your view files. Options are TRUE or FALSE (boolean) | */ $config['rewrite_short_tags'] = FALSE; /* |-------------------------------------------------------------------------- | Reverse Proxy IPs |-------------------------------------------------------------------------- | | If your server is behind a reverse proxy, you must whitelist the proxy IP | addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR | header in order to properly identify the visitor's IP address. | Comma-delimited, e.g. '10.0.1.200,10.0.1.201' | */ $config['proxy_ips'] = ''; /* End of file config.php */ /* Location: ./application/config/config.php */ ",0 "nsitional.dtd""> N_int32
              Home   
              Previous   
              Next   
              Up   

              N_int32

              Declaration

              typedef long N_int32

              Prototype In

              snap/common.h

              Description

              Fundamental type definition for a 32-bit signed value.

              Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com

              ",0 "u can obtain one at https://mozilla.org/MPL/2.0/. #} {% extends ""firefox/base/base-protocol.html"" %} {% from ""macros-protocol.html"" import split, card with context %} {% block page_title %}{{ ftl('firefox-products-are') }}{% endblock %} {% block page_desc %}{{ ftl('learn-more-about') }}{% endblock %} {% block page_css %} {{ css_bundle('more') }} {% endblock %} {% block content %}
              {% call split( image_url='img/firefox/privacy/promise/privacy-hero.png', include_highres_image=True, block_class='page-hero mzp-l-split-hide-media-on-sm-md mzp-t-split-nospace', theme_class='mzp-t-dark', media_class='mzp-l-split-v-end' ) %}

              {{ ftl('learn-more-about-firefox', fallback='firefox-products-are') }}

              {{ ftl('learn-more-faq') }}

              {% endcall %}
              {{ card( title=ftl('firefox-fights-for'), ga_title='Firefox Windows', image_url='img/firefox/more/firefox-windows.jpg', desc=ftl('easy-migration-of'), link_url=url('firefox.windows') )}} {{ card( title=ftl('firefox-respects-your'), ga_title='Firefox Mac', image_url='img/firefox/more/firefox-mac.jpg', desc=ftl('firefox-doesnt-spy'), link_url=url('firefox.mac') )}} {{ card( title=ftl('firefox-for-linux'), ga_title='Firefox Linux', image_url='img/firefox/more/firefox-linux.jpg', desc=ftl('new-school-meets'), link_url=url('firefox.linux') )}} {{ card( title=ftl('firefox-for-windows'), ga_title='Firefox Win 64', image_url='img/firefox/more/firefox-64-bit.jpg', desc=ftl('we-worry-about'), link_url=url('firefox.browsers.windows-64-bit') )}}
              {{ card( title=ftl('the-history-of'), ga_title='Browser History', image_url='img/firefox/more/browser-history.jpg', desc=ftl('firefox-has-been'), link_url=url('firefox.browsers.browser-history') )}} {{ card( title=ftl('what-is-a'), ga_title='What is a browser', image_url='img/firefox/more/what-is-a-browser.jpg', desc=ftl('a-web-browser'), link_url=url('firefox.browsers.what-is-a-browser') )}} {{ card( title=ftl('update-your-browser'), ga_title='Update Browser', image_url='img/firefox/more/update-browser.jpg', desc=ftl('the-firefox-browser'), link_url=url('firefox.browsers.update-browser') )}}
              {{ card( title=ftl('choose-which-firefox'), ga_title='Firefox All', image_url='img/firefox/more/firefox-all.jpg', desc=ftl('we-believe-everyone'), link_url=url('firefox.all') )}} {{ card( title=ftl('firefox-more-firefox-chromebook'), ga_title='Firefox Products', image_url='img/firefox/more/firefox-chromebook.jpg', desc=ftl('firefox-more-while-on-chromebook'), link_url=url('firefox.browsers.chromebook') )}} {{ card( title=ftl('firefox-more-firefox-quantum'), ga_title='Firefox Browsers', image_url='img/firefox/more/firefox-quantum.jpg', desc=ftl('firefox-more-quantum-was-revolution'), link_url=url('firefox.browsers.quantum') )}}
              {{ card( title=ftl('firefox-rebel-with'), ga_title=""Independent"", image_url='img/firefox/more/independent.jpg', desc= ftl('firefox-is-independent'), link_url=url('firefox.features.independent') )}} {{ card( title=ftl('firefox-more-little-book'), ga_title='Features Private Browsing', image_url='img/firefox/more/little-book-of-privacy.jpg', desc= ftl('firefox-more-you-can-reclaim'), link_url=url('firefox.privacy.book') )}} {{ card( title=ftl('incognito-browser-what'), ga_title='Features Private Browsing', image_url='img/firefox/more/incognito-browser.jpg', desc=ftl('firefox-calls-it'), link_url=url('firefox.browsers.incognito-browser') )}}
              {{ card( title=ftl('the-ad-blocker'), ga_title='Featires Adblocker', image_url='img/firefox/more/firefox-adblocker.jpg', desc=ftl('so-many-ads'), link_url=url('firefox.features.adblocker') )}} {{ card( title=ftl('firefox-more-protection'), ga_title='Features Private Browsing', image_url='img/firefox/more/private-browsing.jpg', desc=ftl('were-obsessed-with'), link_url=url('firefox.features.private-browsing') )}} {{ card( title=ftl('take-the-stress'), ga_title='Features Safe Browser', image_url='img/firefox/more/safe-browser.jpg', desc=ftl('building-a-safe'), link_url=url('firefox.features.safebrowser') )}} {{ card( title=ftl('firefox-more-firefox-sync'), ga_title='Features Safe Browser', image_url='img/firefox/more/firefox-sync.jpg', desc=ftl('firefox-more-access-your-sync'), link_url=url('firefox.sync') )}}
              {{ card( title=ftl('seven-of-the'), ga_title='Compare', image_url='img/firefox/more/compare-browsers.jpg', desc=ftl('we-compare-firefox'), link_url=url('firefox.browsers.compare.index') )}} {{ card( title=ftl('comparing-firefox-chrome'), ga_title='Compare Chrome', image_url='img/firefox/more/firefox-chrome.jpg', desc=ftl('big-isnt-always'), link_url=url('firefox.browsers.compare.chrome') )}} {{ card( title=ftl('comparing-firefox-brave'), ga_title='Compare Brave', image_url='img/firefox/more/firefox-brave.jpg', desc=ftl('be-bold-and'), link_url=url('firefox.browsers.compare.brave') )}}
              {{ card( title=ftl('comparing-firefox-edge'), ga_title='Compare Edge', image_url='img/firefox/more/firefox-edge.jpg', desc=ftl('youll-never-guess'), link_url=url('firefox.browsers.compare.edge') )}} {{ card( title=ftl('comparing-firefox-ie'), ga_title='Compare IE', image_url='img/firefox/more/firefox-ie.jpg', desc=ftl('old-habits-that'), link_url=url('firefox.browsers.compare.ie') )}} {{ card( title=ftl('comparing-firefox-safari'), ga_title='Compare Safari', desc=ftl('you-dont-have'), image_url='img/firefox/more/firefox-safari.jpg', link_url=url('firefox.browsers.compare.safari') )}} {{ card( title=ftl('comparing-firefox-opera'), ga_title='Compare Opera', image_url='img/firefox/more/firefox-opera.jpg', desc=ftl('be-free-to'), link_url=url('firefox.browsers.compare.opera') )}}
              {{ card( title=ftl('firefox-more-fingerprinter-blocking'), ga_title='Fingerprinter Blocking', image_url='img/firefox/more/fingerprint.png', desc=ftl('firefox-more-fingerprinting-is-a'), link_url=url('firefox.features.fingerprinting') )}} {{ card( title=ftl('firefox-more-translate-the-web'), ga_title='Translate', image_url='img/firefox/more/firefox-all.jpg', desc=ftl('firefox-more-translate-more-than'), link_url=url('firefox.features.translate') )}} {{ card( title=ftl('firefox-more-a-guide-to'), ga_title='Safe Passwords', desc=ftl('firefox-more-more-and-more'), image_url='img/firefox/more/passwords.png', link_url=url('firefox.privacy.passwords') )}}
              {{ card( title=ftl('firefox-more-avoid-misinformation-heading'), ga_title='Avoid Misinformation', image_url='img/firefox/more/avoid-misinformation.jpg', desc=ftl('firefox-more-avoid-misinformation-desc'), link_url=url('firefox.more.misinformation') )}}
              {% endblock %} ",0 "ou 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. */ package org.springframework.social.weibo.api.impl.json; import java.util.Date; import java.util.SortedSet; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import org.springframework.social.weibo.api.Trends.Trend; /** * Annotated mixin to add Jackson annotations to TrendsWrapper. * * @author edva8332 */ @JsonIgnoreProperties(ignoreUnknown = true) abstract class TrendsWrapperMixin { @JsonProperty(""trends"") @JsonDeserialize(using = TrendsDeserializer.class) SortedSet trends; @JsonProperty(""as_of"") @JsonDeserialize(using = DateInSecondsDeserializer.class) Date asOf; } ",0 "Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ); } protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo ""
              ""; // line 2 if (((isset($context[""count""]) ? $context[""count""] : $this->getContext($context, ""count"")) > 0)) { // line 3 echo ""

              [""; // line 4 echo twig_escape_filter($this->env, (((isset($context[""count""]) ? $context[""count""] : $this->getContext($context, ""count"")) - (isset($context[""position""]) ? $context[""position""] : $this->getContext($context, ""position""))) + 1), ""html"", null, true); echo ""/""; echo twig_escape_filter($this->env, ((isset($context[""count""]) ? $context[""count""] : $this->getContext($context, ""count"")) + 1), ""html"", null, true); echo ""] ""; // line 5 echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\CodeExtension')->abbrClass($this->getAttribute((isset($context[""exception""]) ? $context[""exception""] : $this->getContext($context, ""exception"")), ""class"", array())); echo "": ""; echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\CodeExtension')->formatFileFromText(nl2br(twig_escape_filter($this->env, $this->getAttribute((isset($context[""exception""]) ? $context[""exception""] : $this->getContext($context, ""exception"")), ""message"", array()), ""html"", null, true))); echo ""  ""; // line 6 ob_start(); // line 7 echo "" env, (isset($context[""position""]) ? $context[""position""] : $this->getContext($context, ""position"")), ""html"", null, true); echo ""', 'traces'); switchIcons('icon-traces-""; echo twig_escape_filter($this->env, (isset($context[""position""]) ? $context[""position""] : $this->getContext($context, ""position"")), ""html"", null, true); echo ""-open', 'icon-traces-""; echo twig_escape_filter($this->env, (isset($context[""position""]) ? $context[""position""] : $this->getContext($context, ""position"")), ""html"", null, true); echo ""-close'); return false;\""> env, (isset($context[""position""]) ? $context[""position""] : $this->getContext($context, ""position"")), ""html"", null, true); echo ""-close\"" alt=\""-\"" src=\""data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=\"" style=\""display: ""; echo (((0 == (isset($context[""count""]) ? $context[""count""] : $this->getContext($context, ""count"")))) ? (""inline"") : (""none"")); echo ""\"" /> env, (isset($context[""position""]) ? $context[""position""] : $this->getContext($context, ""position"")), ""html"", null, true); echo ""-open\"" alt=\""+\"" src=\""data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7\"" style=\""display: ""; echo (((0 == (isset($context[""count""]) ? $context[""count""] : $this->getContext($context, ""count"")))) ? (""none"") : (""inline"")); echo ""\"" /> ""; echo trim(preg_replace('/>\s+<', ob_get_clean())); // line 12 echo ""

              ""; } else { // line 14 echo ""

              Stack Trace

              ""; } // line 16 echo "" env, (isset($context[""position""]) ? $context[""position""] : $this->getContext($context, ""position"")), ""html"", null, true); echo ""\"">
                env, (isset($context[""position""]) ? $context[""position""] : $this->getContext($context, ""position"")), ""html"", null, true); echo ""\"" style=\""display: ""; echo (((0 == (isset($context[""count""]) ? $context[""count""] : $this->getContext($context, ""count"")))) ? (""block"") : (""none"")); echo ""\""> ""; // line 19 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context[""exception""]) ? $context[""exception""] : $this->getContext($context, ""exception"")), ""trace"", array())); foreach ($context['_seq'] as $context[""i""] => $context[""trace""]) { // line 20 echo ""
              1. ""; // line 21 $this->loadTemplate(""TwigBundle:Exception:trace.html.twig"", ""TwigBundle:Exception:traces.html.twig"", 21)->display(array(""prefix"" => (isset($context[""position""]) ? $context[""position""] : $this->getContext($context, ""position"")), ""i"" => $context[""i""], ""trace"" => $context[""trace""])); // line 22 echo ""
              2. ""; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['i'], $context['trace'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 24 echo ""
              ""; } public function getTemplateName() { return ""TwigBundle:Exception:traces.html.twig""; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 101 => 24, 94 => 22, 92 => 21, 89 => 20, 85 => 19, 79 => 18, 75 => 17, 72 => 16, 68 => 14, 64 => 12, 56 => 9, 50 => 8, 41 => 7, 39 => 6, 33 => 5, 27 => 4, 24 => 3, 22 => 2, 19 => 1,); } /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */ public function getSource() { @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED); return $this->getSourceContext()->getCode(); } public function getSourceContext() { return new Twig_Source(""
              {% if count > 0 %}

              [{{ count - position + 1 }}/{{ count + 1 }}] {{ exception.class|abbr_class }}: {{ exception.message|nl2br|format_file_from_text }}  {% spaceless %} \""-\"" \""+\"" {% endspaceless %}

              {% else %}

              Stack Trace

              {% endif %}
                {% for i, trace in exception.trace %}
              1. {% include 'TwigBundle:Exception:trace.html.twig' with { 'prefix': position, 'i': i, 'trace': trace } only %}
              2. {% endfor %}
              "", ""TwigBundle:Exception:traces.html.twig"", ""C:\\inetpub\\wwwroot\\Cupon1\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\TwigBundle/Resources/views/Exception/traces.html.twig""); } } ",0 "quiv=""X-UA-Compatible"" content=""IE=edge""/>

              onFocus / onBlur











              ",0 "allation\Updater\Updater060000; use UJM\ExoBundle\Installation\Updater\Updater060001; use UJM\ExoBundle\Installation\Updater\Updater060200; use UJM\ExoBundle\Installation\Updater\Updater070000; use UJM\ExoBundle\Installation\Updater\Updater090000; use UJM\ExoBundle\Installation\Updater\Updater090002; class AdditionalInstaller extends BaseInstaller { public function preUpdate($currentVersion, $targetVersion) { if (version_compare($currentVersion, '6.0.0', '<=')) { $updater = new Updater060000($this->container->get('doctrine.dbal.default_connection')); $updater->setLogger($this->logger); $updater->preUpdate(); } if (version_compare($currentVersion, '6.0.0', '=')) { $updater = new Updater060001($this->container->get('doctrine.dbal.default_connection')); $updater->setLogger($this->logger); $updater->preUpdate(); } if (version_compare($currentVersion, '6.2.0', '<')) { $updater = new Updater060200($this->container->get('doctrine.dbal.default_connection')); $updater->setLogger($this->logger); $updater->preUpdate(); } if (version_compare($currentVersion, '7.0.0', '<=')) { $updater = new Updater070000($this->container->get('doctrine.dbal.default_connection')); $updater->setLogger($this->logger); $updater->preUpdate(); } } public function postUpdate($currentVersion, $targetVersion) { if (version_compare($currentVersion, '6.0.0', '<=')) { $updater = new Updater060000($this->container->get('doctrine.dbal.default_connection')); $updater->setLogger($this->logger); $updater->postUpdate(); } if (version_compare($currentVersion, '6.2.0', '<')) { $updater = new Updater060200($this->container->get('doctrine.dbal.default_connection')); $updater->setLogger($this->logger); $updater->postUpdate(); } if (version_compare($currentVersion, '9.0.0', '<')) { $updater = new Updater090000( $this->container->get('doctrine.dbal.default_connection'), $this->container->get('claroline.persistence.object_manager'), $this->container->get('ujm_exo.serializer.exercise'), $this->container->get('ujm_exo.serializer.step'), $this->container->get('ujm_exo.serializer.item') ); $updater->setLogger($this->logger); $updater->postUpdate(); } if (version_compare($currentVersion, '9.0.2', '<')) { $updater = new Updater090002( $this->container->get('doctrine.dbal.default_connection') ); $updater->setLogger($this->logger); $updater->postUpdate(); } } } ",0 "bute it and/or modify // * it under the terms of the GNU Affero General Public License as // * published by the Free Software Foundation, either version 3 of the // * License, or (at your option) any later version. // * // * This program is distributed in the hope that it will be useful, // * but WITHOUT ANY WARRANTY; without even the implied warranty of // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // * GNU Affero General Public License for more details. // * // * You should have received a copy of the GNU Affero General Public License // * along with this program. If not, see . // * // * Contact us by mail: tanaguru AT tanaguru DOT org // */ //package org.tanaguru.rules.rgaa32017; // //import org.apache.commons.lang3.tuple.ImmutablePair; //import org.tanaguru.entity.audit.ProcessResult; //import org.tanaguru.entity.audit.TestSolution; //import org.tanaguru.rules.keystore.HtmlElementStore; //import org.tanaguru.rules.keystore.RemarkMessageStore; //import org.tanaguru.rules.rgaa32017.test.Rgaa32017RuleImplementationTestCase; // ///** // * Unit test class for the implementation of the rule 10-9-1 of the referential Rgaa 3-2017. // * // * @author // */ //public class Rgaa32017Rule100901Test extends Rgaa32017RuleImplementationTestCase { // // /** // * Default constructor // * @param testName // */ // public Rgaa32017Rule100901Test (String testName){ // super(testName); // } // // @Override // protected void setUpRuleImplementationClassName() { // setRuleImplementationClassName( // ""org.tanaguru.rules.rgaa32017.Rgaa32017Rule100901""); // } // // @Override // protected void setUpWebResourceMap() { // addWebResource(""Rgaa32017.Test.10.9.1-1Passed-01""); // addWebResource(""Rgaa32017.Test.10.9.1-2Failed-01""); // addWebResource(""Rgaa32017.Test.10.9.1-2Failed-02""); // // addWebResource(""Rgaa32017.Test.10.9.1-3NMI-01""); //// addWebResource(""Rgaa32017.Test.10.9.1-4NA-01""); // } // // @Override // protected void setProcess() { // //---------------------------------------------------------------------- // //------------------------------1Passed-01------------------------------ // //---------------------------------------------------------------------- // // checkResultIsPassed(processPageTest(""Rgaa32017.Test.10.9.1-1Passed-01""), 0); // // //---------------------------------------------------------------------- // //------------------------------2Failed-01------------------------------ // //---------------------------------------------------------------------- // ProcessResult processResult = processPageTest(""Rgaa32017.Test.10.9.1-2Failed-01""); // checkResultIsFailed(processResult, 1, 1); //// checkRemarkIsPresent( //// processResult, //// TestSolution.FAILED, //// CHECK_IF_USER_HAVE_MECHANISM_TO_DELETE_JUSTIFY_TEXT_ALIGN_MSG, //// ""h1"", //// 1, //// new ImmutablePair(""#ExtractedAttributeAsEvidence"", ""#ExtractedAttributeValue"")); // //---------------------------------------------------------------------- // //------------------------------2Failed-02------------------------------ // //---------------------------------------------------------------------- // processResult = processPageTest(""Rgaa32017.Test.10.9.1-2Failed-02""); // checkResultIsFailed(processResult, 1, 1); //// checkRemarkIsPresent( //// processResult, //// TestSolution.FAILED, //// RemarkMessageStore.CHECK_IF_USER_HAVE_MECHANISM_TO_DELETE_JUSTIFY_TEXT_ALIGN_MSG, //// HtmlElementStore.P_ELEMENT, //// 1, //// new ImmutablePair(""#ExtractedAttributeAsEvidence"", ""#ExtractedAttributeValue"")); // // //---------------------------------------------------------------------- // //------------------------------3NMI-01--------------------------------- // //---------------------------------------------------------------------- //// ProcessResult processResult = processPageTest(""Rgaa32017.Test.10.9.1-3NMI-01""); //// checkResultIsNotTested(processResult); // temporary result to make the result buildable before implementation //// checkResultIsPreQualified(processResult, 1, 1); //// checkRemarkIsPresent( //// processResult, //// TestSolution.NEED_MORE_INFO, //// CHECK_IF_USER_HAVE_MECHANISM_TO_DELETE_JUSTIFY_TEXT_ALIGN_MSG, //// ""p"", //// 1); // // // //---------------------------------------------------------------------- // //------------------------------4NA-01------------------------------ // //---------------------------------------------------------------------- //// checkResultIsNotApplicable(processPageTest(""Rgaa32017.Test.10.9.1-4NA-01"")); // } // // @Override // protected void setConsolidate() { // // // The consolidate method can be removed when real implementation is done. // // The assertions are automatically tested regarding the file names by // // the abstract parent class //// assertEquals(TestSolution.NOT_TESTED, //// consolidate(""Rgaa32017.Test.10.9.1-3NMI-01"").getValue()); // } // //} ",0 "kmeans_h #define kmeans_h #include ""county.h"" #include //K-Means Clustering Namespace namespace KmeansCluster { //Data Structure to help K-Means Clustering class KMeans{ private: //setup three clusters for the clustering and two for last centroids and current centroids std::vectorcluster1,cluster2,cluster3,last,current,all; public: //method find the closest cluster to add void addToClosest(CountyStruct::County&acounty); //method to initialize rand centroids and clusters void initialize(std::vector counties); //method to get the mean of a cluster std::vector mean(std::vector&cluster); //method to get centroid closest to mean of cluster CountyStruct::County getCentroid(std::vector&cluster,std::vector mean); //method to get the centroid of a cluster CountyStruct::County centroid(std::vector&counties); //method to setup centroids bool setupCentroids(); //method to make the clusters void cluster(); //method to get the distance from a point to rest of cluster float avgDistance(std::vector&cluster,int index); //method to find distance from cluster from a point float distanceFromCluster(CountyStruct::County&c,std::vector&cluster); //method to return silhoute value float silh(std::vector&a,std::vector&b,int index); //method to print the silhoute for each cluster void printSil(); }; } #endif /* kmeans_h */ ",0 "javadoc (build 1.6.0_26) on Sun Dec 30 01:26:12 PST 2012 --> Uses of Class org.apache.hadoop.fs.s3.S3FileSystem (Hadoop 1.0.4-SNAPSHOT API)
              Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
               PREV   NEXT FRAMES    NO FRAMES    

              Uses of Class
              org.apache.hadoop.fs.s3.S3FileSystem

              No usage of org.apache.hadoop.fs.s3.S3FileSystem


              Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
               PREV   NEXT FRAMES    NO FRAMES    

              Copyright © 2009 The Apache Software Foundation ",0 "; import com.ycsoft.beans.core.prod.CProdInclude; import com.ycsoft.daos.abstracts.BaseEntityDao; import com.ycsoft.daos.core.JDBCException; @Component public class ProdIncludeDao extends BaseEntityDao { public ProdIncludeDao(){} //设置产品之间的关系 public void saveProdInclude(String userId,List includeList) throws Exception{ for (CProdInclude include :includeList){ String sql = ""insert into c_prod_include_lxr (cust_id,user_id,prod_sn,include_prod_sn) "" + "" values (?,?,?,?)""; executeUpdate(sql,include.getCust_id(),include.getUser_id(),include.getProd_sn(),include.getInclude_prod_sn()); } } } ",0 "ll Rights Reserved. */ package gov.nasa.worldwind.render; import gov.nasa.worldwind.geom.*; import gov.nasa.worldwind.render.airspaces.*; import javax.media.opengl.*; /** * @author brownrigg * @version $Id: SurfaceCircle2.java 9230 2009-03-06 05:36:26Z dcollins $ */ public class SurfaceCircle2 extends CappedCylinder { public SurfaceCircle2(LatLon location, double radius) { super(location, radius); } public SurfaceCircle2(AirspaceAttributes shapeAttributes) { super(shapeAttributes); } public SurfaceCircle2() { super(); } protected void doRenderGeometry(DrawContext dc, String drawStyle) { beginDrawShape(dc); super.doRenderGeometry(dc, drawStyle); endDrawShape(dc); } protected void beginDrawShape(DrawContext dc) { // Modify the projection transform to shift the depth values slightly toward the camera in order to // ensure the shape is selected during depth buffering. GL gl = dc.getGL(); float[] pm = new float[16]; gl.glGetFloatv(GL.GL_PROJECTION_MATRIX, pm, 0); pm[10] *= .8; // TODO: See Lengyel 2 ed. Section 9.1.2 to compute optimal/minimal offset gl.glPushAttrib(GL.GL_TRANSFORM_BIT); gl.glMatrixMode(GL.GL_PROJECTION); gl.glPushMatrix(); gl.glLoadMatrixf(pm, 0); } protected void endDrawShape(DrawContext dc) { GL gl = dc.getGL(); gl.glMatrixMode(GL.GL_PROJECTION); gl.glPopMatrix(); gl.glPopAttrib(); } } ",0 "

              Event

              Request

              Path

              /events

              Parameters

              nothing

              Response

              Key Value type Brief Reply
              result Boolean True on success. Otherwise False. A
              message String Error message. This key is reply only when result is False. F
              numberOfEvents Number The number of events. T
              events Array The array of event object. T
              A: always, T: only when result is True, F: only when result is False.

              Event Object

              ",0 " Using SDL With OpenGL * * * * Tutorial by Kyle Foley (sdw) * * * * http://gpwiki.org/index.php/SDL:Tutorials:Using_SDL_with_OpenGL * * * *******************************************************************/ /* THIS WORK, INCLUDING THE SOURCE CODE, DOCUMENTATION AND RELATED MEDIA AND DATA, IS PLACED INTO THE PUBLIC DOMAIN. THE ORIGINAL AUTHOR IS KYLE FOLEY. THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR REDISTRIBUTION OF THIS SOFTWARE. */ #include ""SDL/SDL.h"" #include ""SDL/SDL_image.h"" #include ""SDL/SDL_opengl.h"" #include #include int main(int argc, char *argv[]) { SDL_Surface *screen; // Slightly different SDL initialization if ( SDL_Init(SDL_INIT_VIDEO) != 0 ) { printf(""Unable to initialize SDL: %s\n"", SDL_GetError()); return 1; } SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); // *new* screen = SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL ); // *changed* if ( !screen ) { printf(""Unable to set video mode: %s\n"", SDL_GetError()); return 1; } // Set the OpenGL state after creating the context with SDL_SetVideoMode glClearColor( 0, 0, 0, 0 ); glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline. glViewport( 0, 0, 640, 480 ); glMatrixMode( GL_PROJECTION ); glPushMatrix(); // just for testing glLoadIdentity(); glOrtho( 0, 640, 480, 0, -1, 1 ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); // Load the OpenGL texture GLuint texture; // Texture object handle SDL_Surface *surface; // Gives us the information to make the texture if ( (surface = IMG_Load(""screenshot.png"")) ) { // Check that the image's width is a power of 2 if ( (surface->w & (surface->w - 1)) != 0 ) { printf(""warning: image.bmp's width is not a power of 2\n""); } // Also check if the height is a power of 2 if ( (surface->h & (surface->h - 1)) != 0 ) { printf(""warning: image.bmp's height is not a power of 2\n""); } // Have OpenGL generate a texture object handle for us glGenTextures( 1, &texture ); // Bind the texture object glBindTexture( GL_TEXTURE_2D, texture ); // Set the texture's stretching properties glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); //SDL_LockSurface(surface); // Add some greyness memset(surface->pixels, 0x66, surface->w*surface->h); // Edit the texture object's image data using the information SDL_Surface gives us glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, surface->w, surface->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, surface->pixels ); //SDL_UnlockSurface(surface); } else { printf(""SDL could not load image.bmp: %s\n"", SDL_GetError()); SDL_Quit(); return 1; } // Free the SDL_Surface only if it was successfully created if ( surface ) { SDL_FreeSurface( surface ); } // Clear the screen before drawing glClear( GL_COLOR_BUFFER_BIT ); // Bind the texture to which subsequent calls refer to glBindTexture( GL_TEXTURE_2D, texture ); glBegin( GL_QUADS ); glTexCoord2i( 0, 0 ); glVertex3f( 10, 10, 0 ); glTexCoord2i( 1, 0 ); glVertex3f( 300, 10, 0 ); glTexCoord2i( 1, 1 ); glVertex3f( 300, 128, 0 ); glTexCoord2i( 0, 1 ); glVertex3f( 10, 128, 0 ); glTexCoord2f( 0, 0.5 ); glVertex3f( 410, 10, 0 ); glTexCoord2f( 1, 0.5 ); glVertex3f( 600, 10, 0 ); glTexCoord2f( 1, 1 ); glVertex3f( 630, 200, 0 ); glTexCoord2f( 0.5, 1 ); glVertex3f( 310, 250, 0 ); glEnd(); glBegin( GL_TRIANGLE_STRIP ); glTexCoord2i( 0, 0 ); glVertex3f( 100, 300, 0 ); glTexCoord2i( 1, 0 ); glVertex3f( 300, 300, 0 ); glTexCoord2i( 1, 1 ); glVertex3f( 300, 400, 0 ); glTexCoord2i( 0, 1 ); glVertex3f( 500, 410, 0 ); glEnd(); glDisable(GL_TEXTURE_2D); glColor3ub(90, 255, 255); glBegin( GL_QUADS ); glVertex3f( 10, 410, 0 ); glVertex3f( 300, 410, 0 ); glVertex3f( 300, 480, 0 ); glVertex3f( 10, 470, 0 ); glEnd(); glBegin( GL_QUADS ); glColor3f(1.0, 0, 1.0); glVertex3f( 410, 410, 0 ); glColor3f(0, 1.0, 0); glVertex3f( 600, 410, 0 ); glColor3f(0, 0, 1.0); glVertex3f( 600, 480, 0 ); glColor3f(1.0, 1.0, 1.0); glVertex3f( 410, 470, 0 ); glEnd(); SDL_GL_SwapBuffers(); #if !EMSCRIPTEN // Wait for 3 seconds to give us a chance to see the image SDL_Delay(3000); #endif // Now we can delete the OpenGL texture and close down SDL glDeleteTextures( 1, &texture ); SDL_Quit(); return 0; } ",0 """>
              groups) > 0){ echo ''; } ?> auditories) > 0){ echo ''; } ?> lectors) > 0){ echo ''; } ?>
              ",0 "esomeIconFormatter; class DescriptionCorePageProperty extends CorePageProperty { public function __construct() { $this->setCorePagePropertyHandle('description'); $this->setPageTypeComposerControlIconFormatter(new FontAwesomeIconFormatter('font')); } public function getPageTypeComposerControlName() { return tc('PageTypeComposerControlName', 'Description'); } public function publishToPage(Page $c, $data, $controls) { if (!is_array($data)) { $data = []; } $data += [ 'description' => null, ]; $this->addPageTypeComposerControlRequestValue('cDescription', $data['description']); parent::publishToPage($c, $data, $controls); } public function validate() { $e = Core::make('helper/validation/error'); $val = $this->getRequestValue(); if (isset($val['description'])) { $description = $val['description']; } else { $description = $this->getPageTypeComposerControlDraftValue(); } /** @var \Concrete\Core\Utility\Service\Validation\Strings $stringValidator */ $stringValidator = Core::make('helper/validation/strings'); if (!$stringValidator->notempty($description)) { $control = $this->getPageTypeComposerFormLayoutSetControlObject(); $e->add(t('You haven\'t chosen a valid %s', $control->getPageTypeComposerControlDisplayLabel())); return $e; } } public function getRequestValue($args = false) { $data = parent::getRequestValue($args); $data['description'] = Core::make('helper/security')->sanitizeString($data['description'] ?? ''); return $data; } public function getPageTypeComposerControlDraftValue() { if (is_object($this->page)) { $c = $this->page; return $c->getCollectionDescription(); } } } ",0 "import java.util.List; /** * Title : ConcurrentLinkedQueueExtendsHandler .
              * Description : 队列管理.
              * Create on : 2014年8月14日 下午2:31:02 .
              *

              * Copyright (C) Mocha Software Co.,Ltd.
              *

              * * @author 刘军 liujun1@mochasoft.com.cn
              * @version Mocha JavaOA v7.0.0
              *
              * 修改历史: .
              * 修改人 修改日期 修改描述
              * -------------------------------------------
              *
              *
              */ public class ConcurrentLinkedQueueExtendsHandler implements QueueHandler { /** * 单例对象实例 */ private static ConcurrentLinkedQueueExtendsHandler instance = null; // public static ConcurrentLinkedQueueExtendsHandler getInstance() { // if (instance == null) { // instance = new ConcurrentLinkedQueueExtendsHandler(); // // } // return instance; // } private static class ConcurrentLinkedQueueExtendsSingletonHolder { /** * 单例对象实例 */ static final ConcurrentLinkedQueueExtendsHandler INSTANCE = new ConcurrentLinkedQueueExtendsHandler(); } public static ConcurrentLinkedQueueExtendsHandler getInstance() { return ConcurrentLinkedQueueExtendsSingletonHolder.INSTANCE; } /** * private的构造函数用于避免外界直接使用new来实例化对象 */ private ConcurrentLinkedQueueExtendsHandler() { } // 队列容器 List> queueList = new LinkedList>(); // 队列名字容器 List queueNames = new ArrayList(); // =========================对队列的操作 /** * 根据名称参数动态创建不包含任何元素的空队列 * * @param name * 队列的名字 * @return * @throws Exception */ @Override public ConcurrentLinkedQueueExtends createQueueByName(String name) throws Exception { if (null == name || """".equals(name)) { throw new Exception(""队列名称不能为空。""); } if (queueNames.contains(name)) { throw new Exception(""此名称已被使用,请另起其他名字。""); } ConcurrentLinkedQueueExtends queue = new ConcurrentLinkedQueueExtends( name); // 将队列加到容器中 queueList.add(queue); // 将本队列名加入容器中 queueNames.add(name); return queue; } /** * 根据名称参数动态创建不包含任何元素的空队列 * * @param name * 队列的名字 * @return * @throws Exception */ @Override public void createQueueByNames(String[] names) throws Exception { for (String name : names) { if (null == name || """".equals(name)) { throw new Exception(""队列名称不能为空。""); } if (queueNames.contains(name)) { throw new Exception(""此名称已被使用,请另起其他名字。""); } ConcurrentLinkedQueueExtends queue = new ConcurrentLinkedQueueExtends( name); // 将队列加到容器中 queueList.add(queue); // 将本队列名加入容器中 queueNames.add(name); } } /** * 根据名称参数动态创建不包含任何元素的空队列, 并设置队列的大小。 * * @param name * 队列的名字 * @param length * 队列元素最大个数 * @return 新的队列对象 * @throws Exception */ @Override public ConcurrentLinkedQueueExtends createQueueByName(String name, int maxSize) throws Exception { if (null == name || """".equals(name)) { throw new Exception(""队列名称不能为空。""); } if (queueNames.contains(name)) { throw new Exception(""此名称已被使用,请另起其他名字。""); } if (maxSize <= 0) { throw new Exception(""队列大小必须大于零""); } ConcurrentLinkedQueueExtends queue = new ConcurrentLinkedQueueExtends( name, maxSize); // 将队列加到容器中 queueList.add(queue); // 将本队列名加入容器中 queueNames.add(name); return queue; } public boolean checkqueueName(String name) { boolean flag = false; if (queueNames.contains(name)) { flag = true; } return flag; } /** * 根据名称参数动态获得队列。 * * @param name * 队列的名字 * @return * @throws Exception */ @Override public ConcurrentLinkedQueueExtends getQueueByName(String name) throws Exception { if (queueNames.contains(name)) { return queueList.get(queueNames.indexOf(name)); } else throw new Exception(""不存在名称为 "" + name + ""的队列""); } /** * 根据名称参数动态删除队列 * * @param name * 队列的名字 */ @Override public void removeQueueByName(String name) { if (queueNames.contains(name)) { queueList.remove(queueNames.indexOf(name)); queueNames.remove(name); } } // =========================对队列中的元素的操作 // 1.添加 /** * 根据队列名向队列中添加元素,若添加元素失败,则抛出异常 * * @param queueName * 队列名字 * @param e * 向队列中添加的元素 * @return * @throws Exception */ @Override public boolean add(String queueName, E e) throws Exception { ConcurrentLinkedQueueExtends queue = this.getQueueByName(queueName); if (queue.size() >= queue.getMaxSize()) { throw new Exception(""队列已满,不允许继续添加元素。""); } return queue.add(e); } /** * 根据队列名向队列中添加元素集合,若添加元素集合失败,则抛出异常 * * @param queueName * 队列名称 * @param c * collection containing elements to be added to this queue * @return true if this queue changed as a result of the call * @throws Exception */ @Override public boolean addAll(String queueName, Collection c) throws Exception { ConcurrentLinkedQueueExtends queue = this.getQueueByName(queueName); if (queue.size() >= queue.getMaxSize()) { throw new Exception(""队列已满,不允许继续添加元素。""); } else if (queue.size() + c.size() > queue.getMaxSize()) { throw new Exception(""新增的集合中的元素太多,以致超出队列容量上限""); } return queue.addAll(c); } /** * 根据队列名向队列中添加元素,若添加元素失败,则返回false * * @param queueName * 队列名 * @param e * 向队列中添加的元素 * @return * @throws Exception */ @Override public boolean offer(String queueName, E e) throws Exception { ConcurrentLinkedQueueExtends queue = this.getQueueByName(queueName); if (queue.size() >= queue.getMaxSize()) { throw new Exception(""队列已满,不允许继续添加元素。""); } return queue.offer(e); } // 2.得到但不删除 /** * 获取但不移除此队列的头;如果此队列为空,则返回 null。 * * @param queueName * 队列名字 * @return 队列的头,如果此队列为空,则返回 null * @throws Exception */ @Override public E peek(String queueName) throws Exception { return this.getQueueByName(queueName).peek(); } /** * 获取但不移除此队列的头;如果此队列为空,则抛出异常。 * * @param queueName * 队列名字 * @return 队列的头,如果此队列为空,则抛出异常 * @throws Exception */ @Override public E element(String queueName) throws Exception { return this.getQueueByName(queueName).element(); } // 3.得到并删除 /** * 获取并移除此队列的头,如果此队列为空,则返回 null。 * * @param queueName * 队列名字 * @return 此队列的头;如果此队列为空,则返回 null * @throws Exception */ @Override public E poll(String queueName) throws Exception { return this.getQueueByName(queueName).poll(); } /** * 获取并移除此队列的头,如果此队列为空,则抛出异常。 * * @param queueName * 队列名字 * @return * @throws Exception */ @Override public E remove(String queueName) throws Exception { return this.getQueueByName(queueName).remove(); } /** * 根据队列名删除某一元素 * * @param queueName * 队列名字 * @param o * 删除的元素 * @return * @throws Exception */ @Override public boolean remove(String queueName, Object o) throws Exception { return this.getQueueByName(queueName).remove(o); } /** * * @param queueName * 队列名字 * @param c * 删除的元素 * @return * @throws Exception */ @Override public boolean removeAll(String queueName, Collection c) throws Exception { return this.getQueueByName(queueName).removeAll(c); } /** * 清空队列 * * @param queueName * 队列名字 * @throws Exception */ @Override public void clear(String queueName) throws Exception { this.getQueueByName(queueName).clear(); } /** * 判断 名称与参数一致的 队列 中是否有元素 * * @param queueName * 队列名 * @return * @throws Exception */ @Override public boolean isEmpty(String queueName) throws Exception { return this.getQueueByName(queueName).isEmpty(); } /** * 根据 队列名 判断队列中已有元素的歌声 * * @param queueName * 队列名 * @return * @throws Exception */ @Override public int size(String queueName) throws Exception { return this.getQueueByName(queueName).size(); } /** * 根据队列名判断队列中是否包含某一元素 * * @param queueName * 队列名 * @param o * 元素 * @return * @throws Exception */ @Override public boolean contains(String queueName, Object o) throws Exception { return this.getQueueByName(queueName).contains(o); } /** * 根据队列名判断队列中是否包含某些元素 * * @param queueName * 队列名 * @param c * 元素集合 * @return * @throws Exception */ @Override public boolean containsAll(String queueName, Collection c) throws Exception { return this.getQueueByName(queueName).containsAll(c); } /** * 根据队列名将某一队列中的元素转换为Object数组形式 * * @param queueName * @return * @throws Exception */ @Override public Object[] toArray(String queueName) throws Exception { return this.getQueueByName(queueName).toArray(); } /** * 根据队列名将某一队列中的元素转换为某一特定类型的数组形式 * * @param queueName * 队列名 * @param a * @return * @throws Exception */ @Override public T[] toArray(String queueName, T[] a) throws Exception { return this.getQueueByName(queueName).toArray(a); } /** * 根据队列名遍历队列中所有元素 * * @param queueName * 队列名 * @return * @throws Exception */ @Override public Iterator iterator(String queueName) throws Exception { return this.getQueueByName(queueName).iterator(); } @Override public Iterator iterator(String[] queueName) throws Exception { // TODO Auto-generated method stub return null; } } ",0 "opengamma.analytics.math.curve; import com.opengamma.analytics.math.function.Function; import com.opengamma.util.ArgumentChecker; /** * A function that performs subtraction on each of the constituent curves. *

              * Given a number of curves $C_1(x_{i_1}, y_{i_1}) , C_2(x_{i_2}, y_{i_2}), \ldots C_n(x_{i_n}, y_{i_n})$, returns a function $F$ * that for a value $x$ will return: * $$ * \begin{eqnarray*} * F(x) = C_1 |_x - C_2 |_x - \ldots - C_n |_x * \end{eqnarray*} * $$ */ public class SubtractCurveSpreadFunction implements CurveSpreadFunction { /** The operation name */ public static final String NAME = ""-""; /** An instance of this function */ private static final SubtractCurveSpreadFunction INSTANCE = new SubtractCurveSpreadFunction(); /** * Gets an instance of this function * @return The instance */ public static CurveSpreadFunction getInstance() { return INSTANCE; } /** * @deprecated Use {@link #getInstance()} */ @Deprecated public SubtractCurveSpreadFunction() { } /** * @param curves An array of curves, not null or empty * @return A function that will find the value of each curve at the given input x and subtract each in turn */ @SuppressWarnings(""unchecked"") @Override public Function evaluate(final Curve... curves) { ArgumentChecker.notEmpty(curves, ""curves""); return new Function() { @Override public Double evaluate(final Double... x) { ArgumentChecker.notEmpty(x, ""x""); final double x0 = x[0]; double y = curves[0].getYValue(x0); for (int i = 1; i < curves.length; i++) { y -= curves[i].getYValue(x0); } return y; } }; } @Override public String getOperationName() { return NAME; } @Override public String getName() { return NAME; } } ",0 "ght (c) 2006-2007 Philipp Zabel * * Based on hx4700.c, spitz.c and others. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include ""generic.h"" /* * IRDA */ static void magician_irda_transceiver_mode(struct device *dev, int mode) { gpio_set_value(GPIO83_MAGICIAN_nIR_EN, mode & IR_OFF); } static struct pxaficp_platform_data magician_ficp_info = { .transceiver_cap = IR_SIRMODE | IR_OFF, .transceiver_mode = magician_irda_transceiver_mode, }; /* * GPIO Keys */ static struct gpio_keys_button magician_button_table[] = { {KEY_POWER, GPIO0_MAGICIAN_KEY_POWER, 0, ""Power button""}, {KEY_ESC, GPIO37_MAGICIAN_KEY_HANGUP, 0, ""Hangup button""}, {KEY_F10, GPIO38_MAGICIAN_KEY_CONTACTS, 0, ""Contacts button""}, {KEY_CALENDAR, GPIO90_MAGICIAN_KEY_CALENDAR, 0, ""Calendar button""}, {KEY_CAMERA, GPIO91_MAGICIAN_KEY_CAMERA, 0, ""Camera button""}, {KEY_UP, GPIO93_MAGICIAN_KEY_UP, 0, ""Up button""}, {KEY_DOWN, GPIO94_MAGICIAN_KEY_DOWN, 0, ""Down button""}, {KEY_LEFT, GPIO95_MAGICIAN_KEY_LEFT, 0, ""Left button""}, {KEY_RIGHT, GPIO96_MAGICIAN_KEY_RIGHT, 0, ""Right button""}, {KEY_KPENTER, GPIO97_MAGICIAN_KEY_ENTER, 0, ""Action button""}, {KEY_RECORD, GPIO98_MAGICIAN_KEY_RECORD, 0, ""Record button""}, {KEY_VOLUMEUP, GPIO100_MAGICIAN_KEY_VOL_UP, 0, ""Volume up""}, {KEY_VOLUMEDOWN, GPIO101_MAGICIAN_KEY_VOL_DOWN, 0, ""Volume down""}, {KEY_PHONE, GPIO102_MAGICIAN_KEY_PHONE, 0, ""Phone button""}, {KEY_PLAY, GPIO99_MAGICIAN_HEADPHONE_IN, 0, ""Headset button""}, }; static struct gpio_keys_platform_data gpio_keys_data = { .buttons = magician_button_table, .nbuttons = ARRAY_SIZE(magician_button_table), }; static struct platform_device gpio_keys = { .name = ""gpio-keys"", .dev = { .platform_data = &gpio_keys_data, }, .id = -1, }; /* * LCD - Toppoly TD028STEB1 */ static struct pxafb_mode_info toppoly_modes[] = { { .pixclock = 96153, .bpp = 16, .xres = 240, .yres = 320, .hsync_len = 11, .vsync_len = 3, .left_margin = 19, .upper_margin = 2, .right_margin = 10, .lower_margin = 2, .sync = 0, }, }; static struct pxafb_mach_info toppoly_info = { .modes = toppoly_modes, .num_modes = 1, .fixed_modes = 1, .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, .lccr3 = LCCR3_PixRsEdg, }; /* * Backlight */ static void magician_set_bl_intensity(int intensity) { if (intensity) { PWM_CTRL0 = 1; PWM_PERVAL0 = 0xc8; PWM_PWDUTY0 = intensity; pxa_set_cken(CKEN_PWM0, 1); } else { pxa_set_cken(CKEN_PWM0, 0); } } static struct generic_bl_info backlight_info = { .default_intensity = 0x64, .limit_mask = 0x0b, .max_intensity = 0xc7, .set_bl_intensity = magician_set_bl_intensity, }; static struct platform_device backlight = { .name = ""corgi-bl"", .dev = { .platform_data = &backlight_info, }, .id = -1, }; /* * USB OHCI */ static int magician_ohci_init(struct device *dev) { UHCHR = (UHCHR | UHCHR_SSEP2 | UHCHR_PCPL | UHCHR_CGR) & ~(UHCHR_SSEP1 | UHCHR_SSEP3 | UHCHR_SSE); return 0; } static struct pxaohci_platform_data magician_ohci_info = { .port_mode = PMM_PERPORT_MODE, .init = magician_ohci_init, .power_budget = 0, }; /* * StrataFlash */ #define PXA_CS_SIZE 0x04000000 static struct resource strataflash_resource = { .start = PXA_CS0_PHYS, .end = PXA_CS0_PHYS + PXA_CS_SIZE - 1, .flags = IORESOURCE_MEM, }; static struct physmap_flash_data strataflash_data = { .width = 4, }; static struct platform_device strataflash = { .name = ""physmap-flash"", .id = -1, .num_resources = 1, .resource = &strataflash_resource, .dev = { .platform_data = &strataflash_data, }, }; /* * Platform devices */ static struct platform_device *devices[] __initdata = { &gpio_keys, &backlight, &strataflash, }; static void __init magician_init(void) { platform_add_devices(devices, ARRAY_SIZE(devices)); pxa_set_ohci_info(&magician_ohci_info); pxa_set_ficp_info(&magician_ficp_info); set_pxa_fb_info(&toppoly_info); } MACHINE_START(MAGICIAN, ""HTC Magician"") .phys_io = 0x40000000, .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, .boot_params = 0xa0000100, .map_io = pxa_map_io, .init_irq = pxa27x_init_irq, .init_machine = magician_init, .timer = &pxa_timer, MACHINE_END ",0 "tion, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of The Linux Foundation, Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED ""AS IS"" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include /* * This is the predefined adc configuration values for the supported * channels */ static struct adc_conf adc_data[] = { CHAN_INIT(VADC_USR1_BASE, VADC_BAT_CHAN_ID, VADC_MODE_NORMAL, VADC_DECIM_RATIO_VAL, HW_SET_DELAY_100US, FAST_AVG_SAMP_1, CALIB_RATIO), CHAN_INIT(VADC_USR1_BASE, VADC_BAT_VOL_CHAN_ID, VADC_MODE_NORMAL, VADC_DECIM_RATIO_VAL, HW_SET_DELAY_100US, FAST_AVG_SAMP_1, CALIB_ABS), CHAN_INIT(VADC_USR1_BASE, MPP_8_CHAN_ID, VADC_MODE_NORMAL, VADC_DECIM_RATIO_VAL, HW_SET_DELAY_100US, FAST_AVG_SAMP_1, CALIB_ABS), CHAN_INIT(VADC_USR1_BASE, MPP_2_CHAN_ID, VADC_MODE_NORMAL, VADC_DECIM_RATIO_VAL, HW_SET_DELAY_100US, FAST_AVG_SAMP_1, CALIB_ABS), }; static struct adc_conf* get_channel_prop(uint16_t ch_num) { struct adc_conf *chan_data = NULL; uint8_t i; for(i = 0; i < ARRAY_SIZE(adc_data) ; i++) { chan_data = &adc_data[i]; if (chan_data->chan == ch_num) break; } return chan_data; } static void adc_limit_result_range(uint16_t *result) { if (*result < VADC_MIN_VAL) *result = VADC_MIN_VAL; else if(*result > VADC_MAX_VAL) *result = VADC_MAX_VAL; } static void adc_read_conv_result(struct adc_conf *adc, uint16_t *result) { uint8_t val = 0; /* Read the MSB part */ val = REG_READ(adc->base + VADC_REG_DATA_MSB); *result = val; /* Read the LSB part */ val = REG_READ(adc->base + VADC_REG_DATA_LSB); *result = ((*result) << 8) | val; adc_limit_result_range(result); } static void adc_enable(struct adc_conf *adc, uint8_t enable) { if (enable) REG_WRITE((adc->base + VADC_EN_CTL), VADC_CTL_EN_BIT); else REG_WRITE((adc->base + VADC_EN_CTL), (uint8_t) (~VADC_CTL_EN_BIT)); } static void adc_measure(struct adc_conf *adc, uint16_t *result) { uint8_t status; /* Request conversion */ REG_WRITE((adc->base + VADC_CONV_REQ), VADC_CON_REQ_BIT); /* Poll for the conversion to complete */ do { status = REG_READ(adc->base + VADC_STATUS); status &= VADC_STATUS_MASK; if (status == VADC_STATUS_EOC) { dprintf(SPEW, ""ADC conversion is complete\n""); break; } /* Wait for sometime before polling for the status again */ udelay(10); } while(1); /* Now read the conversion result */ adc_read_conv_result(adc, result); } /* * This function configures adc & requests for conversion */ static uint16_t adc_configure(struct adc_conf *adc) { uint8_t mode; uint8_t adc_p; uint16_t result; /* Mode Selection */ mode = (adc->mode << VADC_MODE_BIT_NORMAL); REG_WRITE((adc->base + VADC_MODE_CTRL), mode); /* Select Channel */ REG_WRITE((adc->base + VADC_CHAN_SEL), adc->chan); /* ADC digital param setup */ adc_p = (adc->adc_param << VADC_DECIM_RATIO_SEL); REG_WRITE((adc->base + VADC_DIG_ADC_PARAM), adc_p); /* hardware settling time */ REG_WRITE((adc->base + VADC_HW_SETTLE_TIME), adc->hw_set_time); /* For normal mode set the fast avg */ REG_WRITE((adc->base + VADC_FAST_AVG), adc->fast_avg); /* Enable Vadc */ adc_enable(adc, true); /* Measure the result */ adc_measure(adc, &result); /* Disable vadc */ adc_enable(adc, false); return result; } static uint32_t vadc_calibrate(uint16_t result, uint8_t calib_type) { struct adc_conf calib; uint16_t calib1; uint16_t calib2; uint32_t calib_result = 0; uint32_t mul; if(calib_type == CALIB_ABS) { /* * Measure the calib data for 1.25 V ref */ calib.base = VADC_USR1_BASE; calib.chan = VREF_125_CHAN_ID; calib.mode = VADC_MODE_NORMAL; calib.adc_param = VADC_DECIM_RATIO_VAL; calib.hw_set_time = 0x0; calib.fast_avg = 0x0; calib1 = adc_configure(&calib); /* * Measure the calib data for 0.625 V ref */ calib.base = VADC_USR1_BASE; calib.chan = VREF_625_CHAN_ID; calib.mode = VADC_MODE_NORMAL; calib.adc_param = VADC_DECIM_RATIO_VAL; calib.hw_set_time = 0x0; calib.fast_avg = 0x0; calib2 = adc_configure(&calib); mul = VREF_625_MV / (calib1 - calib2); calib_result = (result - calib2) * mul; calib_result += VREF_625_MV; calib_result *= OFFSET_GAIN_DNOM; calib_result /= OFFSET_GAIN_NUME; } else if(calib_type == CALIB_RATIO) { /* * Measure the calib data for VDD_ADC ref */ calib.base = VADC_USR1_BASE; calib.chan = VDD_VADC_CHAN_ID; calib.mode = VADC_MODE_NORMAL; calib.adc_param = VADC_DECIM_RATIO_VAL; calib.hw_set_time = 0; calib.fast_avg = 0; calib1 = adc_configure(&calib); /* * Measure the calib data for ADC_GND */ calib.base = VADC_USR1_BASE; calib.chan = GND_REF_CHAN_ID; calib.mode = VADC_MODE_NORMAL; calib.adc_param = VADC_DECIM_RATIO_VAL; calib.hw_set_time = 0; calib.fast_avg = 0; calib2 = adc_configure(&calib); mul = VREF_18_V / (calib1 - calib2); calib_result = (result - calib2) * mul; } return calib_result; } /* * This API takes channel number as input * & returns the calibrated voltage as output * The calibrated result is the voltage in uVs */ uint32_t pm8x41_adc_channel_read(uint16_t ch_num) { struct adc_conf *adc; uint16_t result; uint32_t calib_result; adc = get_channel_prop(ch_num); if (!adc) { dprintf(CRITICAL, ""Error: requested channel is not supported: %u\n"", ch_num); return 0; } result = adc_configure(adc); calib_result = vadc_calibrate(result, adc->calib_type); dprintf(CRITICAL, ""Result: Raw %u\tCalibrated:%u\n"", result, calib_result); return calib_result; } /* * This function configures the maximum * current for USB in uA */ int pm8x41_iusb_max_config(uint32_t current) { uint32_t mul; if(current < IUSB_MIN_UA || current > IUSB_MAX_UA) { dprintf(CRITICAL, ""Error: Current value for USB are not in permissible range\n""); return -1; } if (current == USB_CUR_100UA) mul = 0x0; else if (current == USB_CUR_150UA) mul = 0x1; else mul = current / USB_CUR_100UA; REG_WRITE(IUSB_MAX_REG, mul); return 0; } /* * This function configures the maximum * current for battery in uA */ int pm8x41_ibat_max_config(uint32_t current) { uint32_t mul; if(current < IBAT_MIN_UA || current > IBAT_MAX_UA) { dprintf(CRITICAL, ""Error: Current value for BAT are not in permissible range\n""); return -1; } mul = (current - BAT_CUR_100UA) / BAT_CUR_STEP; REG_WRITE(IBAT_MAX_REG, mul); return 0; } /* * API: pm8x41_chgr_vdd_max_config * Configure the VDD max to i/p value */ int pm8x41_chgr_vdd_max_config(uint32_t vol) { uint8_t mul; /* Check for permissible range of i/p */ if (vol < VDD_MIN_UA || vol > VDD_MAX_UA) { dprintf(CRITICAL, ""Error: Voltage values are not in permissible range\n""); return -1; } /* Calculate the multiplier */ mul = (vol - VDD_MIN_UA) / VDD_VOL_STEP; /* Write to VDD_MAX register */ REG_WRITE(CHGR_VDD_MAX, mul); return 0; } /* * API: pm8x41_chgr_ctl_enable * Enable FSM-controlled autonomous charging */ int pm8x41_chgr_ctl_enable(uint8_t enable) { /* If charging has to be enabled? * 1. Enable charging in charge control * 2. Enable boot done to enable charging */ if (enable) { REG_WRITE(CHGR_CHG_CTRL, (CHGR_ENABLE << CHGR_EN_BIT)); REG_WRITE(MISC_BOOT_DONE, (BOOT_DONE << BOOT_DONE_BIT)); } else REG_WRITE(CHGR_CHG_CTRL, CHGR_DISABLE); return 0; } /* * API: pm8x41_get_batt_voltage * Get calibrated battery voltage from VADC, in UV */ uint32_t pm8x41_get_batt_voltage() { uint32_t voltage; voltage = pm8x41_adc_channel_read(VADC_BAT_VOL_CHAN_ID); if(!voltage) { dprintf(CRITICAL, ""Error getting battery Voltage\n""); return 0; } return voltage; } /* * API: pm8x41_get_voltage_based_soc * Get voltage based State Of Charge, this takes vdd max & battery cutoff * voltage as i/p in uV */ uint32_t pm8x41_get_voltage_based_soc(uint32_t cutoff_vol, uint32_t vdd_max) { uint32_t vol_soc; uint32_t batt_vol; batt_vol = pm8x41_get_batt_voltage(); if(!batt_vol) { dprintf(CRITICAL, ""Error: Getting battery voltage based Soc\n""); return 0; } if (cutoff_vol >= vdd_max) { dprintf(CRITICAL, ""Cutoff is greater than VDD max, Voltage based soc can't be calculated\n""); return 0; } vol_soc = ((batt_vol - cutoff_vol) * 100) / (vdd_max - cutoff_vol); return vol_soc; } /* * API: pm8x41_enable_mpp_as_adc * Configurate the MPP pin as the ADC feature. */ void pm8x41_enable_mpp_as_adc(uint16_t mpp_num) { uint32_t val; if(mpp_num > MPP_MAX_NUM) { dprintf(CRITICAL, ""Error: The MPP pin number is unavailable\n""); return; } /* set the MPP mode as AIN */ val = (MPP_MODE_AIN << Q_REG_MODE_SEL_SHIFT) \ | (0x1 << Q_REG_OUT_INVERT_SHIFT) \ | (0x0 << Q_REG_SRC_SEL_SHIFT); REG_WRITE((MPP_REG_BASE + mpp_num * MPP_REG_RANGE + Q_REG_MODE_CTL), val); /* Enable the MPP */ val = (MPP_MASTER_ENABLE << Q_REG_MASTER_EN_SHIFT); REG_WRITE((MPP_REG_BASE + mpp_num * MPP_REG_RANGE + Q_REG_EN_CTL), val); /* AIN route to AMUX8 */ val = (MPP_AIN_ROUTE_AMUX3 << Q_REG_AIN_ROUTE_SHIFT); REG_WRITE((MPP_REG_BASE + mpp_num * MPP_REG_RANGE + Q_REG_AIN_CTL), val); } void pm8x41_enable_mpp_as_adc_for_mpp2(uint16_t mpp_num) { uint32_t val; if(mpp_num >MPP_MAX_NUM) {dprintf(CRITICAL,""Error: The MPP pin number is unavailable\n""); return;} /* set the MPP mode as AIN */ val =(MPP_MODE_AIN < #include #include #include #include #include int getFlashType(char* device) { libmtd_t libmtd = libmtd_open(); if (libmtd == NULL) { if (errno == 0) my_printf(""MTD is not present in the system""); my_printf(""cannot open libmtd %s"", strerror(errno)); return -1; } struct mtd_dev_info mtd; int err = mtd_get_dev_info(libmtd, device, &mtd); if (err) { my_fprintf(stderr, ""cannot get information about \""%s\""\n"", device); return -1; } libmtd_close(libmtd); return mtd.type; } int flash_erase(char* device, char* context, int quiet, int no_write) { optind = 0; // reset getopt_long char* argv[] = { ""flash_erase"", // program name device, // device ""0"", // start offset ""0"", // block count NULL }; int argc = (int)(sizeof(argv) / sizeof(argv[0])) - 1; if (!quiet) my_printf(""Erasing %s: flash_erase %s 0 0\n"", context, device); if (!no_write) if (flash_erase_main(argc, argv) != 0) return 0; return 1; } int flash_erase_jffs2(char* device, char* context, int quiet, int no_write) { optind = 0; // reset getopt_long char* argv[] = { ""flash_erase"", // program name ""-j"", // format the device for jffs2 device, // device ""0"", // start offset ""0"", // block count NULL }; int argc = (int)(sizeof(argv) / sizeof(argv[0])) - 1; if (!quiet) my_printf(""Erasing %s: flash_erase -j %s 0 0\n"", context, device); if (!no_write) if (flash_erase_main(argc, argv) != 0) return 0; return 1; } int flash_write(char* device, char* filename, int quiet, int no_write) { optind = 0; // reset getopt_long char opts[4]; strcpy(opts, ""-pm""); char* argv[] = { ""nandwrite"", // program name opts, // options -p for pad and -m for mark bad blocks device, // device filename, // file to flash NULL }; int argc = (int)(sizeof(argv) / sizeof(argv[0])) - 1; if (!quiet) my_printf(""Flashing kernel: nandwrite %s %s %s\n"", opts, device, filename); if (!no_write) if (nandwrite_main(argc, argv) != 0) return 0; return 1; } int ubi_write(char* device, char* filename, int quiet, int no_write) { optind = 0; // reset getopt_long char* argv[] = { ""ubiformat"", // program name device, // device ""-f"", // flash file filename, // file to flash ""-D"", // no detach check NULL }; int argc = (int)(sizeof(argv) / sizeof(argv[0])) - 1; my_printf(""Flashing rootfs: ubiformat %s -f %s\n"", device, filename); if (!no_write) if (ubiformat_main(argc, argv) != 0) return 0; return 1; } int ubi_detach_dev(char* device, int quiet, int no_write) { optind = 0; // reset getopt_long char* argv[] = { ""ubidetach"", // program name ""-p"", // path to device device, // device NULL }; int argc = (int)(sizeof(argv) / sizeof(argv[0])) - 1; my_printf(""Detach rootfs: ubidetach -p %s\n"", device); if (!no_write) if (ubidetach_main(argc, argv) != 0) return 0; return 1; } int flashcp(char* device, char* filename, int reboot, int quiet, int no_write) { optind = 0; // reset getopt_long char opts[4]; if (reboot) strcpy(opts, ""-vr\0""); else strcpy(opts, ""-v\0""); char* argv[] = { ""flashcp"", // program name opts, // options -v verbose -r reboot immediately after flashing filename, // file to flash device, // device NULL }; int argc = (int)(sizeof(argv) / sizeof(argv[0])) - 1; my_printf(""Flashing rootfs: flashcp %s %s %s\n"", opts, filename, device); if (!no_write) if (flashcp_main(argc, argv) != 0) return 0; return 1; } int flash_ubi_jffs2_kernel(char* device, char* filename, int quiet, int no_write) { int type = getFlashType(device); if (type == -1) return 0; if (type == MTD_NANDFLASH || type == MTD_MLCNANDFLASH) { my_printf(""Found NAND flash\n""); // Erase set_step(""Erasing kernel""); if (!flash_erase(device, ""kernel"", quiet, no_write)) { my_printf(""Error erasing kernel! System might not boot. If you have problems please flash backup!\n""); return 0; } // Flash set_step(""Writing kernel""); if (!flash_write(device, filename, quiet, no_write)) { my_printf(""Error flashing kernel! System won't boot. Please flash backup!\n""); return 0; } } else if (type == MTD_NORFLASH) { my_printf(""Found NOR flash\n""); if (!flashcp(device, filename, 0, quiet, no_write)) { my_printf(""Error flashing kernel! System won't boot. Please flash backup!\n""); return 0; } } else { my_fprintf(stderr, ""Flash type \""%d\"" not supported\n"", type); return 0; } return 1; } int flash_ubi_jffs2_rootfs(char* device, char* filename, enum RootfsTypeEnum rootfs_type, int quiet, int no_write) { int type = getFlashType(device); if (type == -1) return 0; if ((type == MTD_NANDFLASH || type == MTD_MLCNANDFLASH) && rootfs_type == UBIFS) { my_printf(""Found NAND flash\n""); if (!ubi_write(device, filename, quiet, no_write)) return 0; } else if ((type == MTD_NANDFLASH || type == MTD_MLCNANDFLASH) && rootfs_type == JFFS2) { my_printf(""Found NAND flash\n""); if (!flash_erase_jffs2(device, ""rootfs"", quiet, no_write)) return 0; if (!flash_write(device, filename, quiet, no_write)) return 0; } else if (type == MTD_NORFLASH && rootfs_type == JFFS2) { my_printf(""Found NOR flash\n""); if (!flashcp(device, filename, 1, quiet, no_write)) return 0; } else { my_fprintf(stderr, ""Flash type \""%d\"" in combination with rootfs type %d is not supported\n"", type, rootfs_type); return 0; } return 1; }",0 "Nugget; import com.InfinityRaider.AgriCraft.reference.Data; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public abstract class OreDictHelper { private static final Map oreBlocks = new HashMap(); private static final Map oreBlockMeta = new HashMap(); private static final Map nuggets = new HashMap(); private static final Map nuggetMeta = new HashMap(); public static Block getOreBlockForName(String name) { return oreBlocks.get(name); } public static int getOreMetaForName(String name) { return oreBlockMeta.get(name); } public static Item getNuggetForName(String name) { return nuggets.get(name); } public static int getNuggetMetaForName(String name) { return nuggetMeta.get(name); } //checks if an itemstack has this ore dictionary entry public static boolean hasOreId(ItemStack stack, String tag) { if(stack==null || stack.getItem()==null) { return false; } int[] ids = OreDictionary.getOreIDs(stack); for(int id:ids) { if(OreDictionary.getOreName(id).equals(tag)) { return true; } } return false; } public static boolean hasOreId(Block block, String tag) { return block != null && hasOreId(new ItemStack(block), tag); } //checks if two blocks have the same ore dictionary entry public static boolean isSameOre(Block block1, int meta1, Block block2, int meta2) { if(block1==block2 && meta1==meta2) { return true; } if(block1==null || block2==null) { return false; } int[] ids1 = OreDictionary.getOreIDs(new ItemStack(block1, 1, meta1)); int[] ids2 = OreDictionary.getOreIDs(new ItemStack(block2, 1, meta2)); for (int id1:ids1) { for (int id2:ids2) { if (id1==id2) { return true; } } } return false; } //finds the ingot for a nugget ore dictionary entry public static ItemStack getIngot(String ore) { ItemStack ingot = null; ArrayList entries = OreDictionary.getOres(""ingot"" + ore); if (entries.size() > 0 && entries.get(0).getItem() != null) { ingot = entries.get(0); } return ingot; } //finds what ores and nuggets are already registered in the ore dictionary public static void getRegisteredOres() { //Vanilla for (String oreName : Data.vanillaNuggets) { getOreBlock(oreName); if(oreBlocks.get(oreName)!=null) { getNugget(oreName); } } //Modded for (String[] data : Data.modResources) { String oreName = data[0]; getOreBlock(oreName); if(oreBlocks.get(oreName)!=null) { getNugget(oreName); } } } private static void getOreBlock(String oreName) { for (ItemStack itemStack : OreDictionary.getOres(""ore""+oreName)) { if (itemStack.getItem() instanceof ItemBlock) { ItemBlock block = (ItemBlock) itemStack.getItem(); oreBlocks.put(oreName, block.field_150939_a); oreBlockMeta.put(oreName, itemStack.getItemDamage()); break; } } } private static void getNugget(String oreName) { List nuggets = OreDictionary.getOres(""nugget"" + oreName); if (!nuggets.isEmpty()) { Item nugget = nuggets.get(0).getItem(); OreDictHelper.nuggets.put(oreName, nugget); nuggetMeta.put(oreName, nuggets.get(0).getItemDamage()); } else { ItemAgricraft nugget = new ItemNugget(oreName); OreDictionary.registerOre(""nugget""+oreName, nugget); OreDictHelper.nuggets.put(oreName, nugget); nuggetMeta.put(oreName, 0); } } public static ArrayList getFruitsFromOreDict(ItemStack seed) { return getFruitsFromOreDict(seed, true); } public static ArrayList getFruitsFromOreDict(ItemStack seed, boolean sameMod) { String seedModId = IOHelper.getModId(seed); ArrayList fruits = new ArrayList(); for(int id:OreDictionary.getOreIDs(seed)) { if(OreDictionary.getOreName(id).substring(0,4).equalsIgnoreCase(""seed"")) { String name = OreDictionary.getOreName(id).substring(4); ArrayList fromOredict = OreDictionary.getOres(""crop""+name); for(ItemStack stack:fromOredict) { if(stack==null || stack.getItem()==null) { continue; } String stackModId = IOHelper.getModId(stack); if((!sameMod) || stackModId.equals(seedModId)) { fruits.add(stack); } } } } return fruits; } } ",0 "ompliance 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. */ package com.thoughtworks.go.mail; import com.thoughtworks.go.util.command.StreamConsumer; import com.thoughtworks.go.util.command.ProcessOutputStreamConsumer; public class SysOutStreamConsumer extends ProcessOutputStreamConsumer { public SysOutStreamConsumer() { super(new SysOut(), new SysOut()); } private static class SysOut implements StreamConsumer { @Override public void consumeLine(String line) { System.out.println(line); } } } ",0 "rg/1999/xhtml""> Taobao Cpp/Qt SDK: InventoryQueryResponse Class Reference

              Key Value type Brief
              serverId Number A unique server ID.
              time Number
              eventValue Number
              triggerId Number
              status Number
              severity Number
              lastChangeTime Number
              hostId String
              hostName String
              brief String Brief of the event(trigger).
              Taobao Cpp/Qt SDK
              InventoryQueryResponse Class Reference

              TOP RESPONSE API: 商家查询商品总体库存信息 More...

              #include <InventoryQueryResponse.h>

              Public Member Functions

              virtual ~InventoryQueryResponse ()
               
              QList< InventorySumgetItemInventorys () const
               
              void setItemInventorys (QList< InventorySum > itemInventorys)
               
              QList< TipInfogetTipInfos () const
               
              void setTipInfos (QList< TipInfo > tipInfos)
               
              virtual void parseNormalResponse ()
               
               Public Member Functions inherited from TaoResponse
               TaoResponse ()
               
              virtual ~TaoResponse ()
               
              void parseResponse ()
               
              void setParser (Parser *parser)
               
              void parseError ()
               
              QString getErrorCode () const
               
              void setErrorCode (const QString &errorCode)
               
              QString getMsg () const
               
              void setMsg (const QString &msg)
               
              QString getSubCode () const
               
              void setSubCode (const QString &subCode)
               
              QString getSubMsg () const
               
              void setSubMsg (const QString &subMsg)
               
              bool isSuccess ()
               
              QString getTopForbiddenFields () const
               
              void setTopForbiddenFields (const QString &topForbiddenFields)
               

              Private Attributes

              QList< InventorySumitemInventorys
               商品总体库存信息 More...
               
              QList< TipInfotipInfos
               提示信息,提示不存在的后端商品 More...
               

              Additional Inherited Members

               Public Attributes inherited from TaoResponse
              ParserresponseParser
               

              Detailed Description

              TOP RESPONSE API: 商家查询商品总体库存信息

              Author
              sd44 sd44s.nosp@m.dd44.nosp@m.@yeah.nosp@m..net

              Constructor & Destructor Documentation

              virtual InventoryQueryResponse::~InventoryQueryResponse ( )
              inlinevirtual

              Member Function Documentation

              QList< InventorySum > InventoryQueryResponse::getItemInventorys ( ) const
              QList< TipInfo > InventoryQueryResponse::getTipInfos ( ) const
              void InventoryQueryResponse::parseNormalResponse ( )
              virtual

              Implements TaoResponse.

              void InventoryQueryResponse::setItemInventorys ( QList< InventorySum itemInventorys)
              void InventoryQueryResponse::setTipInfos ( QList< TipInfo tipInfos)

              Member Data Documentation

              QList<InventorySum> InventoryQueryResponse::itemInventorys
              private

              商品总体库存信息

              QList<TipInfo> InventoryQueryResponse::tipInfos
              private

              提示信息,提示不存在的后端商品


              The documentation for this class was generated from the following files:

              Generated on Sun Apr 14 2013 16:25:39 for Taobao Cpp/Qt SDK by   1.8.3.1
              ",0 "html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en_US"" lang=""en_US""> Qt 4.8: Getting Started Guides
              • Home
              • Getting Started Guides

              Getting Started Guides

              Creating applications using Qt and QML is easy enough once you get started.

              To get you started we have created two tutorials creating two similar applications, but using different approaches. One tutorial implements the user interface using QML, while the other implements the whole application using traditional Qt.

              Please click on the links below to start the ride.

              Getting Started Programming with QML

              Getting Started Programming with Qt

              © 2014 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.


              The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.

              Documentation sources may be obtained from www.qt-project.org.


              Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy

              ",0 "r->action === 'edit'; $texts = \MapasCulturais\Themes\BaseV1\Theme::_dict(); ?>

              $group): ?>

              $def): $skey = str_replace(' ', '+', $key); $section = substr($key, 0, strpos($key, "":"")); if($section != $gname) continue; ?>

              required js-optional hidden""> "">: "" data-original-title="""" data-emptytext=""dict[$key]) && !empty($entity->dict[$key])? '': 'utilizando valor padrão (clique para definir)';?>"" data-examples="""" data-placeholder='dict[$key]) && !empty($entity->dict[$key])? $entity->dict[$key]:$def['text'] ; ?>'>dict[$key]) ? $entity->dict[$key] : ''; ?>

              ",0 "free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; either version 3 of the License, or (at * your option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public * License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * http://www.fsf.org/licensing/licenses/lgpl.html */ package org.cristalise.kernel.lookup; public class InvalidPathException extends Exception { private static final long serialVersionUID = -1980471517943177915L; public InvalidPathException() { super(); } public InvalidPathException(String msg) { super(msg); } } ",0 " General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. // // // Callbacks // #ifndef IRMO_WORLD_CLASS_CALLBACK_DATA_H #define IRMO_WORLD_CLASS_CALLBACK_DATA_H /*! * Class callback data. * * This structure encapsulates the different callback lists used to * watch events related to all objects of a particular class. This * is an extension of the @ref ObjectCallbackData structure (it also * monitors creation of new objects). * * Each @ref IrmoWorld has a class callback structure for each class * in the interface used by the world, plus a ""top-level"" class * callback structure for monitoring events related to objects of * all classes. */ typedef struct _ClassCallbackData ClassCallbackData; #include ""interface/class.h"" #include ""object-callback-data.h"" struct _ClassCallbackData { // Class that this applies to. IrmoClass *klass; // Parent class callback data structure. // For the top-level callbacks structure, this is NULL. ClassCallbackData *parent_data; // List of callbacks for watching creation of new objects. IrmoCallbackList new_callbacks; // Other callback lists in common with those used for // object callbacks. ObjectCallbackData object_callbacks; }; /*! * Initialise a @ref ClassCallbackData structure. * * @param data The structure to initialise. * @param parent_data Structure for the parent class of this class. * @param klass The class for this structure. */ void irmo_class_callback_init(ClassCallbackData *data, ClassCallbackData *parent_data, IrmoClass *klass); /*! * Free data used for the specified @ref ClassCallbackData. * * @param data The structure. */ void irmo_class_callback_free(ClassCallbackData *data); /*! * Invoke callback functions in response to a variable of an object belonging * to a particular class being changed. * * @param data The @ref ClassCallbackData for the class. * @param object The object that was changed. * @param variable_index The index of the variable that was changed. */ void irmo_class_callback_raise(ClassCallbackData *data, IrmoObject *object, unsigned int variable_index); /*! * Invoke callback functions in response to an object of a particular class * being destroyed. * * @param data The @ref ClassCallbackData for the class. * @param object The object being destroyed. */ void irmo_class_callback_raise_destroy(ClassCallbackData *data, IrmoObject *object); /*! * Invoke callback functions in response to an object of a particular class * being created. * * @param data The @ref ClassCallbackData for the class. * @param object The new object. */ void irmo_class_callback_raise_new(ClassCallbackData *data, IrmoObject *object); /*! * Watch for changes to variables of objects of a particular class. * * @param data The @ref ClassCallbackData for the class. * @param variable_name Name of the variable to watch, or NULL * to watch for changes to all variables. * @param func The callback function to invoke. * @param user_data Extra data to pass to the callback function. * @return @ref IrmoCallback object to return representing * the callback. */ IrmoCallback *irmo_class_callback_watch(ClassCallbackData *data, char *variable_name, IrmoVarCallback func, void *user_data); /*! * Watch for when objects of a particular class are instantiated. * * @param data The @ref ClassCallbackData for the class. * @param func The callback function to invoke. * @param user_data Extra data to pass to the callback function. * @return @ref IrmoCallback object to return representing * the callback. */ IrmoCallback *irmo_class_callback_watch_new(ClassCallbackData *data, IrmoObjCallback func, void *user_data); /*! * Watch for when objects of a particular class are destroyed. * * @param data The @ref ClassCallbackData for the class. * @param func The callback function to invoke. * @param user_data Extra data to pass to the callback function. * @return @ref IrmoCallback object to return representing * the callback. */ IrmoCallback *irmo_class_callback_watch_destroy(ClassCallbackData *data, IrmoObjCallback func, void *user_data); #endif /* #ifndef IRMO_WORLD_CLASS_CALLBACK_DATA_H */ ",0 "itial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no""> {% if page.title %}{{ page.title }} • {{ site.title }}{% else %}{{ site.title }}{% endif %} ",0 " by javadoc (build 1.6.0_14) on Fri Sep 18 14:09:15 BST 2009 --> uk.org.mygrid.cagrid.servicewrapper.service.interproscan.stubs
              Overview   Package  Class  Use  Tree  Deprecated  Index  Help 
               PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES    

              Package uk.org.mygrid.cagrid.servicewrapper.service.interproscan.stubs

              Interface Summary
              InterProScanPortType  
               

              Class Summary
              InterProScanRequest  
              InterProScanRequestInterProScanInput  
              InterProScanResourceProperties  
              InterProScanResponse  
               


              Overview   Package  Class  Use  Tree  Deprecated  Index  Help 
               PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES    

              ",0 "after Section: Tcl Built-In Commands (3tcl)
              Updated: 7.5
              Index Return to Main Contents



               

              NAME

              after - 延迟一段时间之后执行一个命令  

              总览 SYNOPSIS

              after ms

              after ms ?script script script ...?

              after cancel id

              after cancel script script script ...

              after idle ?script script script ...?

              after info ?id?




               

              描述 DESCRIPTION


               这个命令被用于延迟执行程序或者在将来某时在后台执行一个命令。它有几种形式,依靠给命令的第一个参数(来区分):

              after ms
              Ms 必须是整数,给出以毫秒为单位的时间。命令在睡眠(sleep) ms 毫秒之后返回。当命令在睡眠的时候,应用不响应事件。
              after ms ?script script script ...?
              在这种形式中,命令立即返回,它安排一个 Tcl 命令在 ms 毫秒之后作为事件处理器(handler)来运行。在给定时间,命令将被精确的执行一次。延迟的命令是通过连接(concatenate)所有的 script 参数形成的,这与 concat 命令的方式(fashion)一样。命令将在全局层次上执行(在任何 Tcl 过程的上下文之外)。在执行延迟命令时如果有错误发生,则使用 bgerror 机制来报告错误。after 命令返回一个标识符,after cancel 命令用它来取消延迟的命令。
              after cancel id
              取消前面安排的延迟命令的执行。Id 指示要取消那条命令;它必须是前面 after 命令返回的。如果用 id 给出的命令已经执行了则 after cancel 命令不起作用。
              after cancel script script ...
              这个命令也取消一个延迟命令的执行。用空格分隔符来连接 script 参数(如同在 concat 命令中那样)。如果有一条等待的命令与这个字符串匹配,则取消它并永不执行;如果当前没有这样的等待命令则 after cancel 命令不起作用。
              after idle script ?script script ...?
              用空格分隔符连接 script 参数(如同在 concat 命令中那样),并被作为一个空闲回调(idle callback)来安排结果脚本在以后执行。下次进入事件循环并且没有事件要处理(的时候),这个脚本被精确的执行一次。命令返回一个标识符,after cancel 命令用它来取消延迟的命令。在执行延迟命令时如果有错误发生,则使用 bgerror 机制来报告错误。
              after info ?id?
              这个命令返回关于存在的事件处理器的信息。如果没提供 id 参数,命令为所有通过 after 命令给这个解释器建立的事件处理器返回一个标识符的列表。如果提供了 id,它指定一个现存的处理器;id 必须是以前调用 after 返回的值并且仍未被触发或取消。这种情况下命令返回一个有两个元素的列表。列表的第一个元素是与 id 关联的脚本,第二个元素要么是 idle 要么是 timer,指示它是那种类型的事件处理器。

              命令的 after msafter idle 形式假定应用是事件驱动的: 除非应用进入事件循环否则延迟命令将不被执行。在通常不事件驱动的应用中,如 tclsh,用 vwaitupdate 命令进入事件循环。

               

              参见 SEE ALSO

              bgerror

               

              关键字 KEYWORDS

              cancel, delay, idle callback, sleep, time

               

              [中文版维护人]

              寒蝉退士  

              [中文版最新更新]

              2001/06/21  

              《中国 Linux 论坛 man 手册页翻译计划》:

              http://cmpp.linuxforum.net


               

              Index

              NAME
              总览 SYNOPSIS
              描述 DESCRIPTION
              参见 SEE ALSO
              关键字 KEYWORDS
              [中文版维护人]
              [中文版最新更新]
              《中国 Linux 论坛 man 手册页翻译计划》:

              This document was created by man2html, using the manual pages.
              Time: 13:01:21 GMT, January 29, 2015 ",0 "/xhtml1-transitional.dtd""> Docs for page LoadBalancedTransport.php

              File: /vendors/swiftMailer/classes/Swift/Transport/LoadBalancedTransport.php

              Description

              Classes defined in this file

              CLASS NAME

              DESCRIPTION

              Swift_Transport_LoadBalancedTransport Redudantly and rotationally uses several Transports when sending.

              Include/Require Statements

              Global Variables

              Constants

              Functions


              Documentation generated on Fri, 12 Nov 2010 20:45:23 +0000 by phpDocumentor 1.4.3
              ",0 "01 Peter Bergner, IBM Corp. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include #include #define INIT_MEMBLOCK_REGIONS 128 struct memblock_region { phys_addr_t base; phys_addr_t size; #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP int nid; #endif }; struct memblock_type { unsigned long cnt; /* number of regions */ unsigned long max; /* size of the allocated array */ phys_addr_t total_size; /* size of all regions */ struct memblock_region *regions; }; struct memblock { phys_addr_t current_limit; struct memblock_type memory; struct memblock_type reserved; }; extern struct memblock memblock; extern int memblock_debug; #define memblock_dbg(fmt, ...) \ if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) phys_addr_t memblock_find_in_range_node(phys_addr_t start, phys_addr_t end, phys_addr_t size, phys_addr_t align, int nid); phys_addr_t memblock_find_in_range(phys_addr_t start, phys_addr_t end, phys_addr_t size, phys_addr_t align); phys_addr_t get_allocated_memblock_reserved_regions_info(phys_addr_t *addr); void memblock_allow_resize(void); int memblock_add_node(phys_addr_t base, phys_addr_t size, int nid); int memblock_add(phys_addr_t base, phys_addr_t size); int memblock_remove(phys_addr_t base, phys_addr_t size); int memblock_free(phys_addr_t base, phys_addr_t size); int memblock_reserve(phys_addr_t base, phys_addr_t size); #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn, unsigned long *out_end_pfn, int *out_nid); /** * for_each_mem_pfn_range - early memory pfn range iterator * @i: an integer used as loop variable * @nid: node selector, %MAX_NUMNODES for all nodes * @p_start: ptr to ulong for start pfn of the range, can be %NULL * @p_end: ptr to ulong for end pfn of the range, can be %NULL * @p_nid: ptr to int for nid of the range, can be %NULL * * Walks over configured memory ranges. Available after early_node_map is * populated. */ #define for_each_mem_pfn_range(i, nid, p_start, p_end, p_nid) \ for (i = -1, __next_mem_pfn_range(&i, nid, p_start, p_end, p_nid); \ i >= 0; __next_mem_pfn_range(&i, nid, p_start, p_end, p_nid)) #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */ void __next_free_mem_range(u64 *idx, int nid, phys_addr_t *out_start, phys_addr_t *out_end, int *out_nid); /** * for_each_free_mem_range - iterate through free memblock areas * @i: u64 used as loop variable * @nid: node selector, %MAX_NUMNODES for all nodes * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL * @p_nid: ptr to int for nid of the range, can be %NULL * * Walks over free (memory && !reserved) areas of memblock. Available as * soon as memblock is initialized. */ #define for_each_free_mem_range(i, nid, p_start, p_end, p_nid) \ for (i = 0, \ __next_free_mem_range(&i, nid, p_start, p_end, p_nid); \ i != (u64)ULLONG_MAX; \ __next_free_mem_range(&i, nid, p_start, p_end, p_nid)) void __next_free_mem_range_rev(u64 *idx, int nid, phys_addr_t *out_start, phys_addr_t *out_end, int *out_nid); /** * for_each_free_mem_range_reverse - rev-iterate through free memblock areas * @i: u64 used as loop variable * @nid: node selector, %MAX_NUMNODES for all nodes * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL * @p_nid: ptr to int for nid of the range, can be %NULL * * Walks over free (memory && !reserved) areas of memblock in reverse * order. Available as soon as memblock is initialized. */ #define for_each_free_mem_range_reverse(i, nid, p_start, p_end, p_nid) \ for (i = (u64)ULLONG_MAX, \ __next_free_mem_range_rev(&i, nid, p_start, p_end, p_nid); \ i != (u64)ULLONG_MAX; \ __next_free_mem_range_rev(&i, nid, p_start, p_end, p_nid)) #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP int memblock_set_node(phys_addr_t base, phys_addr_t size, int nid); static inline void memblock_set_region_node(struct memblock_region *r, int nid) { r->nid = nid; } static inline int memblock_get_region_node(const struct memblock_region *r) { return r->nid; } #else static inline void memblock_set_region_node(struct memblock_region *r, int nid) { } static inline int memblock_get_region_node(const struct memblock_region *r) { return 0; } #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */ phys_addr_t memblock_alloc_nid(phys_addr_t size, phys_addr_t align, int nid); phys_addr_t memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, int nid); phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align); /* Flags for memblock_alloc_base() amd __memblock_alloc_base() */ #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) #define MEMBLOCK_ALLOC_ACCESSIBLE 0 phys_addr_t memblock_alloc_base(phys_addr_t size, phys_addr_t align, phys_addr_t max_addr); phys_addr_t __memblock_alloc_base(phys_addr_t size, phys_addr_t align, phys_addr_t max_addr); phys_addr_t memblock_phys_mem_size(void); phys_addr_t memblock_start_of_DRAM(void); phys_addr_t memblock_end_of_DRAM(void); void memblock_enforce_memory_limit(phys_addr_t memory_limit); int memblock_is_memory(phys_addr_t addr); int memblock_is_region_memory(phys_addr_t base, phys_addr_t size); int memblock_is_reserved(phys_addr_t addr); int memblock_is_region_reserved(phys_addr_t base, phys_addr_t size); extern void __memblock_dump_all(void); static inline void memblock_dump_all(void) { if (memblock_debug) __memblock_dump_all(); } /** * memblock_set_current_limit - Set the current allocation limit to allow * limiting allocations to what is currently * accessible during boot * @limit: New limit value (physical address) */ void memblock_set_current_limit(phys_addr_t limit); /* * pfn conversion functions * * While the memory MEMBLOCKs should always be page aligned, the reserved * MEMBLOCKs may not be. This accessor attempt to provide a very clear * idea of what they return for such non aligned MEMBLOCKs. */ /** * memblock_region_memory_base_pfn - Return the lowest pfn intersecting with the memory region * @reg: memblock_region structure */ static inline unsigned long memblock_region_memory_base_pfn(const struct memblock_region *reg) { return PFN_UP(reg->base); } /** * memblock_region_memory_end_pfn - Return the end_pfn this region * @reg: memblock_region structure */ static inline unsigned long memblock_region_memory_end_pfn(const struct memblock_region *reg) { return PFN_DOWN(reg->base + reg->size); } /** * memblock_region_reserved_base_pfn - Return the lowest pfn intersecting with the reserved region * @reg: memblock_region structure */ static inline unsigned long memblock_region_reserved_base_pfn(const struct memblock_region *reg) { return PFN_DOWN(reg->base); } /** * memblock_region_reserved_end_pfn - Return the end_pfn this region * @reg: memblock_region structure */ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblock_region *reg) { return PFN_UP(reg->base + reg->size); } #define for_each_memblock(memblock_type, region) \ for (region = memblock.memblock_type.regions; \ region < (memblock.memblock_type.regions + memblock.memblock_type.cnt); \ region++) #ifdef CONFIG_ARCH_DISCARD_MEMBLOCK #define __init_memblock __meminit #define __initdata_memblock __meminitdata #else #define __init_memblock #define __initdata_memblock #endif #else static inline phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align) { return 0; } #endif /* CONFIG_HAVE_MEMBLOCK */ #endif /* __KERNEL__ */ #endif /* _LINUX_MEMBLOCK_H */ ",0 "okenStream; import org.eclectic.frontend.services.TaoGrammarAccess; public class TaoParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser { @Inject private TaoGrammarAccess grammarAccess; @Override protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { tokenStream.setInitialHiddenTokens(""RULE_WS"", ""RULE_ML_COMMENT"", ""RULE_SL_COMMENT""); } @Override protected org.eclectic.frontend.parser.antlr.internal.InternalTaoParser createParser(XtextTokenStream stream) { return new org.eclectic.frontend.parser.antlr.internal.InternalTaoParser(stream, getGrammarAccess()); } @Override protected String getDefaultRuleName() { return ""TaoTransformation""; } public TaoGrammarAccess getGrammarAccess() { return this.grammarAccess; } public void setGrammarAccess(TaoGrammarAccess grammarAccess) { this.grammarAccess = grammarAccess; } } ",0 "a name=""generator"" content=""rustdoc""> gleam::ffi::GetBooleanv - Rust

              Module gleam::ffi::GetBooleanv [] [src]

              Functions

              is_loaded
              load_with
              ",0 "DTD/xhtml1-transitional.dtd""> build_legacy_indicies (Gem::Indexer)
              # File lib/rubygems/indexer.rb, line 138
                def build_legacy_indicies(index)
                  say "Generating Marshal master index"
              
                  Gem.time 'Generated Marshal master index' do
                    open @marshal_index, 'wb' do |io|
                      io.write index.dump
                    end
                  end
              
                  @files << @marshal_index
                  @files << "#{@marshal_index}.Z"
                end
              ",0 "enerated by javadoc (version 1.7.0_65) on Wed Dec 03 20:33:24 CET 2014 --> net.sourceforge.pmd.lang.xsl.rule.xpath (PMD XML and XSL 5.2.2 Test API)

              Package net.sourceforge.pmd.lang.xsl.rule.xpath

              Copyright © 2002–2014 InfoEther. All rights reserved.

              ",0 "ch BSD like) licence: http://www.cecill.info/ ------------------------------------------------------------> OL3-ext: GeoImage source

              OL3-ext: GeoImage source

              ol.source.GeoImage georeference images on a map.
              You can choose the center, rotation and the scale (x and y axis) of the image. The image can be crop by an extent (imageCrop) or by a polygon (imageMask).
              Use the Map-georeferencer project to calculate the parameters for an images.

              Otions:

              Opacity:
              Rotation:
              Center:
              Scale:
              Crop:
              ",0 "g.h> #include ""stdargx.h"" #include ""xmlrpc-c/base.h"" #include ""xmlrpc-c/base_int.h"" #include ""xmlrpc-c/string_int.h"" static void getString(xmlrpc_env *const envP, const char **const formatP, va_listx *const argsP, xmlrpc_value **const valPP) { const char *str; size_t len; str = (const char *) va_arg(argsP->v, char*); if (*(*formatP) == '#') { ++(*formatP); len = (size_t) va_arg(argsP->v, size_t); } else len = strlen(str); *valPP = xmlrpc_string_new_lp(envP, len, str); } static void getWideString(xmlrpc_env *const envP ATTR_UNUSED, const char **const formatP ATTR_UNUSED, va_listx *const argsP ATTR_UNUSED, xmlrpc_value **const valPP ATTR_UNUSED) { #if HAVE_UNICODE_WCHAR wchar_t *wcs; size_t len; wcs = (wchar_t*) va_arg(argsP->v, wchar_t*); if (**formatP == '#') { (*formatP)++; len = (size_t) va_arg(argsP->v, size_t); } else len = wcslen(wcs); *valPP = xmlrpc_string_w_new_lp(envP, len, wcs); #endif /* HAVE_UNICODE_WCHAR */ } static void getBase64(xmlrpc_env *const envP, va_listx *const argsP, xmlrpc_value **const valPP) { unsigned char *value; size_t length; value = (unsigned char *) va_arg(argsP->v, unsigned char*); length = (size_t) va_arg(argsP->v, size_t); *valPP = xmlrpc_base64_new(envP, length, value); } static void getValue(xmlrpc_env *const envP, const char **const format, va_listx *const argsP, xmlrpc_value **const valPP); static void getArray(xmlrpc_env *const envP, const char **const formatP, char const delimiter, va_listx *const argsP, xmlrpc_value **const arrayPP) { xmlrpc_value *arrayP; arrayP = xmlrpc_array_new(envP); /* Add items to the array until we hit our delimiter. */ while (**formatP != delimiter && !envP->fault_occurred) { xmlrpc_value *itemP; if (**formatP == '\0') xmlrpc_env_set_fault( envP, XMLRPC_INTERNAL_ERROR, ""format string ended before closing ')'.""); else { getValue(envP, formatP, argsP, &itemP); if (!envP->fault_occurred) { xmlrpc_array_append_item(envP, arrayP, itemP); xmlrpc_DECREF(itemP); } } } if (envP->fault_occurred) xmlrpc_DECREF(arrayP); *arrayPP = arrayP; } static void getStructMember(xmlrpc_env *const envP, const char **const formatP, va_listx *const argsP, xmlrpc_value **const keyPP, xmlrpc_value **const valuePP) { /* Get the key */ getValue(envP, formatP, argsP, keyPP); if (!envP->fault_occurred) { if (**formatP != ':') xmlrpc_env_set_fault( envP, XMLRPC_INTERNAL_ERROR, ""format string does not have ':' after a "" ""structure member key.""); else { /* Skip over colon that separates key from value */ (*formatP)++; /* Get the value */ getValue(envP, formatP, argsP, valuePP); } if (envP->fault_occurred) xmlrpc_DECREF(*keyPP); } } static void getStruct(xmlrpc_env *const envP, const char **const formatP, char const delimiter, va_listx *const argsP, xmlrpc_value **const structPP) { xmlrpc_value *structP; structP = xmlrpc_struct_new(envP); if (!envP->fault_occurred) { while (**formatP != delimiter && !envP->fault_occurred) { xmlrpc_value *keyP; xmlrpc_value *valueP; getStructMember(envP, formatP, argsP, &keyP, &valueP); if (!envP->fault_occurred) { if (**formatP == ',') (*formatP)++; /* Skip over the comma */ else if (**formatP == delimiter) { /* End of the line */ } else xmlrpc_env_set_fault( envP, XMLRPC_INTERNAL_ERROR, ""format string does not have ',' or ')' after "" ""a structure member""); if (!envP->fault_occurred) /* Add the new member to the struct. */ xmlrpc_struct_set_value_v(envP, structP, keyP, valueP); xmlrpc_DECREF(valueP); xmlrpc_DECREF(keyP); } } if (envP->fault_occurred) xmlrpc_DECREF(structP); } *structPP = structP; } static void mkArrayFromVal(xmlrpc_env *const envP, xmlrpc_value *const value, xmlrpc_value **const valPP) { if (xmlrpc_value_type(value) != XMLRPC_TYPE_ARRAY) xmlrpc_env_set_fault(envP, XMLRPC_INTERNAL_ERROR, ""Array format ('A'), non-array xmlrpc_value""); else xmlrpc_INCREF(value); *valPP = value; } static void mkStructFromVal(xmlrpc_env *const envP, xmlrpc_value *const value, xmlrpc_value **const valPP) { if (xmlrpc_value_type(value) != XMLRPC_TYPE_STRUCT) xmlrpc_env_set_fault(envP, XMLRPC_INTERNAL_ERROR, ""Struct format ('S'), non-struct xmlrpc_value""); else xmlrpc_INCREF(value); *valPP = value; } static void getValue(xmlrpc_env *const envP, const char **const formatP, va_listx *const argsP, xmlrpc_value **const valPP) { /*---------------------------------------------------------------------------- Get the next value from the list. *formatP points to the specifier for the next value in the format string (i.e. to the type code character) and we move *formatP past the whole specifier for the next value. We read the required arguments from 'argsP'. We return the value as *valPP with a reference to it. For example, if *formatP points to the ""i"" in the string ""sis"", we read one argument from 'argsP' and return as *valP an integer whose value is the argument we read. We advance *formatP to point to the last 's' and advance 'argsP' to point to the argument that belongs to that 's'. -----------------------------------------------------------------------------*/ char const formatChar = *(*formatP)++; switch (formatChar) { case 'i': *valPP = xmlrpc_int_new(envP, (xmlrpc_int32) va_arg(argsP->v, xmlrpc_int32)); break; case 'b': *valPP = xmlrpc_bool_new(envP, (xmlrpc_bool) va_arg(argsP->v, xmlrpc_bool)); break; case 'd': *valPP = xmlrpc_double_new(envP, (double) va_arg(argsP->v, double)); break; case 's': getString(envP, formatP, argsP, valPP); break; case 'w': getWideString(envP, formatP, argsP, valPP); break; case 't': *valPP = xmlrpc_datetime_new_sec(envP, va_arg(argsP->v, time_t)); break; case '8': *valPP = xmlrpc_datetime_new_str(envP, va_arg(argsP->v, char*)); break; case '6': getBase64(envP, argsP, valPP); break; case 'n': *valPP = xmlrpc_nil_new(envP); break; case 'I': *valPP = xmlrpc_i8_new(envP, (xmlrpc_int64) va_arg(argsP->v, xmlrpc_int64)); break; case 'p': *valPP = xmlrpc_cptr_new(envP, (void *) va_arg(argsP->v, void*)); break; case 'A': mkArrayFromVal(envP, (xmlrpc_value *) va_arg(argsP->v, xmlrpc_value*), valPP); break; case 'S': mkStructFromVal(envP, (xmlrpc_value *) va_arg(argsP->v, xmlrpc_value*), valPP); break; case 'V': *valPP = (xmlrpc_value *) va_arg(argsP->v, xmlrpc_value*); xmlrpc_INCREF(*valPP); break; case '(': getArray(envP, formatP, ')', argsP, valPP); if (!envP->fault_occurred) { XMLRPC_ASSERT(**formatP == ')'); (*formatP)++; /* Skip over closing parenthesis */ } break; case '{': getStruct(envP, formatP, '}', argsP, valPP); if (!envP->fault_occurred) { XMLRPC_ASSERT(**formatP == '}'); (*formatP)++; /* Skip over closing brace */ } break; default: { const char *const badCharacter = xmlrpc_makePrintableChar( formatChar); xmlrpc_env_set_fault_formatted( envP, XMLRPC_INTERNAL_ERROR, ""Unexpected character '%s' in format string"", badCharacter); xmlrpc_strfree(badCharacter); } } } void xmlrpc_build_value_va(xmlrpc_env *const envP, const char *const format, va_list const args, xmlrpc_value **const valPP, const char **const tailP) { XMLRPC_ASSERT_ENV_OK(envP); XMLRPC_ASSERT(format != NULL); if (strlen(format) == 0) xmlrpc_faultf(envP, ""Format string is empty.""); else { va_listx currentArgs; const char *formatCursor; init_va_listx(¤tArgs, args); formatCursor = &format[0]; getValue(envP, &formatCursor, ¤tArgs, valPP); if (!envP->fault_occurred) XMLRPC_ASSERT_VALUE_OK(*valPP); *tailP = formatCursor; } } xmlrpc_value * xmlrpc_build_value(xmlrpc_env *const envP, const char *const format, ...) { va_list args; xmlrpc_value *retval; const char *suffix; va_start(args, format); xmlrpc_build_value_va(envP, format, args, &retval, &suffix); va_end(args); if (!envP->fault_occurred) { if (*suffix != '\0') xmlrpc_faultf(envP, ""Junk after the format specifier: '%s'. "" ""The format string must describe exactly "" ""one XML-RPC value "" ""(but it might be a compound value "" ""such as an array)"", suffix); if (envP->fault_occurred) xmlrpc_DECREF(retval); } return retval; } /* Copyright (C) 2001 by First Peer, Inc. All rights reserved. ** Copyright (C) 2001 by Eric Kidd. All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** 1. Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** 2. Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in the ** documentation and/or other materials provided with the distribution. ** 3. The name of the author may not be used to endorse or promote products ** derived from this software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ** SUCH DAMAGE. */ ",0 "> SaveMedia | Download & Convert YouTube to MP3 & MP4 Online

              Download YouTube videos for free

              Supports MP3, MP4 and more.
              No software required.

              Warning! An error has occured: {:WARNING:}
              We have been automatically notified of this issue and will resolve it as soon as possible. Please use VDownloader if you are unable to download.

              This is not a valid video URL. Are you sure it should work? Can you view the video directly without any proxies? Please e-mail us!

              Internet Explorer might crash if you do not have the latest version of Java installed. Please visit page to see if you need to upgrade.

              Features


              1. Download YouTube videos up to HD resolution
              2. Convert videos to MP3/WebM audio with a single click
              3. Unlimited free conversions and downloads
              4. No additional software required
              5. Compatible with mobile phones

              Add a bookmarklet to download with a single click


              Right-click or drag-drop the following link to your bookmarks or favorites toolbar. Saving an online video in any format will be as simple as clicking the favorite/bookmark while watching or after you finish watching the video: Download this video with Save Media

              Download videos online without even copy-and-pasting the URL

              Just replace the domain with 'savemedia.com' in the address bar and hit enter.
              For example: https://savemedia.com/watch?v=KK9bwTlAvgo

              Check the full list of supported sites

                  Show full list of supported websites

                  Weekly Top 100 -
                  Most Downloaded videos

                  Hover your mouse over a video thumbnail in order to see a tooltip containing name and length


                  Discover the full rating at Weekly Top 100

                  Do you want more features? Try VDownloader!

                  • Download video from any major video hosting site, including porn sites.
                  • Convert or edit your videos to any popular file format without restrictions.
                  • You can program automatic downloads based on a channel, user or keyword.
                  • Keep track of any videos you've watched in your browsers to download them later.

                  Download now!

                  Storing copies of videos counts as fair use under U.S. copyright law. Please respect the rights of content owners and do not upload copyrighted content elsewhere. We are not affiliated with any video hosting websites such as Break, DailyMotion, Metacafe, TED, Vimeo or YouTube.

                  Storing copies of videos counts as fair use under U.S. copyright law. Please respect the rights of content owners and do not upload copyrighted content elsewhere. We are not affiliated with any video hosting websites such as Break, DailyMotion, Metacafe, TED, Vimeo or YouTube.

                  Contact us to report any issues with the website, ask a question, suggest a feature or simply compliment our work

                  ",0 "the LICENSE file. */ /* Kohaku board configuration */ #ifndef __CROS_EC_BOARD_H #define __CROS_EC_BOARD_H /* Baseboard features */ #include ""baseboard.h"" #define CONFIG_DPTF_MOTION_LID_NO_GMR_SENSOR #define CONFIG_DPTF_MULTI_PROFILE #define CONFIG_POWER_BUTTON #define CONFIG_KEYBOARD_PROTOCOL_8042 #define CONFIG_LED_COMMON #define CONFIG_LOW_POWER_IDLE #define CONFIG_HOST_INTERFACE_ESPI #undef CONFIG_UART_TX_BUF_SIZE #define CONFIG_UART_TX_BUF_SIZE 4096 /* Keyboard features */ #define CONFIG_PWM_KBLIGHT /* Sensors */ /* BMI160 Base accel/gyro */ #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) #define CONFIG_ACCELGYRO_BMI160_INT2_OUTPUT /* Camera VSYNC */ #define CONFIG_SYNC #define CONFIG_SYNC_INT_EVENT \ TASK_EVENT_MOTION_SENSOR_INTERRUPT(VSYNC) /* BMA253 Lid accel */ #define CONFIG_ACCEL_BMA255 #define CONFIG_LID_ANGLE #define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL #define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL #define CONFIG_LID_ANGLE_UPDATE /* BH1730 and TCS3400 ALS */ #define CONFIG_ALS #define ALS_COUNT 2 #define I2C_PORT_ALS I2C_PORT_SENSOR #define CONFIG_ALS_BH1730 #define CONFIG_ALS_TCS3400 #define CONFIG_ALS_TCS3400_INT_EVENT \ TASK_EVENT_MOTION_SENSOR_INTERRUPT(CLEAR_ALS) /* Sensors without hardware FIFO are in forced mode */ #define CONFIG_ACCEL_FORCE_MODE_MASK \ (BIT(LID_ACCEL) | BIT(BASE_ALS) | BIT(CLEAR_ALS)) /* Parameter to calculate LUX on Kohaku */ #define CONFIG_ALS_BH1730_LUXTH_PARAMS /* * Calulation formula depends on characteristic of optical window. * In case of kohaku, we can select two different formula * as characteristic of optical window. * BH1730_LUXTH1_1K is charateristic of optical window. * 1. d1_1K/d0_1K * 1000 < BH1730_LUXTH1_1K * 2. d1_1K/d0_1K * 1000 >= BH1730_LUXTH1_1K * d0 and d1 are unsigned 16 bit. So, d1/d0 max is 65535 * To meet 2nd condition, make BH1730_LUXTH2_1K to (max+1)*1000 * Kohaku will not use both BH1730_LUXTH3_1K condition * and BH1730_LUXTH4_1K condition. */ #define BH1730_LUXTH1_1K 270 #define BH1730_LUXTH1_D0_1K 19200 #define BH1730_LUXTH1_D1_1K 30528 #define BH1730_LUXTH2_1K 655360000 #define BH1730_LUXTH2_D0_1K 11008 #define BH1730_LUXTH2_D1_1K 10752 #define BH1730_LUXTH3_1K 1030 #define BH1730_LUXTH3_D0_1K 11008 #define BH1730_LUXTH3_D1_1K 10752 #define BH1730_LUXTH4_1K 3670 #define BH1730_LUXTH4_D0_1K 11008 #define BH1730_LUXTH4_D1_1K 10752 /* USB Type C and USB PD defines */ #define CONFIG_USB_PD_COMM_LOCKED #define CONFIG_USB_PD_TCPM_PS8751 #define BOARD_TCPC_C0_RESET_HOLD_DELAY PS8XXX_RESET_DELAY_MS #define BOARD_TCPC_C0_RESET_POST_DELAY 0 #define BOARD_TCPC_C1_RESET_HOLD_DELAY PS8XXX_RESET_DELAY_MS #define BOARD_TCPC_C1_RESET_POST_DELAY 0 #define GPIO_USB_C0_TCPC_RST GPIO_USB_C0_TCPC_RST_ODL #define GPIO_USB_C1_TCPC_RST GPIO_USB_C1_TCPC_RST_ODL #define GPIO_BAT_LED_RED_L GPIO_LED_1_L #define GPIO_BAT_LED_GREEN_L GPIO_LED_3_L #define GPIO_PWR_LED_BLUE_L GPIO_LED_2_L /* BC 1.2 */ #define CONFIG_BC12_DETECT_MAX14637 /* Charger features */ /* * The IDCHG current limit is set in 512 mA steps. The value set here is * somewhat specific to the battery pack being currently used. The limit here * was set via experimentation by finding how high it can be set and still boot * the AP successfully, then backing off to provide margin. * * TODO(b/133444665): Revisit this threshold once peak power consumption tuning * for the AP is completed. */ #define CONFIG_CHARGER_BQ25710_IDCHG_LIMIT_MA 6144 #define CONFIG_BATTERY_CHECK_CHARGE_TEMP_LIMITS #define CONFIG_CHARGER_PROFILE_OVERRIDE /* Volume Button feature */ #define CONFIG_VOLUME_BUTTONS #define GPIO_VOLUME_UP_L GPIO_EC_VOLUP_BTN_ODL #define GPIO_VOLUME_DOWN_L GPIO_EC_VOLDN_BTN_ODL /* Thermal features */ #define CONFIG_TEMP_SENSOR_POWER #define CONFIG_THERMISTOR #define CONFIG_THROTTLE_AP #define CONFIG_STEINHART_HART_3V3_30K9_47K_4050B /* * Macros for GPIO signals used in common code that don't match the * schematic names. Signal names in gpio.inc match the schematic and are * then redefined here to so it's more clear which signal is being used for * which purpose. */ #define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L #define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L #define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL #define GPIO_AC_PRESENT GPIO_ACOK_OD #define GPIO_PG_EC_RSMRST_ODL GPIO_PG_EC_RSMRST_L #define GPIO_PCH_SYS_PWROK GPIO_EC_PCH_SYS_PWROK #define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L #define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L #define GPIO_TEMP_SENSOR_POWER GPIO_EN_A_RAILS #define GPIO_EN_PP5000 GPIO_EN_PP5000_A #ifndef __ASSEMBLER__ #include ""gpio_signal.h"" #include ""registers.h"" /* GPIO signals updated base on board version. */ extern enum gpio_signal gpio_en_pp5000_a; enum adc_channel { ADC_TEMP_SENSOR_1, /* ADC0 */ ADC_TEMP_SENSOR_2, /* ADC1 */ ADC_TEMP_SENSOR_3, /* ADC2 */ ADC_TEMP_SENSOR_4, /* ADC3 */ ADC_CH_COUNT }; enum sensor_id { LID_ACCEL = 0, BASE_ACCEL, BASE_GYRO, BASE_ALS, VSYNC, CLEAR_ALS, RGB_ALS, SENSOR_COUNT, }; enum pwm_channel { PWM_CH_KBLIGHT, PWM_CH_COUNT }; enum temp_sensor_id { TEMP_SENSOR_1, TEMP_SENSOR_2, TEMP_SENSOR_3, TEMP_SENSOR_4, TEMP_SENSOR_COUNT }; /* List of possible batteries */ enum battery_type { BATTERY_DYNA, BATTERY_SDI, BATTERY_TYPE_COUNT, }; #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ ",0 "r galaxy image simulation toolkit. * * GalSim is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GalSim is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GalSim. If not, see */ #ifndef SBMOFFAT_H #define SBMOFFAT_H /** * @file SBMoffat.h @brief SBProfile that implements a Moffat profile. */ #include ""SBProfile.h"" namespace galsim { /** * @brief Surface Brightness for the Moffat Profile (an approximate description of ground-based * PSFs). * * The Moffat surface brightness profile is I(R) propto [1 + (r/r_scale)^2]^(-beta). The * SBProfile representation of a Moffat profile also includes an optional truncation beyond a * given radius. */ class SBMoffat : public SBProfile { public: enum RadiusType { FWHM, HALF_LIGHT_RADIUS, SCALE_RADIUS }; /** @brief Constructor. * * @param[in] beta Moffat beta parameter for profile `[1 + (r / rD)^2]^beta`. * @param[in] size Size specification. * @param[in] rType Kind of size being specified (one of FWHM, HALF_LIGHT_RADIUS, * SCALE_RADIUS). * @param[in] trunc Outer truncation radius in same physical units as size, * trunc = 0. for no truncation. * @param[in] flux Flux. * @param[in] gsparams GSParams object storing constants that control the accuracy of * image operations and rendering, if different from the default. */ SBMoffat(double beta, double size, RadiusType rType, double trunc, double flux, const GSParamsPtr& gsparams); /// @brief Copy constructor. SBMoffat(const SBMoffat& rhs); /// @brief Destructor. ~SBMoffat(); /// @brief Returns beta of the Moffat profile `[1 + (r / rD)^2]^beta`. double getBeta() const; /// @brief Returns the FWHM of the Moffat profile. double getFWHM() const; /// @brief Returns the scale radius rD of the Moffat profile `[1 + (r / rD)^2]^beta`. double getScaleRadius() const; /// @brief Returns the half light radius of the Moffat profile. double getHalfLightRadius() const; protected: class SBMoffatImpl; private: // op= is undefined void operator=(const SBMoffat& rhs); }; } #endif // SBMOFFAT_H ",0 "chweppe@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace VersionControl\GitlabIssueBundle\Entity; use VersionControl\GitControlBundle\Entity\Issues\IssueUserInterface; class User implements IssueUserInterface { /** * @var int */ protected $id; /** * @var string */ protected $name; public function getId() { return $this->id; } public function setId($id) { $this->id = $id; return $this; } public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } } ",0 "ecore.EReference; import org.eclipse.xtext.scoping.IGlobalScopeProvider; import org.eclipse.xtext.scoping.IScope; import org.eclipse.xtext.testlanguages.fileAware.fileAware.FileAwarePackage; import com.google.inject.Inject; /** * This class contains custom scoping description. * * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping * on how and when to use it. */ public class FileAwareTestLanguageScopeProvider extends AbstractFileAwareTestLanguageScopeProvider { @Inject IGlobalScopeProvider global; public IScope getScope(EObject context, EReference reference) { if (reference == FileAwarePackage.Literals.IMPORT__ELEMENT) { return global.getScope(context.eResource(), reference, null); } return super.getScope(context, reference); } } ",0 "}}""> {{ col | translate }} Edit Loading ... {{ row[col] }} {{ 'action.edit' | translate }}
                  ",0 "Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_atomic_H #define __TBB_atomic_H #include #include ""tbb_stddef.h"" #if _MSC_VER #define __TBB_LONG_LONG __int64 #else #define __TBB_LONG_LONG long long #endif /* _MSC_VER */ #include ""tbb_machine.h"" #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings #pragma warning (push) #pragma warning (disable: 4244 4267) #endif namespace tbb { //! Specifies memory fencing. enum memory_semantics { //! For internal use only. __TBB_full_fence, //! Acquire fence acquire, //! Release fence release }; //! @cond INTERNAL namespace internal { #if __GNUC__ || __SUNPRO_CC #define __TBB_DECL_ATOMIC_FIELD(t,f,a) t f __attribute__ ((aligned(a))); #elif defined(__INTEL_COMPILER)||_MSC_VER >= 1300 #define __TBB_DECL_ATOMIC_FIELD(t,f,a) __declspec(align(a)) t f; #else #error Do not know syntax for forcing alignment. #endif /* __GNUC__ */ template struct atomic_rep; // Primary template declared, but never defined. template<> struct atomic_rep<1> { // Specialization typedef int8_t word; int8_t value; }; template<> struct atomic_rep<2> { // Specialization typedef int16_t word; __TBB_DECL_ATOMIC_FIELD(int16_t,value,2) }; template<> struct atomic_rep<4> { // Specialization #if _MSC_VER && __TBB_WORDSIZE==4 // Work-around that avoids spurious /Wp64 warnings typedef intptr_t word; #else typedef int32_t word; #endif __TBB_DECL_ATOMIC_FIELD(int32_t,value,4) }; template<> struct atomic_rep<8> { // Specialization typedef int64_t word; __TBB_DECL_ATOMIC_FIELD(int64_t,value,8) }; template struct atomic_traits; // Primary template declared, but not defined. #define __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(S,M) \ template<> struct atomic_traits { \ typedef atomic_rep::word word; \ inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\ return __TBB_CompareAndSwap##S##M(location,new_value,comparand); \ } \ inline static word fetch_and_add( volatile void* location, word addend ) { \ return __TBB_FetchAndAdd##S##M(location,addend); \ } \ inline static word fetch_and_store( volatile void* location, word value ) {\ return __TBB_FetchAndStore##S##M(location,value); \ } \ }; #define __TBB_DECL_ATOMIC_PRIMITIVES(S) \ template \ struct atomic_traits { \ typedef atomic_rep::word word; \ inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) {\ return __TBB_CompareAndSwap##S(location,new_value,comparand); \ } \ inline static word fetch_and_add( volatile void* location, word addend ) { \ return __TBB_FetchAndAdd##S(location,addend); \ } \ inline static word fetch_and_store( volatile void* location, word value ) {\ return __TBB_FetchAndStore##S(location,value); \ } \ }; #if __TBB_DECL_FENCED_ATOMICS __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,__TBB_full_fence) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,__TBB_full_fence) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,__TBB_full_fence) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,__TBB_full_fence) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,acquire) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,acquire) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,acquire) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,acquire) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,release) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,release) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,release) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,release) #else __TBB_DECL_ATOMIC_PRIMITIVES(1) __TBB_DECL_ATOMIC_PRIMITIVES(2) __TBB_DECL_ATOMIC_PRIMITIVES(4) __TBB_DECL_ATOMIC_PRIMITIVES(8) #endif //! Additive inverse of 1 for type T. /** Various compilers issue various warnings if -1 is used with various integer types. The baroque expression below avoids all the warnings (we hope). */ #define __TBB_MINUS_ONE(T) (T(T(0)-T(1))) //! Base class that provides basic functionality for atomic without fetch_and_add. /** Works for any type T that has the same size as an integral type, has a trivial constructor/destructor, and can be copied/compared by memcpy/memcmp. */ template struct atomic_impl { protected: atomic_rep rep; private: //! Union type used to convert type T to underlying integral type. union converter { T value; typename atomic_rep::word bits; }; public: typedef T value_type; template value_type fetch_and_store( value_type value ) { converter u, w; u.value = value; w.bits = internal::atomic_traits::fetch_and_store(&rep.value,u.bits); return w.value; } value_type fetch_and_store( value_type value ) { return fetch_and_store<__TBB_full_fence>(value); } template value_type compare_and_swap( value_type value, value_type comparand ) { converter u, v, w; u.value = value; v.value = comparand; w.bits = internal::atomic_traits::compare_and_swap(&rep.value,u.bits,v.bits); return w.value; } value_type compare_and_swap( value_type value, value_type comparand ) { return compare_and_swap<__TBB_full_fence>(value,comparand); } operator value_type() const volatile { // volatile qualifier here for backwards compatibility converter w; w.bits = __TBB_load_with_acquire( rep.value ); return w.value; } protected: value_type store_with_release( value_type rhs ) { converter u; u.value = rhs; __TBB_store_with_release(rep.value,u.bits); return rhs; } }; //! Base class that provides basic functionality for atomic with fetch_and_add. /** I is the underlying type. D is the difference type. StepType should be char if I is an integral type, and T if I is a T*. */ template struct atomic_impl_with_arithmetic: atomic_impl { public: typedef I value_type; template value_type fetch_and_add( D addend ) { return value_type(internal::atomic_traits::fetch_and_add( &this->rep.value, addend*sizeof(StepType) )); } value_type fetch_and_add( D addend ) { return fetch_and_add<__TBB_full_fence>(addend); } template value_type fetch_and_increment() { return fetch_and_add(1); } value_type fetch_and_increment() { return fetch_and_add(1); } template value_type fetch_and_decrement() { return fetch_and_add(__TBB_MINUS_ONE(D)); } value_type fetch_and_decrement() { return fetch_and_add(__TBB_MINUS_ONE(D)); } public: value_type operator+=( D addend ) { return fetch_and_add(addend)+addend; } value_type operator-=( D addend ) { // Additive inverse of addend computed using binary minus, // instead of unary minus, for sake of avoiding compiler warnings. return operator+=(D(0)-addend); } value_type operator++() { return fetch_and_add(1)+1; } value_type operator--() { return fetch_and_add(__TBB_MINUS_ONE(D))-1; } value_type operator++(int) { return fetch_and_add(1); } value_type operator--(int) { return fetch_and_add(__TBB_MINUS_ONE(D)); } }; #if __TBB_WORDSIZE == 4 // Plaforms with 32-bit hardware require special effort for 64-bit loads and stores. #if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 template<> inline atomic_impl<__TBB_LONG_LONG>::operator atomic_impl<__TBB_LONG_LONG>::value_type() const volatile { return __TBB_Load8(&rep.value); } template<> inline atomic_impl::operator atomic_impl::value_type() const volatile { return __TBB_Load8(&rep.value); } template<> inline atomic_impl<__TBB_LONG_LONG>::value_type atomic_impl<__TBB_LONG_LONG>::store_with_release( value_type rhs ) { __TBB_Store8(&rep.value,rhs); return rhs; } template<> inline atomic_impl::value_type atomic_impl::store_with_release( value_type rhs ) { __TBB_Store8(&rep.value,rhs); return rhs; } #endif /* defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */ #endif /* __TBB_WORDSIZE==4 */ } /* Internal */ //! @endcond //! Primary template for atomic. /** See the Reference for details. @ingroup synchronization */ template struct atomic: internal::atomic_impl { T operator=( T rhs ) { // ""this"" required here in strict ISO C++ because store_with_release is a dependent name return this->store_with_release(rhs); } atomic& operator=( const atomic& rhs ) {this->store_with_release(rhs); return *this;} }; #define __TBB_DECL_ATOMIC(T) \ template<> struct atomic: internal::atomic_impl_with_arithmetic { \ T operator=( T rhs ) {return store_with_release(rhs);} \ atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ }; #if defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 __TBB_DECL_ATOMIC(__TBB_LONG_LONG) __TBB_DECL_ATOMIC(unsigned __TBB_LONG_LONG) #else // Some old versions of MVSC cannot correctly compile templates with ""long long"". #endif /* defined(__INTEL_COMPILER)||!defined(_MSC_VER)||_MSC_VER>=1400 */ __TBB_DECL_ATOMIC(long) __TBB_DECL_ATOMIC(unsigned long) #if defined(_MSC_VER) && __TBB_WORDSIZE==4 /* Special version of __TBB_DECL_ATOMIC that avoids gratuitous warnings from cl /Wp64 option. It is identical to __TBB_DECL_ATOMIC(unsigned) except that it replaces operator=(T) with an operator=(U) that explicitly converts the U to a T. Types T and U should be type synonyms on the platform. Type U should be the wider variant of T from the perspective of /Wp64. */ #define __TBB_DECL_ATOMIC_ALT(T,U) \ template<> struct atomic: internal::atomic_impl_with_arithmetic { \ T operator=( U rhs ) {return store_with_release(T(rhs));} \ atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ }; __TBB_DECL_ATOMIC_ALT(unsigned,size_t) __TBB_DECL_ATOMIC_ALT(int,ptrdiff_t) #else __TBB_DECL_ATOMIC(unsigned) __TBB_DECL_ATOMIC(int) #endif /* defined(_MSC_VER) && __TBB_WORDSIZE==4 */ __TBB_DECL_ATOMIC(unsigned short) __TBB_DECL_ATOMIC(short) __TBB_DECL_ATOMIC(char) __TBB_DECL_ATOMIC(signed char) __TBB_DECL_ATOMIC(unsigned char) #if !defined(_MSC_VER)||defined(_NATIVE_WCHAR_T_DEFINED) __TBB_DECL_ATOMIC(wchar_t) #endif /* _MSC_VER||!defined(_NATIVE_WCHAR_T_DEFINED) */ //! Specialization for atomic with arithmetic and operator->. template struct atomic: internal::atomic_impl_with_arithmetic { T* operator=( T* rhs ) { // ""this"" required here in strict ISO C++ because store_with_release is a dependent name return this->store_with_release(rhs); } atomic& operator=( const atomic& rhs ) { this->store_with_release(rhs); return *this; } T* operator->() const { return (*this); } }; //! Specialization for atomic, for sake of not allowing arithmetic or operator->. template<> struct atomic: internal::atomic_impl { void* operator=( void* rhs ) { // ""this"" required here in strict ISO C++ because store_with_release is a dependent name return this->store_with_release(rhs); } atomic& operator=( const atomic& rhs ) { this->store_with_release(rhs); return *this; } }; } // namespace tbb #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warnings 4244, 4267 are back #endif /* __TBB_atomic_H */ ",0 "this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.camel.component.influxdb; import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.support.DefaultEndpoint; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriPath; import org.apache.camel.support.CamelContextHelper; import org.influxdb.InfluxDB; /** * The influxdb component allows you to interact with InfluxDB, a time series database. */ @UriEndpoint(firstVersion = ""2.18.0"", scheme = ""influxdb"", title = ""InfluxDB"", syntax = ""influxdb:connectionBean"", label = ""database"", producerOnly = true) public class InfluxDbEndpoint extends DefaultEndpoint { private InfluxDB influxDB; @UriPath @Metadata(required = ""true"") private String connectionBean; @UriParam private String databaseName; @UriParam(defaultValue = ""default"") private String retentionPolicy = ""default""; @UriParam(defaultValue = ""false"") private boolean batch; @UriParam(defaultValue = InfluxDbOperations.INSERT) private String operation = InfluxDbOperations.INSERT; @UriParam private String query; public InfluxDbEndpoint(String uri, InfluxDbComponent component) { super(uri, component); } @Override public Producer createProducer() throws Exception { return new InfluxDbProducer(this); } @Override public Consumer createConsumer(Processor processor) throws Exception { throw new UnsupportedOperationException(""You cannot receive messages from this endpoint""); } @Override protected void doStart() throws Exception { influxDB = CamelContextHelper.mandatoryLookup(getCamelContext(), connectionBean, InfluxDB.class); log.debug(""Resolved the connection with the name {} as {}"", connectionBean, influxDB); super.doStart(); } @Override protected void doStop() throws Exception { super.doStop(); } @Override public boolean isSingleton() { return true; } public InfluxDB getInfluxDB() { return influxDB; } /** * The Influx DB to use */ public void setInfluxDB(InfluxDB influxDB) { this.influxDB = influxDB; } public String getDatabaseName() { return databaseName; } /** * The name of the database where the time series will be stored */ public void setDatabaseName(String databaseName) { this.databaseName = databaseName; } public String getRetentionPolicy() { return retentionPolicy; } /** * The string that defines the retention policy to the data created by the endpoint */ public void setRetentionPolicy(String retentionPolicy) { this.retentionPolicy = retentionPolicy; } public String getConnectionBean() { return connectionBean; } /** * Connection to the influx database, of class InfluxDB.class */ public void setConnectionBean(String connectionBean) { this.connectionBean = connectionBean; } public boolean isBatch() { return batch; } /** * Define if this operation is a batch operation or not */ public void setBatch(boolean batch) { this.batch = batch; } public String getOperation() { return operation; } /** * Define if this operation is an insert or a query */ public void setOperation(String operation) { this.operation = operation; } public String getQuery() { return query; } /** * Define the query in case of operation query */ public void setQuery(String query) { this.query = query; } } ",0 "Case { /* public function testCompleteScenario() { // Create a new client to browse the application $client = static::createClient(); // Create a new entry in the database $crawler = $client->request('GET', '/demo_taskcustomer/'); $this->assertEquals(200, $client->getResponse()->getStatusCode(), ""Unexpected HTTP status code for GET /demo_taskcustomer/""); $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); // Fill in the form and submit it $form = $crawler->selectButton('Create')->form(array( 'demo_taskbundle_customertype[field_name]' => 'Test', // ... other fields to fill )); $client->submit($form); $crawler = $client->followRedirect(); // Check data in the show view $this->assertGreaterThan(0, $crawler->filter('td:contains(""Test"")')->count(), 'Missing element td:contains(""Test"")'); // Edit the entity $crawler = $client->click($crawler->selectLink('Edit')->link()); $form = $crawler->selectButton('Edit')->form(array( 'demo_taskbundle_customertype[field_name]' => 'Foo', // ... other fields to fill )); $client->submit($form); $crawler = $client->followRedirect(); // Check the element contains an attribute with value equals ""Foo"" $this->assertGreaterThan(0, $crawler->filter('[value=""Foo""]')->count(), 'Missing element [value=""Foo""]'); // Delete the entity $client->submit($crawler->selectButton('Delete')->form()); $crawler = $client->followRedirect(); // Check the entity has been delete on the list $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); } */ }",0 "enerated by javadoc (1.8.0_232) on Tue Sep 15 08:53:07 UTC 2020 --> Uses of Class org.springframework.messaging.simp.annotation.support.MissingSessionUserException (Spring Framework 5.1.18.RELEASE API)
                  • Prev
                  • Next

                  Uses of Class
                  org.springframework.messaging.simp.annotation.support.MissingSessionUserException

                  No usage of org.springframework.messaging.simp.annotation.support.MissingSessionUserException
                  • Prev
                  • Next
                  ",0 "f the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * ""Shopware"" is a registered trademark of shopware AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ namespace ShopwarePlugins\SwagUpdate\Components\Steps; /** * @category Shopware * * @copyright Copyright (c) shopware AG (http://www.shopware.de) */ class ErrorResult { /** * @var string */ private $message; /** * @var \Exception */ private $exception; /** * @var array */ private $args; /** * @param string $message * @param \Exception $exception * @param array $args */ public function __construct($message, \Exception $exception = null, $args = []) { $this->message = $message; $this->exception = $exception; $this->args = $args; } /** * @return array */ public function getArgs() { return $this->args; } /** * @return \Exception */ public function getException() { return $this->exception; } /** * @return string */ public function getMessage() { return $this->message; } } ",0 " This model fetches the encounters for the therapy group from the DB. * * Copyright (C) 2016 Shachar Zilbershlag * Copyright (C) 2016 Amiel Elboim * * LICENSE: This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see ;. * * @package OpenEMR * @author Shachar Zilbershlag * @author Amiel Elboim * @link http://www.open-emr.org */ class Therapy_Groups_Encounters { const TABLE = 'form_groups_encounter'; /** * Get all encounters of specified group. * @param $gid * @return ADORecordSet_mysqli */ public function getGroupEncounters($gid) { $sql = ""SELECT * FROM "" . self::TABLE . "" WHERE group_id = ? AND date >= CURDATE();""; $result = sqlStatement($sql, array($gid)); while ($row = sqlFetchArray($result)) { $encounters[] = $row; } return $encounters; } } ",0 "t/html; charset=UTF-8""> Directory Tree

                  Directory Tree

                  http://localhost
                  ├── 1
                  ├── 2
                  ├── a.out
                  ├── a.txt
                  ├── b.txt
                  ├── file
                  ├── filestat.sh
                  ├── helloworld.c
                  ├── image2.iso
                  ├── image.iso
                  ├── loopback
                  │   └── file
                  ├── loopbackfile.img
                  ├── other
                  ├── out.html
                  ├── remove
                  ├── remove_duplicates.sh
                  ├── test9.txt
                  ├── version12.patch
                  ├── version1.txt
                  ├── version1.txt.orig
                  ├── version2.txt
                  └── version.patch


                  1 directory, 22 files


                  tree v1.6.0 © 1996 - 2011 by Steve Baker and Thomas Moore
                  HTML output hacked and copyleft © 1998 by Francesc Rocher
                  Charsets / OS/2 support © 2001 by Kyosuke Tokoro

                  ",0 ") { $session_name = 'biosounds_session'; $secure = false; $httpOnly = true; // Forces sessions to only use cookies. if (!ini_set('session.use_only_cookies', 1)) { error_log('Session: error when setting cookies.'); throw new Exception('There was a problem with your session. Please contact the administrator.'); } // Gets current cookies params. $cookieParams = session_get_cookie_params(); session_set_cookie_params(1800, $cookieParams['path'], $cookieParams['domain'], $secure, $httpOnly); //No cache for avoiding back button 'document expired' problem header(""Cache-Control: no cache""); session_cache_limiter(""private, must-revalidate""); // Sets the session name to the one set above. session_name($session_name); session_start(); if (!isset($_SESSION['regenerate_timeout'])) { session_regenerate_id(true); $_SESSION['regenerate_timeout'] = time(); } // Regenerate session ID every five minutes: if ($_SESSION['regenerate_timeout'] < time() - 300) { session_regenerate_id(true); $_SESSION['regenerate_timeout'] = time(); } } } ",0 "s 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. */ package net.sf.cglib.proxy; import java.util.List; import net.sf.cglib.core.*; interface CallbackGenerator { void generate(ClassEmitter ce, Context context, List methods) throws Exception; void generateStatic(CodeEmitter e, Context context, List methods) throws Exception; interface Context { ClassLoader getClassLoader(); CodeEmitter beginMethod(ClassEmitter ce, MethodInfo method); int getOriginalModifiers(MethodInfo method); int getIndex(MethodInfo method); void emitCallback(CodeEmitter ce, int index); Signature getImplSignature(MethodInfo method); void emitInvoke(CodeEmitter e, MethodInfo method); } } ",0 "-title text-info ng-binding fonticon fonticon-event ng-binding""> {{item.name}}




                  No events selected
                  0 "" id=""listHistoricalEventsToPlot"">

                  {{event.title}}


                  {{event.startDate | date:'longDate'}}
                  {{event.endDate | date:'longDate'}}
                  {{150 - descHE[$index+1].length}} left
                  0"" class=""events-display-fields"">
                  {{historicalevent_title}}

                  A title is required.

                  {{historicalevent_startDate | date:'longDate'}}

                  {{historicalevent_endDate | date:'longDate'}}

                  0"" class=""form-group"">
                  {{150 - historicalevent_description.length}} left
                  Cancel selection
                  ",0 "USING THE LATEST VERSION. This file is part of the FreeRTOS distribution. FreeRTOS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception. *************************************************************************** >>! NOTE: The modification to the GPL is included to allow you to !<< >>! distribute a combined work that includes FreeRTOS without being !<< >>! obliged to provide the source code for proprietary components !<< >>! outside of the FreeRTOS kernel. !<< *************************************************************************** FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Full license text is available on the following link: http://www.freertos.org/a00114.html *************************************************************************** * * * FreeRTOS provides completely free yet professionally developed, * * robust, strictly quality controlled, supported, and cross * * platform software that is more than just the market leader, it * * is the industry's de facto standard. * * * * Help yourself get started quickly while simultaneously helping * * to support the FreeRTOS project by purchasing a FreeRTOS * * tutorial book, reference manual, or both: * * http://www.FreeRTOS.org/Documentation * * * *************************************************************************** http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading the FAQ page ""My application does not run, what could be wrong?"". Have you defined configASSERT()? http://www.FreeRTOS.org/support - In return for receiving this top quality embedded software for free we request you assist our global community by participating in the support forum. http://www.FreeRTOS.org/training - Investing in training allows your team to be as productive as possible as early as possible. Now you can receive FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers Ltd, and the world's leading authority on the world's leading RTOS. http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, including FreeRTOS+Trace - an indispensable productivity tool, a DOS compatible FAT file system, and our tiny thread aware UDP/IP stack. http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS licenses offer ticketed support, indemnification and commercial middleware. http://www.SafeRTOS.com - High Integrity Systems also provide a safety engineered and independently SIL3 certified version for use in safety and mission critical applications that require provable dependability. 1 tab == 4 spaces! */ /* * Interrupt service routines that cannot nest have no special requirements and * can be written as per the compiler documentation. However interrupts written * in this manner will utilise the stack of whichever task was interrupts, * rather than the system stack, necessitating that adequate stack space be * allocated to each created task. It is therefore not recommended to write * interrupt service routines in this manner. * * Interrupts service routines that can nest require a simple assembly wrapper. * This file is provided as a example of how this is done. * * The example in this file creates a single task. The task blocks on a * semaphore which is periodically 'given' from a timer interrupt. The assembly * wrapper for the interrupt is implemented in ISRTriggeredTask_isr.S. The * C function called by the assembly wrapper is implemented in this file. * * The task toggle LED mainISR_TRIGGERED_LED each time it is unblocked by the * interrupt. */ /* Standard includes. */ #include /* Scheduler includes. */ #include ""FreeRTOS.h"" #include ""task.h"" #include ""semphr.h"" /* Standard demo includes. */ #include ""ParTest.h"" /*-----------------------------------------------------------*/ /* The LED controlled by the ISR triggered task. */ #define mainISR_TRIGGERED_LED ( 1 ) /* Constants used to configure T5. */ #define mainT5PRESCALAR ( 6 ) #define mainT5_SEMAPHORE_RATE ( 31250 ) /*-----------------------------------------------------------*/ /* * The task that is periodically triggered by an interrupt, as described at the * top of this file. */ static void prvISRTriggeredTask( void* pvParameters ); /* * Configures the T5 timer peripheral to generate the interrupts that unblock * the task implemented by the prvISRTriggeredTask() function. */ static void prvSetupT5( void ); /* The timer 5 interrupt handler. As this interrupt uses the FreeRTOS assembly entry point the IPL setting in the following function prototype has no effect. */ void __attribute__( (interrupt(IPL3AUTO), vector(_TIMER_5_VECTOR))) vT5InterruptWrapper( void ); /*-----------------------------------------------------------*/ /* The semaphore given by the T5 interrupt to unblock the task implemented by the prvISRTriggeredTask() function. */ static SemaphoreHandle_t xBlockSemaphore = NULL; /*-----------------------------------------------------------*/ void vStartISRTriggeredTask( void ) { /* Create the task described at the top of this file. The timer is configured by the task itself. */ xTaskCreate( prvISRTriggeredTask, /* The function that implements the task. */ ""ISRt"", /* Text name to help debugging - not used by the kernel. */ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task - defined in words, not bytes. */ NULL, /* The parameter to pass into the task. Not used in this case. */ configMAX_PRIORITIES - 1, /* The priority at which the task is created. */ NULL ); /* Used to pass a handle to the created task out of the function. Not used in this case. */ } /*-----------------------------------------------------------*/ void vT5InterruptHandler( void ) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; /* This function is the handler for the peripheral timer interrupt. The interrupt is initially signalled in a separate assembly file which switches to the system stack and then calls this function. It gives a semaphore which signals the prvISRBlockTask */ /* Give the semaphore. If giving the semaphore causes the task to leave the Blocked state, and the priority of the task is higher than the priority of the interrupted task, then xHigherPriorityTaskWoken will be set to pdTRUE inside the xSemaphoreGiveFromISR() function. xHigherPriorityTaskWoken is later passed into portEND_SWITCHING_ISR(), where a context switch is requested if it is pdTRUE. The context switch ensures the interrupt returns directly to the unblocked task. */ xSemaphoreGiveFromISR( xBlockSemaphore, &xHigherPriorityTaskWoken ); /* Clear the interrupt */ IFS0CLR = _IFS0_T5IF_MASK; /* See comment above the call to xSemaphoreGiveFromISR(). */ portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); } /*-----------------------------------------------------------*/ static void prvISRTriggeredTask( void* pvParameters ) { /* Avoid compiler warnings. */ ( void ) pvParameters; /* Create the semaphore used to signal this task */ xBlockSemaphore = xSemaphoreCreateBinary(); /* Configure the timer to generate the interrupts. */ prvSetupT5(); for( ;; ) { /* Block on the binary semaphore given by the T5 interrupt. */ xSemaphoreTake( xBlockSemaphore, portMAX_DELAY ); /* Toggle the LED. */ vParTestToggleLED( mainISR_TRIGGERED_LED ); } } /*-----------------------------------------------------------*/ static void prvSetupT5( void ) { /* Set up timer 5 to generate an interrupt every 50 ms */ T5CON = 0; TMR5 = 0; T5CONbits.TCKPS = mainT5PRESCALAR; PR5 = mainT5_SEMAPHORE_RATE; /* Setup timer 5 interrupt priority to be the maximum from which interrupt safe FreeRTOS API functions can be called. Interrupt safe FreeRTOS API functions are those that end ""FromISR"". */ IPC6bits.T5IP = configMAX_SYSCALL_INTERRUPT_PRIORITY; /* Clear the interrupt as a starting condition. */ IFS0bits.T5IF = 0; /* Enable the interrupt. */ IEC0bits.T5IE = 1; /* Start the timer. */ T5CONbits.TON = 1; } ",0 ") * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * For further information about Alkacon Software GmbH, please see the * company website: http://www.alkacon.com * * For further information about OpenCms, please see the * project website: http://www.opencms.org * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.opencms.workplace.tools.content; import org.opencms.file.CmsProperty; import org.opencms.file.CmsPropertyDefinition; import org.opencms.file.CmsResource; import org.opencms.file.CmsVfsException; import org.opencms.i18n.CmsMessages; import org.opencms.jsp.CmsJspActionElement; import org.opencms.lock.CmsLock; import org.opencms.main.CmsException; import org.opencms.main.OpenCms; import org.opencms.workplace.CmsDialog; import org.opencms.workplace.CmsWorkplace; import org.opencms.workplace.CmsWorkplaceSettings; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; /** * Provides methods for the delete property definition dialog.

                  * * @since 6.0.0 */ public class CmsPropertyDelete extends CmsDialog { /** Value for the action: delete cascade. */ public static final int ACTION_DELETE_CASCADE = 100; /** Request parameter value for the action: delete cascade. */ public static final String DIALOG_DELETE_CASCADE = ""deletecascade""; /** The dialog type. */ public static final String DIALOG_TYPE = ""propertydelete""; /** Request parameter name for the property name. */ public static final String PARAM_PROPERTYNAME = ""propertyname""; private String m_paramPropertyName; /** * Public constructor with JSP action element.

                  * * @param jsp an initialized JSP action element */ public CmsPropertyDelete(CmsJspActionElement jsp) { super(jsp); } /** * Public constructor with JSP variables.

                  * * @param context the JSP page context * @param req the JSP request * @param res the JSP response */ public CmsPropertyDelete(PageContext context, HttpServletRequest req, HttpServletResponse res) { this(new CmsJspActionElement(context, req, res)); } /** * Deletes the property definition.

                  * * @throws JspException if problems including sub-elements occur */ public void actionDelete() throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); try { getCms().deletePropertyDefinition(getParamPropertyName()); // close the dialog actionCloseDialog(); } catch (Throwable e) { // error while deleting property definition, show error dialog includeErrorpage(this, e); } } /** * Deletes the property definition by cascading the properties on resources.

                  * * @throws JspException if problems including sub-elements occur */ public void actionDeleteCascade() throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); try { // list of all resources containing this propertydefinition List resourcesWithProperty = getCms().readResourcesWithProperty(getParamPropertyName()); // list of all resources locked by another user, containing this propertydefinition List resourcesLockedByOtherUser = getResourcesLockedByOtherUser(resourcesWithProperty); // do the following operations only if all of the resources are not locked by another user if (resourcesLockedByOtherUser.isEmpty()) { // save the site root String storedSiteRoot = getCms().getRequestContext().getSiteRoot(); try { // change to the root site getCms().getRequestContext().setSiteRoot(""/""); Iterator i = resourcesWithProperty.iterator(); while (i.hasNext()) { CmsResource resource = (CmsResource)i.next(); // read the property object CmsProperty property = getCms().readPropertyObject( resource.getRootPath(), getParamPropertyName(), false); // try to delete the property if it is not the NULL PROPERTY // if the property is the NULL PROPERTY, it only had a shared // value which was deleted at a sibling which was already processed if (!property.isNullProperty()) { CmsLock lock = getCms().getLock(resource); if (lock.isUnlocked()) { // lock the resource for the current (Admin) user getCms().lockResource(resource.getRootPath()); } property.setStructureValue(CmsProperty.DELETE_VALUE); property.setResourceValue(CmsProperty.DELETE_VALUE); // write the property with the null value to the resource and cascade it from the definition getCms().writePropertyObject(resource.getRootPath(), property); // unlock the resource getCms().unlockResource(resource.getRootPath()); } } // delete the property definition at last getCms().deletePropertyDefinition(getParamPropertyName()); } finally { // restore the siteroot getCms().getRequestContext().setSiteRoot(storedSiteRoot); // close the dialog actionCloseDialog(); } } else { StringBuffer reason = new StringBuffer(); reason.append(dialogWhiteBoxStart()); reason.append(buildResourceList(resourcesLockedByOtherUser, true)); reason.append(dialogWhiteBoxEnd()); throw new CmsVfsException(Messages.get().container( Messages.ERR_DEL_PROP_RESOURCES_LOCKED_1, reason.toString())); } } catch (Throwable e) { // error while deleting property definition, show error dialog includeErrorpage(this, e); } } /** * Builds a HTML list of Resources that use the specified property.

                  * * @throws CmsException if operation was not successful * * @return the HTML String for the Resource list */ public String buildResourceList() throws CmsException { List resourcesWithProperty = getCms().readResourcesWithProperty(getParamPropertyName()); return buildResourceList(resourcesWithProperty, false); } /** * Builds a HTML list of Resources.

                  * * Columns: Type, Name, Uri, Value of the property, locked by(optional).

                  * * @param resourceList a list of resources * @param lockInfo a boolean to decide if the locked info should be shown or not * @throws CmsException if operation was not successful * * @return the HTML String for the Resource list */ public String buildResourceList(List resourceList, boolean lockInfo) throws CmsException { // reverse the resource list Collections.reverse(resourceList); CmsMessages messages = Messages.get().getBundle(getLocale()); StringBuffer result = new StringBuffer(); result.append(""\n""); result.append(""\n""); // Type result.append(""\t\n""); // Uri result.append(""\t\n""); // Name result.append(""\t\n""); if (!lockInfo) { // Property value result.append(""\t\n""); } if (lockInfo) { // Property value result.append(""\t\n""); result.append(""\n""); } result.append(""\n""); result.append(""\n""); String storedSiteRoot = getCms().getRequestContext().getSiteRoot(); try { getCms().getRequestContext().setSiteRoot(""/""); Iterator i = resourceList.iterator(); while (i.hasNext()) { CmsResource resource = (CmsResource)i.next(); String filetype = OpenCms.getResourceManager().getResourceType(resource.getTypeId()).getTypeName(); result.append(""\n""); // file type result.append(""\t\n""); // file address result.append(""\t\n""); // title result.append(""\t\n""); // current value of the property if (!lockInfo) { result.append(""\t\n""); } // locked by user if (lockInfo) { CmsLock lock = getCms().getLock(resource); result.append(""\t\n""); } result.append(""\n""); } result.append(""
                  ""); result.append(messages.key(Messages.GUI_INPUT_TYPE_0)); result.append(""""); result.append(messages.key(Messages.GUI_INPUT_ADRESS_0)); result.append(""""); result.append(messages.key(Messages.GUI_INPUT_TITLE_0)); result.append(""""); result.append(messages.key(Messages.GUI_INPUT_PROPERTYVALUE_0)); result.append(""""); result.append(messages.key(Messages.GUI_EXPLORER_LOCKEDBY_0)); result.append(""
                   
                  ""); result.append(""""); result.append(""""); result.append(resource.getRootPath()); result.append(""""); result.append(getJsp().property(CmsPropertyDefinition.PROPERTY_TITLE, resource.getRootPath(), """")); result.append(""""); result.append(getJsp().property(getParamPropertyName(), resource.getRootPath())); result.append(""""); result.append(getCms().readUser(lock.getUserId()).getName()); result.append(""
                  \n""); } finally { getCms().getRequestContext().setSiteRoot(storedSiteRoot); } return result.toString(); } /** * Builds the html for the property definition select box.

                  * * @param attributes optional attributes for the <select> tag * @return the html for the property definition select box */ public String buildSelectProperty(String attributes) { return CmsPropertyChange.buildSelectProperty(getCms(), Messages.get().getBundle(getLocale()).key( Messages.GUI_PLEASE_SELECT_0), attributes, """"); } /** * Returns the value of the propertyname parameter.

                  * * @return the value of the propertyname parameter */ public String getParamPropertyName() { return m_paramPropertyName; } /** * Sets the value of the propertyname parameter.

                  * * @param paramPropertyName the value of the propertyname parameter */ public void setParamPropertyName(String paramPropertyName) { m_paramPropertyName = paramPropertyName; } /** * @see org.opencms.workplace.CmsWorkplace#initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest) */ protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings, HttpServletRequest request) { // fill the parameter values in the get/set methods fillParamValues(request); // set the dialog type setParamDialogtype(DIALOG_TYPE); // set the action for the JSP switch if (DIALOG_OK.equals(getParamAction())) { setAction(ACTION_OK); setParamTitle(Messages.get().getBundle(getLocale()).key(Messages.GUI_TITLE_PROPERTYDELETE_0) + "": "" + getParamPropertyName()); } else if (DIALOG_CANCEL.equals(getParamAction())) { setAction(ACTION_CANCEL); } else if (DIALOG_DELETE_CASCADE.equals(getParamAction())) { setAction(ACTION_DELETE_CASCADE); } else { setAction(ACTION_DEFAULT); // build title for change property value dialog setParamTitle(Messages.get().getBundle(getLocale()).key(Messages.GUI_TITLE_PROPERTYDELETE_0)); } } /** * Returns a list of resources that are locked by another user as the current user.

                  * * @param resourceList the list of all (mixed) resources * * @return a list of resources that are locked by another user as the current user * @throws CmsException if the getLock operation fails */ private List getResourcesLockedByOtherUser(List resourceList) throws CmsException { List lockedResourcesByOtherUser = new ArrayList(); Iterator i = resourceList.iterator(); while (i.hasNext()) { CmsResource resource = (CmsResource)i.next(); // get the lock state for the resource CmsLock lock = getCms().getLock(resource); // add this resource to the list if this is locked by another user if (!lock.isUnlocked() && !lock.isOwnedBy(getCms().getRequestContext().getCurrentUser())) { lockedResourcesByOtherUser.add(resource); } } return lockedResourcesByOtherUser; } } ",0 "t */ private $httpRequest; /** @var Container */ private $serviceLocator; /** @var array */ private $tempPaths; /** * @param array $tempPaths * @param IRequest $httpRequest * @param Container $serviceLocator */ public function __construct(array $tempPaths, IRequest $httpRequest, Container $serviceLocator) { $this->httpRequest = $httpRequest; $this->serviceLocator = $serviceLocator; $this->tempPaths = $tempPaths; } /** * @param string $name * @return \WebLoader\Nette\CssLoader */ public function createCssLoader($name) { /** @var Compiler $compiler */ $compiler = $this->serviceLocator->getService('webloader.css' . ucfirst($name) . 'Compiler'); return new CssLoader($compiler, $this->formatTempPath($name)); } /** * @param string $name * @return \WebLoader\Nette\JavaScriptLoader */ public function createJavaScriptLoader($name) { /** @var Compiler $compiler */ $compiler = $this->serviceLocator->getService('webloader.js' . ucfirst($name) . 'Compiler'); return new JavaScriptLoader($compiler, $this->formatTempPath($name)); } /** * @param string $name * @return string */ private function formatTempPath($name) { $lName = strtolower($name); $tempPath = isset($this->tempPaths[$lName]) ? $this->tempPaths[$lName] : Extension::DEFAULT_TEMP_PATH; return rtrim($this->httpRequest->getUrl()->basePath, '/') . '/' . $tempPath; } } ",0 "_get_path_alias('node/' . $node->nid), array('absolute' => TRUE)); ?>

                  nid; ?>"" class="" clearfix"">
                  > "">

                  Dados da Experiência

                  >
                  ",0 " See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ import java.util.Arrays; import java.util.Collections; import java.util.Locale; import java.util.Map; import java.util.LinkedHashMap; import java.util.Set; import java.util.ServiceConfigurationError; import org.apache.lucene.util.SPIClassIterator; /** * Helper class for loading named SPIs from classpath (e.g. Tokenizers, TokenStreams). * @lucene.internal */ final class AnalysisSPILoader { private volatile Map> services = Collections.emptyMap(); private final Class clazz; private final String[] suffixes; public AnalysisSPILoader(Class clazz) { this(clazz, new String[] { clazz.getSimpleName() }); } public AnalysisSPILoader(Class clazz, ClassLoader loader) { this(clazz, new String[] { clazz.getSimpleName() }, loader); } public AnalysisSPILoader(Class clazz, String[] suffixes) { this(clazz, suffixes, Thread.currentThread().getContextClassLoader()); } public AnalysisSPILoader(Class clazz, String[] suffixes, ClassLoader classloader) { this.clazz = clazz; this.suffixes = suffixes; // if clazz' classloader is not a parent of the given one, we scan clazz's classloader, too: final ClassLoader clazzClassloader = clazz.getClassLoader(); if (clazzClassloader != null && !SPIClassIterator.isParentClassLoader(clazzClassloader, classloader)) { reload(clazzClassloader); } reload(classloader); } /** * Reloads the internal SPI list from the given {@link ClassLoader}. * Changes to the service list are visible after the method ends, all * iterators (e.g., from {@link #availableServices()},...) stay consistent. * *

                  NOTE: Only new service providers are added, existing ones are * never removed or replaced. * *

                  This method is expensive and should only be called for discovery * of new service providers on the given classpath/classloader! */ public synchronized void reload(ClassLoader classloader) { final LinkedHashMap> services = new LinkedHashMap<>(this.services); final SPIClassIterator loader = SPIClassIterator.get(clazz, classloader); while (loader.hasNext()) { final Class service = loader.next(); final String clazzName = service.getSimpleName(); String name = null; for (String suffix : suffixes) { if (clazzName.endsWith(suffix)) { name = clazzName.substring(0, clazzName.length() - suffix.length()).toLowerCase(Locale.ROOT); break; } } if (name == null) { throw new ServiceConfigurationError(""The class name "" + service.getName() + "" has wrong suffix, allowed are: "" + Arrays.toString(suffixes)); } // only add the first one for each name, later services will be ignored // this allows to place services before others in classpath to make // them used instead of others // // TODO: Should we disallow duplicate names here? // Allowing it may get confusing on collisions, as different packages // could contain same factory class, which is a naming bug! // When changing this be careful to allow reload()! if (!services.containsKey(name)) { services.put(name, service); } } this.services = Collections.unmodifiableMap(services); } public S newInstance(String name, Map args) { final Class service = lookupClass(name); try { return service.getConstructor(Map.class).newInstance(args); } catch (Exception e) { throw new IllegalArgumentException(""SPI class of type ""+clazz.getName()+"" with name '""+name+""' cannot be instantiated. "" + ""This is likely due to a misconfiguration of the java class '"" + service.getName() + ""': "", e); } } public Class lookupClass(String name) { final Class service = services.get(name.toLowerCase(Locale.ROOT)); if (service != null) { return service; } else { throw new IllegalArgumentException(""A SPI class of type ""+clazz.getName()+"" with name '""+name+""' does not exist. ""+ ""You need to add the corresponding JAR file supporting this SPI to your classpath. ""+ ""The current classpath supports the following names: ""+availableServices()); } } public Set availableServices() { return services.keySet(); } } ",0 "8; } $options = array( ""type"" => ""object"", ""subtype"" => ""thewire"", ""limit"" => $count, ""full_view"" => false, ""pagination"" => false, ""view_type_toggle"" => false ); if (!empty($filter)) { $filters = string_to_tag_array($filter); $filters = array_map(""sanitise_string"", $filters); $options[""joins""] = array(""JOIN "" . elgg_get_config(""dbprefix"") . ""objects_entity oe ON oe.guid = e.guid""); $options[""wheres""] = array(""(oe.description LIKE '%"" . implode(""%' OR oe.description LIKE '%"", $filters) . ""%')""); } $content = elgg_list_entities($options); if (!empty($content)) { echo $content; echo """" . elgg_view(""output/url"", array(""href"" => ""thewire/all"",""text"" => elgg_echo(""thewire:moreposts""))) . """"; } else { echo elgg_echo(""thewire_tools:no_result""); } ",0 "System\Classes\PluginBase; class Plugin extends PluginBase { public function pluginDetails() { return [ 'name' => 'Stocker', 'description' => 'Provides stock quote information.', 'author' => 'Bill Bostick', 'icon' => 'icon-sun-o' ]; } public function registerComponents() { return [ '\Bostick\Stocker\Components\Stocker' => 'stocker', ]; } } ",0 "www.w3.org/1999/xhtml"" xml:lang=""en"" lang=""en""> QTextBlock Class Reference

                  QTextBlock Class Reference

                  [com.trolltech.qt.gui package]

                  Constructor

                  • void QTextBlock()
                  • void QTextBlock(QTextBlock o)

                  Constructor Properties

                  • prototype: The QTextBlock prototype object

                  Prototype Object Properties

                  • QTextBlock_iterator begin()
                  • QTextBlockFormat blockFormat()
                  • int blockFormatIndex()
                  • int blockNumber()
                  • QTextCharFormat charFormat()
                  • int charFormatIndex()
                  • void clearLayout()
                  • bool contains(int position)
                  • QTextDocument document()
                  • QTextBlock_iterator end()
                  • int firstLineNumber()
                  • int fragmentIndex()
                  • bool isValid()
                  • bool isVisible()
                  • QTextLayout layout()
                  • int length()
                  • int lineCount()
                  • QTextBlock next()
                  • bool operator_equal(QTextBlock o)
                  • bool operator_less(QTextBlock o)
                  • int position()
                  • QTextBlock previous()
                  • int revision()
                  • void setLineCount(int count)
                  • void setRevision(int rev)
                  • void setUserData(QTextBlockUserData data)
                  • void setUserState(int state)
                  • void setVisible(bool visible)
                  • String text()
                  • LayoutDirection textDirection()
                  • QTextList textList()
                  • QTextBlockUserData userData()
                  • int userState()

                  Instance Properties

                  QTextBlock objects have no special properties beyond those inherited from the QTextBlock prototype object.

                  ",0 "; use JDT\Api\Http\InternalApiRequest; use Illuminate\Filesystem\Filesystem; use Laravel\Passport\ApiTokenCookieFactory; use Symfony\Component\HttpFoundation\Cookie; use Illuminate\Contracts\Container\Container; use JDT\Api\Exceptions\InternalHttpException; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Debug\ExceptionHandler; use Illuminate\Support\Facades\Request as RequestFacade; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; class InternalRequest { /** * Setup Params. */ protected $container; protected $cookieFactory; protected $fileSystem; protected $requestStack; protected $routeStack; /** * Request Params. */ protected $attach; protected $be; protected $cookies; protected $headers; protected $content; protected $on; protected $once = false; protected $with; /** * InternalRequest constructor. * @param \Illuminate\Contracts\Container\Container $container * @param \Illuminate\Filesystem\Filesystem $fileSystem * @param \Illuminate\Routing\Router $router * @param \Laravel\Passport\ApiTokenCookieFactory $cookieFactory */ public function __construct(Container $container, Filesystem $fileSystem, Router $router, ApiTokenCookieFactory $cookieFactory) { $this->container = $container; $this->fileSystem = $fileSystem; $this->router = $router; $this->cookieFactory = $cookieFactory; $this->reset(); $this->setupRequestStack(); } /** * @return \JDT\Api\InternalRequest */ public function reset():self { $this->attach = []; $this->cookies = []; $this->headers = []; $this->content = null; $this->on = null; $this->with = []; if ($this->once === true) { $this->be = null; $this->once = false; } return $this; } /** * Setup the request stack by grabbing the initial request. */ protected function setupRequestStack() { $this->requestStack[] = $this->container['request']; } /** * @param array $attach * @return \JDT\Api\InternalRequest */ public function attach(array $files) { foreach ($files as $key => $file) { if (is_array($file)) { $file = new UploadedFile($file['path'], basename($file['path']), $file['mime'], $file['size']); } elseif (is_string($file)) { $finfo = finfo_open(FILEINFO_MIME_TYPE); $file = new UploadedFile($file, basename($file), finfo_file($finfo, $file), $this->fileSystem->size($file)); } elseif (!$file instanceof UploadedFile) { continue; } $this->attach[$key] = $file; } return $this; } /** * @param \Illuminate\Contracts\Auth\Authenticatable $user * @return \JDT\Api\InternalRequest */ public function be(Authenticatable $user):self { $this->be = $user; return $this; } /** * @param \Symfony\Component\HttpFoundation\Cookie $cookie * @return \JDT\Api\InternalRequest */ public function cookie(Cookie $cookie):self { $value = $cookie->getValue(); if ($cookie->getName() === Passport::cookie()) { $value = encrypt($value); } $this->cookies[$cookie->getName()] = $value; return $this; } /** * @param string $key * @param string $value * @return \JDT\Api\InternalRequest */ public function header(string $key, string $value):self { $this->headers[$key] = $value; return $this; } /** * @param array|string $json * @return \JDT\Api\InternalRequest */ public function json($json):self { if (is_array($json)) { $json = json_encode($json); } $this->content = $content; return $this->header('Content-Type', 'application/json'); } /** * @param string $on * @return \JDT\Api\InternalRequest */ public function on(string $on):self { $this->on = $on; return $this; } /** * @return \JDT\Api\InternalRequest */ public function once():self { $this->once = true; return $this; } /** * @param string|array $with * @return \JDT\Api\InternalRequest */ public function with($with):self { $this->with = array_merge($this->with, is_array($with) ? $with : func_get_args()); return $this; } /** * @param string $routeName * @param array $params * @return \JDT\Api\InternalResult */ public function delete(string $routeName, array $params = []):InternalResult { return $this->queueRequest('delete', $routeName, $params); } /** * @param string $routeName * @param array $params * @return \JDT\Api\InternalResult */ public function get(string $routeName, array $params = []):InternalResult { return $this->queueRequest('get', $routeName, $params); } /** * @param string $routeName * @param array $params * @return \JDT\Api\InternalResult */ public function patch(string $routeName, array $params = []):InternalResult { return $this->queueRequest('patch', $routeName, $params); } /** * @param string $routeName * @param array $params * @return \JDT\Api\InternalResult */ public function post(string $routeName, array $params = []):InternalResult { return $this->queueRequest('post', $routeName, $params); } /** * @param string $routeName * @param array $params * @return \JDT\Api\InternalResult */ public function put(string $routeName, array $params = []):InternalResult { return $this->queueRequest('put', $routeName, $params); } /** * @param string $method * @param string $routeName * @param array $params * @return \JDT\Api\InternalResult */ protected function queueRequest(string $method, string $routeName, array $params = []):InternalResult { $allowedMethods = [ 'delete', 'get', 'patch', 'post', 'put', ]; if (!in_array($method, $allowedMethods)) { throw new \BadMethodCallException('Unknown method ""' . $method . '""'); } $uri = route($routeName, $params, false); // Sometimes after setting the initial request another request might be made prior to // internally dispatching an API request. We need to capture this request as well // and add it to the request stack as it has become the new parent request to // this internal request. This will generally occur during tests when // using the crawler to navigate pages that also make internal // requests. if (end($this->requestStack) != $this->container['request']) { $this->requestStack[] = $this->container['request']; } $this->requestStack[] = $request = $this->createRequest($method, $uri, $params); $result = $this->dispatch($request); if (empty($result->getContent())) { $content = []; } else { $content = json_decode($result->getContent(), true); } return new InternalResult($content, $result->getOriginalContent(), $result->getStatusCode()); } /** * @param string $method * @param string $uri * @param array $params * @return InternalApiRequest */ protected function createRequest(string $method, string $uri, array $params = []) { $parameters = array_merge($this->with, $params); // If the URI does not have a scheme then we can assume that there it is not an // absolute URI, in this case we'll prefix the root requests path to the URI. $rootUrl = $this->getRootRequest()->root(); if ((!parse_url($uri, PHP_URL_SCHEME)) && parse_url($rootUrl) !== false) { $uri = rtrim($rootUrl, '/') . '/' . ltrim($uri, '/'); } if ($this->be !== null) { $token = uniqid(); $this->cookie($this->cookieFactory->make($this->be->getKey(), $token)); $this->header('X-CSRF-TOKEN', $token); } $request = InternalApiRequest::create( $uri, $method, $parameters, $this->cookies, $this->attach, $this->container['request']->server->all(), $this->content ); $request->headers->set('host', $this->on); foreach ($this->headers as $header => $value) { $request->headers->set($header, $value); } $request->headers->set('accept', $this->getAcceptHeader()); return $request; } /** * Build the ""Accept"" header. * * @return string */ protected function getAcceptHeader():string { return 'application/vnd.jb.v1+json'; } /** * @param \JDT\Api\Http\InternalApiRequest $request * @return \Illuminate\Http\Response|mixed * @throws InternalHttpException|HttpExceptionInterface */ protected function dispatch(InternalApiRequest $request) { $this->routeStack[] = $this->router->getCurrentRoute(); $this->clearCachedFacadeInstance(); $exceptionHandler = $this->container->make(ExceptionHandler::class); $this->container->offsetUnset(ExceptionHandler::class); try { $this->container->instance('request', $request); $response = $this->router->dispatch($request); if (!$response->isSuccessful() && !$response->isRedirection()) { throw new InternalHttpException($response); } } finally { $this->container->instance(ExceptionHandler::class, $exceptionHandler); $this->refreshRequestStack(); } return $response; } /** * Refresh the request stack. * * This is done by resetting the authentication, popping * the last request from the stack, replacing the input, * and resetting the version and parameters. * * @return void */ protected function refreshRequestStack() { if ($route = array_pop($this->routeStack)) { $this->router->setCurrentRoute($route); } $this->replaceRequestInstance(); $this->clearCachedFacadeInstance(); $this->reset(); } /** * Replace the request instance with the previous request instance. * * @return void */ protected function replaceRequestInstance() { array_pop($this->requestStack); $request = end($this->requestStack); $this->container->instance('request', $request); $this->router->setCurrentRequest($request); } /** * Clear the cached facade instance. * * @return void */ protected function clearCachedFacadeInstance() { // Facades cache the resolved instance so we need to clear out the // request instance that may have been cached. Otherwise we'll // may get unexpected results. RequestFacade::clearResolvedInstance('request'); } /** * Get the root request instance. * * @return \Illuminate\Http\Request */ protected function getRootRequest():Request { return reset($this->requestStack); } } ",0 "right (c) 2015 - 2020 Geoffrey Oliver *@link http://libraries.gliver.io *@category Core *@package Core\Helpers\View */ use Drivers\Templates\Implementation; use Exceptions\BaseException; use Drivers\Cache\CacheBase; use Drivers\Registry; class View { /** *This is the constructor class. We make this private to avoid creating instances of *this object * *@param null *@return void */ private function __construct() {} /** *This method stops creation of a copy of this object by making it private * *@param null *@return void * */ private function __clone(){} /** *This method parses the input variables and loads the specified views * *@param string $filePath the string that specifies the view file to load *@param array $data an array with variables to be passed to the view file *@return void This method does not return anything, it directly loads the view file *@throws */ public static function render($filePath, array $data = null) { //this try block is excecuted to enable throwing and catching of errors as appropriate try { //get the variables passed and make them available to the view if ( $data != null) { //loop through the array setting the respective variables foreach ($data as $key => $value) { $$key = $value; } } //get the parsed contents of the template file $contents = self::getContents($filePath); //start the output buffer ob_start(); //evaluate the contents of this view file eval(""?>"" . $contents . ""getMessage(); $e->show(); } catch(Exception $e) { echo $e->getMessage(); } } /** *This method converts the code into valid php code * *@param string $file The name of the view whose contant is to be parsed *@return string $parsedContent The parsed content of the template file */ public static function getContents($filePath) { //compose the file full path $path = Path::view($filePath); //get an instance of the view template class $template = Registry::get('template'); //get the compiled file contents $contents = $template->compiled($path); //return the compiled template file contents return $contents; } }",0 "r table ca_object_lots_x_collections * ---------------------------------------------------------------------- * CollectiveAccess * Open-source collections management software * ---------------------------------------------------------------------- * * Software by Whirl-i-Gig (http://www.whirl-i-gig.com) * Copyright 2008-2010 Whirl-i-Gig * * For more information visit http://www.CollectiveAccess.org * * This program is free software; you may redistribute it and/or modify it under * the terms of the provided license as published by Whirl-i-Gig * * CollectiveAccess is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * This source code is free and modifiable under the terms of * GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See * the ""license.txt"" file for details, or visit the CollectiveAccess web site at * http://www.CollectiveAccess.org * * @package CollectiveAccess * @subpackage models * @license http://www.gnu.org/copyleft/gpl.html GNU Public License version 3 * * ---------------------------------------------------------------------- */ /** * */ require_once(__CA_LIB_DIR__.'/core/BaseRelationshipModel.php'); BaseModel::$s_ca_models_definitions['ca_object_lots_x_collections'] = array( 'NAME_SINGULAR' => _t('object lot ⇔ collection relationship'), 'NAME_PLURAL' => _t('object lot ⇔ collection relationships'), 'FIELDS' => array( 'relation_id' => array( 'FIELD_TYPE' => FT_NUMBER, 'DISPLAY_TYPE' => DT_HIDDEN, 'IDENTITY' => true, 'DISPLAY_WIDTH' => 10, 'DISPLAY_HEIGHT' => 1, 'IS_NULL' => false, 'DEFAULT' => '', 'LABEL' => 'Relation id', 'DESCRIPTION' => 'Identifier for Relation' ), 'lot_id' => array( 'FIELD_TYPE' => FT_NUMBER, 'DISPLAY_TYPE' => DT_FIELD, 'DISPLAY_WIDTH' => 10, 'DISPLAY_HEIGHT' => 1, 'IS_NULL' => false, 'DEFAULT' => '', 'LABEL' => 'Lot id', 'DESCRIPTION' => 'Identifier for Lot' ), 'collection_id' => array( 'FIELD_TYPE' => FT_NUMBER, 'DISPLAY_TYPE' => DT_FIELD, 'DISPLAY_WIDTH' => 10, 'DISPLAY_HEIGHT' => 1, 'IS_NULL' => false, 'DEFAULT' => '', 'LABEL' => 'Collection id', 'DESCRIPTION' => 'Identifier for Collection' ), 'type_id' => array( 'FIELD_TYPE' => FT_NUMBER, 'DISPLAY_TYPE' => DT_FIELD, 'DISPLAY_WIDTH' => 10, 'DISPLAY_HEIGHT' => 1, 'IS_NULL' => false, 'DEFAULT' => '', 'LABEL' => 'Type id', 'DESCRIPTION' => 'Identifier for Type', 'BOUNDS_VALUE' => array(0,65535) ), 'source_info' => array( 'FIELD_TYPE' => FT_TEXT, 'DISPLAY_TYPE' => DT_FIELD, 'DISPLAY_WIDTH' => 88, 'DISPLAY_HEIGHT' => 15, 'IS_NULL' => false, 'DEFAULT' => '', 'LABEL' => 'Source information', 'DESCRIPTION' => 'Source information' ), 'effective_date' => array( 'FIELD_TYPE' => FT_HISTORIC_DATERANGE, 'DISPLAY_TYPE' => DT_FIELD, 'DISPLAY_WIDTH' => 40, 'DISPLAY_HEIGHT' => 1, 'IS_NULL' => true, 'DEFAULT' => '', 'START' => 'sdatetime', 'END' => 'edatetime', 'LABEL' => _t('Effective dates'), 'DESCRIPTION' => _t('Period of time for which this relationship was in effect. This is an option qualification for the relationship. If left blank, this relationship is implied to have existed for as long as the related items have existed.') ), 'rank' => array( 'FIELD_TYPE' => FT_NUMBER, 'DISPLAY_TYPE' => DT_OMIT, 'DISPLAY_WIDTH' => 10, 'DISPLAY_HEIGHT' => 1, 'IS_NULL' => false, 'DEFAULT' => '', 'LABEL' => _t('Sort order'), 'DESCRIPTION' => _t('The relative priority of the relationship when displayed in a list with other relationships. Lower numbers indicate higher priority.') ) ) ); class ca_object_lots_x_collections extends BaseRelationshipModel { # --------------------------------- # --- Object attribute properties # --------------------------------- # Describe structure of content object's properties - eg. database fields and their # associated types, what modes are supported, et al. # # ------------------------------------------------------ # --- Basic object parameters # ------------------------------------------------------ # what table does this class represent? protected $TABLE = 'ca_object_lots_x_collections'; # what is the primary key of the table? protected $PRIMARY_KEY = 'relation_id'; # ------------------------------------------------------ # --- Properties used by standard editing scripts # # These class properties allow generic scripts to properly display # records from the table represented by this class # # ------------------------------------------------------ # Array of fields to display in a listing of records from this table protected $LIST_FIELDS = array('source_info'); # When the list of ""list fields"" above contains more than one field, # the LIST_DELIMITER text is displayed between fields as a delimiter. # This is typically a comma or space, but can be any string you like protected $LIST_DELIMITER = ' '; # What you'd call a single record from this table (eg. a ""person"") protected $NAME_SINGULAR; # What you'd call more than one record from this table (eg. ""people"") protected $NAME_PLURAL; # List of fields to sort listing of records by; you can use # SQL 'ASC' and 'DESC' here if you like. protected $ORDER_BY = array('source_info'); # Maximum number of record to display per page in a listing protected $MAX_RECORDS_PER_PAGE = 20; # How do you want to page through records in a listing: by number pages ordered # according to your setting above? Or alphabetically by the letters of the first # LIST_FIELD? protected $PAGE_SCHEME = 'alpha'; # alpha [alphabetical] or num [numbered pages; default] # If you want to order records arbitrarily, add a numeric field to the table and place # its name here. The generic list scripts can then use it to order table records. protected $RANK = 'rank'; # ------------------------------------------------------ # Hierarchical table properties # ------------------------------------------------------ protected $HIERARCHY_TYPE = null; protected $HIERARCHY_LEFT_INDEX_FLD = null; protected $HIERARCHY_RIGHT_INDEX_FLD = null; protected $HIERARCHY_PARENT_ID_FLD = null; protected $HIERARCHY_DEFINITION_TABLE = null; protected $HIERARCHY_ID_FLD = null; protected $HIERARCHY_POLY_TABLE = null; # ------------------------------------------------------ # Change logging # ------------------------------------------------------ protected $UNIT_ID_FIELD = null; protected $LOG_CHANGES_TO_SELF = true; protected $LOG_CHANGES_USING_AS_SUBJECT = array( ""FOREIGN_KEYS"" => array( 'lot_id', 'collection_id' ), ""RELATED_TABLES"" => array( ) ); # ------------------------------------------------------ # --- Relationship info # ------------------------------------------------------ protected $RELATIONSHIP_LEFT_TABLENAME = 'ca_object_lots'; protected $RELATIONSHIP_RIGHT_TABLENAME = 'ca_collections'; protected $RELATIONSHIP_LEFT_FIELDNAME = 'lot_id'; protected $RELATIONSHIP_RIGHT_FIELDNAME = 'collection_id'; protected $RELATIONSHIP_TYPE_FIELDNAME = 'type_id'; # ------------------------------------------------------ # $FIELDS contains information about each field in the table. The order in which the fields # are listed here is the order in which they will be returned using getFields() protected $FIELDS; # ------------------------------------------------------ # --- Constructor # # This is a function called when a new instance of this object is created. This # standard constructor supports three calling modes: # # 1. If called without parameters, simply creates a new, empty objects object # 2. If called with a single, valid primary key value, creates a new objects object and loads # the record identified by the primary key value # # ------------------------------------------------------ public function __construct($pn_id=null) { parent::__construct($pn_id); # call superclass constructor } # ------------------------------------------------------ } ?>",0 "de #include /* * This is a driver for the eMemory EG004K32TQ028XW01 NeoFuse * One-Time-Programmable (OTP) memory used within the SiFive FU540. * It is documented in the FU540 manual here: * https://www.sifive.com/documentation/chips/freedom-u540-c000-manual/ */ struct sifive_otp_registers { u32 pa; /* Address input */ u32 paio; /* Program address input */ u32 pas; /* Program redundancy cell selection input */ u32 pce; /* OTP Macro enable input */ u32 pclk; /* Clock input */ u32 pdin; /* Write data input */ u32 pdout; /* Read data output */ u32 pdstb; /* Deep standby mode enable input (active low) */ u32 pprog; /* Program mode enable input */ u32 ptc; /* Test column enable input */ u32 ptm; /* Test mode enable input */ u32 ptm_rep;/* Repair function test mode enable input */ u32 ptr; /* Test row enable input */ u32 ptrim; /* Repair function enable input */ u32 pwe; /* Write enable input (defines program cycle) */ } __packed; /* * Read a 32 bit value addressed by its index from the OTP. * The FU540 stores 4096x32 bit (16KiB) values. * Index 0x00-0xff are reserved for SiFive internal use. (first 1KiB) */ u32 otp_read_word(u16 idx) { u32 w; if (idx >= 0x1000) die(""otp: idx out of bounds""); struct sifive_otp_registers *regs = (void *)(FU540_OTP); // wake up from stand-by write32(®s->pdstb, 0x01); // enable repair function write32(®s->ptrim, 0x01); // enable input write32(®s->pce, 0x01); // address to read write32(®s->pa, idx); // cycle clock to read write32(®s->pclk, 0x01); mdelay(1); write32(®s->pclk, 0x00); mdelay(1); w = read32(®s->pdout); // shut down write32(®s->pce, 0x00); write32(®s->ptrim, 0x00); write32(®s->pdstb, 0x00); return w; } u32 otp_read_serial(void) { u32 serial = 0; u32 serial_n = 0; for (int i = 0xfe; i > 0; i -= 2) { serial = otp_read_word(i); serial_n = otp_read_word(i+1); if (serial == ~serial_n) break; } return serial; } ",0 "PI.AI Java SDK - client-side libraries for API.AI * ================================================= * * Copyright (C) 2014 by Speaktoit, Inc. (https://www.speaktoit.com) * https://www.api.ai * *********************************************************************************************************************** * * 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. * ***********************************************************************************************************************/ public class ProtocolProdTest extends ProtocolTestBase { // Testing keys protected static final String ACCESS_TOKEN = ""3485a96fb27744db83e78b8c4bc9e7b7""; protected String getAccessToken() { return ACCESS_TOKEN; } @Override protected String getSecondAccessToken() { return ""968235e8e4954cf0bb0dc07736725ecd""; } protected String getRuAccessToken(){ return ""07806228a357411d83064309a279c7fd""; } protected String getBrAccessToken(){ // TODO return """"; } protected String getPtBrAccessToken(){ return ""42db6ad6a51c47088318a8104833b66c""; } @Override protected String getJaAccessToken() { // TODO return """"; } } ",0 "his work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.twill.internal; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import org.apache.twill.internal.state.Message; import org.apache.twill.internal.state.MessageCodec; import org.apache.twill.zookeeper.ZKClient; import org.apache.twill.zookeeper.ZKOperations; import org.apache.zookeeper.CreateMode; /** * Helper class to send messages to remote instances using Apache Zookeeper watch mechanism. */ public final class ZKMessages { /** * Creates a message node in zookeeper. The message node created is a PERSISTENT_SEQUENTIAL node. * * @param zkClient The ZooKeeper client for interacting with ZooKeeper. * @param messagePathPrefix ZooKeeper path prefix for the message node. * @param message The {@link Message} object for the content of the message node. * @param completionResult Object to set to the result future when the message is processed. * @param Type of the completion result. * @return A {@link ListenableFuture} that will be completed when the message is consumed, which indicated * by deletion of the node. If there is exception during the process, it will be reflected * to the future returned. */ public static ListenableFuture sendMessage(final ZKClient zkClient, String messagePathPrefix, Message message, final V completionResult) { SettableFuture result = SettableFuture.create(); sendMessage(zkClient, messagePathPrefix, message, result, completionResult); return result; } /** * Creates a message node in zookeeper. The message node created is a PERSISTENT_SEQUENTIAL node. * * @param zkClient The ZooKeeper client for interacting with ZooKeeper. * @param messagePathPrefix ZooKeeper path prefix for the message node. * @param message The {@link Message} object for the content of the message node. * @param completion A {@link SettableFuture} to reflect the result of message process completion. * @param completionResult Object to set to the result future when the message is processed. * @param Type of the completion result. */ public static void sendMessage(final ZKClient zkClient, String messagePathPrefix, Message message, final SettableFuture completion, final V completionResult) { // Creates a message and watch for its deletion for completion. Futures.addCallback(zkClient.create(messagePathPrefix, MessageCodec.encode(message), CreateMode.PERSISTENT_SEQUENTIAL), new FutureCallback() { @Override public void onSuccess(String path) { Futures.addCallback(ZKOperations.watchDeleted(zkClient, path), new FutureCallback() { @Override public void onSuccess(String result) { completion.set(completionResult); } @Override public void onFailure(Throwable t) { completion.setException(t); } }); } @Override public void onFailure(Throwable t) { completion.setException(t); } }); } private ZKMessages() { } } ",0 "t can be used for both the client * and the server programs. * * Written by: James Ross ******************************************************************************/ #ifndef _IRC_COMM_H_ #define _IRC_COMM_H_ #include ""utility_sys.h"" /* useful macros, definitions and libraries */ #define NO_FLAGS 0 /* used for functions where no flag argument is used. */ /* Server connectivity information */ #define _COM_SERV_ADDR ""10.200.248.135"" #define _COM_SERV_LEN sizeof(_COM_SERV_ADDR) #define _COM_SERV_PORT 50059 /* port listening on server */ #define _COM_NET_DOMAIN AF_INET /* network domain we are using. IPV4 */ #define _COM_SOCK_TYPE SOCK_STREAM /* tcp socket */ #define _COM_IP_PROTOCOL 0 /* Default for type in socket() */ #define _COM_IO_BUFF 512 /* max bytes that can be sent/recieved */ #define _NAME_SIZE_MAX 11 /* includes '\0' */ #define MSG_TYPE_SIZE 1 /****************************************************************************** * Command Code Definition ******************************************************************************/ #define RC_FA 0x1 #define RC_FL 0x2 #define RC_JOIN 0x7 #define RC_EXIT 0x8 #define RC_LOGOUT 0xA #define RC_RL 0xC #define RC_FR 0x10 #define RC_LOGON 0x11 #define RC_LEAVE 0x15 #define RC_MSG 0x16 #define RC_RUL 0x17 /* list users in a room */ #define RESERVED_Z 0x0 /* was useful to reserve for error checking */ #define RESERVE_CR 0x13 /* reserved since we use \r in messages */ /* server to client reply success/failure */ #define _REPLY_SUCCESS 1 #define _REPLY_FAILURE 0 /* length of the reply to logon. */ #define _LOGON_REPLY_SIZE 3 typedef struct server_info { in_addr_t addr; /* network binary of server address */ char *dot_addr; /* dotted representation of IP address */ in_port_t port; /* port used at IP address, network ordered */ int domain; /* AF_INET or AF_INET6 */ int sock_type; /* type of socket, socket() definition. */ int pcol; /* Protocol argument used in socket() */ int sockfd; /* socket file descriptior */ struct sockaddr_in *socket_info; /* socket API struct, IPV4 */ } struct_serv_info; typedef struct parsed_cli_message { char *cli_name; int type; char *msg; } struct_cli_message; typedef struct parsed_serv_message { uint8_t type; char *msg; } struct_serv_message; struct_serv_info* _com_init_serv_info(void); void _com_free_serv_info(struct_serv_info *dest); void _com_free_cli_message(struct_cli_message *rem); void _com_free_serv_message(struct_serv_message *rem); /******************************************************************************* * TODO: Maybe make these functions since they are long, though my current * protocol with them just calls a seperate stack frame and just calls the * inline, which the compiler should notice and just make that 1 stack frame * this code... * * An analyze binary size, which i think is okay since it is only called in a * single line function that returns this. Other issues though? Memory * imprint in a different way? ******************************************************************************/ static inline ssize_t socket_transmit(int sockfd, uint8_t *tx, size_t len, int flags) { ssize_t sent; /* number of bytes written to socket */ size_t remaining = len; /* number of bytes left to write */ sent = send(sockfd, tx, remaining, flags); if (_usrUnlikely(sent == FAILURE)) { err_msg(""socket_transmit: send() failed""); return FAILURE; } /* in case there was something not written, try again */ remaining -= sent; tx += sent; return (len - remaining); } /* end socket_transmit */ static inline ssize_t socket_receive(int sockfd, uint8_t *rx, size_t len, int flags) { ssize_t received = 1; /* bytes read from a socket, non-EOF init */ size_t remaining = len; /* bytes still in buffer */ received = recv(sockfd, rx, remaining, flags); if (received == FAILURE) { err_msg(""socket_recieve: recv() failed""); return FAILURE; } remaining -= received; rx += received; return (len - remaining); } /* end socket_recieve */ #endif ",0 "aType.h"" // Forward declarations. struct BkPoint3; // ~~~~~ Dcl(PUBLIC) ~~~~~ /*! \brief Samples a list of triangles. * * \param vertices The vertices of each triangles. Must be sorted. * \param number_of_geoms The number of triangles. * \param number_of_points The number of points to sample. */ extern BK_API void BkMeshSampling_Sample(struct BkPoint3 const* vertices, size_t const number_of_geoms, size_t const number_of_points); #endif ",0 "e.Path; import java.nio.file.Paths; import java.nio.file.SimpleFileVisitor; import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; import java.util.Deque; import java.util.LinkedList; import java.util.List; import cz.vhromada.validators.Validators; import org.springframework.util.StringUtils; /** * A class represents file visitor for copying directories and files. */ public class CopyingFileVisitor extends SimpleFileVisitor { /** * Delimiter in replacing text */ private static final String REPLACING_TEXT_DELIMITER = "",""; /** * Source directory */ private Path source; /** * Target directory */ private Path target; /** * Replacing patterns */ private List replacePatterns; /** * Directories */ private Deque directories; /** * Creates a new instance of CopyingFileVisitor. * * @param source source directory * @param target target directory * @param replacingText replacing text * @param newText new text * @throws IllegalArgumentException if source directory is null * or target directory is null * or replacing text is null * or new text is null * or count of replacing texts is different from count of new texts */ public CopyingFileVisitor(final Path source, final Path target, final String replacingText, final String newText) { Validators.validateArgumentNotNull(source, ""Source""); Validators.validateArgumentNotNull(target, ""Target""); Validators.validateArgumentNotNull(replacingText, ""Replacing text""); Validators.validateArgumentNotNull(newText, ""New text""); this.source = source; this.target = target; this.directories = new LinkedList<>(); this.replacePatterns = createReplacePatterns(replacingText, newText); } @Override public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException { final Path directory = getDirectoryName(dir); directories.addLast(directory); if (!Files.exists(directory)) { Files.createDirectory(directory); } return super.preVisitDirectory(dir, attrs); } @Override public FileVisitResult postVisitDirectory(final Path dir, final IOException exc) throws IOException { directories.removeLast(); return super.postVisitDirectory(dir, exc); } @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { FileCopy.copy(file, directories.getLast(), replacePatterns); return super.visitFile(file, attrs); } /** * Returns created replace patters. * * @param replacingText replacing text * @param newText new text * @return created replace patters * @throws IllegalArgumentException if count of replacing texts is different from count of new texts */ private static List createReplacePatterns(final String replacingText, final String newText) { final String[] replacingTexts = StringUtils.tokenizeToStringArray(replacingText, REPLACING_TEXT_DELIMITER); final String[] newTexts = StringUtils.tokenizeToStringArray(newText, REPLACING_TEXT_DELIMITER); if (replacingTexts.length != newTexts.length) { throw new IllegalArgumentException(""Count of replacing texts is different from count of new texts""); } final List result = new ArrayList<>(); for (int i = 0; i < replacingTexts.length; i++) { final String source = replacingTexts[i]; final String target = newTexts[i]; result.add(new ReplacePattern(source, target)); result.add(new ReplacePattern(source.toLowerCase(), target.toLowerCase())); result.add(new ReplacePattern(StringUtils.capitalize(source.toLowerCase()), StringUtils.capitalize(target.toLowerCase()))); result.add(new ReplacePattern(source.toUpperCase(), target.toUpperCase())); } return result; } /** * Returns directory name. * * @param directory directory * @return directory name */ private Path getDirectoryName(final Path directory) { final String sourcePath = source.toAbsolutePath().toString(); final String targetPath = target.toAbsolutePath().toString(); final String directoryPath = directory.toAbsolutePath().toString(); final String result = directoryPath.replace(sourcePath, targetPath); final String replacedResult = FileCopy.replaceText(result, replacePatterns); return Paths.get(replacedResult); } } ",0 "physics Object Oriented Simulation Environment */ /* */ /* (c) 2010 Battelle Energy Alliance, LLC */ /* ALL RIGHTS RESERVED */ /* */ /* Prepared by Battelle Energy Alliance, LLC */ /* Under Contract No. DE-AC07-05ID14517 */ /* With the U. S. Department of Energy */ /* */ /* See COPYRIGHT for full restrictions */ /****************************************************************/ #ifndef LIBMESHPARTITIONER_H #define LIBMESHPARTITIONER_H #include ""MoosePartitioner.h"" class LibmeshPartitioner; template<> InputParameters validParams(); class LibmeshPartitioner : public MoosePartitioner { public: LibmeshPartitioner(const InputParameters & params); virtual ~LibmeshPartitioner(); virtual std::unique_ptr clone() const; virtual void partition(MeshBase &mesh, const unsigned int n); virtual void partition(MeshBase &mesh); protected: virtual void _do_partition(MeshBase & mesh, const unsigned int n); std::unique_ptr _partitioner; MooseEnum _partitioner_name; }; #endif /* LIBMESHPARTITIONER_H */ ",0 "ld.FieldSchemaCreator.CREATEBINARY; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATEBOOLEAN; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATEBOOLEANLIST; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATEDATE; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATEDATELIST; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATEHTML; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATEHTMLLIST; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATEMICRONODE; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATEMICRONODELIST; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATENODE; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATENODELIST; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATENUMBER; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATENUMBERLIST; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATESTRING; import static com.gentics.mesh.core.field.FieldSchemaCreator.CREATESTRINGLIST; import static com.gentics.mesh.core.field.FieldTestHelper.NOOP; import static com.gentics.mesh.test.ElasticsearchTestMode.TRACKING; import static com.gentics.mesh.test.TestSize.FULL; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import org.junit.Test; import com.gentics.mesh.FieldUtil; import com.gentics.mesh.core.data.node.field.HibHtmlField; import com.gentics.mesh.core.field.html.HtmlFieldTestHelper; import com.gentics.mesh.test.MeshTestSetting; import com.gentics.mesh.util.IndexOptionHelper; @MeshTestSetting(elasticsearch = TRACKING, testSize = FULL, startServer = false) public class HtmlFieldMigrationTest extends AbstractFieldMigrationTest implements HtmlFieldTestHelper { @Test @Override public void testRemove() throws Exception { removeField(CREATEHTML, FILLTEXT, FETCH); } @Test @Override public void testChangeToBinary() throws Exception { changeType(CREATEHTML, FILLTEXT, FETCH, CREATEBINARY, (container, name) -> { assertThat(container.getBinary(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToBinary() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATEBINARY, (container, name) -> { assertThat(container.getBinary(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToBoolean() throws Exception { changeType(CREATEHTML, FILLTRUE, FETCH, CREATEBOOLEAN, (container, name) -> { assertThat(container.getBoolean(name)).as(NEWFIELD).isNotNull(); assertThat(container.getBoolean(name).getBoolean()).as(NEWFIELDVALUE).isEqualTo(true); }); changeType(CREATEHTML, FILLFALSE, FETCH, CREATEBOOLEAN, (container, name) -> { assertThat(container.getBoolean(name)).as(NEWFIELD).isNotNull(); assertThat(container.getBoolean(name).getBoolean()).as(NEWFIELDVALUE).isEqualTo(false); }); changeType(CREATEHTML, FILL1, FETCH, CREATEBOOLEAN, (container, name) -> { assertThat(container.getBoolean(name)).as(NEWFIELD).isNotNull(); assertThat(container.getBoolean(name).getBoolean()).as(NEWFIELDVALUE).isEqualTo(true); }); changeType(CREATEHTML, FILL0, FETCH, CREATEBOOLEAN, (container, name) -> { assertThat(container.getBoolean(name)).as(NEWFIELD).isNotNull(); assertThat(container.getBoolean(name).getBoolean()).as(NEWFIELDVALUE).isEqualTo(false); }); changeType(CREATEHTML, FILLTEXT, FETCH, CREATEBOOLEAN, (container, name) -> { assertThat(container.getBoolean(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToBoolean() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATEBOOLEAN, (container, name) -> { assertThat(container.getBoolean(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToBooleanList() throws Exception { changeType(CREATEHTML, FILLTRUE, FETCH, CREATEBOOLEANLIST, (container, name) -> { assertThat(container.getBooleanList(name)).as(NEWFIELD).isNotNull(); assertThat(container.getBooleanList(name).getValues()).as(NEWFIELDVALUE).containsExactly(true); }); changeType(CREATEHTML, FILLFALSE, FETCH, CREATEBOOLEANLIST, (container, name) -> { assertThat(container.getBooleanList(name)).as(NEWFIELD).isNotNull(); assertThat(container.getBooleanList(name).getValues()).as(NEWFIELDVALUE).containsExactly(false); }); changeType(CREATEHTML, FILL1, FETCH, CREATEBOOLEANLIST, (container, name) -> { assertThat(container.getBooleanList(name)).as(NEWFIELD).isNotNull(); assertThat(container.getBooleanList(name).getValues()).as(NEWFIELDVALUE).containsExactly(true); }); changeType(CREATEHTML, FILL0, FETCH, CREATEBOOLEANLIST, (container, name) -> { assertThat(container.getBooleanList(name)).as(NEWFIELD).isNotNull(); assertThat(container.getBooleanList(name).getValues()).as(NEWFIELDVALUE).containsExactly(false); }); changeType(CREATEHTML, FILLTEXT, FETCH, CREATEBOOLEANLIST, (container, name) -> { assertThat(container.getBooleanList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToBooleanList() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATEBOOLEANLIST, (container, name) -> { assertThat(container.getBooleanList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToDate() throws Exception { changeType(CREATEHTML, FILL0, FETCH, CREATEDATE, (container, name) -> { assertThat(container.getDate(name)).as(NEWFIELD).isNotNull(); assertThat(container.getDate(name).getDate()).as(NEWFIELDVALUE).isEqualTo(0L); }); changeType(CREATEHTML, FILL1, FETCH, CREATEDATE, (container, name) -> { assertThat(container.getDate(name)).as(NEWFIELD).isNotNull(); // Internally timestamps are stored in miliseconds assertThat(container.getDate(name).getDate()).as(NEWFIELDVALUE).isEqualTo(1000L); }); changeType(CREATEHTML, FILLTEXT, FETCH, CREATEDATE, (container, name) -> { assertThat(container.getDate(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToDate() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATEDATE, (container, name) -> { assertThat(container.getDate(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToDateList() throws Exception { changeType(CREATEHTML, FILL0, FETCH, CREATEDATELIST, (container, name) -> { assertThat(container.getDateList(name)).as(NEWFIELD).isNotNull(); assertThat(container.getDateList(name).getValues()).as(NEWFIELDVALUE).containsExactly(0L); }); changeType(CREATEHTML, FILL1, FETCH, CREATEDATELIST, (container, name) -> { assertThat(container.getDateList(name)).as(NEWFIELD).isNotNull(); // Internally timestamps are stored in miliseconds assertThat(container.getDateList(name).getValues()).as(NEWFIELDVALUE).containsExactly(1000L); }); changeType(CREATEHTML, FILLTEXT, FETCH, CREATEDATELIST, (container, name) -> { assertThat(container.getDateList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToDateList() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATEDATELIST, (container, name) -> { assertThat(container.getDateList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToHtml() throws Exception { changeType(CREATEHTML, FILLTEXT, FETCH, CREATEHTML, (container, name) -> { assertThat(container.getHtml(name)).as(NEWFIELD).isNotNull(); assertThat(container.getHtml(name).getHTML()).as(NEWFIELDVALUE).isEqualTo(""HTML content""); }); } @Test @Override public void testEmptyChangeToHtml() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATEHTML, (container, name) -> { assertThat(container.getHtml(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToHtmlList() throws Exception { changeType(CREATEHTML, FILLTEXT, FETCH, CREATEHTMLLIST, (container, name) -> { assertThat(container.getHTMLList(name)).as(NEWFIELD).isNotNull(); assertThat(container.getHTMLList(name).getValues()).as(NEWFIELDVALUE).containsExactly(""HTML content""); }); } @Test @Override public void testEmptyChangeToHtmlList() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATEHTMLLIST, (container, name) -> { assertThat(container.getHTMLList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToMicronode() throws Exception { changeType(CREATEHTML, FILLTEXT, FETCH, CREATEMICRONODE, (container, name) -> { assertThat(container.getMicronode(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToMicronode() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATEMICRONODE, (container, name) -> { assertThat(container.getMicronode(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToMicronodeList() throws Exception { changeType(CREATEHTML, FILLTEXT, FETCH, CREATEMICRONODELIST, (container, name) -> { assertThat(container.getMicronodeList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToMicronodeList() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATEMICRONODELIST, (container, name) -> { assertThat(container.getMicronodeList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToNode() throws Exception { changeType(CREATEHTML, FILLTEXT, FETCH, CREATENODE, (container, name) -> { assertThat(container.getNode(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToNode() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATENODE, (container, name) -> { assertThat(container.getNode(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToNodeList() throws Exception { changeType(CREATEHTML, FILLTEXT, FETCH, CREATENODELIST, (container, name) -> { assertThat(container.getNodeList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToNodeList() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATENODELIST, (container, name) -> { assertThat(container.getNodeList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToNumber() throws Exception { changeType(CREATEHTML, FILL0, FETCH, CREATENUMBER, (container, name) -> { assertThat(container.getNumber(name)).as(NEWFIELD).isNotNull(); assertThat(container.getNumber(name).getNumber().longValue()).as(NEWFIELDVALUE).isEqualTo(0L); }); changeType(CREATEHTML, FILL1, FETCH, CREATENUMBER, (container, name) -> { assertThat(container.getNumber(name)).as(NEWFIELD).isNotNull(); assertThat(container.getNumber(name).getNumber().longValue()).as(NEWFIELDVALUE).isEqualTo(1L); }); changeType(CREATEHTML, FILLTEXT, FETCH, CREATENUMBER, (container, name) -> { assertThat(container.getNumber(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToNumber() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATENUMBER, (container, name) -> { assertThat(container.getNumber(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToNumberList() throws Exception { changeType(CREATEHTML, FILL0, FETCH, CREATENUMBERLIST, (container, name) -> { assertThat(container.getNumberList(name)).as(NEWFIELD).isNotNull(); assertThat(container.getNumberList(name).getValues()).as(NEWFIELDVALUE).containsExactly(0L); }); changeType(CREATEHTML, FILL1, FETCH, CREATENUMBERLIST, (container, name) -> { assertThat(container.getNumberList(name)).as(NEWFIELD).isNotNull(); assertThat(container.getNumberList(name).getValues()).as(NEWFIELDVALUE).containsExactly(1L); }); changeType(CREATEHTML, FILLTEXT, FETCH, CREATENUMBERLIST, (container, name) -> { assertThat(container.getNumberList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testEmptyChangeToNumberList() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATENUMBERLIST, (container, name) -> { assertThat(container.getNumberList(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToString() throws Exception { changeType(CREATEHTML, FILLTEXT, FETCH, CREATESTRING, (container, name) -> { assertThat(container.getString(name)).as(NEWFIELD).isNotNull(); assertThat(container.getString(name).getString()).as(NEWFIELDVALUE).isEqualTo(""HTML content""); }); } @Test @Override public void testEmptyChangeToString() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATESTRING, (container, name) -> { assertThat(container.getString(name)).as(NEWFIELD).isNull(); }); } @Test @Override public void testChangeToStringList() throws Exception { changeType(CREATEHTML, FILLTEXT, FETCH, CREATESTRINGLIST, (container, name) -> { assertThat(container.getStringList(name)).as(NEWFIELD).isNotNull(); assertThat(container.getStringList(name).getValues()).as(NEWFIELDVALUE).containsExactly(""HTML content""); }); } @Test @Override public void testEmptyChangeToStringList() throws Exception { changeType(CREATEHTML, NOOP, FETCH, CREATESTRINGLIST, (container, name) -> { assertThat(container.getStringList(name)).as(NEWFIELD).isNull(); }); } @Test public void testIndexOptionAddRaw() throws InterruptedException, ExecutionException, TimeoutException { changeType(CREATEHTML, FILLLONGTEXT, FETCH, name -> FieldUtil.createHtmlFieldSchema(name).setElasticsearch(IndexOptionHelper.getRawFieldOption()), (container, name) -> { HibHtmlField htmlField = container.getHtml(name); assertEquals(""The html field should not be truncated."", 40_000, htmlField.getHTML().length()); waitForSearchIdleEvent(); assertThat(trackingSearchProvider()).recordedStoreEvents(1); }); } } ",0 "ect.tsj.net.mindview.util; import java.io.*; public class Print { // Print with a newline: public static void print(Object obj) { System.out.println(obj); } // Print a newline by itself: public static void print() { System.out.println(); } // Print with no line break: public static void printnb(Object obj) { System.out.print(obj); } // The new Java SE5 printf() (from C): public static PrintStream printf(String format, Object... args) { return System.out.printf(format, args); } } ///:~ ",0 "ontent=""text/html; charset=ISO-8859-1""> BenchmarkTest01074


                  ",0 "ny\Component\Form\FormBuilder; class UserType extends AbstractType { protected $em; public function __construct(\Doctrine\ORM\EntityManager $em) { $this->em = $em; } public function buildForm(FormBuilder $builder, array $options) { $builder->add('kind', 'entity', array( 'class' => 'JamiiUserBundle:Kind', 'choices' => $this->em->getRepository('JamiiUserBundle:Kind')->getKindChoiceList(), 'property' => 'name' , /*, 'query_builder' => function(EntityRepository $er) { return $er->createQueryBuilder('s')->orderBy('s.name', 'ASC'); },*/ 'required' => true, 'empty_value' => 'Choose your kind', 'empty_data' => null ) ); $builder->add('subkind', 'text', array('required' => false)); $builder->add('contact', 'textarea', array('required' => false)); $builder->add('info', 'textarea', array('required' => false)); $builder->add('description', 'textarea', array('required' => false)); for($i = 1980; $i<= 2020; $i++) { $years[] = $i; } $builder->add('birthDay', 'date', array('widget'=> 'choice', 'format' => 'dd.MM.yyyy' , 'years' => $years)); $builder->add('sex', 'choice', array( 'choices' => array( 'm' => 'Male', 'f' => 'Female' ), 'required' => true, 'empty_value' => 'Choose your gender', 'empty_data' => null )); $builder->add('file', 'file', array('required' => false,)); } //put your code here public function getName() { return ""user""; } public function getDefaultOptions(array $options) { return array('data_class' => 'Jamii\UserBundle\Entity\User'); } } ?>",0 """). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the ""license"" file accompanying this file. This file 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. */ package com.amazonaws.services.docdb.model.transform; import java.util.ArrayList; import javax.xml.stream.events.XMLEvent; import javax.annotation.Generated; import com.amazonaws.services.docdb.model.*; import com.amazonaws.transform.Unmarshaller; import com.amazonaws.transform.StaxUnmarshallerContext; import com.amazonaws.transform.SimpleTypeStaxUnmarshallers.*; /** * Event StAX Unmarshaller */ @Generated(""com.amazonaws:aws-java-sdk-code-generator"") public class EventStaxUnmarshaller implements Unmarshaller { public Event unmarshall(StaxUnmarshallerContext context) throws Exception { Event event = new Event(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return event; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression(""SourceIdentifier"", targetDepth)) { event.setSourceIdentifier(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression(""SourceType"", targetDepth)) { event.setSourceType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression(""Message"", targetDepth)) { event.setMessage(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression(""EventCategories"", targetDepth)) { event.withEventCategories(new ArrayList()); continue; } if (context.testExpression(""EventCategories/EventCategory"", targetDepth)) { event.withEventCategories(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression(""Date"", targetDepth)) { event.setDate(DateStaxUnmarshallerFactory.getInstance(""iso8601"").unmarshall(context)); continue; } if (context.testExpression(""SourceArn"", targetDepth)) { event.setSourceArn(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return event; } } } } private static EventStaxUnmarshaller instance; public static EventStaxUnmarshaller getInstance() { if (instance == null) instance = new EventStaxUnmarshaller(); return instance; } } ",0 "e.dao.DataBaseManager; /** * @author tomio * */ public class DataBaseManagementService { private DataBaseManager manager; public DataBaseManagementService(DataBaseManager manager) { this.manager = manager; } public void createDB() throws PersistenceException { try { this.manager.getDataBaseManagementDAO().createDB(); } catch (SQLException e) { throw new PersistenceException(""Error creating database"", e); } } public void reinitializeDB() throws PersistenceException { try { this.manager.getDataBaseManagementDAO().reinitializeDB(); } catch (SQLException e) { throw new PersistenceException(""Error reinitializing the database"", e); } } } ",0 "nk5 5.092407184714711'>YORK BOTANICAL GARDEN
                  CULTIVATED PLANTS OF GRAN D C/EfMAN EWI
                  VoI^SUZlJ
                  ÇÕÔivd'ta sp. L.
                  Shrub; Leaves green containing white margins; full sunlight; rocky soil; 1,5 meters; abandoned honesite, South £cund Rd., outside of Georgetown.
                  goll N. Chevalier_ 1S1 August 24, 1971 det
                  00198996


                  Legend - Level of confidence that token is an accurately-transcribed word
                      extremely low     very low     low     undetermined     medium     high     very high
                  ",0 "; import com.weygo.weygophone.pages.common.widget.WGCommonHorizontalListView; /** * Created by muma on 2017/6/4. */ public class WGHomeContentFloorClassifyColumnView extends WGCommonHorizontalListView { public WGHomeContentFloorClassifyColumnView(Context context) { super(context); } public WGHomeContentFloorClassifyColumnView(Context context, AttributeSet attrs) { super(context, attrs); } public WGHomeContentFloorClassifyColumnView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Override protected int itemResId() { return R.layout.wghome_content_floor_classify_column_item; } } ",0 "le.category', 'Categories - view'); $this->menu = [ ['icon' => 'fa fa-fw fa-list-alt', 'label' => Yii::t('StoreModule.category', 'Manage categories'), 'url' => ['/store/categoryBackend/index']], ['icon' => 'fa fa-fw fa-plus-square', 'label' => Yii::t('StoreModule.category', 'Create category'), 'url' => ['/store/categoryBackend/create']], ['label' => Yii::t('StoreModule.category', 'Category') . ' «' . mb_substr($model->name, 0, 32) . '»'], [ 'icon' => 'fa fa-fw fa-pencil', 'label' => Yii::t('StoreModule.category', 'Update category'), 'url' => [ '/store/categoryBackend/update', 'id' => $model->id ] ], [ 'icon' => 'fa fa-fw fa-eye', 'label' => Yii::t('StoreModule.category', 'View category'), 'url' => [ '/store/categoryBackend/view', 'id' => $model->id ] ], [ 'icon' => 'fa fa-fw fa-trash-o', 'label' => Yii::t('StoreModule.category', 'Delete category'), 'url' => '#', 'linkOptions' => [ 'submit' => ['/store/categoryBackend/delete', 'id' => $model->id], 'params' => [Yii::app()->getRequest()->csrfTokenName => Yii::app()->getRequest()->csrfToken], 'confirm' => Yii::t('StoreModule.category', 'Do you really want to remove category?'), 'csrf' => true, ] ], ]; ?>


                  «name; ?>»

                  widget( 'bootstrap.widgets.TbDetailView', [ 'data' => $model, 'attributes' => [ 'id', [ 'name' => 'parent_id', 'value' => $model->getParentName(), ], 'name', 'slug', [ 'name' => 'image', 'type' => 'raw', 'value' => $model->image ? CHtml::image($model->getImageUrl(200, 200), $model->name) : '---', ], [ 'name' => 'description', 'type' => 'raw' ], [ 'name' => 'short_description', 'type' => 'raw' ], [ 'name' => 'status', 'value' => $model->getStatus(), ], ], ] ); ?> ",0 "onarQube is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * SonarQube is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.sonar.server.rule; import com.google.common.collect.Sets; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.sonar.api.resources.Language; import org.sonar.api.resources.Languages; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.RuleStatus; import org.sonar.api.rule.Severity; import org.sonar.api.server.rule.RulesDefinition; import org.sonar.api.utils.DateUtils; import org.sonar.api.utils.System2; import org.sonar.core.persistence.AbstractDaoTestCase; import org.sonar.core.persistence.DbSession; import org.sonar.core.qualityprofile.db.QualityProfileDao; import org.sonar.core.rule.RuleDto; import org.sonar.core.rule.RuleParamDto; import org.sonar.core.technicaldebt.db.CharacteristicDao; import org.sonar.server.db.DbClient; import org.sonar.server.qualityprofile.RuleActivator; import org.sonar.server.qualityprofile.db.ActiveRuleDao; import org.sonar.server.rule.db.RuleDao; import java.util.Date; import java.util.List; import static org.fest.assertions.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class RegisterRulesTest extends AbstractDaoTestCase { static final Date DATE1 = DateUtils.parseDateTime(""2014-01-01T19:10:03+0100""); static final Date DATE2 = DateUtils.parseDateTime(""2014-02-01T12:10:03+0100""); static final Date DATE3 = DateUtils.parseDateTime(""2014-03-01T12:10:03+0100""); RuleActivator ruleActivator = mock(RuleActivator.class); System2 system; DbClient dbClient; DbSession dbSession; @Before public void before() { system = mock(System2.class); when(system.now()).thenReturn(DATE1.getTime()); RuleDao ruleDao = new RuleDao(system); ActiveRuleDao activeRuleDao = new ActiveRuleDao(new QualityProfileDao(getMyBatis(), system), ruleDao, system); dbClient = new DbClient(getDatabase(), getMyBatis(), ruleDao, activeRuleDao, new QualityProfileDao(getMyBatis(), system), new CharacteristicDao(getMyBatis())); dbSession = dbClient.openSession(false); } @After public void after() throws Exception { dbSession.close(); } @Test public void insert_new_rules() { execute(new FakeRepositoryV1()); // verify db assertThat(dbClient.ruleDao().findAll(dbSession)).hasSize(2); RuleKey ruleKey1 = RuleKey.of(""fake"", ""rule1""); RuleDto rule1 = dbClient.ruleDao().getNullableByKey(dbSession, ruleKey1); assertThat(rule1.getName()).isEqualTo(""One""); assertThat(rule1.getDescription()).isEqualTo(""Description of One""); assertThat(rule1.getSeverityString()).isEqualTo(Severity.BLOCKER); assertThat(rule1.getTags()).isEmpty(); assertThat(rule1.getSystemTags()).containsOnly(""tag1"", ""tag2"", ""tag3""); assertThat(rule1.getConfigKey()).isEqualTo(""config1""); assertThat(rule1.getStatus()).isEqualTo(RuleStatus.BETA); assertThat(rule1.getCreatedAt()).isEqualTo(DATE1); assertThat(rule1.getUpdatedAt()).isEqualTo(DATE1); // TODO check characteristic and remediation function List params = dbClient.ruleDao().findRuleParamsByRuleKey(dbSession, ruleKey1); assertThat(params).hasSize(2); RuleParamDto param = getParam(params, ""param1""); assertThat(param.getDescription()).isEqualTo(""parameter one""); assertThat(param.getDefaultValue()).isEqualTo(""default1""); } @Test public void do_not_update_rules_when_no_changes() { execute(new FakeRepositoryV1()); assertThat(dbClient.ruleDao().findAll(dbSession)).hasSize(2); when(system.now()).thenReturn(DATE2.getTime()); execute(new FakeRepositoryV1()); RuleKey ruleKey1 = RuleKey.of(""fake"", ""rule1""); RuleDto rule1 = dbClient.ruleDao().getNullableByKey(dbSession, ruleKey1); assertThat(rule1.getCreatedAt()).isEqualTo(DATE1); assertThat(rule1.getUpdatedAt()).isEqualTo(DATE1); } @Test public void update_and_remove_rules_on_changes() { execute(new FakeRepositoryV1()); assertThat(dbClient.ruleDao().findAll(dbSession)).hasSize(2); // user adds tags and sets markdown note RuleKey ruleKey1 = RuleKey.of(""fake"", ""rule1""); RuleDto rule1 = dbClient.ruleDao().getNullableByKey(dbSession, ruleKey1); rule1.setTags(Sets.newHashSet(""usertag1"", ""usertag2"")); rule1.setNoteData(""user *note*""); rule1.setNoteUserLogin(""marius""); dbClient.ruleDao().update(dbSession, rule1); dbSession.commit(); when(system.now()).thenReturn(DATE2.getTime()); execute(new FakeRepositoryV2()); // rule1 has been updated rule1 = dbClient.ruleDao().getNullableByKey(dbSession, ruleKey1); assertThat(rule1.getName()).isEqualTo(""One v2""); assertThat(rule1.getDescription()).isEqualTo(""Description of One v2""); assertThat(rule1.getSeverityString()).isEqualTo(Severity.INFO); assertThat(rule1.getTags()).containsOnly(""usertag1"", ""usertag2""); assertThat(rule1.getSystemTags()).containsOnly(""tag1"", ""tag4""); assertThat(rule1.getConfigKey()).isEqualTo(""config1 v2""); assertThat(rule1.getNoteData()).isEqualTo(""user *note*""); assertThat(rule1.getNoteUserLogin()).isEqualTo(""marius""); assertThat(rule1.getStatus()).isEqualTo(RuleStatus.READY); assertThat(rule1.getCreatedAt()).isEqualTo(DATE1); assertThat(rule1.getUpdatedAt()).isEqualTo(DATE2); // TODO check characteristic and remediation function List params = dbClient.ruleDao().findRuleParamsByRuleKey(dbSession, ruleKey1); assertThat(params).hasSize(2); RuleParamDto param = getParam(params, ""param1""); assertThat(param.getDescription()).isEqualTo(""parameter one v2""); assertThat(param.getDefaultValue()).isEqualTo(""default1 v2""); // rule2 has been removed -> status set to REMOVED but db row is not deleted RuleDto rule2 = dbClient.ruleDao().getNullableByKey(dbSession, RuleKey.of(""fake"", ""rule2"")); assertThat(rule2.getStatus()).isEqualTo(RuleStatus.REMOVED); assertThat(rule2.getUpdatedAt()).isEqualTo(DATE2); // rule3 has been created RuleDto rule3 = dbClient.ruleDao().getNullableByKey(dbSession, RuleKey.of(""fake"", ""rule3"")); assertThat(rule3).isNotNull(); assertThat(rule3.getStatus()).isEqualTo(RuleStatus.READY); } @Test public void do_not_update_already_removed_rules() { execute(new FakeRepositoryV1()); assertThat(dbClient.ruleDao().findAll(dbSession)).hasSize(2); RuleDto rule2 = dbClient.ruleDao().getByKey(dbSession, RuleKey.of(""fake"", ""rule2"")); assertThat(rule2.getStatus()).isEqualTo(RuleStatus.READY); when(system.now()).thenReturn(DATE2.getTime()); execute(new FakeRepositoryV2()); // On MySQL, need to update a rule otherwise rule2 will be seen as READY, but why ??? dbClient.ruleDao().update(dbSession, dbClient.ruleDao().getByKey(dbSession, RuleKey.of(""fake"", ""rule1""))); dbSession.commit(); // rule2 is removed rule2 = dbClient.ruleDao().getNullableByKey(dbSession, RuleKey.of(""fake"", ""rule2"")); assertThat(rule2.getStatus()).isEqualTo(RuleStatus.REMOVED); when(system.now()).thenReturn(DATE3.getTime()); execute(new FakeRepositoryV2()); dbSession.commit(); // -> rule2 is still removed, but not update at DATE3 rule2 = dbClient.ruleDao().getNullableByKey(dbSession, RuleKey.of(""fake"", ""rule2"")); assertThat(rule2.getStatus()).isEqualTo(RuleStatus.REMOVED); assertThat(rule2.getUpdatedAt()).isEqualTo(DATE2); } @Test public void mass_insert() { execute(new BigRepository()); assertThat(dbClient.ruleDao().findAll(dbSession)).hasSize(BigRepository.SIZE); assertThat(dbClient.ruleDao().findAllRuleParams(dbSession)).hasSize(BigRepository.SIZE * 20); } @Test public void manage_repository_extensions() { execute(new FindbugsRepository(), new FbContribRepository()); List rules = dbClient.ruleDao().findAll(dbSession); assertThat(rules).hasSize(2); for (RuleDto rule : rules) { assertThat(rule.getRepositoryKey()).isEqualTo(""findbugs""); } } private void execute(RulesDefinition... defs) { RuleDefinitionsLoader loader = new RuleDefinitionsLoader(mock(RuleRepositories.class), defs); Languages languages = mock(Languages.class); when(languages.get(""java"")).thenReturn(mock(Language.class)); RegisterRules task = new RegisterRules(loader, ruleActivator, dbClient, languages, system); task.start(); } private RuleParamDto getParam(List params, String key) { for (RuleParamDto param : params) { if (param.getName().equals(key)) { return param; } } return null; } static class FakeRepositoryV1 implements RulesDefinition { @Override public void define(Context context) { NewRepository repo = context.createRepository(""fake"", ""java""); NewRule rule1 = repo.createRule(""rule1"") .setName(""One"") .setHtmlDescription(""Description of One"") .setSeverity(Severity.BLOCKER) .setInternalKey(""config1"") .setTags(""tag1"", ""tag2"", ""tag3"") .setStatus(RuleStatus.BETA) .setDebtSubCharacteristic(""MEMORY_EFFICIENCY"") .setEffortToFixDescription(""squid.S115.effortToFix""); rule1.setDebtRemediationFunction(rule1.debtRemediationFunctions().linearWithOffset(""5d"", ""10h"")); rule1.createParam(""param1"").setDescription(""parameter one"").setDefaultValue(""default1""); rule1.createParam(""param2"").setDescription(""parameter two"").setDefaultValue(""default2""); repo.createRule(""rule2"") .setName(""Two"") .setHtmlDescription(""Minimal rule""); repo.done(); } } /** * FakeRepositoryV1 with some changes */ static class FakeRepositoryV2 implements RulesDefinition { @Override public void define(Context context) { NewRepository repo = context.createRepository(""fake"", ""java""); // almost all the attributes of rule1 are changed NewRule rule1 = repo.createRule(""rule1"") .setName(""One v2"") .setHtmlDescription(""Description of One v2"") .setSeverity(Severity.INFO) .setInternalKey(""config1 v2"") // tag2 and tag3 removed, tag4 added .setTags(""tag1"", ""tag4"") .setStatus(RuleStatus.READY) .setDebtSubCharacteristic(""MEMORY_EFFICIENCY"") .setEffortToFixDescription(""squid.S115.effortToFix.v2""); rule1.setDebtRemediationFunction(rule1.debtRemediationFunctions().linearWithOffset(""6d"", ""2h"")); rule1.createParam(""param1"").setDescription(""parameter one v2"").setDefaultValue(""default1 v2""); rule1.createParam(""param2"").setDescription(""parameter two v2"").setDefaultValue(""default2 v2""); // rule2 is dropped, rule3 is new repo.createRule(""rule3"") .setName(""Three"") .setHtmlDescription(""Rule Three""); repo.done(); } } static class BigRepository implements RulesDefinition { static final int SIZE = 500; @Override public void define(Context context) { NewRepository repo = context.createRepository(""big"", ""java""); for (int i = 0; i < SIZE; i++) { NewRule rule = repo.createRule(""rule"" + i) .setName(""name of "" + i) .setHtmlDescription(""description of "" + i); for (int j = 0; j < 20; j++) { rule.createParam(""param"" + j); } } repo.done(); } } static class FindbugsRepository implements RulesDefinition { @Override public void define(Context context) { NewRepository repo = context.createRepository(""findbugs"", ""java""); repo.createRule(""rule1"") .setName(""Rule One"") .setHtmlDescription(""Description of Rule One""); repo.done(); } } static class FbContribRepository implements RulesDefinition { @Override public void define(Context context) { NewExtendedRepository repo = context.extendRepository(""findbugs"", ""java""); repo.createRule(""rule2"") .setName(""Rule Two"") .setHtmlDescription(""Description of Rule Two""); repo.done(); } } } ",0 "t> #include class BasicException : public std::exception { std::string message; public: BasicException() = default; BasicException(const char * _mess) : message(_mess) { } BasicException(const std::string& _mess) : message(_mess) { } BasicException(const BasicException& _ex) : message(_ex.message) { } virtual ~BasicException() throw() = default; virtual const char * what() const throw() { return message.c_str(); } const std::string& getMessage() const throw() { return message; } virtual void setMessage(const std::string & _mess) { message = _mess; } virtual void appendMessage(const std::string & _mess) { message += _mess; } virtual void prefixMessage(const std::string & _mess) { message = _mess + message; } }; class MmuException : public BasicException { public: MmuException() = default; MmuException(const char * _mess) : BasicException(_mess) { } MmuException(const std::string& _mess) : BasicException(_mess) { } }; class WrongComponentException : public BasicException { public: WrongComponentException() = default; WrongComponentException(const char * _mess) : BasicException(_mess) { } WrongComponentException(const std::string & _mess) : BasicException(_mess) { } }; class WrongInstructionException : public BasicException { public: WrongInstructionException() = default; WrongInstructionException(const char * _mess) : BasicException(_mess) { } WrongInstructionException(const std::string & _mess) : BasicException(_mess) { } }; class WrongArgumentException : public WrongInstructionException { public: WrongArgumentException() = default; WrongArgumentException(const char * _mess) : WrongInstructionException(_mess) { } WrongArgumentException(const std::string & _mess) : WrongInstructionException(_mess) { } }; class WrongFileException : public BasicException { public: WrongFileException() = default; WrongFileException(const char * _mess) : BasicException(_mess) { } WrongFileException(const std::string & _mess) : BasicException(_mess) { } }; class DuplicateLabelException : public BasicException { public: DuplicateLabelException() = default; DuplicateLabelException(const char * _mess) : BasicException(_mess) { } DuplicateLabelException(const std::string & _mess) : BasicException(_mess) { } }; //class DuplicateConstException : public BasicException { //public: // DuplicateConstException() = default; // DuplicateConstException(const char * _mess) : BasicException(_mess) { } // DuplicateConstException(const std::string & _mess) : BasicException(_mess) { } //}; #endif /* _EXCEPTIONS_H */ ",0 " @date 2016-05-17 * @brief This file contains all the functions prototypes for the flash cache firmware * library. ****************************************************************************** * @attention * * This module is a confidential and proprietary property of RealTek and * possession or use of this module requires written permission of RealTek. * * Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved. ****************************************************************************** */ #ifndef _RTL8710B_CACHE_H_ #define _RTL8710B_CACHE_H_ /** @addtogroup AmebaD_Platform * @{ */ /** @defgroup CACHE * @brief CACHE modules * @{ */ /** @addtogroup CACHE * @verbatim ***************************************************************************************** * Introduction ***************************************************************************************** * -just support read cache. * -32K bytes. * -used for flash read and XIP. * ***************************************************************************************** * how to use ***************************************************************************************** * Cache_Enable: enable/disable cache * Cache_Flush: flush cache, you should Cache_Flush after flash write or flash erase ***************************************************************************************** * @endverbatim */ /** @defgroup CACHE_Type_define * @{ */ #define DATA_CACHE ((u32)0x00000000) #define CODE_CACHE ((u32)0x00000001) /** * @} */ /** @defgroup CACHE_Line_Aligned_define * @{ */ #define CACHE_LINE_SIZE 32 #define CACHE_LINE_ADDR_MSK 0xFFFFFFE0 #define IS_CACHE_LINE_ALIGNED_SIZE(BYTES) ((BYTES & 0x1F) == 0) #define IS_CACHE_LINE_ALIGNED_ADDR(ADDR) ((ADDR & 0x1F) == 0) /** * @} */ /* Exported functions --------------------------------------------------------*/ /** @defgroup CACHE_Exported_Functions FLash Cache Exported Functions * @{ */ /** * @brief Disable/Enable I/D cache. * @param Enable * This parameter can be any combination of the following values: * @arg ENABLE cache enable & SPIC read 16bytes every read command * @arg DISABLE cache disable & SPIC read 4bytes every read command */ __STATIC_INLINE void Cache_Enable(u32 Enable) { if (Enable) { SCB_EnableICache(); SCB_EnableDCache(); } else { SCB_DisableICache(); SCB_DisableDCache(); } } /** * @brief flush I/D cache. */ __STATIC_INLINE void Cache_Flush(void) { SCB_InvalidateICache(); SCB_InvalidateDCache(); } /** * @brief Enable Icache. */ __STATIC_INLINE void ICache_Enable(void) { SCB_EnableICache(); } /** * @brief Disable Icache. */ __STATIC_INLINE void ICache_Disable(void) { SCB_DisableICache(); } /** * @brief Invalidate Icache. */ __STATIC_INLINE void ICache_Invalidate(void) { SCB_InvalidateICache (); } /** * @brief Check DCache Enabled or not. */ __STATIC_INLINE u32 DCache_IsEnabled(void) { return ((SCB->CCR & (u32)SCB_CCR_DC_Msk)?1:0); } /** * @brief Enable Dcache. */ __STATIC_INLINE void DCache_Enable(void) { SCB_EnableDCache(); } /** * @brief Disable Dcache. */ __STATIC_INLINE void DCache_Disable(void) { SCB_DisableDCache(); } /** * @brief D-Cache Invalidate by address. * @details Invalidates D-Cache for the given address * @param Address address (aligned to 32-byte boundary) * @param Bytes size of memory block (in number of bytes) * * @note Dcache will be restored from memory. * @note This can be used after DMA Rx, and CPU read DMA data from DMA buffer. * @note if Address is 0xFFFFFFFF, it means dont care, it was used when all Dcache be Invalidated. */ __STATIC_INLINE void DCache_Invalidate(u32 Address, u32 Bytes) { u32 addr = Address, len = Bytes; if (DCache_IsEnabled() == 0) return; if ((Address == 0xFFFFFFFF) && (Bytes == 0xFFFFFFFF)) { SCB_InvalidateDCache(); } else { if ((addr & 0x1F) != 0) { addr = (Address >> 5) << 5; //32-byte aligned len = ((((Address + Bytes -1) >> 5) + 1) << 5) - addr; //next 32-byte aligned } SCB_InvalidateDCache_by_Addr((u32*)addr, len); } } /** * @brief D-Cache Clean by address * @details Cleans D-Cache for the given address * @param Address address (aligned to 32-byte boundary) * @param Bytes size of memory block (in number of bytes) * * @note Dcache will be write back to memory. * @note This can be used before DMA Tx, after CPU write data to DMA buffer. * @note if Address is 0xFFFFFFFF, it means dont care, it was used when all Dcache be cleaned. * @note AmebaD cache is default read allocation and write through, so clean is not needed. */ __STATIC_INLINE void DCache_Clean(u32 Address, u32 Bytes) { u32 addr = Address, len = Bytes; if (DCache_IsEnabled() == 0) return; if ((Address == 0xFFFFFFFF) && (Bytes == 0xFFFFFFFF)) { SCB_CleanDCache(); } else { if ((addr & 0x1F) != 0) { addr = (Address >> 5) << 5; //32-byte aligned len = ((((Address + Bytes -1) >> 5) + 1) << 5) - addr; //next 32-byte aligned } SCB_CleanDCache_by_Addr((u32*)addr, len); } } /** * @brief D-Cache Clean and Invalidate by address * @details Cleans and invalidates D_Cache for the given address * @param Address address (aligned to 32-byte boundary) * @param Bytes size of memory block (in number of bytes) * * @note This can be used when you want to write back cache data and then Invalidate cache. * @note if Address is 0xFFFFFFFF, it means dont care, it was used when all Dcache be cleaned. */ __STATIC_INLINE void DCache_CleanInvalidate(u32 Address, u32 Bytes) { u32 addr = Address, len = Bytes; if (DCache_IsEnabled() == 0) return; if ((Address == 0xFFFFFFFF) && (Bytes == 0xFFFFFFFF)) { SCB_CleanInvalidateDCache(); } else { if ((addr & 0x1F) != 0) { addr = (Address >> 5) << 5; //32-byte aligned len = ((((Address + Bytes -1) >> 5) + 1) << 5) - addr; //next 32-byte aligned } SCB_CleanInvalidateDCache_by_Addr((u32*)addr, len); } } /** * @} */ /** * @} */ /** * @} */ #endif //_RTL8710B_CACHE_H_ /******************* (C) COPYRIGHT 2016 Realtek Semiconductor *****END OF FILE****/ ",0 "lete license terms. * * Copyright (c) 2009, University of Technology, Sydney * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the University of Technology, Sydney nor the names * of its contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @author Tania Machet (tmachet) * @date 13 December 2010 */ package au.edu.uts.eng.remotelabs.schedserver.reports.intf.types; import java.io.Serializable; import java.util.ArrayList; import java.util.Calendar; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import org.apache.axiom.om.OMConstants; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.impl.llom.OMSourcedElementImpl; import org.apache.axis2.databinding.ADBBean; import org.apache.axis2.databinding.ADBDataSource; import org.apache.axis2.databinding.ADBException; import org.apache.axis2.databinding.utils.BeanUtil; import org.apache.axis2.databinding.utils.ConverterUtil; import org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl; import org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter; /** * QuerySessionReportType bean class. */ public class QuerySessionReportType implements ADBBean { /* * This type was generated from the piece of schema that had * name = QuerySessionReportType * Namespace URI = http://remotelabs.eng.uts.edu.au/schedserver/reports * Namespace Prefix = ns1 */ private static final long serialVersionUID = -5121246029757741056L; private static String generatePrefix(final String namespace) { if (namespace.equals(""http://remotelabs.eng.uts.edu.au/schedserver/reports"")) { return ""ns1""; } return BeanUtil.getUniquePrefix(); } protected RequestorType requestor; public RequestorType getRequestor() { return this.requestor; } public void setRequestor(final RequestorType param) { this.requestor = param; } protected QueryFilterType querySelect; public QueryFilterType getQuerySelect() { return this.querySelect; } public void setQuerySelect(final QueryFilterType param) { this.querySelect = param; } protected QueryFilterType queryConstraints; protected boolean queryConstraintsTracker = false; public QueryFilterType getQueryConstraints() { return this.queryConstraints; } public void setQueryConstraints(final QueryFilterType param) { this.queryConstraints = param; this.queryConstraintsTracker = param != null; } protected Calendar startTime; protected boolean startTimeTracker = false; public Calendar getStartTime() { return this.startTime; } public void setStartTime(final Calendar param) { this.startTime = param; this.startTimeTracker = param != null; } protected Calendar endTime; protected boolean endTimeTracker = false; public Calendar getEndTime() { return this.endTime; } public void setEndTime(final Calendar param) { this.endTime = param; this.endTimeTracker = param != null; } protected PaginationType pagination; protected boolean paginationTracker = false; public PaginationType getPagination() { return this.pagination; } public void setPagination(final PaginationType param) { this.pagination = param; this.paginationTracker = param != null; } public static boolean isReaderMTOMAware(final XMLStreamReader reader) { boolean isReaderMTOMAware = false; try { isReaderMTOMAware = Boolean.TRUE.equals(reader.getProperty(OMConstants.IS_DATA_HANDLERS_AWARE)); } catch (final IllegalArgumentException e) { isReaderMTOMAware = false; } return isReaderMTOMAware; } public OMElement getOMElement(final QName parentQName, final OMFactory factory) throws ADBException { final OMDataSource dataSource = new ADBDataSource(this, parentQName) { @Override public void serialize(final MTOMAwareXMLStreamWriter xmlWriter) throws XMLStreamException { QuerySessionReportType.this.serialize(this.parentQName, factory, xmlWriter); } }; return new OMSourcedElementImpl(parentQName, factory, dataSource); } @Override public void serialize(final QName parentQName, final OMFactory factory, final MTOMAwareXMLStreamWriter xmlWriter) throws XMLStreamException, ADBException { this.serialize(parentQName, factory, xmlWriter, false); } @Override public void serialize(final QName parentQName, final OMFactory factory, final MTOMAwareXMLStreamWriter xmlWriter, final boolean serializeType) throws XMLStreamException, ADBException { String prefix = parentQName.getPrefix(); String namespace = parentQName.getNamespaceURI(); if ((namespace != null) && (namespace.trim().length() > 0)) { final String writerPrefix = xmlWriter.getPrefix(namespace); if (writerPrefix != null) { xmlWriter.writeStartElement(namespace, parentQName.getLocalPart()); } else { if (prefix == null) { prefix = QuerySessionReportType.generatePrefix(namespace); } xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace); xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); } } else { xmlWriter.writeStartElement(parentQName.getLocalPart()); } if (serializeType) { final String namespacePrefix = this.registerPrefix(xmlWriter, ""http://remotelabs.eng.uts.edu.au/schedserver/reports""); if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)) { this.writeAttribute(""xsi"", ""http://www.w3.org/2001/XMLSchema-instance"", ""type"", namespacePrefix + "":QuerySessionReportType"", xmlWriter); } else { this.writeAttribute(""xsi"", ""http://www.w3.org/2001/XMLSchema-instance"", ""type"", ""QuerySessionReportType"", xmlWriter); } } if (this.requestor == null) { throw new ADBException(""requestor cannot be null!!""); } this.requestor.serialize(new QName("""", ""requestor""), factory, xmlWriter); if (this.querySelect == null) { throw new ADBException(""querySelect cannot be null!!""); } this.querySelect.serialize(new QName("""", ""querySelect""), factory, xmlWriter); if (this.queryConstraintsTracker) { if (this.queryConstraints == null) { throw new ADBException(""queryConstraints cannot be null!!""); } this.queryConstraints.serialize(new QName("""", ""queryConstraints""), factory, xmlWriter); } if (this.startTimeTracker) { namespace = """"; if (!namespace.equals("""")) { prefix = xmlWriter.getPrefix(namespace); if (prefix == null) { prefix = QuerySessionReportType.generatePrefix(namespace); xmlWriter.writeStartElement(prefix, ""startTime"", namespace); xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); } else { xmlWriter.writeStartElement(namespace, ""startTime""); } } else { xmlWriter.writeStartElement(""startTime""); } if (this.startTime == null) { throw new ADBException(""startTime cannot be null!!""); } else { xmlWriter.writeCharacters(ConverterUtil.convertToString(this.startTime)); } xmlWriter.writeEndElement(); } if (this.endTimeTracker) { namespace = """"; if (!namespace.equals("""")) { prefix = xmlWriter.getPrefix(namespace); if (prefix == null) { prefix = QuerySessionReportType.generatePrefix(namespace); xmlWriter.writeStartElement(prefix, ""endTime"", namespace); xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); } else { xmlWriter.writeStartElement(namespace, ""endTime""); } } else { xmlWriter.writeStartElement(""endTime""); } if (this.endTime == null) { throw new ADBException(""endTime cannot be null!!""); } else { xmlWriter.writeCharacters(ConverterUtil.convertToString(this.endTime)); } xmlWriter.writeEndElement(); } if (this.paginationTracker) { if (this.pagination == null) { throw new ADBException(""pagination cannot be null!!""); } this.pagination.serialize(new QName("""", ""pagination""), factory, xmlWriter); } xmlWriter.writeEndElement(); } private void writeAttribute(final String prefix, final String namespace, final String attName, final String attValue, final XMLStreamWriter xmlWriter) throws XMLStreamException { if (xmlWriter.getPrefix(namespace) == null) { xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); } xmlWriter.writeAttribute(namespace, attName, attValue); } private String registerPrefix(final XMLStreamWriter xmlWriter, final String namespace) throws XMLStreamException { String prefix = xmlWriter.getPrefix(namespace); if (prefix == null) { prefix = QuerySessionReportType.generatePrefix(namespace); while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) { prefix = BeanUtil.getUniquePrefix(); } xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); } return prefix; } @Override public XMLStreamReader getPullParser(final QName qName) throws ADBException { final ArrayList elementList = new ArrayList(); elementList.add(new QName("""", ""requestor"")); if (this.requestor == null) { throw new ADBException(""requestor cannot be null!!""); } elementList.add(this.requestor); elementList.add(new QName("""", ""querySelect"")); if (this.querySelect == null) { throw new ADBException(""querySelect cannot be null!!""); } elementList.add(this.querySelect); if (this.queryConstraintsTracker) { elementList.add(new QName("""", ""queryConstraints"")); if (this.queryConstraints == null) { throw new ADBException(""queryConstraints cannot be null!!""); } elementList.add(this.queryConstraints); } if (this.startTimeTracker) { elementList.add(new QName("""", ""startTime"")); if (this.startTime != null) { elementList.add(ConverterUtil.convertToString(this.startTime)); } else { throw new ADBException(""startTime cannot be null!!""); } } if (this.endTimeTracker) { elementList.add(new QName("""", ""endTime"")); if (this.endTime != null) { elementList.add(ConverterUtil.convertToString(this.endTime)); } else { throw new ADBException(""endTime cannot be null!!""); } } if (this.paginationTracker) { elementList.add(new QName("""", ""pagination"")); if (this.pagination == null) { throw new ADBException(""pagination cannot be null!!""); } elementList.add(this.pagination); } return new ADBXMLStreamReaderImpl(qName, elementList.toArray(), new Object[0]); } public static class Factory { public static QuerySessionReportType parse(final XMLStreamReader reader) throws Exception { final QuerySessionReportType object = new QuerySessionReportType(); try { while (!reader.isStartElement() && !reader.isEndElement()) { reader.next(); } if (reader.getAttributeValue(""http://www.w3.org/2001/XMLSchema-instance"", ""type"") != null) { final String fullTypeName = reader.getAttributeValue(""http://www.w3.org/2001/XMLSchema-instance"", ""type""); if (fullTypeName != null) { String nsPrefix = null; if (fullTypeName.indexOf("":"") > -1) { nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf("":"")); } nsPrefix = nsPrefix == null ? """" : nsPrefix; final String type = fullTypeName.substring(fullTypeName.indexOf("":"") + 1); if (!""QuerySessionReportType"".equals(type)) { final String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); return (QuerySessionReportType) ExtensionMapper.getTypeObject(nsUri, type, reader); } } } reader.next(); while (!reader.isStartElement() && !reader.isEndElement()) { reader.next(); } if (reader.isStartElement() && new QName("""", ""requestor"").equals(reader.getName())) { object.setRequestor(RequestorType.Factory.parse(reader)); reader.next(); } else { throw new ADBException(""Unexpected subelement "" + reader.getLocalName()); } while (!reader.isStartElement() && !reader.isEndElement()) { reader.next(); } if (reader.isStartElement() && new QName("""", ""querySelect"").equals(reader.getName())) { object.setQuerySelect(QueryFilterType.Factory.parse(reader)); reader.next(); } else { throw new ADBException(""Unexpected subelement "" + reader.getLocalName()); } while (!reader.isStartElement() && !reader.isEndElement()) { reader.next(); } if (reader.isStartElement() && new QName("""", ""queryConstraints"").equals(reader.getName())) { object.setQueryConstraints(QueryFilterType.Factory.parse(reader)); reader.next(); } while (!reader.isStartElement() && !reader.isEndElement()) { reader.next(); } if (reader.isStartElement() && new QName("""", ""startTime"").equals(reader.getName())) { final String content = reader.getElementText(); object.setStartTime(ConverterUtil.convertToDateTime(content)); reader.next(); } while (!reader.isStartElement() && !reader.isEndElement()) { reader.next(); } if (reader.isStartElement() && new QName("""", ""endTime"").equals(reader.getName())) { final String content = reader.getElementText(); object.setEndTime(ConverterUtil.convertToDateTime(content)); reader.next(); } while (!reader.isStartElement() && !reader.isEndElement()) { reader.next(); } if (reader.isStartElement() && new QName("""", ""pagination"").equals(reader.getName())) { object.setPagination(PaginationType.Factory.parse(reader)); reader.next(); } while (!reader.isStartElement() && !reader.isEndElement()) { reader.next(); } if (reader.isStartElement()) { throw new ADBException(""Unexpected subelement "" + reader.getLocalName()); } } catch (final XMLStreamException e) { throw new Exception(e); } return object; } } } ",0 "rms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package net.epsilony.mf.model.search.config; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; /** * @author Man YUAN * */ @Configuration @Import({ SearcherBaseConfig.class, LRTreeNodesRangeSearcherConfig.class, TwoDBoundariesSearcherConfig.class, TwoDLRTreeBoundariesRangeSearcherConfig.class }) public class TwoDLRTreeSearcherConfig { } ",0 "p://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_FORCE_H #define LMP_FORCE_H #include ""pointers.h"" #include #include namespace LAMMPS_NS { class Force : protected Pointers { public: double boltz; // Boltzmann constant (eng/degree-K) double hplanck; // Planck's constant (energy-time) double mvv2e; // conversion of mv^2 to energy double ftm2v; // conversion of ft/m to velocity double mv2d; // conversion of mass/volume to density double nktv2p; // conversion of NkT/V to pressure double qqr2e; // conversion of q^2/r to energy double qe2f; // conversion of qE to force double vxmu2f; // conversion of vx dynamic-visc to force double xxt2kmu; // conversion of xx/t to kinematic-visc double dielectric; // dielectric constant double qqrd2e; // q^2/r to energy w/ dielectric constant double e_mass; // electron mass double hhmrr2e; // conversion of (hbar)^2/(mr^2) to energy double mvh2r; // conversion of mv/hbar to distance // hbar = h/(2*pi) double angstrom; // 1 angstrom in native units double femtosecond; // 1 femtosecond in native units double qelectron; // 1 electron charge abs() in native units int newton,newton_pair,newton_bond; // Newton's 3rd law settings class Pair *pair; char *pair_style; typedef Pair *(*PairCreator)(LAMMPS *); std::map *pair_map; class Bond *bond; char *bond_style; class Angle *angle; char *angle_style; class Dihedral *dihedral; char *dihedral_style; class Improper *improper; char *improper_style; class KSpace *kspace; char *kspace_style; // index [0] is not used in these arrays double special_lj[4]; // 1-2, 1-3, 1-4 prefactors for LJ double special_coul[4]; // 1-2, 1-3, 1-4 prefactors for Coulombics int special_angle; // 0 if defined angles are ignored // 1 if only weight 1,3 atoms if in an angle int special_dihedral; // 0 if defined dihedrals are ignored // 1 if only weight 1,4 atoms if in a dihedral int special_extra; // extra space for added bonds Force(class LAMMPS *); ~Force(); void init(); void create_pair(const char *, const char *suffix = NULL); class Pair *new_pair(const char *, const char *, int &); class Pair *pair_match(const char *, int); void create_bond(const char *, const char *suffix = NULL); class Bond *new_bond(const char *, const char *, int &); class Bond *bond_match(const char *); void create_angle(const char *, const char *suffix = NULL); class Angle *new_angle(const char *, const char *, int &); void create_dihedral(const char *, const char *suffix = NULL); class Dihedral *new_dihedral(const char *, const char *, int &); void create_improper(const char *, const char *suffix = NULL); class Improper *new_improper(const char *, const char *, int &); void create_kspace(int, char **, const char *suffix = NULL); class KSpace *new_kspace(int, char **, const char *, int &); class KSpace *kspace_match(const char *, int); void set_special(int, char **); void bounds(char *, int, int &, int &, int nmin=1); void boundsbig(char *, bigint, bigint &, bigint &, bigint nmin=1); double numeric(const char *, int, char *); int inumeric(const char *, int, char *); bigint bnumeric(const char *, int, char *); bigint memory_usage(); private: template static Pair *pair_creator(LAMMPS *); }; } #endif /* ERROR/WARNING messages: E: Invalid pair style The choice of pair style is unknown. E: Invalid bond style The choice of bond style is unknown. E: Invalid angle style The choice of angle style is unknown. E: Invalid dihedral style The choice of dihedral style is unknown. E: Invalid improper style The choice of improper style is unknown. E: Invalid kspace style The choice of kspace style is unknown. E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Numeric index is out of bounds A command with an argument that specifies an integer or range of integers is using a value that is less than 1 or greater than the maximum allowed limit. */ ",0 "riable. * As soon as that variable is set, the new password * is effective - no need to restart telnetd. * - this must be set to an _encrypted_ password, NOT * the cleartext. Use the 'genpw' utility to generate * a password string: * * 1) Compile 'genpw.c' for the HOST, i.e. * cc -o genpw genpw.c -lcrypt * 1) delete an old password definition from this file. * 2) run './genpw >> passwd.h'. This will append * a new definition to this file. * * - if no password is defined here, no authentication * is needed, i.e. telnet is open to the world. * * T. Straumann */ /* #undef TELNETD_DEFAULT_PASSWD */ /* Default password: 'rtems' */ #define TELNETD_DEFAULT_PASSWD ""tduDcyLX12owo"" ",0 "e { private String name; private int weight; private int ID; /** * Create a course with all fields filled * * @param name * name of course * @param weight * credit hours ( or weight ) of course * @param ID * course_ID in course table */ public Course(String name, int weight, int ID) { this.name = name; this.weight = weight; this.ID = ID; } /** * Create a generic course */ public Course() { this(""no name"", 0, -1); } public String getName() { return name; } public Integer getWeight() { return weight; } public Integer getID() { return ID; } /** * Returns a string formatted as: * course_name * course_weight hour(s) */ @Override public String toString() { String result = name + ""\n"" + weight; if (weight == 1) result = result + "" hour""; else result = result + "" hours""; return result; } } ",0 "named Project : Function Reference: testsetfieldasstring()
                  [ Index ]

                  PHP Cross Reference of Unnamed Project

                  [Top level directory]

                  title

                  Body

                  [close]

                  Function and Method Cross Reference

                  testsetfieldasstring()

                  Defined at: No references found.



                  Generated: Thu Oct 23 18:57:41 2014 Cross-referenced by PHPXref 0.7.1
                  ",0 "- $content: An array of comment items. Use render($content) to print them all, or * print a subset such as render($content['field_example']). Use * hide($content['field_example']) to temporarily suppress the printing of a * given element. * - $created: Formatted date and time for when the comment was created. * Preprocess functions can reformat it by calling format_date() with the * desired parameters on the $comment->created variable. * - $pubdate: Formatted date and time for when the comment was created wrapped * in a HTML5 time element. * - $changed: Formatted date and time for when the comment was last changed. * Preprocess functions can reformat it by calling format_date() with the * desired parameters on the $comment->changed variable. * - $new: New comment marker. * - $permalink: Comment permalink. * - $submitted: Submission information created from $author and $created during * template_preprocess_comment(). * - $picture: Authors picture. * - $signature: Authors signature. * - $status: Comment status. Possible values are: * comment-unpublished, comment-published or comment-preview. * - $title: Linked title. * - $classes: String of classes that can be used to style contextually through * CSS. It can be manipulated through the variable $classes_array from * preprocess functions. The default values can be one or more of the following: * - comment: The current template type, i.e., ""theming hook"". * - comment-by-anonymous: Comment by an unregistered user. * - comment-by-node-author: Comment by the author of the parent node. * - comment-preview: When previewing a new or edited comment. * - first: The first comment in the list of displayed comments. * - last: The last comment in the list of displayed comments. * - odd: An odd-numbered comment in the list of displayed comments. * - even: An even-numbered comment in the list of displayed comments. * The following applies only to viewers who are registered users: * - comment-unpublished: An unpublished comment visible only to administrators. * - comment-by-viewer: Comment by the user currently viewing the page. * - comment-new: New comment since the last visit. * - $title_prefix (array): An array containing additional output populated by * modules, intended to be displayed in front of the main title tag that * appears in the template. * - $title_suffix (array): An array containing additional output populated by * modules, intended to be displayed after the main title tag that appears in * the template. * * These two variables are provided for context: * - $comment: Full comment object. * - $node: Node object the comments are attached to. * * Other variables: * - $classes_array: Array of html class attribute values. It is flattened * into a string within the variable $classes. * * @see template_preprocess() * @see template_preprocess_comment() * @see zen_preprocess_comment() * @see template_process() * @see theme_comment() */ ?>
                  ",0 "e VSNRAY_GL_BVH_OUTLINE_RENDERER_H 1 #include #include #include #include namespace visionaray { namespace gl { //------------------------------------------------------------------------------------------------- // OpenGL BVH outline renderer // Call init() and destroy() with a valid OpenGL context! // class bvh_outline_renderer { public: //------------------------------------------------------------------------- // Configuration // enum display_filter { Full = 0, // display the whole BVH Leaves, // display only leave nodes // Level // display only nodes at a certain level }; struct display_config { display_config() : filter(Full) // , level(-1) { } display_filter filter; // int level ; }; public: bvh_outline_renderer(); ~bvh_outline_renderer(); // Render BVH outlines void frame(mat4 const& view, mat4 const& proj) const; // Call init() with a valid OpenGL context! template bool init(BVH const& b, display_config config = display_config()) { std::vector vertices; auto func = [&](typename BVH::node_type const& n) { auto box = n.get_bounds(); auto ilist = { box.min.x, box.min.y, box.min.z, box.max.x, box.min.y, box.min.z, box.max.x, box.min.y, box.min.z, box.max.x, box.max.y, box.min.z, box.max.x, box.max.y, box.min.z, box.min.x, box.max.y, box.min.z, box.min.x, box.max.y, box.min.z, box.min.x, box.min.y, box.min.z, box.min.x, box.min.y, box.max.z, box.max.x, box.min.y, box.max.z, box.max.x, box.min.y, box.max.z, box.max.x, box.max.y, box.max.z, box.max.x, box.max.y, box.max.z, box.min.x, box.max.y, box.max.z, box.min.x, box.max.y, box.max.z, box.min.x, box.min.y, box.max.z, box.min.x, box.min.y, box.min.z, box.min.x, box.min.y, box.max.z, box.max.x, box.min.y, box.min.z, box.max.x, box.min.y, box.max.z, box.max.x, box.max.y, box.min.z, box.max.x, box.max.y, box.max.z, box.min.x, box.max.y, box.min.z, box.min.x, box.max.y, box.max.z }; vertices.insert(vertices.end(), ilist.begin(), ilist.end()); }; if (config.filter == Full) { traverse_depth_first(b, func); } else if (config.filter == Leaves) { traverse_leaves(b, func); } num_vertices_ = vertices.size() / 3; return init_gl(vertices.data(), vertices.size() * sizeof(float)); } // Call destroy() while OpenGL context is still valid! void destroy(); private: struct impl; std::unique_ptr const impl_; size_t num_vertices_ = 0; // Init shaders and vbo from pointer to vertices. Buffer size in bytes! bool init_gl(float const* data, size_t size); }; } // gl } // visionaray #endif // VSNRAY_GL_BVH_OUTLINE_RENDERER_H ",0 "and associated documentation files (the ""Software""), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 1) The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ package com.jumi.scene.objects; /** * * @author RGreenlees */ public class JUMISkinDeformer { String name; public JUMISubDeformer[] deformers = new JUMISubDeformer[0]; public JUMISkinDeformer(String inName) { name = inName; } public String toString() { String result = ""Skin Deformer "" + name + "":""; for (int i = 0; i < deformers.length; i++) { result = result + ""\n\t"" + deformers[i].name; } return result; } public JUMISubDeformer getSubDeformerByIndex(int index) { if (index >= deformers.length) { return null; } return deformers[index]; } public JUMISubDeformer getSubDeformerByName(String inName) { for (JUMISubDeformer a : deformers) { if (a.name.equals(inName)) { return a; } } return null; } } ",0 "template('head'); $colspan=4; echo <<
                  {$lang_modClass1}: {$lang_allcategory}- {$qn} {$val[name]}
                  {$lang_modClass2}: {$qn} {$val[name]}
                  {$lang_modClass3}: {$qn}{$val[name]}
                  {$lang_sort} {$lang_title} {$lang_operate}
                  $val[no_order] $val[name] {$lang_editor}
                  {$page_list}
                  {$foot}
                  ",0 " } function get_themes(){ // Themes $themes = wp_get_themes(); if(is_array($themes)){ foreach($themes as $theme => $t){ $class = array(); $tags = $t->get('Tags'); if( $t->get_template() != 'dms' && ! in_array('dms', $tags) ){ continue; } $thumb = $t->get_screenshot( ); if( is_file( sprintf( '%s/splash.png', $t->get_stylesheet_directory() ) ) ) $splash = sprintf( '%s/splash.png', $t->get_stylesheet_directory_uri() ); else $splash = $thumb; $this->ext[ $theme ] = array( 'id' => $theme, 'name' => $t->name, 'desc' => $t->description, 'thumb' => $thumb, 'splash' => $splash, 'purchase' => '', 'overview' => '', 'status' => $this->theme_status( $t->get_template() ) ); } } } function get_sections(){ $sections_handler = new PageLinesSectionsHandler; $sections = $sections_handler->get_available_sections(); foreach($sections as $key => $s){ $this->ext[ $s->id ] = array( 'id' => $s->id, 'name' => stripslashes( $s->name ), 'desc' => stripslashes( $s->description ), 'thumb' => $s->screenshot, 'purchase' => '', 'overview' => '', 'docs_url' => ( isset( $s->docs_url ) ) ? $s->docs_url : false ); } } function theme_status( $slug ) { // lets see if the stylesheet exists.... $theme = wp_get_theme( $slug ); $current = wp_get_theme(); if( $theme->Name == $current ) return 'active'; if( $theme->exists() ) return 'installed'; else return false; } }",0 "rset=UTF-8""/> ABA Route Transit Number Validator 1.0.1-SNAPSHOT

                  Test testAbaNumberCheck_4359_good

                  Test
                  testAbaNumberCheck_4359_good 1PASS 7 Aug 12:33:07 0.0
                   
                  testAbaNumberCheck_4359_good
                  com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator   com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator 0.735294173.5%
                  • Report generated by OpenClover v 4.4.1 on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT.
                  • OpenClover is free and open-source software.
                  ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.sis.referencing.operation.projection; import org.opengis.referencing.operation.TransformException; /** * Thrown by {@link NormalizedProjection} when a map projection failed. * *
                  When this exception is thrown
                  * Apache SIS implementations of map projections return a {@linkplain Double#isFinite(double) finite} number * under normal conditions, but may also return an {@linkplain Double#isInfinite(double) infinite} number or * {@linkplain Double#isNaN(double) NaN} value, or throw this exception. * The behavior depends on the reason why the projection can not return a finite number: * *
                    *
                  • If the expected mathematical value is infinite (for example the Mercator projection at ±90° of latitude), * then the map projection should return a {@link Double#POSITIVE_INFINITY} or {@link Double#NEGATIVE_INFINITY}, * depending on the sign of the correct mathematical answer.
                  • *
                  • If no real number is expected to exist for the input coordinate (for example at a latitude greater than 90°), * then the map projection should return {@link Double#NaN}.
                  • *
                  • If a real number is expected to exist but the map projection fails to compute it (for example because an * iterative algorithm does not converge), then the projection should throw {@code ProjectionException}.
                  • *
                  * * @author André Gosselin (MPO) * @author Martin Desruisseaux (MPO, IRD, Geomatys) * @version 0.6 * @since 0.6 * @module */ public class ProjectionException extends TransformException { /** * Serial number for inter-operability with different versions. */ private static final long serialVersionUID = 3031350727691500915L; /** * Constructs a new exception with no detail message. */ public ProjectionException() { } /** * Constructs a new exception with the specified detail message. * * @param message the details message, or {@code null} if none. */ public ProjectionException(final String message) { super(message); } /** * Constructs a new exception with the specified cause. * The details message is copied from the cause. * * @param cause the cause, or {@code null} if none. */ public ProjectionException(final Throwable cause) { // Reproduce the behavior of standard Throwable(Throwable) constructor. super((cause != null) ? cause.toString() : null, cause); } /** * Constructs a new exception with the specified detail message and cause. * * @param message the details message, or {@code null} if none. * @param cause the cause, or {@code null} if none. */ public ProjectionException(final String message, final Throwable cause) { super(message, cause); } } ",0 "www.gnu.org/software/texinfo/ --> GNU Octave: XREFbicgstab

                  The node you are looking for is at XREFbicgstab.

                  ",0 "fault { /** * @see CPAC_Column::init() * @since 1.0 */ public function init() { parent::init(); // define properties $this->properties['type'] = 'price'; $this->properties['label'] = __( 'Price', 'cpac' ); $this->properties['group'] = 'woocommerce-default'; $this->properties['handle'] = 'price'; } /** * @see CPAC_Column::get_raw_value() * @since 1.0 */ public function get_raw_value( $post_id ) { $product = get_product( $post_id ); if ( $product->is_type( 'variable', 'grouped' ) ) { return; } $sale_from = $product->sale_price_dates_from; $sale_to = $product->sale_price_dates_to; return array( 'regular_price' => $product->get_regular_price(), 'sale_price' => $product->get_sale_price(), 'sale_price_dates_from' => $sale_from ? date( 'Y-m-d', $sale_from ) : '', 'sale_price_dates_to' => $sale_to ? date( 'Y-m-d', $sale_to ) : '' ); } }",0 "ass org.apache.poi.hwpf.model.FieldDescriptor (POI API Documentation)
                  Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
                   PREV   NEXT FRAMES    NO FRAMES    

                  Uses of Class
                  org.apache.poi.hwpf.model.FieldDescriptor

                  Packages that use FieldDescriptor
                  org.apache.poi.hwpf.model   
                   

                  Uses of FieldDescriptor in org.apache.poi.hwpf.model
                   

                  Methods in org.apache.poi.hwpf.model that return FieldDescriptor
                   FieldDescriptor PlexOfField.getFld()
                             
                   


                  Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
                   PREV   NEXT FRAMES    NO FRAMES    

                  Copyright 2016 The Apache Software Foundation or its licensors, as applicable. ",0 " MinSize - ScalaTest 2.2.6 - org.scalatest.prop.Configuration.MinSize

                  case class MinSize(value: Int) extends PropertyCheckConfigParam with Product with Serializable

                  A PropertyCheckConfigParam that specifies the minimum size parameter to provide to ScalaCheck, which it will use when generating objects for which size matters (such as strings or lists).

                  Source
                  Configuration.scala
                  Exceptions thrown
                  IllegalArgumentException

                  if specified value is less than zero.

                  Linear Supertypes
                  Serializable, Serializable, Product, Equals, PropertyCheckConfigParam, AnyRef, Any
                  Ordering
                  1. Alphabetic
                  2. By inheritance
                  Inherited
                  1. MinSize
                  2. Serializable
                  3. Serializable
                  4. Product
                  5. Equals
                  6. PropertyCheckConfigParam
                  7. AnyRef
                  8. Any
                  Visibility
                  1. Public
                  2. All

                  Instance Constructors

                  1. new MinSize(value: Int)

                    Exceptions thrown
                    IllegalArgumentException

                    if specified value is less than zero.

                  Value Members

                  1. final def !=(arg0: AnyRef): Boolean

                    Definition Classes
                    AnyRef
                  2. final def !=(arg0: Any): Boolean

                    Definition Classes
                    Any
                  3. final def ##(): Int

                    Definition Classes
                    AnyRef → Any
                  4. final def ==(arg0: AnyRef): Boolean

                    Definition Classes
                    AnyRef
                  5. final def ==(arg0: Any): Boolean

                    Definition Classes
                    Any
                  6. final def asInstanceOf[T0]: T0

                    Definition Classes
                    Any
                  7. def clone(): AnyRef

                    Attributes
                    protected[java.lang]
                    Definition Classes
                    AnyRef
                    Annotations
                    @throws()
                  8. final def eq(arg0: AnyRef): Boolean

                    Definition Classes
                    AnyRef
                  9. def finalize(): Unit

                    Attributes
                    protected[java.lang]
                    Definition Classes
                    AnyRef
                    Annotations
                    @throws()
                  10. final def getClass(): Class[_]

                    Definition Classes
                    AnyRef → Any
                  11. final def isInstanceOf[T0]: Boolean

                    Definition Classes
                    Any
                  12. final def ne(arg0: AnyRef): Boolean

                    Definition Classes
                    AnyRef
                  13. final def notify(): Unit

                    Definition Classes
                    AnyRef
                  14. final def notifyAll(): Unit

                    Definition Classes
                    AnyRef
                  15. final def synchronized[T0](arg0: ⇒ T0): T0

                    Definition Classes
                    AnyRef
                  16. val value: Int

                  17. final def wait(): Unit

                    Definition Classes
                    AnyRef
                    Annotations
                    @throws()
                  18. final def wait(arg0: Long, arg1: Int): Unit

                    Definition Classes
                    AnyRef
                    Annotations
                    @throws()
                  19. final def wait(arg0: Long): Unit

                    Definition Classes
                    AnyRef
                    Annotations
                    @throws()

                  Inherited from Serializable

                  Inherited from Serializable

                  Inherited from Product

                  Inherited from Equals

                  Inherited from PropertyCheckConfigParam

                  Inherited from AnyRef

                  Inherited from Any

                  Ungrouped

                  ",0 "iewModel { private $userId; public function __construct($userId) { parent::__construct(); $this->userId = $userId; $this->setViewData(); } public function setViewData() { $userService = Factory::getInstance()->getUserService(); $issues = $userService->getMemberDetailData($this->userId); $user = Factory::getInstance()->getUserRepository()->getUserByPk($this->userId); $this->setVariables( [ 'issues' => $issues, 'userName' => $user['name'] ] , true); } }",0 "s-pro;source-code-pro.js""> -->

                  (unnamed)

                  UMLAssociation
                  Untitled :: JavaReverse :: net :: gleamynode :: netty :: channel :: DefaultChannelPipeline :: (DefaultChannelPipeline—DefaultChannelHandlerContext)

                  Description

                  none

                  End1

                  Name Value
                  name
                  reference DefaultChannelPipeline
                  stereotype null
                  visibility package
                  navigable false
                  aggregation none
                  multiplicity
                  defaultValue
                  isReadOnly false
                  isOrdered false
                  isUnique false
                  isDerived false
                  isID false
                  qualifiers

                  End2

                  Name Value
                  name head
                  reference DefaultChannelHandlerContext
                  stereotype null
                  visibility private
                  navigable true
                  aggregation none
                  multiplicity
                  defaultValue
                  isReadOnly false
                  isOrdered false
                  isUnique false
                  isDerived false
                  isID false
                  qualifiers

                  Properties

                  Name Value
                  name
                  stereotype null
                  visibility public
                  isDerived false
                  ",0 " and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with BackBee Standalone. If not, see . */ namespace BackBee\Rest\Controller\Annotations; /** * Pagination properties annotation. * * @Annotation * * @category BackBee * * @copyright Lp digital system * @author k.golovin */ class Pagination { /** * @var integer */ public $default_start = 0; /** * @var integer */ public $default_count = 100; /** * @var integer */ public $max_count = 1000; /** * @var integer */ public $min_count = 1; } ",0 ". */ /* * ceil(x) * Return x rounded toward -inf to integral value * Method: * Bit twiddling. * Exception: * Inexact flag raised if x not equal to ceil(x). */ #include ""fdlibm.h"" #ifdef __STDC__ static const double huge = 1.0e300; #else static double huge = 1.0e300; #endif #ifdef __STDC__ double ceil(double x) #else double ceil(x) double x; #endif { int i0,i1,j0; unsigned i,j; i0 = __HI(x); i1 = __LO(x); j0 = ((i0>>20)&0x7ff)-0x3ff; if(j0<20) { if(j0<0) { /* raise inexact if x != 0 */ if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */ if(i0<0) {i0=0x80000000;i1=0;} else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;} } } else { i = (0x000fffff)>>j0; if(((i0&i)|i1)==0) return x; /* x is integral */ if(huge+x>0.0) { /* raise inexact flag */ if(i0>0) i0 += (0x00100000)>>j0; i0 &= (~i); i1=0; } } } else if (j0>51) { if(j0==0x400) return x+x; /* inf or NaN */ else return x; /* x is integral */ } else { i = ((unsigned)(0xffffffff))>>(j0-20); if((i1&i)==0) return x; /* x is integral */ if(huge+x>0.0) { /* raise inexact flag */ if(i0>0) { if(j0==20) i0+=1; else { j = i1 + (1<<(52-j0)); if(j Basic Gray Theme - About

                  login signup

                  Yardsale Addicts

                  Do you love yardsales as much as we do?

                  The number of garage sales that occur in the Provo and Salt Lake areas is large.  Garage sale hoping has become a Saturday activity for some, especially newlyweds looking to furnish their first apartment.  While these individuals wish to furnish their apartment many lack the funds to just buy the items outright and the time to search KSL continuously for deals.  

                  Garage Sale Addict Solutions aims to help solve the headache of planning a route to garage sales in the local area.  It will offer the ability to choose from a selection of yard sales and find a fast, convenient route between them.

                  Photo of us?

                  About

                  The number of garage sales that occur in the Provo and Salt Lake areas is large. Garage sale hoping has become a Saturday activity for some, especially newlyweds looking to furnish their first apartment. While these individuals wish to furnish their apartment many lack the funds to just buy the items outright and the time to search KSL continuously for deals.
                  Garage Sale Addict Solutions aims to help solve the headache of planning a route to garage sales in the local area. It will offer the ability to choose from a selection of yard sales and find a fast, convenient route between them.

                  Recent Yardsales

                  Site Map

                  ",0 """INVTABLE"" width=""100%""> Operations on Ti Groups (*.tig)

                  tifiles_te_create

                  TIEXPORT2 TigEntry* TICALL tifiles_te_create(const char *filename, FileClass type, CalcModel model)

                  Allocates a TigEntry structure and allocates fields (aka call #tifiles_content_create_flash/regular for you).

                  filename :
                  internal filename in archive.
                  type :
                  file type (regular or flash)
                  model :
                  calculator model
                  Return value :
                  the allocated block.

                  tifiles_te_delete

                  TIEXPORT2 int TICALL tifiles_te_delete(TigEntry* entry)

                  Destroy a #TigEntry structure as well as fields.

                  entry :
                  a #TigEntry structure.
                  Return value :
                  none.

                  tifiles_te_create_array

                  TIEXPORT2 TigEntry** TICALL tifiles_te_create_array(int nelts)

                  Allocate a NULL-terminated array of #TigEntry structures. You have to allocate each elements of the array by yourself.

                  nelts :
                  size of NULL-terminated array (number of #TigEntry structures).
                  Return value :
                  the array or NULL if error.

                  tifiles_te_resize_array

                  TIEXPORT2 TigEntry** TICALL tifiles_te_resize_array(TigEntry** array, int nelts)

                  Re-allocate a NULL-terminated array of #TigEntry structures. You have to allocate each elements of the array by yourself.

                  array :
                  address of array
                  nelts :
                  size of NULL-terminated array (number of #TigEntry structures).
                  Return value :
                  the array or NULL if error.

                  tifiles_ve_delete_array

                  TIEXPORT2 void TICALL tifiles_te_delete_array(TigEntry** array)

                  Free the whole array (data buffer, TigEntry structure and array itself).

                  array :
                  an NULL-terminated array of TigEntry structures.
                  Return value :
                  none.

                  tifiles_te_sizeof_array

                  TIEXPORT2 int TICALL tifiles_te_sizeof_array(TigEntry** array)

                  Returns the size of a #TigEntry array.

                  array :
                  an NULL-terminated array of TigEntry structures.
                  r :
                  number of FileContent entries
                  f :
                  number of FlashContent entries
                  Return value :
                  none.

                  tifiles_content_add_te

                  TIEXPORT2 int TICALL tifiles_content_add_te(TigContent *content, TigEntry *te)

                  Adds the entry to the file content and updates internal structures. Beware: the entry is not duplicated.

                  content :
                  a file content (TiGroup).
                  te :
                  the entry to add
                  Return value :
                  the number of entries.

                  tifiles_content_del_te

                  TIEXPORT2 int TICALL tifiles_content_del_te(TigContent *content, TigEntry *te)

                  Search for entry name and remove it from file content.

                  content :
                  a file content (TiGroup).
                  te :
                  the entry to remove
                  Return value :
                  the number of entries or -1 if not found.

                  tifiles_tigroup_add_file

                  TIEXPORT2 int TICALL tifiles_tigroup_add_file(const char *src_filename, const char *dst_filename)

                  Add src_filename content to dst_filename content and write to dst_filename.

                  src_filename :
                  the file to add to TiGroup file
                  dst_filename :
                  the TiGroup file (must exist!)
                  Return value :
                  0 if successful, an error code otherwise.

                  tifiles_tigroup_del_file

                  TIEXPORT2 int TICALL tifiles_tigroup_del_file(TigEntry *entry, const char *filename)

                  Search for entry and remove it from file.

                  src_filename :
                  the file to remove from TiGroup file
                  dst_filename :
                  the TiGroup file
                  Return value :
                  0 if successful, an error code otherwise.

                  tifiles_tigroup_contents

                  TIEXPORT2 int TICALL tifiles_tigroup_contents(FileContent **src_contents1, FlashContent **src_contents2, TigContent **dst_content)

                  Group several #FileContent/#FlashContent structures into a single one. Must be freed when no longer used by a call to #tifiles_content_delete_tigroup.

                  src_contents1 :
                  a pointer on an array of #FileContent structures or NULL. The array must be NULL-terminated.
                  src_contents2 :
                  a pointer on an array of #FlashContent structures or NULL. The array must be NULL-terminated.
                  dst_content :
                  the address of a pointer. This pointer will see the allocated TiGroup file.
                  Return value :
                  an error code if unsuccessful, 0 otherwise.

                  tifiles_untigroup_content

                  TIEXPORT2 int TICALL tifiles_untigroup_content(TigContent *src_content, FileContent ***dst_contents1, FlashContent ***dst_contents2)



                  src_content :
                  a pointer on the structure to unpack.
                  dst_contents1 :
                  the address of your pointer. This pointers will point on a
                  dst_contents2 :
                  the address of your pointer. This pointers will point on a
                  Return value :
                  an error code if unsuccessful, 0 otherwise.

                  tifiles_group_files

                  TIEXPORT2 int TICALL tifiles_tigroup_files(char **src_filenames, const char *dst_filename)

                  Group several TI files (regular/flash) into a single one (TiGroup file).

                  src_filenames :
                  a NULL-terminated array of strings (list of files to group).
                  dst_filename :
                  the filename where to store the TiGroup.
                  Return value :
                  an error code if unsuccessful, 0 otherwise.

                  tifiles_ungroup_file

                  TIEXPORT2 int TICALL tifiles_untigroup_file(const char *src_filename, char ***dst_filenames)



                  src_filename :
                  full path of file to ungroup.
                  dst_filenames :
                  NULL or the address of a pointer where to store a NULL-terminated
                  Return value :
                  there is no existence check; files may be overwritten ! %dst_filenames must be freed when no longer used. Return value: an error code if unsuccessful, 0 otherwise.

                  tifiles_content_create_tigroup

                  TIEXPORT2 TigContent* TICALL tifiles_content_create_tigroup(CalcModel model, int n)

                  Allocates a TigContent structure. Note: the calculator model is not required if the content is used for file reading but is compulsory for file writing.

                  model :
                  a calculator model or CALC_NONE.
                  n :
                  number of #tigEntry entries
                  Return value :
                  the allocated block.

                  tifiles_content_delete_tigroup

                  TIEXPORT2 int TICALL tifiles_content_delete_tigroup(TigContent *content)

                  Free the whole content of a @TigContent structure and the content itself.

                  Return value :
                  none.

                  tifiles_file_read_tigroup

                  TIEXPORT2 int TICALL tifiles_file_read_tigroup(const char *filename, TigContent *content)

                  This function loads a TiGroup from \a filename and places its content into \a content.

                  filename :
                  the name of file to load.
                  content :
                  where to store content (may be re-allocated).
                  Return value :
                  an error code if unsuccessful, 0 otherwise.

                  tifiles_file_write_tigroup

                  TIEXPORT2 int TICALL tifiles_file_write_tigroup(const char *filename, TigContent *content)

                  This function store TiGroup contents to file. Please note that contents can contains no data. In this case, the file is void but created.

                  filename :
                  the name of file to load.
                  content :
                  where to store content.
                  Return value :
                  an error code if unsuccessful, 0 otherwise.

                  tifiles_file_display_tigroup

                  TIEXPORT2 int TICALL tifiles_file_display_tigroup(const char *filename)

                  This function shows file contents (similar to ""unzip -l filename"").

                  filename :
                  the name of file to load.
                  Return value :
                  an error code if unsuccessful, 0 otherwise.

                  Return to the main index




                  ",0 "For details, see http://sourceforge.net/projects/libb64 */ #include const int CHARS_PER_LINE = 72; void base64_init_encodestate(base64_encodestate* state_in) { state_in->step = step_A; state_in->result = 0; state_in->stepcount = 0; } char base64_encode_value(char value_in) { static const char* encoding = ""ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/""; if (value_in > 63) return '='; return encoding[(int)value_in]; } int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, base64_encodestate* state_in) { const char* plainchar = plaintext_in; const char* const plaintextend = plaintext_in + length_in; char* codechar = code_out; char result; char fragment; result = state_in->result; switch (state_in->step) { while (1) { case step_A: if (plainchar == plaintextend) { state_in->result = result; state_in->step = step_A; return codechar - code_out; } fragment = *plainchar++; result = (fragment & 0x0fc) >> 2; *codechar++ = base64_encode_value(result); result = (fragment & 0x003) << 4; case step_B: if (plainchar == plaintextend) { state_in->result = result; state_in->step = step_B; return codechar - code_out; } fragment = *plainchar++; result |= (fragment & 0x0f0) >> 4; *codechar++ = base64_encode_value(result); result = (fragment & 0x00f) << 2; case step_C: if (plainchar == plaintextend) { state_in->result = result; state_in->step = step_C; return codechar - code_out; } fragment = *plainchar++; result |= (fragment & 0x0c0) >> 6; *codechar++ = base64_encode_value(result); result = (fragment & 0x03f) >> 0; *codechar++ = base64_encode_value(result); ++(state_in->stepcount); /* Needed to modify this library to not insert newlines every 72 * characters. */ // if (state_in->stepcount == CHARS_PER_LINE/4) // { // *codechar++ = '\n'; // state_in->stepcount = 0; // } } } /* control should not reach here */ return codechar - code_out; } int base64_encode_blockend(char* code_out, base64_encodestate* state_in) { char* codechar = code_out; switch (state_in->step) { case step_B: *codechar++ = base64_encode_value(state_in->result); *codechar++ = '='; *codechar++ = '='; break; case step_C: *codechar++ = base64_encode_value(state_in->result); *codechar++ = '='; break; case step_A: break; } *codechar++ = '\n'; return codechar - code_out; } ",0 "liance 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. */ package com.parstream.adaptor.avro.test; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import java.io.File; import java.util.ArrayList; import java.util.List; import org.apache.avro.Schema; import org.apache.avro.Schema.Parser; import org.apache.avro.generic.GenericArray; import org.apache.avro.generic.GenericData; import org.apache.avro.generic.GenericRecord; import org.apache.avro.util.Utf8; import org.junit.Test; import com.parstream.adaptor.avro.AvroAdaptor; import com.parstream.driver.ColumnInfo; public class ArrayTest { @Test public void testArrayOfUtf8() throws Exception { Schema recordTypeSchema = new Parser().parse(new File(""target/test-classes/array/StringUtf8/record.avsc"")); // prepare ArrayList with elements to test List arrayElements = new ArrayList(1); arrayElements.add(new Utf8(""test string"")); // construct the GenericArray from the above ArrayList Schema recordMemberSchema = recordTypeSchema.getField(""recordMember"").schema(); GenericArray avroArray = new GenericData.Array(recordMemberSchema, arrayElements); // put the GenericArray in a GenericRecord GenericRecord recordType = new GenericData.Record(recordTypeSchema); recordType.put(0, avroArray); ColumnInfo[] colInfo = new ColumnInfo[1]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""id"", AdaptorTestUtils.Type.VARSTRING, 0, 0); AvroAdaptor decoder = new AvroAdaptor(new File(""target/test-classes/array/StringUtf8/avro.ini""), colInfo); List res = decoder.convertRecord(recordType); assertEquals(""resulting list size"", 1, res.size()); assertArrayEquals(""resulting item"", new Object[] { ""test string"" }, res.get(0)); } @Test public void testArrayOfString() throws Exception { Schema recordTypeSchema = new Parser().parse(new File(""target/test-classes/array/StringUtf8/record.avsc"")); // prepare ArrayList with elements to test List arrayElements = new ArrayList(1); arrayElements.add(""test string""); // construct the GenericArray from the above ArrayList Schema recordMemberSchema = recordTypeSchema.getField(""recordMember"").schema(); GenericArray avroArray = new GenericData.Array(recordMemberSchema, arrayElements); // put the GenericArray in a GenericRecord GenericRecord recordType = new GenericData.Record(recordTypeSchema); recordType.put(0, avroArray); ColumnInfo[] colInfo = new ColumnInfo[1]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""id"", AdaptorTestUtils.Type.VARSTRING, 0, 0); AvroAdaptor decoder = new AvroAdaptor(new File(""target/test-classes/array/StringUtf8/avro.ini""), colInfo); List res = decoder.convertRecord(recordType); assertEquals(""resulting list size"", 1, res.size()); assertArrayEquals(""resulting item"", new Object[] { ""test string"" }, res.get(0)); } @Test public void testArrayOfInteger() throws Exception { Schema recordTypeSchema = new Parser().parse(new File(""target/test-classes/array/Integer/record.avsc"")); int intVal = 12; // prepare ArrayList with elements to test List arrayElements = new ArrayList(1); arrayElements.add(intVal); // construct the GenericArray from the above ArrayList Schema recordMemberSchema = recordTypeSchema.getField(""recordMember"").schema(); GenericArray avroArray = new GenericData.Array(recordMemberSchema, arrayElements); // put the GenericArray in a GenericRecord GenericRecord recordType = new GenericData.Record(recordTypeSchema); recordType.put(0, avroArray); ColumnInfo[] colInfo = new ColumnInfo[1]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""id"", AdaptorTestUtils.Type.UINT32, 0, 0); AvroAdaptor decoder = new AvroAdaptor(new File(""target/test-classes/array/Integer/avro.ini""), colInfo); List res = decoder.convertRecord(recordType); assertEquals(""resulting list size"", 1, res.size()); assertArrayEquals(""resulting item"", new Object[] { intVal }, res.get(0)); } @Test public void testArrayOfFloat() throws Exception { Schema recordTypeSchema = new Parser().parse(new File(""target/test-classes/array/Float/record.avsc"")); float floatVal = 12.34f; // prepare ArrayList with elements to test List arrayElements = new ArrayList(1); arrayElements.add(floatVal); // construct the GenericArray from the above ArrayList Schema recordMemberSchema = recordTypeSchema.getField(""recordMember"").schema(); GenericArray avroArray = new GenericData.Array(recordMemberSchema, arrayElements); // put the GenericArray in a GenericRecord GenericRecord recordType = new GenericData.Record(recordTypeSchema); recordType.put(0, avroArray); ColumnInfo[] colInfo = new ColumnInfo[1]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""id"", AdaptorTestUtils.Type.FLOAT, 0, 0); AvroAdaptor decoder = new AvroAdaptor(new File(""target/test-classes/array/Float/avro.ini""), colInfo); List res = decoder.convertRecord(recordType); assertEquals(""resulting list size"", 1, res.size()); assertArrayEquals(""resulting item"", new Object[] { floatVal }, res.get(0)); } @Test public void testArrayOfDouble() throws Exception { Schema recordTypeSchema = new Parser().parse(new File(""target/test-classes/array/Double/record.avsc"")); double doubleVal = 12.34d; // prepare ArrayList with elements to test List arrayElements = new ArrayList(1); arrayElements.add(doubleVal); // construct the GenericArray from the above ArrayList Schema recordMemberSchema = recordTypeSchema.getField(""recordMember"").schema(); GenericArray avroArray = new GenericData.Array(recordMemberSchema, arrayElements); // put the GenericArray in a GenericRecord GenericRecord recordType = new GenericData.Record(recordTypeSchema); recordType.put(0, avroArray); ColumnInfo[] colInfo = new ColumnInfo[1]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""id"", AdaptorTestUtils.Type.DOUBLE, 0, 0); AvroAdaptor decoder = new AvroAdaptor(new File(""target/test-classes/array/Double/avro.ini""), colInfo); List res = decoder.convertRecord(recordType); assertEquals(""resulting list size"", 1, res.size()); assertArrayEquals(""resulting item"", new Object[] { doubleVal }, res.get(0)); } @Test public void testArrayOfLong() throws Exception { Schema recordTypeSchema = new Parser().parse(new File(""target/test-classes/array/Long/record.avsc"")); long longVal = 12l; // prepare ArrayList with elements to test List arrayElements = new ArrayList(1); arrayElements.add(longVal); // construct the GenericArray from the above ArrayList Schema recordMemberSchema = recordTypeSchema.getField(""recordMember"").schema(); GenericArray avroArray = new GenericData.Array(recordMemberSchema, arrayElements); // put the GenericArray in a GenericRecord GenericRecord recordType = new GenericData.Record(recordTypeSchema); recordType.put(0, avroArray); ColumnInfo[] colInfo = new ColumnInfo[1]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""id"", AdaptorTestUtils.Type.INT32, 0, 0); AvroAdaptor decoder = new AvroAdaptor(new File(""target/test-classes/array/Long/avro.ini""), colInfo); List res = decoder.convertRecord(recordType); assertEquals(""resulting list size"", 1, res.size()); assertArrayEquals(""resulting item"", new Object[] { longVal }, res.get(0)); } @Test public void testArrayOfIntRecord() throws Exception { Schema schema = new Parser().parse(new File(""target/test-classes/array/IntRecord/record.avsc"")); Schema arraySchema = schema.getField(""recordMember"").schema(); Schema arrayMemberSchema = arraySchema.getElementType(); int intVal = 16; // construct int record GenericRecord subArrayRecord = new GenericData.Record(arrayMemberSchema); subArrayRecord.put(0, intVal); // construct array of ""int record"" List recordMemberArray = new ArrayList(1); recordMemberArray.add(subArrayRecord); GenericArray subArrayElementsGenericArray = new GenericData.Array(arraySchema, recordMemberArray); // construct a record with the above array GenericRecord rootRecord = new GenericData.Record(schema); rootRecord.put(0, subArrayElementsGenericArray); ColumnInfo[] colInfo = new ColumnInfo[1]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""id"", AdaptorTestUtils.Type.UINT32, 0, 0); AvroAdaptor decoder = new AvroAdaptor(new File(""target/test-classes/array/IntRecord/avro.ini""), colInfo); List res = decoder.convertRecord(rootRecord); assertEquals(""resulting list size"", 1, res.size()); assertArrayEquals(""resulting item"", new Object[] { intVal }, res.get(0)); } @Test public void testMultipleArrayOfStringsBothUsedInConfig() throws Exception { /* * define a record with 2 separate arrays * * fill both arrays with data * * have both entries of the arrays in the config file */ Schema schema = new Parser().parse(new File(""target/test-classes/array/MultipleArrayOfStrings/schema.avsc"")); Schema arrayRecordSchema1 = schema.getField(""arrayRecord1"").schema(); Schema arrayElementSchema1 = arrayRecordSchema1.getField(""arrayElement1"").schema(); Schema arrayRecordSchema2 = schema.getField(""arrayRecord2"").schema(); Schema arrayElementSchema2 = arrayRecordSchema2.getField(""arrayElement2"").schema(); // /////// List arrayElements1 = new ArrayList(1); arrayElements1.add(""test string 1""); GenericRecord arrayRecord1 = new GenericData.Record(arrayRecordSchema1); GenericArray avroArray1 = new GenericData.Array(arrayElementSchema1, arrayElements1); arrayRecord1.put(0, avroArray1); GenericRecord firstRecord = new GenericData.Record(schema); firstRecord.put(0, arrayRecord1); // /////// List arrayElements2 = new ArrayList(1); arrayElements2.add(""test string 2""); GenericRecord arrayRecord2 = new GenericData.Record(arrayRecordSchema2); GenericArray avroArray2 = new GenericData.Array(arrayElementSchema2, arrayElements2); arrayRecord2.put(0, avroArray2); firstRecord.put(1, arrayRecord2); // /////// ColumnInfo[] colInfo = new ColumnInfo[2]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""id"", AdaptorTestUtils.Type.VARSTRING, 0, 0); colInfo[1] = AdaptorTestUtils.constructColumnInfo(""id2"", AdaptorTestUtils.Type.VARSTRING, 0, 0); AvroAdaptor decoder = new AvroAdaptor(new File( ""target/test-classes/array/MultipleArrayOfStrings/avroBothArraysUsed.ini""), colInfo); List res = decoder.convertRecord(firstRecord); assertEquals(""resulting list size"", 1, res.size()); assertArrayEquals(""resulting item"", new Object[] { ""test string 1"", ""test string 2"" }, res.get(0)); } @Test public void testMultipleArrayOfStringsOnlyOneUsedInConfig() throws Exception { /* * define a record with 2 arrays * * fill first array with one element * * fill second array with two elements * * mapping file uses only the first array * * ensure 1 row is returned (unused array of 2 elements is not unfolded) */ ColumnInfo[] colInfo = new ColumnInfo[1]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""id"", AdaptorTestUtils.Type.VARSTRING, 0, 0); Schema schema = new Parser().parse(new File(""target/test-classes/array/MultipleArrayOfStrings/schema.avsc"")); Schema arrayRecordSchema1 = schema.getField(""arrayRecord1"").schema(); Schema arrayElementSchema1 = arrayRecordSchema1.getField(""arrayElement1"").schema(); Schema arrayRecordSchema2 = schema.getField(""arrayRecord2"").schema(); Schema arrayElementSchema2 = arrayRecordSchema2.getField(""arrayElement2"").schema(); List arrayElements1 = new ArrayList(1); arrayElements1.add(""test string 1""); GenericRecord arrayRecord1 = new GenericData.Record(arrayRecordSchema1); GenericArray avroArray1 = new GenericData.Array(arrayElementSchema1, arrayElements1); arrayRecord1.put(0, avroArray1); GenericRecord firstRecord = new GenericData.Record(schema); firstRecord.put(0, arrayRecord1); List arrayElements2 = new ArrayList(2); arrayElements2.add(""test string 2""); arrayElements2.add(""test string 3""); GenericRecord arrayRecord2 = new GenericData.Record(arrayRecordSchema2); GenericArray avroArray2 = new GenericData.Array(arrayElementSchema2, arrayElements2); arrayRecord2.put(0, avroArray2); firstRecord.put(1, arrayRecord2); AvroAdaptor decoder = new AvroAdaptor(new File( ""target/test-classes/array/MultipleArrayOfStrings/avroOnlyOneArrayUsed.ini""), colInfo); List res = decoder.convertRecord(firstRecord); assertEquals(""resulting list size"", 1, res.size()); assertArrayEquals(""resulting item"", new Object[] { ""test string 1"" }, res.get(0)); /** * Now create and test a second record */ GenericRecord secondRecord = new GenericData.Record(schema); secondRecord.put(0, arrayRecord1); secondRecord.put(1, arrayRecord2); List res2 = decoder.convertRecord(secondRecord); assertEquals(""resulting list size"", 1, res2.size()); assertArrayEquals(""resulting item"", new Object[] { ""test string 1"" }, res2.get(0)); } /** * define a record with: a record + an array * * fill first record with string value * * fill second array with two elements * * mapping file uses both the record and the array * * ensure 2 row is returned * * [{""a"",arrayVal1}, {""a"", arrayVal2}] */ @Test public void testRecordWithRecordAndArray() throws Exception { ColumnInfo[] colInfo = new ColumnInfo[2]; colInfo[0] = AdaptorTestUtils.constructColumnInfo(""name"", AdaptorTestUtils.Type.VARSTRING, 0, 0); colInfo[1] = AdaptorTestUtils.constructColumnInfo(""address"", AdaptorTestUtils.Type.VARSTRING, 0, 0); Schema schema = new Parser().parse(new File(""target/test-classes/array/RecordWithRecordAndArray/schema.avsc"")); GenericRecord firstRecord = new GenericData.Record(schema); firstRecord.put(""name"", ""test name""); Schema addressArraySchema = schema.getField(""addressArray"").schema(); List addressElements = new ArrayList(2); addressElements.add(""street 1""); addressElements.add(""street 2""); GenericArray avroAddressArray = new GenericData.Array(addressArraySchema, addressElements); firstRecord.put(""addressArray"", avroAddressArray); AvroAdaptor decoder = new AvroAdaptor(new File(""target/test-classes/array/RecordWithRecordAndArray/avro.ini""), colInfo); List res = decoder.convertRecord(firstRecord); assertEquals(""resulting list size"", 2, res.size()); assertArrayEquals(""resulting item"", new Object[] { ""test name"", ""street 1"" }, res.get(0)); assertArrayEquals(""resulting item"", new Object[] { ""test name"", ""street 2"" }, res.get(1)); } } ",0 "d * @property integer $template_id * @property integer $js_id * * @property Js $js * @property Template $template */ class TemplateJs extends ActiveRecord { /** * @inheritdoc */ public static function tableName() { return 'template_js'; } /** * @inheritdoc */ public function rules() { return [ [['template_id', 'js_id'], 'required'], [['template_id', 'js_id'], 'integer'] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => Yii::t('app', 'ID'), 'template_id' => Yii::t('app', 'Template ID'), 'js_id' => Yii::t('app', 'Js ID'), ]; } /** * @return \yii\db\ActiveQuery */ public function getJs() { return $this->hasOne(Js::className(), ['id' => 'js_id']); } /** * @return \yii\db\ActiveQuery */ public function getTemplate() { return $this->hasOne(Template::className(), ['id' => 'template_id']); } } ",0 "ng.calculator.Operation; import net.morimekta.test.providence.testing.calculator.Operator; import net.morimekta.test.providence.testing.number.Imaginary; import org.hamcrest.Description; import org.hamcrest.StringDescription; import org.junit.Before; import org.junit.Test; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; /** * @author Stein Eldar Johnsen * @since 21.01.16. */ public class EqualToMessageTest { private EqualToMessage matcher; private Operation expected; private Operation matches; private Operation not_matches; @Before public void setUp() { expected = Operation.builder() .setOperator(Operator.MULTIPLY) .addToOperands(Operand.builder() .setOperation(Operation.builder() .setOperator(Operator.ADD) .addToOperands(Operand.withNumber(1234)) .addToOperands(Operand.withNumber( 4.321)) .build()) .build()) .addToOperands(Operand.withImaginary(Imaginary.builder() .setV(1.7) .setI(-2.0) .build())) .build(); // Same constructor again to make sure all objects are not the same, but equal. matches = Operation.builder() .setOperator(Operator.MULTIPLY) .addToOperands(Operand.builder() .setOperation(Operation.builder() .setOperator(Operator.ADD) .addToOperands(Operand.withNumber(1234)) .addToOperands(Operand.withNumber(4.321)) .build()) .build()) .addToOperands(Operand.withImaginary(Imaginary.builder() .setV(1.7) .setI(-2.0) .build())) .build(); not_matches = Operation.builder() .setOperator(Operator.MULTIPLY) .addToOperands(Operand.builder() .setOperation(Operation.builder() .setOperator(Operator.ADD) .addToOperands(Operand.withNumber(1234)) .addToOperands(Operand.withNumber(4.321)) .build()) .build()) .addToOperands(Operand.withImaginary(Imaginary.builder() .setV(1.8) .setI(-2.0) .build())) .build(); matcher = new EqualToMessage<>(expected); } @Test public void testMatches() { assertTrue(matcher.matches(expected)); assertTrue(matcher.matches(matches)); assertFalse(matcher.matches(not_matches)); } @Test public void testDescribeTo() { Description description = new StringDescription(); matcher.describeTo(description); assertThat(description.toString(), is(equalTo( ""equals({operator:MULTIPLY,operands:[{operation:{operator:ADD,operands:[{number:1234},{number:4.321}]}},{imaginary:{v:...})""))); } @Test public void testDescribeMismatch() { Description description = new StringDescription(); matcher.describeMismatch(not_matches, description); assertThat(description.toString(), is(equalTo( ""operands[1].imaginary.v was 1.8, expected 1.7""))); } } ",0 "l=""stylesheet"" type=""text/css"" media=""screen"" href=""style.css"">

                  Installation of Auroral Image Data Analysis tools

                  To install it all you need to do is to:

                  • a) Unpack it in the directory where you have your matlab files. (This should be different from the matlab installation directory. Prefereably in a directory ""matlab"" in your home directory.)
                     > tar -xzvf AIDA-###.tgz
                    	  
                    OR if you want the last svn revision...
                  • b) copy AIDA_startup from AIDA_tools/ to your matlab directory. By putting ""startup files in a ~/matlab directory they always are in the matlab path (where matlab automatically looks for functions and scripts), this makes it possible to add the necessary paths to AIDA_tools from wherever you start matlab, be it the home directory, or any data directory.
                  • c) In the AIDA_startup.m copy, edit the third line:
                     AIDA_root = fullfile('/home','bjorn','matlab');
                    	  
                    For those working in Unix-like OSes you should just change the directories to point to where you have your matlab directory (I obviously have it in /home/bjorn/matlab/). For those that work under non-unix OSes I think that you would have to modify the '/home' part above - but I have no such experience, so I cant help out.

                  IMPORTANT NOTE: You should not install or write matlab-files to the directories that hold matlab itself (matlabroot). Matlab keeps track of which functions needs to be reread, and the files under the matlabroot are assumed to be updated only when the matlab version changes. Thus you realy should have your own matlab directory where you have the matlab files related to your own projects.

                  ""STARTING"" AIDA_TOOLS

                  To start using functions from AIDA-tools you need to make sure that the paths to the AIDA-toold directories is added to the matlab path. To do this just run AIDA_startup by simply typing:
                   >> AIDA_startup
                        
                  at the matlab command line prompt. This will set all paths in the right order, without any obnoxious questions or troubles. If it works as intended it will also adjust the setup according to which matlab version it is running in ( at least 6.X and 7.X) - some function calls are modified between those releases.

                  Requirements

                  AIDA-tools require a working matlab installation, it benefits from the image processing toolbox and the signal processing toolbox for some filtering functions (medfilt2.m, and medfilt1.m) and blockproc.m. There are also a possibility that dependencies on other toolboxes have penetrated into the code, but I have not heard anything about that. AIDA-tools work best under more recent versions of matlab (7.x) but it has been run without flaws in matlab 6.5 and 6.2. Originaly AIDA-tools was developed on matlab 4.2 and 5.x. Most functions in AIDA-tools should work also in Ocatave, except the ""Starcalibration"" graphical user interface.

                  Modifications

                  When you realize that some function in AIDA-tools needs to be modified/extended/changed to suit your needs the best way to go about it is to copy the file to the MyAIDA-directory and modify that copy. The MyAIDA-directory is before the rest of the AIDA-tools directories in the matlab path, therefore matlab will find and use the edited file. The original copy of the function will still reside in its original location in case you'd need to revert to that. Also, when installing a newer version of AIDA-tools the edited version will survive without being overwritten.

                  SVN-installation

                  If you want the latest svn revision (and have a svn client installed)
                   > svn co ""https://aniara.irf.se/svn/AIDA_tools/trunk"" AIDA_tools
                        
                  If you are asked about a self-signed certificate, accept it permanetly.
                  • Q: What is svn?
                  • A: See http://svnbook.red-bean.com
                  • Q: How do I get a svn client?
                  • A: svn clients for various operating systems can be found here
                    http://subversion.apache.org/packages.html but are usually installed on decent computers.
                  • Q: I changed AIDA_tools and wish to commit my changes?
                  • A
                    1. Obtain a username, a password for the svn repository at https:aniara.irf.se/svn (contact urban.brandstrom@irf.se) You also need at least a very basic knowledge of svn.
                    2. from the AIDA_tools directory
                       > svn commit -m ""what you did and why""
                      	      
                      you will be asked for password should your username be different, try this instead:
                       > svn --username foo commit -m ""what you did and why""
                      

                  Björn Gustavsson
                  Last modified: Mon Apr 15 00:20:18 CEST 2013 ",0 "ass RsaSha1Test extends TestCase { /** * Returns test public certificate string. * @return string public certificate string. */ protected function getTestPublicCertificate() { return '-----BEGIN CERTIFICATE----- MIIDJDCCAo2gAwIBAgIJALCFAl3nj1ibMA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD VQQGEwJOTDESMBAGA1UECAwJQW1zdGVyZGFtMRIwEAYDVQQHDAlBbXN0ZXJkYW0x DzANBgNVBAoMBlBpbVRpbTEPMA0GA1UECwwGUGltVGltMSswKQYDVQQDDCJkZXY1 My5xdWFydHNvZnQuY29tL3BrbGltb3YvcGltdGltMSQwIgYJKoZIhvcNAQkBFhVw a2xpbW92QHF1YXJ0c29mdC5jb20wHhcNMTIxMTA2MTQxNjUzWhcNMTMxMTA2MTQx NjUzWjCBqjELMAkGA1UEBhMCTkwxEjAQBgNVBAgMCUFtc3RlcmRhbTESMBAGA1UE BwwJQW1zdGVyZGFtMQ8wDQYDVQQKDAZQaW1UaW0xDzANBgNVBAsMBlBpbVRpbTEr MCkGA1UEAwwiZGV2NTMucXVhcnRzb2Z0LmNvbS9wa2xpbW92L3BpbXRpbTEkMCIG CSqGSIb3DQEJARYVcGtsaW1vdkBxdWFydHNvZnQuY29tMIGfMA0GCSqGSIb3DQEB AQUAA4GNADCBiQKBgQDE0d63YwpBLxzxQAW887JALcGruAHkHu7Ui1oc7bCIMy+u d6rPgNmbFLw3GoGzQ8xhMmksZHsS07IfWRTDeisPHAqfgcApOZbyMyZUAL6+1ko4 xAIPnQSia7l8M4nWgtgqifDCbFKAoPXuWSrYDOFtgSkBLH5xYyFPRc04nnHpoQID AQABo1AwTjAdBgNVHQ4EFgQUE2oxXYDFRNtgvn8tyXldepRFWzYwHwYDVR0jBBgw FoAUE2oxXYDFRNtgvn8tyXldepRFWzYwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0B AQUFAAOBgQB1/S46dWBECaOs4byCysFhzXw8qx8znJkSZcIdDilmg1kkfusXKi2S DiiFw5gDrc6Qp6WtPmVhxHUWl6O5bOG8lG0Dcppeed9454CGvBShmYdwC6vk0s7/ gVdK2V4fYsUeT6u49ONshvJ/8xhHz2gGXeLWaqHwtK3Dl3S6TIDuoQ== -----END CERTIFICATE-----'; } /** * Returns test private certificate string. * @return string private certificate string. */ protected function getTestPrivateCertificate() { return '-----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQDE0d63YwpBLxzxQAW887JALcGruAHkHu7Ui1oc7bCIMy+ud6rP gNmbFLw3GoGzQ8xhMmksZHsS07IfWRTDeisPHAqfgcApOZbyMyZUAL6+1ko4xAIP nQSia7l8M4nWgtgqifDCbFKAoPXuWSrYDOFtgSkBLH5xYyFPRc04nnHpoQIDAQAB AoGAPm1e2gYE86Xw5ShsaYFWcXrR6hiEKQoSsMG+hFxz2M97eTglqolw+/p4tHWo 2+ZORioKJ/V6//67iavkpRfz3dloUlNE9ZzlvqvPjHePt3BI22GI8D84dcqnxWW5 4okEAfDfXk2B4UNOpVNU5FZjg4XvBEbbhRVrsBWAPMduDX0CQQDtFgLLLWr50F3z lGuFy68Y1d01sZsyf7xUPaLcDWbrnVMIjZIs60BbLg9PZ6sYcwV2RwL/WaJU0Ap/ KKjHW51zAkEA1IWBicQtt6yGaUqydq+ifX8/odFjIrlZklwckLl65cImyxqDYMnA m+QdbZznSH96BHjduhJAEAtfYx5CVMrXmwJAHKiWedzpm3z2fmUoginW5pejf8QS UI5kQ4KX1yW/lSeVS+lhDBD73Im6zAxqADCXLm7zC87X8oybWDef/0kxxQJAebRX AalKMSRo+QVg/F0Kpenoa+f4aNtSc2GyriK6QbeU9b0iPZxsZBoXzD0NqlPucX8y IyvuagHJR379p4dePwJBAMCkYSATGdhYbeDfySWUro5K0QAvBNj8FuNJQ4rqUxz8 8b+OXIyd5WlmuDRTDGJBTxAYeaioTuMCFWaZm4jG0I4= -----END RSA PRIVATE KEY-----'; } // Tests : public function testGenerateSignature() { $signatureMethod = new RsaSha1(); $signatureMethod->setPrivateCertificate($this->getTestPrivateCertificate()); $signatureMethod->setPublicCertificate($this->getTestPublicCertificate()); $baseString = 'test_base_string'; $key = 'test_key'; $signature = $signatureMethod->generateSignature($baseString, $key); $this->assertNotEmpty($signature, 'Unable to generate signature!'); } /** * @depends testGenerateSignature */ public function testVerify() { $signatureMethod = new RsaSha1(); $signatureMethod->setPrivateCertificate($this->getTestPrivateCertificate()); $signatureMethod->setPublicCertificate($this->getTestPublicCertificate()); $baseString = 'test_base_string'; $key = 'test_key'; $signature = 'unsigned'; $this->assertFalse($signatureMethod->verify($signature, $baseString, $key), 'Unsigned signature is valid!'); $generatedSignature = $signatureMethod->generateSignature($baseString, $key); $this->assertTrue($signatureMethod->verify($generatedSignature, $baseString, $key), 'Generated signature is invalid!'); } public function testInitPrivateCertificate() { $signatureMethod = new RsaSha1(); $certificateFileName = __FILE__; $signatureMethod->privateCertificateFile = $certificateFileName; $this->assertEquals(file_get_contents($certificateFileName), $signatureMethod->getPrivateCertificate(), 'Unable to fetch private certificate from file!'); } public function testInitPublicCertificate() { $signatureMethod = new RsaSha1(); $certificateFileName = __FILE__; $signatureMethod->publicCertificateFile = $certificateFileName; $this->assertEquals(file_get_contents($certificateFileName), $signatureMethod->getPublicCertificate(), 'Unable to fetch public certificate from file!'); } } ",0 "javadoc (build 1.6.0_31) on Mon Jul 22 15:25:23 PDT 2013 --> Uses of Class org.apache.hadoop.mapred.join.ResetableIterator.EMPTY (Hadoop 1.2.1 API)
                  Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
                   PREV   NEXT FRAMES    NO FRAMES    

                  Uses of Class
                  org.apache.hadoop.mapred.join.ResetableIterator.EMPTY

                  No usage of org.apache.hadoop.mapred.join.ResetableIterator.EMPTY


                  Overview  Package  Class   Use  Tree  Deprecated  Index  Help 
                   PREV   NEXT FRAMES    NO FRAMES    

                  Copyright © 2009 The Apache Software Foundation ",0 "n 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. */ package com.intellij.refactoring.replaceConstructorWithFactory; import com.intellij.lang.findUsages.DescriptiveNameUtil; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Ref; import com.intellij.psi.*; import com.intellij.psi.codeStyle.CodeStyleManager; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.search.searches.ReferencesSearch; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.util.PsiUtil; import com.intellij.refactoring.BaseRefactoringProcessor; import com.intellij.refactoring.RefactoringBundle; import com.intellij.refactoring.util.ConflictsUtil; import com.intellij.refactoring.util.RefactoringUIUtil; import com.intellij.usageView.UsageInfo; import com.intellij.usageView.UsageViewDescriptor; import com.intellij.util.IncorrectOperationException; import com.intellij.util.VisibilityUtil; import com.intellij.util.containers.MultiMap; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; /** * @author dsl */ public class ReplaceConstructorWithFactoryProcessor extends BaseRefactoringProcessor { private static final Logger LOG = Logger.getInstance( ""#com.intellij.refactoring.replaceConstructorWithFactory.ReplaceConstructorWithFactoryProcessor""); private final PsiMethod myConstructor; private final String myFactoryName; private final PsiElementFactory myFactory; private final PsiClass myOriginalClass; private final PsiClass myTargetClass; private final PsiManager myManager; private final boolean myIsInner; public ReplaceConstructorWithFactoryProcessor(Project project, PsiMethod originalConstructor, PsiClass originalClass, PsiClass targetClass, @NonNls String factoryName) { super(project); myOriginalClass = originalClass; myConstructor = originalConstructor; myTargetClass = targetClass; myFactoryName = factoryName; myManager = PsiManager.getInstance(project); myFactory = JavaPsiFacade.getInstance(myManager.getProject()).getElementFactory(); myIsInner = isInner(myOriginalClass); } private boolean isInner(PsiClass originalClass) { final boolean result = PsiUtil.isInnerClass(originalClass); if (result) { LOG.assertTrue(PsiTreeUtil.isAncestor(myTargetClass, originalClass, false)); } return result; } @NotNull protected UsageViewDescriptor createUsageViewDescriptor(@NotNull UsageInfo[] usages) { if (myConstructor != null) { return new ReplaceConstructorWithFactoryViewDescriptor(myConstructor); } else { return new ReplaceConstructorWithFactoryViewDescriptor(myOriginalClass); } } private List myNonNewConstructorUsages; @NotNull protected UsageInfo[] findUsages() { GlobalSearchScope projectScope = GlobalSearchScope.projectScope(myProject); ArrayList usages = new ArrayList(); myNonNewConstructorUsages = new ArrayList(); for (PsiReference reference : ReferencesSearch.search(myConstructor == null ? myOriginalClass : myConstructor, projectScope, false)) { PsiElement element = reference.getElement(); if (element.getParent() instanceof PsiNewExpression) { usages.add(new UsageInfo(element.getParent())); } else if (""super"".equals(element.getText()) || ""this"".equals(element.getText())) { myNonNewConstructorUsages.add(element); } else if (element instanceof PsiMethod && ((PsiMethod)element).isConstructor()) { myNonNewConstructorUsages.add(element); } else if (element instanceof PsiClass) { myNonNewConstructorUsages.add(element); } } //if (myConstructor != null && myConstructor.getParameterList().getParametersCount() == 0) { // RefactoringUtil.visitImplicitConstructorUsages(getConstructorContainingClass(), new RefactoringUtil.ImplicitConstructorUsageVisitor() { // @Override public void visitConstructor(PsiMethod constructor, PsiMethod baseConstructor) { // myNonNewConstructorUsages.add(constructor); // } // // @Override public void visitClassWithoutConstructors(PsiClass aClass) { // myNonNewConstructorUsages.add(aClass); // } // }); //} return usages.toArray(new UsageInfo[usages.size()]); } protected boolean preprocessUsages(@NotNull Ref refUsages) { UsageInfo[] usages = refUsages.get(); MultiMap conflicts = new MultiMap(); final PsiResolveHelper helper = JavaPsiFacade.getInstance(myProject).getResolveHelper(); final PsiClass constructorContainingClass = getConstructorContainingClass(); if (!helper.isAccessible(constructorContainingClass, myTargetClass, null)) { String message = RefactoringBundle.message(""class.0.is.not.accessible.from.target.1"", RefactoringUIUtil.getDescription(constructorContainingClass, true), RefactoringUIUtil.getDescription(myTargetClass, true)); conflicts.putValue(constructorContainingClass, message); } HashSet reportedContainers = new HashSet(); final String targetClassDescription = RefactoringUIUtil.getDescription(myTargetClass, true); for (UsageInfo usage : usages) { final PsiElement container = ConflictsUtil.getContainer(usage.getElement()); if (!reportedContainers.contains(container)) { reportedContainers.add(container); if (!helper.isAccessible(myTargetClass, usage.getElement(), null)) { String message = RefactoringBundle.message(""target.0.is.not.accessible.from.1"", targetClassDescription, RefactoringUIUtil.getDescription(container, true)); conflicts.putValue(myTargetClass, message); } } } if (myIsInner) { for (UsageInfo usage : usages) { final PsiField field = PsiTreeUtil.getParentOfType(usage.getElement(), PsiField.class); if (field != null) { final PsiClass containingClass = field.getContainingClass(); if (PsiTreeUtil.isAncestor(containingClass, myTargetClass, true)) { String message = RefactoringBundle.message(""constructor.being.refactored.is.used.in.initializer.of.0"", RefactoringUIUtil.getDescription(field, true), RefactoringUIUtil.getDescription( constructorContainingClass, false)); conflicts.putValue(field, message); } } } } return showConflicts(conflicts, usages); } private PsiClass getConstructorContainingClass() { if (myConstructor != null) { return myConstructor.getContainingClass(); } else { return myOriginalClass; } } protected void performRefactoring(@NotNull UsageInfo[] usages) { try { PsiReferenceExpression classReferenceExpression = myFactory.createReferenceExpression(myTargetClass); PsiReferenceExpression qualifiedMethodReference = (PsiReferenceExpression)myFactory.createExpressionFromText(""A."" + myFactoryName, null); PsiMethod factoryMethod = (PsiMethod)myTargetClass.add(createFactoryMethod()); if (myConstructor != null) { PsiUtil.setModifierProperty(myConstructor, PsiModifier.PRIVATE, true); VisibilityUtil.escalateVisibility(myConstructor, factoryMethod); for (PsiElement place : myNonNewConstructorUsages) { VisibilityUtil.escalateVisibility(myConstructor, place); } } if (myConstructor == null) { PsiMethod constructor = myFactory.createConstructor(); PsiUtil.setModifierProperty(constructor, PsiModifier.PRIVATE, true); constructor = (PsiMethod)getConstructorContainingClass().add(constructor); VisibilityUtil.escalateVisibility(constructor, myTargetClass); } for (UsageInfo usage : usages) { PsiNewExpression newExpression = (PsiNewExpression)usage.getElement(); if (newExpression == null) continue; VisibilityUtil.escalateVisibility(factoryMethod, newExpression); PsiMethodCallExpression factoryCall = (PsiMethodCallExpression)myFactory.createExpressionFromText(myFactoryName + ""()"", newExpression); factoryCall.getArgumentList().replace(newExpression.getArgumentList()); boolean replaceMethodQualifier = false; PsiExpression newQualifier = newExpression.getQualifier(); PsiElement resolvedFactoryMethod = factoryCall.getMethodExpression().resolve(); if (resolvedFactoryMethod != factoryMethod || newQualifier != null) { factoryCall.getMethodExpression().replace(qualifiedMethodReference); replaceMethodQualifier = true; } if (replaceMethodQualifier) { if (newQualifier == null) { factoryCall.getMethodExpression().getQualifierExpression().replace(classReferenceExpression); } else { factoryCall.getMethodExpression().getQualifierExpression().replace(newQualifier); } } newExpression.replace(factoryCall); } } catch (IncorrectOperationException e) { LOG.error(e); } } private PsiMethod createFactoryMethod() throws IncorrectOperationException { final PsiClass containingClass = getConstructorContainingClass(); PsiClassType type = myFactory.createType(containingClass, PsiSubstitutor.EMPTY); final PsiMethod factoryMethod = myFactory.createMethod(myFactoryName, type); if (myConstructor != null) { factoryMethod.getParameterList().replace(myConstructor.getParameterList()); factoryMethod.getThrowsList().replace(myConstructor.getThrowsList()); } Collection names = new HashSet(); for (PsiTypeParameter typeParameter : PsiUtil.typeParametersIterable(myConstructor != null ? myConstructor : containingClass)) { if (!names.contains(typeParameter.getName())) { //Otherwise type parameter is hidden in the constructor names.add(typeParameter.getName()); factoryMethod.getTypeParameterList().addAfter(typeParameter, null); } } PsiReturnStatement returnStatement = (PsiReturnStatement)myFactory.createStatementFromText(""return new A();"", null); PsiNewExpression newExpression = (PsiNewExpression)returnStatement.getReturnValue(); PsiJavaCodeReferenceElement classRef = myFactory.createReferenceElementByType(type); newExpression.getClassReference().replace(classRef); final PsiExpressionList argumentList = newExpression.getArgumentList(); PsiParameter[] params = factoryMethod.getParameterList().getParameters(); for (PsiParameter parameter : params) { PsiExpression paramRef = myFactory.createExpressionFromText(parameter.getName(), null); argumentList.add(paramRef); } factoryMethod.getBody().add(returnStatement); PsiUtil.setModifierProperty(factoryMethod, getDefaultFactoryVisibility(), true); if (!myIsInner) { PsiUtil.setModifierProperty(factoryMethod, PsiModifier.STATIC, true); } return (PsiMethod)CodeStyleManager.getInstance(myProject).reformat(factoryMethod); } @PsiModifier.ModifierConstant private String getDefaultFactoryVisibility() { final PsiModifierList modifierList; if (myConstructor != null) { modifierList = myConstructor.getModifierList(); } else { modifierList = myOriginalClass.getModifierList(); } return VisibilityUtil.getVisibilityModifier(modifierList); } protected String getCommandName() { if (myConstructor != null) { return RefactoringBundle.message(""replace.constructor.0.with.a.factory.method"", DescriptiveNameUtil.getDescriptiveName(myConstructor)); } else { return RefactoringBundle.message(""replace.default.constructor.of.0.with.a.factory.method"", DescriptiveNameUtil.getDescriptiveName(myOriginalClass)); } } public PsiClass getOriginalClass() { return getConstructorContainingClass(); } public PsiClass getTargetClass() { return myTargetClass; } public PsiMethod getConstructor() { return myConstructor; } public String getFactoryName() { return myFactoryName; } } ",0 "rg/1999/xhtml""> fastcgi++: Class Members - Functions
                   

                  - s -


                  Generated on Wed Aug 22 2012 20:35:53 for fastcgi++ by   1.8.1
                  ",0 "ight (C) 1998-2004 Jon Anders Haugum, TObias Weber * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * * Authors of avra can be reached at: * email: jonah@omegav.ntnu.no, tobiw@suprafluid.com * www: http://sourceforge.net/projects/avra */ /* * In append_type: added generic register names support * Alexey Pavluchenko, 16.Nov.2005 */ #include #include #include #include #include ""misc.h"" #include ""args.h"" #include ""avra.h"" #include ""device.h"" /* Only Windows LIBC does support itoa, so we add this function for other systems here manually. Thank you Peter Hettkamp for your work. */ #ifndef WIN32 char * itoa(int num, char *str, const int number_format) { int num1 = num; int num_chars = 0; int pos; while (num1>0) { num_chars++; num1 /= number_format; } if (num_chars == 0) num_chars = 1; str[num_chars] = 0; for (pos = num_chars-1; pos>=0; pos--) { int cur_char = num % number_format; if (cur_char < 10) /* Insert number */ { str[pos] = cur_char + '0'; } else { str[pos] = cur_char-10 + 'A'; } num /= number_format; } return(str); } #endif int read_macro(struct prog_info *pi, char *name) { int loopok; int i; int start; struct macro *macro; struct macro_line *macro_line; struct macro_line **last_macro_line = NULL; struct macro_label *macro_label; if (pi->pass == PASS_1) { if (!name) { print_msg(pi, MSGTYPE_ERROR, ""missing macro name""); return(True); } get_next_token(name, TERM_END); for (i = 0; !IS_END_OR_COMMENT(name[i]); i++) { if (!IS_LABEL(name[i])) { print_msg(pi, MSGTYPE_ERROR, ""illegal characters used in macro name '%s'"",name); return(False); } } macro = calloc(1, sizeof(struct macro)); if (!macro) { print_msg(pi, MSGTYPE_OUT_OF_MEM, NULL); return(False); } if (pi->last_macro) pi->last_macro->next = macro; else pi->first_macro = macro; pi->last_macro = macro; macro->name = malloc(strlen(name) + 1); if (!macro->name) { print_msg(pi, MSGTYPE_OUT_OF_MEM, NULL); return(False); } strcpy(macro->name, name); macro->include_file = pi->fi->include_file; macro->first_line_number = pi->fi->line_number; last_macro_line = ¯o->first_macro_line; } else /* pi->pass == PASS_2 */ { if (pi->list_line && pi->list_on) { fprintf(pi->list_file, "" %s\n"", pi->list_line); pi->list_line = NULL; } // reset macro label running numbers get_next_token(name, TERM_END); macro = get_macro(pi, name); if (!macro) { print_msg(pi, MSGTYPE_ERROR, ""macro inconsistency in '%s'"", name); return(True); } for (macro_label = macro->first_label; macro_label; macro_label = macro_label->next) { macro_label->running_number = 0; } } loopok = True; while (loopok) { if (fgets_new(pi,pi->fi->buff, LINEBUFFER_LENGTH, pi->fi->fp)) { pi->fi->line_number++; i = 0; while (IS_HOR_SPACE(pi->fi->buff[i]) && !IS_END_OR_COMMENT(pi->fi->buff[i])) i++; if (pi->fi->buff[i] == '.') { i++; if (!nocase_strncmp(&pi->fi->buff[i], ""endm"", 4)) loopok = False; if (!nocase_strncmp(&pi->fi->buff[i], ""endmacro"", 8)) loopok = False; } if (pi->pass == PASS_1) { if (loopok) { i = 0; /* find start of line */ while (IS_HOR_SPACE(pi->fi->buff[i]) && !IS_END_OR_COMMENT(pi->fi->buff[i])) { i++; } start = i; /* find end of line */ while (!IS_END_OR_COMMENT(pi->fi->buff[i]) && (IS_LABEL(pi->fi->buff[i]) || pi->fi->buff[i] == ':')) { i++; } if (pi->fi->buff[i-1] == ':' && (pi->fi->buff[i-2] == '%' && (IS_HOR_SPACE(pi->fi->buff[i]) || IS_END_OR_COMMENT(pi->fi->buff[i])))) { if (macro->first_label) { for (macro_label = macro->first_label; macro_label->next; macro_label=macro_label->next) { } macro_label->next = calloc(1,sizeof(struct macro_label)); macro_label = macro_label->next; } else { macro_label = calloc(1,sizeof(struct macro_label)); macro->first_label = macro_label; } macro_label->label = malloc(strlen(&pi->fi->buff[start])+1); pi->fi->buff[i-1] = '\0'; strcpy(macro_label->label, &pi->fi->buff[start]); pi->fi->buff[i-1] = ':'; macro_label->running_number = 0; } macro_line = calloc(1, sizeof(struct macro_line)); if (!macro_line) { print_msg(pi, MSGTYPE_OUT_OF_MEM, NULL); return(False); } *last_macro_line = macro_line; last_macro_line = ¯o_line->next; macro_line->line = malloc(strlen(pi->fi->buff) + 1); if (!macro_line->line) { print_msg(pi, MSGTYPE_OUT_OF_MEM, NULL); return(False); } strcpy(macro_line->line, &pi->fi->buff[start]); } } else if (pi->fi->buff && pi->list_file && pi->list_on) { if (pi->fi->buff[i] == ';') fprintf(pi->list_file, "" %s\n"", pi->fi->buff); else fprintf(pi->list_file, "" %s\n"", pi->fi->buff); } } else { if (feof(pi->fi->fp)) { print_msg(pi, MSGTYPE_ERROR, ""Found no closing .ENDMACRO""); return(True); } else { perror(pi->fi->include_file->name); return(False); } } } return(True); } struct macro *get_macro(struct prog_info *pi, char *name) { struct macro *macro; for (macro = pi->first_macro; macro; macro = macro->next) if (!nocase_strcmp(macro->name, name)) return(macro); return(NULL); } void append_type(struct prog_info *pi, char *name, int c, char *value) { int p, l; struct def *def; p = strlen(name); name[p++] = '_'; if (c == 0) { name[p++] = 'v'; name[p] = '\0'; return; } l = strlen(value); if ((l==2 || l==3) && (tolower(value[0])=='r') && isdigit(value[1]) && (l==3 ? isdigit(value[2]) : 1) && (atoi(&value[1])<32)) { itoa((c*8),&name[p],10); return; } for (def = pi->first_def; def; def = def->next) if (!nocase_strcmp(def->name, value)) { itoa((c*8),&name[p],10); return; } name[p++] = 'i'; name[p] = '\0'; } /********************************************************* * This routine replaces the macro call with mnemonics. * *********************************************************/ int expand_macro(struct prog_info *pi, struct macro *macro, char *rest_line) { int ok = True, macro_arg_count = 0, off, a, b = 0, c, i = 0, j = 0; char *line = NULL; char *temp; char *macro_args[MAX_MACRO_ARGS]; char tmp[7]; char buff[LINEBUFFER_LENGTH]; char arg = False; char *nmn; //string buffer for 'n'ew 'm'acro 'n'ame struct macro_line *old_macro_line; struct macro_call *macro_call; struct macro_label *macro_label; if (rest_line) { //we reserve some extra space for extended macro parameters line = malloc(strlen(rest_line) + 20); if (!line) { print_msg(pi, MSGTYPE_OUT_OF_MEM, NULL); return(False); } /* exchange amca word 'src' with YH:YL and 'dst' with ZH:ZL */ for (c = 0, a = strlen(rest_line); c < a; c++) { switch (tolower(rest_line[c])) { case 's': if (IS_SEPARATOR(rest_line[c-1]) && (rest_line[c+1] == 'r') && (rest_line[c+2] == 'c') && IS_SEPARATOR(rest_line[c+3])) { strcpy(&line[b],""YH:YL""); b += 5; c += 2; } else { line[b++] = rest_line[c]; } break; case 'd': if (IS_SEPARATOR(rest_line[c-1]) && (rest_line[c+1] == 's') && (rest_line[c+2] == 't') && IS_SEPARATOR(rest_line[c+3])) { strcpy(&line[b],""ZH:ZL""); b += 5; c += 2; } else { line[b++] = rest_line[c]; } break; // case ';': // break; default: line[b++] = rest_line[c]; } } strcpy(&line[b],""\n""); /* set CR/LF at the end of the line */ /* here we split up the macro arguments into ""macro_args"" * Extended macro code interpreter added by TW 2002 */ temp = line; /* test for advanced parameters */ if ( temp[0] == '[' ) // there must be ""["" "" then ""]"", else it is garbage { if (!strchr(temp, ']')) { print_msg(pi, MSGTYPE_ERROR, ""found no closing ']'""); return(False); } // Okay now we are within the advanced code interpreter temp++; // = &temp[1]; // skip the first bracket nmn = malloc(LINEBUFFER_LENGTH); if (!nmn) { print_msg(pi, MSGTYPE_OUT_OF_MEM, NULL); return(False); } strcpy(nmn,macro->name); // create a new macro name buffer c = 1; // byte counter arg = True; // loop flag while (arg) { while (IS_HOR_SPACE(temp[0])) //skip leading spaces { temp++; // = &temp[1]; } off = 0; // pointer offset do { switch (temp[off]) //test current character code { case ':': temp[off] = '\0'; if (off > 0) { c++; macro_args[macro_arg_count++] = temp; } else { print_msg(pi, MSGTYPE_ERROR, ""missing register before ':'"",nmn); return(False); } break; case ']': arg = False; case ',': a = off; do temp[a--] = '\0'; while ( IS_HOR_SPACE(temp[a]) ); if (off > 0) { macro_args[macro_arg_count++] = temp; append_type(pi, nmn, c, temp); c = 1; } else { append_type(pi, nmn, 0, temp); c = 1; } break; default: off++; } } while (temp[off] != '\0'); if (arg) temp = &temp[off+1]; else break; } macro = get_macro(pi,nmn); if (macro == NULL) { print_msg(pi, MSGTYPE_ERROR, ""Macro %s is not defined !"",nmn); return(False); } free(nmn); } /* or else, we handle the macro as normal macro */ else { line = malloc(strlen(rest_line) + 1); if (!line) { print_msg(pi, MSGTYPE_OUT_OF_MEM, NULL); return(False); } strcpy(line, rest_line); temp = line; while (temp) { macro_args[macro_arg_count++] = temp; temp = get_next_token(temp, TERM_COMMA); } } } if (pi->pass == PASS_1) { macro_call = calloc(1, sizeof(struct macro_call)); if (!macro_call) { print_msg(pi, MSGTYPE_OUT_OF_MEM, NULL); return(False); } if (pi->last_macro_call) pi->last_macro_call->next = macro_call; else pi->first_macro_call = macro_call; pi->last_macro_call = macro_call; macro_call->line_number = pi->fi->line_number; macro_call->include_file = pi->fi->include_file; macro_call->macro = macro; macro_call->prev_on_stack = pi->macro_call; if (macro_call->prev_on_stack) { macro_call->nest_level = macro_call->prev_on_stack->nest_level + 1; macro_call->prev_line_index = macro_call->prev_on_stack->line_index; } } else { for (macro_call = pi->first_macro_call; macro_call; macro_call = macro_call->next) { if ((macro_call->include_file->num == pi->fi->include_file->num) && (macro_call->line_number == pi->fi->line_number)) { if (pi->macro_call) { /* Find correct macro_call when using recursion and nesting */ if (macro_call->prev_on_stack == pi->macro_call) if ((macro_call->nest_level == (pi->macro_call->nest_level + 1)) && (macro_call->prev_line_index == pi->macro_call->line_index)) break; } else break; } } if (pi->list_line && pi->list_on) { fprintf(pi->list_file, ""C:%06x + %s\n"", pi->cseg_addr, pi->list_line); pi->list_line = NULL; } } macro_call->line_index = 0; pi->macro_call = macro_call; old_macro_line = pi->macro_line; //printf(""\nconvert macro: '%s'\n"",macro->name); for (pi->macro_line = macro->first_macro_line; pi->macro_line && ok; pi->macro_line = pi->macro_line->next) { macro_call->line_index++; if (GET_ARG(pi->args, ARG_LISTMAC)) pi->list_line = buff; else pi->list_line = NULL; /* here we change jumps/calls within macro that corresponds to macro labels. Only in case there is an entry in macro_label list */ strcpy(buff,""\0""); macro_label = get_macro_label(pi->macro_line->line,macro); if (macro_label) { /* test if the right macro label has been found */ temp = strstr(pi->macro_line->line,macro_label->label); c = strlen(macro_label->label); if (temp[c] == ':') /* it is a label definition */ { macro_label->running_number++; strncpy(buff, macro_label->label, c - 1); buff[c - 1] = 0; i = strlen(buff) + 2; /* we set the process indeafter label */ /* add running number to it */ strcpy(&buff[c-1],itoa(macro_label->running_number, tmp, 10)); strcat(buff, "":\0""); } else if (IS_HOR_SPACE(temp[c]) || IS_END_OR_COMMENT(temp[c])) /* it is a jump to a macro defined label */ { strcpy(buff,pi->macro_line->line); temp = strstr(buff, macro_label->label); i = temp - buff + strlen(macro_label->label); strncpy(temp, macro_label->label, c - 1); strcpy(&temp[c-1], itoa(macro_label->running_number, tmp, 10)); } } else { i = 0; } /* here we check every character of current line */ for (j = i; pi->macro_line->line[i] != '\0'; i++) { /* check for register place holders */ if (pi->macro_line->line[i] == '@') { i++; if (!isdigit(pi->macro_line->line[i])) print_msg(pi, MSGTYPE_ERROR, ""@ must be followed by a number""); else if ((pi->macro_line->line[i] - '0') >= macro_arg_count) print_msg(pi, MSGTYPE_ERROR, ""Missing macro argument (for @%c)"", pi->macro_line->line[i]); else { /* and replace them with given registers */ strcat(&buff[j], macro_args[pi->macro_line->line[i] - '0']); j += strlen(macro_args[pi->macro_line->line[i] - '0']); } } else if (pi->macro_line->line[i] == ';') { strncat(buff, ""\n"", 1); break; } else { strncat(buff, &pi->macro_line->line[i], 1); } } ok = parse_line(pi, buff); if (ok) { if ((pi->pass == PASS_2) && pi->list_line && pi->list_on) fprintf(pi->list_file, "" %s\n"", pi->list_line); if (pi->error_count >= pi->max_errors) { print_msg(pi, MSGTYPE_MESSAGE, ""Maximum error count reached. Exiting...""); ok = False; break; } } } pi->macro_line = old_macro_line; pi->macro_call = macro_call->prev_on_stack; if (rest_line) free(line); return(ok); } struct macro_label *get_macro_label(char *line, struct macro *macro) { char *temp; struct macro_label *macro_label; for (macro_label = macro->first_label; macro_label; macro_label = macro_label->next) { temp = strstr(line,macro_label->label); if (temp) { return macro_label; } } return NULL; } /* end of macro.c */ ",0 "eeded\n""; ?> --INI-- xdebug.default_enable=1 xdebug.dump.GET= xdebug.dump.SERVER= xdebug.show_local_vars=0 --FILE-- --EXPECTF-- Fatal error: Uncaught exception 'Exception' with message 'First exception' in %sbug00476-2.php on line 31 Exception: First exception in %sbug00476-2.php on line 5 Call Stack: %w%f %w%d 1. {main}() %sbug00476-2.php:0 %w%f %w%d 2. d() %sbug00476-2.php:35 %w%f %w%d 3. c() %sbug00476-2.php:29 %w%f %w%d 4. b() %sbug00476-2.php:20 %w%f %w%d 5. a() %sbug00476-2.php:11 Exception: Second exception in %sbug00476-2.php on line 13 Call Stack: %w%f %w%d 1. {main}() %sbug00476-2.php:0 %w%f %w%d 2. d() %sbug00476-2.php:35 %w%f %w%d 3. c() %sbug00476-2.php:29 %w%f %w%d 4. b() %sbug00476-2.php:20 Exception: Third exception in %sbug00476-2.php on line 22 Call Stack: %w%f %w%d 1. {main}() %sbug00476-2.php:0 %w%f %w%d 2. d() %sbug00476-2.php:35 %w%f %w%d 3. c() %sbug00476-2.php:29 Exception: Fourth exception in %sbug00476-2.php on line 31 Call Stack: %w%f %w%d 1. {main}() %sbug00476-2.php:0 %w%f %w%d 2. d() %sbug00476-2.php:35 ",0 "th=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no""/> Generates

                  go-swagger toolkit

                  Swagger 2.0 describes your API's for you, so you don't have to

                  swagger.json generation

                  generate

                  The toolkit has a command that will let you generate a swagger spec document from your code. The command integrates with go doc comments, and makes use of structs when it needs to know of types.

                  9 Nov 2015

                  Generate an API client

                  generate client

                  The toolkit has a command that will let you generate a client.

                  23 Oct 2015

                  Generate a server for a swagger spec

                  generate server

                  The toolkit has a command that will let you generate a docker friendly server with support for TLS. You can configure it through environment variables that are commonly used on PaaS services.

                  22 Nov 2015

                  swagger:meta

                  spec

                  The swagger:meta annotation flags a file as source for metadata about the API. This is typically a doc.go file with your package documentation. You can specify a Consumes and Produces key which has a new content type on each line Schemes is a tag that is required and allows for a comma separated string composed of: http, https, ws or wss Host and BasePath can be specified but those values will be defaults, they should get substituted when serving the swagger spec.

                  14 Nov 2015 #meta data

                  swagger:route

                  spec

                  A swagger:route annotation links a path to a method. This operation gets a unique id, which is used in various places as method name. One such usage is in method names for client generation for example.

                  Because there are many routers available, this tool does not try to parse the paths you provided to your routing library of choice. So you have to specify your path pattern yourself in valid swagger syntax.

                  14 Nov 2015 #operations

                  swagger:params

                  spec

                  The swagger:params annotation links a struct to one or more operations. The params in the resulting swagger spec can be composed of several structs. There are no guarantees given on how property name overlaps are resolved when several structs apply to the same operation. This tag works very similar to the swagger:model tag except that it produces valid parameter objects instead of schema objects.

                  14 Nov 2015 #operations

                  swagger:response

                  spec

                  Reads a struct decorated with swagger:response and uses that information to fill up the headers and the schema for a response. A swagger:route can specify a response name for a status code and then the matching response will be used for that operation in the swagger definition.

                  14 Nov 2015 #operations

                  swagger:model

                  spec

                  A swagger:model annotation optionally gets a model name as extra data on the line. when this appears anywhere in a comment for a struct, then that struct becomes a schema in the definitions object of swagger.

                  14 Nov 2015 #definitions

                  swagger:allOf

                  spec

                  Marks an embedded type as a member for allOf

                  14 Nov 2015 #polymorphism

                   
                  © 2015 go-swagger contributors
                  Design pdevty
                  ",0 "enerated by javadoc (1.8.0_101) on Mon Aug 22 00:07:21 CEST 2016 --> de.dhbw.wi13c.jguicreator.data.validator

                  Package de.dhbw.wi13c.jguicreator.data.validator

                  ",0 "odificato con successo i clienti!'; $_['text_approved'] = 'Hai attivato %s account!'; $_['text_wait'] = 'Attendi!'; $_['text_balance'] = 'Saldo:'; // Column $_['column_name'] = 'Nome cliente'; $_['column_email'] = 'E-Mail'; $_['column_customer_group'] = 'Gruppo clienti'; $_['column_status'] = 'Stato'; $_['column_approved'] = 'Approvato'; $_['column_date_added'] = 'Data inserimento'; $_['column_description'] = 'Descrizione'; $_['column_amount'] = 'Imporot'; $_['column_points'] = 'Punti'; $_['column_ip'] = 'IP'; $_['column_total'] = 'Account Totali'; $_['column_action'] = 'Azione'; // Entry $_['entry_firstname'] = 'Nome:'; $_['entry_lastname'] = 'Cognome:'; $_['entry_email'] = 'E-Mail:'; $_['entry_telephone'] = 'Telefono:'; $_['entry_fax'] = 'Fax:'; $_['entry_newsletter'] = 'Newsletter:'; $_['entry_customer_group'] = 'Gruppo clienti:'; $_['entry_status'] = 'Stato:'; $_['entry_password'] = 'Password:'; $_['entry_confirm'] = 'Conferma:'; $_['entry_company'] = 'Azienda:'; $_['entry_address_1'] = 'Indirizzo 1:'; $_['entry_address_2'] = 'Indirizzo 2:'; $_['entry_city'] = 'Città:'; $_['entry_postcode'] = 'CAP:'; $_['entry_country'] = 'Nazione:'; $_['entry_zone'] = 'Provincia:'; $_['entry_default'] = 'Indirizzo di Default:'; $_['entry_amount'] = 'Importo:'; $_['entry_points'] = 'Punti:'; $_['entry_description'] = 'Descrizione:'; // Error $_['error_warning'] = 'Attenzione: Controlla il modulo, ci sono alcuni errori!'; $_['error_permission'] = 'Attenzione: Non hai i permessi necessari per modificare i clienti!'; $_['error_firstname'] = 'Il nome deve essere maggiore di 1 carattere e minore di 32!'; $_['error_lastname'] = 'Il cognome deve essere maggiore di 1 carattere e minore di 32!'; $_['error_email'] = 'L\'indirizzo e-mail sembra essere non valido!'; $_['error_telephone'] = 'Il Telefono deve essere maggiore di 3 caratteri e minore di 32!'; $_['error_password'] = 'La password deve essere maggiore di 3 caratteri e minore di 20!'; $_['error_confirm'] = 'Le due password non coincodono!'; $_['error_address_1'] = 'L\'indirizzo deve essere lungo almeno 3 caratteri e non più di 128 caratteri!'; $_['error_city'] = 'La città deve essere lungo almeno 3 caratteri e non più di 128 caratteri!'; $_['error_postcode'] = 'Il CAP deve essere tra i 2 ed i 10 caratteri per questa nazione!'; $_['error_country'] = 'Per favore seleziona lo stato!'; $_['error_zone'] = 'Per favore seleziona la provincia'; ?>",0 "ImportAutoConfiguration; import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.test.web.reactive.server.WebTestClient; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ImportAutoConfiguration(exclude = EmbeddedMongoAutoConfiguration.class) public class IntegrationTests { @LocalServerPort int port; WebTestClient client; // @Autowired // WebTestClient client; @BeforeEach public void setup() { this.client = WebTestClient.bindToServer() .baseUrl(""http://localhost:"" + this.port) .build(); } @Test public void getAllMessagesShouldBeOk() { client.get().uri(""/posts"").exchange() .expectStatus().isOk(); } } ",0 " <algo.h> - algo | Algo
                  • <algo.h> - algo

                  <algo.h> - algo

                  Includes all the Algo library More...

                  This file includes all the content of this library.

                  ",0 "sTable2 extends Migration { /** * Run the migrations. * * Here, we are adding a new column to the users table called ""age_range"" * * They types of values we store in here will be: * - under_18 * - 18_24 * - etc. * * @return void */ public function up() { Schema::table('users', function (Blueprint $table) { $table->string('age_range')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('users', function (Blueprint $table) { $table->dropColumn(['age_range']); }); } } ",0 " Samet Sait Talayhan 101044044 */ /** * @author talayhan * */ public class Family { // Data fields private Person father = null; private Person mother = null; private Person [] children; /** The current size of the children array */ private int size = 0; /** The current size of the array */ private final static int INITIAL_CAPACITY = 10; /** T */ private int capacity = INITIAL_CAPACITY; public static int numberOfFamilies = 0; /** * No parameter constructor. */ public Family(){ ++numberOfFamilies; //increase family number children = new Person [INITIAL_CAPACITY]; } /** * Two paramater constructor. */ public Family(Person father, Person mother){ if(father.getGender().equals(mother.getGender())){ throw new IllegalArgumentException(""Father and Mother should have different"" + "" gender!""); } this.father = father; this.mother = mother; children = new Person [INITIAL_CAPACITY]; ++numberOfFamilies; } /** * Allocate a new array to hold */ private void reallocate(){ capacity = capacity * 2; Person[] newArray = new Person[capacity]; System.arraycopy(children, 0, newArray, 0, children.length); children = newArray; } /** * Method at() returns the child at the given index. * @param int index * @return Person at the given index. */ public Person at(int index){ // Validty check if(index < 0 || index >= size){ throw new IndexOutOfBoundsException(""Invalid index!""); } return children[index]; } /** * Method add() that adds the Person as a child * to the family. * @param Person as a child. */ public void add(Person child){ if (size >= capacity) { reallocate(); } children[size] = child; ++size; } /* * Method compareTo() comparing two families, and * returns true if two families are equal. * @return boolean * @param Family object * **/ public boolean compareTo(Family other){ if(this.hashCode() == other.hashCode()){ return true; } return false; } /** * Override method toString() * @return String * */ public String toString(){ String s = ""\t\tFamily Informations\n""; s += ""Father: \n"" + father.toString(); s += ""Mother: \n"" + mother.toString(); for (int i = 0; i < size; i++) { s += ""Child"" + i + "":\n"" + children[i].toString(); } return s; } /** * Method isRelative() returns true if one of the persons is a * relative of the other by equals sirname the family array list. * @param get two person objects and family objects array * @return boolean type, true or false. * */ public static boolean isRelative(Person one, Person two, Family[] families){ if(one.getLastName() == two.getLastName()) return true; for (int i = 0; i < families.length; i++) { String comp = families[i].father.getLastName(); if(comp == one.getLastName() || comp == two.getLastName()){ return true; } } return false; } //Gettters and setters methods. public Person getFather() { return father; } public void setFather(Person father) { this.father = father; } public Person getMother() { return mother; } public void setMother(Person mother) { this.mother = mother; } public Person[] getChildren() { return children; } public void setChildren(Person[] children) { this.children = children; } public static int getNumberOfFamilies() { return numberOfFamilies; } // Actually, Java take cares of all clean up resources, // But we should decrease number of families in destructor, protected void finalize(){ --numberOfFamilies; } } ",0 "blic enum DigitalBookingExceptionCode { /** Error desconocido */ GENERIC_UNKNOWN_ERROR(0), /*** * CATALOG NULO */ CATALOG_ISNULL(1), /** * Paging Request Nulo */ PAGING_REQUEST_ISNULL(2), /** * Errores de persistencia */ PERSISTENCE_ERROR_GENERIC(3), PERSISTENCE_ERROR_NEW_OBJECT_FOUND_DURING_COMMIT(4), PERSISTENCE_ERROR_CATALOG_ALREADY_REGISTERED(5), PERSISTENCE_ERROR_CATALOG_NOT_FOUND(6), PERSISTENCE_ERROR_CATALOG_ALREADY_REGISTERED_WITH_ID_VISTA(7), PERSISTENCE_ERROR_WEEK_ALREADY_REGISTERED(8), /** * Errores de Administración de Catalogos */ THEATER_NUM_THEATER_ALREADY_EXISTS(9), CANNOT_DELETE_REGION(10), INEXISTENT_REGION(11), INVALID_TERRITORY(12), THEATER_IS_NULL(13), THEATER_IS_NOT_IN_ANY_REGION(14), THEATER_NOT_HAVE_SCREENS(15), INEXISTENT_THEATER(16), THEATER_IS_NOT_IN_ANY_CITY(17), THEATER_IS_NOT_IN_ANY_STATE(18), INVALID_SCREEN(19), INVALID_MOVIE_FORMATS(20), INVALID_SOUND_FORMATS(21), FILE_NULL(22), EVENT_MOVIE_NULL(23), /** * Errores de Administración de cines */ SCREEN_NUMBER_ALREADY_EXISTS(24), SCREEN_NEEDS_AT_LEAST_ONE_SOUND_FORMAT(25), SCREEN_NEEDS_AT_LEAST_ONE_MOVIE_FORMAT(26), DISTRIBUTOR_IS_ASSOCIATED_WITH_AN_EXISTING_MOVIE(27), CATEGORY_SOUND_FORMAT_IS_ASSOCIATED_WITH_AN_EXISTING_MOVIE(28), CATEGORY_SOUND_FORMAT_IS_ASSOCIATED_WITH_AN_EXISTING_SCREEN(29), CATEGORY_MOVIE_FORMAT_IS_ASSOCIATED_WITH_AN_EXISTING_MOVIE(30), CATEGORY_MOVIE_FORMAT_IS_ASSOCIATED_WITH_AN_EXISTING_SCREEN(31), CATEGORY_SCREEN_FORMAT_IS_ASSOCIATED_WITH_AN_EXISTING_SCREEN(39), SCREEN_NEEDS_SCREEN_FORMAT(32), MOVIE_NAME_BLANK(33), MOVIE_DISTRIBUTOR_NULL(35), MOVIE_COUNTRIES_EMPTY(36), MOVIE_DETAIL_EMPTY(37), MOVIE_IMAGE_NULL(38), /** * Booking errors */ BOOKING_PERSISTENCE_ERROR_STATUS_NOT_FOUND(40), BOOKING_PERSISTENCE_ERROR_EVENT_NOT_FOUND(41), BOOKING_PERSISTENCE_ERROR_THEATER_NOT_FOUND(42), BOOKING_PERSISTENCE_ERROR_WEEK_NOT_FOUND(43), BOOKING_PERSISTENCE_ERROR_BOOKING_NOT_FOUND(44), BOOKING_PERSISTENCE_ERROR_USER_NOT_FOUND(45), BOOKING_PERSISTENCE_ERROR_EVENT_TYPE_NOT_FOUND(46), BOOKING_PERSISTENCE_ERROR_AT_CONSULT_BOOKINGS(221), /** * Week errors */ WEEK_PERSISTENCE_ERROR_NOT_FOUND(50), /** * Observation errors */ NEWS_FEED_OBSERVATION_NOT_FOUND(51), BOOKING_OBSERVATION_NOT_FOUND2(52), OBSERVATION_NOT_FOUND(53), NEWS_FEED_OBSERVATION_ASSOCIATED_TO_ANOTHER_USER(103), /** * Email Errors */ EMAIL_DOES_NOT_COMPLIES_REGEX(54), EMAIL_IS_REPEATED(55), /** * Configuration Errors */ CONFIGURATION_ID_IS_NULL(60), CONFIGURATION_NAME_IS_NULL(61), CONFIGURATION_PARAMETER_NOT_FOUND(62), /** * Email Errors */ ERROR_SENDING_EMAIL_NO_DATA(70), ERROR_SENDING_EMAIL_NO_RECIPIENTS(71), ERROR_SENDING_EMAIL_SUBJECT(72), ERROR_SENDING_EMAIL_MESSAGE(73), /** * Booking errors */ BOOKING_IS_NULL(74), BOOKING_COPIES_IS_NULL(75), BOOKING_WEEK_NULL(76), BOOKING_EVENT_NULL(77), BOOKING_WRONG_STATUS_FOR_CANCELLATION(78), BOOKING_WRONG_STATUS_FOR_TERMINATION(79), BOOKING_THEATER_NEEDS_WEEK_ID(80), BOOKING_THEATER_NEEDS_THEATER_ID(81), BOOKING_NUMBER_COPIES_ZERO(82), BOOKING_NUM_SCREENS_GREATER_NUM_COPIES(83), BOOKING_CAN_NOT_BE_CANCELED(84), BOOKING_CAN_NOT_BE_TERMINATED(85), BOOKING_WRONG_STATUS_FOR_EDITION(86), ERROR_THEATER_HAS_NO_EMAIL(87), BOOKING_NUMBER_OF_COPIES_EXCEEDS_NUMBER_OF_SCREENS(88), BOOKING_NON_EDITABLE_WEEK(89), BOOKING_THEATER_REPEATED(90), BOOKING_IS_WEEK_ONE(91), BOOKING_THEATER_HAS_SCREEN_ZERO(92), BOOKING_MAXIMUM_COPY(93), BOOKING_NOT_SAVED_FOR_CANCELLATION(94), BOOKING_NOT_SAVED_FOR_TERMINATION(194), BOOKING_NOT_THEATERS_IN_REGION(196), BOOKING_NUMBER_OF_COPIES_EXCEEDS_NUMBER_OF_SCREENS_WHIT_THIS_FORMAT(195), BOOKING_NUM_SCREENS_GREATER_NUM_COPIES_NO_THEATER(95), BOOKING_SENT_CAN_NOT_BE_CANCELED(96), BOOKING_SENT_CAN_NOT_BE_TERMINATED(97), BOOKING_WITH_FOLLOWING_WEEK_CAN_NOT_BE_CANCELED(98), BOOKING_WITH_FOLLOWING_WEEK_CAN_NOT_BE_TERMINATED(99), /** * Report errors */ CREATE_XLSX_ERROR(100), BOOKING_THEATER_IS_NOT_ASSIGNED_TO_ANY_SCREEN(101), SEND_EMAIL_REGION_ERROR_CAN_ONLY_UPLOAD_UP_TO_TWO_FILES(102), /** * Security errors */ SECURITY_ERROR_USER_DOES_NOT_EXISTS(200), SECURITY_ERROR_PASSWORD_INVALID(201), SECURITY_ERROR_INVALID_USER(202), MENU_EXCEPTION(203), /** * UserErrors */ USER_IS_NULL(204), USER_USERNAME_IS_BLANK(205), USER_NAME_IS_BLANK(206), USER_LAST_NAME_IS_BLANK(207), USER_ROLE_IS_NULL(208), USER_EMAIL_IS_NULL(209), USER_THE_USERNAME_IS_DUPLICATE(210), USER_TRY_DELETE_OWN_USER(211), /** * Week errors */ WEEK_IS_NULL(212), WEEK_INVALID_NUMBER(213), WEEK_INVALID_YEAR(214), WEEK_INVALID_FINAL_DAY(215), /** * EventMovie errors */ EVENT_CODE_DBS_NULL(216), CATALOG_ALREADY_REGISTERED_WITH_DS_CODE_DBS(217), CATALOG_ALREADY_REGISTERED_WITH_SHORT_NAME(218), CANNOT_DELETE_WEEK(219), CANNOT_REMOVE_EVENT_MOVIE(220), /** * Income errors */ INCOMES_COULD_NOT_OBTAIN_DATABASE_PROPERTIES(300), INCOMES_DRIVER_ERROR(301), INCOMES_CONNECTION_ERROR(302), /** * SynchronizeErrors */ CANNOT_CONNECT_TO_SERVICE(500), /** * Transaction timeout */ TRANSACTION_TIMEOUT(501), /** * INVALID PARAMETERS FOR BOOKING PRE RELEASE */ INVALID_COPIES_PARAMETER(600), INVALID_DATES_PARAMETERS(601), INVALID_SCREEN_PARAMETER_CASE_ONE(602), INVALID_SCREEN_PARAMETER_CASE_TWO(603), INVALID_DATES_BEFORE_TODAY_PARAMETERS(604), INVALID_PRESALE_DATES_PARAMETERS(605), /** * VALIDATIONS FOR PRESALE IN BOOKING MOVIE */ ERROR_BOOKING_PRESALE_FOR_NO_PREMIERE(606), ERROR_BOOKING_PRESALE_FOR_ZERO_SCREEN(607), ERROR_BOOKING_PRESALE_NOT_ASSOCIATED_AT_BOOKING(608), /** * INVALID SELECTION OF PARAMETERS * TO APPLY IN SPECIAL EVENT */ INVALID_STARTING_DATES(617), INVALID_FINAL_DATES(618), INVALID_STARTING_AND_RELREASE_DATES(619), INVALID_THEATER_SELECTION(620), INVALID_SCREEN_SELECTION(621), BOOKING_THEATER_NULL(622), BOOKING_TYPE_INVALID(623), BOOKING_SPECIAL_EVENT_LIST_EMPTY(624), /** * Invalid datetime range for system log. */ LOG_FINAL_DATE_BEFORE_START_DATE(625), LOG_INVALID_DATE_RANGE(626), LOG_INVALID_TIME_RANGE(627), /** * Invavlid cityTO */ CITY_IS_NULL(628), CITY_HAS_NO_NAME(629), CITY_HAS_NO_COUNTRY(630), CITY_INVALID_LIQUIDATION_ID(631), PERSISTENCE_ERROR_CATALOG_ALREADY_REGISTERED_WITH_LIQUIDATION_ID(632) ; /** * Constructor interno * * @param id */ private DigitalBookingExceptionCode( int id ) { this.id = id; } private int id; /** * @return the id */ public int getId() { return id; } } ",0 " by javadoc (build 1.6.0_14) on Sun Nov 04 20:19:08 CET 2012 --> OESCompressedPalettedTexture (LWJGL API)
                  Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
                   PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
                  SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

                  org.lwjgl.opengles
                  Class OESCompressedPalettedTexture

                  java.lang.Object
                    org.lwjgl.opengles.OESCompressedPalettedTexture
                  

                  public final class OESCompressedPalettedTexture
                  extends java.lang.Object


                  Field Summary
                  static int GL_PALETTE4_R5_G6_B5_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                  static int GL_PALETTE4_RGB5_A1_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                  static int GL_PALETTE4_RGB8_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                  static int GL_PALETTE4_RGBA4_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                  static int GL_PALETTE4_RGBA8_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                  static int GL_PALETTE8_R5_G6_B5_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                  static int GL_PALETTE8_RGB5_A1_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                  static int GL_PALETTE8_RGB8_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                  static int GL_PALETTE8_RGBA4_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                  static int GL_PALETTE8_RGBA8_OES
                            Accepted by the <internalformat> paramter of CompressedTexImage2D
                   
                  Method Summary
                   
                  Methods inherited from class java.lang.Object
                  clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
                   

                  Field Detail

                  GL_PALETTE4_RGB8_OES

                  public static final int GL_PALETTE4_RGB8_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  GL_PALETTE4_RGBA8_OES

                  public static final int GL_PALETTE4_RGBA8_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  GL_PALETTE4_R5_G6_B5_OES

                  public static final int GL_PALETTE4_R5_G6_B5_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  GL_PALETTE4_RGBA4_OES

                  public static final int GL_PALETTE4_RGBA4_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  GL_PALETTE4_RGB5_A1_OES

                  public static final int GL_PALETTE4_RGB5_A1_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  GL_PALETTE8_RGB8_OES

                  public static final int GL_PALETTE8_RGB8_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  GL_PALETTE8_RGBA8_OES

                  public static final int GL_PALETTE8_RGBA8_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  GL_PALETTE8_R5_G6_B5_OES

                  public static final int GL_PALETTE8_R5_G6_B5_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  GL_PALETTE8_RGBA4_OES

                  public static final int GL_PALETTE8_RGBA4_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  GL_PALETTE8_RGB5_A1_OES

                  public static final int GL_PALETTE8_RGB5_A1_OES
                  Accepted by the <internalformat> paramter of CompressedTexImage2D

                  See Also:
                  Constant Field Values

                  Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
                   PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    
                  SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

                  Copyright © 2002-2009 lwjgl.org. All Rights Reserved. ",0 "t { function __construct() { // TODO: Is this the best way to do this? (Issue #4 at psignoret/aad-sso-codeigniter.) require_once(APPPATH . 'libraries/JWT/JWT.php'); require_once(APPPATH . 'libraries/JWT/BeforeValidException.php'); require_once(APPPATH . 'libraries/JWT/ExpiredException.php'); require_once(APPPATH . 'libraries/JWT/SignatureInvalidException.php'); } /** * Wrapper function for JWT::decode. */ public function decode($jwt, $key, $allowed_algs = array()) { return \Firebase\JWT\JWT::decode($jwt, $key, $allowed_algs); } } ",0 " //T2Ϊ1Tģʽ, ²¢Æô¶¯¶¨Ê±Æ÷2 page 470 AUXR |= 0x01; } unsigned int CheckRed() { unsigned int Red; TL0= tl0; TH0= th0; TH1= 0; TL1= 0; TCS_S2= 0; TCS_S3= 0;//Select Red Filter Delay5ms(); TR0= 1;//Timer 0 Start 10ms TR1= 1;//Counter 1 Start while(TF0==0) ;//Waitng for Timer0 overflow TF0= 0;//Clean Timer0 overflow flag TR0= 0;//Timer0 stop TR1= 0;//Counter0 stop Red= (unsigned long)(TH1*256+TL1);//*255/k_Red; return Red; } unsigned int CheckGreen() { unsigned int Green; TL0= tl0; TH0= th0; TH1= 0; TL1= 0; TCS_S2= 1; TCS_S3= 1;//Select Green Filter Delay5ms(); TR0= 1;//Timer 0 Start 10ms TR1= 1;//Counter 1 Start while(TF0==0) ;//Waitng for Timer0 overflow TF0= 0;//Clean Timer0 overflow flag TR0= 0;//Timer0 stop TR1= 0;//Counter0 stop Green= (unsigned long)(TH1*256+TL1);//*255/k_Green; return Green; } unsigned int CheckBlue() { unsigned int Blue; TL0= tl0; TH0= th0; TH1= 0; TL1= 0; TCS_S2= 0; TCS_S3= 1;//Select Blue Filter Delay5ms(); TR0= 1;//Timer 0 Start 10ms TR1= 1;//Counter 1 Start while(TF0==0) ;//Waitng for Timer0 overflow TF0= 0;//Clean Timer0 overflow flag TR0= 0;//Timer0 stop TR1= 0;//Counter0 stop Blue= (unsigned long)(TH1*256+TL1);//*255/k_Blue; return Blue; }",0 "po3conf/ext/wmdb_base_ewh/Resources/Public/img/favicon.ico"" type=""image/x-icon""> oh-my-zsh Präsentation von Php-Schulung Entwicklungshilfe

                  oh-my-zsh

                  Entwicklungshilfe

                  entwicklungshilfe.nrw / @help_for_devs / FB/entwicklungshilfe.nrw
                  Black White EH

                  Powerline font

                  https://github.com/powerline/fonts/blob/master/Meslo/Meslo%20LG%20L%20DZ%20Regular%20for%20Powerline.otf
                  press raw and install

                  ZSH installieren

                  https://github.com/robbyrussell/oh-my-zsh
                  curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
                  or
                  wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh

                  Installation

                  Solarized Theme

                  http://ethanschoonover.com/solarized/files/solarized.zip
                  unpack and in folder ""iterm2-colors-solarized"" the ""Solrized Dark.itermcolors"" double click

                  Installation

                  Open iTerm and pres ""cmd + ,"" at colors ""Load Presents"" dropdown ""Solarized dark"".

                  Installation

                  Set the new font

                  Installation

                  brew install fortune
                  brew install cowsay
                  vim .zshrc
                  ZSH_THEME=""agnoster""
                  plugins=(git jump jira osx z extract chucknorris history zsh-syntax-highlighting vi-mode web-search history-substring-search)
                  Iterm restart or open new tab. Enter this command
                  echo -e ""\ue0a0 \ue0a1 \ue0a2 \ue0b0 \ue0b1 \ue0b2""

                  Sources

                  Plugin wiki
                  https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
                  Cheatsheet
                  https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet

                  Directories

                  Alias Command
                  alias list all aliases
                  .. cd ..
                  ... cd ../..
                  .... cd ../../..
                  ..... cd ../../../..
                  / cd /
                  md mkdir -p
                  rd rmdir
                  d dirs -v (lists last used directories)
                  ~3 cd to dir -v 3

                  Usefull git alias

                  Alias Command
                  gst git status
                  gf git fetch
                  gl git pull
                  gp git push
                  gaa git add --all
                  gco git checkout
                  gcmsg git commit -m
                  gclean git clean -fd
                  gcb git checkout -b
                  gcm git checkout master

                  Jump plugin

                  Alias Command
                  mark mark actual folder with name as mark
                  mark yourname mark actual folder with yourname as mark
                  jump yourname jump to folder yourname
                  unmark yourname remove

                  OSX plugin

                  Command Description
                  tab open the current directory in a new tab
                  cdf cd to the current Finder directory

                  JIRA plugin

                  Command Description
                  jira Open new issue form in browser
                  jira ABC-123 Open issue in browser

                  History plugin

                  Alias Description
                  h List your command history. Equivalent to using history
                  hsi When called without an argument you will get help on grep arguments

                  Extract plugin

                  Alias Description
                  extract filename Extract any compressed filehistory

                  Questions?

                  Thanks

                  Follow us!

                  ",0 "t"" content=""width=device-width, initial-scale=1""> Aviso de Privacidad

                  Aviso de Privacidad


                  Nemosíntesis SC de RL, mejor conocido como La Caja Blanca, con domicilio en calle Río de la Plata 209, colonia Navarro, ciudad Torreón, municipio o delegación Torreón, C.P. 27010, en la entidad de Coahuila, país México, y portal de internet www.lacajablanca.mx, es el responsable del uso y protección de sus datos personales, y al respecto le informamos lo siguiente:

                  ¿Para qué fines utilizaremos sus datos personales?

                  Los datos personales que recabamos de usted, los utilizaremos para las siguientes finalidades que son necesarias para el servicio que solicita:

                  • Para verificar y confirmar su identidad
                  • Para entrega de productos a domicilio
                  • Para llevar a cabo encuestas de satisfacción
                  • Para informarle y/o contactarle con fines mercadológicos
                  • Para evaluar la calidad de los productos

                  De manera adicional, utilizaremos su información personal para las siguientes finalidades secundarias que no son necesarias para el servicio solicitado, pero que nos permiten y facilitan brindarle una mejor atención:

                  • Mercadotecnia o publicidad
                  • Prospección comercial

                  En caso de que no desee que sus datos personales se utilicen para estos fines secundarios, indíquelo por medio de un correo electrónico a sitiodelacaja@gmail.com con el mensaje:

                  No consiento que mis datos personales se utilicen para los fines de Mercadotecnia, publicidad o prospección comercial

                  La negativa para el uso de sus datos personales para estas finalidades no podrá ser un motivo para que le neguemos los servicios y productos que solicita o contrata con nosotros.

                  ¿Qué datos personales utilizaremos para estos fines?

                  Para llevar a cabo las finalidades descritas en el presente aviso de privacidad, utilizaremos los siguientes datos personales:
                  • Nombre
                  • Nombre de su pareja o cónyuge
                  • Estado Civil
                  • Fecha de nacimiento
                  • Fecha de matrimonio civil
                  • Domicilio
                  • Teléfono particular
                  • Teléfono celular
                  • Correo electrónico

                  ¿Con quién compartimos su información personal y para qué fines?

                  Le informamos que sus datos personales son compartidos dentro del país con empresas dedicadas al servicio de paquetería con la finalidad de hacer llegar los productos a su domicilio.

                  ¿Cómo puede acceder, rectificar o cancelar sus datos personales, u oponerse a su uso?

                  Usted tiene derecho a conocer qué datos personales tenemos de usted, para qué los utilizamos y las condiciones del uso que les damos (Acceso). Asimismo, es su derecho solicitar la corrección de su información personal en caso de que esté desactualizada, sea inexacta o incompleta (Rectificación); que la eliminemos de nuestros registros o bases de datos cuando considere que la misma no está siendo utilizada adecuadamente (Cancelación); así como oponerse al uso de sus datos personales para fines específicos (Oposición). Estos derechos se conocen como derechos ARCO.

                  Para el ejercicio de cualquiera de los derechos ARCO, usted deberá presentar la solicitud respectiva enviando un correo electrónico a sitiodelacaja@gmail.com

                  Para conocer el procedimiento y requisitos para el ejercicio de los derechos ARCO, ponemos a su disposición el siguiente medio: www.lacajablanca.mx/aviso-privacidad.html

                  Los datos de contacto de la persona o departamento de datos personales, que está a cargo de dar trámite a las solicitudes de derechos ARCO, son los siguientes:

                  a) Nombre de la persona o departamento de datos personales: Atención a Clientes La Caja Blanca
                  b) Domicilio: Calle Río de la Plata 2019, Colonia Navarro, Ciudad Torreón, C.P. 27010
                  c) Correo electrónico: sitiodelacaja@gmail.com
                  d) Número telefónico: 8717179849

                  Usted puede revocar el consentimiento que, en su caso, nos haya otorgado para el tratamiento de sus datos personales. Sin embargo, es importante que tenga en cuenta que no en todos los casos podremos atender su solicitud o concluir el uso de forma inmediata, ya que es posible que por alguna obligación legal requiramos seguir tratando sus datos personales. Asimismo, usted deberá considerar que para ciertos fines, la revocación de su consentimiento implicará que no le podamos seguir prestando el servicio que nos solicitó, o la conclusión de su relación con nosotros.

                  Para revocar su consentimiento deberá presentar su solicitud a través del siguiente medio: sitiodelacaja@gmail.com

                  Para conocer el procedimiento y requisitos para la revocación del consentimiento, ponemos a su disposición el siguiente medio: www.lacajablanca.mx/aviso-privacidad.html

                  ¿Cómo puede limitar el uso o divulgación de su información personal?

                  Con objeto de que usted pueda limitar el uso y divulgación de su información personal, le ofrecemos los siguientes medios: sitiodelacaja@gmail.com

                  Asimismo, usted se podrá inscribir a los siguientes registros, en caso de que no desee obtener publicidad de nuestra parte:

                  Registro Público para Evitar Publicidad, para mayor información consulte el portal de internet de la PROFECO
                  Registro Público de Usuarios, para mayor información consulte el portal de internet de la CONDUSEF.

                  ¿Cómo puede conocer los cambios en este aviso de privacidad?

                  El presente aviso de privacidad puede sufrir modificaciones, cambios o actualizaciones derivadas de nuevos requerimientos legals; de nuestras propias necesidades por los productos o servicios que ofrecemos; de nuestras prácticas de privacidad; de cambios en nuestro modelo de negocio, o por otras causas. Nos comprometemos a mantenerlo informado sobre los cambios que pueda sufrir el presente aviso de privacidad, a través de: www.lacajablanca.mx.

                  El procedimiento a través del cual se llevarán a cabo las notificaciones sobre cambios o actualizaciones al presente aviso de privacidad es el siguiente: a través de la página de internet www.lacajablanca.mx

                  Última actualización: 22/08/2017

                  ",0 " 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. */ package leap.orm.domain; import leap.lang.*; import leap.lang.annotation.Nullable; import leap.lang.enums.Bool; import leap.lang.expression.Expression; import leap.lang.jdbc.JdbcType; import leap.orm.generator.IdGenerator; import java.util.regex.Pattern; public class Domain implements Sourced,Named { private final Object source; private final String name; private final String defaultColumnName; private final JdbcType type; private final Integer length; private final Integer precision; private final Integer scale; private final Boolean nullable; private final String defaultValue; private final Boolean insert; private final Boolean update; private final Expression insertValue; private final Expression updateValue; private final Boolean filterable; private final Boolean sortable; private final Boolean filter; private final Expression filterValue; private final Expression filterIfValue; private final Float sortOrder; private final boolean autoMapping; private final IdGenerator idGenerator; public Domain(Object source, String name, String defaultColumnName, JdbcType type, Integer length, Integer precision, Integer scale, Boolean nullable, String defaultValue, Boolean insert, Expression insertValue, Boolean update, Expression updateValue, Boolean filterable, Boolean sortable, Boolean filter, Expression filterValue,Expression filterIfValue, Float sortOrder, boolean autoMapping, IdGenerator idGenerator) { Args.notEmpty(name,""name""); this.source = source; this.name = name; this.defaultColumnName = defaultColumnName; this.type = type; this.length = length; this.precision = precision; this.scale = scale; this.nullable = nullable; this.defaultValue = defaultValue; this.insert = insert; this.insertValue = insertValue; this.update = update; this.updateValue = updateValue; this.filterable = filterable; this.sortable = sortable; this.filter = filter; this.filterValue = filterValue; this.filterIfValue=filterIfValue; this.sortOrder = sortOrder; this.autoMapping = autoMapping; this.idGenerator = idGenerator; } @Override public Object getSource() { return source; } public String getName() { return name; } public String getDefaultColumnName() { return defaultColumnName; } public JdbcType getType() { return type; } public Integer getLength() { return length; } public Integer getPrecision() { return precision; } public Integer getScale() { return scale; } public Boolean getNullable() { return nullable; } public String getDefaultValue() { return defaultValue; } public Expression getInsertValue() { return insertValue; } public Boolean getInsert() { return insert; } public Boolean getUpdate() { return update; } public Expression getUpdateValue() { return updateValue; } public Boolean getFilterable() { return filterable; } public Boolean getSortable() { return sortable; } public Boolean getFilter() { return filter; } public Expression getFilterValue() { return filterValue; } public Float getSortOrder() { return sortOrder; } public boolean isAutoMapping() { return autoMapping; } public IdGenerator getIdGenerator() { return idGenerator; } @Override public String toString() { return ""Domain : "" + name; } public Expression getFilterIfValue() { return filterIfValue; } } ",0 "h"" #define DSP_DEVICE ""/dev/dsp"" #endif #ifdef IS_OBSD #include ""soundcard.h"" #define DSP_DEVICE ""/dev/sound"" #endif #ifdef IS_LINUX #include #define DSP_DEVICE ""/dev/dsp"" #endif #include ""defs.h"" #include ""pcm.h"" #include ""rc.h"" /* FIXME - all this code is VERY basic, improve it! */ struct pcm pcm; static int dsp; static char *dsp_device; static int stereo = 1; static int samplerate = 44100; static int sound = 1; rcvar_t pcm_exports[] = { RCV_BOOL(""sound"", &sound), RCV_INT(""stereo"", &stereo), RCV_INT(""samplerate"", &samplerate), RCV_INT(""oss_device"", &dsp_device), RCV_END }; void pcm_init() { int n; if (!sound) { pcm.hz = 11025; pcm.len = 4096; pcm.buf = malloc(pcm.len); pcm.pos = 0; dsp = -1; return; } if (!dsp_device) dsp_device = strdup(DSP_DEVICE); dsp = open(dsp_device, O_WRONLY); n = 0x80009; ioctl(dsp, SNDCTL_DSP_SETFRAGMENT, &n); n = AFMT_U8; ioctl(dsp, SNDCTL_DSP_SETFMT, &n); n = stereo; ioctl(dsp, SNDCTL_DSP_STEREO, &n); pcm.stereo = n; n = samplerate; ioctl(dsp, SNDCTL_DSP_SPEED, &n); pcm.hz = n; pcm.len = n / 60; pcm.buf = malloc(pcm.len); } void pcm_close() { if (pcm.buf) free(pcm.buf); memset(&pcm, 0, sizeof pcm); close(dsp); } int pcm_submit() { if (dsp < 0) { pcm.pos = 0; return 0; } if (pcm.buf) write(dsp, pcm.buf, pcm.pos); pcm.pos = 0; return 1; } ",0 "iv class=""mdj-card--photo"">
                  Hello!Welcome to my website.
                  ",0 "pragma once #include #include ""ManagedPacket.h"" #include ""WorldPacket.h"" namespace AscEmu::Packets { class CmsgQuestgiverRequestReward : public ManagedPacket { public: WoWGuid questgiverGuid; uint32_t questId; CmsgQuestgiverRequestReward() : CmsgQuestgiverRequestReward(0, 0) { } CmsgQuestgiverRequestReward(uint64_t questgiverGuid, uint32_t questId) : ManagedPacket(CMSG_QUESTGIVER_REQUEST_REWARD, 12), questgiverGuid(questgiverGuid), questId(questId) { } bool internalSerialise(WorldPacket& /*packet*/) override { return false; } bool internalDeserialise(WorldPacket& packet) override { uint64_t unpackedGuid; packet >> unpackedGuid >> questId; questgiverGuid.Init(unpackedGuid); return true; } }; } ",0 "NSES/README.md for more information. */ #pragma once #include #include #include ""RenderInfo.h"" #include ""utils/Geometry.h"" #include ""VideoShaders/ShaderFormats.h"" #include ""cores/IPlayer.h"" #include ""cores/VideoPlayer/Process/VideoBuffer.h"" #define MAX_FIELDS 3 #define NUM_BUFFERS 6 class CSetting; enum EFIELDSYNC { FS_NONE, FS_TOP, FS_BOT }; // Render Methods enum RenderMethods { RENDER_METHOD_AUTO = 0, RENDER_METHOD_GLSL, RENDER_METHOD_SOFTWARE, RENDER_METHOD_D3D_PS, RENDER_METHOD_DXVA, RENDER_OVERLAYS = 99 // to retain compatibility }; struct VideoPicture; class CRenderCapture; class CBaseRenderer { public: CBaseRenderer(); virtual ~CBaseRenderer(); // Player functions virtual bool Configure(const VideoPicture &picture, float fps, unsigned int orientation) = 0; virtual bool IsConfigured() = 0; virtual void AddVideoPicture(const VideoPicture &picture, int index) = 0; virtual bool IsPictureHW(const VideoPicture &picture) { return false; }; virtual void UnInit() = 0; virtual bool Flush(bool saveBuffers) { return false; }; virtual void SetBufferSize(int numBuffers) { } virtual void ReleaseBuffer(int idx) { } virtual bool NeedBuffer(int idx) { return false; } virtual bool IsGuiLayer() { return true; } // Render info, can be called before configure virtual CRenderInfo GetRenderInfo() { return CRenderInfo(); } virtual void Update() = 0; virtual void RenderUpdate(int index, int index2, bool clear, unsigned int flags, unsigned int alpha) = 0; virtual bool RenderCapture(CRenderCapture* capture) = 0; virtual bool ConfigChanged(const VideoPicture &picture) = 0; // Feature support virtual bool SupportsMultiPassRendering() = 0; virtual bool Supports(ERENDERFEATURE feature) { return false; }; virtual bool Supports(ESCALINGMETHOD method) = 0; virtual bool WantsDoublePass() { return false; }; void SetViewMode(int viewMode); /*! \brief Get video rectangle and view window \param source is original size of the video \param dest is the target rendering area honoring aspect ratio of source \param view is the entire target rendering area for the video (including black bars) */ void GetVideoRect(CRect &source, CRect &dest, CRect &view); float GetAspectRatio() const; static void SettingOptionsRenderMethodsFiller(std::shared_ptr setting, std::vector< std::pair > &list, int ¤t, void *data); void SetVideoSettings(const CVideoSettings &settings); protected: void CalcNormalRenderRect(float offsetX, float offsetY, float width, float height, float inputFrameRatio, float zoomAmount, float verticalShift); void CalculateFrameAspectRatio(unsigned int desired_width, unsigned int desired_height); virtual void ManageRenderArea(); virtual void ReorderDrawPoints(); virtual EShaderFormat GetShaderFormat(); void MarkDirty(); //@todo drop those void saveRotatedCoords();//saves the current state of m_rotatedDestCoords void syncDestRectToRotatedPoints();//sync any changes of m_destRect to m_rotatedDestCoords void restoreRotatedCoords();//restore the current state of m_rotatedDestCoords from saveRotatedCoords unsigned int m_sourceWidth = 720; unsigned int m_sourceHeight = 480; float m_sourceFrameRatio = 1.0f; float m_fps = 0.0f; unsigned int m_renderOrientation = 0; // orientation of the video in degrees counter clockwise // for drawing the texture with glVertex4f (holds all 4 corner points of the destination rect // with correct orientation based on m_renderOrientation // 0 - top left, 1 - top right, 2 - bottom right, 3 - bottom left CPoint m_rotatedDestCoords[4]; CPoint m_savedRotatedDestCoords[4];//saved points from saveRotatedCoords call CRect m_destRect; CRect m_sourceRect; CRect m_viewRect; // rendering flags unsigned m_iFlags = 0; AVPixelFormat m_format = AV_PIX_FMT_NONE; CVideoSettings m_videoSettings; }; ",0 " /*********************************************************************** * retro-205/webUI D205CardatronControl.html ************************************************************************ * Copyright (c) 2015, Paul Kimpel. * Licensed under the MIT License, see * http://www.opensource.org/licenses/mit-license.php ************************************************************************ * ElectroData/Burroughs Datatron 205 Cardatron Control page. ************************************************************************ * 2015-02-01 P.Kimpel * Original version, from D205ControlConsole.html. ***********************************************************************/ -->
                   
                  INPUT
                  SETUP
                   
                  GENERAL
                  CLEAR
                  ",0 "m developed by * Zurmo, Inc. Copyright (C) 2014 Zurmo Inc. * * Zurmo is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by the * Free Software Foundation with the addition of the following permission added * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK * IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * Zurmo is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive * Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com. * * The interactive user interfaces in original and modified versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the Zurmo * logo and Zurmo copyright notice. If the display of the logo is not reasonably * feasible for technical reasons, the Appropriate Legal Notices must display the words * ""Copyright Zurmo Inc. 2014. All rights reserved"". ********************************************************************************/ class MergeTagGuideAjaxLinkActionElement extends AjaxLinkActionElement { public function getActionType() { return 'MergeTagGuide'; } public function render() { $this->registerScript(); return parent::render(); } public function renderMenuItem() { $this->registerScript(); return parent::renderMenuItem(); } protected function getDefaultLabel() { return Zurmo::t('EmailTemplatesModule', 'MergeTag Guide'); } protected function getDefaultRoute() { return Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/mergeTagGuide/'); } protected function getAjaxOptions() { $parentAjaxOptions = parent::getAjaxOptions(); $modalViewAjaxOptions = ModalView::getAjaxOptionsForModalLink($this->getDefaultLabel()); if (!isset($this->params['ajaxOptions'])) { $this->params['ajaxOptions'] = array(); } return CMap::mergeArray($parentAjaxOptions, $modalViewAjaxOptions, $this->params['ajaxOptions']); } protected function getHtmlOptions() { $htmlOptionsInParams = parent::getHtmlOptions(); $defaultHtmlOptions = array('id' => 'mergetag-guide', 'class' => 'simple-link'); return CMap::mergeArray($defaultHtmlOptions, $htmlOptionsInParams); } protected function registerScript() { $eventHandlerName = get_class($this); $ajaxOptions = CMap::mergeArray($this->getAjaxOptions(), array('url' => $this->route)); if (Yii::app()->clientScript->isScriptRegistered($eventHandlerName)) { return; } else { Yii::app()->clientScript->registerScript($eventHandlerName, "" function "". $eventHandlerName .""() { "" . ZurmoHtml::ajax($ajaxOptions)."" } "", CClientScript::POS_HEAD); } return $eventHandlerName; } } ?>",0 "lumns in table 'THEME_MANAGEMENT': * @property string $PID * @property string $THEME */ class Theme_Management extends CActiveRecord { /** * Returns the static model of the specified AR class. * @param string $className active record class name. * @return Theme_Management the static model class */ public static function model($className=__CLASS__) { return parent::model($className); } /** * @return string the associated database table name */ public function tableName() { return 'THEME_MANAGEMENT'; } /** * @return array validation rules for model attributes. */ public function rules() { // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( array('THEME', 'length', 'max'=>20), // The following rule is used by search(). // Please remove those attributes that should not be searched. array('USER_ID,ID, THEME', 'safe', 'on'=>'search'), ); } /** * @return array relational rules. */ public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( ); } /** * @return array customized attribute labels (name=>label) */ public function attributeLabels() { return array( 'USER_ID' => 'Userid', 'THEME' => 'Theme', ); } /** * Retrieves a list of models based on the current search/filter conditions. * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. */ public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('USER_ID',$this->USER_ID,true); $criteria->compare('THEME',$this->THEME,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); } }",0 "work for additional information regarding * copyright ownership. The ASF licenses this file to You 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. */ package org.apache.geode.management.internal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.logging.log4j.Logger; import org.apache.geode.annotations.internal.MakeNotStatic; import org.apache.geode.distributed.DistributedSystemDisconnectedException; import org.apache.geode.distributed.internal.InternalDistributedSystem; import org.apache.geode.internal.cache.InternalCache; import org.apache.geode.internal.cache.InternalCacheForClientAccess; import org.apache.geode.logging.internal.log4j.api.LogService; import org.apache.geode.management.ManagementService; /** * Super class to all Management Service * * @since GemFire 7.0 */ public abstract class BaseManagementService extends ManagementService { private static final Logger logger = LogService.getLogger(); /** * The main mapping between different resources and Service instance Object can be Cache */ @MakeNotStatic protected static final Map instances = new HashMap(); /** List of connected DistributedSystems */ @MakeNotStatic private static final List systems = new ArrayList(1); /** Protected constructor. */ protected BaseManagementService() {} // Static block to initialize the ConnectListener on the System static { initInternalDistributedSystem(); } /** * This method will close the service. Any operation on the service instance will throw exception */ protected abstract void close(); /** * This method will close the service. Any operation on the service instance will throw exception */ protected abstract boolean isClosed(); /** * Returns a ManagementService to use for the specified Cache. * * @param cache defines the scope of resources to be managed */ public static ManagementService getManagementService(InternalCacheForClientAccess cache) { synchronized (instances) { BaseManagementService service = instances.get(cache); if (service == null) { service = SystemManagementService.newSystemManagementService(cache); instances.put(cache, service); } return service; } } public static ManagementService getExistingManagementService(InternalCache cache) { synchronized (instances) { BaseManagementService service = instances.get(cache.getCacheForProcessingClientRequests()); return service; } } /** * Initialises the distributed system listener */ private static void initInternalDistributedSystem() { synchronized (instances) { // Initialize our own list of distributed systems via a connect listener @SuppressWarnings(""unchecked"") List existingSystems = InternalDistributedSystem .addConnectListener(new InternalDistributedSystem.ConnectListener() { @Override public void onConnect(InternalDistributedSystem sys) { addInternalDistributedSystem(sys); } }); // While still holding the lock on systems, add all currently known // systems to our own list for (InternalDistributedSystem sys : existingSystems) { try { if (sys.isConnected()) { addInternalDistributedSystem(sys); } } catch (DistributedSystemDisconnectedException e) { if (logger.isDebugEnabled()) { logger.debug(""DistributedSystemDisconnectedException {}"", e.getMessage(), e); } } } } } /** * Add an Distributed System and adds a Discon Listener */ private static void addInternalDistributedSystem(InternalDistributedSystem sys) { synchronized (instances) { sys.addDisconnectListener(new InternalDistributedSystem.DisconnectListener() { @Override public String toString() { return ""Disconnect listener for BaseManagementService""; } @Override public void onDisconnect(InternalDistributedSystem ss) { removeInternalDistributedSystem(ss); } }); systems.add(sys); } } /** * Remove a Distributed System from the system lists. If list is empty it closes down all the * services if not closed */ private static void removeInternalDistributedSystem(InternalDistributedSystem sys) { synchronized (instances) { systems.remove(sys); if (systems.isEmpty()) { for (Object key : instances.keySet()) { BaseManagementService service = (BaseManagementService) instances.get(key); try { if (!service.isClosed()) { // Service close method should take care of the cleaning up // activities service.close(); } } catch (Exception e) { if (logger.isDebugEnabled()) { logger.debug(""ManagementException while removing InternalDistributedSystem {}"", e.getMessage(), e); } } } instances.clear(); } } } } ",0 "meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />

                  Päivitä-nappi

                  Jaetussa ohjelmistoympäristössä, kuten CKFinder, voi työskennellä useita käyttäjiä yhtä aikaa. Tällöin yhteisessä kansiossa oleviin tiedostoihin voi tulla lähes samanaikaisia muutoksia. Saat muutokset näkyviin ""Päivitä""-toiminnolla.

                   

                  Oletetaan, että luot uuden sivun yrityksenne tuliterälle tuotteelle. Avaat CKFinderin ladataksesi tuotekuvan tekemällesi sivulle. Mutta avatessasi ""Tuotteet""-kansiota, kuvaa ei löydykään. Pirautat ""Maikille"", ja ihmettelet, mihin kuvat ovat kadonneet. Maikki pyytää odottamaan tovin ja lataa kuvan palvelimelle. Sitten hän kehottaa sinua päivittämään kansiorakenteesi. Ja voila! Siellähän kuva näkyykin. ",0 "** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 2 or version 3 of the ** License. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program. If not, see . */ #include #include #include #include #include ""dsp.h"" #include ""common.h"" #include ""audiotools.h"" #include ""pa_play.h"" sf_count_t at_audio_processor(SNDFILE *infile, SNDFILE *outfile) { sf_count_t count = 0, frames_read = 0; SF_INFO info; pa_simple *pa_server = NULL; size_t noverlap, nslide; double *multi_data, *prev_multi_data; size_t window_size = 0; int fft_size = 0; int pa_error; float *pulse_data = NULL; sf_command(infile, SFC_GET_CURRENT_SF_INFO, &info, sizeof(info)); // compute correction in output sampling frequency int input_samplerate = info.samplerate; int output_samplerate = (int) (floor(info.samplerate * at_get_playback_speed())); info.samplerate = output_samplerate; // get max. amount of output channels needed -- because of memory allocation int max_channel_count = info.channels > at_get_out_channels() ? info.channels : at_get_out_channels(); // calculate optimal values for window size and FFT size at_calc_window_and_fft_size(&window_size, &fft_size, at_get_frame_duration(), input_samplerate); noverlap = (size_t) floor(window_size * at_get_overlap() / 100); nslide = window_size - noverlap; multi_data = init_buffer_dbl(window_size * max_channel_count); prev_multi_data = init_buffer_dbl(noverlap * max_channel_count); // output file not specified, initialize sound server if (at_get_out_file() == NULL) { pa_server = at_pulse_init(at_get_out_channels(), output_samplerate); pulse_data = malloc(sizeof(*pulse_data) * nslide * max_channel_count); if (pulse_data == NULL) { puts(""malloc() failed. Exiting.""); exit(1); } } // initialize FFT library at_fftw_init(fft_size); // internal representation for separated audio channels in time domain audio_container_t *audio_data_td = at_allocate_buffer(at_get_out_channels(), window_size, input_samplerate); // internal representation for separated audio channels in frequency domain audio_container_t *audio_data_fft = at_allocate_buffer(at_get_out_channels(), (size_t) fft_size, input_samplerate); // internal representation for data required for add-and-overlap method of audio reconstruction audio_container_t *audio_data_old = at_allocate_buffer(at_get_out_channels(), nslide, input_samplerate); /* Implementation of Add-And-Overlap method for joining of adjacent audio frames; * overlap of frames is specified as a parameter in range <0 - 99>, default value * is overlap equal to 50 percent. */ do { if (frames_read == 0) { if ((count = sf_readf_double(infile, multi_data, (sf_count_t) window_size)) <= 0) exit(1); memcpy((void *) prev_multi_data, (void *) (multi_data + nslide * info.channels), sizeof(*multi_data) * noverlap * info.channels); } else { count = sf_readf_double(infile, (multi_data + noverlap * info.channels), (sf_count_t) nslide); memcpy((void *) multi_data, (void *) prev_multi_data, sizeof(*prev_multi_data) * noverlap * info.channels); memcpy((void *) prev_multi_data, (void *) (multi_data + nslide * info.channels), sizeof(*multi_data) * noverlap * info.channels); } frames_read += count; // print time into console printf(""Time: %s"", show_time(input_samplerate, (int) frames_read)); puts(""\033[1A""); // separate channels to at_container struct at_separate_channels(multi_data, audio_data_td, info.channels); // basic channel interleaving to create multichannel matrix at_interleave_audio(audio_data_td, info.channels, fft_size); // if volume change was set, apply new volume setting if (at_get_volume() != 1.0) at_audio_gain(audio_data_td, at_get_volume()); // apply window function to data apply_window(audio_data_td, window_size); // FFT transform for (int i = 0; i < MAX_CHANNELS; i++) at_compute_fft(audio_data_td->channel[i], window_size, audio_data_fft->channel[i]); // inverse FFT transform for (int i = 0; i < MAX_CHANNELS; i++) { at_compute_ifft(audio_data_fft->channel[i], window_size, audio_data_td->channel[i]); // overlap for (int j = 0; j < nslide; j++) { audio_data_td->channel[i][j] += audio_data_old->channel[i][j]; audio_data_old->channel[i][j] = audio_data_td->channel[i][j + noverlap]; } } // combine channels from at_container struct at_combine_channels(multi_data, audio_data_td, at_get_out_channels()); // check if output file was specified if (at_get_out_file()) sf_writef_double(outfile, multi_data, (sf_count_t) nslide); else { // convert data from double into float for (int i = 0; i < nslide * max_channel_count; i++) { pulse_data[i] = (float) multi_data[i]; } /* play content of buffer via PA server */ if (pa_simple_write(pa_server, pulse_data, sizeof(float) * nslide * max_channel_count, &pa_error) < 0) { fprintf(stderr, __FILE__"": pa_simple_write() failed: %s\n"", pa_strerror(pa_error)); exit(1); } } } while (count > 0); /* Make sure that every single sample was played */ if (pa_server != NULL && pa_simple_drain(pa_server, &pa_error) < 0) { fprintf(stderr, __FILE__"": pa_simple_drain() failed: %s\n"", pa_strerror(pa_error)); exit(1); } // insert new line puts(""\n""); // free memory free(multi_data); free(prev_multi_data); at_free_buffer(audio_data_td); at_free_buffer(audio_data_old); at_free_buffer(audio_data_fft); sf_close(outfile); sf_close(infile); at_fftw_free(); if (pa_server != NULL) { pa_simple_free(pa_server); } if (pulse_data != NULL) free(pulse_data); return count; } audio_container_t *at_allocate_buffer(int channels, size_t size, int samplerate) { if (size <= 0) { puts(""Size of audio buffer not defined, exiting.""); exit(1); } audio_container_t *buffer = malloc(sizeof(*buffer) * size); if (buffer == NULL) { fprintf(stdout, ""\nError: malloc() failed: %s\n"", strerror(errno)); exit(1); } memset(buffer, 0, sizeof(*buffer)); buffer->length = size; buffer->used_channels = channels; buffer->samplerate = samplerate; for (int i = 0; i < MAX_CHANNELS; ++i) { buffer->channel[i] = init_buffer_dbl(size); } return buffer; } int at_free_buffer(audio_container_t *buffer) { for (int i = 0; i < MAX_CHANNELS; ++i) free(buffer->channel[i]); free(buffer); return 0; } /* separate_channels */ int at_separate_channels(double *multi_data, audio_container_t *container, int input_channels) { if (input_channels > MAX_CHANNELS) { puts(""Processing of multichannel audio with more that 6 channels is not supported.""); exit(1); } int i, j; for (i = 0; i < input_channels; i++) { for (j = 0; j < container->length; j++) { container->channel[i][j] = multi_data[j * input_channels + i]; } } return 0; } /* combine_channels */ int at_combine_channels(double *multi_data, audio_container_t *container, int output_channels) { if (output_channels > MAX_CHANNELS) { puts(""Processing of multichannel audio with more that 6 channels is not supported.""); exit(1); } double *tmp = NULL; // if LFE only is enabled, map LFE to FL channel (first available) if (at_get_lfe_only_setting() == true) { tmp = container->channel[FL]; container->channel[FL] = container->channel[LFE]; container->channel[LFE] = tmp; } // fix proper storage of 4-channel audio to be 2F/2R format if (output_channels == 4) { tmp = container->channel[C]; container->channel[C] = container->channel[SL]; container->channel[SL] = tmp; tmp = container->channel[LFE]; container->channel[LFE] = container->channel[SR]; container->channel[SR] = tmp; } // fix proper storage of 5-channel audio to be 3F/2R format if (output_channels == 5) { tmp = container->channel[LFE]; container->channel[LFE] = container->channel[SL]; container->channel[SL] = tmp; } int i, j; for (i = 0; i < output_channels; i++) { for (j = 0; j < container->length; j++) { multi_data[j * output_channels + i] = container->channel[i][j]; } } return 0; } // simple audio upmix void at_interleave_audio(audio_container_t *container, int input_channels, int fft_size) { // input is mono file, copy left channel to right if (input_channels == 1) { memcpy(container->channel[FR], container->channel[FL], container->length); input_channels++; } /* input is stereo or quadraphonic file (FL, FR, SL, SR), create center * channel with combination of left and right channel; decrease * volume by 50 percent */ if (input_channels == 2 || input_channels == 4) { for (int i = 0; i < container->length; i++) { container->channel[C][i] = (container->channel[FL][i] + container->channel[FR][i]) / 4.0; } if (input_channels == 2) input_channels++; } /* input is 3-channel file (FL, FR, C); create 5-channel file with SL and SR channels */ if (input_channels == 3) { for (int i = 0; i < container->length; i++) { container->channel[SL][i] = container->channel[FL][i] * 0.2; container->channel[SR][i] = container->channel[FR][i] * 0.2; } input_channels += 2; } /* create mono file from all these channels and save this into LFE buffer */ if (input_channels == 5) { for (int i = 0; i < container->length; i++) { container->channel[LFE][i] = (container->channel[FL][i] + container->channel[FR][i] + container->channel[C][i] + container->channel[SL][i] + container->channel[SR][i]) / 5.0; } at_create_lfe(container, container->samplerate, fft_size); } } /* multiply audio_container data with some gain */ void at_audio_gain(audio_container_t *container, double gain) { // if volume settings were set if (gain != 1.0) { for (int ch = 0; ch < 6; ch++) for (int i = 0; i < container->length; i++) container->channel[ch][i] *= gain; } } /* apply_window */ int apply_window(audio_container_t *container, size_t datalen) { for (int i = 0; i < MAX_CHANNELS; i++) { for (size_t j = 0; j < datalen; j++) { container->channel[i][j] *= (j <= datalen - 1) ? 0.54 - 0.46 * cos(2 * M_PI * j / (datalen - 1)) : 0; } } return 0; } // create LFE channel void at_create_lfe(audio_container_t *container, int sampling_freq, int fft_size) { // create temporary variables double *buffer = init_buffer_dbl((size_t) fft_size); double *y_ps = init_buffer_dbl((size_t) fft_size / 2 + 1); /* power spectrum */ double *y_phase = init_buffer_dbl((size_t) fft_size / 2 + 1); /* phase */ // FFT at_compute_fft(container->channel[LFE], container->length, buffer); calc_magnitude(buffer, fft_size, y_ps); calc_phase(buffer, fft_size, y_phase); // calculate cut-off sample int n_freq = (int) ceil((2 * CUTOFF_FREQ * ((fft_size / 2.0) - 1) / sampling_freq)); for (int i = n_freq; i < fft_size / 2 + 1; i++) y_ps[i] = 0; // recreate frequency spectrum from magnitude and phase calc_fft_complex_data(y_ps, y_phase, fft_size, buffer); // IFFT at_compute_ifft(buffer, container->length, container->channel[LFE]); // cleanup free(buffer); free(y_ps); free(y_phase); } ",0 "6-2015 Squiz Pty Ltd (ABN 77 084 670 600) * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence */ namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS; use PHP_CodeSniffer\Sniffs\Sniff; use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Util\Tokens; class DuplicateClassDefinitionSniff implements Sniff { /** * A list of tokenizers this sniff supports. * * @var array */ public $supportedTokenizers = array('CSS'); /** * Returns the token types that this sniff is interested in. * * @return int[] */ public function register() { return array(T_OPEN_TAG); }//end register() /** * Processes the tokens that this sniff is interested in. * * @param \PHP_CodeSniffer\Files\File $phpcsFile The file where the token was found. * @param int $stackPtr The position in the stack where * the token was found. * * @return void */ public function process(File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); // Find the content of each class definition name. $classNames = array(); $next = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($stackPtr + 1)); if ($next === false) { // No class definitions in the file. return; } // Save the class names in a ""scope"", // to prevent false positives with @media blocks. $scope = 'main'; $find = array( T_CLOSE_CURLY_BRACKET, T_OPEN_CURLY_BRACKET, T_COMMENT, T_OPEN_TAG, ); while ($next !== false) { $prev = $phpcsFile->findPrevious($find, ($next - 1)); // Check if an inner block was closed. $beforePrev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($prev - 1), null, true); if ($beforePrev !== false && $tokens[$beforePrev]['code'] === T_CLOSE_CURLY_BRACKET ) { $scope = 'main'; } // Create a sorted name for the class so we can compare classes // even when the individual names are all over the place. $name = ''; for ($i = ($prev + 1); $i < $next; $i++) { $name .= $tokens[$i]['content']; } $name = trim($name); $name = str_replace(""\n"", ' ', $name); $name = preg_replace('|[\s]+|', ' ', $name); $name = str_replace(', ', ',', $name); $names = explode(',', $name); sort($names); $name = implode(',', $names); if ($name{0} === '@') { // Media block has its own ""scope"". $scope = $name; } else if (isset($classNames[$scope][$name]) === true) { $first = $classNames[$scope][$name]; $error = 'Duplicate class definition found; first defined on line %s'; $data = array($tokens[$first]['line']); $phpcsFile->addError($error, $next, 'Found', $data); } else { $classNames[$scope][$name] = $next; } $next = $phpcsFile->findNext(T_OPEN_CURLY_BRACKET, ($next + 1)); }//end while }//end process() }//end class ",0 "ame=""description"" content=""IndexRange - ScalaFX API 8.0.0 - R4 - scalafx.scene.control.IndexRange"" />

                  object IndexRange

                  Linear Supertypes
                  AnyRef, Any
                  Ordering
                  1. Alphabetic
                  2. By inheritance
                  Inherited
                  1. IndexRange
                  2. AnyRef
                  3. Any
                  Visibility
                  1. Public
                  2. All

                  Value Members

                  1. final def !=(arg0: Any): Boolean

                    Definition Classes
                    AnyRef → Any
                  2. final def ##(): Int

                    Definition Classes
                    AnyRef → Any
                  3. final def ==(arg0: Any): Boolean

                    Definition Classes
                    AnyRef → Any
                  4. val VALUE_DELIMITER: String

                    Index range value delimiter.

                  5. final def asInstanceOf[T0]: T0

                    Definition Classes
                    Any
                  6. def clone(): AnyRef

                    Attributes
                    protected[java.lang]
                    Definition Classes
                    AnyRef
                    Annotations
                    @throws( ... )
                  7. final def eq(arg0: AnyRef): Boolean

                    Definition Classes
                    AnyRef
                  8. def equals(arg0: Any): Boolean

                    Definition Classes
                    AnyRef → Any
                  9. def finalize(): Unit

                    Attributes
                    protected[java.lang]
                    Definition Classes
                    AnyRef
                    Annotations
                    @throws( classOf[java.lang.Throwable] )
                  10. final def getClass(): Class[_]

                    Definition Classes
                    AnyRef → Any
                  11. def hashCode(): Int

                    Definition Classes
                    AnyRef → Any
                  12. final def isInstanceOf[T0]: Boolean

                    Definition Classes
                    Any
                  13. final def ne(arg0: AnyRef): Boolean

                    Definition Classes
                    AnyRef
                  14. def normalize(v1: Int, v2: Int): IndexRange

                    Convenience method to create an IndexRange instance that has the smaller value as the start index, and the larger value as the end index.

                  15. final def notify(): Unit

                    Definition Classes
                    AnyRef
                  16. final def notifyAll(): Unit

                    Definition Classes
                    AnyRef
                  17. implicit def sfxIndexRange(r: IndexRange): javafx.scene.control.IndexRange

                  18. final def synchronized[T0](arg0: ⇒ T0): T0

                    Definition Classes
                    AnyRef
                  19. def toString(): String

                    Definition Classes
                    AnyRef → Any
                  20. def valueOf(value: String): IndexRange

                    Convenience method to parse in a String of the form '2,6', which will create an IndexRange instance with a start value of 2, and an end value of 6.

                  21. final def wait(): Unit

                    Definition Classes
                    AnyRef
                    Annotations
                    @throws( ... )
                  22. final def wait(arg0: Long, arg1: Int): Unit

                    Definition Classes
                    AnyRef
                    Annotations
                    @throws( ... )
                  23. final def wait(arg0: Long): Unit

                    Definition Classes
                    AnyRef
                    Annotations
                    @throws( ... )

                  Inherited from AnyRef

                  Inherited from Any

                  Ungrouped

                  ",0 ": Thu Jan 30 17:04:41 2014 ** by: Qt User Interface Compiler version 4.8.2 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef UI_MAINWINDOW_H #define UI_MAINWINDOW_H #include #include #include #include #include #include #include #include #include #include #include #include #include QT_BEGIN_NAMESPACE class Ui_MainWindow { public: QWidget *widget_principal; QTabWidget *Onglet; QWidget *vol_immersif; QPushButton *VideoStreaming; QPushButton *emergency_stop; QWidget *gridLayoutWidget; QGridLayout *cameralayout; QWidget *gridLayoutWidget_4; QGridLayout *maplayout; QPushButton *Photo; QWidget *gridLayoutWidget_6; QGridLayout *batterylayout; QWidget *gridLayoutWidget_7; QGridLayout *batterylayout_2; QLabel *Name; QLabel *Name_2; QFrame *line_2; QWidget *gridLayoutWidget_9; QGridLayout *powerlayout4; QWidget *gridLayoutWidget_10; QGridLayout *powerlayout3; QWidget *gridLayoutWidget_11; QGridLayout *powerlayout2; QWidget *gridLayoutWidget_12; QGridLayout *powerlayout1; QLabel *Name_3; QWidget *vol_vue; QPushButton *emergency_stop_2; QWidget *gridLayoutWidget_2; QGridLayout *horizon_layout; QWidget *gridLayoutWidget_5; QGridLayout *maplayout2; QWidget *gridLayoutWidget_3; QGridLayout *batterylayout2; QWidget *gridLayoutWidget_8; QGridLayout *batterylayout2_2; QLabel *Name2; QLabel *Name2_2; QFrame *line; QWidget *gridLayoutWidget_13; QGridLayout *powerlayout4_2; QWidget *gridLayoutWidget_14; QGridLayout *powerlayout3_2; QWidget *gridLayoutWidget_15; QGridLayout *powerlayout2_2; QWidget *gridLayoutWidget_16; QGridLayout *powerlayout1_2; QLabel *Name_4; QMenuBar *menuBar; void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) MainWindow->setObjectName(QString::fromUtf8(""MainWindow"")); MainWindow->setEnabled(true); MainWindow->resize(1000, 580); MainWindow->setMinimumSize(QSize(966, 0)); widget_principal = new QWidget(MainWindow); widget_principal->setObjectName(QString::fromUtf8(""widget_principal"")); Onglet = new QTabWidget(widget_principal); Onglet->setObjectName(QString::fromUtf8(""Onglet"")); Onglet->setGeometry(QRect(0, 0, 1000, 560)); Onglet->setLayoutDirection(Qt::LeftToRight); Onglet->setAutoFillBackground(false); Onglet->setTabPosition(QTabWidget::North); Onglet->setTabShape(QTabWidget::Rounded); Onglet->setElideMode(Qt::ElideLeft); Onglet->setDocumentMode(false); Onglet->setTabsClosable(false); Onglet->setMovable(true); vol_immersif = new QWidget(); vol_immersif->setObjectName(QString::fromUtf8(""vol_immersif"")); VideoStreaming = new QPushButton(vol_immersif); VideoStreaming->setObjectName(QString::fromUtf8(""VideoStreaming"")); VideoStreaming->setGeometry(QRect(30, 480, 361, 31)); emergency_stop = new QPushButton(vol_immersif); emergency_stop->setObjectName(QString::fromUtf8(""emergency_stop"")); emergency_stop->setGeometry(QRect(760, 480, 221, 31)); emergency_stop->setAutoDefault(false); gridLayoutWidget = new QWidget(vol_immersif); gridLayoutWidget->setObjectName(QString::fromUtf8(""gridLayoutWidget"")); gridLayoutWidget->setGeometry(QRect(10, 0, 681, 471)); cameralayout = new QGridLayout(gridLayoutWidget); cameralayout->setSpacing(6); cameralayout->setContentsMargins(11, 11, 11, 11); cameralayout->setObjectName(QString::fromUtf8(""cameralayout"")); cameralayout->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_4 = new QWidget(vol_immersif); gridLayoutWidget_4->setObjectName(QString::fromUtf8(""gridLayoutWidget_4"")); gridLayoutWidget_4->setGeometry(QRect(740, 200, 241, 221)); maplayout = new QGridLayout(gridLayoutWidget_4); maplayout->setSpacing(6); maplayout->setContentsMargins(11, 11, 11, 11); maplayout->setObjectName(QString::fromUtf8(""maplayout"")); maplayout->setContentsMargins(0, 0, 0, 0); Photo = new QPushButton(vol_immersif); Photo->setObjectName(QString::fromUtf8(""Photo"")); Photo->setGeometry(QRect(420, 480, 191, 31)); gridLayoutWidget_6 = new QWidget(vol_immersif); gridLayoutWidget_6->setObjectName(QString::fromUtf8(""gridLayoutWidget_6"")); gridLayoutWidget_6->setGeometry(QRect(870, 80, 121, 41)); batterylayout = new QGridLayout(gridLayoutWidget_6); batterylayout->setSpacing(6); batterylayout->setContentsMargins(11, 11, 11, 11); batterylayout->setObjectName(QString::fromUtf8(""batterylayout"")); batterylayout->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_7 = new QWidget(vol_immersif); gridLayoutWidget_7->setObjectName(QString::fromUtf8(""gridLayoutWidget_7"")); gridLayoutWidget_7->setGeometry(QRect(870, 130, 121, 41)); batterylayout_2 = new QGridLayout(gridLayoutWidget_7); batterylayout_2->setSpacing(6); batterylayout_2->setContentsMargins(11, 11, 11, 11); batterylayout_2->setObjectName(QString::fromUtf8(""batterylayout_2"")); batterylayout_2->setContentsMargins(0, 0, 0, 0); Name = new QLabel(vol_immersif); Name->setObjectName(QString::fromUtf8(""Name"")); Name->setGeometry(QRect(770, 100, 81, 21)); Name_2 = new QLabel(vol_immersif); Name_2->setObjectName(QString::fromUtf8(""Name_2"")); Name_2->setGeometry(QRect(770, 150, 81, 21)); line_2 = new QFrame(vol_immersif); line_2->setObjectName(QString::fromUtf8(""line_2"")); line_2->setGeometry(QRect(710, 20, 20, 471)); line_2->setFrameShape(QFrame::VLine); line_2->setFrameShadow(QFrame::Sunken); gridLayoutWidget_9 = new QWidget(vol_immersif); gridLayoutWidget_9->setObjectName(QString::fromUtf8(""gridLayoutWidget_9"")); gridLayoutWidget_9->setGeometry(QRect(940, 10, 20, 51)); powerlayout4 = new QGridLayout(gridLayoutWidget_9); powerlayout4->setSpacing(6); powerlayout4->setContentsMargins(11, 11, 11, 11); powerlayout4->setObjectName(QString::fromUtf8(""powerlayout4"")); powerlayout4->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_10 = new QWidget(vol_immersif); gridLayoutWidget_10->setObjectName(QString::fromUtf8(""gridLayoutWidget_10"")); gridLayoutWidget_10->setGeometry(QRect(920, 20, 20, 41)); powerlayout3 = new QGridLayout(gridLayoutWidget_10); powerlayout3->setSpacing(6); powerlayout3->setContentsMargins(11, 11, 11, 11); powerlayout3->setObjectName(QString::fromUtf8(""powerlayout3"")); powerlayout3->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_11 = new QWidget(vol_immersif); gridLayoutWidget_11->setObjectName(QString::fromUtf8(""gridLayoutWidget_11"")); gridLayoutWidget_11->setGeometry(QRect(900, 30, 20, 31)); powerlayout2 = new QGridLayout(gridLayoutWidget_11); powerlayout2->setSpacing(6); powerlayout2->setContentsMargins(11, 11, 11, 11); powerlayout2->setObjectName(QString::fromUtf8(""powerlayout2"")); powerlayout2->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_12 = new QWidget(vol_immersif); gridLayoutWidget_12->setObjectName(QString::fromUtf8(""gridLayoutWidget_12"")); gridLayoutWidget_12->setGeometry(QRect(880, 40, 20, 21)); powerlayout1 = new QGridLayout(gridLayoutWidget_12); powerlayout1->setSpacing(6); powerlayout1->setContentsMargins(11, 11, 11, 11); powerlayout1->setObjectName(QString::fromUtf8(""powerlayout1"")); powerlayout1->setContentsMargins(0, 0, 0, 0); Name_3 = new QLabel(vol_immersif); Name_3->setObjectName(QString::fromUtf8(""Name_3"")); Name_3->setGeometry(QRect(770, 50, 121, 21)); Onglet->addTab(vol_immersif, QString()); vol_vue = new QWidget(); vol_vue->setObjectName(QString::fromUtf8(""vol_vue"")); emergency_stop_2 = new QPushButton(vol_vue); emergency_stop_2->setObjectName(QString::fromUtf8(""emergency_stop_2"")); emergency_stop_2->setGeometry(QRect(760, 480, 201, 31)); emergency_stop_2->setAutoDefault(false); gridLayoutWidget_2 = new QWidget(vol_vue); gridLayoutWidget_2->setObjectName(QString::fromUtf8(""gridLayoutWidget_2"")); gridLayoutWidget_2->setGeometry(QRect(10, 30, 681, 471)); horizon_layout = new QGridLayout(gridLayoutWidget_2); horizon_layout->setSpacing(6); horizon_layout->setContentsMargins(11, 11, 11, 11); horizon_layout->setObjectName(QString::fromUtf8(""horizon_layout"")); horizon_layout->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_5 = new QWidget(vol_vue); gridLayoutWidget_5->setObjectName(QString::fromUtf8(""gridLayoutWidget_5"")); gridLayoutWidget_5->setGeometry(QRect(740, 200, 241, 221)); maplayout2 = new QGridLayout(gridLayoutWidget_5); maplayout2->setSpacing(6); maplayout2->setContentsMargins(11, 11, 11, 11); maplayout2->setObjectName(QString::fromUtf8(""maplayout2"")); maplayout2->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_3 = new QWidget(vol_vue); gridLayoutWidget_3->setObjectName(QString::fromUtf8(""gridLayoutWidget_3"")); gridLayoutWidget_3->setGeometry(QRect(870, 80, 121, 41)); batterylayout2 = new QGridLayout(gridLayoutWidget_3); batterylayout2->setSpacing(6); batterylayout2->setContentsMargins(11, 11, 11, 11); batterylayout2->setObjectName(QString::fromUtf8(""batterylayout2"")); batterylayout2->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_8 = new QWidget(vol_vue); gridLayoutWidget_8->setObjectName(QString::fromUtf8(""gridLayoutWidget_8"")); gridLayoutWidget_8->setGeometry(QRect(870, 130, 121, 41)); batterylayout2_2 = new QGridLayout(gridLayoutWidget_8); batterylayout2_2->setSpacing(6); batterylayout2_2->setContentsMargins(11, 11, 11, 11); batterylayout2_2->setObjectName(QString::fromUtf8(""batterylayout2_2"")); batterylayout2_2->setContentsMargins(0, 0, 0, 0); Name2 = new QLabel(vol_vue); Name2->setObjectName(QString::fromUtf8(""Name2"")); Name2->setGeometry(QRect(770, 100, 81, 21)); Name2_2 = new QLabel(vol_vue); Name2_2->setObjectName(QString::fromUtf8(""Name2_2"")); Name2_2->setGeometry(QRect(770, 150, 81, 21)); line = new QFrame(vol_vue); line->setObjectName(QString::fromUtf8(""line"")); line->setGeometry(QRect(710, 20, 20, 471)); line->setFrameShape(QFrame::VLine); line->setFrameShadow(QFrame::Sunken); gridLayoutWidget_13 = new QWidget(vol_vue); gridLayoutWidget_13->setObjectName(QString::fromUtf8(""gridLayoutWidget_13"")); gridLayoutWidget_13->setGeometry(QRect(940, 10, 20, 51)); powerlayout4_2 = new QGridLayout(gridLayoutWidget_13); powerlayout4_2->setSpacing(6); powerlayout4_2->setContentsMargins(11, 11, 11, 11); powerlayout4_2->setObjectName(QString::fromUtf8(""powerlayout4_2"")); powerlayout4_2->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_14 = new QWidget(vol_vue); gridLayoutWidget_14->setObjectName(QString::fromUtf8(""gridLayoutWidget_14"")); gridLayoutWidget_14->setGeometry(QRect(920, 20, 20, 41)); powerlayout3_2 = new QGridLayout(gridLayoutWidget_14); powerlayout3_2->setSpacing(6); powerlayout3_2->setContentsMargins(11, 11, 11, 11); powerlayout3_2->setObjectName(QString::fromUtf8(""powerlayout3_2"")); powerlayout3_2->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_15 = new QWidget(vol_vue); gridLayoutWidget_15->setObjectName(QString::fromUtf8(""gridLayoutWidget_15"")); gridLayoutWidget_15->setGeometry(QRect(900, 30, 20, 31)); powerlayout2_2 = new QGridLayout(gridLayoutWidget_15); powerlayout2_2->setSpacing(6); powerlayout2_2->setContentsMargins(11, 11, 11, 11); powerlayout2_2->setObjectName(QString::fromUtf8(""powerlayout2_2"")); powerlayout2_2->setContentsMargins(0, 0, 0, 0); gridLayoutWidget_16 = new QWidget(vol_vue); gridLayoutWidget_16->setObjectName(QString::fromUtf8(""gridLayoutWidget_16"")); gridLayoutWidget_16->setGeometry(QRect(880, 40, 20, 21)); powerlayout1_2 = new QGridLayout(gridLayoutWidget_16); powerlayout1_2->setSpacing(6); powerlayout1_2->setContentsMargins(11, 11, 11, 11); powerlayout1_2->setObjectName(QString::fromUtf8(""powerlayout1_2"")); powerlayout1_2->setContentsMargins(0, 0, 0, 0); Name_4 = new QLabel(vol_vue); Name_4->setObjectName(QString::fromUtf8(""Name_4"")); Name_4->setGeometry(QRect(770, 50, 121, 21)); Onglet->addTab(vol_vue, QString()); MainWindow->setCentralWidget(widget_principal); menuBar = new QMenuBar(MainWindow); menuBar->setObjectName(QString::fromUtf8(""menuBar"")); menuBar->setGeometry(QRect(0, 0, 1000, 27)); MainWindow->setMenuBar(menuBar); retranslateUi(MainWindow); Onglet->setCurrentIndex(0); QMetaObject::connectSlotsByName(MainWindow); } // setupUi void retranslateUi(QMainWindow *MainWindow) { MainWindow->setWindowTitle(QApplication::translate(""MainWindow"", ""MainWindow"", 0, QApplication::UnicodeUTF8)); #ifndef QT_NO_WHATSTHIS Onglet->setWhatsThis(QApplication::translate(""MainWindow"", ""


                  "", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_WHATSTHIS VideoStreaming->setText(QApplication::translate(""MainWindow"", ""START/STOP VIDEO STREAMING"", 0, QApplication::UnicodeUTF8)); emergency_stop->setText(QApplication::translate(""MainWindow"", ""EMERGENCY STOP"", 0, QApplication::UnicodeUTF8)); Photo->setText(QApplication::translate(""MainWindow"", ""TAKE PICTURE"", 0, QApplication::UnicodeUTF8)); Name->setText(QApplication::translate(""MainWindow"", ""BASE"", 0, QApplication::UnicodeUTF8)); Name_2->setText(QApplication::translate(""MainWindow"", ""DRONE"", 0, QApplication::UnicodeUTF8)); Name_3->setText(QApplication::translate(""MainWindow"", ""SIGNAL RF"", 0, QApplication::UnicodeUTF8)); Onglet->setTabText(Onglet->indexOf(vol_immersif), QApplication::translate(""MainWindow"", ""Vol immersif"", 0, QApplication::UnicodeUTF8)); emergency_stop_2->setText(QApplication::translate(""MainWindow"", ""EMERGENCY STOP"", 0, QApplication::UnicodeUTF8)); Name2->setText(QApplication::translate(""MainWindow"", ""BASE"", 0, QApplication::UnicodeUTF8)); Name2_2->setText(QApplication::translate(""MainWindow"", ""DRONE"", 0, QApplication::UnicodeUTF8)); Name_4->setText(QApplication::translate(""MainWindow"", ""SIGNAL RF"", 0, QApplication::UnicodeUTF8)); Onglet->setTabText(Onglet->indexOf(vol_vue), QApplication::translate(""MainWindow"", ""Vol \303\240 vue"", 0, QApplication::UnicodeUTF8)); } // retranslateUi }; namespace Ui { class MainWindow: public Ui_MainWindow {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_MAINWINDOW_H ",0 " use App\models\Opd; class AdminStudents extends Controller { /* * E S T U D I A N T E S * ---------------------------------------------------------------- */ public function view($id){ $user = Auth::user(); $student = Student::find($id); return view(""admin.students.student-profile"")->with([ ""user"" => $user, ""student"" => $student ]); } public function add(){ $user = Auth::user(); $opds = Opd::all()->pluck('opd_name','id'); // $offer = return view(""admin.students.students-add"")->with([ ""user"" => $user, ""opds"" =>$opds, ]); } public function save(Request $request){ $data = $request->except('_token'); $student = Student::firstOrCreate($data); $student->nombre_completo = $data['nombre']."" "".$data['apellido_paterno']."" "".$data['apellido_materno']; $student->save(); return redirect(""dashboard/estudiante/$student->id"")->with(""message"", 'Estudiante creado correctamente'); } public function edit($id){ $user = Auth::user(); $student = Student::with('user.opd')->find($id); $opds = Opd::all()->pluck('opd_name','id'); return view(""admin.students.students-update"")->with([ ""user"" => $user, ""student"" => $student, ""opds"" =>$opds ]); } public function update(Request $request, $id){ $student = Student::find($id); // update student $student->update($request->only(['nombre', 'apellido_paterno', 'apellido_materno', 'curp', 'matricula', 'carrera','status','opd_id'])); $student->nombre_completo = $request->nombre."" "".$request->apellido_paterno."" "".$request->apellido_materno; $student->save(); return redirect(""dashboard/estudiante/$student->id"")->with(""message"", 'Estudiante actualizado correctamente'); } public function delete($id){ $student = Student::find($id); $student->delete(); return redirect('dashboard/estudiantes')->with(""message"", 'Estudiante eliminado correctamente');; } } ",0 "import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** *

                  Java class for anonymous complex type. * *

                  The following schema fragment specifies the expected content contained within this class. * *

                   * <complexType>
                   *   <complexContent>
                   *     <restriction base=""{http://www.w3.org/2001/XMLSchema}anyType"">
                   *       <sequence>
                   *         <element name=""result"" type=""{http://xmlns.oracle.com/apps/sales/opptyMgmt/opportunities/opportunityService/}Opportunity"" maxOccurs=""unbounded"" minOccurs=""0""/>
                   *       </sequence>
                   *     </restriction>
                   *   </complexContent>
                   * </complexType>
                   * 
                  * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = """", propOrder = { ""result"" }) @XmlRootElement(name = ""processOpportunityResponse"") public class ProcessOpportunityResponse { protected List result; /** * Gets the value of the result property. * *

                  * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the result property. * *

                  * For example, to add a new item, do as follows: *

                       *    getResult().add(newItem);
                       * 
                  * * *

                  * Objects of the following type(s) are allowed in the list * {@link Opportunity } * * */ public List getResult() { if (result == null) { result = new ArrayList(); } return this.result; } } ",0 "the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called ""COPYING"". function send_recover_mail ($user) { global $site_key, $globals; require_once(mnminclude.'user.php'); $now = time(); $key = md5($user->id.$user->pass.$now.$site_key.get_server_name()); $url = 'http://'.get_server_name().$globals['base_url'].'profile.php?login='.$user->username.'&t='.$now.'&k='.$key; //echo ""$user->username, $user->email, $url
                  ""; $to = $user->email; $subject = _('Recuperación o verificación de la contraseña de '). get_server_name(); $message = $to . _(': para poder acceder sin la clave, conéctate a la siguiente dirección en menos de dos horas:') . ""\n\n$url\n\n""; $message .= _('Pasado este tiempo puedes volver a solicitar acceso en: ') . ""\nhttp://"".get_server_name().$globals['base_url'].""login.php?op=recover\n\n""; $message .= _('Una vez en tu perfil, puedes cambiar la clave de acceso.') . ""\n"" . ""\n""; $message .= ""\n\n"". _('Este mensaje ha sido enviado a solicitud de la dirección: ') . $globals['user_ip'] . ""\n\n""; $message .= ""-- \n "" . _('el equipo de menéame'); $message = wordwrap($message, 70); $headers = 'Content-Type: text/plain; charset=""utf-8""'.""\n"" . 'X-Mailer: meneame.net/PHP/' . phpversion(). ""\n"". 'From: meneame.net \n""; //$pars = '-fweb@'.get_server_name(); mail($to, $subject, $message, $headers); echo '

                  ' ._ ('Correo enviado, mira tu buzón, allí están las instrucciones. Mira también en la carpeta de spam.') . '

                  '; return true; } ?> ",0 "elcome to Fram^ Online Testing

                  You have {{testingDuration}} minutes to complete your testting

                  Notice 1

                  Notice 2

                  Notice 3

                  ......

                  ...

                  ARE YOU READY ???

                  ",0 "re.JsonProcessingException; import com.fasterxml.jackson.core.ObjectCodec; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.xeiam.xchange.cryptotrade.dto.CryptoTradeOrderType.CryptTradeOrderTypeDeserializer; @JsonDeserialize(using = CryptTradeOrderTypeDeserializer.class) public enum CryptoTradeOrderType { Buy, Sell; static class CryptTradeOrderTypeDeserializer extends JsonDeserializer { @Override public CryptoTradeOrderType deserialize(final JsonParser jsonParser, final DeserializationContext ctxt) throws IOException, JsonProcessingException { final ObjectCodec oc = jsonParser.getCodec(); final JsonNode node = oc.readTree(jsonParser); final String orderType = node.asText(); return CryptoTradeOrderType.valueOf(orderType); } } } ",0 "ecutiveOnes { public int count(int N) { int[][] memo = new int[N + 1][2]; for (int i = 0; i < memo.length; i++) { for (int j = 0; j < memo[i].length; j++) { memo[i][j] = -1; } } return countBinary(N, false, memo); } private int countBinary(int N, boolean prevSet, int[][] memo) { if (N == 0) return 1; int i = (prevSet) ? 1 : 0; if (memo[N][i] == -1) { memo[N][i] = countBinary(N - 1, false, memo); if (!prevSet) { memo[N][i] += countBinary(N - 1, true, memo); } } return memo[N][i]; } public int countBottomUp(int N) { int a = 1, b = 1, c = 0; for (int i = 1; i <= N; i++) { c = a + b; a = b; b = c; } return c; } } ",0 " \Twig_Extension { //private $container; private $repository_evento; private $templating; public function __construct($repository_evento, $templating) { //$this->container = $container; $this->templating = $templating; $this->repository_evento = $repository_evento; } public function getName() { return 'core_utils'; } public function getFunctions() { return array( 'eventos_pasados' => new \Twig_Function_Method($this, 'eventosPasados', array('is_safe' => array('html'))), 'eventos_pasados_key' => new \Twig_Function_Method($this, 'eventosPasadosKey', array('is_safe' => array('html'))) ); } public function eventosPasados($limit){ $eventos = $this->repository_evento->findPasadas($limit); return $this->templating->render('WebBundle:Frontend/Evento:eventos_pasados.html.twig', array('eventos' => $eventos)); } public function eventosPasadosKey($productora, $evento_id, $limit){ $eventos = $this->repository_evento->findByProductora($productora->getId(), $evento_id, $limit); return $this->templating->render('WebBundle:Frontend/Evento:eventos_pasados_key.html.twig', array('eventos' => $eventos, 'productora' => $productora)); } } ",0 "e fuss about library namespaces?

                  The library declares the boost::log namespace which should be used in client code to access library components. However, internally the library uses another nested namespace for actual implementation. The namespace name is configuration and platform dependent, it can change between different releases of the library, so it should never be used in the user side code. This is done in order to make the library configuration synchronized with the application as much as possible and eliminate problems caused by configuration mismatch.

                  Most of the time users won't even notice the existence of this internal namespace, but it often appears in compiler and linker errors and in some cases it is useful to know how to decode its name. Currently, the namespace name is composed from the following elements:

                  <version><linkage>_<threading>_<system>
                  • The <version> component describes the library major version. It is currently v2.
                  • The <linkage> component tells whether the library is linked statically or dynamically. It is s if the library is linked statically and empty otherwise.
                  • The <threading> component is st for single-threaded builds and mt for multi-threaded ones.
                  • The <system> component describes the underlying OS API used by the library. Currently, it is only specified for multi-threaded builds. Depending on the target platform and configuration, it can be posix, nt5 or nt6.

                  As a couple quick examples, v2s_st corresponds to v2 static single-threaded build of the library and v2_mt_posix - to v2 dynamic multi-threaded build for POSIX system API.

                  Namespace mangling may lead to linking errors if the application is misconfigured. One common mistake is to build dynamic version of the library and not define BOOST_LOG_DYN_LINK or BOOST_ALL_DYN_LINK when building the application, so that the library assumes static linking by default. Whenever such linking errors appear, one can decode the namespace name in the missing symbols and the exported symbols of Boost.Log library and adjust library or application configuration accordingly.

                  Copyright © 2007-2015 Andrey Semashev

                  Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt).


                  ",0 " 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. */ package cz.muni.fi.editor.support; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.core.annotation.AliasFor; import org.springframework.security.test.context.support.WithSecurityContext; /** * @author Dominik Szalai - emptulik at gmail.com on 10.8.2016. */ @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documented @WithSecurityContext( factory = TestSecurityContextFactory.class ) public @interface WithEditorUser { // the owner is always user with ID 1 @AliasFor(""value"") long id() default 1L; @AliasFor(""id"") long value() default 1L; boolean mock() default false; } ",0 "========================================= // Copyright (C) 2016 Afeeq Amiruddin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . //================================================================================================= #ifndef RIKA_VOICEPACK_FORMAT_H_INCLUDED #define RIKA_VOICEPACK_FORMAT_H_INCLUDED //************************************************************************************************* // Change this according to your sound file's format const char* pszSoundFileFormat = "".wav""; //************************************************************************************************* #endif // RIKA_VOICEPACK_FORMAT_H_INCLUDED ",0 "-trigger-for]=""menu""> more_vert

                  Clicking these will navigate:

                  {{ item.text }}

                  Position x: before

                  Position y: above

                  ",0 "->setTemplatesDirectory(__DIR__ . '/templates'); } public function testRendersTemplateWrappedWithLayout() { $output = $this->view->fetch('simple.php'); $this->assertEquals(""

                  Hello World\n

                  "", trim($output)); } public function testDefaultLayoutFromAppConfiguration() { \Slim\Environment::mock(); $this->app = new \Slim\Slim(array('layout' => 'layout_from_app.php')); $output = $this->view->fetch('simple.php'); $this->assertEquals(""
                  Hello World\n
                  "", trim($output)); } public function testLayoutFromData() { $this->view->setData('layout', 'layout_from_data.php'); $output = $this->view->fetch('simple.php'); $this->assertEquals(""

                  Hello World\n

                  "", trim($output)); } public function testRendersWithoutLayout() { $this->view->setData('layout', false); $output = $this->view->fetch('simple.php'); $this->assertEquals('Hello World', trim($output)); } public function testLayoutSharesData() { $output = $this->view->setData(array( 'title' => 'Hello', 'content' => 'World', 'layout' => 'layout_with_data.php' )); $output = $this->view->fetch('template_with_data.php', array()); $this->assertEquals(""

                  Hello

                  \n

                  World

                  "", trim($output)); } public function testAdditionalDataInFetch() { $output = $this->view->fetch('template_with_data.php', array( 'title' => 'Hello', 'content' => 'World', 'layout' => 'layout_with_data.php' )); $this->assertEquals(""

                  Hello

                  \n

                  World

                  "", trim($output)); } } ",0 ", please view the LICENSE * file that was distributed with this source code. */ namespace Pho\Lib\Graph; /** * Holds the relationship between nodes and edges. * * EdgeList objects are attached to all Node objects, they are * created at object initialization. They contain edge objects * categorized by their direction. * * @see ImmutableEdgeList For a list that doesn't accept new values. * * @author Emre Sokullu */ class EdgeList { /** * The node thay this edgelist belongs to * * @var NodeInterface */ private $master; /** * An internal pointer of outgoing nodes in [ID=>EncapsulatedEdge] format * where ID belongs to the edge. * * @var array */ private $out = []; /** * An internal pointer of incoming nodes in [ID=>EncapsulatedEdge] format * where ID belongs to the edge * * @var array */ private $in = []; /** * An internal pointer of incoming nodes in [ID=>[ID=>EncapsulatedEdge]] format * where first ID belongs to the node, and second to the edge. * * @var array */ private $from = []; /** * An internal pointer of outgoing nodes in [ID=>[ID=>EncapsulatedEdge]] format * where first ID belongs to the node, and second to the edge. * * @var array */ private $to = []; /** * Constructor * * For performance reasons, the constructor doesn't load the seed data * (if available) but waits for a method to attempt to access. * * @param NodeInterface $node The master, the owner of this EdgeList object. * @param array $data Initial data to seed. */ public function __construct(NodeInterface $node, array $data = []) { $this->master = $node; $this->import($data); } public function delete(ID $id): void { $id = (string) $id; foreach($this->from as $key=>$val) { unset($this->from[$key][$id]); } foreach($this->to as $key=>$val) { unset($this->to[$key][$id]); } unset($this->in[$id]); unset($this->out[$id]); $this->master->emit(""modified""); } /** * Imports data from given array source * * @param array $data Data source. * * @return void */ public function import(array $data): void { if(!$this->isDataSetProperly($data)) { return; } $wakeup = function (array $array): EncapsulatedEdge { return EncapsulatedEdge::fromArray($array); }; $this->out = array_map($wakeup, $data[""out""]); $this->in = array_map($wakeup, $data[""in""]); foreach($data[""from""] as $from => $frozen) { $this->from[$from] = array_map($wakeup, $frozen); } foreach($data[""to""] as $to => $frozen) { $this->to[$to] = array_map($wakeup, $frozen); } } /** * Checks if the data source for import is valid. * * @param array $data * * @return bool */ private function isDataSetProperly(array $data): bool { return (isset($data[""in""]) && isset($data[""out""]) && isset($data[""from""]) && isset($data[""to""])); } /** * Retrieves this object in array format * * With all ""in"" and ""out"" values in simple string format. * The ""to"" array can be reconstructed. * * @return array */ public function toArray(): array { $to_array = function (EncapsulatedEdge $encapsulated): array { return $encapsulated->toArray(); }; $array = []; $array[""to""] = []; foreach($this->to as $to => $encapsulated) { $array[""to""][$to] = array_map($to_array, $encapsulated); } $array[""from""] = []; foreach($this->from as $from => $encapsulated) { $array[""from""][$from] = array_map($to_array, $encapsulated); } $array[""in""] = array_map($to_array, $this->in); $array[""out""] = array_map($to_array, $this->out); return $array; } /** * Adds an incoming edge to the list. * * The edge must be already initialized. * * @param EdgeInterface $edge * * @return void */ public function addIncoming(EdgeInterface $edge): void { $edge_encapsulated = EncapsulatedEdge::fromEdge($edge); $this->from[(string) $edge->tail()->id()][(string) $edge->id()] = $edge_encapsulated; $this->in[(string) $edge->id()] = $edge_encapsulated; $this->master->emit(""modified""); } /** * Adds an outgoing edge to the list. * * The edge must be already initialized. * * @param EdgeInterface $edge * * @return void */ public function addOutgoing(EdgeInterface $edge): void { $edge_encapsulated = EncapsulatedEdge::fromEdge($edge); $this->to[(string) $edge->head()->id()][(string) $edge->id()] = $edge_encapsulated; $this->out[(string) $edge->id()] = $edge_encapsulated; $this->master->emit(""modified""); } /** * Returns a list of all the edges directed towards * this particular node. * * @see retrieve Used by this method to fetch objects. * * @param string $class The type of edge (defined in edge class) to return * * @return \ArrayIterator An array of EdgeInterface objects. */ public function in(string $class=""""): \ArrayIterator { return $this->retrieve(Direction::in(), $class); } /** * Returns a list of all the edges originating from * this particular node. * * @see retrieve Used by this method to fetch objects. * * @param string $class The type of edge (defined in edge class) to return * * @return \ArrayIterator An array of EdgeInterface objects. */ public function out(string $class=""""): \ArrayIterator { return $this->retrieve(Direction::out(), $class); } /** * A helper method to retrieve edges. * * @see out A method that uses this function * @see in A method that uses this function * * @param Direction $direction Lets you choose to fetch incoming or outgoing edges. * @param string $class The type of edge (defined in edge class) to return * * @return \ArrayIterator An array of EdgeInterface objects. */ protected function retrieve(Direction $direction, string $class): \ArrayIterator { $d = (string) $direction; $hydrate = function (EncapsulatedEdge $encapsulated): EdgeInterface { if(!$encapsulated->hydrated()) return $this->master->edge($encapsulated->id()); return $encapsulated->edge(); }; $filter_classes = function (EncapsulatedEdge $encapsulated) use ($class): bool { return in_array($class, $encapsulated->classes()); }; if(empty($class)) { return new \ArrayIterator( array_map($hydrate, $this->$d) ); } return new \ArrayIterator( array_map($hydrate, array_filter($this->$d, $filter_classes) ) ); } /** * Returns a list of all the edges (both in and out) pertaining to * this particular node. * * @param string $class The type of edge (defined in edge class) to return * * @return \ArrayIterator An array of EdgeInterface objects. */ public function all(string $class=""""): \ArrayIterator { return new \ArrayIterator( array_merge( $this->in($class)->getArrayCopy(), $this->out($class)->getArrayCopy() ) ); } /** * Retrieves a list of edges from the list's owner node to the given * target node. * * @param ID $node_id Target (head) node. * @param string $class The type of edge (defined in edge class) to return * * @return \ArrayIterator An array of edge objects to. Returns an empty array if there is no such connections. */ public function to(ID $node_id, string $class=""""): \ArrayIterator { return $this->retrieveDirected(Direction::out(), $node_id, $class); } /** * Retrieves a list of edges to the list's owner node from the given * source node. * * @param ID $node_id Source (tail) node. * @param string $class The type of edge (defined in edge class) to return * * @return \ArrayIterator An array of edge objects from. Returns an empty array if there is no such connections. */ public function from(ID $node_id, string $class=""""): \ArrayIterator { return $this->retrieveDirected(Direction::in(), $node_id, $class); } /** * Retrieves a list of edges between the list's owner node and the given * node. * * @param ID $node_id The other node. * @param string $class The type of edge (defined in edge class) to return * * @return \ArrayIterator An array of edge objects in between. Returns an empty array if there is no such connections. */ public function between(ID $node_id, string $class=""""): \ArrayIterator { return new \ArrayIterator( array_merge( $this->from($node_id, $class)->getArrayCopy(), $this->to($node_id, $class)->getArrayCopy() ) ); } /** * A helper method to retrieve directed edges. * * @see from A method that uses this function * @see to A method that uses this function * * @param Direction $direction Lets you choose to fetch incoming or outgoing edges. * @param ID $node_id Directed towards which node. * @param string $class The type of edge (defined in edge class) to return. * * @return \ArrayIterator An array of EdgeInterface objects. */ protected function retrieveDirected(Direction $direction, ID $node_id, string $class): \ArrayIterator { $key = $direction->equals(Direction::in()) ? ""from"" : ""to""; $direction = (string) $direction; $hydrate = function (EncapsulatedEdge $encapsulated): EdgeInterface { if(!$encapsulated->hydrated()) return $this->master->edge($encapsulated->id()); return $encapsulated->edge(); }; $filter_classes = function (EncapsulatedEdge $encapsulated) use ($class): bool { return in_array($class, $encapsulated->classes()); }; if(!isset($this->$key[(string) $node_id])) { return new \ArrayIterator(); } if(empty($class)) { return new \ArrayIterator( array_map($hydrate, $this->$key[(string) $node_id]) ); } return new \ArrayIterator( array_map($hydrate, array_filter($this->$key[(string) $node_id], $filter_classes)) ); } }",0 "011-2015, The Linux Foundation. All rights reserved. * Copyright (C) 2016-2018 Linaro Ltd. */ #include ""camss-csiphy.h"" #include #include #include #define CAMSS_CSI_PHY_LNn_CFG2(n) (0x004 + 0x40 * (n)) #define CAMSS_CSI_PHY_LNn_CFG3(n) (0x008 + 0x40 * (n)) #define CAMSS_CSI_PHY_GLBL_RESET 0x140 #define CAMSS_CSI_PHY_GLBL_PWR_CFG 0x144 #define CAMSS_CSI_PHY_GLBL_IRQ_CMD 0x164 #define CAMSS_CSI_PHY_HW_VERSION 0x188 #define CAMSS_CSI_PHY_INTERRUPT_STATUSn(n) (0x18c + 0x4 * (n)) #define CAMSS_CSI_PHY_INTERRUPT_MASKn(n) (0x1ac + 0x4 * (n)) #define CAMSS_CSI_PHY_INTERRUPT_CLEARn(n) (0x1cc + 0x4 * (n)) #define CAMSS_CSI_PHY_GLBL_T_INIT_CFG0 0x1ec #define CAMSS_CSI_PHY_T_WAKEUP_CFG0 0x1f4 static void csiphy_hw_version_read(struct csiphy_device *csiphy, struct device *dev) { u8 hw_version = readl_relaxed(csiphy->base + CAMSS_CSI_PHY_HW_VERSION); dev_dbg(dev, ""CSIPHY HW Version = 0x%02x\n"", hw_version); } /* * csiphy_reset - Perform software reset on CSIPHY module * @csiphy: CSIPHY device */ static void csiphy_reset(struct csiphy_device *csiphy) { writel_relaxed(0x1, csiphy->base + CAMSS_CSI_PHY_GLBL_RESET); usleep_range(5000, 8000); writel_relaxed(0x0, csiphy->base + CAMSS_CSI_PHY_GLBL_RESET); } /* * csiphy_settle_cnt_calc - Calculate settle count value * * Helper function to calculate settle count value. This is * based on the CSI2 T_hs_settle parameter which in turn * is calculated based on the CSI2 transmitter link frequency. * * Return settle count value or 0 if the CSI2 link frequency * is not available */ static u8 csiphy_settle_cnt_calc(s64 link_freq, u32 timer_clk_rate) { u32 ui; /* ps */ u32 timer_period; /* ps */ u32 t_hs_prepare_max; /* ps */ u32 t_hs_prepare_zero_min; /* ps */ u32 t_hs_settle; /* ps */ u8 settle_cnt; if (link_freq <= 0) return 0; ui = div_u64(1000000000000LL, link_freq); ui /= 2; t_hs_prepare_max = 85000 + 6 * ui; t_hs_prepare_zero_min = 145000 + 10 * ui; t_hs_settle = (t_hs_prepare_max + t_hs_prepare_zero_min) / 2; timer_period = div_u64(1000000000000LL, timer_clk_rate); settle_cnt = t_hs_settle / timer_period - 1; return settle_cnt; } static void csiphy_lanes_enable(struct csiphy_device *csiphy, struct csiphy_config *cfg, s64 link_freq, u8 lane_mask) { struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; u8 settle_cnt; u8 val, l = 0; int i = 0; settle_cnt = csiphy_settle_cnt_calc(link_freq, csiphy->timer_clk_rate); writel_relaxed(0x1, csiphy->base + CAMSS_CSI_PHY_GLBL_T_INIT_CFG0); writel_relaxed(0x1, csiphy->base + CAMSS_CSI_PHY_T_WAKEUP_CFG0); val = 0x1; val |= lane_mask << 1; writel_relaxed(val, csiphy->base + CAMSS_CSI_PHY_GLBL_PWR_CFG); val = cfg->combo_mode << 4; writel_relaxed(val, csiphy->base + CAMSS_CSI_PHY_GLBL_RESET); for (i = 0; i <= c->num_data; i++) { if (i == c->num_data) l = c->clk.pos; else l = c->data[i].pos; writel_relaxed(0x10, csiphy->base + CAMSS_CSI_PHY_LNn_CFG2(l)); writel_relaxed(settle_cnt, csiphy->base + CAMSS_CSI_PHY_LNn_CFG3(l)); writel_relaxed(0x3f, csiphy->base + CAMSS_CSI_PHY_INTERRUPT_MASKn(l)); writel_relaxed(0x3f, csiphy->base + CAMSS_CSI_PHY_INTERRUPT_CLEARn(l)); } } static void csiphy_lanes_disable(struct csiphy_device *csiphy, struct csiphy_config *cfg) { struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; u8 l = 0; int i = 0; for (i = 0; i <= c->num_data; i++) { if (i == c->num_data) l = c->clk.pos; else l = c->data[i].pos; writel_relaxed(0x0, csiphy->base + CAMSS_CSI_PHY_LNn_CFG2(l)); } writel_relaxed(0x0, csiphy->base + CAMSS_CSI_PHY_GLBL_PWR_CFG); } /* * csiphy_isr - CSIPHY module interrupt handler * @irq: Interrupt line * @dev: CSIPHY device * * Return IRQ_HANDLED on success */ static irqreturn_t csiphy_isr(int irq, void *dev) { struct csiphy_device *csiphy = dev; u8 i; for (i = 0; i < 8; i++) { u8 val = readl_relaxed(csiphy->base + CAMSS_CSI_PHY_INTERRUPT_STATUSn(i)); writel_relaxed(val, csiphy->base + CAMSS_CSI_PHY_INTERRUPT_CLEARn(i)); writel_relaxed(0x1, csiphy->base + CAMSS_CSI_PHY_GLBL_IRQ_CMD); writel_relaxed(0x0, csiphy->base + CAMSS_CSI_PHY_GLBL_IRQ_CMD); writel_relaxed(0x0, csiphy->base + CAMSS_CSI_PHY_INTERRUPT_CLEARn(i)); } return IRQ_HANDLED; } const struct csiphy_hw_ops csiphy_ops_2ph_1_0 = { .hw_version_read = csiphy_hw_version_read, .reset = csiphy_reset, .lanes_enable = csiphy_lanes_enable, .lanes_disable = csiphy_lanes_disable, .isr = csiphy_isr, }; ",0 "age application.model * @copyright © 2011 - Ministério da Cultura - Todos os direitos reservados. * @link http://www.cultura.gov.br */ class tbMovimentacaoBancaria extends GenericModel { /* dados da tabela */ protected $_banco = ""SAC""; protected $_schema = ""dbo""; protected $_name = ""tbMovimentacaoBancaria""; /** * Método para buscar * @access public * @param string $pronac * @param boolean $conta_rejeitada * @param array $periodo * @param array $operacao * @return object */ public function buscarDados($pronac = null, $conta_rejeitada = null, $periodo = null, $operacao = null ,$tamanho=-1, $inicio=-1, $count = null) { $select = $this->select(); $select->setIntegrityCheck(false); if(isset($count)){ $select->from( array(""mi"" => ""tbMovimentacaoBancariaItem""), array(""total"" => ""count(*)"")); } else { $select->from( array(""mi"" => ""tbMovimentacaoBancariaItem"") ,array(""m.nrBanco"" ,""CONVERT(CHAR(10), m.dtInicioMovimento, 103) AS dtInicioMovimento"" ,""CONVERT(CHAR(10), m.dtFimMovimento, 103) AS dtFimMovimento"" ,""mi.idMovimentacaoBancaria"" ,""mi.tpRegistro"" ,""mi.nrAgencia"" ,""mi.nrDigitoConta"" ,""mi.nmTituloRazao"" ,""mi.nmAbreviado"" ,""CONVERT(CHAR(10), mi.dtAberturaConta, 103) AS dtAberturaConta"" ,""mi.nrCNPJCPF"" ,""n.Descricao AS Proponente"" ,""mi.vlSaldoInicial"" ,""mi.tpSaldoInicial"" ,""mi.vlSaldoFinal"" ,""mi.tpSaldoFinal"" ,""CONVERT(CHAR(10), mi.dtMovimento, 103) AS dtMovimento"" ,""mi.cdHistorico"" ,""mi.dsHistorico"" ,""mi.nrDocumento"" ,""mi.vlMovimento"" ,""mi.cdMovimento"" ,""mi.idMovimentacaoBancariaItem"" ,""ti.idTipoInconsistencia"" ,""ti.dsTipoInconsistencia"" ,""(p.AnoProjeto+p.Sequencial) AS pronac"" ,""p.NomeProjeto"" ,""bc.Descricao AS nmBanco"") ); } $select->joinInner( array(""m"" => $this->_name) ,""m.idMovimentacaoBancaria = mi.idMovimentacaoBancaria"" ,array() ); if(!empty($conta_rejeitada) && $conta_rejeitada){ $select->joinInner( array(""mx"" => ""tbMovimentacaoBancariaItemxTipoInconsistencia"") ,""mi.idMovimentacaoBancariaItem = mx.idMovimentacaoBancariaItem"" ,array() ); $select->joinInner( array(""ti"" => ""tbTipoInconsistencia"") ,""ti.idTipoInconsistencia = mx.idTipoInconsistencia"" ,array() ); } else { $select->joinLeft( array(""mx"" => ""tbMovimentacaoBancariaItemxTipoInconsistencia"") ,""mi.idMovimentacaoBancariaItem = mx.idMovimentacaoBancariaItem"" ,array() ); $select->joinLeft( array(""ti"" => ""tbTipoInconsistencia"") ,""ti.idTipoInconsistencia = mx.idTipoInconsistencia"" ,array() ); } $select->joinLeft( array(""c"" => ""ContaBancaria"") ,""mi.nrAgencia = c.Agencia AND (mi.nrDigitoConta = c.ContaBloqueada OR mi.nrDigitoConta = c.ContaLivre)"" ,array() ); $select->joinLeft( array(""p"" => ""Projetos"") ,""c.AnoProjeto = p.AnoProjeto AND c.Sequencial = p.Sequencial"" ,array() ); $select->joinLeft( array(""bc"" => ""bancos"") ,""m.nrBanco = bc.Codigo"" ,array() ,""AGENTES.dbo"" ); $select->joinLeft( array(""a"" => ""Agentes"") ,""mi.nrCNPJCPF = a.CNPJCPF"" ,array() ,""AGENTES.dbo"" ); $select->joinLeft( array(""n"" => ""Nomes"") ,""a.idAgente = n.idAgente"" ,array() ,""AGENTES.dbo"" ); // $select->where(""mi.vlSaldoInicial > 0.00""); //$select->where(""mi.vlSaldoFinal > 0.00""); // busca pelo pronac if (!empty($pronac)) { $select->where(""(c.AnoProjeto+c.Sequencial) = ?"", $pronac); } // filtra por contas rejeitadas if (!empty($conta_rejeitada) && $conta_rejeitada) { $select->where(""mx.idMovimentacaoBancariaItem IS NOT NULL""); $select->where(""mx.idTipoInconsistencia IS NOT NULL""); } else { $select->where(""mx.idMovimentacaoBancariaItem IS NULL""); $select->where(""mx.idTipoInconsistencia IS NULL""); } // busca pelo período if (!empty($periodo)) { if ($periodo[0] == ""A"") // Hoje { $select->where(""CONVERT(DATE, m.dtInicioMovimento) = CONVERT(DATE, GETDATE()) OR CONVERT(DATE, m.dtFimMovimento) = CONVERT(DATE, GETDATE()) OR CONVERT(DATE, mi.dtMovimento) = CONVERT(DATE, GETDATE())""); } if ($periodo[0] == ""B"") // Ontem { $select->where(""CONVERT(DATE, m.dtInicioMovimento) = DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, m.dtFimMovimento) = DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, mi.dtMovimento) = DATEADD(DAY, -1, CONVERT(DATE, GETDATE()))""); } if ($periodo[0] == ""C"") // Últimos 7 dias { $select->where(""CONVERT(DATE, m.dtInicioMovimento) > DATEADD(DAY, -7, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, m.dtFimMovimento) > DATEADD(DAY, -7, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, mi.dtMovimento) > DATEADD(DAY, -7, CONVERT(DATE, GETDATE()))""); } if ($periodo[0] == ""D"") // Semana passada (seg-dom) { $select->where(""(CONVERT(DATE, m.dtInicioMovimento) >= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, -6, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, -7, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, -8, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, -9, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, -10, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, -11, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -12, CONVERT(DATE, GETDATE())) END AND CONVERT(DATE, m.dtInicioMovimento) <= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, -2, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, -3, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, -4, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, -5, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -6, CONVERT(DATE, GETDATE())) END) OR (CONVERT(DATE, m.dtFimMovimento) >= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, -6, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, -7, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, -8, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, -9, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, -10, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, -11, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -12, CONVERT(DATE, GETDATE())) END AND CONVERT(DATE, m.dtFimMovimento) <= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, -2, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, -3, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, -4, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, -5, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -6, CONVERT(DATE, GETDATE())) END) OR (CONVERT(DATE, mi.dtMovimento) >= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, -6, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, -7, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, -8, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, -9, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, -10, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, -11, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -12, CONVERT(DATE, GETDATE())) END AND CONVERT(DATE, mi.dtMovimento) <= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, -2, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, -3, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, -4, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, -5, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -6, CONVERT(DATE, GETDATE())) END)""); } if ($periodo[0] == ""E"") // Última semana (seg-sex) { $select->where(""(CONVERT(DATE, m.dtInicioMovimento) >= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, -6, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, -2, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, -3, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, -4, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -5, CONVERT(DATE, GETDATE())) END AND CONVERT(DATE, m.dtInicioMovimento) <= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, -2, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) END) OR (CONVERT(DATE, m.dtFimMovimento) >= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, -6, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, -2, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, -3, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, -4, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -5, CONVERT(DATE, GETDATE())) END AND CONVERT(DATE, m.dtFimMovimento) <= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, -2, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) END) OR (CONVERT(DATE, mi.dtMovimento) >= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, -6, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, -2, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, -3, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, -4, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -5, CONVERT(DATE, GETDATE())) END AND CONVERT(DATE, mi.dtMovimento) <= CASE DATEPART(DW, GETDATE()) WHEN 1 THEN DATEADD(DAY, -2, CONVERT(DATE, GETDATE())) WHEN 2 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 3 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 4 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 5 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 6 THEN DATEADD(DAY, 0, CONVERT(DATE, GETDATE())) WHEN 7 THEN DATEADD(DAY, -1, CONVERT(DATE, GETDATE())) END)""); } if ($periodo[0] == ""F"") // Este mês { $select->where(""DATEPART(MONTH, m.dtInicioMovimento) + DATEPART(YEAR, m.dtInicioMovimento) = DATEPART(MONTH, GETDATE()) + DATEPART(YEAR, GETDATE()) OR DATEPART(MONTH, m.dtFimMovimento) + DATEPART(YEAR, m.dtFimMovimento) = DATEPART(MONTH, GETDATE()) + DATEPART(YEAR, GETDATE()) OR DATEPART(MONTH, mi.dtMovimento) + DATEPART(YEAR, mi.dtMovimento) = DATEPART(MONTH, GETDATE()) + DATEPART(YEAR, GETDATE())""); } if ($periodo[0] == ""G"") // Ano passado { $select->where(""DATEPART(YEAR, m.dtInicioMovimento) = (DATEPART(YEAR, GETDATE()) - 1) OR DATEPART(YEAR, m.dtFimMovimento) = (DATEPART(YEAR, GETDATE()) - 1) OR DATEPART(YEAR, mi.dtMovimento) = (DATEPART(YEAR, GETDATE()) - 1)""); } if ($periodo[0] == ""H"") // Últimos 12 meses { $select->where(""CONVERT(DATE, m.dtInicioMovimento) >= DATEADD(MONTH , -12, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, m.dtFimMovimento) >= DATEADD(MONTH , -12, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, mi.dtMovimento) >= DATEADD(MONTH , -12, CONVERT(DATE, GETDATE()))""); } if ($periodo[0] == ""I"") // Últimos 6 meses { $select->where(""CONVERT(DATE, m.dtInicioMovimento) >= DATEADD(MONTH , -6, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, m.dtFimMovimento) >= DATEADD(MONTH , -6, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, mi.dtMovimento) >= DATEADD(MONTH , -6, CONVERT(DATE, GETDATE()))""); } if ($periodo[0] == ""J"") // Últimos 3 meses { $select->where(""CONVERT(DATE, m.dtInicioMovimento) >= DATEADD(MONTH , -3, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, m.dtFimMovimento) >= DATEADD(MONTH , -3, CONVERT(DATE, GETDATE())) OR CONVERT(DATE, mi.dtMovimento) >= DATEADD(MONTH , -3, CONVERT(DATE, GETDATE()))""); } if ($periodo[0] == ""K"") // filtra conforme uma data inicial e uma data final { if (!empty($periodo[1]) && !empty($periodo[2])) { $select->where(""m.dtInicioMovimento >= ?"", Data::dataAmericana($periodo[1]) . "" 00:00:00""); $select->where(""m.dtFimMovimento <= ?"", Data::dataAmericana($periodo[2]) . "" 23:59:59""); } else { if (!empty($periodo[1])) { $select->where(""m.dtInicioMovimento >= ?"", Data::dataAmericana($periodo[1]) . "" 00:00:00""); } if (!empty($periodo[2])) { $select->where(""m.dtFimMovimento <= ?"", Data::dataAmericana($periodo[2]) . "" 23:59:59""); } } } } // fecha if periodo // filtra pelo tipo de operação if (!empty($operacao)) { $select->where(""mi.tpSaldoInicial = ? OR mi.tpSaldoInicial IS NULL"", $operacao); $select->where(""mi.tpSaldoFinal = ? OR mi.tpSaldoFinal IS NULL"", $operacao); $select->where(""mi.cdMovimento = ? OR mi.cdMovimento IS NULL"", $operacao); } /*if(is_null($count)){ /*$select->order(""mi.tpRegistro""); $select->order(""(p.AnoProjeto+p.Sequencial)""); $select->order(""m.dtInicioMovimento""); $select->order(""m.dtFimMovimento""); $select->order(""mi.dtMovimento""); $select->order(array(5,26,2,3,17)); }*/ //paginacao if ($tamanho > -1) { $tmpInicio = 0; if ($inicio > -1) { $tmpInicio = $inicio; } $select->limit($tamanho, $tmpInicio); } //x($select->assemble()); return $this->fetchAll($select); } // fecha método buscarDados() /** * Método para cadastrar * @access public * @param array $dados * @return integer (retorna o último id cadastrado) */ public function cadastrarDados($dados) { return $this->insert($dados); } // fecha método cadastrarDados() /** * Método para alterar * @access public * @param array $dados * @param integer $where * @return integer (quantidade de registros alterados) */ public function alterarDados($dados, $where) { $where = ""idMovimentacaoBancaria = "" . $where; return $this->update($dados, $where); } // fecha método alterarDados() /** * Método para excluir * @access public * @param integer $where * @return integer (quantidade de registros excluídos) */ public function excluirDados($where) { $where = ""idMovimentacaoBancaria = "" . $where; return $this->delete($where); } // fecha método excluirDados() } // fecha class",0 "/ it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // VPL for Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with VPL for Moodle. If not, see . /** * Class to show two files diff * * @package mod_vpl * @copyright 2012 Juan Carlos Rodríguez-del-Pino * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Juan Carlos Rodríguez-del-Pino */ require_once dirname(__FILE__).'/../../../config.php'; require_once dirname(__FILE__).'/../locallib.php'; require_once dirname(__FILE__).'/../vpl.class.php'; require_once dirname(__FILE__).'/../vpl_submission.class.php'; require_once dirname(__FILE__).'/../views/sh_base.class.php'; require_once dirname(__FILE__).'/similarity_factory.class.php'; require_once dirname(__FILE__).'/similarity_base.class.php'; class vpl_diff{ /** * Remove chars and digits * @param $line string to process * @return string without chars and digits */ static function removeAlphaNum($line){ $ret=''; $l= strlen($line); //Parse line to remove alphanum chars for($i=0; $i<$l; $i++){ $c=$line[$i]; if(!ctype_alnum($c) && $c != ' '){ $ret.=$c; } } return $ret; } /** * Calculate the similarity of two lines * @param $line1 * @param $line2 * @return int (3 => trimmed equal, 2 =>removeAlphaNum , 1 => start of line , 0 => not equal) */ static function diffLine($line1,$line2){ //TODO Refactor. //This is a bad solution that must be rebuild to consider diferent languages //Compare trimed text $line1=trim($line1); $line2=trim($line2); if($line1==$line2){ if(strlen($line1)>0){ return 3; }else{ return 1; } } //Compare filtered text (removing alphanum) $rAN1=self::removeAlphaNum($line1); $limit = strlen($rAN1); if($limit>0){ if($limit>3){ $limite = 3; } if(strncmp($rAN1,self::removeAlphaNum($line2),$limit) == 0){ return 2; } } //Compare start of line $l=4; if($l>strlen($line1)){ $l=strlen($line1); } if($l>strlen($line2)){ $l=strlen($line2); } for($i=0; $i<$l; ++$i){ if($line1[$i] !=$line2[$i]){ break; } } return $i>0 ? 1:0; } static function newLineInfo($type,$ln1,$ln2=0){ $ret = new StdClass(); $ret->type = $type; $ret->ln1 = $ln1; $ret->ln2 = $ln2; return $ret; } /** * Initialize used matrix * @param $matrix matrix to initialize * @param $prev matrix to initialize * @param $nl1 number of rows * @param $nl2 number of columns * @return void */ static function initAuxiliarMatrices(&$matrix,&$prev,$nl1,$nl2){ // matrix[0..nl1+1][0..nl2+1]=0 $row = array_pad(array(),$nl2+1,0); $matrix = array_pad(array(),$nl1+1,$row); // prev[0..nl1+1][0..nl2+1]=0 $prev = $matrix; //update first column for($i=0; $i<=$nl1;$i++){ $matriz[$i][0]=0; $prev[$i][0]=-1; } //update first row for($j=1; $j<=$nl2;$j++){ $matriz[0][$j]=0; $prev[0][$j]=1; } } /** * Calculate diff for two array of lines * @param $lines1 array of string * @param $lines2 array of string * @return array of objects with info to show the two array of lines */ static function calculateDiff($lines1,$lines2){ $ret = array(); $nl1=count($lines1); $nl2=count($lines2); if($nl1==0 && $nl2==0){ return false; } if($nl1==0){ //There is no first file foreach($lines2 as $pos => $line){ $ret[] = self::newLineInfo('>',0,$pos+1); } return $ret; } if($nl2==0){ //There is no second file foreach($lines1 as $pos => $line){ $ret[] = self::newLineInfo('<',$pos+1); } return $ret; } self::initAuxiliarMatrices($matrix,$prev,$nl1,$nl2); //Matrix processing for($i=1; $i <= $nl1;$i++){ $line=$lines1[$i-1]; for($j=1; $j<=$nl2;$j++){ if($matrix[$i][$j-1]>$matrix[$i-1][$j]) { $max=$matrix[$i][$j-1]; $best = 1; }else{ $max=$matrix[$i-1][$j]; $best = -1; } $prize=self::diffLine($line,$lines2[$j-1]); if($matrix[$i-1][$j-1]+$prize>=$max){ $max=$matrix[$i-1][$j-1]+$prize; $best = 0; } $matrix[$i][$j]=$max; $prev[$i][$j]=$best; } } //Calculate show info $limit=$nl1+$nl2; $pairs = array(); $pi=$nl1; $pj=$nl2; while((!($pi == 0 && $pj == 0)) && $limit>0){ $pair = new stdClass(); $pair->i = $pi; $pair->j = $pj; $pairs[]=$pair; $p = $prev[$pi][$pj]; if($p == 0){ $pi--; $pj--; }elseif($p == -1){ $pi--; }else{ $pj--; } $limit--; } krsort($pairs); $prevpair = new stdClass(); $prevpair->i=0; $prevpair->j=0; foreach($pairs as $pair){ if($pair->i == $prevpair->i+1 && $pair->j == $prevpair->j+1){ //Regular advance if($lines1[$pair->i-1] == $lines2[$pair->j-1]){ //Equals $ret[]=self::newLineInfo('=',$pair->i,$pair->j); }else{ $ret[]=self::newLineInfo('#',$pair->i,$pair->j); } }elseif($pair->i == $prevpair->i+1){ //Removed next line $ret[]=self::newLineInfo('<',$pair->i); }elseif($pair->j == $prevpair->j+1){ //Added one line $ret[]=self::newLineInfo('>',0,$pair->j); }else{ debugging(""Internal error "".print_r($pair,true)."" "".print_r($prevpair,true)); } $prevpair=$pair; } return $ret; } static function show($filename1, $data1, $HTMLheader1, $filename2, $data2, $HTMLheader2) { //Get file lines $nl = vpl_detect_newline($data1); $lines1 = explode($nl,$data1); $nl = vpl_detect_newline($data2); $lines2 = explode($nl,$data2); //Get dif as an array of info $diff = self::calculateDiff($lines1,$lines2); if($diff === false){ return; } $separator= array('<'=>' <<< ', '>'=>' >>> ','='=>' === ','#'=>' ### '); $emptyline="" \n""; $data1=''; $data2=''; $datal1=''; $datal2=''; $diffl=''; $lines1[-1]=''; $lines2[-1]=''; foreach($diff as $line){ $diffl.= $separator[$line->type].""\n""; if($line->ln1){ $datal1.=$line->ln1."" \n""; $data1.=$lines1[$line->ln1-1].""\n""; }else{ $data1.="" \n""; $datal1.=$emptyline; } if($line->ln2){ $datal2.=$line->ln2."" \n""; $data2.=$lines2[$line->ln2-1].""\n""; }else{ $data2.="" \n""; $datal2.=$emptyline; } } echo '
                  '; //Header echo '
                  '; echo $HTMLheader1; echo '
                  '; echo '
                  '; echo $HTMLheader2; echo '
                  '; echo '
                  '; //Files echo '
                  '; echo '
                  ';
                          echo $datal1;
                          echo '
                  '; echo '
                  '; echo '
                  '; $shower= vpl_sh_factory::get_sh($filename1); $shower->print_file($filename1,$data1,false); echo '
                  '; echo '
                  '; echo '
                  ';
                          echo $diffl;
                          echo '
                  '; echo '
                  '; echo '
                  '; echo '
                  ';
                          echo $datal2;
                          echo '
                  '; echo '
                  '; echo '
                  '; $shower= vpl_sh_factory::get_sh($filename2); $shower->print_file($filename2,$data2,false); echo '
                  '; echo '
                  '; echo '
                  '; } static function vpl_get_similfile($f,$vpl,&$HTMLheader,&$filename,&$data){ global $DB; $HTMLheader=''; $filename=''; $data=''; $type = required_param('type'.$f, PARAM_INT); if($type==1){ $subid = required_param('subid'.$f, PARAM_INT); $filename = required_param('filename'.$f, PARAM_TEXT); $subinstance = $DB->get_record('vpl_submissions',array('id' => $subid)); if($subinstance !== false){ $vpl = new mod_vpl(false,$subinstance->vpl); $vpl->require_capability(VPL_SIMILARITY_CAPABILITY); $submission = new mod_vpl_submission($vpl,$subinstance); $user = $DB->get_record('user', array('id' => $subinstance->userid)); if($user){ $HTMLheader .='get_course_module()->id,'userid',$subinstance->userid).'"">'; } $HTMLheader .=s($filename).' '; if($user){ $HTMLheader .= ''; $HTMLheader .= $vpl->user_fullname_picture($user); } $fg = $submission->get_submitted_fgm(); $data = $fg->getFileData($filename); \mod_vpl\event\vpl_diff_viewed::log($submission); } }elseif($type == 2){ //FIXME adapt to moodle 2.x /* global $CFG; $dirname = required_param('dirname'.$f,PARAM_RAW); $filename = required_param('filename'.$f,PARAM_RAW); $base=$CFG->dataroot.'/'.$vpl->get_course()->id.'/'; $data = file_get_contents($base.$dirname.'/'.$filename); $HTMLheader .= $filename.' '.optional_param('username'.$f,'',PARAM_TEXT); */ }elseif($type == 3){ global $CFG; $data=''; $zipname = required_param('zipfile'.$f,PARAM_RAW); $filename = required_param('filename'.$f,PARAM_RAW); $HTMLheader .= $filename.' '.optional_param('username'.$f,'',PARAM_TEXT); $ext = strtoupper(pathinfo($zipfile,PATHINFO_EXTENSION)); if($ext != 'ZIP'){ print_error('nozipfile'); } $zip = new ZipArchive(); $zipfilename=self::get_zip_filepath($zipname); if($zip->open($zipfilename)){ $data=$zip->getFromName($filename); $zip->close(); } }else{ print_error('type error'); } } } ",0 "org/1999/xhtml""> linalg: linalg_immutable::eigen_results Type Reference
                  linalg  1.6.0
                  A linear algebra library that provides a user-friendly interface to several BLAS and LAPACK routines.
                  linalg_immutable::eigen_results Type Reference

                  Defines a container for the output of an Eigen analysis of a square matrix. More...

                  Private Attributes

                  complex(real64), dimension(:), allocatable values
                   An N-element array containing the eigenvalues.
                   
                  complex(real64), dimension(:,:), allocatable vectors
                   An N-by-N matrix containing the N right eigenvectors (one per column).
                   

                  Detailed Description

                  Defines a container for the output of an Eigen analysis of a square matrix.

                  Definition at line 187 of file linalg_immutable.f90.


                  The documentation for this type was generated from the following file:
                  ",0 "work with CSS and JS within Fabricator Fabricator comes with little opinion about how you should architect your Stylesheets and JavaScript. Each use case is different, so it's up to you to define what works best. Out of the box, you'll find a single `.scss` and `.js` file. These are the entry points for Sass compilation and Webpack respectively. It is recommended that you leverage the module importing features of each preprocessor to compile your toolkit down to a single `.css` and `.js` file. Practically speaking, you should be able to drop these two files into any application and have full access to your entire toolkit. {{/markdown}} ",0 "d; debugLogger myLogger; sharedData myData; arduinoWrite ardWriter; Socket pipe; //Variables String data; long startTime; long endTime; boolean dead = false; public networkRead(Socket tempSocket, sharedData tempData, debugLogger tempLog, arduinoWrite tempWriter) { pipe = tempSocket; myData = tempData; myLogger = tempLog; ardWriter = tempWriter; try { read = new Scanner(tempSocket.getInputStream()); } catch (IOException e) { myLogger.writeLog(""ERROR: Failure to write to network socket!""); myLogger.writeLog(""\n\n""); e.printStackTrace(); myLogger.writeLog(""\n\n""); } } public void run() { data = ""myData""; startTime = System.currentTimeMillis(); endTime = startTime + 2000; while (myData.getAlive()) { if(pipe.isConnected()) { if(read.hasNextLine()) { //Read data data = read.nextLine(); data = data.trim(); //Store Data in shared object myData.setReadNet(data); //Log the input myLogger.writeLog(""Read From Server: \t"" + data); //Pass input to arduino ardWriter.writeToSerial(data); } } if(data.equals(""ping"")) { startTime = System.currentTimeMillis(); endTime = startTime + 2000; } keepAlive(); data = """"; } ardWriter.writeToSerial(""BB""); ardWriter.writeToSerial(""EVF""); ardWriter.writeToSerial(""OFF""); myLogger.writeLog(""CRITICAL: CONNECTION LOST!""); } public void keepAlive() { long temp = System.currentTimeMillis(); if((temp >endTime)) { myData.setAliveArd(false); myData.setAliveNet(false); } } } ",0 "enerated by javadoc (version 1.7.0_111) on Wed Oct 12 14:47:58 CST 2016 --> 类 cn.smssdk.gui.layout.Res的使用
                  • 上一个
                  • 下一个

                  类 cn.smssdk.gui.layout.Res
                  的使用

                  没有cn.smssdk.gui.layout.Res的用法
                  • 上一个
                  • 下一个
                  ",0 "rg/1999/xhtml""> Bombás játék: Member List
                  Bombás játék
                  Bomb Member List

                  This is the complete list of members for Bomb, including all inherited members.

                  Bomb()Bombinline
                  Bomb(TIME iactivated, Point< int > ipoint, Player *iplayer)Bombinline
                  boom()Bombinline
                  boom(TIME inow)Bombinline
                  getOwner()Bombinline
                  getPoint()Bombinline
                  getSize()Bombinline
                  getX()Bombinline
                  getY()Bombinline
                  state()Bombinline

                  Generated on Mon Dec 16 2013 00:21:07 for Bombás játék by   1.8.5
                  ",0 "h this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. * */ package org.apache.airavata.registry.core.app.catalog.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import java.io.Serializable; import java.sql.Timestamp; @Entity @Table(name = ""APPLICATION_INTERFACE"") public class ApplicationInterface implements Serializable { @Id @Column(name = ""INTERFACE_ID"") private String interfaceID; @Column(name = ""APPLICATION_NAME"") private String appName; @Column(name = ""APPLICATION_DESCRIPTION"") private String appDescription; @Column(name = ""CREATION_TIME"") private Timestamp creationTime; @Column(name = ""GATEWAY_ID"") private String gatewayId; @Column(name = ""ARCHIVE_WORKING_DIRECTORY"") private boolean archiveWorkingDirectory; @Column(name = ""HAS_OPTIONAL_FILE_INPUTS"") private boolean hasOptionalFileInputs; @Column(name = ""UPDATE_TIME"") private Timestamp updateTime; public String getGatewayId() { return gatewayId; } public void setGatewayId(String gatewayId) { this.gatewayId = gatewayId; } public boolean isArchiveWorkingDirectory() { return archiveWorkingDirectory; } public void setArchiveWorkingDirectory(boolean archiveWorkingDirectory) { this.archiveWorkingDirectory = archiveWorkingDirectory; } public Timestamp getCreationTime() { return creationTime; } public void setCreationTime(Timestamp creationTime) { this.creationTime = creationTime; } public Timestamp getUpdateTime() { return updateTime; } public void setUpdateTime(Timestamp updateTime) { this.updateTime = updateTime; } public String getInterfaceID() { return interfaceID; } public void setInterfaceID(String interfaceID) { this.interfaceID = interfaceID; } public String getAppName() { return appName; } public void setAppName(String appName) { this.appName = appName; } public String getAppDescription() { return appDescription; } public void setAppDescription(String appDescription) { this.appDescription = appDescription; } public boolean isHasOptionalFileInputs() { return hasOptionalFileInputs; } public void setHasOptionalFileInputs(boolean hasOptionalFileInputs) { this.hasOptionalFileInputs = hasOptionalFileInputs; } } ",0 "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. */ package com.contentful.java.cma; import com.contentful.java.cma.model.CMAArray; import com.contentful.java.cma.model.CMATag; import io.reactivex.Flowable; import retrofit2.Response; import retrofit2.http.GET; import retrofit2.http.PUT; import retrofit2.http.Path; import retrofit2.http.QueryMap; import retrofit2.http.Body; import retrofit2.http.DELETE; import java.util.Map; /** * Spaces Service. */ interface ServiceContentTags { @GET(""/spaces/{space_id}/environments/{environment_id}/tags"") Flowable> fetchAll( @Path(""space_id"") String spaceId, @Path(""environment_id"") String environmentID, @QueryMap Map query ); @PUT(""/spaces/{space_id}/environments/{environment_id}/tags/{tag_id}"") Flowable create( @Path(""space_id"") String spaceId, @Path(""environment_id"") String environmentID, @Path(""tag_id"") String tagId, @Body CMATag tag); @GET(""/spaces/{space_id}/environments/{environment_id}/tags/{tag_id}"") Flowable fetchOne( @Path(""space_id"") String spaceId, @Path(""environment_id"") String environmentID, @Path(""tag_id"") String tagId ); @PUT(""/spaces/{space_id}/environments/{environment_id}/tags/{tag_id}"") Flowable update( @Path(""space_id"") String spaceId, @Path(""environment_id"") String environmentID, @Path(""tag_id"") String tagId, @Body CMATag tag); @DELETE(""/spaces/{space_id}/environments/{environment_id}/tags/{tag_id}"") Flowable> delete( @Path(""space_id"") String spaceId, @Path(""environment_id"") String environmentID, @Path(""tag_id"") String tagId); } ",0 " div { all: initial; } div { all: initial; color: red; } div { color: red; all: initial; } div { all: initial !important; color: red; } div { all: initial; color: red !important; } div { all: inherit; } div { all: inherit; color: red; } div { color: red; all: inherit; } div { all: inherit !important; color: red; } div { all: inherit; color: red !important; } div { all: red; all: none; all: 10px; all: auto; all: url(about:blank); } div { direction: ltr; all: initial; direction: rtl; } div { direction: ltr; unicode-bidi: bidi-override; all: initial !important; } div { direction: ltr; all: initial; color: red; } div { all: initial; font-size: 10px; } div { all: initial; width: inherit; } div { all: unset; } div { all: unset; color: red; } ",0 " Artisan Smarty | // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright 2004-2005 ARTISAN PROJECT All rights reserved. | // +----------------------------------------------------------------------+ // | Authors: Akito | // +----------------------------------------------------------------------+ // /** * ArtisanSmarty plugin * @package ArtisanSmarty * @subpackage plugins */ /** * Smarty count_sentences modifier plugin * * Type: modifier
                  * Name: count_sentences * Purpose: count the number of sentences in a text * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php * count_sentences (Smarty online manual) * @param string * @return integer */ function smarty_modifier_count_sentences($string) { // find periods with a word before but not after. return preg_match_all('/[^\s]\.(?!\w)/', $string, $match); } /* vim: set expandtab: */ ?> ",0 " OpenNMS Group, Inc. * OpenNMS(R) is Copyright (C) 1999-2014 The OpenNMS Group, Inc. * * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc. * * OpenNMS(R) is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, * or (at your option) any later version. * * OpenNMS(R) is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with OpenNMS(R). If not, see: * http://www.gnu.org/licenses/ * * For more information contact: * OpenNMS(R) Licensing * http://www.opennms.org/ * http://www.opennms.com/ *******************************************************************************/ package org.opennms.netmgt.jasper.resource; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRField; import net.sf.jasperreports.engine.JRQuery; import net.sf.jasperreports.engine.JRQueryChunk; import net.sf.jasperreports.engine.base.JRBaseQuery; import net.sf.jasperreports.engine.design.JRDesignDataset; import org.junit.Test; public class ResourceQueryFieldsProviderTest { private class TestDatasetImpl extends JRDesignDataset{ /** * */ private static final long serialVersionUID = 1L; public TestDatasetImpl() { super(true); } private String m_queryText = """"; public JRQuery getQuery() { JRQuery query = new JRBaseQuery() { /** * */ private static final long serialVersionUID = 1L; public JRQueryChunk[] getChunks() { return null; } public String getLanguage() { return ""resourceQuery""; } public String getText() { return getQueryText(); } }; return query; } public String getQueryText() { return m_queryText; } public void setQueryText(String queryText) { m_queryText = queryText; } } @Test public void testQueryWithDsNames() throws UnsupportedOperationException, JRException { TestDatasetImpl reportDataset = new TestDatasetImpl(); reportDataset.setQueryText(""--rrdDir share/rrd/snmp --nodeId 47 --resourceName opennms-jvm --dsName TotalMemory""); ResourceQueryFieldsProvider provider = new ResourceQueryFieldsProvider(); JRField[] fields = provider.getFields(null, reportDataset, null); assertNotNull(fields); assertEquals(2, fields.length); assertEquals(""Path"", fields[0].getName()); assertEquals(""TotalMemory"", fields[1].getName()); } @Test public void testQueryWithManyDsNames() throws UnsupportedOperationException, JRException { TestDatasetImpl reportDataset = new TestDatasetImpl(); reportDataset.setQueryText(""--rrdDir share/rrd/snmp --nodeId 47 --resourceName opennms-jvm --dsName TotalMemory,DsName1,DsName2,DsName3""); ResourceQueryFieldsProvider provider = new ResourceQueryFieldsProvider(); JRField[] fields = provider.getFields(null, reportDataset, null); assertNotNull(fields); assertEquals(5, fields.length); assertEquals(""Path"", fields[0].getName()); assertEquals(""TotalMemory"", fields[1].getName()); assertEquals(""DsName1"", fields[2].getName()); assertEquals(""DsName2"", fields[3].getName()); assertEquals(""DsName3"", fields[4].getName()); } @Test public void testQueryWithStringProperties() throws UnsupportedOperationException, JRException { TestDatasetImpl reportDataset = new TestDatasetImpl(); reportDataset.setQueryText(""--rrdDir share/rrd/snmp --nodeId 47 --resourceName opennms-jvm --dsName TotalMemory,DsName1,DsName2,DsName3 --string nsVpnMonVpnName""); ResourceQueryFieldsProvider provider = new ResourceQueryFieldsProvider(); JRField[] fields = provider.getFields(null, reportDataset, null); assertNotNull(fields); assertEquals(6, fields.length); assertEquals(""Path"", fields[0].getName()); assertEquals(""TotalMemory"", fields[1].getName()); assertEquals(""DsName1"", fields[2].getName()); assertEquals(""DsName2"", fields[3].getName()); assertEquals(""DsName3"", fields[4].getName()); assertEquals(""nsVpnMonVpnName"", fields[5].getName()); } @Test public void testQueryWithMultipleStringProperties() throws UnsupportedOperationException, JRException { TestDatasetImpl reportDataset = new TestDatasetImpl(); reportDataset.setQueryText(""--rrdDir share/rrd/snmp --nodeId 47 --resourceName opennms-jvm --dsName TotalMemory,DsName1,DsName2,DsName3 --string nsVpnMonVpnName,name2,name3""); ResourceQueryFieldsProvider provider = new ResourceQueryFieldsProvider(); JRField[] fields = provider.getFields(null, reportDataset, null); assertNotNull(fields); assertEquals(8, fields.length); assertEquals(""Path"", fields[0].getName()); assertEquals(""TotalMemory"", fields[1].getName()); assertEquals(""DsName1"", fields[2].getName()); assertEquals(""DsName2"", fields[3].getName()); assertEquals(""DsName3"", fields[4].getName()); assertEquals(""nsVpnMonVpnName"", fields[5].getName()); assertEquals(""name2"", fields[6].getName()); assertEquals(""name3"", fields[7].getName()); } @Test public void testQueryWithoutDsNames() throws UnsupportedOperationException, JRException { TestDatasetImpl reportDataset = new TestDatasetImpl(); reportDataset.setQueryText(""--rrdDir share/rrd/snmp --nodeId 47 --resourceName opennms-jvm""); ResourceQueryFieldsProvider provider = new ResourceQueryFieldsProvider(); JRField[] fields = provider.getFields(null, reportDataset, null); assertNotNull(fields); assertEquals(1, fields.length); assertEquals(""Path"", fields[0].getName()); } } ",0 " use Circle314\Concept\Identification\IdentifiableInterface; interface QueryInterface extends IdentifiableInterface { /** * Gets an existing Response for the Query. * * @param $responseID * @return ResponseInterface */ public function getResponse($responseID); /** * Whether or not there is an existing Response for the Query. * * @param $responseID * @return bool */ public function hasResponse($responseID); /** * Saves a Response against the Query. * * @param $responseID * @param $response */ public function saveResponse($responseID, $response); }",0 " modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __CS_CSTOOL_RBUFLOCK_H__ #define __CS_CSTOOL_RBUFLOCK_H__ /**\file * Helper class for convenient locking/unlocking of an iRenderBuffer. */ #include ""csutil/ref.h"" #include ""ivideo/rndbuf.h"" /** * Helper class for convenient locking/unlocking of an iRenderBuffer. * * The buffer is locked upon construction of the csRenderBufferLock<> object * and unlocked on destruction. * * The contents can be accessed either directly, array-style or iterator-style * in a typed way. * \remarks The TbufferKeeper template argument can be used to have the * lock store the buffer in a csRef (instead a iRenderBuffer*) * in case there is a risk that the buffer gets destroyed while thelock * exists. */ template class csRenderBufferLock { /// Buffer that is being locked TbufferKeeper buffer; /// Buffer data T* lockBuf; /// Distance between two elements size_t bufStride; #ifdef CS_DEBUG /// Number of elements size_t elements; #endif /// Index of current element size_t currElement; typedef csRenderBufferLock LockType; /** * Helper class used when returning values from operators such as * ++ or +=. The idea is that these operators should return a pointer * to the element, yet should check accesses for validity in debug mode. * However, it is quite common to increment the element pointer beyond * the last element in loops, but not use it. Checking the element number * for validity may throw a false alarm in this cases. Hence this class * to allow for ""delayed"" checking. */ struct PointerProxy { #ifdef CS_DEBUG const LockType& parent; size_t elemNum; #else T* p; #endif PointerProxy (const LockType& parent, size_t elemNum) #ifdef CS_DEBUG : parent (parent), elemNum (elemNum) #else : p (&parent.Get (elemNum)) #endif { } T& operator*() { #ifdef CS_DEBUG return parent.Get (elemNum); #else return *p; #endif } const T& operator*() const { #ifdef CS_DEBUG return parent.Get (elemNum); #else return *p; #endif } operator T*() const { #ifdef CS_DEBUG return &(parent.Get (elemNum)); #else return p; #endif } }; csRenderBufferLock() {} // Copying the locking stuff is somewhat nasty so ... prevent it csRenderBufferLock (const csRenderBufferLock& other) {} /// Unlock the renderbuffer. void Unlock () { if (buffer) buffer->Release(); } public: /** * Construct the helper. Locks the buffer. */ csRenderBufferLock (iRenderBuffer* buf, csRenderBufferLockType lock = CS_BUF_LOCK_NORMAL) : buffer(buf), lockBuf(0), bufStride(buf ? buf->GetElementDistance() : 0), currElement(0) { #ifdef CS_DEBUG elements = buf ? buf->GetElementCount() : 0; #endif lockBuf = buffer ? ((T*)((uint8*)buffer->Lock (lock))) : (T*)-1; } /** * Destruct the helper. Unlocks the buffer. */ ~csRenderBufferLock() { Unlock(); } /** * Lock the renderbuffer. Returns a pointer to the contained data. * \remarks Watch the stride of the buffer. */ T* Lock () const { return lockBuf; } /** * Retrieve a pointer to the contained data. * \remarks Watch the stride of the buffer. **/ operator T* () const { return Lock(); } /// Get current element. T& operator*() const { return Get (currElement); } /// Set current element to the next, pre-increment version. PointerProxy operator++ () { currElement++; return PointerProxy (*this, currElement); } /// Set current element to the next, post-increment version. PointerProxy operator++ (int) { size_t n = currElement; currElement++; return PointerProxy (*this, n); } /// Add a value to the current element index. PointerProxy operator+= (int n) { currElement += n; return PointerProxy (*this, currElement); } /// Retrieve an item in the render buffer. T& operator [] (size_t n) const { return Get (n); } /// Retrieve an item in the render buffer. T& Get (size_t n) const { CS_ASSERT (n < elements); return *((T*)((uint8*)Lock() + n * bufStride)); } /// Retrieve number of items in buffer. size_t GetSize() const { return buffer ? buffer->GetElementCount() : 0; } /// Returns whether the buffer is valid (ie not null). bool IsValid() const { return buffer.IsValid(); } }; #endif // __CS_CSTOOL_RBUFLOCK_H__ ",0 "ware and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Sogiftware. THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ package org.dvare.annotations; import org.dvare.expression.datatype.DataType; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface Type { DataType dataType(); } ",0 "

                  Future interface of module EDT

                  This part of the software is under development. It is the new interface of module EDT, resulting of a complete refactorisation of the module. The objective is to pass all the module into object MVC.

                  ",0 " LICENSE file. #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ #include #include #include #include #include #include ""base/atomicops.h"" #include ""base/containers/hash_tables.h"" #include ""base/macros.h"" #include ""base/memory/ref_counted.h"" #include ""base/memory/singleton.h"" #include ""base/synchronization/lock.h"" #include ""base/timer/timer.h"" #include ""base/trace_event/memory_dump_request_args.h"" #include ""base/trace_event/process_memory_dump.h"" #include ""base/trace_event/trace_event.h"" namespace base { class SingleThreadTaskRunner; class Thread; namespace trace_event { class MemoryDumpManagerDelegate; class MemoryDumpProvider; class MemoryDumpSessionState; // This is the interface exposed to the rest of the codebase to deal with // memory tracing. The main entry point for clients is represented by // RequestDumpPoint(). The extension by Un(RegisterDumpProvider). class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { public: static const char* const kTraceCategory; // This value is returned as the tracing id of the child processes by // GetTracingProcessId() when tracing is not enabled. static const uint64_t kInvalidTracingProcessId; static MemoryDumpManager* GetInstance(); // Invoked once per process to listen to trace begin / end events. // Initialization can happen after (Un)RegisterMemoryDumpProvider() calls // and the MemoryDumpManager guarantees to support this. // On the other side, the MemoryDumpManager will not be fully operational // (i.e. will NACK any RequestGlobalMemoryDump()) until initialized. // Arguments: // is_coordinator: if true this MemoryDumpManager instance will act as a // coordinator and schedule periodic dumps (if enabled via TraceConfig); // false when the MemoryDumpManager is initialized in a slave process. // delegate: inversion-of-control interface for embedder-specific behaviors // (multiprocess handshaking). See the lifetime and thread-safety // requirements in the |MemoryDumpManagerDelegate| docstring. void Initialize(MemoryDumpManagerDelegate* delegate, bool is_coordinator); // (Un)Registers a MemoryDumpProvider instance. // Args: // - mdp: the MemoryDumpProvider instance to be registered. MemoryDumpManager // does NOT take memory ownership of |mdp|, which is expected to either // be a singleton or unregister itself. // - name: a friendly name (duplicates allowed). Used for debugging and // run-time profiling of memory-infra internals. Must be a long-lived // C string. // - task_runner: either a SingleThreadTaskRunner or SequencedTaskRunner. All // the calls to |mdp| will be run on the given |task_runner|. If passed // null |mdp| should be able to handle calls on arbitrary threads. // - options: extra optional arguments. See memory_dump_provider.h. void RegisterDumpProvider(MemoryDumpProvider* mdp, const char* name, scoped_refptr task_runner); void RegisterDumpProvider(MemoryDumpProvider* mdp, const char* name, scoped_refptr task_runner, MemoryDumpProvider::Options options); void RegisterDumpProviderWithSequencedTaskRunner( MemoryDumpProvider* mdp, const char* name, scoped_refptr task_runner, MemoryDumpProvider::Options options); void UnregisterDumpProvider(MemoryDumpProvider* mdp); // Unregisters an unbound dump provider and takes care about its deletion // asynchronously. Can be used only for for dump providers with no // task-runner affinity. // This method takes ownership of the dump provider and guarantees that: // - The |mdp| will be deleted at some point in the near future. // - Its deletion will not happen concurrently with the OnMemoryDump() call. // Note that OnMemoryDump() calls can still happen after this method returns. void UnregisterAndDeleteDumpProviderSoon(scoped_ptr mdp); // Requests a memory dump. The dump might happen or not depending on the // filters and categories specified when enabling tracing. // The optional |callback| is executed asynchronously, on an arbitrary thread, // to notify about the completion of the global dump (i.e. after all the // processes have dumped) and its success (true iff all the dumps were // successful). void RequestGlobalDump(MemoryDumpType dump_type, MemoryDumpLevelOfDetail level_of_detail, const MemoryDumpCallback& callback); // Same as above (still asynchronous), but without callback. void RequestGlobalDump(MemoryDumpType dump_type, MemoryDumpLevelOfDetail level_of_detail); // TraceLog::EnabledStateObserver implementation. void OnTraceLogEnabled() override; void OnTraceLogDisabled() override; // Returns the MemoryDumpSessionState object, which is shared by all the // ProcessMemoryDump and MemoryAllocatorDump instances through all the tracing // session lifetime. const scoped_refptr& session_state() const { return session_state_; } // Returns a unique id for identifying the processes. The id can be // retrieved by child processes only when tracing is enabled. This is // intended to express cross-process sharing of memory dumps on the // child-process side, without having to know its own child process id. uint64_t GetTracingProcessId() const; // Returns the name for a the allocated_objects dump. Use this to declare // suballocator dumps from other dump providers. // It will return nullptr if there is no dump provider for the system // allocator registered (which is currently the case for Mac OS). const char* system_allocator_pool_name() const { return kSystemAllocatorPoolName; }; // When set to true, calling |RegisterMemoryDumpProvider| is a no-op. void set_dumper_registrations_ignored_for_testing(bool ignored) { dumper_registrations_ignored_for_testing_ = ignored; } private: friend std::default_delete; // For the testing instance. friend struct DefaultSingletonTraits; friend class MemoryDumpManagerDelegate; friend class MemoryDumpManagerTest; // Descriptor used to hold information about registered MDPs. // Some important considerations about lifetime of this object: // - In nominal conditions, all the MemoryDumpProviderInfo instances live in // the |dump_providers_| collection (% unregistration while dumping). // - Upon each dump they (actually their scoped_refptr-s) are copied into // the ProcessMemoryDumpAsyncState. This is to allow removal (see below). // - When the MDP.OnMemoryDump() is invoked, the corresponding MDPInfo copy // inside ProcessMemoryDumpAsyncState is removed. // - In most cases, the MDPInfo is destroyed within UnregisterDumpProvider(). // - If UnregisterDumpProvider() is called while a dump is in progress, the // MDPInfo is destroyed in SetupNextMemoryDump() or InvokeOnMemoryDump(), // when the copy inside ProcessMemoryDumpAsyncState is erase()-d. // - The non-const fields of MemoryDumpProviderInfo are safe to access only // on tasks running in the |task_runner|, unless the thread has been // destroyed. struct MemoryDumpProviderInfo : public RefCountedThreadSafe { // Define a total order based on the |task_runner| affinity, so that MDPs // belonging to the same SequencedTaskRunner are adjacent in the set. struct Comparator { bool operator()(const scoped_refptr& a, const scoped_refptr& b) const; }; using OrderedSet = std::set, Comparator>; MemoryDumpProviderInfo(MemoryDumpProvider* dump_provider, const char* name, scoped_refptr task_runner, const MemoryDumpProvider::Options& options); MemoryDumpProvider* const dump_provider; // Used to transfer ownership for UnregisterAndDeleteDumpProviderSoon(). // nullptr in all other cases. scoped_ptr owned_dump_provider; // Human readable name, for debugging and testing. Not necessarily unique. const char* const name; // The task runner affinity. Can be nullptr, in which case the dump provider // will be invoked on |dump_thread_|. const scoped_refptr task_runner; // The |options| arg passed to RegisterDumpProvider(). const MemoryDumpProvider::Options options; // For fail-safe logic (auto-disable failing MDPs). int consecutive_failures; // Flagged either by the auto-disable logic or during unregistration. bool disabled; private: friend class base::RefCountedThreadSafe; ~MemoryDumpProviderInfo(); DISALLOW_COPY_AND_ASSIGN(MemoryDumpProviderInfo); }; // Holds the state of a process memory dump that needs to be carried over // across task runners in order to fulfil an asynchronous CreateProcessDump() // request. At any time exactly one task runner owns a // ProcessMemoryDumpAsyncState. struct ProcessMemoryDumpAsyncState { ProcessMemoryDumpAsyncState( MemoryDumpRequestArgs req_args, const MemoryDumpProviderInfo::OrderedSet& dump_providers, scoped_refptr session_state, MemoryDumpCallback callback, scoped_refptr dump_thread_task_runner); ~ProcessMemoryDumpAsyncState(); // Gets or creates the memory dump container for the given target process. ProcessMemoryDump* GetOrCreateMemoryDumpContainerForProcess(ProcessId pid); // A map of ProcessId -> ProcessMemoryDump, one for each target process // being dumped from the current process. Typically each process dumps only // for itself, unless dump providers specify a different |target_process| in // MemoryDumpProvider::Options. std::map> process_dumps; // The arguments passed to the initial CreateProcessDump() request. const MemoryDumpRequestArgs req_args; // An ordered sequence of dump providers that have to be invoked to complete // the dump. This is a copy of |dump_providers_| at the beginning of a dump // and becomes empty at the end, when all dump providers have been invoked. std::vector> pending_dump_providers; // The trace-global session state. scoped_refptr session_state; // Callback passed to the initial call to CreateProcessDump(). MemoryDumpCallback callback; // The |success| field that will be passed as argument to the |callback|. bool dump_successful; // The thread on which FinalizeDumpAndAddToTrace() (and hence |callback|) // should be invoked. This is the thread on which the initial // CreateProcessDump() request was called. const scoped_refptr callback_task_runner; // The thread on which unbound dump providers should be invoked. // This is essentially |dump_thread_|.task_runner() but needs to be kept // as a separate variable as it needs to be accessed by arbitrary dumpers' // threads outside of the lock_ to avoid races when disabling tracing. // It is immutable for all the duration of a tracing session. const scoped_refptr dump_thread_task_runner; private: DISALLOW_COPY_AND_ASSIGN(ProcessMemoryDumpAsyncState); }; static const int kMaxConsecutiveFailuresCount; static const char* const kSystemAllocatorPoolName; MemoryDumpManager(); ~MemoryDumpManager() override; static void SetInstanceForTesting(MemoryDumpManager* instance); static void FinalizeDumpAndAddToTrace( scoped_ptr pmd_async_state); // Enable heap profiling if kEnableHeapProfiling is specified. void EnableHeapProfilingIfNeeded(); // Internal, used only by MemoryDumpManagerDelegate. // Creates a memory dump for the current process and appends it to the trace. // |callback| will be invoked asynchronously upon completion on the same // thread on which CreateProcessDump() was called. void CreateProcessDump(const MemoryDumpRequestArgs& args, const MemoryDumpCallback& callback); // Calls InvokeOnMemoryDump() for the next MDP on the task runner specified by // the MDP while registration. On failure to do so, skips and continues to // next MDP. void SetupNextMemoryDump( scoped_ptr pmd_async_state); // Invokes OnMemoryDump() of the next MDP and calls SetupNextMemoryDump() at // the end to continue the ProcessMemoryDump. Should be called on the MDP task // runner. void InvokeOnMemoryDump(ProcessMemoryDumpAsyncState* owned_pmd_async_state); // Helper for RegierDumpProvider* functions. void RegisterDumpProviderInternal( MemoryDumpProvider* mdp, const char* name, scoped_refptr task_runner, const MemoryDumpProvider::Options& options); // Helper for the public UnregisterDumpProvider* functions. void UnregisterDumpProviderInternal(MemoryDumpProvider* mdp, bool take_mdp_ownership_and_delete_async); // An ordererd set of registered MemoryDumpProviderInfo(s), sorted by task // runner affinity (MDPs belonging to the same task runners are adjacent). MemoryDumpProviderInfo::OrderedSet dump_providers_; // Shared among all the PMDs to keep state scoped to the tracing session. scoped_refptr session_state_; MemoryDumpManagerDelegate* delegate_; // Not owned. // When true, this instance is in charge of coordinating periodic dumps. bool is_coordinator_; // Protects from concurrent accesses to the |dump_providers_*| and |delegate_| // to guard against disabling logging while dumping on another thread. Lock lock_; // Optimization to avoid attempting any memory dump (i.e. to not walk an empty // dump_providers_enabled_ list) when tracing is not enabled. subtle::AtomicWord memory_tracing_enabled_; // For time-triggered periodic dumps. RepeatingTimer periodic_dump_timer_; // Thread used for MemoryDumpProviders which don't specify a task runner // affinity. scoped_ptr dump_thread_; // The unique id of the child process. This is created only for tracing and is // expected to be valid only when tracing is enabled. uint64_t tracing_process_id_; // When true, calling |RegisterMemoryDumpProvider| is a no-op. bool dumper_registrations_ignored_for_testing_; // Whether new memory dump providers should be told to enable heap profiling. bool heap_profiling_enabled_; DISALLOW_COPY_AND_ASSIGN(MemoryDumpManager); }; // The delegate is supposed to be long lived (read: a Singleton) and thread // safe (i.e. should expect calls from any thread and handle thread hopping). class BASE_EXPORT MemoryDumpManagerDelegate { public: virtual void RequestGlobalMemoryDump(const MemoryDumpRequestArgs& args, const MemoryDumpCallback& callback) = 0; // Returns tracing process id of the current process. This is used by // MemoryDumpManager::GetTracingProcessId. virtual uint64_t GetTracingProcessId() const = 0; protected: MemoryDumpManagerDelegate() {} virtual ~MemoryDumpManagerDelegate() {} void CreateProcessDump(const MemoryDumpRequestArgs& args, const MemoryDumpCallback& callback) { MemoryDumpManager::GetInstance()->CreateProcessDump(args, callback); } private: DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); }; } // namespace trace_event } // namespace base #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ ",0 "m Framework: Framework for RealTime Battle robots to communicate efficiently in a team Copyright (C) 2004 The RTB- Team Framework Group: http://rtb-team.sourceforge.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA $Log: rtbinit.h,v $ Revision 1.2 2005/02/24 10:27:55 jonico Updated newest version of the framework Revision 1.2 2005/01/06 17:59:34 jonico Now all files in the repository have their new header format. **************************************************************************/ #ifndef RTBINIT_H #define RTBINIT_H #include ""../stdnamespace.h"" #include ""../exceptions/parserexception.h"" #include ""../exceptions/ioexception.h"" /** * Namespace RTBGlobal */namespace RTBGlobal { using std::string; using Exceptions::ParserException; using std::bad_exception; using Exceptions::RTBException; using Exceptions::IOException; /** * Class RTBInit */ class RTBInit { /* * Public stuff */ public: /* * Operations */ /** * Calls the RTBConfig Parser to parse the config file, register the pasring result in the MRC * @param configFileName Path to the file containing the absolute necessary configuration data */ static void ParseConfigFile (const string& configFileName) throw (ParserException, bad_exception); /** * This method first has to switch to blocking mode * This method has to send: * 1. The Robot Option USE_NON_BLOCKING 1 (this is tricky, we do not want to be killed by the RTB Server, so we chose non blocking for it, but set our descriptors to block * 2. The Robot Option SEND_ROTATION_REACHED with a specified value in the configuration file * 3. the name and the color of the robot if requested (first sequence) * This method has to read: * 1. The Initialize Command * 2. If it is not the first sequence in the tournament, the YourColour and YourNameCommand * This methods registers the following runtime properties: * 1. Section Main, Key FirstSequence : ""true"" / ""false"" * 2. Section Main, Key ActualColor : actual color as hex string, if first sequence, this value will be set to RobotHomeColor in section Main of the configuration file * 3. Section Main, Key ActualName: actual name of the roboter given by the server, if first sequence, this value will be set to RobotName in section Main of the configuration file */ static void SendInitialMessages() throw (IOException, bad_exception); /** * Starts the game as a client or as the RTB MasterServer (automatically found out by the MRC) * @return true, if no error occured in the whole sequence, false if something went wrong and we could not continue playing */ static bool StartGame () throw (RTBException, bad_exception); }; } #endif //RTBINIT_H ",0 " by javadoc (build 1.6.0_45) on Sun Jun 09 12:16:19 GMT+05:30 2013 --> org.apache.solr.common.params (Solr 4.3.1 API)
                  Overview   Package  Class  Use  Tree  Deprecated  Help 
                   PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES    

                  Package org.apache.solr.common.params

                  Parameter constants and enumerations.

                  See:
                            Description

                  Interface Summary
                  AnalysisParams Defines the request parameters used by all analysis request handlers.
                  CollectionParams  
                  CommonParams Parameters used across many handlers
                  CoreAdminParams  
                  DisMaxParams A collection of params used in DisMaxRequestHandler, both for Plugin initialization and for Requests.
                  EventParams  
                  FacetParams Facet parameters
                  GroupParams Group parameters
                  HighlightParams  
                  MoreLikeThisParams  
                  QueryElevationParams Parameters used with the QueryElevationComponent
                  ShardParams Parameters used for distributed search.
                  SpatialParams  
                  SpellingParams Parameters used for spellchecking
                  StatsParams Stats Parameters
                  TermsParams  
                  TermVectorParams  
                  UpdateParams A collection of standard params used by Update handlers
                   

                  Class Summary
                  AppendedSolrParams SolrParams wrapper which acts similar to DefaultSolrParams except that it ""appends"" the values of multi-value params from both sub instances, so that all of the values are returned.
                  DefaultSolrParams  
                  MapSolrParams  
                  ModifiableSolrParams This class is similar to MultiMapSolrParams except you can edit the parameters after it is initialized.
                  MultiMapSolrParams  
                  RequiredSolrParams This is a simple wrapper to SolrParams that will throw a 400 exception if you ask for a parameter that does not exist.
                  SolrParams SolrParams hold request parameters.
                   

                  Enum Summary
                  CollectionParams.CollectionAction  
                  CommonParams.EchoParamStyle valid values for: echoParams
                  CoreAdminParams.CoreAdminAction  
                  FacetParams.FacetDateOther Deprecated. Use FacetParams.FacetRangeOther
                  FacetParams.FacetRangeInclude An enumeration of the legal values for FacetParams.FACET_DATE_INCLUDE and FacetParams.FACET_RANGE_INCLUDE
                  FacetParams.FacetRangeOther An enumeration of the legal values for FacetParams.FACET_RANGE_OTHER and FacetParams.FACET_DATE_OTHER ...
                  MoreLikeThisParams.TermStyle  
                  TermsParams.TermsRegexpFlag  
                   

                  Package org.apache.solr.common.params Description

                  Parameter constants and enumerations.


                  Overview   Package  Class  Use  Tree  Deprecated  Help 
                   PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES    

                  Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved. ",0 "enerated by javadoc (1.8.0_252) on Fri Aug 20 17:47:57 BST 2021 --> Uses of Class psidev.psi.mi.jami.tab.io.writer.extended.Mitab28ModelledWriter (PSI :: JAMI - Java framework for molecular interactions 3.2.12 API)
                  • Prev
                  • Next

                  Uses of Class
                  psidev.psi.mi.jami.tab.io.writer.extended.Mitab28ModelledWriter

                  No usage of psidev.psi.mi.jami.tab.io.writer.extended.Mitab28ModelledWriter
                  • Prev
                  • Next

                  Copyright © 2021. All rights reserved.

                  ",0 "tware Foundation, Inc. This file is part of GNU Inetutils. GNU Inetutils is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GNU Inetutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see `http://www.gnu.org/licenses/'. */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #if defined AUTHENTICATION || defined ENCRYPTION # include # include # include # include # include # include ""general.h"" # include ""ring.h"" # include ""externs.h"" # include ""defines.h"" # include ""types.h"" int net_write (unsigned char *str, int len) { if (NETROOM () > len) { ring_supply_data (&netoring, str, len); if (str[0] == IAC && str[1] == SE) printsub ('>', &str[2], len - 2); return (len); } return (0); } void net_encrypt () { # ifdef ENCRYPTION if (encrypt_output) ring_encrypt (&netoring, encrypt_output); else ring_clearto (&netoring); # endif /* ENCRYPTION */ } int telnet_spin () { return (-1); } char * telnet_getenv (char *val) { return ((char *) env_getvalue (val)); } char * telnet_gets (char *prompt, char *result, int length, int echo) { # if !HAVE_DECL_GETPASS extern char *getpass (); # endif extern int globalmode; int om = globalmode; char *res; TerminalNewMode (-1); if (echo) { printf (""%s"", prompt); res = fgets (result, length, stdin); } else { res = getpass (prompt); if (res) { strncpy (result, res, length); memset (res, 0, strlen (res)); res = result; } } TerminalNewMode (om); return (res); } #endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */ ",0 " var $errors = array(); var $data = array(); var $fields = array( 'id' => ""INT(11) NOT NULL AUTO_INCREMENT"", 'history_id' => ""INT(11) NOT NULL DEFAULT '0'"", 'list_id' => ""INT(11) NOT NULL DEFAULT '0'"", 'created' => ""DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'"", 'modified' => ""DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'"", 'key' => ""PRIMARY KEY (`id`), INDEX(`history_id`), INDEX(`list_id`)"", ); var $tv_fields = array( 'id' => array(""INT(11)"", ""NOT NULL AUTO_INCREMENT""), 'history_id' => array(""INT(11)"", ""NOT NULL DEFAULT '0'""), 'list_id' => array(""INT(11)"", ""NOT NULL DEFAULT '0'""), 'created' => array(""DATETIME"", ""NOT NULL DEFAULT '0000-00-00 00:00:00'""), 'modified' => array(""DATETIME"", ""NOT NULL DEFAULT '0000-00-00 00:00:00'""), 'key' => ""PRIMARY KEY (`id`), INDEX(`history_id`), INDEX(`list_id`)"" ); var $indexes = array('history_id', 'list_id'); function wpmlHistoriesList($data = array()) { global $Db; $this -> table = $this -> pre . $this -> controller; if (!empty($data)) { foreach ($data as $dkey => $dval) { $this -> {$dkey} = $dval; } } $Db -> model = $this -> model; } function defaults() { global $Html; $defaults = array( 'created' => $Html -> gen_date(), 'modified' => $Html -> gen_date(), ); return $defaults; } function validate($data = array()) { $this -> errors = array(); $data = (empty($data[$this -> model])) ? $data : $data[$this -> model]; extract($data, EXTR_SKIP); if (empty($history_id)) { $this -> errors['history_id'] = __('No history record was specified', $this -> plugin_name); } if (empty($list_id)) { $this -> errors['list_id'] = __('No mailing list was specified', $this -> plugin_name); } return $this -> errors; } } ?>",0 "c\config\configClass as config ?>

                  getUrlWeb('jugo', 'deleteSelect') ?>"" method=""POST"">
                  $id ?>"" tabindex=""-1"" role=""dialog"" aria-labelledby=""myModalLabel"" aria-hidden=""true"">

                  $id ?>?
                  $id ?>""> $procedencia) ?> getUrlWeb('jugo', 'view', array(jugoTableClass::ID => $jugo->$id)) ?>"" class=""btn btn-info btn-xs""> hasCredential('admin')): ?> getUrlWeb('jugo', 'edit', array(jugoTableClass::ID => $jugo->$id)) ?>"" class=""btn btn-primary btn-xs""> $id ?>"" class=""btn btn-danger btn-xs"">
                  getUrlWeb('jugo', 'delete') ?>"" method=""POST""> "">

                  getUrlWeb('jugo', 'report') ?>"">

                  getUrlWeb('jugo', 'index') ?>"">
                  ",0 "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. */ package com.facebook.buck.rust; import com.facebook.buck.cxx.CxxPlatform; import com.facebook.buck.cxx.CxxPlatforms; import com.facebook.buck.cxx.Linker; import com.facebook.buck.model.BuildTarget; import com.facebook.buck.model.Flavor; import com.facebook.buck.model.FlavorDomain; import com.facebook.buck.model.Flavored; import com.facebook.buck.model.InternalFlavor; import com.facebook.buck.parser.NoSuchBuildTargetException; import com.facebook.buck.rules.AbstractDescriptionArg; import com.facebook.buck.rules.BinaryWrapperRule; import com.facebook.buck.rules.BuildRule; import com.facebook.buck.rules.BuildRuleParams; import com.facebook.buck.rules.BuildRuleResolver; import com.facebook.buck.rules.CellPathResolver; import com.facebook.buck.rules.Description; import com.facebook.buck.rules.ImplicitDepsInferringDescription; import com.facebook.buck.rules.SourcePath; import com.facebook.buck.rules.SourcePathRuleFinder; import com.facebook.buck.rules.TargetGraph; import com.facebook.buck.rules.Tool; import com.facebook.buck.rules.ToolProvider; import com.facebook.buck.versions.VersionRoot; import com.facebook.infer.annotation.SuppressFieldNotInitialized; import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedSet; import java.util.Map; import java.util.Optional; import java.util.stream.Stream; public class RustTestDescription implements Description, ImplicitDepsInferringDescription, Flavored, VersionRoot { private final RustBuckConfig rustBuckConfig; private final FlavorDomain cxxPlatforms; private final CxxPlatform defaultCxxPlatform; public RustTestDescription( RustBuckConfig rustBuckConfig, FlavorDomain cxxPlatforms, CxxPlatform defaultCxxPlatform) { this.rustBuckConfig = rustBuckConfig; this.cxxPlatforms = cxxPlatforms; this.defaultCxxPlatform = defaultCxxPlatform; } @Override public Arg createUnpopulatedConstructorArg() { return new Arg(); } @Override public BuildRule createBuildRule( TargetGraph targetGraph, BuildRuleParams params, BuildRuleResolver resolver, CellPathResolver cellRoots, A args) throws NoSuchBuildTargetException { final BuildTarget buildTarget = params.getBuildTarget(); BuildTarget exeTarget = params.getBuildTarget() .withAppendedFlavors(InternalFlavor.of(""unittest"")); Optional> type = RustBinaryDescription.BINARY_TYPE.getFlavorAndValue(buildTarget); boolean isCheck = type.map(t -> t.getValue().isCheck()).orElse(false); BinaryWrapperRule testExeBuild = resolver.addToIndex( RustCompileUtils.createBinaryBuildRule( params.withBuildTarget(exeTarget), resolver, rustBuckConfig, cxxPlatforms, defaultCxxPlatform, args.crate, args.features, Stream.of( args.framework ? Stream.of(""--test"") : Stream.empty(), rustBuckConfig.getRustTestFlags().stream(), args.rustcFlags.stream()) .flatMap(x -> x).iterator(), args.linkerFlags.iterator(), RustCompileUtils.getLinkStyle(params.getBuildTarget(), args.linkStyle), args.rpath, args.srcs, args.crateRoot, ImmutableSet.of(""lib.rs"", ""main.rs""), isCheck )); SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(resolver); Tool testExe = testExeBuild.getExecutableCommand(); BuildRuleParams testParams = params.copyAppendingExtraDeps( testExe.getDeps(ruleFinder)); return new RustTest( testParams, ruleFinder, testExeBuild, args.labels, args.contacts); } @Override public void findDepsForTargetFromConstructorArgs( BuildTarget buildTarget, CellPathResolver cellRoots, Arg constructorArg, ImmutableCollection.Builder extraDepsBuilder, ImmutableCollection.Builder targetGraphOnlyDepsBuilder) { ToolProvider compiler = rustBuckConfig.getRustCompiler(); extraDepsBuilder.addAll(compiler.getParseTimeDeps()); extraDepsBuilder.addAll(CxxPlatforms.getParseTimeDeps(cxxPlatforms.getValues())); } @Override public boolean hasFlavors(ImmutableSet flavors) { if (cxxPlatforms.containsAnyOf(flavors)) { return true; } for (RustBinaryDescription.Type type : RustBinaryDescription.Type.values()) { if (flavors.contains(type.getFlavor())) { return true; } } return false; } @Override public Optional>> flavorDomains() { return Optional.of(ImmutableSet.of(cxxPlatforms, RustBinaryDescription.BINARY_TYPE)); } @Override public boolean isVersionRoot(ImmutableSet flavors) { return true; } @SuppressFieldNotInitialized public static class Arg extends AbstractDescriptionArg { public ImmutableSortedSet srcs = ImmutableSortedSet.of(); public ImmutableSet contacts = ImmutableSet.of(); public ImmutableSortedSet features = ImmutableSortedSet.of(); public ImmutableList rustcFlags = ImmutableList.of(); public ImmutableList linkerFlags = ImmutableList.of(); public ImmutableSortedSet deps = ImmutableSortedSet.of(); public Optional linkStyle; public boolean rpath = true; public boolean framework = true; public Optional crate; public Optional crateRoot; } } ",0 "that maps integer values to strings. class Dictionary { public: typedef int32_t DiffType; // return value of compare function typedef uint32_t IntType; // int is enough, no need for int64 typedef std::string StringType; typedef std::unordered_map TranslationTable; private: typedef std::unordered_map IndexMap; typedef std::unordered_map ReverseMap; public: typedef IndexMap::const_iterator const_iterator; private: // Mapping from ID to String IndexMap indexMap; // Mapping from String to ID ReverseMap reverseMap; // Mapping from ID to index in sorted order TranslationTable orderMap; // Next ID to be given IntType nextID; // Whether or not the dictionary has been modified since loading. bool modified; // Whether or not orderMap is valid bool orderValid; public: // Constructor Dictionary( void ); // Construct from dictionary name Dictionary( const std::string name ); // Destructor ~Dictionary( void ); // Look up an ID and get the String const char * Dereference( const IntType id ) const; // Look up a String and get the ID // Return invalid if not found IntType Lookup( const char * str, const IntType invalid ) const; // Insert a value into the Dictionary and return the ID. // Throw an error if the new ID is larger than maxID IntType Insert( const char * str, const IntType maxID ); // Integrate another dictionary into this one, and produce a translation // table for any values whose ID has changed. void Integrate( Dictionary& other, TranslationTable& trans ); // load/save dictionary from SQL // name specifies which dictionary to load/save void Load(const char* name); void Save(const char* name); // Compare two factors lexicographically. // The return value will be as follows: // first > second : retVal > 0 // first = second : retVal = 0 // first < second : retVal < 0 DiffType Compare( IntType firstID, IntType secondID ) const; const_iterator begin( void) const; const_iterator cbegin( void ) const; const_iterator end( void ) const; const_iterator cend( void ) const; private: // Helper method for reverse lookups IntType Lookup( const StringType& str, const IntType invalid ) const; // Helper method for inserting strings IntType Insert( StringType& str ); // Helper method to compute the sorted order. void ComputeOrder( void ); /* ***** Static Members ***** */ private: typedef std::unordered_map DictionaryMap; // Storage for global dictionaries static DictionaryMap dicts; /* ***** Static Methods ***** */ public: static Dictionary & GetDictionary( const std::string name ); }; #endif //_DICTIONARY_H_ ",0 " the LICENSE file. #ifndef CHROME_TEST_CHROMEDRIVER_STATUS_H_ #define CHROME_TEST_CHROMEDRIVER_STATUS_H_ #include // WebDriver standard status codes. enum StatusCode { kOk = 0, kUnknownCommand = 9, kUnknownError = 13, kSessionNotCreatedException = 33, // Chrome-specific status codes. kNoSuchSession = 100, kChromeNotReachable, }; // Represents a WebDriver status, which may be an error or ok. class Status { public: explicit Status(StatusCode code); Status(StatusCode code, const std::string& details); Status(StatusCode code, const Status& cause); Status(StatusCode code, const std::string& details, const Status& cause); ~Status(); bool IsOk() const; bool IsError() const; StatusCode code() const; const std::string& message() const; private: StatusCode code_; std::string msg_; }; #endif // CHROME_TEST_CHROMEDRIVER_STATUS_H_ ",0 "actory; use Oro\Bundle\PlatformBundle\Provider\PackageProvider; class PackageProviderTest extends \PHPUnit_Framework_TestCase { /** @var PackageProvider */ protected $provider; /** @var LocalRepositoryFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $factory; protected function setUp() { $this->factory = $this->getMockBuilder('Oro\Bundle\PlatformBundle\Composer\LocalRepositoryFactory') ->disableOriginalConstructor() ->getMock(); $this->provider = new PackageProvider($this->factory); } public function testGetThirdPartyPackagesEmpty() { $packages = [new Package('oro/platform', '1.0.0', '1.0.0')]; $repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface'); $repository->expects($this->once())->method('getCanonicalPackages')->willReturn($packages); $this->factory->expects($this->once())->method('getLocalRepository')->willReturn($repository); $this->assertEmpty($this->provider->getThirdPartyPackages()); } public function testGetThirdPartyPackages() { $thirdPartyPackage = new Package('not-oro/platform', '1.0.0', '1.0.0'); $packages = [new Package('oro/platform', '1.0.0', '1.0.0'), $thirdPartyPackage]; $repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface'); $repository->expects($this->once())->method('getCanonicalPackages')->willReturn($packages); $this->factory->expects($this->once())->method('getLocalRepository')->willReturn($repository); $this->assertEquals( [$thirdPartyPackage->getPrettyName() => $thirdPartyPackage], $this->provider->getThirdPartyPackages() ); } public function testGetOroPackagesEmpty() { $packages = [new Package('not-oro/platform', '1.0.0', '1.0.0')]; $repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface'); $repository->expects($this->once())->method('getCanonicalPackages')->willReturn($packages); $this->factory->expects($this->once())->method('getLocalRepository')->willReturn($repository); $this->assertEmpty($this->provider->getOroPackages()); } public function testGetOroPackages() { $thirdPartyPackage = new Package('not-oro/platform', '1.0.0', '1.0.0'); $oroPackage = new Package('oro/platform', '1.0.0', '1.0.0'); $packages = [$oroPackage, $thirdPartyPackage]; $repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface'); $repository->expects($this->once())->method('getCanonicalPackages')->willReturn($packages); $this->factory->expects($this->once())->method('getLocalRepository')->willReturn($repository); $this->assertEquals( [$oroPackage->getPrettyName() => $oroPackage], $this->provider->getOroPackages() ); } public function testFilterOroPackages() { $oroPackage = new Package('oro/platform', '1.0.0', '1.0.0'); $oroExtension = new Package('oro/some-extension', '1.0.0', '1.0.0'); $packages = [$oroPackage, $oroExtension]; $repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface'); $repository->expects($this->atLeastOnce())->method('getCanonicalPackages')->willReturn($packages); $this->factory->expects($this->atLeastOnce())->method('getLocalRepository')->willReturn($repository); $this->assertEquals( [$oroPackage->getPrettyName() => $oroPackage], $this->provider->getOroPackages(false) ); $this->assertEquals( [$oroPackage->getPrettyName() => $oroPackage, $oroExtension->getPrettyName() => $oroExtension], $this->provider->getOroPackages() ); $this->assertEmpty($this->provider->getThirdPartyPackages()); } } ",0 " const WSDL_NAMESPACE = ""https://adwords.google.com/api/adwords/cm/v201605""; const XSI_TYPE = ""Budget.BudgetDeliveryMethod""; /** * Gets the namesapce of this class * @return string the namespace of this class */ public function getNamespace() { return self::WSDL_NAMESPACE; } /** * Gets the xsi:type name of this class * @return string the xsi:type name of this class */ public function getXsiTypeName() { return self::XSI_TYPE; } public function __construct() { } }",0 "en the template in the editor. */ package org.mskcc.shenkers.data.interval; import htsjdk.tribble.Feature; import htsjdk.tribble.annotation.Strand; import htsjdk.tribble.bed.FullBEDFeature; import java.awt.Color; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; /** * * @author sol */ public interface IntervalFeature extends Feature { Strand getStrand(); T getValue(); } ",0 "tion convax_formatter($content) { $new_content = ''; //Matches the contents and the open and closing tags $pattern_full = '{(\[raw\].*?\[/raw\])}is'; //Matches just the contents $pattern_contents = '{\[raw\](.*?)\[/raw\]}is'; //Divide content into pieces $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); //Loop over pieces foreach ($pieces as $piece) { //Look for presence of the shortcode if (preg_match($pattern_contents, $piece, $matches)) { //Append to content (no formatting) $new_content .= $matches[1]; } else { //Format and append to content $new_content .= wptexturize(wpautop($piece)); } } return $new_content; } /*================================================= Setting up the default thumbnail sizes ================================================== */ remove_filter('the_content', 'wpautop'); remove_filter('the_content', 'wptexturize'); // Before displaying for viewing, apply this function add_filter('the_content', 'convax_formatter', 99); add_filter('widget_text', 'convax_formatter', 99); //Setting default thumbnail size add_image_size('large', 500, 500, true); add_image_size('medium', 200, 200, true); add_image_size('thumbnail', 84, 84, true); //Function to crop all thumbnails if(false === get_option(""medium_crop"")) { add_option(""medium_crop"", ""1""); } else { update_option(""medium_crop"", ""1""); } if(false === get_option(""large_crop"")) { add_option(""large_crop"", ""1""); } else { update_option(""large_crop"", ""1""); } if(false === get_option(""thumbnail_crop"")) { add_option(""thumbnail_crop"", ""1""); } else { update_option(""thumbnail_crop"", ""1""); } ?>",0 "More information can be found in the README file. // Copyright (C) 2015 Sneha Mitra, Anushua Biswas and Leelavati Narlikar // DIVERSITY is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // DIVERSITY is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . ////////////////////////////////////////////////////// #include #include #include #include #include #include ""messages.h"" #include ""linkedListOps.h"" #include ""modelops.h"" #include ""motifops.h"" /* Compute score of increasing the motif width by one on the left */ double motifAddLeftScore(dataSet *ds, model *m, double **background, int *labels, int *startPos, int mode){ int i, t, n, *start; double *values, s; t = (m->t)[mode]; n = m->n; values = (double*)malloc(sizeof(double)*m->featureValues); if(!values) printMessages(0, NULL); start = (int*)malloc(sizeof(int)*ds->n); if(!start) printMessages(0, NULL); copyLabels(startPos, start, ds->n); for(i = 0; i < m->featureValues; i++) values[i] = 0; for(i = 0; i < ds->n; i++){ if(labels[i] != mode) continue; if(startPos[i] < 0) continue; if(startPos[i] == 0){ start[i] = -1; t--; n--; continue; } if((ds->data)[i][startPos[i] - 1] > 3){ start[i] = -1; t--; n--; continue; } values[(ds->data)[i][startPos[i] - 1]]++; } s = 0; for(i = 0; i < ds->n; i++){ if(labels[i] != mode) continue; if(start[i] < 0) continue; if(background[i][(ds->data)[i][start[i] - 1]] < 0.00001) continue; s = s + log(values[(ds->data)[i][start[i] - 1]] + 0.5) - log(t + m->featureValues*0.5); s = s - log(background[i][(ds->data)[i][start[i] - 1]]); } free(values); free(start); s = s - m->lambda; s = pow(exp(1), s); if(isinf(s)) return (double)INT_MAX; return s; } /* Compute score of decreasing the motif width by one on the left */ double motifRemoveLeftScore(dataSet *ds, model *m, double **background, int *labels, int *startPos, int mode){ int i; double s; if((m->mWidth)[mode] <= 1) return 0; s = 0; for(i = 0; i < ds->n; i++){ if(labels[i] != mode) continue; if(startPos[i] < 0) continue; if(background[i][startPos[i]] < 0.00001) continue; s = s + log(background[i][startPos[i]]); s = s - log((((m->motifs)[mode].motif)->modeMotifCount)[(ds->data)[i][startPos[i]]] + 0.5) + log((m->t)[mode] + m->featureValues*0.5); } s = s + m->lambda; if(s > 700) s = 700; s = pow(exp(1), s); if(isinf(s)) return (double)INT_MAX; return s; } /* Compute score of increasing the motif width by one on the right */ double motifAddRightScore(dataSet *ds, model *m, double **background, int *labels, int *startPos, int mode){ int i, t, n, *start; double *values, s; t = (m->t)[mode]; n = m->n; values = (double*)malloc(sizeof(double)*m->featureValues); if(!values) printMessages(0, NULL); start = (int*)malloc(sizeof(int)*ds->n); if(!start) printMessages(0, NULL); copyLabels(startPos, start, ds->n); for(i = 0; i < m->featureValues; i++) values[i] = 0; for(i = 0; i < ds->n; i++){ if(labels[i] != mode) continue; if(startPos[i] < 0) continue; if(startPos[i] + (m->mWidth)[mode] >= (ds->features)[i]){ start[i] = -1; t--; n--; continue; } if((ds->data)[i][startPos[i] + (m->mWidth)[mode]] > 3){ start[i] = -1; t--; n--; continue; } values[(ds->data)[i][startPos[i] + (m->mWidth)[mode]]]++; } s = 0; for(i = 0; i < ds->n; i++){ if(labels[i] != mode) continue; if(start[i] < 0) continue; if(background[i][start[i] + (m->mWidth)[mode]] < 0.00001) continue; s = s + log(values[(ds->data)[i][start[i] + (m->mWidth)[mode]]] + 0.5) - log(t + m->featureValues*0.5); s = s - log(background[i][start[i] + (m->mWidth)[mode]]); } free(values); free(start); s = s - m->lambda; s = pow(exp(1), s); if(isinf(s)) return (double)INT_MAX; return s; } /* Compute score of decreasing the motif width by one on the right */ double motifRemoveRightScore(dataSet *ds, model *m, double **background, int *labels, int *startPos, int mode){ int i; double s; motifStruct *mf; if((m->mWidth)[mode] <= 1) return 0; s = 0; mf = getLastNode((m->motifs)[mode].motif); for(i = 0; i < ds->n; i++){ if(labels[i] != mode) continue; if(startPos[i] < 0) continue; if(background[i][startPos[i] + (m->mWidth)[mode] - 1] < 0.00001) continue; s = s + log(background[i][startPos[i] + (m->mWidth)[mode] - 1]); s = s - log((mf->modeMotifCount)[(ds->data)[i][startPos[i] + (m->mWidth)[mode] - 1]] + 0.5) + log((m->t)[mode] + m->featureValues*0.5); } s = s + m->lambda; if(s > 700) s = 700; s = pow(exp(1), s); if(isinf(s)) return (double)INT_MAX; return s; } /* Increase motif size by one from left */ void motifLeftIncrease(dataSet *ds, model *m, double **background, int *labels, int *startPos, int mode){ int i, j; motifStruct *mf, *mff; mf = createNode(); for(i = 0; i < m->featureValues; i++) (mf->modeMotifCount)[i] = 0; for(i = 0; i < ds->n; i++){ if(labels[i] != mode) continue; if(startPos[i] < 0) continue; if(startPos[i] == 0){ mff = (m->motifs)[mode].motif; for(j = startPos[i]; j < startPos[i] + (m->mWidth)[mode]; j++){ (mff->modeMotifCount)[(ds->data)[i][j]]--; mff = mff->next; } startPos[i] = -1; (m->t)[mode]--; m->n--; continue; } if((ds->data)[i][startPos[i] - 1] > 3){ mff = (m->motifs)[mode].motif; for(j = startPos[i]; j < startPos[i] + (m->mWidth)[mode]; j++){ (mff->modeMotifCount)[(ds->data)[i][j]]--; mff = mff->next; } startPos[i] = -1; (m->t)[mode]--; m->n--; continue; } (mf->modeMotifCount)[(ds->data)[i][startPos[i] - 1]]++; startPos[i]--; } (m->motifs)[mode].motif = addNodeFront(mf, (m->motifs)[mode].motif); (m->mWidth)[mode]++; } /* Decrease motif size by one from left */ void motifLeftDecrease(dataSet *ds, model *m, double **background, int *labels, int *startPos, int mode){ int i; for(i = 0; i < ds->n; i++){ if(labels[i] != mode) continue; if(startPos[i] < 0) continue; startPos[i]++; } (m->motifs)[mode].motif = delNodeFront((m->motifs)[mode].motif); (m->mWidth)[mode]--; } /* Increase motif size by one from right */ void motifRightIncrease(dataSet *ds, model *m, double **background, int *labels, int *startPos, int mode){ int i, j; motifStruct *me, *mf; me = createNode(); for(i = 0; i < m->featureValues; i++) (me->modeMotifCount)[i] = 0; for(i = 0; i < ds->n; i++){ if(labels[i] != mode) continue; if(startPos[i] < 0) continue; if(startPos[i] + (m->mWidth)[mode] >= (ds->features)[i]){ mf = (m->motifs)[mode].motif; for(j = startPos[i]; j < startPos[i] + (m->mWidth)[mode]; j++){ (mf->modeMotifCount)[(ds->data)[i][j]]--; mf = mf->next; } startPos[i] = -1; (m->t)[mode]--; m->n--; continue; } if((ds->data)[i][startPos[i] + (m->mWidth)[mode]] > 3){ mf = (m->motifs)[mode].motif; for(j = startPos[i]; j < startPos[i] + (m->mWidth)[mode]; j++){ (mf->modeMotifCount)[(ds->data)[i][j]]--; mf = mf->next; } startPos[i] = -1; (m->t)[mode]--; m->n--; continue; } (me->modeMotifCount)[(ds->data)[i][startPos[i] + (m->mWidth)[mode]]]++; } (m->motifs)[mode].motif = addNodeEnd(me, (m->motifs)[mode].motif); (m->mWidth)[mode]++; } /* Decrease motif size by one from right */ void motifRightDecrease(dataSet *ds, model *m, double **background, int *labels, int *startPos, int mode){ (m->motifs)[mode].motif = delNodeEnd((m->motifs)[mode].motif); (m->mWidth)[mode]--; } ",0 "ware; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #include #include #include /* SH7723 registers */ #define FRQCR 0xa4150000 #define VCLKCR 0xa4150004 #define SCLKACR 0xa4150008 #define SCLKBCR 0xa415000c #define IRDACLKCR 0xa4150018 #define PLLCR 0xa4150024 #define DLLFRQ 0xa4150050 /* Fixed 32 KHz root clock for RTC and Power Management purposes */ static struct clk r_clk = { .rate = 32768, }; /* * Default rate for the root input clock, reset this with clk_set_rate() * from the platform code. */ struct clk extal_clk = { .rate = 33333333, }; /* The dll multiplies the 32khz r_clk, may be used instead of extal */ static unsigned long dll_recalc(struct clk *clk) { unsigned long mult; if (__raw_readl(PLLCR) & 0x1000) mult = __raw_readl(DLLFRQ); else mult = 0; return clk->parent->rate * mult; } static struct clk_ops dll_clk_ops = { .recalc = dll_recalc, }; static struct clk dll_clk = { .ops = &dll_clk_ops, .parent = &r_clk, .flags = CLK_ENABLE_ON_INIT, }; static unsigned long pll_recalc(struct clk *clk) { unsigned long mult = 1; unsigned long div = 1; if (__raw_readl(PLLCR) & 0x4000) mult = (((__raw_readl(FRQCR) >> 24) & 0x1f) + 1); else div = 2; return (clk->parent->rate * mult) / div; } static struct clk_ops pll_clk_ops = { .recalc = pll_recalc, }; static struct clk pll_clk = { .ops = &pll_clk_ops, .flags = CLK_ENABLE_ON_INIT, }; struct clk *main_clks[] = { &r_clk, &extal_clk, &dll_clk, &pll_clk, }; static int multipliers[] = { 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; static int divisors[] = { 1, 3, 2, 5, 3, 4, 5, 6, 8, 10, 12, 16, 20 }; static struct clk_div_mult_table div4_div_mult_table = { .divisors = divisors, .nr_divisors = ARRAY_SIZE(divisors), .multipliers = multipliers, .nr_multipliers = ARRAY_SIZE(multipliers), }; static struct clk_div4_table div4_table = { .div_mult_table = &div4_div_mult_table, }; enum { DIV4_I, DIV4_U, DIV4_SH, DIV4_B, DIV4_B3, DIV4_P, DIV4_NR }; #define DIV4(_reg, _bit, _mask, _flags) \ SH_CLK_DIV4(&pll_clk, _reg, _bit, _mask, _flags) struct clk div4_clks[DIV4_NR] = { [DIV4_I] = DIV4(FRQCR, 20, 0x0dbf, CLK_ENABLE_ON_INIT), [DIV4_U] = DIV4(FRQCR, 16, 0x0dbf, CLK_ENABLE_ON_INIT), [DIV4_SH] = DIV4(FRQCR, 12, 0x0dbf, CLK_ENABLE_ON_INIT), [DIV4_B] = DIV4(FRQCR, 8, 0x0dbf, CLK_ENABLE_ON_INIT), [DIV4_B3] = DIV4(FRQCR, 4, 0x0db4, CLK_ENABLE_ON_INIT), [DIV4_P] = DIV4(FRQCR, 0, 0x0dbf, 0), }; enum { DIV4_IRDA, DIV4_ENABLE_NR }; struct clk div4_enable_clks[DIV4_ENABLE_NR] = { [DIV4_IRDA] = DIV4(IRDACLKCR, 0, 0x0dbf, 0), }; enum { DIV4_SIUA, DIV4_SIUB, DIV4_REPARENT_NR }; struct clk div4_reparent_clks[DIV4_REPARENT_NR] = { [DIV4_SIUA] = DIV4(SCLKACR, 0, 0x0dbf, 0), [DIV4_SIUB] = DIV4(SCLKBCR, 0, 0x0dbf, 0), }; enum { DIV6_V, DIV6_NR }; struct clk div6_clks[DIV6_NR] = { [DIV6_V] = SH_CLK_DIV6(&pll_clk, VCLKCR, 0), }; static struct clk mstp_clks[] = { /* See page 60 of Datasheet V1.0: Overview -> Block Diagram */ SH_HWBLK_CLK(HWBLK_TLB, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), SH_HWBLK_CLK(HWBLK_IC, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), SH_HWBLK_CLK(HWBLK_OC, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), SH_HWBLK_CLK(HWBLK_L2C, &div4_clks[DIV4_SH], CLK_ENABLE_ON_INIT), SH_HWBLK_CLK(HWBLK_ILMEM, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), SH_HWBLK_CLK(HWBLK_FPU, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), SH_HWBLK_CLK(HWBLK_INTC, &div4_clks[DIV4_I], CLK_ENABLE_ON_INIT), SH_HWBLK_CLK(HWBLK_DMAC0, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_SHYWAY, &div4_clks[DIV4_SH], CLK_ENABLE_ON_INIT), SH_HWBLK_CLK(HWBLK_HUDI, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_UBC, &div4_clks[DIV4_I], 0), SH_HWBLK_CLK(HWBLK_TMU0, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_CMT, &r_clk, 0), SH_HWBLK_CLK(HWBLK_RWDT, &r_clk, 0), SH_HWBLK_CLK(HWBLK_DMAC1, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_TMU1, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_FLCTL, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_SCIF0, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_SCIF1, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_SCIF2, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_SCIF3, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_SCIF4, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_SCIF5, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_MSIOF0, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_MSIOF1, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_MERAM, &div4_clks[DIV4_SH], 0), SH_HWBLK_CLK(HWBLK_IIC, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_RTC, &r_clk, 0), SH_HWBLK_CLK(HWBLK_ATAPI, &div4_clks[DIV4_SH], 0), SH_HWBLK_CLK(HWBLK_ADC, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_TPU, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_IRDA, &div4_clks[DIV4_P], 0), SH_HWBLK_CLK(HWBLK_TSIF, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_ICB, &div4_clks[DIV4_B], CLK_ENABLE_ON_INIT), SH_HWBLK_CLK(HWBLK_SDHI0, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_SDHI1, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_KEYSC, &r_clk, 0), SH_HWBLK_CLK(HWBLK_USB, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_2DG, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_SIU, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_VEU2H1, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_VOU, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_BEU, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_CEU, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_VEU2H0, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_VPU, &div4_clks[DIV4_B], 0), SH_HWBLK_CLK(HWBLK_LCDC, &div4_clks[DIV4_B], 0), }; static struct clk_lookup lookups[] = { /* main clocks */ CLKDEV_CON_ID(""rclk"", &r_clk), CLKDEV_CON_ID(""extal"", &extal_clk), CLKDEV_CON_ID(""dll_clk"", &dll_clk), CLKDEV_CON_ID(""pll_clk"", &pll_clk), /* DIV4 clocks */ CLKDEV_CON_ID(""cpu_clk"", &div4_clks[DIV4_I]), CLKDEV_CON_ID(""umem_clk"", &div4_clks[DIV4_U]), CLKDEV_CON_ID(""shyway_clk"", &div4_clks[DIV4_SH]), CLKDEV_CON_ID(""bus_clk"", &div4_clks[DIV4_B]), CLKDEV_CON_ID(""b3_clk"", &div4_clks[DIV4_B3]), CLKDEV_CON_ID(""peripheral_clk"", &div4_clks[DIV4_P]), CLKDEV_CON_ID(""irda_clk"", &div4_enable_clks[DIV4_IRDA]), CLKDEV_CON_ID(""siua_clk"", &div4_reparent_clks[DIV4_SIUA]), CLKDEV_CON_ID(""siub_clk"", &div4_reparent_clks[DIV4_SIUB]), /* DIV6 clocks */ CLKDEV_CON_ID(""video_clk"", &div6_clks[DIV6_V]), /* MSTP clocks */ CLKDEV_CON_ID(""tlb0"", &mstp_clks[HWBLK_TLB]), CLKDEV_CON_ID(""ic0"", &mstp_clks[HWBLK_IC]), CLKDEV_CON_ID(""oc0"", &mstp_clks[HWBLK_OC]), CLKDEV_CON_ID(""l2c0"", &mstp_clks[HWBLK_L2C]), CLKDEV_CON_ID(""ilmem0"", &mstp_clks[HWBLK_ILMEM]), CLKDEV_CON_ID(""fpu0"", &mstp_clks[HWBLK_FPU]), CLKDEV_CON_ID(""intc0"", &mstp_clks[HWBLK_INTC]), CLKDEV_CON_ID(""dmac0"", &mstp_clks[HWBLK_DMAC0]), CLKDEV_CON_ID(""sh0"", &mstp_clks[HWBLK_SHYWAY]), CLKDEV_CON_ID(""hudi0"", &mstp_clks[HWBLK_HUDI]), CLKDEV_CON_ID(""ubc0"", &mstp_clks[HWBLK_UBC]), { /* TMU0 */ .dev_id = ""sh_tmu.0"", .con_id = ""tmu_fck"", .clk = &mstp_clks[HWBLK_TMU0], }, { /* TMU1 */ .dev_id = ""sh_tmu.1"", .con_id = ""tmu_fck"", .clk = &mstp_clks[HWBLK_TMU0], }, { /* TMU2 */ .dev_id = ""sh_tmu.2"", .con_id = ""tmu_fck"", .clk = &mstp_clks[HWBLK_TMU0], }, CLKDEV_CON_ID(""cmt_fck"", &mstp_clks[HWBLK_CMT]), CLKDEV_CON_ID(""rwdt0"", &mstp_clks[HWBLK_RWDT]), CLKDEV_CON_ID(""dmac1"", &mstp_clks[HWBLK_DMAC1]), { /* TMU3 */ .dev_id = ""sh_tmu.3"", .con_id = ""tmu_fck"", .clk = &mstp_clks[HWBLK_TMU1], }, { /* TMU4 */ .dev_id = ""sh_tmu.4"", .con_id = ""tmu_fck"", .clk = &mstp_clks[HWBLK_TMU1], }, { /* TMU5 */ .dev_id = ""sh_tmu.5"", .con_id = ""tmu_fck"", .clk = &mstp_clks[HWBLK_TMU1], }, CLKDEV_CON_ID(""flctl0"", &mstp_clks[HWBLK_FLCTL]), { /* SCIF0 */ .dev_id = ""sh-sci.0"", .con_id = ""sci_fck"", .clk = &mstp_clks[HWBLK_SCIF0], }, { /* SCIF1 */ .dev_id = ""sh-sci.1"", .con_id = ""sci_fck"", .clk = &mstp_clks[HWBLK_SCIF1], }, { /* SCIF2 */ .dev_id = ""sh-sci.2"", .con_id = ""sci_fck"", .clk = &mstp_clks[HWBLK_SCIF2], }, { /* SCIF3 */ .dev_id = ""sh-sci.3"", .con_id = ""sci_fck"", .clk = &mstp_clks[HWBLK_SCIF3], }, { /* SCIF4 */ .dev_id = ""sh-sci.4"", .con_id = ""sci_fck"", .clk = &mstp_clks[HWBLK_SCIF4], }, { /* SCIF5 */ .dev_id = ""sh-sci.5"", .con_id = ""sci_fck"", .clk = &mstp_clks[HWBLK_SCIF5], }, CLKDEV_CON_ID(""msiof0"", &mstp_clks[HWBLK_MSIOF0]), CLKDEV_CON_ID(""msiof1"", &mstp_clks[HWBLK_MSIOF1]), CLKDEV_CON_ID(""meram0"", &mstp_clks[HWBLK_MERAM]), CLKDEV_DEV_ID(""i2c-sh_mobile.0"", &mstp_clks[HWBLK_IIC]), CLKDEV_CON_ID(""rtc0"", &mstp_clks[HWBLK_RTC]), CLKDEV_CON_ID(""atapi0"", &mstp_clks[HWBLK_ATAPI]), CLKDEV_CON_ID(""adc0"", &mstp_clks[HWBLK_ADC]), CLKDEV_CON_ID(""tpu0"", &mstp_clks[HWBLK_TPU]), CLKDEV_CON_ID(""irda0"", &mstp_clks[HWBLK_IRDA]), CLKDEV_CON_ID(""tsif0"", &mstp_clks[HWBLK_TSIF]), CLKDEV_CON_ID(""icb0"", &mstp_clks[HWBLK_ICB]), CLKDEV_CON_ID(""sdhi0"", &mstp_clks[HWBLK_SDHI0]), CLKDEV_CON_ID(""sdhi1"", &mstp_clks[HWBLK_SDHI1]), CLKDEV_CON_ID(""keysc0"", &mstp_clks[HWBLK_KEYSC]), CLKDEV_CON_ID(""usb0"", &mstp_clks[HWBLK_USB]), CLKDEV_CON_ID(""2dg0"", &mstp_clks[HWBLK_2DG]), CLKDEV_CON_ID(""siu0"", &mstp_clks[HWBLK_SIU]), CLKDEV_CON_ID(""veu1"", &mstp_clks[HWBLK_VEU2H1]), CLKDEV_CON_ID(""vou0"", &mstp_clks[HWBLK_VOU]), CLKDEV_CON_ID(""beu0"", &mstp_clks[HWBLK_BEU]), CLKDEV_CON_ID(""ceu0"", &mstp_clks[HWBLK_CEU]), CLKDEV_CON_ID(""veu0"", &mstp_clks[HWBLK_VEU2H0]), CLKDEV_CON_ID(""vpu0"", &mstp_clks[HWBLK_VPU]), CLKDEV_CON_ID(""lcdc0"", &mstp_clks[HWBLK_LCDC]), }; int __init arch_clk_init(void) { int k, ret = 0; /* autodetect extal or dll configuration */ if (__raw_readl(PLLCR) & 0x1000) pll_clk.parent = &dll_clk; else pll_clk.parent = &extal_clk; for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) ret |= clk_register(main_clks[k]); clkdev_add_table(lookups, ARRAY_SIZE(lookups)); if (!ret) ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); if (!ret) ret = sh_clk_div4_enable_register(div4_enable_clks, DIV4_ENABLE_NR, &div4_table); if (!ret) ret = sh_clk_div4_reparent_register(div4_reparent_clks, DIV4_REPARENT_NR, &div4_table); if (!ret) ret = sh_clk_div6_register(div6_clks, DIV6_NR); if (!ret) ret = sh_hwblk_clk_register(mstp_clks, HWBLK_NR); return ret; } ",0 "text/html; charset=utf-8"">

                  DIF_DROPDOWNLIST

                  The DIF_DROPDOWNLIST flag specifies that a DI_COMBOBOX control is a read-only drop-down list.

                  Controls

                  The DIF_DROPDOWNLIST flag is applicable to the following dialog items:
                  ControlDescription
                  DI_COMBOBOX Combo box.

                  Remarks

                  See also:
                  ",0 "itle>
                  Home Libraries People FAQ More

                  Inherited from basic_io_object.

                  Get the underlying implementation of the I/O object.

                  const implementation_type & get_implementation() const;
                  
                  Copyright © 2003-2012 Christopher M. Kohlhoff

                  Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


                  ",0 "ullText'; public $useTable = 'search_fulltext'; public $actsAs = array('CloggySearchFullTexIndex','CloggySearchFullTextTerm'); public function getTotal() { return $this->find('count'); } /** * Do search using MysqlFullTextSearch * * @link http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html NATURAL SEARCH * @link http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html BOOLEAN MODE * @param string $query * @return array */ public function search($query) { //default used mode $usedMode = __d('cloggy','Natural Search'); /* * first try to search with natural search * NATURAL SEARCH */ $data = $this->find('all',array( 'contain' => false, 'fields' => array('*','MATCH (CloggySearchFullText.source_sentences,CloggySearchFullText.source_text) AGAINST (\''.$query.'\') AS rating'), 'conditions' => array('MATCH (CloggySearchFullText.source_sentences,CloggySearchFullText.source_text) AGAINST (\''.$query.'\')'), 'order' => array('rating' => 'desc') )); /* * if failed or empty results then * reset search in BOOLEAN MODE * with operator '*' that means search * data which contain 'query' or 'queries', etc */ if (empty($data)) { //format query string $query = $this->buildTerm($query); /* * begin searching data */ $data = $this->find('all',array( 'contain' => false, 'fields' => array('*','MATCH (CloggySearchFullText.source_sentences,CloggySearchFullText.source_text) AGAINST (\''.$query.'\' IN BOOLEAN MODE) AS rating'), 'conditions' => array('MATCH (CloggySearchFullText.source_sentences,CloggySearchFullText.source_text) AGAINST (\''.$query.'\' IN BOOLEAN MODE)'), 'order' => array('rating' => 'desc') )); //switch search mode $usedMode = __d('cloggy','Boolean Mode'); } return array( 'mode' => $usedMode, 'results' => $data ); } }",0 "link https://github.com/swagger-api/swagger-codegen */ /** * Bumbal Client Api * * Bumbal API documentation * * OpenAPI spec version: 2.0 * Contact: gerb@bumbal.eu * Generated by: https://github.com/swagger-api/swagger-codegen.git * */ /** * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen * Please update the test case below to test the model. */ namespace BumbalClient; /** * SystemProviderListResponseTest Class Doc Comment * * @category Class */ // * @description SystemProviderListResponse /** * @package BumbalClient * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class SystemProviderListResponseTest extends \PHPUnit_Framework_TestCase { /** * Setup before running any test case */ public static function setUpBeforeClass() { } /** * Setup before running each test case */ public function setUp() { } /** * Clean up after running each test case */ public function tearDown() { } /** * Clean up after running all test cases */ public static function tearDownAfterClass() { } /** * Test ""SystemProviderListResponse"" */ public function testSystemProviderListResponse() { } /** * Test attribute ""items"" */ public function testPropertyItems() { } /** * Test attribute ""count_filtered"" */ public function testPropertyCountFiltered() { } /** * Test attribute ""count_unfiltered"" */ public function testPropertyCountUnfiltered() { } /** * Test attribute ""count_limited"" */ public function testPropertyCountLimited() { } } ",0 " Filesystem */ private $finder; /** * @var array */ protected $search = [ ""DB_HOST=localhost"", ""DB_DATABASE=homestead"", ""DB_USERNAME=homestead"", ""DB_PASSWORD=secret"", ]; /** * @var string */ protected $template = '.env.example'; /** * @var string */ protected $file = '.env'; /** * @param Filesystem $finder */ public function __construct(Filesystem $finder) { $this->finder = $finder; } /** * @param $name * @param $username * @param $password * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function write($name, $username, $password, $host) { Dotenv::makeMutable(); $environmentFile = $this->finder->get($this->template); $replace = [ ""DB_HOST=$host"", ""DB_DATABASE=$name"", ""DB_USERNAME=$username"", ""DB_PASSWORD=$password"", ]; $newEnvironmentFile = str_replace($this->search, $replace, $environmentFile); $this->finder->put($this->file, $newEnvironmentFile); Dotenv::makeImmutable(); } } ",0 "ge['@id'] %>"" /> <% } %> <% if (plugin.links && plugin.links.install) { %> ""> <% } else if (plugin.status && plugin.status.code === 'RUNNING' && (plugin.configurable || plugin.actionClasses)) { %> <% } %>

                  <%= plugin.name %>

                  <%= plugin.description %>

                  <% if (plugin.version) { %>
                  Version <%= plugin.version %>
                  <% } %> <% if (plugin.status && plugin.status.code === 'NOT_CONFIGURED') { %>


                  <%= plugin.name %> <%= strings.RequiresConfiguration %>

                  <%= strings.Settings %>

                  <% } else if (plugin.status && (plugin.status.code === 'ERROR' || plugin.status.code === 'FAILED')) { %>


                  <%= strings.PluginError %>

                  <%= strings.Settings %>

                  <% } else if (plugin.links && plugin.links.update) { %>

                  <%= strings.PluginUpdateAvailable %>

                  <%= strings.Close %> <%= strings.Update %>

                  <% } %> ",0 """>
                  {{ partial ""navbar.html"" . }}
                  {{ partial ""version-banner.html"" . }} {{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial ""breadcrumb.html"" . }}{{ end }} {{ block ""main"" . }}{{ end }}
                  {{ partial ""footer.html"" . }}
                  {{ partial ""scripts.html"" . }} ",0 "javadoc (build 1.6.0_02-ea) on Thu Dec 24 00:39:33 CET 2009 --> org.neuroph.nnet.comp
                  Overview   Package  Class  Tree  Deprecated  Index  Help 
                   PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES    

                  Package org.neuroph.nnet.comp

                  Provides components for the specific neural network models.

                  See:
                            Description

                  Class Summary
                  CompetitiveLayer Represents layer of competitive neurons, and provides methods for competition.
                  CompetitiveNeuron Provides neuron behaviour specific for competitive neurons which are used in competitive layers, and networks with competitive learning.
                  DelayedConnection Represents the connection between neurons which can delay signal.
                  DelayedNeuron Provides behaviour for neurons with delayed output.
                  InputOutputNeuron Provides behaviour specific for neurons which act as input and the output neurons within the same layer.
                  ThresholdNeuron Provides behaviour for neurons with threshold.
                   

                  Package org.neuroph.nnet.comp Description

                  Provides components for the specific neural network models.


                  Overview   Package  Class  Tree  Deprecated  Index  Help 
                   PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES    

                  ",0 " Copyright (C) 2010-2014 Dinu SV. ** (contact: mail@dinusv.com) ** This file is part of Dispersion framework. ** ** The file may be used under the terms of the MIT license, appearing in the ** file LICENSE.MIT included in the packaging of this file. ** ****************************************************************************/ /** * @author DinuSV * @version : 1.1 */ /* Set up locations */ $locations = array( 'libraries' => ROOT . DS . 'libraries', 'libraries_custom' => APPFILESROOT . DS . 'libraries', 'helpers_custom' => APPFILESROOT . DS . 'helpers_custom', 'exceptions_custom'=> APPFILESROOT . DS . 'exceptions', 'config' => APPFILESROOT . DS . 'config', 'controllers' => APPFILESROOT . DS . 'control', 'models' => APPFILESROOT . DS . 'model', 'views' => APPFILESROOT . DS . 'views' ); /* Require startup files */ require_once ($locations['libraries'] . DS . 'core' . DS . 'config.class.php' ); require_once ($locations['libraries'] . DS . 'core' . DS . 'loader.class.php' ); require_once ($locations['libraries'] . DS . 'core' . DS . 'debug.class.php' ); require_once ($locations['libraries'] . DS . 'core' . DS . 'error.class.php' ); require_once ($locations['libraries'] . DS . 'core' . DS . 'autoload.class.php'); /* Require configuration files */ require_once ($locations['config'] . DS . 'config.php' ); require_once ($locations['config'] . DS . 'errors.php' ); /* Load the required classes */ $loader = new Loader( $locations ); /* Start */ $loader->callUrl();",0 "otation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** *

                  Java class for anonymous complex type. * *

                  The following schema fragment specifies the expected content contained within this class. * *

                   * <complexType>
                   *   <complexContent>
                   *     <restriction base=""{http://www.w3.org/2001/XMLSchema}anyType"">
                   *       <sequence>
                   *         <element name=""repositoryId"" type=""{http://www.w3.org/2001/XMLSchema}string""/>
                   *         <element name=""extension"" type=""{http://docs.oasis-open.org/ns/cmis/messaging/200908/}cmisExtensionType"" minOccurs=""0""/>
                   *       </sequence>
                   *     </restriction>
                   *   </complexContent>
                   * </complexType>
                   * 
                  * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = """", propOrder = { ""repositoryId"", ""extension"" }) @XmlRootElement(name = ""getRepositoryInfo"") public class GetRepositoryInfo { @XmlElement(required = true) protected String repositoryId; @XmlElementRef(name = ""extension"", namespace = ""http://docs.oasis-open.org/ns/cmis/messaging/200908/"", type = JAXBElement.class) protected JAXBElement extension; /** * Gets the value of the repositoryId property. * * @return * possible object is * {@link String } * */ public String getRepositoryId() { return repositoryId; } /** * Sets the value of the repositoryId property. * * @param value * allowed object is * {@link String } * */ public void setRepositoryId(String value) { this.repositoryId = value; } /** * Gets the value of the extension property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} * */ public JAXBElement getExtension() { return extension; } /** * Sets the value of the extension property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link CmisExtensionType }{@code >} * */ public void setExtension(JAXBElement value) { this.extension = ((JAXBElement ) value); } } ",0 "MIT */ package utils; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Properties; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; import org.testng.annotations.Test; import com.google.gdata.client.spreadsheet.CellQuery; import com.google.gdata.client.spreadsheet.FeedURLFactory; import com.google.gdata.client.spreadsheet.SpreadsheetQuery; import com.google.gdata.client.spreadsheet.SpreadsheetService; import com.google.gdata.data.spreadsheet.CellEntry; import com.google.gdata.data.spreadsheet.CellFeed; import com.google.gdata.data.spreadsheet.SpreadsheetEntry; import com.google.gdata.data.spreadsheet.SpreadsheetFeed; import com.google.gdata.data.spreadsheet.WorksheetEntry; import com.google.gdata.util.AuthenticationException; import com.google.gdata.util.ServiceException; public class ReportParseGoogleUpdate { private static SpreadsheetService service; private static FeedURLFactory factory; private static URL url; public static ReportParseGoogleUpdate spreadSheetDemo; public static SpreadsheetEntry spreadsheet; public static WorksheetEntry worksheetEntry; public static SpreadsheetQuery query; static int rowFromSearch; static int colFromSearch; static List searchArr=new ArrayList(); static List objects = new ArrayList(); @Test public static void ReportParsingGoogleDocUpdate() throws IOException, ServiceException { System.out.println(""Script to parse test report and update google doc with results""); FileReader reader = new FileReader(""../orangeHRM/config.properties""); //Reading configuration file Properties prop = new Properties(); prop.load(reader); String googleReportParserExecutionFlag = prop.getProperty(""googleReportParserExecutionFlag""); String parserGoogleEmail = prop.getProperty(""parserGoogleEmail""); String parserGooglePassword = prop.getProperty(""parserGooglePassword""); int parserIndexSpreadsheet = Integer.parseInt(prop.getProperty(""parserIndexSpreadsheet"")); int parserIndexWorksheet = Integer.parseInt(prop.getProperty(""parserIndexWorksheet"")); String parserInputFilePath = prop.getProperty(""parserInputFilePath""); if(googleReportParserExecutionFlag.contentEquals(""true"")) { //Auth to access google doc spreadSheetDemo = new ReportParseGoogleUpdate(parserGoogleEmail, parserGooglePassword); //gmail account via which doc will be accessed for updating test results spreadsheet = spreadSheetDemo.getSpreadSheet(parserIndexSpreadsheet);//give index to select the spreadsheet from the folder worksheetEntry = spreadsheet.getWorksheets().get(parserIndexWorksheet); //providing index to access the desired worksheet url = worksheetEntry.getCellFeedUrl(); query = new SpreadsheetQuery(url); System.out.println(""Title of spreadsheet being updated :: ""+spreadsheet.getTitle().getPlainText()); System.out.println(""Title of worksheet being updated :: ""+worksheetEntry.getTitle().getPlainText()); // CellFeed feed = service.query(query, CellFeed.class); //Parsing the Test report from desired folder File input = new File(parserInputFilePath); System.out.println(""Starting ....""); Document doc = Jsoup.parse(input,null); System.out.println(""midway ....""); Elements testNames = doc.select(""html>body>table>tbody>tr>td>a[href~=#t]"");//gets the name of the test names from the report Elements testNameSiblings = doc.select(""html>body>table>tbody>tr>td[class~=num]"");//gets the siblings of all the test names...they are the test results numbers System.out.println(""testNames size ::""+testNames.size()); System.out.println(""testNameSiblings size :: ""+testNameSiblings.size()); ///// for (CellEntry entry : feed.getEntries()) { searchArr.add(entry.getCell().getInputValue()); objects.add(entry.getCell()); } System.out.println(searchArr); System.out.println(objects); int j =0; for (int i = 0; i < testNames.size(); i++) { System.out.println(""test>""+testNames.get(i).text()); int passed = Integer.parseInt(testNameSiblings.get(j).text()); j=j+1; int skipped = Integer.parseInt(testNameSiblings.get(j).text()); j=j+1; int failed = Integer.parseInt(testNameSiblings.get(j).text()); j=j+1; String testTime = testNameSiblings.get(j).text(); j=j+1; System.out.println(""******************************""); if (passed!=0) { search(testNames.get(i).text()); CellContentUpdate(worksheetEntry, rowFromSearch, colFromSearch+2, ""PASSED""); } else if (skipped!=0) { search(testNames.get(i).text()); CellContentUpdate(worksheetEntry, rowFromSearch, colFromSearch+2, ""SKIPPED""); } else if (failed!=0) { search(testNames.get(i).text()); CellContentUpdate(worksheetEntry, rowFromSearch, colFromSearch+2, ""FAILED""); } } } else { System.out.println(); System.out.println(""googleReportParserExecution feature is turned off via googleReportParserExecutionFlag in config.properties file...""); } } /* * Method Definitions */ //Method for authentication to access google doc public ReportParseGoogleUpdate(String username, String password) throws AuthenticationException { service = new SpreadsheetService(""SpreadSheet-Demo""); factory = FeedURLFactory.getDefault(); System.out.println(""Authenticating...""); service.setUserCredentials(username, password); System.out.println(""Successfully authenticated""); } //Method to get all the spreadsheets associated to the given account public void GetAllSpreadsheets() throws IOException, ServiceException{ SpreadsheetFeed feed = service.getFeed(factory.getSpreadsheetsFeedUrl(), SpreadsheetFeed.class); List spreadsheets = feed.getEntries(); System.out.println(""Total number of SpreadSheets found : "" + spreadsheets.size()); for (int i = 0; i < spreadsheets.size(); ++i) { System.out.println(""(""+i+"") : ""+spreadsheets.get(i).getTitle().getPlainText()); } } // Returns spreadsheet public SpreadsheetEntry getSpreadSheet(int spreadsheetIndex) throws IOException, ServiceException { SpreadsheetFeed feed = service.getFeed(factory.getSpreadsheetsFeedUrl(), SpreadsheetFeed.class); SpreadsheetEntry spreadsheet = feed.getEntries().get(spreadsheetIndex); return spreadsheet; } //Method to get Spread sheet details public void GetSpreadsheetDetails(SpreadsheetEntry spreadsheet) throws IOException, ServiceException{ System.out.println(""SpreadSheet Title : ""+spreadsheet.getTitle().getPlainText()); List worksheets = spreadsheet.getWorksheets(); for (int i = 0; i < worksheets.size(); ++i) { WorksheetEntry worksheetEntry = worksheets.get(i); System.out.println(""(""+i+"") Worksheet Title : ""+worksheetEntry.getTitle().getPlainText()+"", num of Rows : ""+worksheetEntry.getRowCount()+"", num of Columns : ""+worksheetEntry.getColCount()); } } public static void CellContentUpdate(WorksheetEntry worksheetEntry,int row, int col, String formulaOrValue) throws IOException, ServiceException{ URL cellFeedUrl = worksheetEntry.getCellFeedUrl(); CellEntry newEntry = new CellEntry(row, col, formulaOrValue); service.insert(cellFeedUrl, newEntry); System.out.println(""Cell Updated!""); } // public static void searchTestNameGDoc(String testNameToSearch) throws IOException, ServiceException{ // // CellFeed feed = service.query(query, CellFeed.class); // // for (CellEntry entry : feed.getEntries()) { // searchArr.add(entry.getCell().getInputValue()); // objects.add(entry.getCell()); // } // // for (int i = 0; i < objects.size(); i++) { // if (searchArr.get(i)==""BalanaceEnquiry_MandatoryField"" ){ // rowFromSearch = feed.getEntries().get(i).getCell().getRow(); // colFromSearch = feed.getEntries().get(i).getCell().getCol(); // break; // } // // } // // } // public static void printCell(CellEntry cell) { // System.out.println(cell.getCell().getValue()); // } public static void printCell(CellEntry cell) { String shortId = cell.getId().substring(cell.getId().lastIndexOf('/') + 1); System.out.println("" -- Cell("" + shortId + ""/"" + cell.getTitle().getPlainText()+ "") formula("" + cell.getCell().getInputValue() + "") numeric(""+ cell.getCell().getNumericValue() + "") value(""+ cell.getCell().getValue() + "")""); rowFromSearch = cell.getCell().getRow(); colFromSearch = cell.getCell().getCol(); System.out.println(""row :: ""+rowFromSearch); System.out.println(""col :: ""+colFromSearch); } public static void search(String fullTextSearchString) throws IOException,ServiceException { CellQuery query = new CellQuery(url); query.setFullTextQuery(fullTextSearchString); CellFeed feed = service.query(query, CellFeed.class); System.out.println(""Results for ["" + fullTextSearchString + ""]""); for (CellEntry entry : feed.getEntries()) { printCell(entry); } } } ",0 "enerated by javadoc (1.8.0_31) on Thu Mar 19 00:41:59 UTC 2015 --> MutableHandlerRegistryImpl (grpc-core 0.1.0-SNAPSHOT API)
                  io.grpc

                  Class MutableHandlerRegistryImpl



                  • @ThreadSafe
                    public final class MutableHandlerRegistryImpl
                    extends MutableHandlerRegistry
                    Default implementation of MutableHandlerRegistry.

                    Uses ConcurrentHashMap to avoid service registration excessively blocking method lookup.

                  ",0 "ckTabContains
                  DRD:DEV
                  Attempts to perform a Click on a Tab according to a partial match of its text value.

                  Attempts to perform a Click on a Tab according to a partial match of its text value. The routine will set the StepDriverTestInfo.statuscode and log any pass/warning/fail info using the StepDriverTestInfo.fac LogFacility.

                  Note: this keyword used to be UnverifiedClickTabContains, and it was renamed on 01/26/2011 due to conflict.



                  Fields: [ ]=Optional with Default Value

                  1. TextValue
                    Partial case-sensitive text on the tab to identify which tab to click.

                    TextValue is the partial case-sensitive text on the tab to identify which tab to click.

                  Examples:

                  • T, PropertiesWin, TabControl, ClickTabContains, ""StatsTab""
                    A single-click is performed on the tab item whose name contains ""StatsTab"".

                    A single-click is performed on the tab item whose name contains ""StatsTab"".



                  [How To Read This Reference]
                  ",0 "in 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. */ package org.flowable.engine.test.bpmn.servicetask; import org.flowable.engine.IdentityService; import org.flowable.engine.ManagementService; import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.delegate.JavaDelegate; import org.flowable.engine.impl.context.Context; import org.flowable.engine.impl.interceptor.Command; import org.flowable.engine.impl.interceptor.CommandContext; import org.flowable.idm.api.Group; import org.flowable.idm.api.User; /** * @author Joram Barrez */ public class CreateUserAndMembershipTestDelegate implements JavaDelegate { @Override public void execute(DelegateExecution execution) { ManagementService managementService = Context.getProcessEngineConfiguration().getManagementService(); managementService.executeCommand(new Command() { @Override public Void execute(CommandContext commandContext) { return null; } }); IdentityService identityService = Context.getProcessEngineConfiguration().getIdentityService(); String username = ""Kermit""; User user = identityService.newUser(username); user.setPassword(""123""); user.setFirstName(""Manually""); user.setLastName(""created""); identityService.saveUser(user); // Add admin group Group group = identityService.newGroup(""admin""); identityService.saveGroup(group); identityService.createMembership(username, ""admin""); } } ",0 " with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ /** * see * http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/opensocial-reference#opensocial.Activity */ class Shindig_Activity { public $appId; public $body; public $bodyId; public $externalId; public $id; public $mediaItems; public $postedTime; public $priority; public $streamFaviconUrl; public $streamSourceUrl; public $streamTitle; public $streamUrl; public $templateParams; public $title; public $titleId; public $url; public $userId; public function __construct($id, $userId) { $this->id = $id; $this->userId = $userId; } public function getAppId() { return $this->appId; } public function setAppId($appId) { $this->appId = $appId; } public function getBody() { return $this->body; } public function setBody($body) { $this->body = $body; } public function getBodyId() { return $this->bodyId; } public function setBodyId($bodyId) { $this->bodyId = $bodyId; } public function getExternalId() { return $this->externalId; } public function setExternalId($externalId) { $this->externalId = $externalId; } public function getId() { return $this->id; } public function setId($id) { $this->id = $id; } public function getMediaItems() { return $this->mediaItems; } public function setMediaItems($mediaItems) { $this->mediaItems = $mediaItems; } public function getPostedTime() { return $this->postedTime; } public function setPostedTime($postedTime) { $this->postedTime = $postedTime; } public function getPriority() { return $this->priority; } public function setPriority($priority) { $this->priority = $priority; } public function getStreamFaviconUrl() { return $this->streamFaviconUrl; } public function setStreamFaviconUrl($streamFaviconUrl) { $this->streamFaviconUrl = $streamFaviconUrl; } public function getStreamSourceUrl() { return $this->streamSourceUrl; } public function setStreamSourceUrl($streamSourceUrl) { $this->streamSourceUrl = $streamSourceUrl; } public function getStreamTitle() { return $this->streamTitle; } public function setStreamTitle($streamTitle) { $this->streamTitle = $streamTitle; } public function getStreamUrl() { return $this->streamUrl; } public function setStreamUrl($streamUrl) { $this->streamUrl = $streamUrl; } public function getTemplateParams() { return $this->templateParams; } public function setTemplateParams($templateParams) { $this->templateParams = $templateParams; } public function getTitle() { return $this->title; } public function setTitle($title) { $this->title = strip_tags($title, ''); } public function getTitleId() { return $this->titleId; } public function setTitleId($titleId) { $this->titleId = $titleId; } public function getUrl() { return $this->url; } public function setUrl($url) { $this->url = $url; } public function getUserId() { return $this->userId; } public function setUserId($userId) { $this->userId = $userId; } } ",0 "./registro_movimientos/registro_movimientos.php""); //$cod_factura = $_GET['cod_factura']; $fecha_ini = $_GET['fecha_ini']; $fecha_fin = $_GET['fecha_fin']; $tabla = $_GET['tabla']; $tipo = $_GET['tipo']; $fecha = date(""Y/m/d""); $hora = date(""H:i:s""); $salida = """"; $nombre = $tabla.'_'.$fecha.'_Hora_'.$hora.'-'.$tipo.'-'.$fecha_ini.'-'.$fecha_fin.'.csv'; $sql = mysql_query(""SELECT * FROM $tabla WHERE fecha_anyo BETWEEN '$fecha_ini' AND '$fecha_fin'""); $total_columnas = mysql_num_fields($sql); // Obtener El Nombre de Campo /* for ($i = 0; $i < $total_columnas; $i++) { $encabezado = mysql_field_name($sql, $i); $salida .= '""'.$encabezado.'"",'; } $salida .=""\n""; */ // Obtener los Registros de la tabla while ($datos = mysql_fetch_array($sql)) { for ($i = 0; $i < $total_columnas; $i++) { $salida .=''.$datos[""$i""].','; //$salida .='""'.$datos[""$i""].'"",'; } $salida .=""\n""; } // DESCARGAR ARCHIVO header('Content-type: application/csv'); header('Content-Disposition: attachment; filename='.$nombre); echo $salida; exit; ?>",0 "rg/1999/xhtml""> Jarvis OS: el::PerformanceTrackingData Class Reference
                  el::PerformanceTrackingData Class Reference

                  Public Types

                  enum  DataType : base::type::EnumType { Checkpoint = 1, Complete = 2 }
                   

                  Public Member Functions

                   PerformanceTrackingData (DataType dataType)
                   
                  const std::string * blockName (void) const
                   
                  const struct timeval * startTime (void) const
                   
                  const struct timeval * endTime (void) const
                   
                  const struct timeval * lastCheckpointTime (void) const
                   
                  const base::PerformanceTrackerperformanceTracker (void) const
                   
                  PerformanceTrackingData::DataType dataType (void) const
                   
                  bool firstCheckpoint (void) const
                   
                  std::string checkpointId (void) const
                   
                  const char * file (void) const
                   
                  unsigned long int line (void) const
                   
                  const char * func (void) const
                   
                  const base::type::string_t * formattedTimeTaken () const
                   
                  const std::string & loggerId (void) const
                   

                  Friends

                  class el::base::PerformanceTracker
                   

                  The documentation for this class was generated from the following file:
                  ",0 "CENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_Version * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Version.php 23849 2011-04-06 15:23:21Z matthew $ */ /** * Class to store and retrieve the version of Zend Framework. * * @category Zend * @package Zend_Version * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ final class Zend_Version { /** * Zend Framework version identification - see compareVersion() */ const VERSION = '1.11.5'; /** * The latest stable version Zend Framework available * * @var string */ protected static $_lastestVersion; /** * Compare the specified Zend Framework version string $version * with the current Zend_Version::VERSION of Zend Framework. * * @param string $version A version string (e.g. ""0.7.1""). * @return int -1 if the $version is older, * 0 if they are the same, * and +1 if $version is newer. * */ public static function compareVersion($version) { $version = strtolower($version); $version = preg_replace('/(\d)pr(\d?)/', '$1a$2', $version); return version_compare($version, strtolower(self::VERSION)); } /** * Fetches the version of the latest stable release * * @link http://framework.zend.com/download/latest * @return string */ public static function getLatest() { if (null === self::$_lastestVersion) { self::$_lastestVersion = 'not available'; $handle = fopen('http://framework.zend.com/api/zf-version', 'r'); if (false !== $handle) { self::$_lastestVersion = stream_get_contents($handle); fclose($handle); } } return self::$_lastestVersion; } } ",0 """> Becoming a Sponsor

                  Terawatt

                  $6,000 and above

                  • Invitation to Sponsor Day
                  • Feature in our newsletter
                  • Company logo on team website
                  • Social media shout outs
                  • Company logo on team banner
                  • Large Company logo on REV 2
                  • Access to our team resume book and EVT room tour
                  • Large Company logo on team T-shirts

                  Gigawatt

                  $3,500 - $5,999

                  • Invitation to Sponsor Day
                  • Feature in our newsletter
                  • Company logo on team website
                  • Social media shout outs
                  • Company logo on team banner
                  • Medium Company logo on REV 2
                  • Access to our team resume book and EVT room tour
                  • Medium Company logo on team T-shirts

                  Megawatt

                  $1000 - $3,499

                  • Invitation to Sponsor Day
                  • Feature in our newsletter
                  • Company logo on team website
                  • Social media shout outs
                  • Company logo on team banner
                  • Small Company logo on REV 2
                  • Access to our team resume book and EVT room tour
                  • Small Company logo on team T-shirts

                  Kilowatt

                  $500-$999

                  • Invitation to Sponsor Day
                  • Feature in our newsletter
                  • Company logo on team website
                  • Social media shout outs

                  Watt

                  $1-$499

                  • Invitation to Sponsor Day
                  • Feature in our newsletter
                  ",0 "D/xhtml1-transitional.dtd""> Files ",0 "ource code is available under agreement available at // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt // // You should have received a copy of the agreement // along with this program; if not, write to Talend SA // 9 rue Pages 92150 Suresnes, France // //============================================================================ package org.talend.components.google.drive.connection; import java.util.EnumSet; import java.util.Set; import org.talend.components.api.component.ConnectorTopology; import org.talend.components.api.component.runtime.ExecutionEngine; import org.talend.components.api.properties.ComponentProperties; import org.talend.components.google.drive.GoogleDriveComponentDefinition; import org.talend.daikon.runtime.RuntimeInfo; public class GoogleDriveConnectionDefinition extends GoogleDriveComponentDefinition { public static final String COMPONENT_NAME = ""tGoogleDriveConnection""; //$NON-NLS-1$ public GoogleDriveConnectionDefinition() { super(COMPONENT_NAME); } @Override public Class getPropertyClass() { return GoogleDriveConnectionProperties.class; } @Override public Set getSupportedConnectorTopologies() { return EnumSet.of(ConnectorTopology.NONE); } @Override public RuntimeInfo getRuntimeInfo(ExecutionEngine engine, ComponentProperties properties, ConnectorTopology connectorTopology) { assertEngineCompatibility(engine); assertConnectorTopologyCompatibility(connectorTopology); return getRuntimeInfo(GoogleDriveConnectionDefinition.SOURCE_OR_SINK_CLASS); } @Override public boolean isStartable() { return true; } } ",0 " had this poinsetta for more than a month now. Its survived a trip to Port Elgin, and back. And its still living on. It looses a leaf every once and a while, but it still looks good. Good enough for its own photo shoot. Here is the best - With a bit of tweaking.

                  You can look at the rest of the photos that I took of it here ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ /** * Allows the execution of relational queries, including those expressed in SQL using Spark. */ package org.apache.spark.sql.api.java; ",0 """width:200px;margin:10px;"">

                  kimihiro-n

                  Androidアプリを中心にいろいろアプリ作ってます。
                  T N G

                  Products

                  放課後アプリ部
                  放課後アプリ部
                  個人アプリ開発者のための集客プラットフォーム作りました。 AndroidやiOSアプリのダウンロード数増加を無料で手伝います!

                  最速のJSON可視化・解析ツール
                  JSONを使った開発をスムーズにするためのツールです。 特定の値までのパスを簡単に取れます。
                  過去に作ったiOSアプリ
                  明日から本気出すタスク管理 for iOS
                  過去に作ったAndroidアプリ
                  明日から本気出すタスク管理 for Android Nagareboshi taplight
                  Others..
                  ",0 "N['message'][0]!="""") { $cpt=0; foreach($_SESSION['message'] as $messagecour) { $message.=""
                  ""; $message.=$messagecour; $message.=""
                  ""; } } $_SESSION['message']=array(); $_SESSION['typemessage']=array(); return $message; } function set_message($message="""",$typemessage=""alert"") { $_SESSION['message'][]=$message; $_SESSION['typemessage'][]=$typemessage; } } ?>",0 " $this->insert('{{%category}}', [ 'id' => 1, 'category_name' => 'Books', ]); $this->insert('{{%category}}', [ 'id' => 2, 'category_name' => 'Commerce', ]); $this->insert('{{%category}}', [ 'id' => 3, 'category_name' => 'Entertainment', ]); $this->insert('{{%category}}', [ 'id' => 4, 'category_name' => 'Fashion', ]); $this->insert('{{%category}}', [ 'id' => 5, 'category_name' => 'Film', ]); $this->insert('{{%category}}', [ 'id' => 6, 'category_name' => 'Health', ]); $this->insert('{{%category}}', [ 'id' => 7, 'category_name' => 'Science', ]); $this->insert('{{%category}}', [ 'id' => 8, 'category_name' => 'Technology', ]); $this->insert('{{%category}}', [ 'id' => 9, 'category_name' => 'History', ]); $this->insert('{{%category}}', [ 'id' => 10, 'category_name' => 'Sport', ]); } public function down() { $this->delete('{{%category}}', ['id' => 1]); $this->delete('{{%category}}', ['id' => 2]); $this->delete('{{%category}}', ['id' => 3]); $this->delete('{{%category}}', ['id' => 4]); $this->delete('{{%category}}', ['id' => 5]); $this->delete('{{%category}}', ['id' => 6]); $this->delete('{{%category}}', ['id' => 7]); $this->delete('{{%category}}', ['id' => 8]); $this->delete('{{%category}}', ['id' => 9]); $this->delete('{{%category}}', ['id' => 10]); } /* // Use safeUp/safeDown to run migration code within a transaction public function safeUp() { } public function safeDown() { } */ } ",0 "tion, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: soc2013/dpl/head/lib/libkse/thread/thr_rtld.c 174155 2007-11-30 17:20:29Z deischen $ */ #include #include #include ""rtld_lock.h"" #include ""thr_private.h"" static int _thr_rtld_clr_flag(int); static void *_thr_rtld_lock_create(void); static void _thr_rtld_lock_destroy(void *); static void _thr_rtld_lock_release(void *); static void _thr_rtld_rlock_acquire(void *); static int _thr_rtld_set_flag(int); static void _thr_rtld_wlock_acquire(void *); #ifdef NOTYET static void * _thr_rtld_lock_create(void) { pthread_rwlock_t prwlock; if (_pthread_rwlock_init(&prwlock, NULL)) return (NULL); return (prwlock); } static void _thr_rtld_lock_destroy(void *lock) { pthread_rwlock_t prwlock; prwlock = (pthread_rwlock_t)lock; if (prwlock != NULL) _pthread_rwlock_destroy(&prwlock); } static void _thr_rtld_rlock_acquire(void *lock) { pthread_rwlock_t prwlock; prwlock = (pthread_rwlock_t)lock; _thr_rwlock_rdlock(&prwlock); } static void _thr_rtld_wlock_acquire(void *lock) { pthread_rwlock_t prwlock; prwlock = (pthread_rwlock_t)lock; _thr_rwlock_wrlock(&prwlock); } static void _thr_rtld_lock_release(void *lock) { pthread_rwlock_t prwlock; prwlock = (pthread_rwlock_t)lock; _thr_rwlock_unlock(&prwlock); } static int _thr_rtld_set_flag(int mask) { struct pthread *curthread; int bits; curthread = _get_curthread(); if (curthread != NULL) { bits = curthread->rtld_bits; curthread->rtld_bits |= mask; } else { bits = 0; PANIC(""No current thread in rtld call""); } return (bits); } static int _thr_rtld_clr_flag(int mask) { struct pthread *curthread; int bits; curthread = _get_curthread(); if (curthread != NULL) { bits = curthread->rtld_bits; curthread->rtld_bits &= ~mask; } else { bits = 0; PANIC(""No current thread in rtld call""); } return (bits); } void _thr_rtld_init(void) { struct RtldLockInfo li; li.lock_create = _thr_rtld_lock_create; li.lock_destroy = _thr_rtld_lock_destroy; li.rlock_acquire = _thr_rtld_rlock_acquire; li.wlock_acquire = _thr_rtld_wlock_acquire; li.lock_release = _thr_rtld_lock_release; li.thread_set_flag = _thr_rtld_set_flag; li.thread_clr_flag = _thr_rtld_clr_flag; li.at_fork = NULL; _rtld_thread_init(&li); } void _thr_rtld_fini(void) { _rtld_thread_init(NULL); } #endif struct rtld_kse_lock { struct lock lck; struct kse *owner; kse_critical_t crit; int count; int write; }; static void * _thr_rtld_lock_create(void) { struct rtld_kse_lock *l; if ((l = malloc(sizeof(struct rtld_kse_lock))) != NULL) { _lock_init(&l->lck, LCK_ADAPTIVE, _kse_lock_wait, _kse_lock_wakeup, calloc); l->owner = NULL; l->count = 0; l->write = 0; } return (l); } static void _thr_rtld_lock_destroy(void *lock __unused) { /* XXX We really can not free memory after a fork() */ #if 0 struct rtld_kse_lock *l; l = (struct rtld_kse_lock *)lock; _lock_destroy(&l->lck); free(l); #endif return; } static void _thr_rtld_rlock_acquire(void *lock) { struct rtld_kse_lock *l; kse_critical_t crit; struct kse *curkse; l = (struct rtld_kse_lock *)lock; crit = _kse_critical_enter(); curkse = _get_curkse(); if (l->owner == curkse) { l->count++; _kse_critical_leave(crit); /* probably not necessary */ } else { KSE_LOCK_ACQUIRE(curkse, &l->lck); l->crit = crit; l->owner = curkse; l->count = 1; l->write = 0; } } static void _thr_rtld_wlock_acquire(void *lock) { struct rtld_kse_lock *l; kse_critical_t crit; struct kse *curkse; l = (struct rtld_kse_lock *)lock; crit = _kse_critical_enter(); curkse = _get_curkse(); if (l->owner == curkse) { _kse_critical_leave(crit); PANIC(""Recursive write lock attempt on rtld lock""); } else { KSE_LOCK_ACQUIRE(curkse, &l->lck); l->crit = crit; l->owner = curkse; l->count = 1; l->write = 1; } } static void _thr_rtld_lock_release(void *lock) { struct rtld_kse_lock *l; kse_critical_t crit; struct kse *curkse; l = (struct rtld_kse_lock *)lock; crit = _kse_critical_enter(); curkse = _get_curkse(); if (l->owner != curkse) { /* * We might want to forcibly unlock the rtld lock * and/or disable threaded mode so there is better * chance that the panic will work. Otherwise, * we could end up trying to take the rtld lock * again. */ _kse_critical_leave(crit); PANIC(""Attempt to unlock rtld lock when not owner.""); } else { l->count--; if (l->count == 0) { /* * If there ever is a count associated with * _kse_critical_leave(), we'll need to add * another call to it here with the crit * value from above. */ crit = l->crit; l->owner = NULL; l->write = 0; KSE_LOCK_RELEASE(curkse, &l->lck); } _kse_critical_leave(crit); } } static int _thr_rtld_set_flag(int mask __unused) { return (0); } static int _thr_rtld_clr_flag(int mask __unused) { return (0); } void _thr_rtld_init(void) { struct RtldLockInfo li; li.lock_create = _thr_rtld_lock_create; li.lock_destroy = _thr_rtld_lock_destroy; li.rlock_acquire = _thr_rtld_rlock_acquire; li.wlock_acquire = _thr_rtld_wlock_acquire; li.lock_release = _thr_rtld_lock_release; li.thread_set_flag = _thr_rtld_set_flag; li.thread_clr_flag = _thr_rtld_clr_flag; li.at_fork = NULL; _rtld_thread_init(&li); } void _thr_rtld_fini(void) { _rtld_thread_init(NULL); } ",0 "ionManager; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import fi.rivermouth.talous.domain.User; public class UserAuthenticationManager implements AuthenticationManager { @Override public Authentication authenticate(Authentication authentication) { List grantedAuths = new ArrayList(); grantedAuths.add(new SimpleGrantedAuthority(User.ROLE)); return new UsernamePasswordAuthenticationToken(authentication.getName(), authentication.getCredentials(), grantedAuths); } } ",0 "/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // DESCRIPTION: // Mission begin melt/wipe screen special effect. // #include #include ""z_zone.h"" #include ""i_video.h"" #include ""v_video.h"" #include ""m_random.h"" #include ""doomtype.h"" #include ""f_wipe.h"" // // SCREEN WIPE PACKAGE // // when zero, stop the wipe static boolean go = 0; static byte* wipe_scr_start; static byte* wipe_scr_end; static byte* wipe_scr; void wipe_shittyColMajorXform ( short* array, int width, int height ) { int x; int y; short* dest; dest = (short*) Z_Malloc(width*height*sizeof(*dest), PU_STATIC, 0); for(y=0;y *e) { newval = *w - ticks; if (newval < *e) *w = *e; else *w = newval; changed = true; } else if (*w < *e) { newval = *w + ticks; if (newval > *e) *w = *e; else *w = newval; changed = true; } } w++; e++; } return !changed; } int wipe_exitColorXForm ( int width, int height, int ticks ) { return 0; } static int* y; int wipe_initMelt ( int width, int height, int ticks ) { int i, r; // copy start screen to main screen memcpy(wipe_scr, wipe_scr_start, width*height*sizeof(*wipe_scr)); // makes this wipe faster (in theory) // to have stuff in column-major format wipe_shittyColMajorXform((short*)wipe_scr_start, width/2, height); wipe_shittyColMajorXform((short*)wipe_scr_end, width/2, height); // setup initial column positions // (y<0 => not ready to scroll yet) y = (int *) Z_Malloc(width*sizeof(int), PU_STATIC, 0); y[0] = -(M_Random()%16); for (i=1;i 0) y[i] = 0; else if (y[i] == -16) y[i] = -15; } return 0; } int wipe_doMelt ( int width, int height, int ticks ) { int i; int j; int dy; int idx; short* s; short* d; boolean done = true; width/=2; while (ticks--) { for (i=0;i= height) dy = height - y[i]; s = &((short *)wipe_scr_end)[i*height+y[i]]; d = &((short *)wipe_scr)[y[i]*width+i]; idx = 0; for (j=dy;j;j--) { d[idx] = *(s++); idx += width; } y[i] += dy; s = &((short *)wipe_scr_start)[i*height]; d = &((short *)wipe_scr)[y[i]*width+i]; idx = 0; for (j=height-y[i];j;j--) { d[idx] = *(s++); idx += width; } done = false; } } } return done; } int wipe_exitMelt ( int width, int height, int ticks ) { Z_Free(y); Z_Free(wipe_scr_start); Z_Free(wipe_scr_end); return 0; } int wipe_StartScreen ( int x, int y, int width, int height ) { wipe_scr_start = Z_Malloc(SCREENWIDTH * SCREENHEIGHT * sizeof(*wipe_scr_start), PU_STATIC, NULL); I_ReadScreen(wipe_scr_start); return 0; } int wipe_EndScreen ( int x, int y, int width, int height ) { wipe_scr_end = Z_Malloc(SCREENWIDTH * SCREENHEIGHT * sizeof(*wipe_scr_end), PU_STATIC, NULL); I_ReadScreen(wipe_scr_end); V_DrawBlock(x, y, width, height, wipe_scr_start); // restore start scr. return 0; } int wipe_ScreenWipe ( int wipeno, int x, int y, int width, int height, int ticks ) { int rc; static int (*wipes[])(int, int, int) = { wipe_initColorXForm, wipe_doColorXForm, wipe_exitColorXForm, wipe_initMelt, wipe_doMelt, wipe_exitMelt }; // initial stuff if (!go) { go = 1; // wipe_scr = (byte *) Z_Malloc(width*height, PU_STATIC, 0); // DEBUG wipe_scr = I_VideoBuffer; (*wipes[wipeno*3])(width, height, ticks); } // do a piece of wipe-in V_MarkRect(0, 0, width, height); rc = (*wipes[wipeno*3+1])(width, height, ticks); // V_DrawBlock(x, y, 0, width, height, wipe_scr); // DEBUG // final stuff if (rc) { go = 0; (*wipes[wipeno*3+2])(width, height, ticks); } return !go; } ",0 "' xmlns='http://www.w3.org/1999/xhtml'>/Library/Ruby/Gems/1.8/gems/ruby-openid-2.0.2/lib/openid/dh.rb - C0 code coverage information

                  C0 code coverage information

                  Generated on Mon Jan 07 11:13:51 -0800 2008 with rcov 0.8.1.2


                  Code reported as executed by Ruby looks like this...
                  and this: this line is also marked as covered.
                  Lines considered as run by rcov, but not reported by Ruby, look like this,
                  and this: these lines were inferred by rcov (using simple heuristics).
                  Finally, here's a line marked as not executed.
                  
                  Name Total lines Lines of code Total coverage Code coverage
                  /Library/Ruby/Gems/1.8/gems/ruby-openid-2.0.2/lib/openid/dh.rb 85 58
                  47.1%  
                  27.6%  
                   1 require "openid/util"
                   2 require "openid/cryptutil"
                   3 
                   4 module OpenID
                   5 
                   6   # Encapsulates a Diffie-Hellman key exchange.  This class is used
                   7   # internally by both the consumer and server objects.
                   8   #
                   9   # Read more about Diffie-Hellman on wikipedia:
                  10   # http://en.wikipedia.org/wiki/Diffie-Hellman
                  11 
                  12   class DiffieHellman
                  13 
                  14     # From the OpenID specification
                  15     @@default_mod = 155172898181473697471232257763715539915724801966915404479707795314057629378541917580651227423698188993727816152646631438561595825688188889951272158842675419950341258706556549803580104870537681476726513255747040765857479291291572334510643245094715007229621094194349783925984760375594985848253359305585439638443
                  16     @@default_gen = 2
                  17 
                  18     attr_reader :modulus, :generator, :public
                  19 
                  20     # A new DiffieHellman object, using the modulus and generator from
                  21     # the OpenID specification
                  22     def DiffieHellman.from_defaults
                  23       DiffieHellman.new(@@default_mod, @@default_gen)
                  24     end
                  25 
                  26     def initialize(modulus=nil, generator=nil, priv=nil)
                  27       @modulus = modulus.nil? ? @@default_mod : modulus
                  28       @generator = generator.nil? ? @@default_gen : generator
                  29       set_private(priv.nil? ? OpenID::CryptUtil.rand(@modulus-2) + 1 : priv)
                  30     end
                  31 
                  32     def get_shared_secret(composite)
                  33       DiffieHellman.powermod(composite, @private, @modulus)
                  34     end
                  35 
                  36     def xor_secret(algorithm, composite, secret)
                  37       dh_shared = get_shared_secret(composite)
                  38       packed_dh_shared = OpenID::CryptUtil.num_to_binary(dh_shared)
                  39       hashed_dh_shared = algorithm.call(packed_dh_shared)
                  40       return DiffieHellman.strxor(secret, hashed_dh_shared)
                  41     end
                  42 
                  43     def using_default_values?
                  44       @generator == @@default_gen && @modulus == @@default_mod
                  45     end
                  46 
                  47     private
                  48     def set_private(priv)
                  49       @private = priv
                  50       @public = DiffieHellman.powermod(@generator, @private, @modulus)
                  51     end
                  52 
                  53     def DiffieHellman.strxor(s, t)
                  54       if s.length != t.length
                  55         raise ArgumentError, "strxor: lengths don't match. " +
                  56           "Inputs were #{s.inspect} and #{t.inspect}"
                  57       end
                  58 
                  59       indices = 0...(s.length)
                  60       chrs = indices.collect {|i| (s[i]^t[i]).chr}
                  61       chrs.join("")
                  62     end
                  63 
                  64     # This code is taken from this post:
                  65     # <http://blade.nagaokaut.ac.jp/cgi-bin/scat.\rb/ruby/ruby-talk/19098>
                  66     # by Eric Lee Green.
                  67     def DiffieHellman.powermod(x, n, q)
                  68       counter=0
                  69       n_p=n
                  70       y_p=1
                  71       z_p=x
                  72       while n_p != 0
                  73         if n_p[0]==1
                  74           y_p=(y_p*z_p) % q
                  75         end
                  76         n_p = n_p >> 1
                  77         z_p = (z_p * z_p) % q
                  78         counter += 1
                  79       end
                  80       return y_p
                  81     end
                  82 
                  83   end
                  84 
                  85 end
                  

                  Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.

                  Valid XHTML 1.0! Valid CSS!

                  ",0 " a method to merge b into a in sorted order. * * Examples: * * a: 2, 7, 22, 44, 56, 88, 456, 5589 * b: 1, 4, 9, 23, 99, 1200 * * Result: * * result: 1, 2, 4, 7, 9, 22, 23, 44, 56, 88, 99, 456, 1200, 5589 * * Analysis: * * The merge is probably most effective if the values are inserted into the buffer starting with * the end of the input arrays. * * a == a0, a1, a2, ..., ai, ... an i.e. i is range 0..n * b == b0, b1, b2, ..., bj, ... bm i.e. j is range 0..m * * Algorithm: * * 1) Starting at the end of the arrays, compare (a, b) each descending element and place the larger * at the end of the result array (a). If the values are identical, put both elements into the * result. * * 2) Decrement the running index for each array contributing to the result on this iteration. * * 3) Repeat until the b running index (j) is 0 (all of b have been added to a). * * i = n; * j = m; * while j >= 0 do * if i < 0 * then * a[j] = b[j] * else if a[i] > b[j] * then * a[i+j+1] = a[i--] * else if b[j] > a[i] * a[i+j] = b[j--] * else * a[i+j] = b[j--] * a[i+j] = a[i--] */ import java.util.Arrays; import java.util.Locale; public class Main { /** Run the program using the command line arguments. */ public static void main(String[] args) { // Define a and b. int[] a = new int[]{2, 7, 22, 44, 56, 88, 456, 5589}; int[] b = new int[]{1, 4, 9, 23, 99, 1200}; int[] result = smerge(a, b); String format = ""Result: %s""; System.out.println(String.format(Locale.US, format, Arrays.toString(result))); } /** Return the given value in the given base. */ private static int[] smerge(final int[] a, final int[] b) { final int N = a.length; final int M = b.length; int [] result = new int[N + M]; System.arraycopy(a, 0, result, 0, N); int i = N - 1; int j = M - 1; while (j >= 0) { if (i < 0) result[j] = b[j--]; else if (a[i] > b[j]) result[i + j + 1] = a[i--]; else if (b[j] > a[i]) result[i + j + 1] = b[j--]; else { result[i + j + 1] = a[i--]; result[i + j + 1] = b[j--]; } } return result; } } ",0 "huok.es.common.entity.search.filter; import com.sishuok.es.common.entity.search.SearchOperator; import com.sishuok.es.common.entity.search.exception.InvlidSearchOperatorException; import com.sishuok.es.common.entity.search.exception.SearchException; import org.apache.commons.lang3.StringUtils; import org.springframework.util.Assert; import java.util.List; /** *

                  查询过滤条件

                  *

                  User: Zhang Kaitao *

                  Date: 13-1-15 上午7:12 *

                  Version: 1.0 */ public final class Condition implements SearchFilter { //查询参数分隔符 public static final String separator = ""_""; private String key; private String searchProperty; private SearchOperator operator; private Object value; /** * 根据查询key和值生成Condition * * @param key 如 name_like * @param value * @return */ static Condition newCondition(final String key, final Object value) throws SearchException { Assert.notNull(key, ""Condition key must not null""); String[] searchs = StringUtils.split(key, separator); if (searchs.length == 0) { throw new SearchException(""Condition key format must be : property or property_op""); } String searchProperty = searchs[0]; SearchOperator operator = null; if (searchs.length == 1) { operator = SearchOperator.custom; } else { try { operator = SearchOperator.valueOf(searchs[1]); } catch (IllegalArgumentException e) { throw new InvlidSearchOperatorException(searchProperty, searchs[1]); } } boolean allowBlankValue = SearchOperator.isAllowBlankValue(operator); boolean isValueBlank = (value == null); isValueBlank = isValueBlank || (value instanceof String && StringUtils.isBlank((String) value)); isValueBlank = isValueBlank || (value instanceof List && ((List) value).size() == 0); //过滤掉空值,即不参与查询 if (!allowBlankValue && isValueBlank) { return null; } Condition searchFilter = newCondition(searchProperty, operator, value); return searchFilter; } /** * 根据查询属性、操作符和值生成Condition * * @param searchProperty * @param operator * @param value * @return */ static Condition newCondition(final String searchProperty, final SearchOperator operator, final Object value) { return new Condition(searchProperty, operator, value); } /** * @param searchProperty 属性名 * @param operator 操作 * @param value 值 */ private Condition(final String searchProperty, final SearchOperator operator, final Object value) { this.searchProperty = searchProperty; this.operator = operator; this.value = value; this.key = this.searchProperty + separator + this.operator; } public String getKey() { return key; } public String getSearchProperty() { return searchProperty; } /** * 获取 操作符 * * @return */ public SearchOperator getOperator() throws InvlidSearchOperatorException { return operator; } /** * 获取自定义查询使用的操作符 * 1、首先获取前台传的 * 2、返回空 * * @return */ public String getOperatorStr() { if (operator != null) { return operator.getSymbol(); } return """"; } public Object getValue() { return value; } public void setValue(final Object value) { this.value = value; } public void setOperator(final SearchOperator operator) { this.operator = operator; } public void setSearchProperty(final String searchProperty) { this.searchProperty = searchProperty; } /** * 得到实体属性名 * * @return */ public String getEntityProperty() { return searchProperty; } /** * 是否是一元过滤 如is null is not null * * @return */ public boolean isUnaryFilter() { String operatorStr = getOperator().getSymbol(); return StringUtils.isNotEmpty(operatorStr) && operatorStr.startsWith(""is""); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Condition that = (Condition) o; if (key != null ? !key.equals(that.key) : that.key != null) return false; return true; } @Override public int hashCode() { return key != null ? key.hashCode() : 0; } @Override public String toString() { return ""Condition{"" + ""searchProperty='"" + searchProperty + '\'' + "", operator="" + operator + "", value="" + value + '}'; } } ",0 " it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ package com.googlecode.fascinator.portal.services; import com.googlecode.fascinator.portal.Portal; import java.io.File; import java.util.List; import java.util.Map; import java.util.Set; public interface PortalManager { public static final String DEFAULT_PORTAL_NAME = ""default""; public static final String DEFAULT_SKIN = ""default""; public static final String DEFAULT_DISPLAY = ""default""; public static final String DEFAULT_PORTAL_HOME = ""portal""; public static final String DEFAULT_PORTAL_HOME_DEV = ""src/main/config/portal""; public Map getPortals(); public Portal getDefault(); public File getHomeDir(); public Portal get(String name); public boolean exists(String name); public void add(Portal portal); public void remove(String name); public void save(Portal portal); public void reharvest(String objectId); public void reharvest(Set objectIds); public String getDefaultPortal(); public String getDefaultDisplay(); public List getSkinPriority(); } ",0 " const METADATA_COPY_HANDLER_CLASS = 'kMetadataObjectCopiedHandler'; const METADATA_DELETE_HANDLER_CLASS = 'kMetadataObjectDeletedHandler'; const BULK_UPLOAD_COLUMN_PROFILE_ID = 'metadataProfileId'; const BULK_UPLOAD_COLUMN_XML = 'metadataXml'; const BULK_UPLOAD_COLUMN_URL = 'metadataUrl'; const BULK_UPLOAD_COLUMN_FIELD_PREFIX = 'metadataField_'; const BULK_UPLOAD_MULTI_VALUES_DELIMITER = '|,|'; const BULK_UPLOAD_DATE_FORMAT = '%Y-%m-%dT%H:%i:%s'; /** * @return array in the form array[serviceName] = serviceClass */ public static function getServicesMap() { $map = array( 'metadata' => 'MetadataService', 'metadataProfile' => 'MetadataProfileService', 'metadataBatch' => 'MetadataBatchService', ); return $map; } /** * @return string - the path to services.ct */ public static function getServiceConfig() { return realpath(dirname(__FILE__).'/config/metadata.ct'); } /** * @return array */ public static function getEventConsumers() { return array( self::METADATA_FLOW_MANAGER_CLASS, self::METADATA_COPY_HANDLER_CLASS, self::METADATA_DELETE_HANDLER_CLASS, ); } /** * @param KalturaPluginManager::OBJECT_TYPE $objectType * @param string $enumValue * @param array $constructorArgs * @return object */ public static function loadObject($objectType, $enumValue, array $constructorArgs = null) { if($objectType != KalturaPluginManager::OBJECT_TYPE_SYNCABLE) return null; if(!isset($constructorArgs['objectId'])) return null; $objectId = $constructorArgs['objectId']; switch($enumValue) { case FileSync::FILE_SYNC_OBJECT_TYPE_METADATA: MetadataPeer::setUseCriteriaFilter ( false ); $object = MetadataPeer::retrieveByPK( $objectId ); MetadataPeer::setUseCriteriaFilter ( true ); return $object; case FileSync::FILE_SYNC_OBJECT_TYPE_METADATA_PROFILE: MetadataProfilePeer::setUseCriteriaFilter ( false ); $object = MetadataProfilePeer::retrieveByPK( $objectId ); MetadataProfilePeer::setUseCriteriaFilter ( true ); return $object; } return null; } /** * @param array $fields * @return string */ private static function getDateFormatRegex(&$fields = null) { $replace = array( '%Y' => '([1-2][0-9]{3})', '%m' => '([0-1][0-9])', '%d' => '([0-3][0-9])', '%H' => '([0-2][0-9])', '%i' => '([0-5][0-9])', '%s' => '([0-5][0-9])', // '%T' => '([A-Z]{3})', ); $fields = array(); $arr = null; // if(!preg_match_all('/%([YmdTHis])/', self::BULK_UPLOAD_DATE_FORMAT, $arr)) if(!preg_match_all('/%([YmdHis])/', self::BULK_UPLOAD_DATE_FORMAT, $arr)) return false; $fields = $arr[1]; return '/' . str_replace(array_keys($replace), $replace, self::BULK_UPLOAD_DATE_FORMAT) . '/'; } /** * @param string $str * @return int */ private static function parseFormatedDate($str) { KalturaLog::debug(""parseFormatedDate($str)""); if(function_exists('strptime')) { $ret = strptime($str, self::BULK_UPLOAD_DATE_FORMAT); if($ret) { KalturaLog::debug(""Formated Date [$ret] "" . date('Y-m-d\TH:i:s', $ret)); return $ret; } } $fields = null; $regex = self::getDateFormatRegex($fields); $values = null; if(!preg_match($regex, $str, $values)) return null; $hour = 0; $minute = 0; $second = 0; $month = 0; $day = 0; $year = 0; $is_dst = 0; foreach($fields as $index => $field) { $value = $values[$index + 1]; switch($field) { case 'Y': $year = intval($value); break; case 'm': $month = intval($value); break; case 'd': $day = intval($value); break; case 'H': $hour = intval($value); break; case 'i': $minute = intval($value); break; case 's': $second = intval($value); break; // case 'T': // $date = date_parse($value); // $hour -= ($date['zone'] / 60); // break; } } KalturaLog::debug(""gmmktime($hour, $minute, $second, $month, $day, $year)""); $ret = gmmktime($hour, $minute, $second, $month, $day, $year); if($ret) { KalturaLog::debug(""Formated Date [$ret] "" . date('Y-m-d\TH:i:s', $ret)); return $ret; } KalturaLog::debug(""Formated Date [null]""); return null; } /** * @param string $entryId the new created entry * @param array $data key => value pairs */ public static function handleBulkUploadData($entryId, array $data) { KalturaLog::debug(""Handle metadata bulk upload data:\n"" . print_r($data, true)); if(!isset($data[self::BULK_UPLOAD_COLUMN_PROFILE_ID])) return; $metadataProfileId = $data[self::BULK_UPLOAD_COLUMN_PROFILE_ID]; $xmlData = null; $entry = entryPeer::retrieveByPK($entryId); if(!$entry) return; $metadataProfile = MetadataProfilePeer::retrieveById($metadataProfileId); if(!$metadataProfile) { KalturaLog::info(""Metadata profile [$metadataProfileId] not found""); return; } if(isset($data[self::BULK_UPLOAD_COLUMN_URL])) { try{ $xmlData = file_get_contents($data[self::BULK_UPLOAD_COLUMN_URL]); KalturaLog::debug(""Metadata downloaded ["" . $data[self::BULK_UPLOAD_COLUMN_URL] . ""]""); } catch(Exception $e) { KalturaLog::err(""Download metadata["" . $data[self::BULK_UPLOAD_COLUMN_URL] . ""] error: "" . $e->getMessage()); $xmlData = null; } } elseif(isset($data[self::BULK_UPLOAD_COLUMN_XML])) { $xmlData = $data[self::BULK_UPLOAD_COLUMN_XML]; } else { $metadataProfileFields = array(); MetadataProfileFieldPeer::setUseCriteriaFilter(false); $tmpMetadataProfileFields = MetadataProfileFieldPeer::retrieveByMetadataProfileId($metadataProfileId); MetadataProfileFieldPeer::setUseCriteriaFilter(true); foreach($tmpMetadataProfileFields as $metadataProfileField) $metadataProfileFields[$metadataProfileField->getKey()] = $metadataProfileField; KalturaLog::debug(""Found fields ["" . count($metadataProfileFields) . ""] for metadata profile [$metadataProfileId]""); $xml = new DOMDocument(); $dataFound = false; foreach($data as $key => $value) { if(!$value || !strlen($value)) continue; if(!preg_match('/^' . self::BULK_UPLOAD_COLUMN_FIELD_PREFIX . '(.+)$/', $key, $matches)) continue; $key = $matches[1]; if(!isset($metadataProfileFields[$key])) { KalturaLog::debug(""No field found for key[$key]""); continue; } $metadataProfileField = $metadataProfileFields[$key]; KalturaLog::debug(""Found field ["" . $metadataProfileField->getXpath() . ""] for value [$value]""); if($metadataProfileField->getType() == MetadataSearchFilter::KMC_FIELD_TYPE_DATE && !is_numeric($value)) { $value = self::parseFormatedDate($value); if(!$value || !strlen($value)) continue; } $fieldValues = explode(self::BULK_UPLOAD_MULTI_VALUES_DELIMITER, $value); foreach($fieldValues as $fieldValue) self::addXpath($xml, $metadataProfileField->getXpath(), $fieldValue); $dataFound = true; } if($dataFound) { $xmlData = $xml->saveXML($xml->firstChild); $xmlData = trim($xmlData, "" \n\r\t""); } } if(!$xmlData) return; $dbMetadata = new Metadata(); $dbMetadata->setPartnerId($entry->getPartnerId()); $dbMetadata->setMetadataProfileId($metadataProfileId); $dbMetadata->setMetadataProfileVersion($metadataProfile->getVersion()); $dbMetadata->setObjectType(Metadata::TYPE_ENTRY); $dbMetadata->setObjectId($entryId); $dbMetadata->setStatus(Metadata::STATUS_INVALID); $dbMetadata->save(); KalturaLog::debug(""Metadata ["" . $dbMetadata->getId() . ""] saved [$xmlData]""); $key = $dbMetadata->getSyncKey(Metadata::FILE_SYNC_METADATA_DATA); kFileSyncUtils::file_put_contents($key, $xmlData); $errorMessage = ''; $status = kMetadataManager::validateMetadata($dbMetadata, $errorMessage); if($status == Metadata::STATUS_VALID) { kMetadataManager::updateSearchIndex($dbMetadata); } else { $bulkUploadResult = BulkUploadResultPeer::retrieveByEntryId($entryId, $entry->getBulkUploadId()); if($bulkUploadResult) { $msg = $bulkUploadResult->getDescription(); if($msg) $msg .= ""\n""; $msg .= $errorMessage; $bulkUploadResult->setDescription($msg); $bulkUploadResult->save(); } } } protected static function addXpath(DOMDocument &$xml, $xPath, $value) { KalturaLog::debug(""add value [$value] to xPath [$xPath]""); $xPaths = explode('/', $xPath); $currentNode = $xml; $currentXPath = ''; foreach($xPaths as $index => $xPath) { if(!strlen($xPath)) { KalturaLog::debug(""xPath [/] already exists""); continue; } $currentXPath .= ""/$xPath""; $domXPath = new DOMXPath($xml); $nodeList = $domXPath->query($currentXPath); if($nodeList && $nodeList->length) { $currentNode = $nodeList->item(0); KalturaLog::debug(""xPath [$xPath] already exists""); continue; } if(!preg_match('/\*\[\s*local-name\(\)\s*=\s*\'([^\']+)\'\s*\]/', $xPath, $matches)) { KalturaLog::err(""Xpath [$xPath] doesn't match""); return false; } $nodeName = $matches[1]; if($index + 1 == count($xPaths)) { KalturaLog::debug(""Creating node [$nodeName] xPath [$xPath] with value [$value]""); $valueNode = $xml->createElement($nodeName, $value); } else { KalturaLog::debug(""Creating node [$nodeName] xPath [$xPath]""); $valueNode = $xml->createElement($nodeName); } KalturaLog::debug(""Appending node [$nodeName] to current node [$currentNode->localName]""); $currentNode->appendChild($valueNode); $currentNode = $valueNode; } } // /** // * @return array // */ // public static function getAdminConsolePages() // { // $metadata = new MetadataProfilesAction('Metadata', 'metadata'); // $metadataProfiles = new MetadataProfilesAction('Profiles Management', 'profiles', 'Metadata'); // $metadataObjects = new MetadataObjectsAction('Objects Management', 'objects', 'Metadata'); // return array($metadata, $metadataProfiles, $metadataObjects); // } } ",0 "iter; import java.io.IOException; public class MFColor extends MField { public MFColor() { } public MFColor(float[] colors) { this(colors.length, colors); } public MFColor(int size, float[] colors) { for (int i = 0; i < size; i += 3) __vect.addElement(new ConstSFColor(colors[i], colors[i+1], colors[i+2])); } public MFColor(float[][] colors) { for (int i = 0; i < colors.length; i++) __vect.addElement(new ConstSFColor(colors[i][0], colors[i][1], colors[i][2])); } public void getValue(float[] colors) { __updateRead(); int size = __vect.size(); for (int i = 0; i < size; i++) { ConstSFColor sfColor = (ConstSFColor) __vect.elementAt(i); colors[3*i+0] = sfColor.red; colors[3*i+1] = sfColor.green; colors[3*i+2] = sfColor.blue; } } public void getValue(float[][] colors) { __updateRead(); int size = __vect.size(); for (int i = 0; i < size; i++) ((ConstSFColor) __vect.elementAt(i)).getValue(colors[i]); } public void get1Value(int index, float[] colors) { __update1Read(index); ((ConstSFColor) __vect.elementAt(index)).getValue(colors); } public void get1Value(int index, SFColor sfColor) { __update1Read(index); sfColor.setValue((ConstSFColor) __vect.elementAt(index)); } public void setValue(float[] colors) { setValue(colors.length, colors); } public void setValue(int size, float[] colors) { __vect.clear(); for (int i = 0; i < size; i += 3) __vect.addElement(new ConstSFColor(colors[i], colors[i+1], colors[i+2])); __updateWrite(); } public void set1Value(int index, float red, float green, float blue) { __set1Value(index, new ConstSFColor(red, green, blue)); } public void set1Value(int index, SFColor sfColor) { sfColor.__updateRead(); __set1Value(index, new ConstSFColor(sfColor.red, sfColor.green, sfColor.blue)); } public void set1Value(int index, ConstSFColor sfColor) { __set1Value(index, sfColor); } public void addValue(float red, float green, float blue) { __addValue(new ConstSFColor(red, green, blue)); } public void addValue(SFColor sfColor) { sfColor.__updateRead(); __addValue(new ConstSFColor(sfColor.red, sfColor.green, sfColor.blue)); } public void addValue(ConstSFColor sfColor) { __addValue(sfColor); } public void insertValue(int index, float red, float green, float blue) { __insertValue(index, new ConstSFColor(red, green, blue)); } public void insertValue(int index, SFColor sfColor) { sfColor.__updateRead(); __insertValue(index, new ConstSFColor(sfColor.red, sfColor.green, sfColor.blue)); } public void insertValue(int index, ConstSFColor sfColor) { __insertValue(index, sfColor); } public String toString() { __updateRead(); StringBuffer sb = new StringBuffer(""[""); int size = __vect.size(); for (int i = 0; i < size; i++) { if (i > 0) sb.append("", ""); sb.append(__vect.elementAt(i)); } return sb.append(""]"").toString(); } public void __fromPerl(BufferedReader in) throws IOException { __vect.clear(); String lenline = in.readLine(); //System.out.println (""__fromPerl, read in length as "" + lenline); //int len = Integer.parseInt(in.readLine()); int len = Integer.parseInt(lenline); for (int i = 0; i < len; i++) { ConstSFColor sf = new ConstSFColor(); sf.__fromPerl(in); __vect.addElement(sf); } } public void __toPerl(PrintWriter out) throws IOException { StringBuffer sb = new StringBuffer(""""); int size = __vect.size(); //out.print(size); for (int i = 0; i < size; i++) { ((ConstSFColor) __vect.elementAt(i)).__toPerl(out); if (i != (size-1)) out.print ("", ""); } //out.println(); } //public void setOffset(String offs) { this.offset = offs; } //JAS2 //public String getOffset() { return this.offset; } //JAS2 }",0 "g.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.ITestResult; import org.testng.Reporter; import com.fasterxml.jackson.databind.ObjectMapper; import com.sequenceiq.it.cloudbreak.dto.CloudbreakTestDto; public class Log { public static final String TEST_CONTEXT_REPORTER = ""testContextReporter""; public static final String ALTERNATE_LOG = ""alternateLog""; private static final Logger LOGGER = LoggerFactory.getLogger(Log.class); private Log() { } public static void whenJson(Logger logger, String message, Object jsonObject) throws IOException { ObjectMapper mapper = new ObjectMapper(); StringWriter writer = new StringWriter(); mapper.writeValue(writer, jsonObject); log(logger, ""When"", message, writer.toString()); } public static void whenJson(String message, Object jsonObject) throws IOException { whenJson(null, message, jsonObject); } public static void log(String message, Object... args) { log(null, message, args); } public static void log(Logger logger, String message, Object... args) { String format = String.format(message, args); log(format); if (logger != null) { logger.info(format); } } public static void error(Logger logger, String message, Object... args) { String format = String.format(message, args); log(format); if (logger != null) { logger.error(format); } } private static void log(Logger logger, String step, String message) { log(logger, step, message, null); } private static void log(Logger logger, String step, String message, String json) { TestContextReporter testContextReporter = getReporter(); if (testContextReporter == null) { log(logger, step + "" "" + message); } else { getReporter().addStep(step, message, json); } publishReport(getReporter()); } public static void given(Logger logger, String message) { log(logger, ""Given"", message); } public static void as(Logger logger, String message) { log(logger, ""As"", message); } public static void when(Logger logger, String message) { log(logger, ""When"", message); } public static void whenException(Logger logger, String message) { log(logger, ""WhenException"", message); } public static void then(Logger logger, String message) { log(logger, ""Then"", message); } public static void expect(Logger logger, String message) { log(logger, ""Expect"", message); } public static void await(Logger logger, String message) { log(logger, ""Await"", message); } public static void validateError(Logger logger, String message) { log(logger, ""Validate"", message); } public static void log(String message) { Reporter.log(message); } public static void log(ITestResult testResult) { if (testResult != null) { Throwable testResultException = testResult.getThrowable(); String methodName = testResult.getName(); int status = testResult.getStatus(); if (testResultException != null) { try { String message = testResultException.getCause() != null ? testResultException.getCause().getMessage() : testResultException.getMessage(); String testFailureType = testResultException.getCause() != null ? testResultException.getCause().getClass().getName() : testResultException.getClass().getName(); if (message == null || message.isEmpty()) { log(format("" Test Case: %s have been failed with empty test result! "", methodName)); } else { LOGGER.info(""Failed test results are: Test Case: {} | Status: {} | Failure Type: {} | Message: {}"", methodName, status, testFailureType, message); log(message); } } catch (Exception e) { log(format("" Test Case: %s got Unexpected Exception: %s "", methodName, e.getMessage())); } } } else { LOGGER.error(""Test result is NULL!""); } } private static TestContextReporter getReporter() { ITestResult res = Reporter.getCurrentTestResult(); if (res == null) { return null; } TestContextReporter reporter = (TestContextReporter) res.getAttribute(TEST_CONTEXT_REPORTER); if (reporter == null) { reporter = new TestContextReporter(); res.setAttribute(TEST_CONTEXT_REPORTER, reporter); } return reporter; } private static void publishReport(TestContextReporter testContextReporter) { ITestResult res = Reporter.getCurrentTestResult(); if (res != null) { res.setAttribute(ALTERNATE_LOG, testContextReporter.print()); } } } ",0 "kage in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magento.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category Mage * @package Mage_CatalogSearch * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_CatalogSearch_Model_Session extends Mage_Core_Model_Session_Abstract { public function __construct() { $this->init('catalogsearch'); } } ",0 " 'introtext' ); ?>

                  ",0 " OpenEyes. * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. * You should have received a copy of the GNU Affero General Public License along with OpenEyes in a file titled COPYING. If not, see . * * @link http://www.openeyes.org.uk * * @author OpenEyes * @copyright Copyright (c) 2011-2012, OpenEyes Foundation * @license http://www.gnu.org/licenses/agpl-3.0.html The GNU Affero General Public License V3.0 */ class OphInVisualfields_Pattern extends BaseActiveRecordVersioned { /** * @return string the associated database table name */ public function tableName() { return 'ophinvisualfields_pattern'; } } ",0 "Module: NotificationStrategy // // Definition of the NotificationStrategy interface. // // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // Permission is hereby granted, free of charge, to any person or organization // obtaining a copy of the software and accompanying documentation covered by // this license (the ""Software"") to use, reproduce, display, distribute, // execute, and transmit the Software, and to prepare derivative works of the // Software, and to permit third-parties to whom the Software is furnished to // do so, all subject to the following: // // The copyright notices in the Software and this entire statement, including // the above license grant, this restriction and the following disclaimer, // must be included in all copies of the Software, in whole or in part, and // all derivative works of the Software, unless such copies or derivative // works are solely in the form of machine-executable object code generated by // a source language processor. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // #ifndef Foundation_NotificationStrategy_INCLUDED #define Foundation_NotificationStrategy_INCLUDED #include ""Poco/Foundation.h"" namespace Poco { template class NotificationStrategy /// The interface that all notification strategies must implement. { public: NotificationStrategy() { } virtual ~NotificationStrategy() { } virtual void notify(const void* sender, TArgs& arguments) = 0; /// Sends a notification to all registered delegates, virtual void add(const TDelegate& pDelegate) = 0; /// Adds a delegate to the strategy, if the delegate is not yet present virtual void remove(const TDelegate& pDelegate) = 0; /// Removes a delegate from the strategy if found. virtual void clear() = 0; /// Removes all delegates from the strategy. virtual bool empty() const = 0; /// Returns false if the strategy contains at least one delegate. }; } // namespace Poco #endif ",0 "tics.consign.order.createandsend response. * * @author auto create * @since 1.0, null */ public class LogisticsConsignOrderCreateandsendResponse extends TaobaoResponse { private static final long serialVersionUID = 2877278252382584596L; /** * 是否成功 */ @ApiField(""is_success"") private Boolean isSuccess; /** * 订单ID */ @ApiField(""order_id"") private Long orderId; /** * 结果描述 */ @ApiField(""result_desc"") private String resultDesc; public Boolean getIsSuccess() { return this.isSuccess; } public Long getOrderId() { return this.orderId; } public String getResultDesc() { return this.resultDesc; } public void setIsSuccess(Boolean isSuccess) { this.isSuccess = isSuccess; } public void setOrderId(Long orderId) { this.orderId = orderId; } public void setResultDesc(String resultDesc) { this.resultDesc = resultDesc; } } ",0 "do) 2007-06-11. Revision History: --*/ #ifndef _Z3_SOLVER_PARAMS_H_ #define _Z3_SOLVER_PARAMS_H_ #include""ini_file.h"" struct z3_solver_params { bool m_ast_ll_pp; bool m_ast_smt_pp; bool m_pre_simplify_expr; std::string m_smtlib_trace_path; std::string m_smtlib_source_info; std::string m_smtlib_category; z3_solver_params(): m_ast_ll_pp(false), m_ast_smt_pp(false), m_pre_simplify_expr(false), m_smtlib_trace_path(""""), m_smtlib_source_info(""""), m_smtlib_category("""") {} void register_params(ini_params & p); }; #endif /* _Z3_SOLVER_PARAMS_H_ */ ",0 "o! * Version: 1.0 * Author: Masoud Golchin * Author URI: http://back-end.ir/ * License: GPLv2 */ function wp_plugins_menu() { add_menu_page('Useful Plugins', 'Useful Plugins', 'administrator', __FILE__, 'wp_plugins_settings_page'); wp_register_style( 'wp-useful-plugins', plugins_url('/inc/css/main.css',__FILE__)); wp_enqueue_style( 'wp-useful-plugins'); wp_enqueue_script('jquery'); } add_action('admin_menu', 'wp_plugins_menu'); function wp_plugins_settings_page() { include 'inc/forms.php'; } function wp_plugins_ajax(){ header( ""Content-Type: application/json"" ); WP_Filesystem(); $plugins_dir= plugin_dir_path(__FILE__); $plugins_dir= preg_replace('/wp-useful-plugins/', '$1', $plugins_dir); if( isset($_POST) && !empty($_POST)): foreach($_POST as $value) { $myplugin[] = $value; } // I had no choice :D haha :)) array_pop($myplugin); $myplugin = implode($myplugin); $myplugin = explode(""="",$myplugin); array_pop($myplugin); $myplugin = implode($myplugin); //echo json_encode($myplugin,true); $file_address = plugins_url('/inc/js/plugins.json',__FILE__); $json = file_get_contents($file_address); if($json): $myarray = json_decode($json, true); $myarray = $myarray['plugins']; foreach( $myarray as $value ) : if( in_array($myplugin, $value) ): $dllink = $value['dllink']; endif; endforeach; endif; $content = file_get_contents($dllink); $the_plugin = $plugins_dir . basename($dllink); $zipfile = fopen( $the_plugin , 'wb' ); if( !$zipfile ): $error_m = 'Error in installation of ' . $myplugin; echo json_encode($error_m); else: fwrite( $zipfile, $content); fclose($zipfile); unzip_file($the_plugin,$plugins_dir); unlink($the_plugin); $MyMessage = $myplugin . ' installed successfuly.
                  '; echo json_encode($MyMessage); endif; endif; die(1); } add_action('wp_ajax_wp_plugins_ajax', 'wp_plugins_ajax'); add_action('wp_ajax_nopriv_wp_plugins_ajax', 'wp_plugins_ajax'); ?> ",0 "9 lt-ie8"" lang=""en""> {% include _head.html %} {% include _browser-upgrade.html %} {% include _navigation.html %} {% if page.image.feature %}
                  {% if page.image.credit %} Photo Credit: {{ page.image.credit }} {% endif %}
                  {% endif %}
                  {% include _author-bio.html %}
                  {% if page.link %}

                  {{ page.title }}

                  {% else %}

                  {{ page.title }}

                  {% endif %}
                  {{ content }}
                  {% if page.share != false %}{% include _social-share.html %}{% endif %}

                  {{ page.title }} was published on {% if page.modified %} and last modified on {% endif %}.

                  {% if site.owner.disqus-shortname and page.comments == true %}
                  {% endif %}
                  {% if site.related_posts.size > 0 %}

                  You might also enjoy (View all posts)


                  {% endif %}
                  {% include _footer.html %}
                  {% include _scripts.html %} ",0 "t"" content=""width=device-width, initial-scale=1""> Julia Package Listing - Testing Information

                  If you think that there is an error in how your package is being tested or represented, please file an issue at PackageEvaluator.jl, making sure to read the FAQ first.

                  Badges

                  Julia v0.3


                  http://pkg.julialang.org/badges/LinearMaps_0.3.svg
                  [![LinearMaps](http://pkg.julialang.org/badges/LinearMaps_0.3.svg)](http://pkg.julialang.org/?pkg=LinearMaps)

                  Julia v0.4


                  http://pkg.julialang.org/badges/LinearMaps_0.4.svg
                  [![LinearMaps](http://pkg.julialang.org/badges/LinearMaps_0.4.svg)](http://pkg.julialang.org/?pkg=LinearMaps)

                  Most Recent Test Logs

                  Version and Status History

                  Julia v0.3

                  2015-06-20 to 2015-10-29, v0.1.1, Tests pass.
                  2014-08-01 to 2015-06-17, v0.1.1, Test exist, they pass.
                  2014-07-29 to 2014-07-30, v0.1.0, Test exist, they pass.
                  2014-07-15 to 2014-07-27, v0.0.2, Test exist, they pass.
                  2014-07-14 to 2014-07-14, v0.0.1, Test exist, they fail, but package loads.
                  2014-06-16 to 2014-07-12, v0.0.1, Test exist, they pass.
                  

                  Julia v0.4

                  2015-06-20 to 2015-10-29, v0.1.1, Tests fail.
                  2015-04-18 to 2015-06-17, v0.1.1, No tests, package doesn't load.
                  2014-08-13 to 2015-04-16, v0.1.1, Test exist, they pass.
                  
                  ",0 "le>bertrand: Not compatible 👼
                  « Up

                  bertrand 8.7.0 Not compatible 👼

                  📅 (2021-10-19 05:32:36 UTC)

                  Context

                  # Packages matching: installed
                  # Name              # Installed # Synopsis
                  base-bigarray       base
                  base-threads        base
                  base-unix           base
                  conf-findutils      1           Virtual package relying on findutils
                  coq                 8.11.1      Formal proof management system
                  num                 1.4         The legacy Num library for arbitrary-precision integer and rational arithmetic
                  ocaml               4.07.1      The OCaml compiler (virtual package)
                  ocaml-base-compiler 4.07.1      Official release 4.07.1
                  ocaml-config        1           OCaml Switch Configuration
                  ocamlfind           1.9.1       A library manager for OCaml
                  # opam file:
                  opam-version: "2.0"
                  maintainer: "Hugo.Herbelin@inria.fr"
                  homepage: "https://github.com/coq-community/bertrand"
                  license: "LGPL 2.1"
                  build: [make "-j%{jobs}%"]
                  install: [make "install"]
                  remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Bertrand"]
                  depends: [
                    "ocaml"
                    "coq" {>= "8.7" & < "8.8~"}
                  ]
                  tags: [ "keyword: Knuth's algorithm" "keyword: prime numbers" "keyword: Bertrand's postulate" "category: Mathematics/Arithmetic and Number Theory/Number theory" "category: Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs based on external tools" "category: Miscellaneous/Extracted Programs/Arithmetic" "date: 2002" ]
                  authors: [ "Laurent Théry" ]
                  bug-reports: "https://github.com/coq-community/bertrand/issues"
                  dev-repo: "git+https://github.com/coq-community/bertrand.git"
                  synopsis: "Correctness of Knuth's algorithm for prime numbers"
                  description: """
                  A proof of correctness of the algorithm as described in
                  `The Art of Computer Programming: Fundamental Algorithms'
                  by Knuth, pages 147-149"""
                  flags: light-uninstall
                  url {
                    src: "https://github.com/coq-community/bertrand/archive/v8.7.0.tar.gz"
                    checksum: "md5=94c1f46fd9ba1f18c956f3fac62dff4a"
                  }
                  

                  Lint

                  Command
                  true
                  Return code
                  0

                  Dry install 🏜️

                  Dry install with the current Coq version:

                  Command
                  opam install -y --show-action coq-bertrand.8.7.0 coq.8.11.1
                  Return code
                  5120
                  Output
                  [NOTE] Package coq is already installed (current version is 8.11.1).
                  The following dependencies couldn't be met:
                    - coq-bertrand -> coq < 8.8~ -> ocaml < 4.06.0
                        base of this switch (use `--unlock-base' to force)
                  Your request can't be satisfied:
                    - No available version of coq satisfies the constraints
                  No solution found, exiting
                  

                  Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

                  Command
                  opam remove -y coq; opam install -y --show-action --unlock-base coq-bertrand.8.7.0
                  Return code
                  0

                  Install dependencies

                  Command
                  true
                  Return code
                  0
                  Duration
                  0 s

                  Install 🚀

                  Command
                  true
                  Return code
                  0
                  Duration
                  0 s

                  Installation size

                  No files were installed.

                  Uninstall 🧹

                  Command
                  true
                  Return code
                  0
                  Missing removes
                  none
                  Wrong removes
                  none

                  Sources are on GitHub © Guillaume Claret 🐣

                  ",0 "odify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _BOARD_H #define _BOARD_H #define WHITE 0x00 #define BLACK 0x80 #define CString( c ) ( ((c) == WHITE) ? ""White"" : ""Black"" ) #define CToggle( c ) ( ((c) == BLACK) ? WHITE : BLACK ) /* These will go into an array */ #define NOPIECE 0 #define PAWN 1 #define KNIGHT 2 #define BISHOP 3 #define ROOK 4 #define CARDINAL 5 #define MARSHALL 6 #define MAN 7 #define QUEEN 8 #define ELEPHANT 9 #define ALFIL 10 #define FERZ 11 #define WAZIR 12 #define HORSE 13 #define HONORABLEHORSE 14 #define DRAGONKING 15 #define DRAGONHORSE 16 #define LANCE 17 #define CANNON 18 #define SILVER 19 #define GOLD 20 #define NIGHTRIDER 21 #define MANDARIN 22 #define FERZ2 23 #define ALFIL2 24 #define PRIESTESS 25 #define MINISTER 26 #define MAN2 27 #define MODERNELEPHANT 28 #define WOODY 29 #define SQUIRREL 30 #define MASTODON 31 #define CENTAUR 32 #define PRINCESS 33 #define EMPRESS 34 #define AMAZON 35 #define KING 36 #define HAWK 37 #define SELEPHANT 38 #define WARLORD 39 #define GENERAL 40 #define LIEUTENANT 41 #define CAPTAIN 42 #define HOPLITE 43 #define PIECES 44 #define MAX_BOARD_STRING_LENGTH 1280 /* Abitrarily 80 * 16 */ #define MAX_MOVE_LENGTH 20 #define MAX_STYLES 13 #define W_PAWN (PAWN | WHITE) #define W_KNIGHT (KNIGHT | WHITE) #define W_BISHOP (BISHOP | WHITE) #define W_ROOK (ROOK | WHITE) #define W_CARDINAL (CARDINAL | WHITE) #define W_MARSHALL (MARSHALL | WHITE) #define W_MAN (MAN | WHITE) #define W_QUEEN (QUEEN | WHITE) #define W_ELEPHANT (ELEPHANT | WHITE) #define W_ALFIL (ALFIL | WHITE) #define W_FERZ (FERZ | WHITE) #define W_WAZIR (WAZIR | WHITE) #define W_ALFIL2 (ALFIL2 | WHITE) #define W_FERZ2 (FERZ2 | WHITE) #define W_AMAZON (AMAZON | WHITE) #define W_CENTAUR (CENTAUR | WHITE) #define W_HORSE (HORSE | WHITE) #define W_HONORABLEHORSE (HONORABLEHORSE | WHITE) #define W_DRAGONKING (DRAGONKING | WHITE) #define W_DRAGONHORSE (DRAGONHORSE | WHITE) #define W_LANCE (LANCE | WHITE) #define W_CANNON (CANNON | WHITE) #define W_SILVER (SILVER | WHITE) #define W_GOLD (GOLD | WHITE) #define W_KING (KING | WHITE) #define W_MANDARIN (MANDARIN | WHITE) #define W_EMPRESS (EMPRESS | WHITE) #define W_PRINCESS (PRINCESS | WHITE) #define W_WOODY (WOODY | WHITE) #define W_MINISTER (MINISTER | WHITE) #define W_PRIESTESS (PRIESTESS | WHITE) #define W_MASTODON (MASTODON | WHITE) #define W_MAN2 (MAN2 | WHITE) #define W_NIGHTRIDER (NIGHTRIDER | WHITE) #define W_HAWK (HAWK | WHITE) #define W_SELEPHANT (SELEPHANT | WHITE) #define B_PAWN (PAWN | BLACK) #define B_KNIGHT (KNIGHT | BLACK) #define B_BISHOP (BISHOP | BLACK) #define B_ROOK (ROOK | BLACK) #define B_CARDINAL (CARDINAL | BLACK) #define B_MARSHALL (MARSHALL | BLACK) #define B_MAN (MAN | BLACK) #define B_QUEEN (QUEEN | BLACK) #define B_ELEPHANT (ELEPHANT | BLACK) #define B_ALFIL (ALFIL | BLACK) #define B_FERZ (FERZ | BLACK) #define B_WAZIR (WAZIR | BLACK) #define B_ALFIL2 (ALFIL2 | BLACK) #define B_FERZ2 (FERZ2 | BLACK) #define B_AMAZON (AMAZON | BLACK) #define B_CENTAUR (CENTAUR | BLACK) #define B_HORSE (HORSE | BLACK) #define B_HONORABLEHORSE (HONORABLEHORSE | BLACK) #define B_DRAGONKING (DRAGONKING | BLACK) #define B_DRAGONHORSE (DRAGONHORSE | BLACK) #define B_LANCE (LANCE | BLACK) #define B_CANNON (CANNON | BLACK) #define B_SILVER (SILVER | BLACK) #define B_GOLD (GOLD | BLACK) #define B_KING (KING | BLACK) #define B_MANDARIN (MANDARIN | BLACK) #define B_EMPRESS (EMPRESS | BLACK) #define B_PRINCESS (PRINCESS | BLACK) #define B_WOODY (WOODY | BLACK) #define B_MINISTER (MINISTER | BLACK) #define B_PRIESTESS (PRIESTESS | BLACK) #define B_MASTODON (MASTODON | BLACK) #define B_MAN2 (MAN2 | BLACK) #define B_NIGHTRIDER (NIGHTRIDER | BLACK) #define B_HAWK (HAWK | BLACK) #define B_SELEPHANT (SELEPHANT | BLACK) #define B_WARLORD (WARLORD | BLACK) #define B_GENERAL (GENERAL | BLACK) #define B_LIEUTENANT (LIEUTENANT | BLACK) #define B_CAPTAIN (CAPTAIN | BLACK) #define B_HOPLITE (HOPLITE | BLACK) #define isblack(p) ((p) & BLACK) #define iswhite(p) (!isblack(p)) #define iscolor(p,color) (((p) & BLACK) == (color)) #define piecechar(p) (isblack(p) ? bpchar[p] : wpchar[p]) #define piecetype(p) ((p) & 0x7f) #define colorval(p) ((p) & 0x80) #define square_color(r,f) ((((r)+(f)) & 0x01) ? BLACK : WHITE) extern int pieceValues[PIECES]; #define BW 12 #define BH 10 /* Treated as [file][rank] */ typedef int piece_t; typedef piece_t board_t[BW][BH]; GENSTRUCT struct game_state_t { piece_t board[BW][BH]; /* for bughouse */ piece_t holding[2][PIECES]; /* For castling */ char wkmoved, wqrmoved, wkrmoved; char bkmoved, bqrmoved, bkrmoved; /* for ep */ int ep_possible[2][BW]; /* For draws */ int lastIrreversable; int onMove; int moveNum; /* Game num not saved, must be restored when read */ int gameNum; char royalKnight; char capablancaPieces; char pawnDblStep; char ranks; char files; char holdings; char drops; char castlingStyle; char palace; char setup; char bareKingLoses; char stalemate; char promoType; char promoZone; char variant[20]; char name[2][8]; }; #define ALG_DROP -2 #define ALG_CASTLE -3 /* bughouse: if a drop move, then fromFile is ALG_DROP and fromRank is piece */ GENSTRUCT struct move_t { int color; int fromFile, fromRank; int toFile, toRank; piece_t pieceCaptured; #define BUGHOUSE_PAWN_REVERT 1 #if BUGHOUSE_PAWN_REVERT piece_t piecePromotionFrom; #endif piece_t piecePromotionTo; int enPassant; /* 0 = no, 1=higher -1= lower */ int doublePawn; /* Only used for board display */ char moveString[8]; _NULLTERM char algString[8]; _NULLTERM char FENpos[74]; _NULLTERM unsigned atTime; unsigned tookTime; /* these are used when examining a game */ int wTime; int bTime; /* [HGM] these are used for computer games */ float score; int depth; }; #define MoveToHalfMove( gs ) ((((gs)->moveNum - 1) * 2) + (((gs)->onMove == WHITE) ? 0 : 1)) extern const char wpchar[]; extern const char bpchar[]; extern int kludgeFlag; // [HGM] setup: forces move nr to zero in board printing /* the FEN for the default initial position */ #define INITIAL_FEN ""rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w"" #endif ",0 "pt>
                  "" method=""post"" enctype=""multipart/form-data"">

                  Tambah Artikel


                  "">
                  "" alt=""preview gambar"">
                  ",0 "lease view the LICENSE * file that was distributed with this source code. * * Feel free to edit as you please, and have fun. * * @author Marc Morera * @author Aldo Chiecchia * @author Elcodi Team */ namespace Elcodi\Component\Currency\Adapter\CurrencyExchangeRatesProvider; use GuzzleHttp\Client; use Elcodi\Component\Currency\Adapter\CurrencyExchangeRatesProvider\Interfaces\CurrencyExchangeRatesProviderAdapterInterface; /** * Class YahooFinanceProviderAdapter */ class YahooFinanceProviderAdapter implements CurrencyExchangeRatesProviderAdapterInterface { /** * @var Client * * Client */ private $client; /** * Service constructor * * @param Client $client Guzzle client for requests */ public function __construct(Client $client) { $this->client = $client; } /** * Get the latest exchange rates. * * This method will take in account always that the base currency is USD, * and the result must complain this format. * * [ * ""EUR"" => ""1,78342784"", * ""YEN"" => ""0,67438268"", * ... * ] * * @return array exchange rates */ public function getExchangeRates() { $exchangeRates = []; $response = $this ->client ->get( 'http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote', [ 'query' => [ 'format' => 'json', ], ] ) ->json(); foreach ($response['list']['resources'] as $resource) { $fields = $resource['resource']['fields']; $symbol = str_replace('=X', '', $fields['symbol']); $exchangeRates[$symbol] = (float) $fields['price']; } return $exchangeRates; } } ",0 """modal"" aria-hidden=""true"">×

                  {{ _('Edit Participant') }}

                  {{ form.hidden_tag() }} {%- for field in form -%} {%- if field.type != 'CSRFTokenField' -%}
                  {{ field.label(class_='col-sm-3 control-label') }}
                  {% if field.name == 'supervisor' %} {{ field(class_='form-control select2-container span3 select2 select2-observers-clear', **{'data-name': participant.supervisor.name, 'data-participant_id': participant.supervisor.participant_id}) }} {% elif field.name == 'location' %} {{ field(class_='form-control select2-container span3 select2 select2-locations', **{'data-name': participant.location.name, 'data-location_type': participant.location.location_type}) }} {% else %} {{ field(class_='form-control span3') }} {% endif %} {% if field.errors %} {% for e in field.errors %}

                  {{ e }}

                  {% endfor %} {% endif %}
                  {%- endif -%} {%- endfor -%}
                  ",0 " * @ORM\Table(name=""User"") * @ORM\Entity(repositoryClass=""App\AdminBundle\Entity\UserRepository"") */ class User { /** * @ORM\Id * @ORM\Column(type=""integer"") * @ORM\GeneratedValue(strategy=""AUTO"") */ private $id; /** * @ORM\Column(type=""string"") * @Assert\NotBlank() */ private $nombre; /** * @ORM\Column(type=""string"") * @Assert\NotBlank() */ private $apellido; /** * @ORM\Column(type=""string"") */ private $sexo; /** * @ORM\Column(type=""integer"") * @Assert\Max(limit = 99, message = ""No puedes tener más de 99 años."") * @Assert\Min(limit = 14, message = ""No puedes tener menos de 14 años."") */ private $edad; /** * @ORM\Column(type=""string"",name=""fecha_nacimiento"") */ private $fechaNacimiento; /** * @ORM\Column(type=""string"",name=""lugar_nacimiento"") */ private $lugarNacimiento; /** * @ORM\Column(type=""string"",name=""documento_id"") */ private $documentoId; /** * @ORM\Column(type=""string"") */ private $departamento; /** * @ORM\Column(type=""string"") */ private $ciudad; /** * @ORM\Column(type=""string"") */ private $direccion; /** * @ORM\Column(type=""integer"") * @Assert\NotNull() * @Assert\Max(limit = 3, message = ""Lo sentimos, está beca solo aplica para estratos de 1 a 3."") * @Assert\Min(limit = 1, message = ""Lo sentimos, está beca solo aplica para estratos de 1 a 3."") */ private $estrato; /** * @ORM\Column(type=""string"") */ private $telefono; /** * @ORM\Column(type=""string"") */ private $correo; /** * @ORM\Column(type=""string"") */ private $acudiente; /** * @ORM\Column(type=""string"") */ private $parentesco; /** * @ORM\Column(type=""string"",name=""estado_civil"") */ private $estadoCivil; /** * @ORM\Column(type=""integer"",name=""numeros_hermanos"") */ private $numerosHermanos; /** * @ORM\Column(type=""string"",name=""carrera_del_aspirante"") */ private $carreraDelAspirante; /** * @ORM\Column(type=""string"",name=""nombre_colegio"") */ private $nombreColegio; /** * @ORM\Column(type=""string"",name=""municipio_colegio"") */ private $municipioColegio; /** * @ORM\Column(type=""string"",name=""telefono_colegio"") */ private $telefonoColegio; /** * @ORM\Column(type=""string"",name=""nombre_rector_colegio"") */ private $nombreRectorColegio; /** * @ORM\Column(type=""string"",name=""fecha_graduacion"") */ private $fechaGraduacion; /** * @ORM\Column(type=""string"",name=""tipo_documento_icfes"") */ private $tipoDocumentoIcfes; /** * @ORM\Column(type=""string"",name=""documento_id_icfes"") */ private $documentoIdIcfes; /** * @ORM\Column(type=""decimal"",name=""promedio_icfes"") */ private $promedioIcfes; /** * @ORM\Column(type=""decimal"",name=""punt_matem_icfes"") */ private $puntMatemIcfes; /** * @ORM\Column(type=""decimal"",name=""punt_lengu_icfes"") */ private $puntLenguIcfes; /** * @ORM\Column(type=""decimal"",name=""punt_fisica_icfes"") */ private $puntFisicaIcfes; /** * @ORM\Column(type=""decimal"",name=""punt_filos_icfes"") */ private $puntFilosIcfes; /** * @ORM\Column(type=""decimal"",name=""punt_min_nucleo"") */ private $puntMinNucleo; /** * @ORM\Column(type=""string"",name=""nombre_padre"") */ private $nombrePadre; /** * @ORM\Column(type=""string"",name=""estado_trabajo_padre"") */ private $estadoTrabajoPadre; /** * @ORM\Column(type=""string"",name=""trabajo_padre"") */ private $trabajoPadre; /** * @ORM\Column(type=""string"",name=""ocupacion_padre"") */ private $ocupacionPadre; /** * @ORM\Column(type=""string"",name=""telefono_padre"") */ private $telefonoPadre; /** * @ORM\Column(type=""string"",name=""nombre_madre"") */ private $nombreMadre; /** * @ORM\Column(type=""string"",name=""estado_trabajo_madre"") */ private $estadoTrabajoMadre; /** * @ORM\Column(type=""string"",name=""trabajo_madre"") */ private $trabajoMadre; /** * @ORM\Column(type=""string"",name=""ocupacion_madre"") */ private $ocupacionMadre; /** * @ORM\Column(type=""string"",name=""telefono_madre"") */ private $telefonoMadre; /** * @ORM\Column(type=""string"",name=""estado_civil_padres"") */ private $estadoCivilPadres; /** * @ORM\Column(type=""string"",name=""responsable_del_sostenimiento_del_hogar"") */ private $responsableDelSostenimientoDelHogar; /** * @ORM\Column(type=""string"",name=""dirrecion_familiar"") */ private $dirrecionFamiliar; /** * @ORM\Column(type=""string"",name=""tipo_de_vivienda"") */ private $tipoDeVivienda; /** * @ORM\Column(type=""integer"",name=""numero_de_habitantes_en_vivienda"") */ private $numeroDeHabitantesEnVivienda; /** * @ORM\Column(type=""string"",name=""creado"") */ private $creado; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set nombre * * @param string $nombre */ public function setNombre($nombre) { $this->nombre = $nombre; } /** * Get nombre * * @return string */ public function getNombre() { return $this->nombre; } /** * Set apellido * * @param string $apellido */ public function setApellido($apellido) { $this->apellido = $apellido; } /** * Get apellidoe * * @return string */ public function getApellido() { return $this->apellido; } /** * Set sexo * * @param string $sexo */ public function setSexo($sexo) { $this->sexo = $sexo; } /** * Get sexo * * @return string */ public function getSexo() { return $this->sexo; } /** * Set edad * * @param integer $edad */ public function setEdad($edad) { $this->edad = $edad; } /** * Get edad * * @return integer */ public function getEdad() { return $this->edad; } /** * Set fechaNacimiento * * @param string $fechaNacimiento */ public function setFechaNacimiento($fn) { $this->fechaNacimiento = $fn ; } /** * Get fechaNacimiento * * @return string */ public function getFechaNacimiento() { return $this->fechaNacimiento; } /** * Set lugarNacimiento * * @param string $lugarNacimiento */ public function setLugarNacimiento($lugarNacimiento) { $this->lugarNacimiento = $lugarNacimiento; } /** * Get lugarNacimiento * * @return string */ public function getLugarNacimiento() { return $this->lugarNacimiento; } /** * Set documentoId * * @param string $documentoId */ public function setDocumentoId($documentoId) { $this->creado = \time(); $this->documentoId = $documentoId; } /** * Get documentoId * * @return string */ public function getDocumentoId() { return $this->documentoId; } /** * Set departamento * * @param string $departamento */ public function setDepartamento($departamento) { $this->departamento = $departamento; } /** * Get departamento * * @return string */ public function getDepartamento() { return $this->departamento; } /** * Set ciudad * * @param string $ciudad */ public function setCiudad($ciudad) { $this->ciudad = $ciudad; } /** * Get ciudad * * @return string */ public function getCiudad() { return $this->ciudad; } /** * Set direccion * * @param string $direccion */ public function setDireccion($direccion) { $this->direccion = $direccion; } /** * Get direccion * * @return string */ public function getDireccion() { return $this->direccion; } /** * Set estrato * * @param string $estrato */ public function setEstrato($estrato) { $this->estrato = $estrato; } /** * Get estrato * * @return string */ public function getEstrato() { return $this->estrato; } /** * Set telefono * * @param string $telefono */ public function setTelefono($telefono) { $this->telefono = $telefono; } /** * Get telefono * * @return string */ public function getTelefono() { return $this->telefono; } /** * Set correo * * @param string $correo */ public function setCorreo($correo) { $this->correo = $correo; } /** * Get correo * * @return string */ public function getCorreo() { return $this->correo; } /** * Set acudiente * * @param string $acudiente */ public function setAcudiente($acudiente) { $this->acudiente = $acudiente; } /** * Get acudiente * * @return string */ public function getAcudiente() { return $this->acudiente; } /** * Set parentesco * * @param string $parentesco */ public function setParentesco($parentesco) { $this->parentesco = $parentesco; } /** * Get parentesco * * @return string */ public function getParentesco() { return $this->parentesco; } /** * Set estadoCivil * * @param string $estadoCivil */ public function setEstadoCivil($estadoCivil) { $this->estadoCivil = $estadoCivil; } /** * Get estadoCivil * * @return string */ public function getEstadoCivil() { return $this->estadoCivil; } /** * Set numerosHermanos * * @param integer $numerosHermanos */ public function setNumerosHermanos($numerosHermanos) { $this->numerosHermanos = $numerosHermanos; } /** * Get numerosHermanos * * @return integer */ public function getNumerosHermanos() { return $this->numerosHermanos; } /** * Set carreraDelAspirante * * @param integer $carreraDelAspirante */ public function setCarreraDelAspirante($carreraDelAspirante) { $this->carreraDelAspirante = $carreraDelAspirante; } /** * Get carreraDelAspirante * * @return integer */ public function getCarreraDelAspirante() { return $this->carreraDelAspirante; } /** * Set nombreColegio * * @param string $nombreColegio */ public function setNombreColegio($nombreColegio) { $this->nombreColegio = $nombreColegio; } /** * Get nombreColegio * * @return string */ public function getNombreColegio() { return $this->nombreColegio; } /** * Set municipioColegio * * @param string $municipioColegio */ public function setMunicipioColegio($municipioColegio) { $this->municipioColegio = $municipioColegio; } /** * Get municipioColegio * * @return string */ public function getMunicipioColegio() { return $this->municipioColegio; } /** * Set telefonoColegio * * @param string $telefonoColegio */ public function setTelefonoColegio($telefonoColegio) { $this->telefonoColegio = $telefonoColegio; } /** * Get telefonoColegio * * @return string */ public function getTelefonoColegio() { return $this->telefonoColegio; } /** * Set nombreRectorColegio * * @param string $nombreRectorColegio */ public function setNombreRectorColegio($nombreRectorColegio) { $this->nombreRectorColegio = $nombreRectorColegio; } /** * Get nombreRectorColegio * * @return string */ public function getNombreRectorColegio() { return $this->nombreRectorColegio; } /** * Set fechaGraduacion * * @param string $fechaGraduacion */ public function setFechaGraduacion($fechaGraduacion) { $this->fechaGraduacion = $fechaGraduacion; } /** * Get fechaGraduacion * * @return string */ public function getFechaGraduacion() { return $this->fechaGraduacion; } /** * Set tipoDocumentoIcfes * * @param string $tipoDocumentoIcfes */ public function setTipoDocumentoIcfes($tipoDocumentoIcfes) { $this->tipoDocumentoIcfes = $tipoDocumentoIcfes; } /** * Get tipoDocumentoIcfes * * @return string */ public function getTipoDocumentoIcfes() { return $this->tipoDocumentoIcfes; } /** * Set documentoIdIcfes * * @param string $documentoIdIcfes */ public function setDocumentoIdIcfes($documentoIdIcfes) { $this->documentoIdIcfes = $documentoIdIcfes; } /** * Get documentoIdIcfess * * @return string */ public function getDocumentoIdIcfes() { return $this->documentoIdIcfes; } /** * Set promedioIcfes * * @param decimal $promedioIcfes */ public function setPromedioIcfes($promedioIcfes) { $this->promedioIcfes = $promedioIcfes; } /** * Get promedioIcfes * * @return decimal */ public function getPromedioIcfes() { return $this->promedioIcfes; } /** * Set puntMatemIcfes * * @param decimal $puntMatemIcfes */ public function setPuntMatemIcfes($puntMatemIcfes) { $this->puntMatemIcfes = $puntMatemIcfes; } /** * Get puntMatemIcfes * * @return decimal */ public function getPuntMatemIcfes() { return $this->puntMatemIcfes; } /** * Set puntLenguIcfes * * @param decimal $puntLenguIcfes */ public function setPuntLenguIcfes($puntLenguIcfes) { $this->puntLenguIcfes = $puntLenguIcfes; } /** * Get puntLenguIcfes * * @return decimal */ public function getPuntLenguIcfes() { return $this->puntLenguIcfes; } /** * Set puntFisicaIcfes * * @param decimal $puntFisicaIcfes */ public function setPuntFisicaIcfes($puntFisicaIcfes) { $this->puntFisicaIcfes = $puntFisicaIcfes; } /** * Get puntFisicaIcfes * * @return decimal */ public function getPuntFisicaIcfes() { return $this->puntFisicaIcfes; } /** * Set puntFilosIcfes * * @param decimal $puntFilosIcfes */ public function setPuntFilosIcfes($puntFilosIcfes) { $this->puntFilosIcfes = $puntFilosIcfes; } /** * Get puntFilosIcfes * * @return decimal */ public function getPuntFilosIcfes() { return $this->puntFilosIcfes; } /** * Set puntMinNucleo * * @param decimal $puntMinNucleo */ public function setPuntMinNucleo($puntMinNucleo) { $this->puntMinNucleo = $puntMinNucleo; } /** * Get puntMinNucleo * * @return decimal */ public function getPuntMinNucleo() { return $this->puntMinNucleo; } /** * Set nombrePadre * * @param string $nombrePadre */ public function setNombrePadre($nombrePadre) { $this->nombrePadre = $nombrePadre; } /** * Get nombrePadre * * @return string */ public function getNombrePadre() { return $this->nombrePadre; } /** * Set estadoTrabajoPadre * * @param string $estadoTrabajoPadre */ public function setEstadoTrabajoPadre($estadoTrabajoPadre) { $this->estadoTrabajoPadre = $estadoTrabajoPadre; } /** * Get estadoTrabajoPadre * * @return string */ public function getEstadoTrabajoPadre() { return $this->estadoTrabajoPadre; } /** * Set trabajoPadre * * @param string $trabajoPadre */ public function setTrabajoPadre($trabajoPadre) { $this->trabajoPadre = $trabajoPadre; } /** * Get trabajoPadre * * @return string */ public function getTrabajoPadre() { return $this->trabajoPadre; } /** * Set ocupacionPadre * * @param string $ocupacionPadre */ public function setOcupacionPadre($ocupacionPadre) { $this->ocupacionPadre = $ocupacionPadre; } /** * Get ocupacionPadre * * @return string */ public function getOcupacionPadre() { return $this->ocupacionPadre; } /** * Set telefonoPadre * * @param string $telefonoPadre */ public function setTelefonoPadre($telefonoPadre) { $this->telefonoPadre = $telefonoPadre; } /** * Get telefonoPadre * * @return string */ public function getTelefonoPadre() { return $this->telefonoPadre; } /** * Set nombreMadre * * @param string $nombreMadre */ public function setNombreMadre($nombreMadre) { $this->nombreMadre = $nombreMadre; } /** * Get nombreMadre * * @return string */ public function getNombreMadre() { return $this->nombreMadre; } /** * Set estadoTrabajoMadre * * @param string $estadoTrabajoMadre */ public function setEstadoTrabajoMadre($estadoTrabajoMadre) { $this->estadoTrabajoMadre = $estadoTrabajoMadre; } /** * Get estadoTrabajoMadre * * @return string */ public function getEstadoTrabajoMadre() { return $this->estadoTrabajoMadre; } /** * Set trabajoMadre * * @param string $trabajoMadre */ public function setTrabajoMadre($trabajoMadre) { $this->trabajoMadre = $trabajoMadre; } /** * Get trabajoMadre * * @return string */ public function getTrabajoMadre() { return $this->trabajoMadre; } /** * Set ocupacionMadre * * @param string $ocupacionMadre */ public function setOcupacionMadre($ocupacionMadre) { $this->ocupacionMadre = $ocupacionMadre; } /** * Get ocupacionMadre * * @return string */ public function getOcupacionMadre() { return $this->ocupacionMadre; } /** * Set telefonoMadre * * @param integer $telefonoMadre */ public function setTelefonoMadre($telefonoMadre) { $this->telefonoMadre = $telefonoMadre; } /** * Get telefonoMadre * * @return integer */ public function getTelefonoMadre() { return $this->telefonoMadre; } /** * Set estadoCivilPadres * * @param string $estadoCivilPadres */ public function setEstadoCivilPadres($estadoCivilPadres) { $this->estadoCivilPadres = $estadoCivilPadres; } /** * Get estadoCivilPadres * * @return string */ public function getEstadoCivilPadres() { return $this->estadoCivilPadres; } /** * Set responsableDelSostenimientoDelHogar * * @param string $responsableDelSostenimientoDelHogar */ public function setResponsableDelSostenimientoDelHogar($responsableDelSostenimientoDelHogar) { $this->responsableDelSostenimientoDelHogar = $responsableDelSostenimientoDelHogar; } /** * Get responsableDelSostenimientoDelHogar * * @return string */ public function getResponsableDelSostenimientoDelHogar() { return $this->responsableDelSostenimientoDelHogar; } /** * Set dirrecionFamiliar * * @param string $dirrecionFamiliar */ public function setDirrecionFamiliar($dirrecionFamiliar) { $this->dirrecionFamiliar = $dirrecionFamiliar; } /** * Get dirrecionFamiliar * * @return string */ public function getDirrecionFamiliar() { return $this->dirrecionFamiliar; } /** * Set tipoDeVivienda * * @param string $tipoDeVivienda */ public function setTipoDeVivienda($tipoDeVivienda) { $this->tipoDeVivienda = $tipoDeVivienda; } /** * Get tipoDeVivienda * * @return string */ public function getTipoDeVivienda() { return $this->tipoDeVivienda; } /** * Set numeroDeHabitantesEnVivienda * * @param integer $numeroDeHabitantesEnVivienda */ public function setNumeroDeHabitantesEnVivienda($numeroDeHabitantesEnVivienda) { $this->numeroDeHabitantesEnVivienda = $numeroDeHabitantesEnVivienda; } /** * Get numeroDeHabitantesEnVivienda * * @return integer */ public function getNumeroDeHabitantesEnVivienda() { return $this->numeroDeHabitantesEnVivienda; } }",0 "nction __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = $this->env->loadTemplate(""TwigBundle::layout.html.twig""); $this->blocks = array( 'head' => array($this, 'block_head'), 'title' => array($this, 'block_title'), 'body' => array($this, 'block_body'), ); } protected function doGetParent(array $context) { return ""TwigBundle::layout.html.twig""; } protected function doDisplay(array $context, array $blocks = array()) { $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 3 public function block_head($context, array $blocks = array()) { // line 4 echo "" env, $this->env->getExtension('assets')->getAssetUrl(""bundles/framework/css/exception.css""), ""html"", null, true); echo ""\"" rel=\""stylesheet\"" type=\""text/css\"" media=\""all\"" /> ""; } // line 7 public function block_title($context, array $blocks = array()) { // line 8 echo "" ""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, ""exception""), ""message""), ""html"", null, true); echo "" (""; echo twig_escape_filter($this->env, $this->getContext($context, ""status_code""), ""html"", null, true); echo "" ""; echo twig_escape_filter($this->env, $this->getContext($context, ""status_text""), ""html"", null, true); echo "") ""; } // line 11 public function block_body($context, array $blocks = array()) { // line 12 echo "" ""; $this->env->loadTemplate(""TwigBundle:Exception:exception.html.twig"")->display($context); } public function getTemplateName() { return ""TwigBundle:Exception:exception_full.html.twig""; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 57 => 12, 54 => 11, 43 => 8, 40 => 7, 33 => 4, 30 => 3,); } } ",0 "n 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. */ package com.intellij.refactoring.typeCook.deductive.util; import com.intellij.psi.*; import com.intellij.refactoring.typeCook.Settings; import com.intellij.refactoring.typeCook.Util; import java.util.HashSet; /** * @author db */ public class VictimCollector extends Visitor { final HashSet myVictims = new HashSet(); final PsiElement[] myElements; final Settings mySettings; public VictimCollector(final PsiElement[] elements, final Settings settings) { myElements = elements; mySettings = settings; } private void testNAdd(final PsiElement element, final PsiType t) { if (Util.isRaw(t, mySettings)) { if (element instanceof PsiNewExpression && t.getCanonicalText().equals(""java.lang.Object"")){ return; } myVictims.add(element); } } @Override public void visitLocalVariable(final PsiLocalVariable variable) { testNAdd(variable, variable.getType()); super.visitLocalVariable(variable); } @Override public void visitForeachStatement(final PsiForeachStatement statement) { super.visitForeachStatement(statement); final PsiParameter parameter = statement.getIterationParameter(); testNAdd(parameter, parameter.getType()); } @Override public void visitField(final PsiField field) { testNAdd(field, field.getType()); super.visitField(field); } @Override public void visitMethod(final PsiMethod method) { final PsiParameter[] parms = method.getParameterList().getParameters(); for (PsiParameter parm : parms) { testNAdd(parm, parm.getType()); } if (Util.isRaw(method.getReturnType(), mySettings)) { myVictims.add(method); } final PsiCodeBlock body = method.getBody(); if (body != null) { body.accept(this); } } @Override public void visitNewExpression(final PsiNewExpression expression) { if (expression.getClassReference() != null) { testNAdd(expression, expression.getType()); } super.visitNewExpression(expression); } @Override public void visitTypeCastExpression (final PsiTypeCastExpression cast){ final PsiTypeElement typeElement = cast.getCastType(); if (typeElement != null) { testNAdd(cast, typeElement.getType()); } super.visitTypeCastExpression(cast); } @Override public void visitReferenceExpression(final PsiReferenceExpression expression) { } @Override public void visitFile(PsiFile file) { if (file instanceof PsiJavaFile) { super.visitFile(file); } } public HashSet getVictims() { for (PsiElement element : myElements) { element.accept(this); } return myVictims; } } ",0 " href=""../../../../doc/src/boostbook.css"" type=""text/css"">
                  Home Libraries People FAQ More

                  An argument placeholder, for use with boost::bind(), that corresponds to the signal_number argument of a handler for asynchronous functions such as boost::asio::signal_set::async_wait.

                  unspecified signal_number;
                  
                  Requirements

                  Header: boost/asio/placeholders.hpp

                  Convenience header: boost/asio.hpp

                  Copyright © 2003-2012 Christopher M. Kohlhoff

                  Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


                  ",0 "Press construct of pages and that * other 'pages' on your WordPress site will use a different template. * * @package WordPress * @subpackage Twenty_Fourteen * @since Twenty Fourteen 1.0 */ get_header(); ?>
                  . * * Contact us by mail: tanaguru AT tanaguru DOT org */ package org.tanaguru.rules.rgaa32016; import org.tanaguru.entity.audit.TestSolution; import org.tanaguru.entity.audit.ProcessResult; import org.tanaguru.rules.rgaa32016.test.Rgaa32016RuleImplementationTestCase; /** * Unit test class for the implementation of the rule 10-15-3 of the referential Rgaa 3-2016. * * @author */ public class Rgaa32016Rule101503Test extends Rgaa32016RuleImplementationTestCase { /** * Default constructor * @param testName */ public Rgaa32016Rule101503Test (String testName){ super(testName); } @Override protected void setUpRuleImplementationClassName() { setRuleImplementationClassName( ""org.tanaguru.rules.rgaa32016.Rgaa32016Rule101503""); } @Override protected void setUpWebResourceMap() { // addWebResource(""Rgaa32016.Test.10.15.3-1Passed-01""); // addWebResource(""Rgaa32016.Test.10.15.3-2Failed-01""); addWebResource(""Rgaa32016.Test.10.15.3-3NMI-01""); // addWebResource(""Rgaa32016.Test.10.15.3-4NA-01""); } @Override protected void setProcess() { //---------------------------------------------------------------------- //------------------------------1Passed-01------------------------------ //---------------------------------------------------------------------- // checkResultIsPassed(processPageTest(""Rgaa32016.Test.10.15.3-1Passed-01""), 1); //---------------------------------------------------------------------- //------------------------------2Failed-01------------------------------ //---------------------------------------------------------------------- // ProcessResult processResult = processPageTest(""Rgaa32016.Test.10.15.3-2Failed-01""); // checkResultIsFailed(processResult, 1, 1); // checkRemarkIsPresent( // processResult, // TestSolution.FAILED, // ""#MessageHere"", // ""#CurrentElementHere"", // 1, // new ImmutablePair(""#ExtractedAttributeAsEvidence"", ""#ExtractedAttributeValue"")); //---------------------------------------------------------------------- //------------------------------3NMI-01--------------------------------- //---------------------------------------------------------------------- ProcessResult processResult = processPageTest(""Rgaa32016.Test.10.15.3-3NMI-01""); checkResultIsNotTested(processResult); // temporary result to make the result buildable before implementation // checkResultIsPreQualified(processResult, 2, 1); // checkRemarkIsPresent( // processResult, // TestSolution.NEED_MORE_INFO, // ""#MessageHere"", // ""#CurrentElementHere"", // 1, // new ImmutablePair(""#ExtractedAttributeAsEvidence"", ""#ExtractedAttributeValue"")); //---------------------------------------------------------------------- //------------------------------4NA-01------------------------------ //---------------------------------------------------------------------- // checkResultIsNotApplicable(processPageTest(""Rgaa32016.Test.10.15.3-4NA-01"")); } @Override protected void setConsolidate() { // The consolidate method can be removed when real implementation is done. // The assertions are automatically tested regarding the file names by // the abstract parent class assertEquals(TestSolution.NOT_TESTED, consolidate(""Rgaa32016.Test.10.15.3-3NMI-01"").getValue()); } } ",0 "@aconsuegra * @author Cesar Valiente - @CesarValiente * @author Benedikt Lehnert - @blehnert * @author Timothy Achumba - @iam_timm * @version 1.0 * * 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. */ package com.wunderlist.slidinglayersample; import android.annotation.SuppressLint; import android.app.Activity; import android.content.SharedPreferences; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; import android.view.KeyEvent; import android.view.MenuItem; import android.view.View; import android.widget.RelativeLayout.LayoutParams; import android.widget.TextView; import com.wunderlist.slidinglayer.LayerTransformer; import com.wunderlist.slidinglayer.SlidingLayer; import com.wunderlist.slidinglayer.transformer.AlphaTransformer; import com.wunderlist.slidinglayer.transformer.RotationTransformer; import com.wunderlist.slidinglayer.transformer.SlideJoyTransformer; public class MainActivity extends Activity { private SlidingLayer mSlidingLayer; private TextView swipeText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); bindViews(); initState(); } @SuppressLint(""NewApi"") @Override protected void onResume() { super.onResume(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { getActionBar().setDisplayHomeAsUpEnabled(true); } } /** * View binding */ private void bindViews() { mSlidingLayer = (SlidingLayer) findViewById(R.id.slidingLayer1); swipeText = (TextView) findViewById(R.id.swipeText); } /** * Initializes the origin state of the layer */ private void initState() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); setupSlidingLayerPosition(prefs.getString(""layer_location"", ""right"")); setupSlidingLayerTransform(prefs.getString(""layer_transform"", ""none"")); setupShadow(prefs.getBoolean(""layer_has_shadow"", false)); setupLayerOffset(prefs.getBoolean(""layer_has_offset"", false)); setupPreviewMode(prefs.getBoolean(""preview_mode_enabled"", false)); } private void setupSlidingLayerPosition(String layerPosition) { LayoutParams rlp = (LayoutParams) mSlidingLayer.getLayoutParams(); int textResource; Drawable d; switch (layerPosition) { case ""right"": textResource = R.string.swipe_right_label; d = getResources().getDrawable(R.drawable.container_rocket_right); mSlidingLayer.setStickTo(SlidingLayer.STICK_TO_RIGHT); break; case ""left"": textResource = R.string.swipe_left_label; d = getResources().getDrawable(R.drawable.container_rocket_left); mSlidingLayer.setStickTo(SlidingLayer.STICK_TO_LEFT); break; case ""top"": textResource = R.string.swipe_up_label; d = getResources().getDrawable(R.drawable.container_rocket); mSlidingLayer.setStickTo(SlidingLayer.STICK_TO_TOP); rlp.width = LayoutParams.MATCH_PARENT; rlp.height = getResources().getDimensionPixelSize(R.dimen.layer_size); break; default: textResource = R.string.swipe_down_label; d = getResources().getDrawable(R.drawable.container_rocket); mSlidingLayer.setStickTo(SlidingLayer.STICK_TO_BOTTOM); rlp.width = LayoutParams.MATCH_PARENT; rlp.height = getResources().getDimensionPixelSize(R.dimen.layer_size); } d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight()); swipeText.setCompoundDrawables(null, d, null, null); swipeText.setText(getResources().getString(textResource)); mSlidingLayer.setLayoutParams(rlp); } private void setupSlidingLayerTransform(String layerTransform) { LayerTransformer transformer; switch (layerTransform) { case ""alpha"": transformer = new AlphaTransformer(); break; case ""rotation"": transformer = new RotationTransformer(); break; case ""slide"": transformer = new SlideJoyTransformer(); break; default: return; } mSlidingLayer.setLayerTransformer(transformer); } private void setupShadow(boolean enabled) { if (enabled) { mSlidingLayer.setShadowSizeRes(R.dimen.shadow_size); mSlidingLayer.setShadowDrawable(R.drawable.sidebar_shadow); } else { mSlidingLayer.setShadowSize(0); mSlidingLayer.setShadowDrawable(null); } } private void setupLayerOffset(boolean enabled) { int offsetDistance = enabled ? getResources().getDimensionPixelOffset(R.dimen.offset_distance) : 0; mSlidingLayer.setOffsetDistance(offsetDistance); } private void setupPreviewMode(boolean enabled) { int previewOffset = enabled ? getResources().getDimensionPixelOffset(R.dimen.preview_offset_distance) : -1; mSlidingLayer.setPreviewOffsetDistance(previewOffset); } public void buttonClicked(View v) { switch (v.getId()) { case R.id.buttonOpen: mSlidingLayer.openLayer(true); break; case R.id.buttonClose: mSlidingLayer.closeLayer(true); break; } } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_BACK: if (mSlidingLayer.isOpened()) { mSlidingLayer.closeLayer(true); return true; } default: return super.onKeyDown(keyCode, event); } } @Override public boolean onOptionsItemSelected(MenuItem item) { finish(); return true; } } ",0 "ICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ package com.parse; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; /** * An operation that removes every instance of an element from an array field. */ /** package */ class ParseRemoveOperation implements ParseFieldOperation { protected final HashSet objects = new HashSet<>(); public ParseRemoveOperation(Collection coll) { objects.addAll(coll); } @Override public JSONObject encode(ParseEncoder objectEncoder) throws JSONException { JSONObject output = new JSONObject(); output.put(""__op"", ""Remove""); output.put(""objects"", objectEncoder.encode(new ArrayList<>(objects))); return output; } @Override public ParseFieldOperation mergeWithPrevious(ParseFieldOperation previous) { if (previous == null) { return this; } else if (previous instanceof ParseDeleteOperation) { return new ParseSetOperation(objects); } else if (previous instanceof ParseSetOperation) { Object value = ((ParseSetOperation) previous).getValue(); if (value instanceof JSONArray || value instanceof List) { return new ParseSetOperation(this.apply(value, null)); } else { throw new IllegalArgumentException(""You can only add an item to a List or JSONArray.""); } } else if (previous instanceof ParseRemoveOperation) { HashSet result = new HashSet<>(((ParseRemoveOperation) previous).objects); result.addAll(objects); return new ParseRemoveOperation(result); } else { throw new IllegalArgumentException(""Operation is invalid after previous operation.""); } } @Override public Object apply(Object oldValue, String key) { if (oldValue == null) { return new ArrayList<>(); } else if (oldValue instanceof JSONArray) { ArrayList old = ParseFieldOperations.jsonArrayAsArrayList((JSONArray) oldValue); @SuppressWarnings(""unchecked"") ArrayList newValue = (ArrayList) this.apply(old, key); return new JSONArray(newValue); } else if (oldValue instanceof List) { ArrayList result = new ArrayList<>((List) oldValue); result.removeAll(objects); // Remove the removed objects from ""objects"" -- the items remaining // should be ones that weren't removed by object equality. ArrayList objectsToBeRemoved = new ArrayList<>(objects); objectsToBeRemoved.removeAll(result); // Build up set of object IDs for any ParseObjects in the remaining objects-to-be-removed HashSet objectIds = new HashSet<>(); for (Object obj : objectsToBeRemoved) { if (obj instanceof ParseObject) { objectIds.add(((ParseObject) obj).getObjectId()); } } // And iterate over ""result"" to see if any other ParseObjects need to be removed Iterator resultIterator = result.iterator(); while (resultIterator.hasNext()) { Object obj = resultIterator.next(); if (obj instanceof ParseObject && objectIds.contains(((ParseObject) obj).getObjectId())) { resultIterator.remove(); } } return result; } else { throw new IllegalArgumentException(""Operation is invalid after previous operation.""); } } } ",0 " redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * */ #include static struct cpufreq_frequency_table meson_freq_table[] = { {0, 96000 }, {1, 192000 }, {2, 312000 }, {3, 408000 }, {4, 504000 }, {5, 600000 }, {6, 696000 }, {7, 816000 }, {8, 912000 }, {9, 1008000 }, {10, 1104000 }, {11, 1200000 }, {12, 1296000 }, {13, 1416000 }, {14, 1512000 }, {15, 1608000 }, {16, 1800000 }, {17, 1992000 }, {18, CPUFREQ_TABLE_END}, }; ",0 "his work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 a * * 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. */ package org.apache.hadoop.hive.llap.metrics; import avro.shaded.com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import java.io.Serializable; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.metrics2.MetricsCollector; import org.apache.hadoop.metrics2.MetricsInfo; import org.apache.hadoop.metrics2.MetricsSource; import org.apache.hadoop.metrics2.annotation.Metric; import org.apache.hadoop.metrics2.annotation.Metrics; import org.apache.hadoop.metrics2.lib.MutableCounterLong; /** * Wrapper around a read/write lock to collect the lock wait times. * Instances of this wrapper class can be used to collect/accumulate the wai * times around R/W locks. This is helpful if the source of a performance issue * might be related to lock contention and you need to identify the actual * locks. Instances of this class can be wrapped around any ReadWriteLock * implementation. */ public class ReadWriteLockMetrics implements ReadWriteLock { private LockWrapper readLock; ///< wrapper around original read lock private LockWrapper writeLock; ///< wrapper around original write lock /** * Helper class to compare two LockMetricSource instances. * This Comparator class can be used to sort a list of * LockMetricSource instances in descending order by their total lock * wait time. */ public static class MetricsComparator implements Comparator, Serializable { private static final long serialVersionUID = -1; @Override public int compare(MetricsSource o1, MetricsSource o2) { if (o1 != null && o2 != null && o1 instanceof LockMetricSource && o2 instanceof LockMetricSource) { LockMetricSource lms1 = (LockMetricSource)o1; LockMetricSource lms2 = (LockMetricSource)o2; long totalMs1 = (lms1.readLockWaitTimeTotal.value() / 1000000L) + (lms1.writeLockWaitTimeTotal.value() / 1000000L); long totalMs2 = (lms2.readLockWaitTimeTotal.value() / 1000000L) + (lms2.writeLockWaitTimeTotal.value() / 1000000L); // sort descending by total lock time if (totalMs1 < totalMs2) { return 1; } if (totalMs1 > totalMs2) { return -1; } // sort by label (ascending) if lock time is the same return lms1.lockLabel.compareTo(lms2.lockLabel); } return 0; } } /** * Wraps a ReadWriteLock into a monitored lock if required by * configuration. This helper is checking the * hive.llap.lockmetrics.collect configuration option and wraps the * passed in ReadWriteLock into a monitoring container if the * option is set to true. Otherwise, the original (passed in) * lock instance is returned unmodified. * * @param conf Configuration instance to check for LLAP conf options * @param lock The ReadWriteLock to wrap for monitoring * @param metrics The target container for locking metrics * @see #createLockMetricsSource */ public static ReadWriteLock wrap(Configuration conf, ReadWriteLock lock, MetricsSource metrics) { Preconditions.checkNotNull(lock, ""Caller has to provide valid input lock""); boolean needsWrap = false; if (null != conf) { needsWrap = HiveConf.getBoolVar(conf, HiveConf.ConfVars.LLAP_COLLECT_LOCK_METRICS); } if (false == needsWrap) { return lock; } Preconditions.checkNotNull(metrics, ""Caller has to procide group specific metrics source""); return new ReadWriteLockMetrics(lock, metrics); } /** * Factory method for new metric collections. * You can create and use a single MetricsSource collection for * multiple R/W locks. This makes sense if several locks belong to a single * group and you're then interested in the accumulated values for the whole * group, rather than the single lock instance. The passed in label is * supposed to identify the group uniquely. * * @param label The group identifier for lock statistics */ public static MetricsSource createLockMetricsSource(String label) { Preconditions.checkNotNull(label); Preconditions.checkArgument(!label.contains(""\""""), ""Label can't contain quote (\"")""); return new LockMetricSource(label); } /** * Returns a list with all created MetricsSource instances for * the R/W lock metrics. The returned list contains the instances that were * previously created via the createLockMetricsSource function. * * @return A list of all R/W lock based metrics sources */ public static List getAllMetricsSources() { ArrayList ret = null; synchronized (LockMetricSource.allInstances) { ret = new ArrayList<>(LockMetricSource.allInstances); } return ret; } /// Enumeration of metric info names and descriptions @VisibleForTesting public enum LockMetricInfo implements MetricsInfo { ReadLockWaitTimeTotal(""The total wait time for read locks in nanoseconds""), ReadLockWaitTimeMax(""The maximum wait time for a read lock in nanoseconds""), ReadLockCount(""Total amount of read lock requests""), WriteLockWaitTimeTotal( ""The total wait time for write locks in nanoseconds""), WriteLockWaitTimeMax( ""The maximum wait time for a write lock in nanoseconds""), WriteLockCount(""Total amount of write lock requests""); private final String description; ///< metric description /** * Creates a new MetricsInfo with the given description. * * @param desc The description of the info */ private LockMetricInfo(String desc) { description = desc; } @Override public String description() { return this.description; } } /** * Source of the accumulated lock times and counts. * Instances of this MetricSource can be created via the static * factory method createLockMetricsSource and shared across * multiple instances of the outer ReadWriteLockMetric class. */ @Metrics(about = ""Lock Metrics"", context = ""locking"") private static class LockMetricSource implements MetricsSource { private static final ArrayList allInstances = new ArrayList<>(); private final String lockLabel; ///< identifier for the group of locks /// accumulated wait time for read locks @Metric MutableCounterLong readLockWaitTimeTotal; /// highest wait time for read locks @Metric MutableCounterLong readLockWaitTimeMax; /// total number of read lock calls @Metric MutableCounterLong readLockCounts; /// accumulated wait time for write locks @Metric MutableCounterLong writeLockWaitTimeTotal; /// highest wait time for write locks @Metric MutableCounterLong writeLockWaitTimeMax; /// total number of write lock calls @Metric MutableCounterLong writeLockCounts; /** * Creates a new metrics collection instance. * Several locks can share a single MetricsSource instances * where all of them increment the metrics counts together. This can be * interesting to have a single instance for a group of related locks. The * group should then be identified by the label. * * @param label The identifier of the metrics collection */ private LockMetricSource(String label) { lockLabel = label; readLockWaitTimeTotal = new MutableCounterLong(LockMetricInfo.ReadLockWaitTimeTotal, 0); readLockWaitTimeMax = new MutableCounterLong(LockMetricInfo.ReadLockWaitTimeMax, 0); readLockCounts = new MutableCounterLong(LockMetricInfo.ReadLockCount, 0); writeLockWaitTimeTotal = new MutableCounterLong(LockMetricInfo.WriteLockWaitTimeTotal, 0); writeLockWaitTimeMax = new MutableCounterLong(LockMetricInfo.WriteLockWaitTimeMax, 0); writeLockCounts = new MutableCounterLong(LockMetricInfo.WriteLockCount, 0); synchronized (allInstances) { allInstances.add(this); } } @Override public void getMetrics(MetricsCollector collector, boolean all) { collector.addRecord(this.lockLabel) .setContext(""Locking"") .addCounter(LockMetricInfo.ReadLockWaitTimeTotal, readLockWaitTimeTotal.value()) .addCounter(LockMetricInfo.ReadLockWaitTimeMax, readLockWaitTimeMax.value()) .addCounter(LockMetricInfo.ReadLockCount, readLockCounts.value()) .addCounter(LockMetricInfo.WriteLockWaitTimeTotal, writeLockWaitTimeTotal.value()) .addCounter(LockMetricInfo.WriteLockWaitTimeMax, writeLockWaitTimeMax.value()) .addCounter(LockMetricInfo.WriteLockCount, writeLockCounts.value()); } @Override public String toString() { long avgRead = 0L; long avgWrite = 0L; long totalMillis = 0L; if (0 < readLockCounts.value()) { avgRead = readLockWaitTimeTotal.value() / readLockCounts.value(); } if (0 < writeLockCounts.value()) { avgWrite = writeLockWaitTimeTotal.value() / writeLockCounts.value(); } totalMillis = (readLockWaitTimeTotal.value() / 1000000L) + (writeLockWaitTimeTotal.value() / 1000000L); StringBuffer sb = new StringBuffer(); sb.append(""{ \""type\"" : \""R/W Lock Stats\"", \""label\"" : \""""); sb.append(lockLabel); sb.append(""\"", \""totalLockWaitTimeMillis\"" : ""); sb.append(totalMillis); sb.append("", \""readLock\"" : { \""count\"" : ""); sb.append(readLockCounts.value()); sb.append("", \""avgWaitTimeNanos\"" : ""); sb.append(avgRead); sb.append("", \""maxWaitTimeNanos\"" : ""); sb.append(readLockWaitTimeMax.value()); sb.append("" }, \""writeLock\"" : { \""count\"" : ""); sb.append(writeLockCounts.value()); sb.append("", \""avgWaitTimeNanos\"" : ""); sb.append(avgWrite); sb.append("", \""maxWaitTimeNanos\"" : ""); sb.append(writeLockWaitTimeMax.value()); sb.append("" } }""); return sb.toString(); } } /** * Inner helper class to wrap the original lock with a monitored one. * This inner class is delegating all actual locking operations to the wrapped * lock, while itself is only responsible to measure the time that it took to * acquire a specific lock. */ private static class LockWrapper implements Lock { /// the lock to delegate the work to private final Lock wrappedLock; /// total lock wait time in nanos private final MutableCounterLong lockWaitTotal; /// highest lock wait time (max) private final MutableCounterLong lockWaitMax; /// number of lock counts private final MutableCounterLong lockWaitCount; /** * Creates a new wrapper around an existing lock. * * @param original The original lock to wrap by this monitoring lock * @param total The (atomic) counter to increment for total lock wait time * @param max The (atomic) counter to adjust to the maximum wait time * @param cnt The (atomic) counter to increment with each lock call */ LockWrapper(Lock original, MutableCounterLong total, MutableCounterLong max, MutableCounterLong cnt) { wrappedLock = original; this.lockWaitTotal = total; this.lockWaitMax = max; this.lockWaitCount = cnt; } @Override public void lock() { long start = System.nanoTime(); wrappedLock.lock(); incrementBy(System.nanoTime() - start); } @Override public void lockInterruptibly() throws InterruptedException { long start = System.nanoTime(); wrappedLock.lockInterruptibly(); incrementBy(System.nanoTime() - start); } @Override public boolean tryLock() { return wrappedLock.tryLock(); } @Override public boolean tryLock(long time, TimeUnit unit) throws InterruptedException { long start = System.nanoTime(); boolean ret = wrappedLock.tryLock(time, unit); incrementBy(System.nanoTime() - start); return ret; } @Override public void unlock() { wrappedLock.unlock(); } @Override public Condition newCondition() { return wrappedLock.newCondition(); } /** * Helper to increment the monitoring counters. * Called from the lock implementations to increment the total/max/coun * values of the monitoring counters. * * @param waitTime The actual wait time (in nanos) for the lock operation */ private void incrementBy(long waitTime) { this.lockWaitTotal.incr(waitTime); this.lockWaitCount.incr(); if (waitTime > this.lockWaitMax.value()) { this.lockWaitMax.incr(waitTime - this.lockWaitMax.value()); } } } /** * Creates a new monitoring wrapper around a R/W lock. * The so created wrapper instance can be used instead of the original R/W * lock, which then automatically updates the monitoring values in the * MetricsSource. This allows easy ""slide in"" of lock monitoring where * originally only a standard R/W lock was used. * * @param lock The original R/W lock to wrap for monitoring * @param metrics The target for lock monitoring */ private ReadWriteLockMetrics(ReadWriteLock lock, MetricsSource metrics) { Preconditions.checkNotNull(lock); Preconditions.checkArgument(metrics instanceof LockMetricSource, ""Invalid MetricsSource""); LockMetricSource lms = (LockMetricSource)metrics; readLock = new LockWrapper(lock.readLock(), lms.readLockWaitTimeTotal, lms.readLockWaitTimeMax, lms.readLockCounts); writeLock = new LockWrapper(lock.writeLock(), lms.writeLockWaitTimeTotal, lms.writeLockWaitTimeMax, lms.writeLockCounts); } @Override public Lock readLock() { return readLock; } @Override public Lock writeLock() { return writeLock; } } ",0 "html1-strict.dtd""> restful_form Element

                  restful_form Element

                  Home | Getting Started | API | Elements | Actions | Validators | Handlers | Configuration Options | Advanced Guides | Troubleshooting | About

                  1 RESTful Form Element - #restful_form {}

                  The #restful_form{} element produces an HTML form element. The form element is necessary if your website has to work without javascript. It is not necessary for a pure ajax/javascript driven website.

                  Usage

                  #restful_form { 
                     method=post|get,
                     action=""/formdest"",
                     enctype=""multipart/form-data"",
                     body=FormElements
                  }
                  

                  Attributes

                  method - (string or atom)
                  Set the HTTP request-method (typically post or get).
                  action - (string)
                  Set the target-url of the form submit. If left blank, the same page module is used as target.
                  target - (string or atom)
                  Set the HTML target attribute, which can be used for redirecting the form submission to a new window, or to a frame. If left blank, will just target the current window.
                  enctype - (string)
                  Sets the encoding for the form transmission.
                  body - (string)
                  Contains the elements of the form

                  Date: 2014-11-12 19:50:51 CST

                  Author: Steffen Panning

                  Org version 7.8.02 with Emacs version 23

                  Validate XHTML 1.0

                  Comments

                  Note:To specify code blocks, just use the generic code block syntax:
                  <pre><code>your code here</code></pre>


                  comments powered by Disqus ",0 "t java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import net.sourceforge.pmd.lang.java.ast.ASTAllocationExpression; import net.sourceforge.pmd.lang.java.ast.ASTArguments; import net.sourceforge.pmd.lang.java.ast.ASTArrayDimsAndInits; import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceType; import net.sourceforge.pmd.lang.java.ast.ASTCompilationUnit; import net.sourceforge.pmd.lang.java.ast.ASTConstructorDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTEnumDeclaration; import net.sourceforge.pmd.lang.java.rule.AbstractJavaRule; /** * 1. Note all private constructors. * 2. Note all instantiations from outside of the class by way of the private * constructor. * 3. Flag instantiations. *

                  *

                  * Parameter types can not be matched because they can come as exposed members * of classes. In this case we have no way to know what the type is. We can * make a best effort though which can filter some? * * @author CL Gilbert (dnoyeb@users.sourceforge.net) * @author David Konecny (david.konecny@) * @author Romain PELISSE, belaran@gmail.com, patch bug#1807370 */ public class AccessorClassGenerationRule extends AbstractJavaRule { private List classDataList = new ArrayList(); private int classID = -1; private String packageName; public Object visit(ASTEnumDeclaration node, Object data) { return data; // just skip Enums } public Object visit(ASTCompilationUnit node, Object data) { classDataList.clear(); packageName = node.getScope().getEnclosingSourceFileScope().getPackageName(); return super.visit(node, data); } private static class ClassData { private String className; private List privateConstructors; private List instantiations; /** * List of outer class names that exist above this class */ private List classQualifyingNames; public ClassData(String className) { this.className = className; this.privateConstructors = new ArrayList(); this.instantiations = new ArrayList(); this.classQualifyingNames = new ArrayList(); } public void addInstantiation(AllocData ad) { instantiations.add(ad); } public Iterator getInstantiationIterator() { return instantiations.iterator(); } public void addConstructor(ASTConstructorDeclaration cd) { privateConstructors.add(cd); } public Iterator getPrivateConstructorIterator() { return privateConstructors.iterator(); } public String getClassName() { return className; } public void addClassQualifyingName(String name) { classQualifyingNames.add(name); } public List getClassQualifyingNamesList() { return classQualifyingNames; } } private static class AllocData { private String name; private int argumentCount; private ASTAllocationExpression allocationExpression; private boolean isArray; public AllocData(ASTAllocationExpression node, String aPackageName, List classQualifyingNames) { if (node.jjtGetChild(1) instanceof ASTArguments) { ASTArguments aa = (ASTArguments) node.jjtGetChild(1); argumentCount = aa.getArgumentCount(); //Get name and strip off all superfluous data //strip off package name if it is current package if (!(node.jjtGetChild(0) instanceof ASTClassOrInterfaceType)) { throw new RuntimeException(""BUG: Expected a ASTClassOrInterfaceType, got a "" + node.jjtGetChild(0).getClass()); } ASTClassOrInterfaceType an = (ASTClassOrInterfaceType) node.jjtGetChild(0); name = stripString(aPackageName + '.', an.getImage()); //strip off outer class names //try OuterClass, then try OuterClass.InnerClass, then try OuterClass.InnerClass.InnerClass2, etc... String findName = """"; for (ListIterator li = classQualifyingNames.listIterator(classQualifyingNames.size()); li.hasPrevious();) { String aName = li.previous(); findName = aName + '.' + findName; if (name.startsWith(findName)) { //strip off name and exit name = name.substring(findName.length()); break; } } } else if (node.jjtGetChild(1) instanceof ASTArrayDimsAndInits) { //this is incomplete because I dont need it. // child 0 could be primitive or object (ASTName or ASTPrimitiveType) isArray = true; } allocationExpression = node; } public String getName() { return name; } public int getArgumentCount() { return argumentCount; } public ASTAllocationExpression getASTAllocationExpression() { return allocationExpression; } public boolean isArray() { return isArray; } } /** * Outer interface visitation */ public Object visit(ASTClassOrInterfaceDeclaration node, Object data) { if (node.isInterface()) { if (!(node.jjtGetParent().jjtGetParent() instanceof ASTCompilationUnit)) { // not a top level interface String interfaceName = node.getImage(); int formerID = getClassID(); setClassID(classDataList.size()); ClassData newClassData = new ClassData(interfaceName); //store the names of any outer classes of this class in the classQualifyingName List ClassData formerClassData = classDataList.get(formerID); newClassData.addClassQualifyingName(formerClassData.getClassName()); classDataList.add(getClassID(), newClassData); Object o = super.visit(node, data); setClassID(formerID); return o; } else { String interfaceName = node.getImage(); classDataList.clear(); setClassID(0); classDataList.add(getClassID(), new ClassData(interfaceName)); Object o = super.visit(node, data); if (o != null) { processRule(o); } else { processRule(data); } setClassID(-1); return o; } } else if (!(node.jjtGetParent().jjtGetParent() instanceof ASTCompilationUnit)) { // not a top level class String className = node.getImage(); int formerID = getClassID(); setClassID(classDataList.size()); ClassData newClassData = new ClassData(className); // TODO // this is a hack to bail out here // but I'm not sure why this is happening // TODO if (formerID == -1 || formerID >= classDataList.size()) { return null; } //store the names of any outer classes of this class in the classQualifyingName List ClassData formerClassData = classDataList.get(formerID); newClassData.addClassQualifyingName(formerClassData.getClassName()); classDataList.add(getClassID(), newClassData); Object o = super.visit(node, data); setClassID(formerID); return o; } // outer classes if ( ! node.isStatic() ) { // See bug# 1807370 String className = node.getImage(); classDataList.clear(); setClassID(0);//first class classDataList.add(getClassID(), new ClassData(className)); } Object o = super.visit(node, data); if (o != null && ! node.isStatic() ) { // See bug# 1807370 processRule(o); } else { processRule(data); } setClassID(-1); return o; } /** * Store all target constructors */ public Object visit(ASTConstructorDeclaration node, Object data) { if (node.isPrivate()) { getCurrentClassData().addConstructor(node); } return super.visit(node, data); } public Object visit(ASTAllocationExpression node, Object data) { // TODO // this is a hack to bail out here // but I'm not sure why this is happening // TODO if (classID == -1 || getCurrentClassData() == null) { return data; } AllocData ad = new AllocData(node, packageName, getCurrentClassData().getClassQualifyingNamesList()); if (!ad.isArray()) { getCurrentClassData().addInstantiation(ad); } return super.visit(node, data); } private void processRule(Object ctx) { //check constructors of outerIterator against allocations of innerIterator for (ClassData outerDataSet : classDataList) { for (Iterator constructors = outerDataSet.getPrivateConstructorIterator(); constructors.hasNext();) { ASTConstructorDeclaration cd = constructors.next(); for (ClassData innerDataSet : classDataList) { if (outerDataSet == innerDataSet) { continue; } for (Iterator allocations = innerDataSet.getInstantiationIterator(); allocations.hasNext();) { AllocData ad = allocations.next(); //if the constructor matches the instantiation //flag the instantiation as a generator of an extra class if (outerDataSet.getClassName().equals(ad.getName()) && (cd.getParameterCount() == ad.getArgumentCount())) { addViolation(ctx, ad.getASTAllocationExpression()); } } } } } } private ClassData getCurrentClassData() { // TODO // this is a hack to bail out here // but I'm not sure why this is happening // TODO if (classID >= classDataList.size()) { return null; } return classDataList.get(classID); } private void setClassID(int id) { classID = id; } private int getClassID() { return classID; } //remove = Fire. //value = someFire.Fighter // 0123456789012345 //index = 4 //remove.size() = 5 //value.substring(0,4) = some //value.substring(4 + remove.size()) = Fighter //return ""someFighter"" // TODO move this into StringUtil private static String stripString(String remove, String value) { String returnValue; int index = value.indexOf(remove); if (index != -1) { //if the package name can start anywhere but 0 please inform the author because this will break returnValue = value.substring(0, index) + value.substring(index + remove.length()); } else { returnValue = value; } return returnValue; } } ",0 "redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // require_once('includes/Frame.php'); $eid = validInt($_REQUEST['eid']); $fid = empty($_REQUEST['fid']) ? 0 : validInt($_REQUEST['fid']); $Event = new ZM\Event($eid); if (!$Event->canView()) { $view = 'error'; return; } $Monitor = $Event->Monitor(); # This is kinda weird.. so if we pass fid=0 or some other non-integer, then it loads max score # perhaps we should consider being explicit, like fid = maxscore if (!empty($fid)) { $sql = 'SELECT * FROM Frames WHERE EventId=? AND FrameId=?'; if (!($frame = dbFetchOne($sql, NULL, array($eid, $fid)))) $frame = array('EventId'=>$eid, 'FrameId'=>$fid, 'Type'=>'Normal', 'Score'=>0); } else { $frame = dbFetchOne('SELECT * FROM Frames WHERE EventId=? AND Score=?', NULL, array($eid, $Event->MaxScore())); } $Frame = new ZM\Frame($frame); $maxFid = $Event->Frames(); $firstFid = 1; $prevFid = $fid-1; $nextFid = $fid+1; $lastFid = $maxFid; $alarmFrame = ( $Frame->Type() == 'Alarm' ) ? 1 : 0; if (isset($_REQUEST['scale'])) { $scale = validNum($_REQUEST['scale']); } else if (isset($_COOKIE['zmWatchScale'.$Monitor->Id()])) { $scale = validNum($_COOKIE['zmWatchScale'.$Monitor->Id()]); } else if (isset($_COOKIE['zmWatchScale'])) { $scale = validNum($_COOKIE['zmWatchScale']); } else { $scale = max(reScale(SCALE_BASE, $Monitor->DefaultScale(), ZM_WEB_DEFAULT_SCALE), SCALE_BASE); } $scale = $scale ? $scale : 0; $imageData = $Event->getImageSrc($frame, $scale, 0); if (!$imageData) { ZM\Error(""No data found for Event $eid frame $fid""); $imageData = array(); } $show = 'capt'; if (isset($_REQUEST['show']) && in_array($_REQUEST['show'], array('capt', 'anal'))) { $show = $_REQUEST['show']; if ($show == 'anal' and ! $imageData['hasAnalImage']) { $show = 'capt'; } } else if ($imageData['hasAnalImage']) { $show = 'anal'; } $imagePath = $imageData['thumbPath']; $eventPath = $imageData['eventPath']; $dImagePath = sprintf('%s/%0'.ZM_EVENT_IMAGE_DIGITS.'d-diag-d.jpg', $eventPath, $Frame->FrameId()); $rImagePath = sprintf('%s/%0'.ZM_EVENT_IMAGE_DIGITS.'d-diag-r.jpg', $eventPath, $Frame->FrameId()); $focusWindow = true; xhtmlHeaders(__FILE__, translate('Frame').' - '.$Event->Id().' - '.$Frame->FrameId()); ?>

                  Id().'-'.$Frame->FrameId().' ('.$Frame->Score().')' ?>

                  'changeScale','id'=>'scale')); ?>
                  Width(); ?>""/> Height(); ?>""/>

                  ', $Event->Id(), $Frame->FrameId(), $scale, ($show=='anal'?'capt':'anal'), ($show=='anal'?'without':'with') ); } ?> getImageSrc($show=='anal'?'analyse':'capture')) ?>"" width=""Width(), $Monitor->DefaultScale(), $scale) ?>"" height=""Height(), $Monitor->DefaultScale(), $scale) ?>"" alt=""EventId().'-'.$Frame->FrameId() ?>"" class="""" />

                  Id().'&scale='.$scale.'&show='.$show.'&fid='; ?>

                  FrameId() > 1 ) ? 'href=""'.$frame_url_base.$firstFid.'"" class=""btn-primary""' : 'class=""btn-primary disabled""') ?>> FrameId() > 1 ) ? 'href=""'.$frame_url_base.$prevFid.'"" class=""btn-primary""' : 'class=""btn-primary disabled""' ?>> FrameId() < $maxFid ) ? 'href=""'.$frame_url_base.$nextFid.'"" class=""btn-primary""' : 'class=""btn-primary disabled""' ?>> FrameId() < $maxFid ) ? 'href=""'.$frame_url_base.$lastFid .'"" class=""btn-primary""' : 'class=""btn-primary disabled""' ?>>

                  "" width=""Width(), $Monitor->DefaultScale(), $scale) ?>"" height=""Height(), $Monitor->DefaultScale(), $scale) ?>"" class="""" />

                  "" width=""Width(), $Monitor->DefaultScale(), $scale) ?>"" height=""Height(), $Monitor->DefaultScale(), $scale) ?>"" class="""" />

                  ",0 " * this work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.harmony.beans.tests.support.mock; public class MockNullSubClass extends MockNullSuperClass{ } ",0 "ict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd""> Zips.Zip<T, U, V> Method
                  Documentation Project
                  Zips.Zip<T, U, V> Method
                  Collapse All
                    Zip a paired stream with a third stream.
                  Declaring type: Zips
                  Namespace: Sasa.Linq
                  Assembly: Sasa
                  Overload List
                    Name Description
                    Zips.Zip<T, U, V> (IEnumerable<T>, IEnumerable<U>, IEnumerable<V>) Zip the elements of three streams.
                    Zips.Zip<T, U, V> (IEnumerable<Pair<T, U>>, IEnumerable<V>) Zip a paired stream with a third stream.
                  Generated by ImmDoc .NET.
                  ",0 "ml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectReader; import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.databind.SerializationFeature; import com.google.common.collect.ImmutableMap; import org.junit.Test; import java.io.IOException; import java.util.List; import java.util.stream.Collectors; import static org.quicktheories.QuickTheory.qt; import static org.quicktheories.generators.SourceDSL.*; import static io.dropwizard.testing.FixtureHelpers.*; import static org.assertj.core.api.Assertions.assertThat; public final class CountsTest { private static final ObjectMapper mapper = new ObjectMapper() .disable(SerializationFeature.CLOSE_CLOSEABLE) .disable(JsonGenerator.Feature.AUTO_CLOSE_TARGET); private static final ObjectWriter writer = mapper.writerFor(Counts.class); private static final ObjectReader reader = mapper.readerFor(Counts.class); private static final JsonFactory factory = mapper.getFactory(); /** * Test the encode-decode invariant for the Counts model. */ @Test public void testCountsEncodeDecode() throws Exception { qt().forAll( lists().of(strings().allPossible().ofLengthBetween(0, 100)).ofSize(1000).describedAs( Object::toString ), lists().of(longs().all()).ofSize(1000).describedAs(Object::toString) ).as((words, counts) -> { final ImmutableMap.Builder mapBuilder = ImmutableMap.builder(); final List distinctWords = words.stream().distinct().collect(Collectors.toList()); for (int i = 0; i < distinctWords.size(); i++) { mapBuilder.put(distinctWords.get(i), counts.get(i)); // counts.size() >= distinctWords.size() } return mapBuilder.build(); }).checkAssert((wordCounts) -> { try { final byte[] bytes = writer.writeValueAsBytes(new Counts(wordCounts)); final JsonParser parser = factory.createParser(bytes); final Counts countsModel = reader.readValue(parser); assertThat(countsModel.getCounts()).isEqualTo(wordCounts); } catch (IOException e) { throw new RuntimeException(""Caught IOE while checking counts"", e); } }); } @Test public void testCountsSerializesToJSON() throws Exception { final Counts counts = new Counts( ImmutableMap.builder() .put(""word"", 3L) .put(""wat"", 1L) .build() ); final String expected = writer.writeValueAsString(reader.readValue(fixture(""fixtures/counts.json""))); assertThat(writer.writeValueAsString(counts)).isEqualTo(expected); } @Test public void testCountsDeserializesFromJSON() throws Exception { final Counts counts = new Counts( ImmutableMap.builder() .put(""word"", 3L) .put(""wat"", 1L) .build() ); final Counts deserializedCounts = reader.readValue(fixture(""fixtures/counts.json"")); assertThat(deserializedCounts.getCounts()).isEqualTo(counts.getCounts()); } }",0 "ns, statements, and computer programs contain // unpublished proprietary information of Realmac Software Ltd // and are protected by copyright law. They may not be disclosed // to third parties or copied or duplicated in any form, in whole or // in part, without the prior written consent of Realmac Software Ltd. // Created by Keith Duncan on 26/03/2009 //*************************************************************************** #import // Model #import ""RMUploadKit/AFPropertyListProtocol.h"" #import ""RMUploadKit/RMUploadPlugin.h"" #import ""RMUploadKit/RMUploadPreset.h"" #import ""RMUploadKit/RMUploadCredentials.h"" // Controller #import ""RMUploadKit/RMUploadPresetConfigurationViewController.h"" #import ""RMUploadKit/RMUploadMetadataConfigurationViewController.h"" // Upload #import ""RMUploadKit/RMUploadTask.h"" #import ""RMUploadKit/RMUploadURLConnection.h"" #import ""RMUploadKit/NSURLRequest+RMUploadAdditions.h"" #import ""RMUploadKit/RMUploadMultipartFormDocument.h"" // Other #import ""RMUploadKit/RMUploadConstants.h"" #import ""RMUploadKit/RMUploadErrors.h"" ",0 "is work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.activemq.artemis.tests.util; import org.junit.Test; import java.util.concurrent.CountDownLatch; import org.junit.Assert; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.utils.DataConstants; public class SimpleStringTest extends Assert { /** * Converting back and forth between char and byte requires care as char is unsigned. * @see SimpleString#getChars(int, int, char[], int) * @see SimpleString#charAt(int) * @see SimpleString#split(char) * @see SimpleString#concat(char) */ @Test public void testGetChar() { SimpleString p1 = new SimpleString(""foo""); SimpleString p2 = new SimpleString(""bar""); for (int i = 0; i < 1 << 16; i++) { String msg = ""expecting "" + i; char c = (char)i; SimpleString s = new SimpleString(String.valueOf(c)); // test getChars(...) char[] c1 = new char[1]; s.getChars(0, 1, c1, 0); assertEquals(msg, c, c1[0]); // test charAt(int) assertEquals(msg, c, s.charAt(0)); // test concat(char) SimpleString s2 = s.concat(c); assertEquals(msg, c, s2.charAt(1)); // test splitting with chars SimpleString sSplit = new SimpleString(""foo"" + String.valueOf(c) + ""bar""); SimpleString[] chunks = sSplit.split(c); SimpleString[] split1 = p1.split(c); SimpleString[] split2 = p2.split(c); assertEquals(split1.length + split2.length, chunks.length); int j = 0; for (SimpleString iS : split1) { assertEquals(iS.toString(), iS, chunks[j++]); } for (SimpleString iS : split2) { assertEquals(iS.toString(), iS, chunks[j++]); } } } @Test public void testString() throws Exception { final String str = ""hello123ABC__524`16254`6125!%^$!%$!%$!%$!%!$%!$$!\uA324""; SimpleString s = new SimpleString(str); Assert.assertEquals(str, s.toString()); Assert.assertEquals(2 * str.length(), s.getData().length); byte[] data = s.getData(); SimpleString s2 = new SimpleString(data); Assert.assertEquals(str, s2.toString()); } @Test public void testStartsWith() throws Exception { SimpleString s1 = new SimpleString(""abcdefghi""); Assert.assertTrue(s1.startsWith(new SimpleString(""abc""))); Assert.assertTrue(s1.startsWith(new SimpleString(""abcdef""))); Assert.assertTrue(s1.startsWith(new SimpleString(""abcdefghi""))); Assert.assertFalse(s1.startsWith(new SimpleString(""abcdefghijklmn""))); Assert.assertFalse(s1.startsWith(new SimpleString(""aardvark""))); Assert.assertFalse(s1.startsWith(new SimpleString(""z""))); } @Test public void testCharSequence() throws Exception { String s = ""abcdefghijkl""; SimpleString s1 = new SimpleString(s); Assert.assertEquals('a', s1.charAt(0)); Assert.assertEquals('b', s1.charAt(1)); Assert.assertEquals('c', s1.charAt(2)); Assert.assertEquals('k', s1.charAt(10)); Assert.assertEquals('l', s1.charAt(11)); try { s1.charAt(-1); Assert.fail(""Should throw exception""); } catch (IndexOutOfBoundsException e) { // OK } try { s1.charAt(-2); Assert.fail(""Should throw exception""); } catch (IndexOutOfBoundsException e) { // OK } try { s1.charAt(s.length()); Assert.fail(""Should throw exception""); } catch (IndexOutOfBoundsException e) { // OK } try { s1.charAt(s.length() + 1); Assert.fail(""Should throw exception""); } catch (IndexOutOfBoundsException e) { // OK } Assert.assertEquals(s.length(), s1.length()); CharSequence ss = s1.subSequence(0, s1.length()); Assert.assertEquals(ss, s1); ss = s1.subSequence(1, 4); Assert.assertEquals(ss, new SimpleString(""bcd"")); ss = s1.subSequence(5, 10); Assert.assertEquals(ss, new SimpleString(""fghij"")); ss = s1.subSequence(5, 12); Assert.assertEquals(ss, new SimpleString(""fghijkl"")); try { s1.subSequence(-1, 2); Assert.fail(""Should throw exception""); } catch (IndexOutOfBoundsException e) { // OK } try { s1.subSequence(-4, -2); Assert.fail(""Should throw exception""); } catch (IndexOutOfBoundsException e) { // OK } try { s1.subSequence(0, s1.length() + 1); Assert.fail(""Should throw exception""); } catch (IndexOutOfBoundsException e) { // OK } try { s1.subSequence(0, s1.length() + 2); Assert.fail(""Should throw exception""); } catch (IndexOutOfBoundsException e) { // OK } try { s1.subSequence(5, 1); Assert.fail(""Should throw exception""); } catch (IndexOutOfBoundsException e) { // OK } } @Test public void testEquals() throws Exception { Assert.assertFalse(new SimpleString(""abcdef"").equals(new Object())); Assert.assertFalse(new SimpleString(""abcef"").equals(null)); Assert.assertEquals(new SimpleString(""abcdef""), new SimpleString(""abcdef"")); Assert.assertFalse(new SimpleString(""abcdef"").equals(new SimpleString(""abggcdef""))); Assert.assertFalse(new SimpleString(""abcdef"").equals(new SimpleString(""ghijkl""))); } @Test public void testHashcode() throws Exception { SimpleString str = new SimpleString(""abcdef""); SimpleString sameStr = new SimpleString(""abcdef""); SimpleString differentStr = new SimpleString(""ghijk""); Assert.assertTrue(str.hashCode() == sameStr.hashCode()); Assert.assertFalse(str.hashCode() == differentStr.hashCode()); } @Test public void testUnicode() throws Exception { String myString = ""abcdef&^*&!^ghijkl\uB5E2\uCAC7\uB2BB\uB7DD\uB7C7\uB3A3\uBCE4\uB5A5""; SimpleString s = new SimpleString(myString); byte[] data = s.getData(); s = new SimpleString(data); Assert.assertEquals(myString, s.toString()); } @Test public void testUnicodeWithSurrogates() throws Exception { String myString = ""abcdef&^*&!^ghijkl\uD900\uDD00""; SimpleString s = new SimpleString(myString); byte[] data = s.getData(); s = new SimpleString(data); Assert.assertEquals(myString, s.toString()); } @Test public void testSizeofString() throws Exception { Assert.assertEquals(DataConstants.SIZE_INT, SimpleString.sizeofString(new SimpleString(""""))); SimpleString str = new SimpleString(RandomUtil.randomString()); Assert.assertEquals(DataConstants.SIZE_INT + str.getData().length, SimpleString.sizeofString(str)); } @Test public void testSizeofNullableString() throws Exception { Assert.assertEquals(1, SimpleString.sizeofNullableString(null)); Assert.assertEquals(1 + DataConstants.SIZE_INT, SimpleString.sizeofNullableString(new SimpleString(""""))); SimpleString str = new SimpleString(RandomUtil.randomString()); Assert.assertEquals(1 + DataConstants.SIZE_INT + str.getData().length, SimpleString.sizeofNullableString(str)); } @Test public void testSplitNoDelimeter() throws Exception { SimpleString s = new SimpleString(""abcdefghi""); SimpleString[] strings = s.split('.'); Assert.assertNotNull(strings); Assert.assertEquals(strings.length, 1); Assert.assertEquals(strings[0], s); } @Test public void testSplit1Delimeter() throws Exception { SimpleString s = new SimpleString(""abcd.efghi""); SimpleString[] strings = s.split('.'); Assert.assertNotNull(strings); Assert.assertEquals(strings.length, 2); Assert.assertEquals(strings[0], new SimpleString(""abcd"")); Assert.assertEquals(strings[1], new SimpleString(""efghi"")); } @Test public void testSplitmanyDelimeters() throws Exception { SimpleString s = new SimpleString(""abcd.efghi.jklmn.opqrs.tuvw.xyz""); SimpleString[] strings = s.split('.'); Assert.assertNotNull(strings); Assert.assertEquals(strings.length, 6); Assert.assertEquals(strings[0], new SimpleString(""abcd"")); Assert.assertEquals(strings[1], new SimpleString(""efghi"")); Assert.assertEquals(strings[2], new SimpleString(""jklmn"")); Assert.assertEquals(strings[3], new SimpleString(""opqrs"")); Assert.assertEquals(strings[4], new SimpleString(""tuvw"")); Assert.assertEquals(strings[5], new SimpleString(""xyz"")); } @Test public void testContains() { SimpleString simpleString = new SimpleString(""abcdefghijklmnopqrst""); Assert.assertFalse(simpleString.contains('.')); Assert.assertFalse(simpleString.contains('%')); Assert.assertFalse(simpleString.contains('8')); Assert.assertFalse(simpleString.contains('.')); Assert.assertTrue(simpleString.contains('a')); Assert.assertTrue(simpleString.contains('b')); Assert.assertTrue(simpleString.contains('c')); Assert.assertTrue(simpleString.contains('d')); Assert.assertTrue(simpleString.contains('e')); Assert.assertTrue(simpleString.contains('f')); Assert.assertTrue(simpleString.contains('g')); Assert.assertTrue(simpleString.contains('h')); Assert.assertTrue(simpleString.contains('i')); Assert.assertTrue(simpleString.contains('j')); Assert.assertTrue(simpleString.contains('k')); Assert.assertTrue(simpleString.contains('l')); Assert.assertTrue(simpleString.contains('m')); Assert.assertTrue(simpleString.contains('n')); Assert.assertTrue(simpleString.contains('o')); Assert.assertTrue(simpleString.contains('p')); Assert.assertTrue(simpleString.contains('q')); Assert.assertTrue(simpleString.contains('r')); Assert.assertTrue(simpleString.contains('s')); Assert.assertTrue(simpleString.contains('t')); } @Test public void testConcat() { SimpleString start = new SimpleString(""abcdefg""); SimpleString middle = new SimpleString(""hijklmnop""); SimpleString end = new SimpleString(""qrstuvwxyz""); Assert.assertEquals(start.concat(middle).concat(end), new SimpleString(""abcdefghijklmnopqrstuvwxyz"")); Assert.assertEquals(start.concat('.').concat(end), new SimpleString(""abcdefg.qrstuvwxyz"")); // Testing concat of SimpleString with String for (int i = 0; i < 10; i++) { Assert.assertEquals(new SimpleString(""abcdefg-"" + i), start.concat(""-"" + Integer.toString(i))); } } @Test public void testMultithreadHashCode() throws Exception { for (int repeat = 0; repeat < 10; repeat++) { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < 100; i++) { buffer.append(""Some Big String "" + i); } String strvalue = buffer.toString(); final int initialhash = new SimpleString(strvalue).hashCode(); final SimpleString value = new SimpleString(strvalue); int nThreads = 100; final CountDownLatch latch = new CountDownLatch(nThreads); final CountDownLatch start = new CountDownLatch(1); class T extends Thread { boolean failed = false; @Override public void run() { try { latch.countDown(); start.await(); int newhash = value.hashCode(); if (newhash != initialhash) { failed = true; } } catch (Exception e) { e.printStackTrace(); failed = true; } } } T[] x = new T[nThreads]; for (int i = 0; i < nThreads; i++) { x[i] = new T(); x[i].start(); } ActiveMQTestBase.waitForLatch(latch); start.countDown(); for (T t : x) { t.join(); } for (T t : x) { Assert.assertFalse(t.failed); } } } } ",0 " // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY, without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // // // // This product released under GNU General Public License v2 // //////////////////////////////////////////////////////////////////////////////// /** * Debug on/off */ define(""DEBUG"", 0); $query_counter = 0; if (!extension_loaded('mysql')) { /** * MySQLi database layer * */ if (!($db_config = @parse_ini_file('config/' . 'signup.ini'))) { print('Cannot load mysql configuration'); exit; } $dbport = (empty($db_config['port'])) ? 3306 : $db_config['port']; $loginDB = new mysqli($db_config['server'], $db_config['username'], $db_config['password'], $db_config['db'], $dbport); if ($loginDB->connect_error) { die('Connection error (' . $loginDB->connect_errno . ') ' . $loginDB->connect_error); } else { $loginDB->query(""set character_set_client='"" . $db_config['character'] . ""'""); $loginDB->query(""set character_set_results='"" . $db_config['character'] . ""'""); $loginDB->query(""set collation_connection='"" . $db_config['character'] . ""_general_ci'""); } /** * Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection * * @global mysqli $loginDB * @param aata to filter $parametr * * @return string */ function loginDB_real_escape_string($parametr) { global $loginDB; $result = $loginDB->real_escape_string($parametr); return($result); } if (!function_exists('mysql_real_escape_string')) { /** * Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection * * @param string $data * * @return string */ function mysql_real_escape_string($data) { return(loginDB_real_escape_string($data)); } } /** * Executing query and returns result as array * * @global int $query_counter * @param string $query * @return array */ function simple_queryall($query) { global $loginDB, $query_counter; if (DEBUG) { print ($query . ""\n""); } $result = array(); $queried = $loginDB->query($query) or die('wrong data input: ' . $query); while ($row = mysqli_fetch_assoc($queried)) { $result[] = $row; } $query_counter++; return($result); } /** * Executing query and returns array of first result * * @global int $query_counter * @param string $query * @return array */ function simple_query($query) { global $loginDB, $query_counter; if (DEBUG) { print ($query . ""\n""); } $queried = $loginDB->query($query) or die('wrong data input: ' . $query); $result = mysqli_fetch_assoc($queried); $query_counter++; return($result); } /** * Updates single field in table with where expression * * @param string $tablename * @param string $field * @param string $value * @param string $where * @param bool $NoQuotesAroundValue */ function simple_update_field($tablename, $field, $value, $where = '', $NoQuotesAroundValue = false) { $tablename = loginDB_real_escape_string($tablename); $value = loginDB_real_escape_string($value); $field = loginDB_real_escape_string($field); if ($NoQuotesAroundValue) { $query = ""UPDATE `"" . $tablename . ""` SET `"" . $field . ""` = "" . $value . "" "" . $where . """"; } else { $query = ""UPDATE `"" . $tablename . ""` SET `"" . $field . ""` = '"" . $value . ""' "" . $where . """"; } nr_query($query); } /** * Returns last used `id` field available in some table * * @param string $tablename * @return int */ function simple_get_lastid($tablename) { $tablename = loginDB_real_escape_string($tablename); $query = ""SELECT `id` from `"" . $tablename . ""` ORDER BY `id` DESC LIMIT 1""; $result = simple_query($query); return($result['id']); } /** * Just executing single query * * @global int $query_counter * @param string $query * @return mixed */ function nr_query($query) { global $loginDB, $query_counter; if (DEBUG) { print ($query . ""\n""); } $queried = $loginDB->query($query) or die('wrong data input: ' . $query); $query_counter++; return($queried); } } else { /** * MySQL database old driver abstraction class * */ class MySQLDB { var $connection; var $last_query_num = 0; var $db_config = array(); /** * last query result id * * @var MySQL result */ var $lastresult; /** * last query assoc value * * @var bool */ var $assoc = true; /** * Initialises connection with MySQL database server and selects needed db * * @param MySQL Connection Id $connection * @return MySQLDB */ public function __construct($connection = false) { if ($connection) $this->connection = $connection; else { if (!($this->db_config = @parse_ini_file('config/' . 'signup.ini'))) { print(('Cannot load mysql configuration')); return false; } if (!extension_loaded('mysql')) { print(('Unable to load module for database server ""mysql"": PHP mysql extension not available!')); return false; } $dbport = (empty($this->db_config['port'])) ? 3306 : $this->db_config['port']; $this->connection = @mysql_connect($this->db_config['server'] . ':' . $dbport, $this->db_config['username'], $this->db_config['password']); } if (empty($this->connection)) { print(('Unable to connect to database server!')); return false; } else if (!@mysql_select_db($this->db_config['db'], $this->connection)) { $this->db_error(); return false; } mysql_query(""set character_set_client='"" . $this->db_config['character'] . ""'""); mysql_query(""set character_set_results='"" . $this->db_config['character'] . ""'""); mysql_query(""set collation_connection='"" . $this->db_config['character'] . ""_general_ci'""); return true; } /** * Executes query and returns result identifier * * @param string $query * @return MySQL result */ function query($query) { // use escape/vf function for input data. $result = @mysql_query($query, $this->connection) or $this->db_error(0, $query); $this->last_query_num++; return $result; } /** * Executes query and makes abstract data read available * * @param string $query * @param bool $assoc */ function ExecuteReader($query, $assoc = true) { $this->lastresult = $this->query($query); $this->assoc = $assoc; } /** * Link to query method * * @param string $query * @return MySQL result */ function ExecuteNonQuery($query) { $result = $this->query($query); return (mysql_affected_rows() == 0 ? false : $result); } /** * Returns array with from the current query result * * @return array */ function Read() { if ($this->assoc) { $result = @mysql_fetch_assoc($this->lastresult) or false; } else { $result = @mysql_fetch_row($this->lastresult) or false; } return $result; } /** * Returns one row from the current query result * * @param int $row * @return string */ function ReadSingleRow($row) { return mysql_result($this->lastresult, $row) or false; } /** * Prints MySQL error message; swithing DEBUG, prints MySQL error description or sends it to administrator * */ function db_error($show = 0, $query = '') { global $system; if (!in_array(mysql_errno(), array(1062, 1065, 1191))) { // Errcodes in array are handled at another way :) if (DEBUG == 1 || $show == 1) { $warning = '
                  ' . ('MySQL Error') . ':
                  '; $warning.=mysql_errno() . ' : ' . mysql_error() . (empty($query) ? '' : '
                  In query: '); print($warning) or print($warning); } else { print('An error occured. Please, try again later. Thank You !'); @$message.=mysql_errno() . ':' . mysql_error() . ""\r\n""; $message.=(empty($query) ? '' : ""In query: \r\n"" . $query . ""\r\n""); die('MySQL error ' . $message); } } } /** * Escapes string to use in SQL query * * @param string $string * @return string */ function escape($string) { if (!get_magic_quotes_gpc()) return mysql_real_escape_string($string, $this->connection); else return mysql_real_escape_string(stripslashes($string), $this->connection); } /** * Disconnects from database server * */ function disconnect() { @mysql_close($this->connection); } } /** * Executing query and returns result as array * * @global int $query_counter * @param string $query * @return array */ function simple_queryall($query) { global $query_counter; if (DEBUG) { print ($query . ""\n""); } $result = ''; $queried = mysql_query($query) or die('wrong data input: ' . $query); while ($row = mysql_fetch_assoc($queried)) { $result[] = $row; } $query_counter++; return($result); } /** * Executing query and returns array of first result * * @global int $query_counter * @param string $query * @return array */ function simple_query($query) { global $query_counter; if (DEBUG) { print ($query . ""\n""); } $queried = mysql_query($query) or die('wrong data input: ' . $query); $result = mysql_fetch_assoc($queried); $query_counter++; return($result); } /** * Updates single field in table with where expression * * @param string $tablename * @param string $field * @param string $value * @param string $where * @param bool $NoQuotesAroundValue */ function simple_update_field($tablename, $field, $value, $where = '', $NoQuotesAroundValue = false) { $tablename = mysql_real_escape_string($tablename); $value = mysql_real_escape_string($value); $field = mysql_real_escape_string($field); if ($NoQuotesAroundValue) { $query = ""UPDATE `"" . $tablename . ""` SET `"" . $field . ""` = "" . $value . "" "" . $where . """"; } else { $query = ""UPDATE `"" . $tablename . ""` SET `"" . $field . ""` = '"" . $value . ""' "" . $where . """"; } nr_query($query); } /** * Returns last used `id` field available in some table * * @param string $tablename * @return int */ function simple_get_lastid($tablename) { $tablename = mysql_real_escape_string($tablename); $query = ""SELECT `id` from `"" . $tablename . ""` ORDER BY `id` DESC LIMIT 1""; $result = simple_query($query); return ($result['id']); } /** * Just executing single query * * @global int $query_counter * @param string $query * @return mixed */ function nr_query($query) { global $query_counter; if (DEBUG) { print ($query . ""\n""); } $queried = mysql_query($query) or die('wrong data input: ' . $query); $query_counter++; return($queried); } //creating mysql connection object instance $db = new MySQLDB(); } /** * Returns cutted down data entry * Available modes: * 1 - digits, letters * 2 - only letters * 3 - only digits * 4 - digits, letters, ""-"", ""_"", ""."" * 5 - current lang alphabet + digits + punctuation * default - filter only blacklist chars * * @param string $data * @param int $mode * @return string */ function vf($data, $mode = 0) { switch ($mode) { case 1: return preg_replace(""#[^a-z0-9A-Z]#Uis"", '', $data); // digits, letters break; case 2: return preg_replace(""#[^a-zA-Z]#Uis"", '', $data); // letters break; case 3: return preg_replace(""#[^0-9]#Uis"", '', $data); // digits break; case 4: return preg_replace(""#[^a-z0-9A-Z\-_\.]#Uis"", '', $data); // digits, letters, ""-"", ""_"", ""."" break; case 5: return preg_replace(""#[^ [:punct:]"" . ('a-zA-Z') . ""0-9]#Uis"", '', $data); // current lang alphabet + digits + punctuation break; default: return preg_replace(""#[~@\+\?\%\/\;=\*\>\<\""\'\-]#Uis"", '', $data); // black list anyway break; } } ?> ",0 "rrupts/InterruptManager/Slot.h> #include namespace avr_halib { namespace interrupts { namespace atmega128rfa1 { struct Timer5 { /** \brief interrupts defined by this device **/ enum Interrupts { capture = 46, /**< input capture **/ matchA = 47, /**< compare match in unit A **/ matchB = 48, /**< compare match in unit B **/ matchC = 49, /**< compare match in unit C **/ overflow = 50 /**< timer overflow **/ }; typedef avr_halib::interrupts::interrupt_manager::Slot CaptureSlot; typedef avr_halib::interrupts::interrupt_manager::Slot MatchASlot; typedef avr_halib::interrupts::interrupt_manager::Slot MatchBSlot; typedef avr_halib::interrupts::interrupt_manager::Slot MatchCSlot; typedef avr_halib::interrupts::interrupt_manager::Slot OverflowSlot; typedef boost::mpl::vector::type Slots; }; } } } ",0 "dent RAD generated file. Program app functionality in ttemplatefunc.h while RAD is still to be used. */ #include ""mysqlrad.h"" //Table Variables //Table Variables //uTemplate: Primary Key static unsigned uTemplate=0; //cLabel: Short label static char cLabel[33]={""""}; //uTemplateSet: Short label static unsigned uTemplateSet=0; static char cuTemplateSetPullDown[256]={""""}; //uTemplateType: Short label static unsigned uTemplateType=0; static char cuTemplateTypePullDown[256]={""""}; //cComment: About the template static char *cComment={""""}; //cTemplate: Template itself static char *cTemplate={""""}; //uOwner: Record owner static unsigned uOwner=0; //uCreatedBy: uClient for last insert static unsigned uCreatedBy=0; #define ISM3FIELDS //uCreatedDate: Unix seconds date last insert static time_t uCreatedDate=0; //uModBy: uClient for last update static unsigned uModBy=0; //uModDate: Unix seconds date last update static time_t uModDate=0; #define VAR_LIST_tTemplate ""tTemplate.uTemplate,tTemplate.cLabel,tTemplate.uTemplateSet,tTemplate.uTemplateType,tTemplate.cComment,tTemplate.cTemplate,tTemplate.uOwner,tTemplate.uCreatedBy,tTemplate.uCreatedDate,tTemplate.uModBy,tTemplate.uModDate"" //Local only void Insert_tTemplate(void); void Update_tTemplate(char *cRowid); void ProcesstTemplateListVars(pentry entries[], int x); //In tTemplatefunc.h file included below void ExtProcesstTemplateVars(pentry entries[], int x); void ExttTemplateCommands(pentry entries[], int x); void ExttTemplateButtons(void); void ExttTemplateNavBar(void); void ExttTemplateGetHook(entry gentries[], int x); void ExttTemplateSelect(void); void ExttTemplateSelectRow(void); void ExttTemplateListSelect(void); void ExttTemplateListFilter(void); void ExttTemplateAuxTable(void); #include ""ttemplatefunc.h"" //Table Variables Assignment Function void ProcesstTemplateVars(pentry entries[], int x) { register int i; for(i=0;i\n""); printf(""""); printf(""""); printf("""",gluRowid); if(guI) { if(guMode==6) //printf("" Found""); printf(LANG_NBR_FOUND); else if(guMode==5) //printf("" Modified""); printf(LANG_NBR_MODIFIED); else if(guMode==4) //printf("" New""); printf(LANG_NBR_NEW); printf(LANG_NBRF_SHOWING,gluRowid,guI); } else { if(!cResult[0]) //printf("" No records found""); printf(LANG_NBR_NORECS); } if(cResult[0]) printf(""%s"",cResult); printf(""""); printf(""""); ExttTemplateButtons(); printf(""""); // OpenFieldSet(""tTemplate Record Data"",100); if(guMode==2000 || guMode==2002) tTemplateInput(1); else tTemplateInput(0); // CloseFieldSet(); //Bottom table printf(""""); ExttTemplateAuxTable(); Footer_ism3(); }//end of tTemplate(); void tTemplateInput(unsigned uMode) { //uTemplate OpenRow(LANG_FL_tTemplate_uTemplate,""black""); printf(""=20 && uMode) { printf("">\n""); } else { printf(""disabled>\n""); printf(""\n"",uTemplate); } //cLabel OpenRow(LANG_FL_tTemplate_cLabel,""black""); printf(""=7 && uMode) { printf("">\n""); } else { printf(""disabled>\n""); printf(""\n"",EncodeDoubleQuotes(cLabel)); } //uTemplateSet OpenRow(LANG_FL_tTemplate_uTemplateSet,""black""); if(guPermLevel>=7 && uMode) tTablePullDown(""tTemplateSet;cuTemplateSetPullDown"",""cLabel"",""cLabel"",uTemplateSet,1); else tTablePullDown(""tTemplateSet;cuTemplateSetPullDown"",""cLabel"",""cLabel"",uTemplateSet,0); //uTemplateType OpenRow(LANG_FL_tTemplate_uTemplateType,""black""); if(guPermLevel>=7 && uMode) tTablePullDown(""tTemplateType;cuTemplateTypePullDown"",""cLabel"",""cLabel"",uTemplateType,1); else tTablePullDown(""tTemplateType;cuTemplateTypePullDown"",""cLabel"",""cLabel"",uTemplateType,0); //cComment OpenRow(LANG_FL_tTemplate_cComment,""black""); printf(""\n"",cComment); } else { printf(""disabled>%s\n"",cComment); printf(""\n"",EncodeDoubleQuotes(cComment)); } //cTemplate OpenRow(LANG_FL_tTemplate_cTemplate,""black""); printf(""\n"",cTemplate); } else { printf(""disabled>%s\n"",cTemplate); printf(""\n"",EncodeDoubleQuotes(cTemplate)); } //uOwner OpenRow(LANG_FL_tTemplate_uOwner,""black""); if(guPermLevel>=20 && uMode) { printf(""%s\n"",ForeignKey(TCLIENT,""cLabel"",uOwner),uOwner); } else { printf(""%s\n"",ForeignKey(TCLIENT,""cLabel"",uOwner),uOwner); } //uCreatedBy OpenRow(LANG_FL_tTemplate_uCreatedBy,""black""); if(guPermLevel>=20 && uMode) { printf(""%s\n"",ForeignKey(TCLIENT,""cLabel"",uCreatedBy),uCreatedBy); } else { printf(""%s\n"",ForeignKey(TCLIENT,""cLabel"",uCreatedBy),uCreatedBy); } //uCreatedDate OpenRow(LANG_FL_tTemplate_uCreatedDate,""black""); if(uCreatedDate) printf(""%s\n\n"",ctime(&uCreatedDate)); else printf(""---\n\n""); printf(""\n"",uCreatedDate); //uModBy OpenRow(LANG_FL_tTemplate_uModBy,""black""); if(guPermLevel>=20 && uMode) { printf(""%s\n"",ForeignKey(TCLIENT,""cLabel"",uModBy),uModBy); } else { printf(""%s\n"",ForeignKey(TCLIENT,""cLabel"",uModBy),uModBy); } //uModDate OpenRow(LANG_FL_tTemplate_uModDate,""black""); if(uModDate) printf(""%s\n\n"",ctime(&uModDate)); else printf(""---\n\n""); printf(""\n"",uModDate); printf(""\n""); }//void tTemplateInput(unsigned uMode) void NewtTemplate(unsigned uMode) { register int i=0; MYSQL_RES *res; sprintf(gcQuery,""SELECT uTemplate FROM tTemplate\ WHERE uTemplate=%u"" ,uTemplate); mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); res=mysql_store_result(&gMysql); i=mysql_num_rows(res); if(i) //tTemplate(""Record already exists""); tTemplate(LANG_NBR_RECEXISTS); //insert query Insert_tTemplate(); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); //sprintf(gcQuery,""New record %u added""); uTemplate=mysql_insert_id(&gMysql); #ifdef ISM3FIELDS uCreatedDate=luGetCreatedDate(""tTemplate"",uTemplate); unxsISPLog(uTemplate,""tTemplate"",""New""); #endif if(!uMode) { sprintf(gcQuery,LANG_NBR_NEWRECADDED,uTemplate); tTemplate(gcQuery); } }//NewtTemplate(unsigned uMode) void DeletetTemplate(void) { #ifdef ISM3FIELDS sprintf(gcQuery,""DELETE FROM tTemplate WHERE uTemplate=%u AND ( uOwner=%u OR %u>9 )"" ,uTemplate,guLoginClient,guPermLevel); #else sprintf(gcQuery,""DELETE FROM tTemplate WHERE uTemplate=%u"" ,uTemplate); #endif mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); //tTemplate(""Record Deleted""); if(mysql_affected_rows(&gMysql)>0) { #ifdef ISM3FIELDS unxsISPLog(uTemplate,""tTemplate"",""Del""); #endif tTemplate(LANG_NBR_RECDELETED); } else { #ifdef ISM3FIELDS unxsISPLog(uTemplate,""tTemplate"",""DelError""); #endif tTemplate(LANG_NBR_RECNOTDELETED); } }//void DeletetTemplate(void) void Insert_tTemplate(void) { //insert query sprintf(gcQuery,""INSERT INTO tTemplate SET uTemplate=%u,cLabel='%s',uTemplateSet=%u,uTemplateType=%u,cComment='%s',cTemplate='%s',uOwner=%u,uCreatedBy=%u,uCreatedDate=UNIX_TIMESTAMP(NOW())"", uTemplate ,TextAreaSave(cLabel) ,uTemplateSet ,uTemplateType ,TextAreaSave(cComment) ,TextAreaSave(cTemplate) ,uOwner ,uCreatedBy ); mysql_query(&gMysql,gcQuery); }//void Insert_tTemplate(void) void Update_tTemplate(char *cRowid) { //update query sprintf(gcQuery,""UPDATE tTemplate SET uTemplate=%u,cLabel='%s',uTemplateSet=%u,uTemplateType=%u,cComment='%s',cTemplate='%s',uModBy=%u,uModDate=UNIX_TIMESTAMP(NOW()) WHERE _rowid=%s"", uTemplate ,TextAreaSave(cLabel) ,uTemplateSet ,uTemplateType ,TextAreaSave(cComment) ,TextAreaSave(cTemplate) ,uModBy ,cRowid); mysql_query(&gMysql,gcQuery); }//void Update_tTemplate(void) void ModtTemplate(void) { register int i=0; MYSQL_RES *res; MYSQL_ROW field; #ifdef ISM3FIELDS unsigned uPreModDate=0; sprintf(gcQuery,""SELECT uTemplate,uModDate FROM tTemplate WHERE uTemplate=%u"" ,uTemplate); #else sprintf(gcQuery,""SELECT uTemplate FROM tTemplate\ WHERE uTemplate=%u"" ,uTemplate); #endif mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); res=mysql_store_result(&gMysql); i=mysql_num_rows(res); //if(i<1) tTemplate(""Record does not exist""); if(i<1) tTemplate(LANG_NBR_RECNOTEXIST); //if(i>1) tTemplate(""Multiple rows!""); if(i>1) tTemplate(LANG_NBR_MULTRECS); field=mysql_fetch_row(res); #ifdef ISM3FIELDS sscanf(field[1],""%u"",&uPreModDate); if(uPreModDate!=uModDate) tTemplate(LANG_NBR_EXTMOD); #endif Update_tTemplate(field[0]); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); //sprintf(query,""record %s modified"",field[0]); sprintf(gcQuery,LANG_NBRF_REC_MODIFIED,field[0]); #ifdef ISM3FIELDS uModDate=luGetModDate(""tTemplate"",uTemplate); unxsISPLog(uTemplate,""tTemplate"",""Mod""); #endif tTemplate(gcQuery); }//ModtTemplate(void) void tTemplateList(void) { MYSQL_RES *res; MYSQL_ROW field; ExttTemplateListSelect(); mysql_query(&gMysql,gcQuery); if(mysql_error(&gMysql)[0]) htmlPlainTextError(mysql_error(&gMysql)); res=mysql_store_result(&gMysql); guI=mysql_num_rows(res); PageMachine(""tTemplateList"",1,"""");//1 is auto header list guMode. Opens table! //Filter select drop down ExttTemplateListFilter(); printf("""",gcCommand); printf(""\n""); printf(""\n""); printf(""""); mysql_data_seek(res,guStart-1); for(guN=0;guN<(guEnd-guStart+1);guN++) { field=mysql_fetch_row(res); if(!field) { printf(""
                  uTemplatecLabeluTemplateSetuTemplateTypecCommentcTemplateuOwneruCreatedByuCreatedDateuModByuModDate
                  End of data
                  ""); Footer_ism3(); } if(guN % 2) printf(""""); else printf(""""); time_t luTime8=strtoul(field[8],NULL,10); char cBuf8[32]; if(luTime8) ctime_r(&luTime8,cBuf8); else sprintf(cBuf8,""---""); time_t luTime10=strtoul(field[10],NULL,10); char cBuf10[32]; if(luTime10) ctime_r(&luTime10,cBuf10); else sprintf(cBuf10,""---""); printf("" %s%s%s%s%s%s%s%s%s"" ,field[0] ,field[0] ,field[1] ,ForeignKey(""tTemplateSet"",""cLabel"",strtoul(field[2],NULL,10)) ,ForeignKey(""tTemplateType"",""cLabel"",strtoul(field[3],NULL,10)) ,field[4] ,field[5] ,ForeignKey(TCLIENT,""cLabel"",strtoul(field[6],NULL,10)) ,ForeignKey(TCLIENT,""cLabel"",strtoul(field[7],NULL,10)) ,cBuf8 ,ForeignKey(TCLIENT,""cLabel"",strtoul(field[9],NULL,10)) ,cBuf10 ); } printf(""\n""); Footer_ism3(); }//tTemplateList() void CreatetTemplate(void) { sprintf(gcQuery,""CREATE TABLE IF NOT EXISTS tTemplate ( uTemplate INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, cLabel VARCHAR(32) NOT NULL DEFAULT '', uOwner INT UNSIGNED NOT NULL DEFAULT 0,index (uOwner), uCreatedBy INT UNSIGNED NOT NULL DEFAULT 0, uCreatedDate INT UNSIGNED NOT NULL DEFAULT 0, uModBy INT UNSIGNED NOT NULL DEFAULT 0, uModDate INT UNSIGNED NOT NULL DEFAULT 0, cComment TEXT NOT NULL DEFAULT '', cTemplate TEXT NOT NULL DEFAULT '', uTemplateSet INT UNSIGNED NOT NULL DEFAULT 0, uTemplateType INT UNSIGNED NOT NULL DEFAULT 0 )""); mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) htmlPlainTextError(mysql_error(&gMysql)); }//CreatetTemplate() ",0 "bute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * AmapJ is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with AmapJ. If not, see . * * */ package fr.amapj.model.engine.transaction; public @interface DbWrite { }",0 "/html; charset=UTF-8"">

                  Code coverage report for wizard/test/wizardSpecs.js

                  Statements: 100% (91 / 91)      Branches: 100% (0 / 0)      Functions: 100% (22 / 22)      Lines: 100% (91 / 91)     

                  All files » wizard/test/ » wizardSpecs.js
                  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 1591 1   1 1   1 1 1   1   6                   6 6 6   6 6     1 1     1 1 1 1     1 1 1 1     1 1 1   1 1       1 1   1 1   1 1     1 1 1   1 1   1 1         1 1   1 4 4 4     1 1 1     1 1     1 1 1 1   1 1     1 1     1 1   1 1   1 1   1   1 1     1 1 1 5     1 1     1 1     1 1 1     1 1 1     1 1 1 1   1 1 1      
                  describe('The Wizard Module', function(){
                  	beforeEach(module('wizard'));
                   
                  	describe('The Wizard Directive', function(){
                  		var elm, scope, headings, panes;
                   
                  		beforeEach(module('template/wizard/wizard.html'));
                  		beforeEach(module('template/wizard/pane.html'));
                  		beforeEach(module('wizard'));
                  		
                  		beforeEach(inject(function($compile, $rootScope){		 
                   
                  			elm = angular.element(
                  				'<wizard>' +
                  					'<pane heading=""Step 1"">' +
                  						'Content 1' +					
                  					'</pane>' +
                  					'<pane heading=""Step 2"">' +
                  						'Content 2' +					
                  					'</pane>' +
                  				'</wizard>');
                   
                  			scope = $rootScope;
                  		    $compile(elm)(scope);
                  		    scope.$digest();
                  		    
                  		    headings = elm.find('ul.steps li a')
                  		    panes = elm.find('div.panes .pane');
                  		}));
                   
                  		it('should be a element with ""wizard"" class', function(){		
                  		    expect(elm).toHaveClass('wizard');
                  		});		
                   
                  		it('should create clickable steps with their heading text in the navigation', function(){						
                  		    expect(headings.length).toBe(2);
                  		    expect(headings.eq(0).text()).toBe('Step 1');
                  		    expect(headings.eq(1).text()).toBe('Step 2');		    
                  		});				
                   
                  		it('should bind the content', function() {			
                  			expect(panes.length).toBe(2);
                  			expect(panes.eq(0).text()).toBe('Content 1');
                  			expect(panes.eq(1).text()).toBe('Content 2');
                  		});
                   
                  		it('shoud activate the first step', function() {
                  			expect(headings.parent().eq(0)).toHaveClass('active');
                  			expect(panes.eq(0)).toHaveClass('active');
                   
                  			expect(headings.parent().eq(1)).not.toHaveClass('active');
                  			expect(panes.eq(1)).not.toHaveClass('active');
                  			
                  		});		
                   
                  		it('should activate the next step', function(){
                  			elm.find('.btn-next').click();
                   
                  			expect(headings.parent().eq(1)).toHaveClass('active');
                  			expect(panes.eq(1)).toHaveClass('active');
                   
                  			expect(headings.parent().eq(0)).toHaveClass('complete');
                  			expect(panes.eq(0)).toHaveClass('complete');
                  		});
                   
                  		it('should activate the prev step', function(){			
                  			elm.find('.btn-next').click();
                  			elm.find('.btn-prev').click();
                   
                  			expect(headings.parent().eq(0)).toHaveClass('active');
                  			expect(panes.eq(0)).toHaveClass('active');
                   
                  			expect(headings.parent().eq(1)).not.toHaveClass('active');
                  			expect(panes.eq(1)).not.toHaveClass('active');
                  		});
                   
                  	});
                   
                  	describe('The Wizard Controller', function(){
                  		var ctrl, wizardScope, firstStep;
                   
                  		beforeEach(inject(function($controller, $rootScope, Step) {		    
                  		    ctrl = $controller('WizardCtrl', {$scope: wizardScope = $rootScope});
                  		    firstStep = new Step();
                  		    ctrl.addStep(firstStep);
                  		 }));
                   
                  		it('shoud add a child step scope to the wizardScope', inject(function($rootScope){						
                  			expect(wizardScope.steps).toBeDefined();
                  			expect(wizardScope.steps.length).toBe(1);
                  		}));
                   
                  		it('should set the first step as active', function(){			
                  			expect(firstStep.status).toBe('active');			
                  		});
                   
                  		it('should advance to next step', inject(function(Step){
                  			var secondStep = new Step();
                  			ctrl.addStep(secondStep);
                  			ctrl.nextStep();
                  			
                  			expect(firstStep.status).toBe('complete');
                  			expect(secondStep.status).toBe('active');
                  		}));
                   
                  		it('should back to previous step', inject(function(Step){
                  			var secondStep = new Step(),
                  				thirdStep = new Step();
                   
                  			ctrl.addStep(secondStep);
                  			ctrl.addStep(thirdStep);
                   
                  			ctrl.nextStep();
                  			ctrl.nextStep();
                  			
                  			expect(secondStep.status).toBe('complete');
                  			expect(thirdStep.status).toBe('active');
                   
                  			ctrl.prevStep();
                  			
                  			expect(secondStep.status).toBe('active');
                  			expect(thirdStep.status).toBeUndefined();
                  		}));
                  	});
                  	describe('The Step Factory', function(){
                  		var step;
                  		beforeEach(inject(function(Step){
                  			step = new Step('Heading One');
                  		}));
                   
                  		it('should have a heading', function(){
                  			expect(step.heading).toBe('Heading One');
                  		});
                   
                  		it('should be initialized with undefined status', function(){
                  			expect(step.status).toBeUndefined();
                  		});
                   
                  		it('should became active', function(){
                  			step.activate();
                  			expect(step.status).toBe('active');
                  		});
                   
                  		it('should became complete', function(){
                  			step.complete();
                  			expect(step.status).toBe('complete');
                  		});
                   
                  		it('should revert his status', function(){
                  			step.activate();
                  			step.reset();
                  			expect(step.status).toBeUndefined();
                   
                  			step.complete();
                  			step.activate();
                  			expect(step.status).toBe('active');
                  		});
                  	});
                  });
                  ",0 "me is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenNetHome is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package nu.nethome.home.items.nexa; import nu.nethome.home.item.HomeItem; import nu.nethome.home.item.HomeItemType; import nu.nethome.home.items.RemapButton; import nu.nethome.home.system.Event; import nu.nethome.util.plugin.Plugin; /** * @author Stefan */ @SuppressWarnings(""UnusedDeclaration"") @Plugin @HomeItemType(value = ""Controls"", creationEvents = ""Nexa_Message"") public class NexaRemapButton extends RemapButton implements HomeItem { private static final String MODEL = ("" \n"" + """" + "" "" + "" "" + "" A B C D E F G H "" + "" "" + "" 1 2 3 4 5 6 7 8 "" + "" "" + "" "" + "" "" + "" 0 100 150 200 300 400 "" + "" "" + "" "" + "" "" + "" "" + "" ""); // Public attributes private int buttonHouseCode = 0; private int buttonNumber = 1; public NexaRemapButton() { } public boolean receiveEvent(Event event) { // Check the event and see if they affect our current state. if (event.getAttribute(Event.EVENT_TYPE_ATTRIBUTE).equals(""Nexa_Message"") && event.getAttribute(""Direction"").equals(""In"") && (event.getAttributeInt(""Nexa.HouseCode"") == buttonHouseCode) && (event.getAttributeInt(""Nexa.Button"") == buttonNumber)) { processEvent(event); return true; } else { return handleInit(event); } } @Override protected boolean initAttributes(Event event) { buttonHouseCode = event.getAttributeInt(""Nexa.HouseCode""); buttonNumber = event.getAttributeInt(""Nexa.Button""); return true; } @Override protected void actOnEvent(Event event) { if (event.getAttribute(""Nexa.Command"").equals(""1"")) { this.on(); } else { this.off(); } } public String getModel() { return MODEL; } /** * @return Returns the deviceCode. */ @SuppressWarnings(""UnusedDeclaration"") public String getButton() { return Integer.toString(buttonNumber); } /** * @param deviceCode The deviceCode to set. */ @SuppressWarnings(""UnusedDeclaration"") public void setButton(String deviceCode) { try { int result = Integer.parseInt(deviceCode); if ((result > 0) && (result <= 8)) { buttonNumber = result; } } catch (NumberFormatException e) { // Ignore } } /** * @return Returns the houseCode. */ @SuppressWarnings(""UnusedDeclaration"") public String getHouseCode() { if ((buttonHouseCode >= 0) && (buttonHouseCode <= 7)) { return Character.toString(""ABCDEFGH"".charAt(buttonHouseCode)); } return ""A""; } /** * @param houseCode The HouseCode to set. */ @SuppressWarnings(""UnusedDeclaration"") public void setHouseCode(String houseCode) { String hc = houseCode.toUpperCase(); if ((hc.length() == 1) && (hc.compareTo(""A"") >= 0) && (hc.compareTo(""H"") <= 0)) { buttonHouseCode = (int) hc.charAt(0) - (int) 'A'; } } } ",0 "s of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * inode functions */ #include ""aufs.h"" struct inode *au_igrab(struct inode *inode) { if (inode) { AuDebugOn(!atomic_read(&inode->i_count)); atomic_inc_return(&inode->i_count); } return inode; } static void au_refresh_hinode_attr(struct inode *inode, int do_version) { au_cpup_attr_all(inode, /*force*/0); au_update_iigen(inode); if (do_version) inode->i_version++; } int au_refresh_hinode_self(struct inode *inode, int do_attr) { int err; aufs_bindex_t bindex, new_bindex; unsigned char update; struct inode *first; struct au_hinode *p, *q, tmp; struct super_block *sb; struct au_iinfo *iinfo; IiMustWriteLock(inode); update = 0; sb = inode->i_sb; iinfo = au_ii(inode); err = au_ii_realloc(iinfo, au_sbend(sb) + 1); if (unlikely(err)) goto out; p = iinfo->ii_hinode + iinfo->ii_bstart; first = p->hi_inode; err = 0; for (bindex = iinfo->ii_bstart; bindex <= iinfo->ii_bend; bindex++, p++) { if (!p->hi_inode) continue; new_bindex = au_br_index(sb, p->hi_id); if (new_bindex == bindex) continue; if (new_bindex < 0) { update++; au_hiput(p); p->hi_inode = NULL; continue; } if (new_bindex < iinfo->ii_bstart) iinfo->ii_bstart = new_bindex; if (iinfo->ii_bend < new_bindex) iinfo->ii_bend = new_bindex; /* swap two lower inode, and loop again */ q = iinfo->ii_hinode + new_bindex; tmp = *q; *q = *p; *p = tmp; if (tmp.hi_inode) { bindex--; p--; } } au_update_brange(inode, /*do_put_zero*/0); if (do_attr) au_refresh_hinode_attr(inode, update && S_ISDIR(inode->i_mode)); out: return err; } int au_refresh_hinode(struct inode *inode, struct dentry *dentry) { int err, update; unsigned int flags; aufs_bindex_t bindex, bend; unsigned char isdir; struct inode *first; struct au_hinode *p; struct au_iinfo *iinfo; err = au_refresh_hinode_self(inode, /*do_attr*/0); if (unlikely(err)) goto out; update = 0; iinfo = au_ii(inode); p = iinfo->ii_hinode + iinfo->ii_bstart; first = p->hi_inode; isdir = S_ISDIR(inode->i_mode); flags = au_hi_flags(inode, isdir); bend = au_dbend(dentry); for (bindex = au_dbstart(dentry); bindex <= bend; bindex++) { struct inode *h_i; struct dentry *h_d; h_d = au_h_dptr(dentry, bindex); if (!h_d || !h_d->d_inode) continue; if (iinfo->ii_bstart <= bindex && bindex <= iinfo->ii_bend) { h_i = au_h_iptr(inode, bindex); if (h_i) { if (h_i == h_d->d_inode) continue; err = -EIO; break; } } if (bindex < iinfo->ii_bstart) iinfo->ii_bstart = bindex; if (iinfo->ii_bend < bindex) iinfo->ii_bend = bindex; au_set_h_iptr(inode, bindex, au_igrab(h_d->d_inode), flags); update = 1; } au_update_brange(inode, /*do_put_zero*/0); if (unlikely(err)) goto out; au_refresh_hinode_attr(inode, update && isdir); out: AuTraceErr(err); return err; } static int set_inode(struct inode *inode, struct dentry *dentry) { int err; unsigned int flags; umode_t mode; aufs_bindex_t bindex, bstart, btail; unsigned char isdir; struct dentry *h_dentry; struct inode *h_inode; struct au_iinfo *iinfo; IiMustWriteLock(inode); err = 0; isdir = 0; bstart = au_dbstart(dentry); h_inode = au_h_dptr(dentry, bstart)->d_inode; mode = h_inode->i_mode; switch (mode & S_IFMT) { case S_IFREG: btail = au_dbtail(dentry); inode->i_op = &aufs_iop; inode->i_fop = &aufs_file_fop; inode->i_mapping->a_ops = &aufs_aop; break; case S_IFDIR: isdir = 1; btail = au_dbtaildir(dentry); inode->i_op = &aufs_dir_iop; inode->i_fop = &aufs_dir_fop; break; case S_IFLNK: btail = au_dbtail(dentry); inode->i_op = &aufs_symlink_iop; break; case S_IFBLK: case S_IFCHR: case S_IFIFO: case S_IFSOCK: btail = au_dbtail(dentry); inode->i_op = &aufs_iop; init_special_inode(inode, mode, h_inode->i_rdev); break; default: AuIOErr(""Unknown file type 0%o\n"", mode); err = -EIO; goto out; } /* do not set inotify for whiteouted dirs (SHWH mode) */ flags = au_hi_flags(inode, isdir); if (au_opt_test(au_mntflags(dentry->d_sb), SHWH) && au_ftest_hi(flags, HINOTIFY) && dentry->d_name.len > AUFS_WH_PFX_LEN && !memcmp(dentry->d_name.name, AUFS_WH_PFX, AUFS_WH_PFX_LEN)) au_fclr_hi(flags, HINOTIFY); iinfo = au_ii(inode); iinfo->ii_bstart = bstart; iinfo->ii_bend = btail; for (bindex = bstart; bindex <= btail; bindex++) { h_dentry = au_h_dptr(dentry, bindex); if (h_dentry) au_set_h_iptr(inode, bindex, au_igrab(h_dentry->d_inode), flags); } au_cpup_attr_all(inode, /*force*/1); out: return err; } /* successful returns with iinfo write_locked */ static int reval_inode(struct inode *inode, struct dentry *dentry, int *matched) { int err; aufs_bindex_t bindex, bend; struct inode *h_inode, *h_dinode; *matched = 0; /* * before this function, if aufs got any iinfo lock, it must be only * one, the parent dir. * it can happen by UDBA and the obsoleted inode number. */ err = -EIO; if (unlikely(inode->i_ino == parent_ino(dentry))) goto out; err = 0; ii_write_lock_new_child(inode); h_dinode = au_h_dptr(dentry, au_dbstart(dentry))->d_inode; bend = au_ibend(inode); for (bindex = au_ibstart(inode); bindex <= bend; bindex++) { h_inode = au_h_iptr(inode, bindex); if (h_inode && h_inode == h_dinode) { *matched = 1; err = 0; if (au_iigen(inode) != au_digen(dentry)) err = au_refresh_hinode(inode, dentry); break; } } if (unlikely(err)) ii_write_unlock(inode); out: return err; } int au_ino(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, unsigned int d_type, ino_t *ino) { int err; struct mutex *mtx; const int isdir = (d_type == DT_DIR); /* prevent hardlinks from race condition */ mtx = NULL; if (!isdir) { mtx = &au_sbr(sb, bindex)->br_xino.xi_nondir_mtx; mutex_lock(mtx); } err = au_xino_read(sb, bindex, h_ino, ino); if (unlikely(err)) goto out; if (!*ino) { err = -EIO; *ino = au_xino_new_ino(sb); if (unlikely(!*ino)) goto out; err = au_xino_write(sb, bindex, h_ino, *ino); if (unlikely(err)) goto out; } out: if (!isdir) mutex_unlock(mtx); return err; } /* successful returns with iinfo write_locked */ /* todo: return with unlocked? */ struct inode *au_new_inode(struct dentry *dentry, int must_new) { struct inode *inode; struct dentry *h_dentry; struct super_block *sb; ino_t h_ino, ino; int err, match; aufs_bindex_t bstart; sb = dentry->d_sb; bstart = au_dbstart(dentry); h_dentry = au_h_dptr(dentry, bstart); h_ino = h_dentry->d_inode->i_ino; err = au_xino_read(sb, bstart, h_ino, &ino); inode = ERR_PTR(err); if (unlikely(err)) goto out; new_ino: if (!ino) { ino = au_xino_new_ino(sb); if (unlikely(!ino)) { inode = ERR_PTR(-EIO); goto out; } } AuDbg(""i%lu\n"", (unsigned long)ino); inode = au_iget_locked(sb, ino); err = PTR_ERR(inode); if (IS_ERR(inode)) goto out; AuDbg(""%lx, new %d\n"", inode->i_state, !!(inode->i_state & I_NEW)); if (inode->i_state & I_NEW) { ii_write_lock_new_child(inode); err = set_inode(inode, dentry); unlock_new_inode(inode); if (!err) goto out; /* success */ iget_failed(inode); ii_write_unlock(inode); goto out_iput; } else if (!must_new) { err = reval_inode(inode, dentry, &match); if (!err) goto out; /* success */ else if (match) goto out_iput; } if (unlikely(au_test_fs_unique_ino(h_dentry->d_inode))) AuWarn1(""Warning: Un-notified UDBA or repeatedly renamed dir,"" "" b%d, %s, %.*s, hi%lu, i%lu.\n"", bstart, au_sbtype(h_dentry->d_sb), AuDLNPair(dentry), (unsigned long)h_ino, (unsigned long)ino); ino = 0; err = au_xino_write(sb, bstart, h_ino, /*ino*/0); if (!err) { iput(inode); goto new_ino; } out_iput: iput(inode); inode = ERR_PTR(err); out: return inode; } /* ---------------------------------------------------------------------- */ int au_test_ro(struct super_block *sb, aufs_bindex_t bindex, struct inode *inode) { int err; err = au_br_rdonly(au_sbr(sb, bindex)); /* pseudo-link after flushed may happen out of bounds */ if (!err && inode && au_ibstart(inode) <= bindex && bindex <= au_ibend(inode)) { /* * permission check is unnecessary since vfsub routine * will be called later */ struct inode *hi = au_h_iptr(inode, bindex); if (hi) err = IS_IMMUTABLE(hi) ? -EROFS : 0; } return err; } int au_test_h_perm(struct inode *h_inode, int mask) { if (!current_fsuid()) return 0; return inode_permission(h_inode, mask); } int au_test_h_perm_sio(struct inode *h_inode, int mask) { if (au_test_nfs(h_inode->i_sb) && (mask & MAY_WRITE) && S_ISDIR(h_inode->i_mode)) mask |= MAY_READ; /* force permission check */ return au_test_h_perm(h_inode, mask); } ",0 "Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ); } protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo ""
                  ""; // line 2 if (($this->getContext($context, ""count"") > 0)) { // line 3 echo ""

                  [""; // line 4 echo twig_escape_filter($this->env, (($this->getContext($context, ""count"") - $this->getContext($context, ""position"")) + 1), ""html"", null, true); echo ""/""; echo twig_escape_filter($this->env, ($this->getContext($context, ""count"") + 1), ""html"", null, true); echo ""] ""; // line 5 echo $this->env->getExtension('code')->abbrClass($this->getAttribute($this->getContext($context, ""exception""), ""class"")); echo "": ""; echo $this->env->getExtension('code')->formatFileFromText(nl2br(twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, ""exception""), ""message""), ""html"", null, true))); echo ""  ""; // line 6 ob_start(); // line 7 echo "" env, $this->getContext($context, ""position""), ""html"", null, true); echo ""', 'traces'); switchIcons('icon-traces-""; echo twig_escape_filter($this->env, $this->getContext($context, ""position""), ""html"", null, true); echo ""-open', 'icon-traces-""; echo twig_escape_filter($this->env, $this->getContext($context, ""position""), ""html"", null, true); echo ""-close'); return false;\""> env, $this->getContext($context, ""position""), ""html"", null, true); echo ""-close\"" alt=\""-\"" src=\""data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=\"" style=\""display: ""; echo (((0 == $this->getContext($context, ""count""))) ? (""inline"") : (""none"")); echo ""\"" /> env, $this->getContext($context, ""position""), ""html"", null, true); echo ""-open\"" alt=\""+\"" src=\""data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7\"" style=\""display: ""; echo (((0 == $this->getContext($context, ""count""))) ? (""none"") : (""inline"")); echo ""\"" /> ""; echo trim(preg_replace('/>\s+<', ob_get_clean())); // line 12 echo ""

                  ""; } else { // line 14 echo ""

                  Stack Trace

                  ""; } // line 16 echo "" env, $this->getContext($context, ""position""), ""html"", null, true); echo ""\"">
                    env, $this->getContext($context, ""position""), ""html"", null, true); echo ""\"" style=\""display: ""; echo (((0 == $this->getContext($context, ""count""))) ? (""block"") : (""none"")); echo ""\""> ""; // line 19 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, ""exception""), ""trace"")); foreach ($context['_seq'] as $context[""i""] => $context[""trace""]) { // line 20 echo ""
                  1. ""; // line 21 $this->env->loadTemplate(""TwigBundle:Exception:trace.html.twig"")->display(array(""prefix"" => $this->getContext($context, ""position""), ""i"" => $this->getContext($context, ""i""), ""trace"" => $this->getContext($context, ""trace""))); // line 22 echo ""
                  2. ""; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['i'], $context['trace'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 24 echo ""
                  ""; } public function getTemplateName() { return ""TwigBundle:Exception:traces.html.twig""; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 94 => 22, 92 => 21, 89 => 20, 85 => 19, 79 => 18, 75 => 17, 72 => 16, 68 => 14, 64 => 12, 56 => 9, 50 => 8, 41 => 7, 27 => 4, 24 => 3, 22 => 2, 201 => 92, 199 => 91, 196 => 90, 187 => 84, 183 => 82, 173 => 74, 171 => 73, 168 => 72, 166 => 71, 163 => 70, 158 => 67, 156 => 66, 151 => 63, 142 => 59, 138 => 57, 136 => 56, 133 => 55, 123 => 47, 121 => 46, 117 => 44, 115 => 43, 112 => 42, 105 => 40, 101 => 24, 91 => 31, 86 => 28, 69 => 25, 66 => 24, 62 => 23, 51 => 20, 49 => 19, 39 => 6, 32 => 12, 19 => 1, 57 => 12, 54 => 21, 43 => 8, 40 => 7, 33 => 5, 30 => 3,); } } ",0 "ce 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. */ package ua.org.gdg.devfest.iosched.receiver; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import ua.org.gdg.devfest.iosched.service.SessionAlarmService; import static ua.org.gdg.devfest.iosched.util.LogUtils.makeLogTag; /** * {@link BroadcastReceiver} to reinitialize {@link android.app.AlarmManager} for all starred * session blocks. */ public class SessionAlarmReceiver extends BroadcastReceiver { public static final String TAG = makeLogTag(SessionAlarmReceiver.class); @Override public void onReceive(Context context, Intent intent) { Intent scheduleIntent = new Intent( SessionAlarmService.ACTION_SCHEDULE_ALL_STARRED_BLOCKS, null, context, SessionAlarmService.class); context.startService(scheduleIntent); } } ",0 " 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. */ package org.wso2.developerstudio.eclipse.gmf.esb.provider; import java.util.Collection; import java.util.List; import org.apache.commons.lang.WordUtils; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; import org.wso2.developerstudio.eclipse.gmf.esb.EndPointProperty; import org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage; import org.wso2.developerstudio.eclipse.gmf.esb.PropertyValueType; import org.wso2.developerstudio.eclipse.gmf.esb.presentation.EEFPropertyViewUtil; /** * This is the item provider adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.EndPointProperty} object. * * * @generated */ public class EndPointPropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { /** * This constructs an instance from a factory and a notifier. * * * @generated */ public EndPointPropertyItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** * This returns the property descriptors for the adapted class. * * * @generated */ @Override public List getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addNamePropertyDescriptor(object); addValuePropertyDescriptor(object); addScopePropertyDescriptor(object); addValueTypePropertyDescriptor(object); } return itemPropertyDescriptors; } /** * This adds a property descriptor for the Name feature. * * * @generated */ protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(""_UI_EndPointProperty_name_feature""), getString(""_UI_PropertyDescriptor_description"", ""_UI_EndPointProperty_name_feature"", ""_UI_EndPointProperty_type""), EsbPackage.Literals.END_POINT_PROPERTY__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** * This adds a property descriptor for the Value feature. * * * @generated */ protected void addValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(""_UI_EndPointProperty_value_feature""), getString(""_UI_PropertyDescriptor_description"", ""_UI_EndPointProperty_value_feature"", ""_UI_EndPointProperty_type""), EsbPackage.Literals.END_POINT_PROPERTY__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** * This adds a property descriptor for the Scope feature. * * * @generated */ protected void addScopePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(""_UI_EndPointProperty_scope_feature""), getString(""_UI_PropertyDescriptor_description"", ""_UI_EndPointProperty_scope_feature"", ""_UI_EndPointProperty_type""), EsbPackage.Literals.END_POINT_PROPERTY__SCOPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** * This adds a property descriptor for the Value Type feature. * * * @generated */ protected void addValueTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(""_UI_EndPointProperty_valueType_feature""), getString(""_UI_PropertyDescriptor_description"", ""_UI_EndPointProperty_valueType_feature"", ""_UI_EndPointProperty_type""), EsbPackage.Literals.END_POINT_PROPERTY__VALUE_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * * * @generated */ @Override public Collection getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(EsbPackage.Literals.END_POINT_PROPERTY__VALUE_EXPRESSION); } return childrenFeatures; } /** * * * @generated */ @Override protected EStructuralFeature getChildFeature(Object object, Object child) { // Check the type of the specified child object and return the proper feature to use for // adding (see {@link AddCommand}) it as a child. return super.getChildFeature(object, child); } /** * This returns EndPointProperty.gif. * * * @generated */ @Override public Object getImage(Object object) { return overlayImage(object, getResourceLocator().getImage(""full/obj16/EndPointProperty"")); } /** * This returns the label text for the adapted class. * * * @generated NOT */ @Override public String getText(Object object) { String propertyName = ((EndPointProperty) object).getName(); String propertyNameLabel = WordUtils.abbreviate(propertyName, 40, 45, "" ...""); String propertyValueType = ((EndPointProperty) object).getValueType().toString(); String propertyValue = ((EndPointProperty) object).getValue(); String valueExpression = ((EndPointProperty) object).getValueExpression().toString(); if (propertyValueType.equalsIgnoreCase(PropertyValueType.LITERAL.getName())) { if (((EndPointProperty) object).getValue() != null) { return propertyName == null || propertyName.length() == 0 ? getString(""_UI_EndPointProperty_type"") : getString(""_UI_EndPointProperty_type"") + "" - "" + EEFPropertyViewUtil.spaceFormat(propertyNameLabel) + EEFPropertyViewUtil.spaceFormat(propertyValue); } else { return propertyName == null || propertyName.length() == 0 ? getString(""_UI_EndPointProperty_type"") : getString(""_UI_EndPointProperty_type"") + "" - "" + EEFPropertyViewUtil.spaceFormat(propertyNameLabel); } } else { return propertyName == null || propertyName.length() == 0 ? getString(""_UI_EndPointProperty_type"") : getString(""_UI_EndPointProperty_type"") + "" - "" + EEFPropertyViewUtil.spaceFormat(propertyNameLabel) + EEFPropertyViewUtil.spaceFormat(valueExpression); } } /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * * * @generated */ @Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(EndPointProperty.class)) { case EsbPackage.END_POINT_PROPERTY__NAME: case EsbPackage.END_POINT_PROPERTY__VALUE: case EsbPackage.END_POINT_PROPERTY__SCOPE: case EsbPackage.END_POINT_PROPERTY__VALUE_TYPE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case EsbPackage.END_POINT_PROPERTY__VALUE_EXPRESSION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification); } /** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * * * @generated */ @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EsbPackage.Literals.END_POINT_PROPERTY__VALUE_EXPRESSION, EsbFactory.eINSTANCE.createNamespacedProperty())); } /** * Return the resource locator for this item provider's resources. * * * @generated */ @Override public ResourceLocator getResourceLocator() { return EsbEditPlugin.INSTANCE; } } ",0 "ub.com/dmsovetov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ #ifndef __DC_Scene_Rendering_DebugRenderPasses_H__ #define __DC_Scene_Rendering_DebugRenderPasses_H__ #include ""../RenderSystem/StreamedRenderPass.h"" #include ""../Debug/CascadedShadowMaps.h"" DC_BEGIN_DREEMCHEST namespace Scene { //! Renders bounding boxes for all static meshes that reside in scene. class DebugStaticMeshPass : public StreamedRenderPass { public: //! Constructs a DebugStaticMeshPass instance. DebugStaticMeshPass( RenderingContext& context, RenderScene& renderScene ); protected: //! Emits render operations to render a single bounding box. virtual void emitRenderOperations( RenderFrame& frame, RenderCommandBuffer& commands, StateStack& stateStack, const Ecs::Entity& entity, const StaticMesh& staticMesh, const Transform& transform ) NIMBLE_OVERRIDE; }; //! Renders fixtures for all lights that reside in scene. class DebugLightPass : public StreamedRenderPass { public: //! Constructs a DebugLightPass instance. DebugLightPass( RenderingContext& context, RenderScene& renderScene ); protected: //! Emits render operations to render a single bounding box. virtual void emitRenderOperations( RenderFrame& frame, RenderCommandBuffer& commands, StateStack& stateStack, const Ecs::Entity& entity, const Light& light, const Transform& transform ) NIMBLE_OVERRIDE; }; //! Renders frustums for all cameras that reside in scene. class DebugCameraPass : public StreamedRenderPass { public: //! Constructs a DebugCameraPass instance. DebugCameraPass( RenderingContext& context, RenderScene& renderScene ); protected: //! Emits render operations to render a single frustum. virtual void emitRenderOperations( RenderFrame& frame, RenderCommandBuffer& commands, StateStack& stateStack, const Ecs::Entity& entity, const Camera& camera, const Transform& transform ) NIMBLE_OVERRIDE; }; //! A debug render pass that renders intermediate render targets. class DebugRenderTarget : public StreamedRenderPassBase { public: //! Constructs a DebugRenderTarget instance. DebugRenderTarget( RenderingContext& context, RenderScene& renderScene ); //! Emits render operations to render a target as a 2D rectangle. void render( RenderFrame& frame, RenderCommandBuffer& commands, StateStack& stateStack, const Viewport& viewport, TransientTexture texture, s32 size, s32 x, s32 y ); private: ConstantBuffer_ m_cbuffer; //!< A view constant buffer instance. Program m_shader; //!< A shader to be used for rendering. }; //! A debug render pass that renders a debug info for cascaded shadow mapping class DebugCascadedShadows : public StreamedRenderPass { public: //! Constructs a DebugCascadedShadows instance. DebugCascadedShadows( RenderingContext& context, RenderScene& renderScene ); //! Emits render operations to show a cascaded shadows debug info. void render( RenderFrame& frame, RenderCommandBuffer& commands, StateStack& stateStack, const CascadedShadowMaps& csm, const Rgba colors[] = NULL ); protected: //! Emits render operations to render a single bounding box. virtual void emitRenderOperations( RenderFrame& frame, RenderCommandBuffer& commands, StateStack& stateStack, const Ecs::Entity& entity, const Camera& camera, const Transform& transform ) NIMBLE_OVERRIDE; private: const Rgba* m_colors; //!< Split colors. CascadedShadowMaps m_csm; //!< A CSM instance being visualized. Program m_shader; //!< A shader to be used for rendering. }; } // namespace Scene DC_END_DREEMCHEST #endif /* !__DC_Scene_Rendering_DebugRenderPasses_H__ */ ",0 "cense (GPL) * @version $Id$ */ class LinkModel extends RoxModelBase { function __construct() { parent::__construct(); } /** * Functions needed to create the link network and store it to the db **/ function createPath ($branch,$directlinks) { $first = $branch[0]; $lastkey = count($branch)-1; $last = $branch[$lastkey]; $degree=count($branch)-1; $path = array($first,$last,$degree); foreach ($branch as $key => $value) { if ($key >= 1) { array_push($path,(array($value,$directlinks[$branch[$key-1]][$value]['totype'],$directlinks[$branch[$key-1]][$value]['reversetype']))); } } return($path); } // createPath function createLinkList() { $preferences = $this->getLinkPreferences(); echo ""createLinkList getpreference "".count($preferences)."" values created
                  "" ; $comments = $this->getComments(); echo ""createLinkList comments "".count($comments)."" values created
                  "" ; $specialrelation = $this->getSpecialRelation(); echo ""createLinkList specialrelation "".count($specialrelation)."" values created
                  "" ; foreach ($comments as $comment) { if (isset($preferences[$comment->IdFromMember])) { if ($preferences[$comment->IdFromMember] == 'no') { continue; } } if (isset($preferences[$comment->IdToMember])) { if ($preferences[$comment->IdToMember] == 'no') { continue; } } $directlinks[$comment->IdFromMember][$comment->IdToMember]['totype'][] = $comment->Quality; $directlinks[$comment->IdFromMember][$comment->IdToMember]['reversetype'][] = 0; } foreach ($specialrelation as $value) { if (isset($preferences[$value->IdOwner])) { if ($preferences[$value->IdOwner] == 'no') { continue; } } if (isset($preferences[$value->IdRelation])) { if ($preferences[$value->IdRelation] == 'no') { continue; } } $directlinks[$value->IdOwner][$value->IdRelation]['totype'][] = $value->Type; $directlinks[$value->IdOwner][$value->IdRelation]['reversetype'][] = 0; } echo ""createLinkList Starting to process "".count($directlinks)."" values for reversetype
                  "" ; foreach ($directlinks as $key1 => $value1) { foreach ($value1 as $key2 => $value2) { if (isset($directlinks[$key2][$key1])) { $directlinks[$key2][$key1]['reversetype'] = $directlinks[$key1][$key2]['totype']; } } } echo ""createLinkList done "".count($directlinks)."" values created
                  "" ; return $directlinks; } // end of createLinkList function getTree($directlinks,$startids) { $count = 0; $maxdepth= 3; $branch = array(); $oldid = 0; foreach ($startids as $key) { echo ""
                  ### "". $key ."" ####
                  ""; $matrix = array(); $matrix[0] = array($key); $nolist = array($key); $new = 1; $count=0; echo""
                  matrix:""; //var_dump($matrix); $newlist = $nolist; while($new == 1 && $count < $maxdepth) { echo ""
                  --- newstep "".$count.""
                  ""; $new = 0; $count++; foreach ($matrix as $key => $value) { $last = $value[count($value)-1]; if (array_key_exists($last,$directlinks)) { $added = array(); foreach($directlinks[$last] as $key1 => $value1) { if (!in_array($key1,$nolist)) { $temparray = $value; array_push($temparray,$key1); $matrix[] = $temparray; array_push($added,$key1); } } } if(count($added)>0) { $newlist = array_merge($newlist,$added); $new = 1; } } $nolist = $newlist; echo ""
                  nolist:""; //var_dump($nolist); } echo ""
                  "".count($matrix). "" values to write in link list
                  ""; foreach ($matrix as $key => $value) { var_dump($value); $path = $this->createPath($value,$directlinks); $lastid = count($value)-1; $degree = count($value)-1; $serpath = ""'"".serialize($path).""'""; $fields = array('fromID' => ""$value[0]"", 'toID' => ""$value[$lastid]"", 'degree' => ""$degree"", 'rank' => 'rank', 'path' => ""$serpath"" ); $this->writeLinkList($fields); } echo ""
                  "".count($matrix). "" values written in link list
                  ""; } } /** / rebuild the link database **/ function rebuildLinks() { $this->deleteLinkList(); $directlinks = $this->createLinkList(); foreach ($directlinks as $key => $value) { $startids[] = $key; } $this->getTree($directlinks,$startids); } function rebuildMissingLinks() { $directlinks = $this->createLinkList(); $existing_ids = $this->bulkLookup( "" SELECT fromID FROM linklist GROUP BY fromID ""); $e_ids = array(); foreach ($existing_ids as $v) { $e_ids[] = $v->fromID; } //var_dump($e_ids); $startids = array(); foreach ($directlinks as $key => $value) { if(!in_array($key,$e_ids)) { $startids[] = $key; } } $startids = array_slice($startids,0,100); echo""
                  processing members:"".implode(',',$startids).""
                  ""; $this->getTree($directlinks,$startids); } /** / update the link database to integrate links changed since last called **/ function updateLinks() { $changed_ids = $this->getChanges(); $directlinks= $this->createLinkList(); if ($changed_ids != '') { var_dump($changed_ids); foreach ($changed_ids as $id) { $this->removeLink($id); } $this->getTree($directlinks,$changed_ids); } } /** * write / flush database **/ function writeLinkList($fields) { return $this->dao->query( "" INSERT INTO linklist SET id = 'NULL', fromID = "".$fields['fromID']."", toID = "".$fields['toID']."", degree = "".$fields['degree']."", rank = "".$fields['rank']."", path = "".$fields['path']."" "" ); } function deleteLinkList() { return $this->dao->query( ""TRUNCATE TABLE `linklist`"" ); } function removeLink($id) { return $this->dao->query( "" DELETE FROM linklist WHERE fromID = "".$id ); } /** * functions collecting connection data from other parts of the system * - comments * - special relations **/ /** * retrieve link information from the comment system **/ function getChanges() { $lastupdate = $this->singleLookup( ""SELECT UNIX_TIMESTAMP(`updated`) as updated FROM `linklist` ORDER BY `updated` DESC LIMIT 1"" ); var_dump($lastupdate); $comments= $this->bulkLookup( "" SELECT `IdFromMember` FROM `comments` WHERE UNIX_TIMESTAMP(`updated`) >= "".$lastupdate->updated.""-120"" ); $relations=$this->bulkLookup( "" SELECT `IdOwner` FROM `specialrelations` WHERE UNIX_TIMESTAMP(`updated`) >= "".$lastupdate->updated.""-120"" ); $ids=array(); foreach($comments as $comment) { $ids[] = $comment->IdFromMember; } foreach($relations as $relation) { $ids[] = $relation->IdOwner; } $changed_ids = array_unique($ids); foreach ($changed_ids as $id) { $links = $this->bulkLookup( "" SELECT `fromID`,path FROM `linklist` WHERE `path` LIKE '%{i:0;i:"".$id."";%' AND (`toID` != "".$id."" AND fromID != "".$id."") ""); if ($links) { foreach($links as $link) { $ids[] = $link->fromID; } } } return(array_unique($ids)); } function getComments() { return $this->bulkLookup( "" SELECT `comments`.`IdFromMember` AS `IdFromMember`,`comments`.`IdToMember` AS `IdToMember`,`comments`.`Quality` AS `Quality` , `members`.`id`, `members`.`status` FROM `comments`, `members` WHERE `IdToMember` = `members`.`id` AND (`members`.`Status` in ('Active','ChoiceInactive','OutOfRemind','ActiveHidden')) AND NOT FIND_IN_SET('NeverMetInRealLife',`comments`.`Lenght`) AND (FIND_IN_SET('hewasmyguest',`comments`.`Lenght`) or FIND_IN_SET('hehostedme',`comments`.`Lenght`) or FIND_IN_SET('OnlyOnce',`comments`.`Lenght`) or FIND_IN_SET('HeIsMyFamily',`comments`.`Lenght`) or FIND_IN_SET('HeHisMyOldCloseFriend',`comments`.`Lenght`) ) ORDER BY `IdFromMember`,`IdToMember` Asc "" ); } /** * retrieve link information from the special relation system **/ function getSpecialRelation() { return $this->bulkLookup( "" SELECT `IdOwner`,`IdRelation`,`Type`, `members`.`id`, `members`.`status` FROM `specialrelations` , `members` WHERE `IdRelation` = `members`.`id` AND (`members`.`Status` in ('Active','ChoiceInactive','OutOfRemind') ) ORDER BY `IdOwner`,`IdRelation` Asc "" ); } /** * functions to retrieve link infromation from the db **/ function dbFriendsID($fromid,$degree = 1,$limit = 10) { $ss=""SELECT `toID` FROM `linklist` WHERE linklist.fromID = $fromid AND linklist.degree = $degree LIMIT "".(int)$limit ; // echo $ss,""
                  "" ; return $this->bulkLookup($ss); } function dbFriends($fromid,$degree = 1,$limit = 10) { return $this->bulkLookup( "" SELECT * FROM `linklist` WHERE linklist.fromID = $fromid AND linklist.degree = $degree LIMIT "".(int)$limit ); } function dbLinks($fromid,$toid,$limit=5) { return $this->bulkLookup( "" SELECT * FROM `linklist` WHERE linklist.fromID = $fromid AND linklist.toID = $toid LIMIT "".(int)$limit ); } /** * retrieve useful information about members from the db **/ function getMemberdata($ids) { $memberdata=array() ; if (count($ids)<=0) { return $memberdata ; // Returns nothing if no Id where given } //var_dump($ids); // $idquery = implode(' OR `members`.`id` = ',$ids); $idquery = implode(',',$ids); // echo ""\$idquery="".$idquery.""
                  "" ; //var_dump($idquery); $rPref=$this->singleLookup(""select `id`,`DefaultValue` from `preferences` where `preferences`.`codeName` = 'PreferenceLinkPrivacy'"") ; if (!isset($rPref->id)) { die (""You need to create the preference : 'PreferenceLinkPrivacy'"") ; } $result = $this->bulkLookup( "" SELECT SQL_CACHE members.Username, 'NbComment',memberspreferences.Value as PreferenceLinkPrivacy,'NbTrust','Verified',members.id, members.id as IdMember, g1.Name AS City, g2.Name AS Country,`members`.`Status` FROM members JOIN addresses ON addresses.IdMember = members.id AND addresses.rank = 0 LEFT JOIN geonames_cache AS g1 ON addresses.IdCity = g1.geonameid LEFT JOIN geonames_cache AS g2 ON g1.parentCountryId = g2.geonameid LEFT JOIN memberspreferences ON `memberspreferences`.`IdPreference`="".$rPref->id."" and `memberspreferences`.`IdMember`=`members`.`id` WHERE `members`.`id` in ($idquery) and (`members`.`Status` in ('Active','ChoiceInactive','OutOfRemind')) "" ); foreach ($result as $value) { if (empty($value->PreferenceLinkPrivacy)) { $value->PreferenceLinkPrivacy=$rPref->DefaultValue ; } if ($value->PreferenceLinkPrivacy=='no') continue ; // Skip member who have chosen PreferenceLinkPrivacy=='no' // Retrieve the verification level of this member $ss=""select max(Type) as TypeVerif from verifiedmembers where IdVerified="".$value->IdMember ; // echo $ss ; $rowVerified=$this->singleLookup($ss) ; if (isset($rowVerified->TypeVerif)) { $value->Verified=$rowVerified->TypeVerif ; } else { $value->Verified="""" ; // This is a not verified member so empty string } $ss=""select count(*) as Cnt from comments where IdToMember="".$value->IdMember ; $rr=$this->singleLookup($ss); $value->NbComment=$rr->Cnt ; $ss=""select count(*) as Cnt from comments where IdToMember="".$value->IdMember."" and Quality='Good'""; $rr=$this->singleLookup($ss); $value->NbTrust=$rr->Cnt ; $memberdata[$value->id] = $value; } return $memberdata; } // end of getMemberdata /** * retrieve the Preference setting for the link network (Yes, no, hidden) **/ function getLinkPreferences() { $result = $this->bulkLookup( "" SELECT `IdMember`,`Value`,`preferences`.`DefaultValue` FROM `preferences`,`memberspreferences` WHERE `preferences`.`id` = `memberspreferences`.`IdPreference` AND `preferences`.`codeName` = 'PreferenceLinkPrivacy' "" ); foreach ($result as $value) { $prefarray[$value->IdMember] = $value->Value; } return $prefarray; } // end of getLinkPreferences /* * * helper functions to prepare output **/ function getMemberID($username) { if (is_numeric($username)) return $username ; $result = $this->singleLookup( "" SELECT `id` FROM `members` WHERE `Username` = '$username' "" ); if (isset($result->id)) { return($result->id) ; } else { return (-1) ; } } function getIdsFromPath($path) { $inpath = array($path[0]); for ($i=3; $i<3+$path[2]; $i++) { array_push($inpath, $path[$i][0]); } return $inpath; } /** * often used functions to get data from the link system * **/ /** * returns an array of IDs * get $limit number of friends of the distance of $degree for $from member (id or username) * without additional $degree / $limit parameters it returnsthe ID for 10 direct friends **/ function getFriends($from,$degree = 1,$limit = 10) { if (!ctype_digit($from)) { $from = $this->getMemberID($from); } $result = $this->dbFriendsID($from,$degree,$limit); $friendIDs=array() ; // To initialize because if nothing is found we will have a void variable foreach ($result as $value) { $friendIDs[] = $value->toID; } $friendIDs = array_unique($friendIDs); return $friendIDs; } /** * returns an array (member ID as key) with useful memberdata for all IDs * get $limit number of friends of the distance of $degree for $from member (id or username) * without additional $degree / $limit parameters it returnsthe ID for 10 direct friends **/ function getFriendsFull($from,$degree = 1,$limit = 10) { $friendsData=array() ; if (!ctype_digit($from)) { $from = $this->getMemberID($from); } $result = $this->dbFriendsID($from,$degree,$limit); $friendIDs=array() ; // To initialize because if nothing is found we will have a void variable foreach ($result as $value) { $friendIDs[] = $value->toID; } $memberData = $this->getMemberdata($friendIDs); foreach ($memberData as $value) { $friendsData[$value->id]= $value; } //var_dump($friendsData); return $friendsData; } function getDegree($from,$to) { } function getLinks($from,$to,$limit = 10) { if (!ctype_digit($from)) { $from = $this->getMemberID($from); } if (!ctype_digit($to)) { $to = $this->getMemberID($to); } $result = $this->dbLinks($from,$to,$limit); if (empty($result)) { return false; } else { foreach ($result as $key => $value) { $path[$key] = unserialize($value->path); $ids[$key] = $this->getIdsFromPath($path[$key]); } //var_dump($ids); return($ids); } } function getLinksFull($from,$to,$limit = 10) { if (!ctype_digit($from)) { $from = $this->getMemberID($from); } if (!ctype_digit($to)) { $to = $this->getMemberID($to); } $result = $this->dbLinks($from,$to,$limit); //var_dump($result); foreach ($result as $key => $value) { $path[$key] = unserialize($value->path); $ids[$key] = $this->getIdsFromPath($path[$key]); } if (isset($ids)) { $idlist = array(); foreach ($ids as $value) { foreach ($value as $id) { array_push($idlist,$id); } } $idlist = array_unique($idlist); $memberData = $this->getMemberdata($idlist); foreach ($ids as $key1 => $value1) { foreach ($value1 as $key2 => $value2) { $linkdata[$key1][$key2]['memberdata'] = $memberData[$value2]; if($key2 != 0) { $linkdata[$key1][$key2]['totype'] = $path[$key1][$key2+2][1]; $linkdata[$key1][$key2]['reversetype'] = $path[$key1][$key2+2][2]; } } } } else { $linkdata = false; } //echo ""
                  ""; //var_dump($linkdata); //echo ""
                  ""; return $linkdata; } // end of getLinksFull } ?> ",0 " href=""http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css"">

                  API Docs for:
                  Show:

                  File: ../plugins/plugins_2d/bar/bar.vlib.js

                  define(['require','config'],function(require,Config) {
                  
                  	var plugin = (function() {
                  		/** ********************************** */
                  		/** PUBLIC VARIABLES * */
                  		/** ********************************** */
                  		this.context = Config.PLUGINTYPE.CONTEXT_2D;
                  		this.type = Config.PLUGINTYPE.LINETYPE;
                  		this.name = 'bar';
                  
                  		/** path to plugin-template file * */
                  		this.accepts = {
                  			predecessors : [ Config.PLUGINTYPE.DATA ],
                  			successors : [  ]
                  		}
                  		this.icon = Config.absPlugins + '/plugins_2d/bar/icon.png';
                  		this.description = 'Requires: [ '+this.accepts.predecessors.join(', ')+' ] Accepts: [ '+this.accepts.successors.join(', ')+' ]';
                  		/** ********************************** */
                  		/** PUBLIC METHODS * */
                  		/** ********************************** */
                  		/**
                  
                  		/***/
                  
                  		 this.exec = function(config) {
                  		 	console.log("[ bar ] \t\t EXEC");
                  		 	if(config == '' || config === undefined){
                  		 		config = {area:false,bar:true};
                  		 	}
                  		 	return {
                  		 		pType : this.type,
                  				response : {
                  					type : config
                  				}
                  		 	};
                  		 }
                  
                  
                  	});
                  
                  return plugin;
                  
                  });
                  
                      
                  ",0 "pliance 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. */ package com.cloudcontrolled.api.model; /** * The version object contains informations about the latest available software * to access the cloudCOntrol API. * * @author Denis Neuling (denisneuling@gmail.com) * */ public class Version extends AbstractModel { private String pycclib; private String cctrl; /** *

                  * Constructor for Version. *

                  */ public Version() { } /** *

                  * Getter for the field pycclib. *

                  * * @return pycclib the latest pycclib release version */ public String getPycclib() { return pycclib; } /** *

                  * Setter for the field pycclib. *

                  * * @param pycclib * the latest pycclib release version */ public void setPycclib(String pycclib) { this.pycclib = pycclib; } /** *

                  * Getter for the field cctrl. *

                  * * @return cctrl the latest cctrl release version */ public String getCctrl() { return cctrl; } /** *

                  * Setter for the field cctrl. *

                  * * @param cctrl * the latest cctrl release version to set */ public void setCctrl(String cctrl) { this.cctrl = cctrl; } /** {@inheritDoc} */ @Override public String toString() { return ""Version [pycclib="" + pycclib + "", cctrl="" + cctrl + ""]""; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((cctrl == null) ? 0 : cctrl.hashCode()); result = prime * result + ((pycclib == null) ? 0 : pycclib.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Version other = (Version) obj; if (cctrl == null) { if (other.cctrl != null) return false; } else if (!cctrl.equals(other.cctrl)) return false; if (pycclib == null) { if (other.pycclib != null) return false; } else if (!pycclib.equals(other.pycclib)) return false; return true; } } ",0 "* particular way besides their locations. * * @author tetigi * * @param * Type of the data node */ public class UnorderedTree implements Tree { private final ArrayList> children = new ArrayList>(); private T value; @SafeVarargs public UnorderedTree(final T val, final Tree... trees) { value = val; for (final Tree t : trees) { children.add(t); } } public UnorderedTree(final T val) { value = val; } public UnorderedTree() { value = null; } @Override public void map(final utils.Tree.TreeFunc f) { for (final Tree t : children) { t.setValue(f.mapFunction(t.getValue())); t.map(f); } } @Override public Tree getChild(final int index) { return children.get(index); } @Override public void printTree() { System.out.println(value); for (final Tree t : children) { t.printTree(); } } @Override public Tree transform(final utils.Tree.TreeTFunc f) { final UnorderedTree ret = new UnorderedTree(); for (final Tree t : children) { ret.setValue(f.transform(t.getValue())); ret.addChild(t.transform(f)); } return ret; } @Override public void addChild(final Tree t) { children.add(t); } @Override public T getValue() { return value; } @Override public void setValue(final T t) { value = t; } @Override public boolean isLeaf() { return (children.size() == 0); } @Override public Tree depthFirstTransform(utils.Tree.TreeNodeTFunc f) { return f.transformTree(this); } @Override public List> getChildren() { return children; } @Override public void setChildren(List> children) { this.children.clear(); this.children.addAll(children); } /* * (non-Javadoc) * * @see utils.Tree#setChildren(java.util.List) */ @Override public void addChildren(List> children) { this.children.addAll(children); } } ",0 "urce and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import java.util.HashMap; import java.util.Map; import org.hisp.dhis.scheduling.TaskId; /** * @author Lars Helge Overland */ public class TaskLocalMap { private final Map> internalMap; public TaskLocalMap() { this.internalMap = new HashMap<>(); } public Map get( TaskId id ) { Map map = internalMap.get( id ); if ( map == null ) { map = new HashMap<>(); internalMap.put( id, map ); } return map; } public boolean clear( TaskId id ) { return internalMap.remove( id ) != null; } } ",0 "efinition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} */ class Configuration implements ConfigurationInterface { /** * {@inheritDoc} */ public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('neutral_block'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for // more information on that topic. return $treeBuilder; } } ",0 "stribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by * the Free Software Foundation with the addition of the following permission * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License * along with this program; if not, see http://www.gnu.org/licenses or write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301 USA. * * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License * version 3, these Appropriate Legal Notices must retain the display of the * ""Powered by Funambol"" logo. If the display of the logo is not reasonably * feasible for technical reasons, the Appropriate Legal Notices must display * the words ""Powered by Funambol"". */ package com.funambol.ctp.server.notification; /** * * @version $Id: NotificationProviderException.java,v 1.2 2007-11-28 11:26:16 nichele Exp $ */ public class NotificationProviderException extends Exception { /** * Creates a new instance of NotificationProviderException without * detail message. */ public NotificationProviderException() { super(); } /** * Constructs an instance of NotificationProviderException with the * specified detail message. * * @param message the detail message. */ public NotificationProviderException(String message) { super(message); } /** * Constructs an instance of NotificationProviderException with the * specified detail message and the given cause. * * @param message the detail message. * @param cause the cause. */ public NotificationProviderException(String message, Throwable cause) { super(message, cause); } /** * Constructs an instance of NotificationProviderException with the * specified cause. * * @param cause the cause. */ public NotificationProviderException(Throwable cause) { super(cause); } } ",0 "FirstName ""名詞,固有名詞,人名,名"" 2010, // LastName ""名詞,固有名詞,人名,姓"" 2047, // Number ""名詞,数,アラビア数字"" 2049, // KanjiNumber ""名詞,数,漢数字"" 2, // WeakCompoundPrefix ""^(接頭詞,名詞接続|接頭詞,丁寧連用形接続|フィラー)"" 287, // AcceptableParticleAtBeginOfSegment ""^助詞,*,*,*,*,*,(が|で|と|に|にて|の|へ|より|も|と|から|は|や)$"" 2705, // JapanesePunctuations ""記号,(句点|読点)"" 2707, // OpenBracket ""記号,括弧開"" 2706, // CloseBracket ""記号,括弧閉"" 2704, // GeneralSymbol ""記号,一般,"" 2722, // Zipcode ""特殊,郵便番号"" 2723, // IsolatedWord ""特殊,短縮よみ"" 2724, // SuggestOnlyWord ""特殊,サジェストのみ"" 719, // ContentWordWithConjugation ""^(動詞,自立,*,*,五段|動詞,自立,*,*,一段|形容詞,自立)"" 42, // SuffixWord ""^(助詞|助動詞|動詞,非自立|動詞,接尾|形容詞,非自立|形容詞,接尾|動詞,自立,*,*,サ変・スル)"" 2028, // CounterSuffixWord ""名詞,接尾,助数詞"" 2007, // UniqueNoun ""^名詞,固有名詞"" 1939, // GeneralNoun ""^名詞,一般,*,*,*,*,*$"" 1934, // ContentNoun ""^名詞,(一般|固有名詞|副詞可能|サ変接続),"" 2671, // NounPrefix ""^接頭詞,名詞接続,"" 2047, // EOSSymbol ""^(記号,(句点|読点|アルファベット|一般|括弧開|括弧閉))|^(名詞,数,(アラビア数字|区切り文字))"" 12, // Adverb ""^副詞,"" 287, // AdverbSegmentSuffix ""^助詞,*,*,*,*,*,(から|で|と|に|にて|の|へ|を)$"" 284, // ParallelMarker ""^助詞,並立助詞"" 165, // MasuSuffix ""助動詞,*,*,*,特殊・(マス|タイ)"" 159, // TeSuffix ""(助詞,接続助詞,*,*,*,*,て|助動詞,*,*,*,特殊・タ,|動詞,非自立,*,*,一段,*,てる|動詞,非自立,*,*,五段・ワ行促音便,*,ちゃう)"" 869, // KagyoTaConnectionVerb ""^動詞,(非自立|自立),*,*,五段・カ行(促音便|イ音便),連用タ接続"" 936, // WagyoRenyoConnectionVerb ""^動詞,(非自立|自立),*,*,五段・ワ行促音便,連用形"" }; namespace { // Functional ""^(助詞|助動詞|動詞,非自立|名詞,非自立|形容詞,非自立|動詞,接尾|名詞,接尾|形容詞,接尾)"" const ::mozc::POSMatcher::Range kRangeTable_Functional[] = { { 42, 603 }, { 1083, 1933 }, { 2019, 2044 }, { 2058, 2284 }, { 2554, 2666 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // Unknown ""名詞,サ変接続"" const ::mozc::POSMatcher::Range kRangeTable_Unknown[] = { { 1934, 1937 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // FirstName ""名詞,固有名詞,人名,名"" const ::mozc::POSMatcher::Range kRangeTable_FirstName[] = { { 2009, 2009 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // LastName ""名詞,固有名詞,人名,姓"" const ::mozc::POSMatcher::Range kRangeTable_LastName[] = { { 2010, 2010 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // Number ""名詞,数,アラビア数字"" const ::mozc::POSMatcher::Range kRangeTable_Number[] = { { 2047, 2047 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // KanjiNumber ""名詞,数,漢数字"" const ::mozc::POSMatcher::Range kRangeTable_KanjiNumber[] = { { 2049, 2056 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // WeakCompoundPrefix ""^(接頭詞,名詞接続|接頭詞,丁寧連用形接続|フィラー)"" const ::mozc::POSMatcher::Range kRangeTable_WeakCompoundPrefix[] = { { 2, 11 }, { 2669, 2669 }, { 2671, 2700 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // AcceptableParticleAtBeginOfSegment ""^助詞,*,*,*,*,*,(が|で|と|に|にて|の|へ|より|も|と|から|は|や)$"" const ::mozc::POSMatcher::Range kRangeTable_AcceptableParticleAtBeginOfSegment[] = { { 287, 287 }, { 290, 290 }, { 299, 301 }, { 342, 343 }, { 346, 346 }, { 348, 348 }, { 362, 363 }, { 376, 376 }, { 380, 388 }, { 391, 391 }, { 400, 400 }, { 402, 402 }, { 412, 412 }, { 431, 431 }, { 447, 447 }, { 453, 453 }, { 469, 469 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // JapanesePunctuations ""記号,(句点|読点)"" const ::mozc::POSMatcher::Range kRangeTable_JapanesePunctuations[] = { { 2705, 2705 }, { 2708, 2708 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // OpenBracket ""記号,括弧開"" const ::mozc::POSMatcher::Range kRangeTable_OpenBracket[] = { { 2707, 2707 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // CloseBracket ""記号,括弧閉"" const ::mozc::POSMatcher::Range kRangeTable_CloseBracket[] = { { 2706, 2706 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // GeneralSymbol ""記号,一般,"" const ::mozc::POSMatcher::Range kRangeTable_GeneralSymbol[] = { { 2704, 2704 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // Zipcode ""特殊,郵便番号"" const ::mozc::POSMatcher::Range kRangeTable_Zipcode[] = { { 2722, 2722 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // IsolatedWord ""特殊,短縮よみ"" const ::mozc::POSMatcher::Range kRangeTable_IsolatedWord[] = { { 2723, 2723 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // SuggestOnlyWord ""特殊,サジェストのみ"" const ::mozc::POSMatcher::Range kRangeTable_SuggestOnlyWord[] = { { 2724, 2724 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // ContentWordWithConjugation ""^(動詞,自立,*,*,五段|動詞,自立,*,*,一段|形容詞,自立)"" const ::mozc::POSMatcher::Range kRangeTable_ContentWordWithConjugation[] = { { 719, 1040 }, { 2285, 2553 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // SuffixWord ""^(助詞|助動詞|動詞,非自立|動詞,接尾|形容詞,非自立|形容詞,接尾|動詞,自立,*,*,サ変・スル)"" const ::mozc::POSMatcher::Range kRangeTable_SuffixWord[] = { { 42, 603 }, { 700, 712 }, { 1083, 1933 }, { 2198, 2284 }, { 2554, 2666 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // CounterSuffixWord ""名詞,接尾,助数詞"" const ::mozc::POSMatcher::Range kRangeTable_CounterSuffixWord[] = { { 2028, 2028 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // UniqueNoun ""^名詞,固有名詞"" const ::mozc::POSMatcher::Range kRangeTable_UniqueNoun[] = { { 2007, 2016 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // GeneralNoun ""^名詞,一般,*,*,*,*,*$"" const ::mozc::POSMatcher::Range kRangeTable_GeneralNoun[] = { { 1939, 1939 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // ContentNoun ""^名詞,(一般|固有名詞|副詞可能|サ変接続),"" const ::mozc::POSMatcher::Range kRangeTable_ContentNoun[] = { { 1934, 1937 }, { 1939, 1986 }, { 1996, 2005 }, { 2007, 2016 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // NounPrefix ""^接頭詞,名詞接続,"" const ::mozc::POSMatcher::Range kRangeTable_NounPrefix[] = { { 2671, 2700 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // EOSSymbol ""^(記号,(句点|読点|アルファベット|一般|括弧開|括弧閉))|^(名詞,数,(アラビア数字|区切り文字))"" const ::mozc::POSMatcher::Range kRangeTable_EOSSymbol[] = { { 2047, 2048 }, { 2703, 2708 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // Adverb ""^副詞,"" const ::mozc::POSMatcher::Range kRangeTable_Adverb[] = { { 12, 41 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // AdverbSegmentSuffix ""^助詞,*,*,*,*,*,(から|で|と|に|にて|の|へ|を)$"" const ::mozc::POSMatcher::Range kRangeTable_AdverbSegmentSuffix[] = { { 287, 287 }, { 342, 343 }, { 346, 346 }, { 362, 363 }, { 380, 381 }, { 383, 388 }, { 392, 392 }, { 400, 400 }, { 402, 402 }, { 412, 412 }, { 431, 431 }, { 447, 447 }, { 469, 469 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // ParallelMarker ""^助詞,並立助詞"" const ::mozc::POSMatcher::Range kRangeTable_ParallelMarker[] = { { 284, 292 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // MasuSuffix ""助動詞,*,*,*,特殊・(マス|タイ)"" const ::mozc::POSMatcher::Range kRangeTable_MasuSuffix[] = { { 165, 180 }, { 237, 280 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // TeSuffix ""(助詞,接続助詞,*,*,*,*,て|助動詞,*,*,*,特殊・タ,|動詞,非自立,*,*,一段,*,てる|動詞,非自立,*,*,五段・ワ行促音便,*,ちゃう)"" const ::mozc::POSMatcher::Range kRangeTable_TeSuffix[] = { { 159, 164 }, { 361, 361 }, { 1117, 1117 }, { 1148, 1148 }, { 1179, 1179 }, { 1210, 1210 }, { 1241, 1241 }, { 1272, 1272 }, { 1303, 1303 }, { 1334, 1334 }, { 1364, 1364 }, { 1857, 1857 }, { 1867, 1867 }, { 1878, 1878 }, { 1890, 1890 }, { 1901, 1901 }, { 1912, 1912 }, { 1924, 1924 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // KagyoTaConnectionVerb ""^動詞,(非自立|自立),*,*,五段・カ行(促音便|イ音便),連用タ接続"" const ::mozc::POSMatcher::Range kRangeTable_KagyoTaConnectionVerb[] = { { 869, 869 }, { 1448, 1456 }, { 1497, 1501 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; // WagyoRenyoConnectionVerb ""^動詞,(非自立|自立),*,*,五段・ワ行促音便,連用形"" const ::mozc::POSMatcher::Range kRangeTable_WagyoRenyoConnectionVerb[] = { { 936, 939 }, { 1918, 1928 }, { static_cast(0xFFFF), static_cast(0xFFFF) }, }; } // namespace const ::mozc::POSMatcher::Range *const kRangeTables[30] = { kRangeTable_Functional, kRangeTable_Unknown, kRangeTable_FirstName, kRangeTable_LastName, kRangeTable_Number, kRangeTable_KanjiNumber, kRangeTable_WeakCompoundPrefix, kRangeTable_AcceptableParticleAtBeginOfSegment, kRangeTable_JapanesePunctuations, kRangeTable_OpenBracket, kRangeTable_CloseBracket, kRangeTable_GeneralSymbol, kRangeTable_Zipcode, kRangeTable_IsolatedWord, kRangeTable_SuggestOnlyWord, kRangeTable_ContentWordWithConjugation, kRangeTable_SuffixWord, kRangeTable_CounterSuffixWord, kRangeTable_UniqueNoun, kRangeTable_GeneralNoun, kRangeTable_ContentNoun, kRangeTable_NounPrefix, kRangeTable_EOSSymbol, kRangeTable_Adverb, kRangeTable_AdverbSegmentSuffix, kRangeTable_ParallelMarker, kRangeTable_MasuSuffix, kRangeTable_TeSuffix, kRangeTable_KagyoTaConnectionVerb, kRangeTable_WagyoRenyoConnectionVerb, }; ",0 "his work for additional information regarding copyright ownership. * The ASF licenses this file to You 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. */ package org.apache.commons.imaging.formats.gif; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.List; import java.util.stream.Stream; import org.apache.commons.imaging.ImageInfo; import org.apache.commons.imaging.ImageReadException; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.common.bytesource.ByteSourceFile; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; public class GifReadTest extends GifBaseTest { public static Stream data() throws Exception { return getGifImages().stream(); } public static Stream singleImageData() throws Exception { return getGifImagesWithSingleImage().stream(); } public static Stream animatedImageData() throws Exception { return getAnimatedGifImages().stream(); } @Disabled(value = ""RoundtripTest has to be fixed before implementation can throw UnsupportedOperationException"") @ParameterizedTest @MethodSource(""data"") public void testMetadata(final File imageFile) { Assertions.assertThrows(UnsupportedOperationException.class, () -> Imaging.getMetadata(imageFile)); } @ParameterizedTest @MethodSource(""data"") public void testImageInfo(final File imageFile) throws Exception { final ImageInfo imageInfo = Imaging.getImageInfo(imageFile); assertNotNull(imageInfo); // TODO assert more } @ParameterizedTest @MethodSource(""data"") public void testImageDimensions(final File imageFile) throws Exception { final ImageInfo imageInfo = Imaging.getImageInfo(imageFile); final GifImageMetadata metadata = (GifImageMetadata) Imaging.getMetadata(imageFile); final List images = Imaging.getAllBufferedImages(imageFile); int width = 0; int height = 0; for(int i = 0; i < images.size(); i++) { final BufferedImage image = images.get(i); final GifImageMetadataItem metadataItem = metadata.getItems().get(i); final int xOffset = metadataItem.getLeftPosition(); final int yOffset = metadataItem.getTopPosition(); width = Math.max(width, image.getWidth() + xOffset); height = Math.max(height, image.getHeight() + yOffset); } assertEquals(width, metadata.getWidth()); assertEquals(height, metadata.getHeight()); assertEquals(width, imageInfo.getWidth()); assertEquals(height, imageInfo.getHeight()); } @ParameterizedTest @MethodSource(""data"") public void testBufferedImage(final File imageFile) throws Exception { final BufferedImage image = Imaging.getBufferedImage(imageFile); assertNotNull(image); // TODO assert more } @ParameterizedTest @MethodSource(""singleImageData"") public void testBufferedImagesForSingleImageGif(final File imageFile) throws Exception { final List images = Imaging.getAllBufferedImages(imageFile); assertEquals(1, images.size()); } @ParameterizedTest @MethodSource(""animatedImageData"") public void testBufferedImagesForAnimatedImageGif(final File imageFile) throws Exception { final List images = Imaging.getAllBufferedImages(imageFile); assertTrue(images.size() > 1); } @Test public void testCreateMetadataWithDisposalMethods() { for(final DisposalMethod disposalMethod : DisposalMethod.values()) { final GifImageMetadataItem metadataItem = new GifImageMetadataItem(0, 0, 0, disposalMethod); Assertions.assertEquals(disposalMethod, metadataItem.getDisposalMethod()); } } @Test public void testConvertValidDisposalMethodValues() throws ImageReadException { final DisposalMethod unspecified = GifImageParser.createDisposalMethodFromIntValue(0); final DisposalMethod doNotDispose = GifImageParser.createDisposalMethodFromIntValue(1); final DisposalMethod restoreToBackground = GifImageParser.createDisposalMethodFromIntValue(2); final DisposalMethod restoreToPrevious = GifImageParser.createDisposalMethodFromIntValue(3); final DisposalMethod toBeDefined1 = GifImageParser.createDisposalMethodFromIntValue(4); final DisposalMethod toBeDefined2 = GifImageParser.createDisposalMethodFromIntValue(5); final DisposalMethod toBeDefined3 = GifImageParser.createDisposalMethodFromIntValue(6); final DisposalMethod toBeDefined4 = GifImageParser.createDisposalMethodFromIntValue(7); Assertions.assertEquals(unspecified, DisposalMethod.UNSPECIFIED); Assertions.assertEquals(doNotDispose, DisposalMethod.DO_NOT_DISPOSE); Assertions.assertEquals(restoreToBackground, DisposalMethod.RESTORE_TO_BACKGROUND); Assertions.assertEquals(restoreToPrevious, DisposalMethod.RESTORE_TO_PREVIOUS); Assertions.assertEquals(toBeDefined1, DisposalMethod.TO_BE_DEFINED_1); Assertions.assertEquals(toBeDefined2, DisposalMethod.TO_BE_DEFINED_2); Assertions.assertEquals(toBeDefined3, DisposalMethod.TO_BE_DEFINED_3); Assertions.assertEquals(toBeDefined4, DisposalMethod.TO_BE_DEFINED_4); } @Test public void testConvertInvalidDisposalMethodValues() { Assertions.assertThrows(ImageReadException.class, () -> GifImageParser.createDisposalMethodFromIntValue(8)); } /** * The GIF image data may lead to out of bound array access. This * test verifies that we handle that case and raise an appropriate * exception. * *

                  See Google OSS Fuzz issue 33501

                  * * @throws IOException if it fails to read the test image */ @Test public void testUncaughtExceptionOssFuzz33501() throws IOException { final String input = ""/images/gif/oss-fuzz-33501/clusterfuzz-testcase-minimized-ImagingGifFuzzer-5914278319226880""; final String file = GifReadTest.class.getResource(input).getFile(); final GifImageParser parser = new GifImageParser(); assertThrows(ImageReadException.class, () -> parser.getBufferedImage(new ByteSourceFile(new File(file)), new GifImagingParameters())); } /** * The GIF image Lzw compression may contain a table with length inferior to * the length of entries in the image data. Which results in an ArrayOutOfBoundsException. * This verifies that instead of throwing an AOOBE, we are handling the case and * informing the user why the parser failed to read it, by throwin an ImageReadException * with a more descriptive message. * *

                  See Google OSS Fuzz issue 33464

                  * * @throws IOException if it fails to read the test image */ @Test public void testUncaughtExceptionOssFuzz33464() throws IOException { final String input = ""/images/gif/oss-fuzz-33464/clusterfuzz-testcase-minimized-ImagingGifFuzzer-5174009164595200""; final String file = GifReadTest.class.getResource(input).getFile(); final GifImageParser parser = new GifImageParser(); assertThrows(ImageReadException.class, () -> parser.getBufferedImage(new ByteSourceFile(new File(file)), new GifImagingParameters())); } /** * Test that invalid indexes are validated when accessing GIF color table array. * *

                  See Google OSS Fuzz issue 34185

                  * * @throws IOException if it fails to read the test image */ @Test public void testUncaughtExceptionOssFuzz34185() throws IOException { final String input = ""/images/gif/IMAGING-318/clusterfuzz-testcase-minimized-ImagingGifFuzzer-5005192379629568""; final String file = GifReadTest.class.getResource(input).getFile(); final GifImageParser parser = new GifImageParser(); assertThrows(ImageReadException.class, () -> parser.getBufferedImage(new ByteSourceFile(new File(file)), new GifImagingParameters())); } } ",0 "** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QRGB_H #define QRGB_H #include QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Gui) typedef unsigned int QRgb; // RGB triplet const QRgb RGB_MASK = 0x00ffffff; // masks RGB values Q_GUI_EXPORT_INLINE int qRed(QRgb rgb) // get red part of RGB { return ((rgb >> 16) & 0xff); } Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb) // get green part of RGB { return ((rgb >> 8) & 0xff); } Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb) // get blue part of RGB { return (rgb & 0xff); } Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb) // get alpha part of RGBA { return ((rgb >> 24) & 0xff); } Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)// set RGB value { return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } Q_GUI_EXPORT_INLINE QRgb qRgba(int r, int g, int b, int a)// set RGBA value { return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } Q_GUI_EXPORT_INLINE int qGray(int r, int g, int b)// convert R,G,B to gray 0..255 { return (r*11+g*16+b*5)/32; } Q_GUI_EXPORT_INLINE int qGray(QRgb rgb) // convert RGB to gray 0..255 { return qGray(qRed(rgb), qGreen(rgb), qBlue(rgb)); } Q_GUI_EXPORT_INLINE bool qIsGray(QRgb rgb) { return qRed(rgb) == qGreen(rgb) && qRed(rgb) == qBlue(rgb); } QT_END_NAMESPACE QT_END_HEADER #endif // QRGB_H ",0 "kage in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage * @package Mage_Reports * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** * Report Reviews collection * * @category Mage * @package Mage_Reports * @author Magento Core Team */ class Mage_Reports_Model_Resource_Report_Collection { /** * From value * * @var string */ protected $_from; /** * To value * * @var string */ protected $_to; /** * Report period * * @var int */ protected $_period; /** * Model object * * @var string */ protected $_model; /** * Intervals * * @var int */ protected $_intervals; /** * Page size * * @var int */ protected $_pageSize; /** * Array of store ids * * @var array */ protected $_storeIds; /** * Resource initialization * */ protected function _construct() { } /** * Set period * * @param int $period * @return Mage_Reports_Model_Resource_Report_Collection */ public function setPeriod($period) { $this->_period = $period; return $this; } /** * Set interval * * @param int $from * @param int $to * @return Mage_Reports_Model_Resource_Report_Collection */ public function setInterval($from, $to) { $this->_from = $from; $this->_to = $to; return $this; } /** * Get intervals * * @return unknown */ public function getIntervals() { if (!$this->_intervals) { $this->_intervals = array(); if (!$this->_from && !$this->_to) { return $this->_intervals; } $dateStart = new Zend_Date($this->_from); $dateEnd = new Zend_Date($this->_to); $t = array(); $firstInterval = true; while ($dateStart->compare($dateEnd) <= 0) { switch ($this->_period) { case 'day': $t['title'] = $dateStart->toString(Mage::app()->getLocale()->getDateFormat()); $t['start'] = $dateStart->toString('yyyy-MM-dd HH:mm:ss'); $t['end'] = $dateStart->toString('yyyy-MM-dd 23:59:59'); $dateStart->addDay(1); break; case 'month': $t['title'] = $dateStart->toString('MM/yyyy'); $t['start'] = ($firstInterval) ? $dateStart->toString('yyyy-MM-dd 00:00:00') : $dateStart->toString('yyyy-MM-01 00:00:00'); $lastInterval = ($dateStart->compareMonth($dateEnd->getMonth()) == 0); $t['end'] = ($lastInterval) ? $dateStart->setDay($dateEnd->getDay()) ->toString('yyyy-MM-dd 23:59:59') : $dateStart->toString('yyyy-MM-'.date('t', $dateStart->getTimestamp()).' 23:59:59'); $dateStart->addMonth(1); if ($dateStart->compareMonth($dateEnd->getMonth()) == 0) { $dateStart->setDay(1); } $firstInterval = false; break; case 'year': $t['title'] = $dateStart->toString('yyyy'); $t['start'] = ($firstInterval) ? $dateStart->toString('yyyy-MM-dd 00:00:00') : $dateStart->toString('yyyy-01-01 00:00:00'); $lastInterval = ($dateStart->compareYear($dateEnd->getYear()) == 0); $t['end'] = ($lastInterval) ? $dateStart->setMonth($dateEnd->getMonth()) ->setDay($dateEnd->getDay())->toString('yyyy-MM-dd 23:59:59') : $dateStart->toString('yyyy-12-31 23:59:59'); $dateStart->addYear(1); if ($dateStart->compareYear($dateEnd->getYear()) == 0) { $dateStart->setMonth(1)->setDay(1); } $firstInterval = false; break; } $this->_intervals[$t['title']] = $t; } } return $this->_intervals; } /** * Return date periods * * @return array */ public function getPeriods() { return array( 'day' => Mage::helper('reports')->__('Day'), 'month' => Mage::helper('reports')->__('Month'), 'year' => Mage::helper('reports')->__('Year') ); } /** * Set store ids * * @param array $storeIds * @return Mage_Reports_Model_Resource_Report_Collection */ public function setStoreIds($storeIds) { $this->_storeIds = $storeIds; return $this; } /** * Get store ids * * @return arrays */ public function getStoreIds() { return $this->_storeIds; } /** * Get size * * @return int */ public function getSize() { return count($this->getIntervals()); } /** * Set page size * * @param int $size * @return Mage_Reports_Model_Resource_Report_Collection */ public function setPageSize($size) { $this->_pageSize = $size; return $this; } /** * Get page size * * @return int */ public function getPageSize() { return $this->_pageSize; } /** * Init report * * @param string $modelClass * @return Mage_Reports_Model_Resource_Report_Collection */ public function initReport($modelClass) { $this->_model = Mage::getModel('reports/report') ->setPageSize($this->getPageSize()) ->setStoreIds($this->getStoreIds()) ->initCollection($modelClass); return $this; } /** * get report full * * @param int $from * @param int $to * @return unknown */ public function getReportFull($from, $to) { return $this->_model->getReportFull($this->timeShift($from), $this->timeShift($to)); } /** * Get report * * @param int $from * @param int $to * @return Varien_Object */ public function getReport($from, $to) { return $this->_model->getReport($this->timeShift($from), $this->timeShift($to)); } /** * Retreive time shift * * @param string $datetime * @return string */ public function timeShift($datetime) { return Mage::app()->getLocale() ->utcDate(null, $datetime, true, Varien_Date::DATETIME_INTERNAL_FORMAT) ->toString(Varien_Date::DATETIME_INTERNAL_FORMAT); } } ",0 "l.org/node/1728148 */ ?>
                  "" title="""" rel=""home"" class=""header__logo"" id=""logo"">"" alt="""" class=""header__logo-image"" />

                  ",0 "ic class JSONException extends Exception { private Throwable cause; /** * Constructs a JSONException with an explanatory message. * @param message Detail about the reason for the exception. */ public JSONException(String message) { super(message); } public JSONException(Throwable t) { super(t.getMessage()); this.cause = t; } public Throwable getCause() { return this.cause; } } ",0 "eta http-equiv=""Content-Type"" content=""text/html"" charset=""iso-8859-1""> org.apache.commons.net.pop3 (Commons Net 3.3 API)

                  Package org.apache.commons.net.pop3

                  POP3 and POP3S mail

                  See: Description

                  • Class Summary 
                    Class Description
                    ExtendedPOP3Client
                    A POP3 Cilent class with protocol and authentication extensions support (RFC2449 and RFC2195).
                    POP3
                    The POP3 class is not meant to be used by itself and is provided only so that you may easily implement your own POP3 client if you so desire.
                    POP3Client
                    The POP3Client class implements the client side of the Internet POP3 Protocol defined in RFC 1939.
                    POP3Command
                    POP3Command stores POP3 command code constants.
                    POP3MessageInfo
                    POP3MessageInfo is used to return information about messages stored on a POP3 server.
                    POP3Reply
                    POP3Reply stores POP3 reply code constants.
                    POP3SClient
                    POP3 over SSL processing.
                  • Enum Summary 
                    Enum Description
                    ExtendedPOP3Client.AUTH_METHOD
                    The enumeration of currently-supported authentication methods.

                  Package org.apache.commons.net.pop3 Description

                  POP3 and POP3S mail

                  Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.

                  ",0 "ArrayList; import java.util.Arrays; import java.util.List; import javax.xml.bind.DatatypeConverter; import com.gargoylesoftware.htmlunit.DefaultCredentialsProvider; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; import com.gargoylesoftware.htmlunit.StringWebResponse; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.DomNode; import com.gargoylesoftware.htmlunit.html.DomNodeList; import com.gargoylesoftware.htmlunit.html.HTMLParser; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlImage; import com.gargoylesoftware.htmlunit.html.HtmlPage; import dk.dmaa0214.modelLayer.SPNews; public class SPNewsScraper { //public static void main(String [] args) { // new SPNewsScraper(); //} private WebClient webClient; public SPNewsScraper(String user, String pass) { webClient = new WebClient(); webClient.getOptions().setJavaScriptEnabled(false); webClient.getOptions().setCssEnabled(false); DefaultCredentialsProvider credentialProvider = (DefaultCredentialsProvider) webClient.getCredentialsProvider(); credentialProvider.addNTLMCredentials(user, pass, null, -1, ""localhost"", ""UCN""); } public void getSingleNews(SPNews spNews) throws FailingHttpStatusCodeException, NullPointerException, IOException { int id = spNews.getId(); String siteDialogURL = ""http://ecampus.ucn.dk/Noticeboard/Lists/NoticeBoard/DispForm.aspx?"" + ""NoticeBoardItem="" + id + ""&WebID=87441127-db6f-4499-8c99-3dea925e04a8&IsDlg=1""; HtmlPage page = webClient.getPage(siteDialogURL); DomNode div = page.getFirstByXPath(""//td[@class='wt-2column-t1-td1']/div/div""); if(div == null) { throw new NullPointerException(""Nyhedstekst kunne ikke hentes. Internkode: #3""); } DomNodeList list = div.getChildNodes(); String fullText = """"; for (int i = 5; i < list.size()-3; i++) { DomNode dn = list.get(i); fullText += dn.asXml(); } StringWebResponse response = new StringWebResponse(fullText, page.getUrl()); HtmlPage newPage = HTMLParser.parseHtml(response, webClient.getCurrentWindow()); makeImgToBase64(newPage); HtmlElement body = newPage.getBody(); spNews.setFullText(body.asXml()); } private void makeImgToBase64(HtmlPage page) throws FailingHttpStatusCodeException, MalformedURLException, IOException { @SuppressWarnings(""unchecked"") List imageList = (List) page.getByXPath(""//img""); for (HtmlImage image : imageList) { InputStream ins = webClient.getPage(""http://ecampus.ucn.dk"" + image.getSrcAttribute()).getWebResponse().getContentAsStream(); byte[] imageBytes = new byte[0]; for(byte[] ba = new byte[ins.available()]; ins.read(ba) != -1;) { byte[] baTmp = new byte[imageBytes.length + ba.length]; System.arraycopy(imageBytes, 0, baTmp, 0, imageBytes.length); System.arraycopy(ba, 0, baTmp, imageBytes.length, ba.length); imageBytes = baTmp; } image.setAttribute(""src"", ""data:image/gif;base64,"" + DatatypeConverter.printBase64Binary(imageBytes)); } } public ArrayList getNewsList() throws NullPointerException, FailingHttpStatusCodeException, MalformedURLException, IOException { String siteURL = ""http://ecampus.ucn.dk/Noticeboard/_Layouts/NoticeBoard/Ajax.aspx?Action="" + ""GetNewsList&ShowBodyContent=SHORT100&WebId=87441127-db6f-4499-8c99-3dea925e04a8"" + ""&ChannelList=11776,4096,3811,3817,4311,4312,4313,4768,4314,4315,4316,4317,4310,"" + ""&DateFormat=dd/MM/yyyy HH:mm&List=Current,Archived&IncludeRead=true&MaxToShow=10"" + ""&Page=1&frontpageonly=false""; HtmlPage page = webClient.getPage(siteURL); return ScrapeNewsList(page.asText()); } private ArrayList ScrapeNewsList(String input) throws NullPointerException { ArrayList newslist = new ArrayList(); int iStart = getNextIndex(input, 0); if(!input.substring(0, iStart).equals(""OK"")) { throw new NullPointerException(""Nyhederne kan ikke læses. Internkode: #1. Status: "" + input.substring(0, iStart)); } String[] allNews = input.split(""\\|\\$\\$\\|""); //System.out.println(""count: "" + (allNews.length-1)); for (int i = 1; i < allNews.length; i++) { String[] singleNews = allNews[i].split(""\\|\\$\\|""); if(singleNews.length != 11) { throw new NullPointerException(""Nyhederne kan ikke læses. Internkode: #2. Rapport: "" + singleNews.length); } int id = getIntFromString(singleNews[0]); String title = singleNews[1].trim(); String date = singleNews[2].trim(); boolean read = (getIntFromString(singleNews[3]) == 1); String[] channelArray = singleNews[4].trim().split(""\\|""); ArrayList channels = new ArrayList(Arrays.asList(channelArray)); String addedBy = singleNews[6].trim(); String text = singleNews[7].trim(); //7 and 8 is equal. SPNews newsObj = new SPNews(id, title, date, channels, text, addedBy, read); newslist.add(newsObj); } return newslist; } private int getIntFromString(String str) { int ret = -1; try { ret = Integer.parseInt(str); } catch (NumberFormatException e) { ret = -1; } return ret; } private int getNextIndex(String text, int fromIndex){ int i = text.indexOf(""|$|"", fromIndex); if (i == -1) { throw new NullPointerException(""Nyhederne kan ikke læses""); } return i; } } ",0 " * This is free software, and you are welcome to redistribute it * under under the terms of the GNU General Public License. * * It is distributed without any warranty; without even the * implied warranty of merchantability or fitness for a particular * purpose. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . **/ /** * This Eloquent class represents a privilege of a leader * * Columns: * - operation: A string representing which operation this privilege allows * - scope: 'S' if the privilege is limited to the leader's section, 'U' for unit if they can use this privilege on any section * - member_id: The leader affected by this privilege * * Note : predefined privileges are privileges that can be automatically applied to classes * of members : * A: Simple leader * R: Leader in charge / Section webmaster * S: Unit co-leader * U: Unit main leader */ class Privilege extends Eloquent { var $guarded = array('id', 'created_at', 'updated_at'); // Following are all the privileges with // - id: the string representing the privilege // - text: a textual description of the privilege // - section: true if this privilege can be applied to only a section, false if it is a global privilige // - predefined: in which predefined classes it will be applied public static $UPDATE_OWN_LISTING_ENTRY = array( 'id' => 'Update own listing entry', 'text' => 'Modifier ses données personnelles dans le listing', 'section' => false, 'predefined' => ""ARSU"" ); public static $EDIT_PAGES = array( 'id' => 'Edit pages', 'text' => 'Modifier les pages #delasection', 'section' => true, 'predefined' => ""RSU"" ); public static $EDIT_SECTION_EMAIL_AND_SUBGROUP = array( 'id' => ""Edit section e-mail address and subgroup name"", 'text' => ""Changer l'adresse e-mail #delasection"", 'section' => true, 'predefined' => ""RSU"" ); public static $EDIT_CALENDAR = array( 'id' => ""Edit calendar"", 'text' => 'Modifier les entrées du calendrier #delasection', 'section' => true, 'predefined' => ""ARSU"" ); public static $MANAGE_ATTENDANCE = array( 'id' => ""Manage attendance"", 'text' => 'Cocher les présences aux activités #delasection', 'section' => true, 'predefined' => ""ARSU"" ); public static $MANAGE_EVENT_PAYMENTS = array( 'id' => ""Manage event payments"", 'text' => 'Cocher le paiement des membres pour les activités #delasection', 'section' => true, 'predefined' => ""ARSU"" ); public static $EDIT_NEWS = array( 'id' => ""Edit news"", 'text' => 'Poster des nouvelles (actualités) pour #lasection', 'section' => true, 'predefined' => ""RSU"" ); public static $EDIT_DOCUMENTS = array( 'id' => ""Edit documents"", 'text' => 'Modifier les documents #delasection', 'section' => true, 'predefined' => ""RSU"" ); public static $SEND_EMAILS = array( 'id' => ""Send e-mails"", 'text' => 'Envoyer des e-mails aux membres #delasection', 'section' => true, 'predefined' => ""RSU"" ); public static $POST_PHOTOS = array( 'id' => ""Post photos"", 'text' => 'Ajouter/supprimer des photos pour #lasection', 'section' => true, 'predefined' => ""ARSU"" ); public static $MANAGE_ACCOUNTING = array( 'id' => ""Manage accounting"", 'text' => 'Gérer les comptes #delasection', 'section' => true, 'predefined' => ""RSU"" ); public static $SECTION_TRANSFER = array( 'id' => ""Section transfer"", 'text' => ""Changer les scouts de section"", 'section' => false, 'predefined' => ""SU"", ); public static $EDIT_LISTING_LIMITED = array( 'id' => ""Edit listing limited"", 'text' => 'Modifier les données non sensibles du listing #delasection', 'section' => true, 'predefined' => ""RSU"" ); public static $EDIT_LISTING_ALL = array( 'id' => ""Edit listing all"", 'text' => 'Modifier les données sensibles du listing #delasection', 'section' => true, 'predefined' => ""U"" ); public static $VIEW_HEALTH_CARDS = array( 'id' => ""View health cards"", 'text' => 'Consulter les fiches santé #delasection', 'section' => true, 'predefined' => ""ARSU"" ); public static $EDIT_LEADER_PRIVILEGES = array( 'id' => ""Edit leader privileges"", 'text' => 'Changer les privilèges des animateurs #delasection', 'section' => true, 'predefined' => ""RSU"" ); public static $UPDATE_PAYMENT_STATUS = array( 'id' => ""Update payment status"", 'text' => 'Modifier le statut de paiement', 'section' => false, 'predefined' => ""SU"" ); public static $MANAGE_ANNUAL_FEAST_REGISTRATION = array( 'id' => ""Manage annual feast registration"", 'text' => ""Valider les inscriptions pour la fête d'unité"", 'section' => false, 'predefined' => ""SU"" ); public static $MANAGE_SUGGESIONS = array( 'id' => ""Manage suggestions"", 'text' => ""Répondre aux suggestions et les supprimer"", 'section' => false, 'predefined' => ""SU"" ); public static $EDIT_GLOBAL_PARAMETERS = array( 'id' => ""Edit global parameters"", 'text' => ""Changer les paramètres du site"", 'section' => false, 'predefined' => ""U"" ); public static $EDIT_STYLE = array( 'id' => ""Edit style"", 'text' => ""Modifier le style du site"", 'section' => false, 'predefined' => ""U"" ); public static $MANAGE_SECTIONS = array( 'id' => ""Manage sections"", 'text' => ""Créer, modifier et supprimer les sections"", 'section' => false, 'predefined' => ""U"" ); public static $DELETE_USERS = array( 'id' => ""Delete users"", 'text' => ""Supprimer des comptes d'utilisateurs"", 'section' => false, 'predefined' => ""U"" ); public static $DELETE_GUEST_BOOK_ENTRIES = array( 'id' => ""Delete guest book entries"", 'text' => ""Supprimer des entrées du livre d'or"", 'section' => false, 'predefined' => ""U"" ); /** * Returns the list of privileges */ public static function getPrivilegeList() { return array( self::$UPDATE_OWN_LISTING_ENTRY, self::$EDIT_CALENDAR, self::$MANAGE_ATTENDANCE, self::$MANAGE_EVENT_PAYMENTS, self::$POST_PHOTOS, self::$VIEW_HEALTH_CARDS, self::$EDIT_PAGES, self::$EDIT_DOCUMENTS, self::$EDIT_NEWS, self::$SEND_EMAILS, self::$EDIT_SECTION_EMAIL_AND_SUBGROUP, self::$MANAGE_ACCOUNTING, self::$SECTION_TRANSFER, self::$EDIT_LISTING_LIMITED, self::$EDIT_LEADER_PRIVILEGES, self::$MANAGE_ANNUAL_FEAST_REGISTRATION, self::$MANAGE_SUGGESIONS, self::$UPDATE_PAYMENT_STATUS, self::$EDIT_LISTING_ALL, self::$EDIT_GLOBAL_PARAMETERS, self::$EDIT_STYLE, self::$MANAGE_SECTIONS, self::$DELETE_GUEST_BOOK_ENTRIES, self::$DELETE_USERS, ); } /** * Returns the list of privileges sorted in 4 categories * * @param boolean $forSection Whether this is for a section leader or a unit leader */ public static function getPrivilegeArrayByCategory($forSection = false) { // The four categories $basicPrivileges = array(); $leaderInChargePrivileges = array(); $unitTeamPrivileges = array(); $unitLeaderPrivileges = array(); // Sort privileges into categories foreach (self::getPrivilegeList() as $privilege) { if (strpos($privilege['predefined'], ""A"") !== false) { if ($forSection) { if ($privilege['section']) { $basicPrivileges[] = array('privilege' => $privilege, 'scope' => 'S'); $unitTeamPrivileges[] = array('privilege' => $privilege, 'scope' => 'U'); } else { $basicPrivileges[] = array('privilege' => $privilege, 'scope' => 'U'); } } else { if ($privilege['section']) $leaderInChargePrivileges[] = array('privilege' => $privilege, 'scope' => 'U'); else $basicPrivileges[] = array('privilege' => $privilege, 'scope' => 'U'); } } elseif (strpos($privilege['predefined'], ""R"") !== false) { if ($forSection) { if ($privilege['section']) { $leaderInChargePrivileges[] = array('privilege' => $privilege, 'scope' => 'S'); $unitTeamPrivileges[] = array('privilege' => $privilege, 'scope' => 'U'); } else { $leaderInChargePrivileges[] = array('privilege' => $privilege, 'scope' => 'U'); } } else { $leaderInChargePrivileges[] = array('privilege' => $privilege, 'scope' => 'U'); } } elseif (strpos($privilege['predefined'], ""S"") !== false) { $unitTeamPrivileges[] = array('privilege' => $privilege, 'scope' => 'U'); } elseif (strpos($privilege['predefined'], ""U"") !== false) { $unitLeaderPrivileges[] = array('privilege' => $privilege, 'scope' => 'U'); } } // Return list of categories return array( ""Gestion de base"" => $basicPrivileges, ""Gestion avancée"" => $leaderInChargePrivileges, ""Gestion de l'unité"" => $unitTeamPrivileges, ""Gestion avancée de l'unité"" => $unitLeaderPrivileges, ); } /** * Sets and saves all the privileges from the base category to the given leader */ public static function addBasePrivilegesForLeader($leader) { foreach (self::getPrivilegeList() as $privilege) { if (strpos($privilege['predefined'], ""A"") !== false) { try { Privilege::create(array( 'operation' => $privilege['id'], 'scope' => $privilege['section'] ? 'S' : 'U', 'member_id' => $leader->id, )); } catch (Exception $e) { Log::error($e); } } } } /** * Sets ($state = true) or unsets ($state = false) and saves a privilege for a leader in a given scope */ public static function set($operation, $scope, $leaderId, $state) { // Find existing privilege $privilege = Privilege::where('operation', '=', $operation) ->where('scope', '=', $scope) ->where('member_id', '=', $leaderId) ->first(); if ($privilege && !$state) { // Privilege exists and should be removed $privilege->delete(); } elseif (!$privilege && $state) { // Privilege does not exist and should be created Privilege::create(array( 'operation' => $operation, 'scope' => $scope, 'member_id' => $leaderId, )); } } }",0 " copyright and license information view LICENSE file distributed with this source code. * @version 2014.07.0 * @package tests */ class eZProductCollectionTest extends ezpDatabaseTestCase { protected $backupGlobals = false; /** * Unit test for eZProductCollection::cleanupList() * * Outline: * 1) Create 10 eZProductCollection objects * 2) Pick 5 random ID of created items * 3) Call cleanupList() on these 5 items * 4) Check that the 5 items have been removed * 5) Check that the 5 other items haven't been removed */ public function testCleanupList() { // Create a few collections $row = array( 'created' => time(), 'currency_code' => 'EUR' ); $collection = new eZProductCollection( $row ); $collection->store(); $collectionIDArray[] = $collection->attribute( 'id' ); for( $i = 0; $i < 1500; $i++ ) { $newCollection = $collection->copy(); $collectionIDArray[] = $newCollection->attribute( 'id' ); } // pick a few random ID to delete $deleteIDArray = array_rand( $collectionIDArray, round( count( $collectionIDArray ) / 2 ) ); $remainingIDArray = array_diff( $collectionIDArray, $deleteIDArray ); eZProductCollection::cleanupList( $deleteIDArray ); // Check that each item of deleteIDArray has been removed foreach( $deleteIDArray as $id ) { $this->assertNull( eZProductCollection::fetch( $id ) ); } // And check that each item of remainingIDArray hasn't been deleted foreach( $remainingIDArray as $id ) { $this->assertInstanceOf( 'eZProductCollection', eZProductCollection::fetch( $id ) ); } } } ?> ",0 "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. */ package io.datarouter.instrumentation.trace; import java.time.Instant; import java.util.Objects; import java.util.Optional; import java.util.Random; import java.util.regex.Pattern; public class Traceparent{ private static final Pattern TRACEPARENT_PATTERN = Pattern.compile( ""^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$""); private static final String TRACEPARENT_DELIMITER = ""-""; private static final Integer MIN_CHARS_TRACEPARENT = 55; private static final String CURRENT_VERSION = ""00""; public static final int TRACE_ID_HEX_SIZE = 32; public static final int PARENT_ID_HEX_SIZE = 16; public final String version = CURRENT_VERSION; public final String traceId; public final String parentId; private String traceFlags; public Traceparent(String traceId, String parentId, String traceFlags){ this.traceId = traceId; this.parentId = parentId; this.traceFlags = traceFlags; } public Traceparent(String traceId){ this(traceId, createNewParentId()); } public Traceparent(String traceId, String parentId){ this(traceId, parentId, createDefaultTraceFlag()); } public static Traceparent generateNew(long createdTimestamp){ return new Traceparent(createNewTraceId(createdTimestamp), createNewParentId(), createDefaultTraceFlag()); } public static Traceparent generateNewWithCurrentTimeInNs(){ return new Traceparent(createNewTraceId(Trace2Dto.getCurrentTimeInNs()), createNewParentId(), createDefaultTraceFlag()); } public Traceparent updateParentId(){ return new Traceparent(traceId, createNewParentId(), traceFlags); } /* * TraceId is a 32 hex digit String. We convert the root request created unix time into lowercase base16 * and append it with a randomly generated long lowercase base16 representation. * */ private static String createNewTraceId(long createdTimestamp){ return String.format(""%016x"", createdTimestamp) + String.format(""%016x"", new Random().nextLong()); } /* * ParentId is a 16 hex digit String. We use a randomly generated long and convert it into lowercase base16 * representation. * */ public static String createNewParentId(){ return String.format(""%016x"", new Random().nextLong()); } public long getTimestampInMs(){ return Long.parseLong(traceId.substring(0, 16), 16); } public Instant getInstant(){ return Instant.ofEpochMilli(getTimestampInMs()); } /*----------- trace flags ------------*/ private static String createDefaultTraceFlag(){ return TraceContextFlagMask.DEFAULT.toHexCode(); } public void enableSample(){ this.traceFlags = TraceContextFlagMask.enableTrace(traceFlags); } public void enableLog(){ this.traceFlags = TraceContextFlagMask.enableLog(traceFlags); } public boolean shouldSample(){ return TraceContextFlagMask.isTraceEnabled(traceFlags); } public boolean shouldLog(){ return TraceContextFlagMask.isLogEnabled(traceFlags); } @Override public String toString(){ return String.join(TRACEPARENT_DELIMITER, version, traceId, parentId, traceFlags); } @Override public boolean equals(Object obj){ if(!(obj instanceof Traceparent)){ return false; } Traceparent other = (Traceparent)obj; return Objects.equals(version, other.version) && Objects.equals(traceId, other.traceId) && Objects.equals(parentId, other.parentId) && Objects.equals(traceFlags, other.traceFlags); } @Override public int hashCode(){ return Objects.hash(version, traceId, parentId, traceFlags); } public static Optional parse(String traceparentStr){ if(traceparentStr == null || traceparentStr.isEmpty()){ return Optional.empty(); }else if(traceparentStr.length() < MIN_CHARS_TRACEPARENT){ return Optional.empty(); }else if(!TRACEPARENT_PATTERN.matcher(traceparentStr).matches()){ return Optional.empty(); } String[] tokens = traceparentStr.split(Traceparent.TRACEPARENT_DELIMITER); if(!Traceparent.CURRENT_VERSION.equals(tokens[0])){ return Optional.empty(); } return Optional.of(new Traceparent(tokens[1], tokens[2], tokens[3])); } } ",0 "ce section of the plugin readme.txt file (ie, * the one belonging to the current stable accessible via WP SVN - at least by * default). */ class Tribe__Admin__Notice__Plugin_Upgrade_Notice { /** * Currently installed version of the plugin * * @var string */ protected $current_version = ''; /** * The plugin path as it is within the plugins directory, ie * ""some-plugin/main-file.php"". * * @var string */ protected $plugin_path = ''; /** * Contains the plugin upgrade notice (empty if none are available). * * @var string */ protected $upgrade_notice = ''; /** * Test for and display any plugin upgrade messages (if any are available) inline * beside the plugin listing itself. * * The optional third param is the object which actually checks to see if there * are any upgrade notices worth displaying. If not provided, an object of the * default type will be created (which connects to WP SVN). * * @param string $current_version * @param string $plugin_path (ie ""plugin-dir/main-file.php"") */ public function __construct( $current_version, $plugin_path ) { $this->current_version = $current_version; $this->plugin_path = $plugin_path; add_action( ""in_plugin_update_message-$plugin_path"", array( $this, 'maybe_run' ) ); } /** * Test if there is a plugin upgrade notice and displays it if so. * * Expects to fire during ""in_plugin_update_message-{plugin_path}"", therefore * this should only run if WordPress has detected that an upgrade is indeed * available. */ public function maybe_run() { $this->test_for_upgrade_notice(); if ( $this->upgrade_notice ) { $this->display_message(); } } /** * Tests to see if an upgrade notice is available. */ protected function test_for_upgrade_notice() { $cache_key = $this->cache_key(); $this->upgrade_notice = get_transient( $cache_key ); if ( false === $this->upgrade_notice ) { $this->discover_upgrade_notice(); } set_transient( $cache_key, $this->upgrade_notice, $this->cache_expiration() ); } /** * Returns a cache key unique to the current plugin path and version, that * still fits within the 45-char limit of regular WP transient keys. * * @return string */ protected function cache_key() { return 'tribe_plugin_upgrade_notice-' . hash( 'crc32b', $this->plugin_path . $this->current_version ); } /** * Returns the period of time (in seconds) for which to cache plugin upgrade messages. * * @return int */ protected function cache_expiration() { /** * Number of seconds to cache plugin upgrade messages for. * * Defaults to one day, which provides a decent balance between efficiency savings * and allowing for the possibility that some upgrade messages may be changed or * rescinded. * * @var int $cache_expiration */ return (int) apply_filters( 'tribe_plugin_upgrade_notice_expiration', DAY_IN_SECONDS, $this->plugin_path ); } /** * Looks at the current stable plugin readme.txt and parses to try and find the first * available upgrade notice relating to a plugin version higher than this one. * * By default, WP SVN is the source. */ protected function discover_upgrade_notice() { /** * The URL for the current plugin readme.txt file. * * @var string $url * @var string $plugin_path */ $readme_url = apply_filters( 'tribe_plugin_upgrade_readme_url', $this->form_wp_svn_readme_url(), $this->plugin_path ); if ( ! empty( $readme_url ) ) { $response = wp_safe_remote_get( $readme_url ); } if ( ! empty( $response ) && ! is_wp_error( $response ) ) { $readme = $response['body']; } if ( ! empty( $readme ) ) { $this->parse_for_upgrade_notice( $readme ); $this->format_upgrade_notice(); } /** * The upgrade notice for the current plugin (may be empty). * * @var string $upgrade_notice * @var string $plugin_path */ return apply_filters( 'tribe_plugin_upgrade_notice', $this->upgrade_notice, $this->plugin_path ); } /** * Forms the expected URL to the trunk readme.txt file as it is on WP SVN * or an empty string if for any reason it cannot be determined. * * @return string */ protected function form_wp_svn_readme_url() { $parts = explode( '/', $this->plugin_path ); $slug = empty( $parts[0] ) ? '' : $parts[0]; return esc_url( ""https://plugins.svn.wordpress.org/$slug/trunk/readme.txt"" ); } /** * Given a standard Markdown-format WP readme.txt file, finds the first upgrade * notice (if any) for a version higher than $this->current_version. * * @param string $readme * @return string */ protected function parse_for_upgrade_notice( $readme ) { $in_upgrade_notice = false; $in_version_notice = false; $readme_lines = explode( ""\n"", $readme ); foreach ( $readme_lines as $line ) { // Once we leave the Upgrade Notice section (ie, we encounter a new section header), bail if ( $in_upgrade_notice && 0 === strpos( $line, '==' ) ) { break; } // Look out for the start of the Upgrade Notice section if ( ! $in_upgrade_notice && preg_match( '/^==\s*Upgrade\s+Notice\s*==/i', $line ) ) { $in_upgrade_notice = true; } // Also test to see if we have left the version specific note (ie, we encounter a new sub heading or header) if ( $in_upgrade_notice && $in_version_notice && 0 === strpos( $line, '=' ) ) { break; } // Look out for the first applicable version-specific note within the Upgrade Notice section if ( $in_upgrade_notice && ! $in_version_notice && preg_match( '/^=\s*\[?([0-9\.]{3,})\]?\s*=/', $line, $matches ) ) { // Is this a higher version than currently installed? if ( version_compare( $matches[1], $this->current_version, '>' ) ) { $in_version_notice = true; } } // Copy the details of the upgrade notice for the first higher version we find if ( $in_upgrade_notice && $in_version_notice ) { $this->upgrade_notice .= $line . ""\n""; } } } /** * Convert the plugin version header and any links from Markdown to HTML. */ protected function format_upgrade_notice() { // Convert [links](http://...) to tags $this->upgrade_notice = preg_replace( '/\[([^\]]*)\]\(([^\)]*)\)/', '${1}', $this->upgrade_notice ); // Convert =4.0= headings to

                  4.0

                  tags $this->upgrade_notice = preg_replace( '/=\s*([a-zA-Z0-9\.]{3,})\s*=/', '

                  ${1}

                  ', $this->upgrade_notice ); } /** * Render the actual upgrade notice. * * Please note if plugin-specific styling is required for the message, you can * use an ID generated by WordPress for one of the message's parent elements * which takes the form ""{plugin_name}-update"". Example: * * #the-events-calendar-update .tribe-plugin-update-message { ... } */ public function display_message() { $notice = wp_kses_post( $this->upgrade_notice ); echo ""
                  $notice
                  ""; } } ",0 "_text_recognizer__ #define __STR__text_recognizer__ #include #include #include #include #include #include #include class TextRecognizer { public: TextRecognizer(){}; std::vector recognize(std::vector data); }; #endif /* defined(__STR__text_recognizer__) */ ",0 "Resource; import org.artifactory.ui.rest.service.general.GeneralServiceFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import javax.annotation.security.RolesAllowed; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; /** * @author Chen keinan */ @Path(""home"") @RolesAllowed({AuthorizationService.ROLE_ADMIN, AuthorizationService.ROLE_USER}) @Component @Scope(BeanDefinition.SCOPE_PROTOTYPE) public class HomeResource extends BaseResource { @Autowired GeneralServiceFactory generalFactory; @GET @Produces(MediaType.APPLICATION_JSON) public Response getHomeData() throws Exception { return runService(generalFactory.getHomePage()); } } ",0 "/../../doc/src/boostbook.css"" type=""text/css"">
                  Home Libraries People FAQ More

                  Struct relative

                  boost::accumulators::relative

                  Synopsis

                  Copyright © 2005, 2006 Eric Niebler

                  Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


                  ",0 "
                  {% csrf_token %} {% bootstrap_form form %} Cancel
                  {% endblock %}",0 "ss=""help-element"">

                  Voit perustaa oman verkostosi painamalla Luo oma Verkosto -painiketta. Luotuasi verkoston ilmestyt kartalle antamaasi sijaintiin.

                  Luodessasi verkostosi saat samalla uniikin linkin, jota voit jakaa ystävillesi sosiaalisessa mediassa ja kutsua heidät liittymään osaksi sinun verkostoasi.

                  Tulit sivustolle käyttäjän {{founderName}} linkin kautta

                  Lähde mukaan!-painikkeella pääset mukaan hänen verkostoon.

                  Liittymällä {{founderName}} verkostoon luot oman verkoston, johon voit kutsua ystäviäsi mukaan toimimaan SOS hyväntekijöinä.

                  Vikatilanteissa ota yhteyttä Tarmoon
                  ",0 "Analytics --> {% include googleanalytics.html %} {% include sidebar.html %}

                  {{ site.title }} {{ site.tagline }}

                  {{ content }}
                  ",0 "atus=no,menubar=no,scrollbars=yes,resizable=yes"");}
                  條目 疑行無名,疑事無功
                  注音 ˊ ㄒ|ㄥˊ ㄨˊ ㄇ|ㄥˊ |ˊ ㄕˋ ㄨˊ ㄍㄨㄥ
                  漢語拼音 yí xíng wú míng yí shì wú gōng
                  釋義 做事猶豫不決,是無法成功的。史記˙卷六十八˙商君傳:*疑行無名,疑事無功。且夫有高人之行者,固見非於世。*亦作*疑行無成,疑事無功**疑事無功,疑行無名*
                  附錄 修訂本參考資料
                  ",0 " with the template operator name. */ function operatorList() { return $this->Operators; } /*! \return true to tell the template engine that the parameter list exists per operator type, this is needed for operator classes that have multiple operators. */ function namedParameterPerOperator() { return true; } /*! See eZTemplateOperator::namedParameterList */ function namedParameterList() { return array( 'pdfpreview' => array( 'width' => array( 'type' => 'integer', 'required' => true ), 'height' => array( 'type' => 'integer', 'required' => true ), 'attribute_id' => array( 'type' => 'integer', 'required' => true), 'attribute_version' => array( 'type' => 'integer', 'required' => true), 'page' => array( 'type' => 'integer', 'required' => false, 'default' => 1) ) ); } /*! Executes the PHP function for the operator cleanup and modifies \a $operatorValue. */ function modify( &$tpl, &$operatorName, &$operatorParameters, &$rootNamespace, &$currentNamespace, &$operatorValue, &$namedParameters ) { $ini = eZINI::instance(); $contentId = $operatorValue; $width = (int)$namedParameters['width']; $height = (int)$namedParameters['height']; $container = ezpKernel::instance()->getServiceContainer(); $pdfPreview = $container->get( 'xrow_pdf_preview' ); $operatorValue = $pdfPreview->preview($contentId, $width, $height); } function previewRetrieve( $file, $mtime, $args ) { //do nothing } function previewGenerate( $file, $args ) { extract( $args ); $pdffile->fetch(true); $cmd = ""convert "" . eZSys::escapeShellArgument( $pdf_file_path . ""["" . $page . ""]"" ) . "" "" . "" -alpha remove -resize "" . eZSys::escapeShellArgument( $width . ""x"" . $height ) . "" "" . eZSys::escapeShellArgument( $cacheImageFilePath ); $out = shell_exec( $cmd ); $fileHandler = eZClusterFileHandler::instance(); $fileHandler->fileStore( $cacheImageFilePath, 'pdfpreview', false ); eZDebug::writeDebug( $cmd, ""pdfpreview"" ); if ( $out ) { eZDebug::writeDebug( $out, ""pdfpreview"" ); } //return values for the storecache function return array( 'content' => $cacheImageFilePath, 'scope' => 'pdfpreview', 'store' => true ); } } ?> ",0 " the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. QtAws is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with QtAws. If not, see . */ #ifndef SQSPURGEQUEUERESPONSE_P_H #define SQSPURGEQUEUERESPONSE_P_H #include ""sqsresponse_p.h"" namespace QtAws { namespace SqsOld { class SqsPurgeQueueResponse; class SqsPurgeQueueResponsePrivate : public SqsResponsePrivate { public: QString queueUrl; ///< Created queue URL. SqsPurgeQueueResponsePrivate(SqsPurgeQueueResponse * const q); void parsePurgeQueueResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(SqsPurgeQueueResponse) Q_DISABLE_COPY(SqsPurgeQueueResponsePrivate) }; } // namespace SqsOld } // namespace QtAws #endif ",0 "enerated by javadoc (1.8.0_25) on Sun Feb 08 02:34:44 CET 2015 --> Uses of Class CTD.planer2.function.CClasses
                  • Prev
                  • Next

                  Uses of Class
                  CTD.planer2.function.CClasses

                  No usage of CTD.planer2.function.CClasses
                  • Prev
                  • Next
                  ",0 "w3.org/1999/xhtml""> Search — ORMPY 0.1 documentation

                  Search

                  Please activate JavaScript to enable the search functionality.

                  From here you can search these documents. Enter your search words into the box below and click ""search"". Note that the search function will automatically search for all of the words. Pages containing fewer words won't appear in the result list.

                  © Copyright 2014, Matthew Nizol. Created using Sphinx 1.2.2.
                  ",0 " content='text/html; charset=UTF-8' />
                  clearfix"">

                  (dnia: '.format_date($node->created, 'custom', 'd.m.Y').')'; ?>

                  >