code
stringlengths
4
1.01M
language
stringclasses
2 values
<?php namespace Tests\Browser\Pages\Admin; use Laravel\Dusk\Browser; use Laravel\Dusk\Page as BasePage; class FilterAdd extends BasePage { /** * Get the URL for the page. * * @return string */ public function url() { return '/admin/filter/create'; } /** * Assert that the browser is on the page. * * @param Browser $browser * @return void */ public function assert(Browser $browser) { $browser->assertPathIs($this->url()); } /** * Get the element shortcuts for the page. * * @return array */ public function elements() { return [ '@status' => 'select[name="properties[status]"]', '@display' => 'select[name="properties[display]"]', '@displayCount' => 'input[name="properties[display_count]"]', '@roundTo' => 'input[name="properties[other][round_to]"]', '@title' => 'input[name="properties[title]"]', '@type' => 'select[name="properties[type]"]', '@feature' => 'select[name="properties[feature_id]"]', '@categories' => 'select[name="categories[]"]', '@submit' => '#submit' ]; } }
Java
/* * XAdES4j - A Java library for generation and verification of XAdES signatures. * Copyright (C) 2010 Luis Goncalves. * * XAdES4j 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 any later version. * * XAdES4j 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 XAdES4j. If not, see <http://www.gnu.org/licenses/>. */ package xades4j.xml.unmarshalling; import xades4j.algorithms.Algorithm; import xades4j.properties.SignatureTimeStampProperty; import xades4j.properties.data.SignatureTimeStampData; import xades4j.xml.bind.xades.XmlUnsignedSignaturePropertiesType; /** * * @author Luís */ class FromXmlSignatureTimeStampConverter extends FromXmlBaseTimeStampConverter<SignatureTimeStampData> implements UnsignedSigPropFromXmlConv { FromXmlSignatureTimeStampConverter() { super(SignatureTimeStampProperty.PROP_NAME); } @Override public void convertFromObjectTree( XmlUnsignedSignaturePropertiesType xmlProps, QualifyingPropertiesDataCollector propertyDataCollector) throws PropertyUnmarshalException { super.convertTimeStamps(xmlProps.getSignatureTimeStamp(), propertyDataCollector); } @Override protected SignatureTimeStampData createTSData(Algorithm c14n) { return new SignatureTimeStampData(c14n); } @Override protected void setTSData( SignatureTimeStampData tsData, QualifyingPropertiesDataCollector propertyDataCollector) { propertyDataCollector.addSignatureTimeStamp(tsData); } }
Java
/* * Unitex * * Copyright (C) 2001-2014 Université Paris-Est Marne-la-Vallée <unitex@univ-mlv.fr> * * 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 fr.umlv.unitex.cassys; public class ConfigurationFileAnalyser { private String fileName; private boolean mergeMode; private boolean replaceMode; private boolean disabled; private boolean star; private boolean commentFound; /** * @return the fileName */ public String getFileName() { return fileName; } /** * @return the mergeMode */ public boolean isMergeMode() { return mergeMode; } /** * @return the replaceMode */ public boolean isReplaceMode() { return replaceMode; } /** * @return the commentFound */ public boolean isCommentFound() { return commentFound; } /** * * @return disabled */ public boolean isDisabled(){ return disabled; } public boolean isStar(){ return star; } public ConfigurationFileAnalyser(String line) throws EmptyLineException, InvalidLineException { // extract line comment final String lineSubstring[] = line.split("#", 2); if (lineSubstring.length > 1) { commentFound = true; } if (lineSubstring[0] == null || lineSubstring[0].equals("")) { throw new EmptyLineException(); } final String lineCore[] = lineSubstring[0].split(" "); if (!lineCore[0].startsWith("\"") || !lineCore[0].endsWith("\"")) { throw new InvalidLineException(lineSubstring[0] + " --> FileName must start and end with quote\n"); } lineCore[0] = lineCore[0].substring(1, lineCore[0].length() - 1); if (lineCore.length > 1) { fileName = lineCore[0]; if (lineCore[1].equals("M") || lineCore[1].equals("Merge") || lineCore[1].equals("merge")) { mergeMode = true; replaceMode = false; } else if (lineCore[1].equals("R") || lineCore[1].equals("Replace") || lineCore[1].equals("replace")) { mergeMode = false; replaceMode = true; } else { throw new InvalidLineException(lineSubstring[0] + " --> Second argument should be Merge or Replace\n"); } } else { throw new InvalidLineException( lineSubstring[0] + " --> FileName should be followed by a white space and Merge or Replace\n"); } if(lineCore.length>2){ if(lineCore[2].equals("Disabled")||lineCore[2].equals("Disabled")){ disabled = true; } else if(lineCore[2].equals("Enabled")){ disabled = false; } else { throw new InvalidLineException(lineSubstring[0] + " --> Third argument should be Disabled or Enabled\n"); } if(lineCore.length>3){ if(lineCore[3].equals("*")){ star = true; } else if(lineCore[3].equals("1")){ star = false; } else { throw new InvalidLineException(lineSubstring[0] + " --> Fourth argument should be 1 or *\n"); } } else { star = false; } } else { disabled = false; star = false; } } public class InvalidLineException extends Exception { public InvalidLineException(String s) { super(s); } public InvalidLineException() { /* NOP */ } } public class EmptyLineException extends Exception { public EmptyLineException() { /* NOP */ } } }
Java
# Copyright (c) 2010 by Yaco Sistemas <pmartin@yaco.es> # # 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. # # 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 programe. If not, see <http://www.gnu.org/licenses/>. from django.conf.urls.defaults import patterns, url urlpatterns = patterns('autoreports.views', url(r'^ajax/fields/tree/$', 'reports_ajax_fields', name='reports_ajax_fields'), url(r'^ajax/fields/options/$', 'reports_ajax_fields_options', name='reports_ajax_fields_options'), url(r'^(category/(?P<category_key>[\w-]+)/)?$', 'reports_list', name='reports_list'), url(r'^(?P<registry_key>[\w-]+)/$', 'reports_api', name='reports_api'), url(r'^(?P<registry_key>[\w-]+)/(?P<report_id>\d+)/$', 'reports_api', name='reports_api'), url(r'^(?P<registry_key>[\w-]+)/reports/$', 'reports_api_list', name='reports_api_list'), url(r'^(?P<registry_key>[\w-]+)/wizard/$', 'reports_api_wizard', name='reports_api_wizard'), url(r'^(?P<registry_key>[\w-]+)/wizard/(?P<report_id>\d+)/$', 'reports_api_wizard', name='reports_api_wizard'), url(r'^(?P<app_name>[\w-]+)/(?P<model_name>[\w-]+)/$', 'reports_view', name='reports_view'), )
Java
<?php /*! * Schedule builder * * Copyright (c) 2011, Edwin Choi * * Licensed under LGPL 3.0 * http://www.gnu.org/licenses/lgpl-3.0.txt */ //ini_set("display_errors", 1); //ini_set("display_startup_errors", 1); date_default_timezone_set("GMT"); $timezone = date_default_timezone_get(); if ( !isset($_GET['p'])) { header("HTTP/1.1 400 Bad Request"); header("Status: Bad Request"); exit; } $t_start = microtime(true); $data = array(); require_once "./dbconnect.php"; require_once "./terminfo.php"; if ( !$conn ) { header("HTTP/1.1 400 Bad Request"); header("Status: Bad Request"); echo "Failed to connect to DB: $conn->connect_error\n"; exit; } $headers = getallheaders(); if (isset($headers["If-Modified-Since"])) { $lastmodcheck = strtotime($headers["If-Modified-Since"]); if ($lastmodcheck >= $last_run_timestamp) { header("HTTP/1.0 304 Not Modified"); exit; } } if ( strpos($_GET['p'], '/') !== 0 ) { header("HTTP/1.1 400 Bad Request"); header("Status: Bad Request"); echo "Invalid path spec"; exit; } $paths = explode(';', $_GET['p']); if (count($paths) == 1) { $path = explode('/', $paths[0]); array_shift($path); if (count($path) > 1 && $path[0] != "") { $cond = "course = '" . implode("", $path) . "'"; } else { $cond = "TRUE"; } } else { $names = array(); $cond = ""; foreach ($paths as $p) { $path = explode('/', $p); array_shift($path); if (count($path) == 1 && $path[0] == "") { continue; } if ($cond !== "") $cond .= " OR\n"; $cond .= "course = '" . implode("", $path) . "'"; } } $result_array = array(); if (true) { define("CF_SUBJECT" ,0); define("CF_COURSE" ,0); define("CF_TITLE" ,1); define("CF_CREDITS" ,2); //define("CF_SECTIONS" ,3); //define("CF_CRSID" ,0); /* struct { const char* course; const char* title; float credits; struct { const char* course; const char* section; short callnr; const char* seats; const char* instructor; bool online; bool honors; const char* comments; const char* alt_title; const void* slots; } sections[1]; }; */ define("SF_COURSE" ,0); define("SF_SECTION" ,1); define("SF_CALLNR" ,2); //define("SF_ENROLLED" ,3); //define("SF_CAPACITY" ,4); define("SF_SEATS" ,3); define("SF_INSTRUCTOR" ,4); define("SF_ONLINE" ,5); define("SF_HONORS" ,6); //define("SF_FLAGS" ,7); define("SF_COMMENTS" ,7); define("SF_ALT_TITLE" ,8); define("SF_SLOTS" ,9); define("SF_SUBJECT" ,10); } else { define("CF_CRSID", "_id"); define("CF_COURSE", "course"); define("CF_TITLE","title"); define("CF_CREDITS","credits"); define("CF_SECTIONS","sections"); define("SF_SUBJECT","subject"); define("SF_COURSE","course"); define("SF_SECTION","section"); define("SF_CALLNR","callnr"); define("SF_ENROLLED", "enrolled"); define("SF_CAPACITY", "capacity"); define("SF_SEATS","seats"); define("SF_INSTRUCTOR","instructor"); define("SF_ONLINE","online"); define("SF_HONORS","honors"); define("SF_FLAGS","flags"); define("SF_COMMENTS","comments"); define("SF_ALT_TITLE","alt_title"); define("SF_SLOTS", "slots"); } $query = <<<_ SELECT course, title, credits, callnr, flags, section, enrolled, capacity, instructor, comments FROM NX_COURSE WHERE ($cond) _; $res = $conn->query($query); if ( !$res ) { header("HTTP/1.1 400 Bad Request"); header("Status: Bad Request"); echo "MySQL Query Failed: $conn->error"; exit; } $num_sects = $res->num_rows; class Flags { const ONLINE = 1; const HONORS = 2; const ST = 4; const CANCELLED = 8; }; $map = array(); $ctable = array(); $result = array(); $secFields = array(SF_INSTRUCTOR, SF_COMMENTS, SF_ALT_TITLE); $callnrToSlots = array(); while ($row = $res->fetch_row()) { if (!isset($ctable[$row[0]])) { $ctable[$row[0]] = array(); $arr = &$ctable[$row[0]]; $arr[CF_COURSE] = $row[0]; $arr[CF_TITLE] = $row[1]; $arr[CF_CREDITS] = floatval($row[2]); if (defined("CF_SECTIONS")) $arr[CF_SECTIONS] = array(); } else { $arr = &$ctable[$row[0]]; } if (defined("CF_SECTIONS")) { $map[$row[3]] = array($row[0], count($arr[CF_SECTIONS])); } else { $map[$row[3]] = array($row[0], count($arr) - 3); } $sec = array(); $sec[SF_COURSE] = $row[0]; $sec[SF_SECTION] = $row[5]; $sec[SF_CALLNR] = intval($row[3]); if (defined("SF_ENROLLED")) { $sec[SF_ENROLLED] = intval($row[6]); $sec[SF_CAPACITY] = intval($row[7]); } else { $sec[SF_SEATS] = "$row[6] / $row[7]"; } $sec[SF_INSTRUCTOR] = $row[8]; if (defined("SF_FLAGS")) { $sec[SF_FLAGS] = intval($row[4]); } else { $sec[SF_ONLINE] = ($row[4] & Flags::ONLINE) != 0; $sec[SF_HONORS] = ($row[4] & Flags::HONORS) != 0; } $sec[SF_COMMENTS] = $row[9]; $sec[SF_ALT_TITLE] = $row[1]; $sec[SF_SLOTS] = array(); $callnrToSlots[$sec[SF_CALLNR]] = &$sec[SF_SLOTS]; if (defined("CF_SECTIONS")) $arr[CF_SECTIONS][] = $sec; else $arr[] = $sec; //$data[] = &$arr; } if (count($map) > 0) { //$in_cond = 'callnr=' . implode(' OR callnr=', array_keys($map)); $in_cond = implode(',', array_keys($map)); $query = <<<_ SELECT DISTINCT callnr, day, TIME_TO_SEC(start), TIME_TO_SEC(end), room FROM TIMESLOT WHERE callnr IN ($in_cond) _; $res = $conn->query($query) or die("abc: $conn->error\nQuery: $query"); while ($row = $res->fetch_row()) { $callnrToSlots[$row[0]][] = array( /*"day" => */intval($row[1]), /*"start" => */intval($row[2]), /*"end" => */intval($row[3]), /*"location" => */trim($row[4]) ); } } $data = array_values($ctable); unset($ctable); unset($map); if (!defined("INTERNAL")) { header("Content-Type: application/x-javascript"); header("Cache-Control: no-cache, private, must-revalidate"); header("Last-Modified: " . gmdate("D, d M Y H:i:s", $last_run_timestamp). " GMT"); if (!isset($_SERVER['HTTP_X_REQUESTED_WITH'])) { echo "var COURSE_DATA = "; } // echo json_encode(array("data" => &$data, "t" => microtime(true) - $t_start, "n" => $num_sects)); echo json_encode($data); /* foreach($data as $row) { $sects = $row[CF_SECTIONS]; $row[CF_SECTIONS] = array(); //unset($row[CF_SECTIONS]); echo "db.courses.insert( " . json_encode($row) . " );\n"; echo "db.courses.ensureIndex({course:1});\n"; foreach($sects as $sec) { foreach ($secFields as $nullable) { if (!$sec[$nullable]) { unset($sec[$nullable]); } } if (count($sec[SF_SLOTS]) == 0) unset($sec[SF_SLOTS]); else foreach($sec[SF_SLOTS] as &$slot) { if ($slot["location"] == "") { unset($slot["location"]); } } echo "db.courses.update( { course:'" . $row[CF_COURSE] . "'}, { \$push: { " . CF_SECTIONS . ":". json_encode($sec) . " } } );\n"; } } */ } ?>
Java
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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. 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 <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEBOTREQUEST_P_H #define QTAWS_DELETEBOTREQUEST_P_H #include "lexmodelbuildingservicerequest_p.h" #include "deletebotrequest.h" namespace QtAws { namespace LexModelBuildingService { class DeleteBotRequest; class DeleteBotRequestPrivate : public LexModelBuildingServiceRequestPrivate { public: DeleteBotRequestPrivate(const LexModelBuildingServiceRequest::Action action, DeleteBotRequest * const q); DeleteBotRequestPrivate(const DeleteBotRequestPrivate &other, DeleteBotRequest * const q); private: Q_DECLARE_PUBLIC(DeleteBotRequest) }; } // namespace LexModelBuildingService } // namespace QtAws #endif
Java
#include <rlib/rbinfmt.h> static void dump_opt_hdr (RPeOptHdr * opt) { r_print ("\tLinkerVer: %u.%u\n", opt->major_linker_ver, opt->minor_linker_ver); r_print ("\tEntrypoint: 0x%.8x\n", opt->addr_entrypoint); r_print ("\tCode addr: 0x%.8x\n", opt->base_code); r_print ("\tCode size: 0x%.8x\n", opt->size_code); } static void dump_pe32_image (RPe32ImageHdr * img) { dump_opt_hdr (&img->opt); r_print ("\tImage base: 0x%.8x\n", img->winopt.image_base); r_print ("\tSect align: 0x%.8x\n", img->winopt.section_alignment); r_print ("\tFile align: 0x%.8x\n", img->winopt.file_alignment); r_print ("\tImage size: 0x%.8x\n", img->winopt.size_image); r_print ("\tHeaders size: 0x%.8x\n", img->winopt.size_headers); r_print ("\tOS ver: %u.%u\n", img->winopt.major_os_ver, img->winopt.minor_os_ver); r_print ("\tImage ver: %u.%u\n", img->winopt.major_image_ver, img->winopt.minor_image_ver); r_print ("\tSubSys ver: %u.%u\n", img->winopt.major_subsystem_ver, img->winopt.minor_subsystem_ver); r_print ("\tSubSys: %.4x\n", img->winopt.subsystem); r_print ("\tChecksum: 0x%.8x\n", img->winopt.checksum); r_print ("\tDLL flags: 0x%.4x\n", img->winopt.dll_characteristics); r_print ("\tLoader flags: 0x%.8x\n", img->winopt.loader_flags); r_print ("\tStack: 0x%.8x (res) 0x%.8x (commit)\n", img->winopt.size_stack_reserve, img->winopt.size_stack_commit); r_print ("\tHeap: 0x%.8x (res) 0x%.8x (commit)\n", img->winopt.size_stack_reserve, img->winopt.size_stack_commit); } static void dump_pe32p_image (RPe32PlusImageHdr * img) { dump_opt_hdr (&img->opt); r_print ("\tImage base: 0x%.12"RINT64_MODIFIER"x\n", img->winopt.image_base); r_print ("\tSect align: 0x%.8x\n", img->winopt.section_alignment); r_print ("\tFile align: 0x%.8x\n", img->winopt.file_alignment); r_print ("\tImage size: 0x%.8x\n", img->winopt.size_image); r_print ("\tHeaders size: 0x%.8x\n", img->winopt.size_headers); r_print ("\tOS ver: %u.%u\n", img->winopt.major_os_ver, img->winopt.minor_os_ver); r_print ("\tImage ver: %u.%u\n", img->winopt.major_image_ver, img->winopt.minor_image_ver); r_print ("\tSubSys ver: %u.%u\n", img->winopt.major_subsystem_ver, img->winopt.minor_subsystem_ver); r_print ("\tSubSys: %.4x\n", img->winopt.subsystem); r_print ("\tChecksum: 0x%.8x\n", img->winopt.checksum); r_print ("\tDLL flags: 0x%.4x\n", img->winopt.dll_characteristics); r_print ("\tLoader flags: 0x%.8x\n", img->winopt.loader_flags); r_print ("\tStack: 0x%.12"RINT64_MODIFIER"x (res) 0x%.12"RINT64_MODIFIER"x (commit)\n", img->winopt.size_stack_reserve, img->winopt.size_stack_commit); r_print ("\tHeap: 0x%.12"RINT64_MODIFIER"x (res) 0x%.12"RINT64_MODIFIER"x (commit)\n", img->winopt.size_stack_reserve, img->winopt.size_stack_commit); } static void dump_section (RPeParser * parser, RPeSectionHdr * sec) { r_print ("\tSection: '%s'\n", sec->name); r_print ("\t\tvmsize: 0x%.8x\n", sec->vmsize); r_print ("\t\tvmaddr: 0x%.8x\n", sec->vmaddr); r_print ("\t\tSize: 0x%.8x\n", sec->size_raw_data); r_print ("\t\tOffset: 0x%.8x\n", sec->ptr_raw_data); r_print ("\t\tReloc: 0x%.8x\n", sec->ptr_relocs); r_print ("\t\tReloc#: %u\n", sec->nrelocs); r_print ("\t\tLinenum: 0x%.8x\n", sec->ptr_linenos); r_print ("\t\tLinenum#: %u\n", sec->nlinenos); r_print ("\t\tFlags: 0x%.8x\n", sec->characteristics); } int main (int argc, char ** argv) { RPeParser * parser; RPeSectionHdr * sec; RPe32ImageHdr * pe32; RPe32PlusImageHdr * pe32p; ruint16 i; if (argc < 2) { r_printerr ("Usage: %s <filename>\n", argv[0]); return -1; } else if ((parser = r_pe_parser_new (argv[1])) == NULL) { r_printerr ("Unable to parse '%s' as Mach-O\n", argv[1]); return -1; } switch (r_pe_parser_get_pe32_magic (parser)) { case R_PE_PE32_MAGIC: r_print ("PE32\n"); break; case R_PE_PE32PLUS_MAGIC: r_print ("PE32+\n"); break; default: r_print ("Unknown PE format\n"); return -1; } r_print ("\tMachine: %s\n", r_pe_machine_str (r_pe_parser_get_machine (parser))); r_print ("\tSections: %u\n", r_pe_parser_get_section_count (parser)); r_print ("\tSymbols: %u\n", r_pe_parser_get_symbol_count (parser)); r_print ("\tFlags: 0x%.4x\n\n", r_pe_parser_get_characteristics (parser)); if ((pe32 = r_pe_parser_get_pe32_image_hdr (parser)) != NULL) dump_pe32_image (pe32); if ((pe32p = r_pe_parser_get_pe32p_image_hdr (parser)) != NULL) dump_pe32p_image (pe32p); r_print ("\nSections\n"); for (i = 0; (sec = r_pe_parser_get_section_hdr_by_idx (parser, i)) != NULL; i++) dump_section (parser, sec); return 0; }
Java
<?php return array( 'code' => 'ANG', 'sign' => 'f', 'sign_position' => 0, 'sign_delim' => '', 'title' => 'Netherlands Antillean guilder', 'name' => array( array('', ''), 'NAƒ', 'NAf', 'ƒ', ), 'frac_name' => array( array('cent', 'cents'), ) );
Java
# encoding: utf-8 from __future__ import absolute_import, unicode_literals from apiview.model import AbstractUserMixin, BaseModel from django.contrib.auth.base_user import AbstractBaseUser from django.db import models class User(AbstractUserMixin, BaseModel, AbstractBaseUser): is_staff = False def get_short_name(self): return self.name def get_full_name(self): return self.nickname USERNAME_FIELD = 'username' username = models.CharField('用户名', unique=True, max_length=64, editable=False, null=False, blank=False) password = models.CharField('密码', max_length=128, unique=True, editable=False, null=False, blank=True) nickname = models.CharField('昵称', unique=True, max_length=64, editable=False, null=False, blank=False) class Meta: db_table = 'example_user' app_label = 'example_app' verbose_name = verbose_name_plural = "用户"
Java
-- SETTINGS BLINKY_PLANT_INTERVAL = 3 NEW_STYLE_WIRES = true -- true = new nodebox wires, false = old raillike wires PRESSURE_PLATE_INTERVAL = 0.1 OBJECT_DETECTOR_RADIUS = 6 PISTON_MAXIMUM_PUSH = 15 MOVESTONE_MAXIMUM_PUSH = 100
Java
/** * Copyright(C) 2009-2012 * @author Jing HUANG * @file EtoileImageToTexturePlugin.cpp * @brief * @date 1/2/2011 */ #include "EtoileImageToTexturePlugin.h" #include "util/File.h" #include "QtTextureLoader.h" /** * @brief For tracking memory leaks under windows using the crtdbg */ #if ( defined( _DEBUG ) || defined( DEBUG ) ) && defined( _MSC_VER ) #define _CRTDBG_MAP_ALLOC #include <crtdbg.h> #define DEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__ ) #define new DEBUG_NEW #endif Etoile::EPlugin* loadEtoileImageToTexturePlugin() { return new Etoile::EtoileImageToTexturePlugin("ImageToTexture"); } namespace Etoile { ImageToTextureStringInputSocket::ImageToTextureStringInputSocket(const std::string& name) : StringInputSocket(name) { } void ImageToTextureStringInputSocket::perform(std::string* signal) { if(signal == NULL) return; EtoileImageToTexturePlugin* plugin = (EtoileImageToTexturePlugin*)(this->getNode()); plugin->openFile(*signal); } void ImageToTextureStringInputSocket::retrieve(std::string* signal) { EtoileImageToTexturePlugin* plugin = (EtoileImageToTexturePlugin*)(this->getNode()); plugin->openFile(""); } ImageToTextureOutputSocket::ImageToTextureOutputSocket(const std::string& name) : TextureOutputSocket(name) { } EtoileImageToTexturePlugin::EtoileImageToTexturePlugin(const std::string& name): EPlugin(), SocketNode() { this->getType()._description = "ImageToTexture"; this->getType()._name = name; this->getType()._w = 80; this->getType()._h = 60; this->getType()._color._r = 120; this->getType()._color._g = 240; this->getType()._color._b = 250; this->getType()._color._a = 240; _pInput = new ImageToTextureStringInputSocket(); this->addInputSocket(_pInput); _pOutput = new ImageToTextureOutputSocket(); this->addOutputSocket(_pOutput); } EtoileImageToTexturePlugin::~EtoileImageToTexturePlugin() { } void EtoileImageToTexturePlugin::openFile(const std::string& filename) { if(filename.empty()) return; std::string ext = File::getFileExtension(filename); Mesh *mesh = new Mesh(filename); QtTextureLoader textureloader; Texture* t = textureloader.loadFromFile(filename); _pOutput->set(t); _pOutput->signalEmit(t); } }
Java
/* * #-------------------------------------------------------------------------- * # Copyright (c) 2013 VITRO FP7 Consortium. * # All rights reserved. This program and the accompanying materials * # are made available under the terms of the GNU Lesser Public License v3.0 which accompanies this distribution, and is available at * # http://www.gnu.org/licenses/lgpl-3.0.html * # * # Contributors: * # Antoniou Thanasis (Research Academic Computer Technology Institute) * # Paolo Medagliani (Thales Communications & Security) * # D. Davide Lamanna (WLAB SRL) * # Alessandro Leoni (WLAB SRL) * # Francesco Ficarola (WLAB SRL) * # Stefano Puglia (WLAB SRL) * # Panos Trakadas (Technological Educational Institute of Chalkida) * # Panagiotis Karkazis (Technological Educational Institute of Chalkida) * # Andrea Kropp (Selex ES) * # Kiriakos Georgouleas (Hellenic Aerospace Industry) * # David Ferrer Figueroa (Telefonica Investigación y Desarrollo S.A.) * # * #-------------------------------------------------------------------------- */ package vitro.vspEngine.service.common.abstractservice.dao; import javax.persistence.EntityManager; import vitro.vspEngine.logic.model.Gateway; import vitro.vspEngine.service.common.abstractservice.model.ServiceInstance; import vitro.vspEngine.service.persistence.DBRegisteredGateway; import java.util.List; public class GatewayDAO { private static GatewayDAO instance = new GatewayDAO(); private GatewayDAO(){ super(); } public static GatewayDAO getInstance(){ return instance; } /** * * @param manager * @param incId the incremental auto id in the db * @return */ public DBRegisteredGateway getGatewayByIncId(EntityManager manager, int incId){ DBRegisteredGateway dbRegisteredGateway = manager.find(DBRegisteredGateway.class, incId); return dbRegisteredGateway; } /** * * @param manager * @param name the gateway (registered) name * @return */ public DBRegisteredGateway getGateway(EntityManager manager, String name){ StringBuffer sb = new StringBuffer(); sb.append("SELECT g "); sb.append("FROM DBRegisteredGateway g "); sb.append("WHERE g.registeredName = :gname "); DBRegisteredGateway result = manager.createQuery(sb.toString(), DBRegisteredGateway.class). setParameter("gname", name). getSingleResult(); return result; } public List<DBRegisteredGateway> getInstanceList(EntityManager manager){ List<DBRegisteredGateway> result = manager.createQuery("SELECT instance FROM DBRegisteredGateway instance", DBRegisteredGateway.class).getResultList(); return result; } }
Java
package org.teaminfty.math_dragon.view.math.source.operation; import static org.teaminfty.math_dragon.view.math.Expression.lineWidth; import org.teaminfty.math_dragon.view.math.Empty; import org.teaminfty.math_dragon.view.math.source.Expression; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Path; import android.graphics.Rect; /** A class that represents a source for new {@link Root}s in the drag-and-drop interface */ public class Root extends Expression { /** The paint we use to draw the operator */ private Paint paintOperator = new Paint(); /** Default constructor */ public Root() { // Initialise the paint paintOperator.setStyle(Paint.Style.STROKE); paintOperator.setAntiAlias(true); } @Override public org.teaminfty.math_dragon.view.math.Expression createMathObject() { return new org.teaminfty.math_dragon.view.math.operation.binary.Root(); } @Override public void draw(Canvas canvas, int w, int h) { // The width of the gap between the big box and the small box final int gapWidth = (int) (3 * lineWidth); // Get a boxes that fit the given width and height (we'll use it to draw the empty boxes) // We'll want one big and one small (2/3 times the big one) box Rect bigBox = getRectBoundingBox(3 * (w - gapWidth) / 5, 3 * h / 4, Empty.RATIO); Rect smallBox = getRectBoundingBox(2 * (w - gapWidth) / 5, 2 * h / 4, Empty.RATIO); // Position the boxes smallBox.offsetTo((w - bigBox.width() - smallBox.width() - gapWidth) / 2, (h - bigBox.height() - smallBox.height() / 2) / 2); bigBox.offsetTo(smallBox.right + gapWidth, smallBox.centerY()); // Draw the boxes drawEmptyBox(canvas, bigBox); drawEmptyBox(canvas, smallBox); // Create a path for the operator Path path = new Path(); path.moveTo(smallBox.left, smallBox.bottom + 2 * lineWidth); path.lineTo(smallBox.right - 2 * lineWidth, smallBox.bottom + 2 * lineWidth); path.lineTo(smallBox.right + 1.5f * lineWidth, bigBox.bottom - lineWidth / 2); path.lineTo(smallBox.right + 1.5f * lineWidth, bigBox.top - 2 * lineWidth); path.lineTo(bigBox.right, bigBox.top - 2 * lineWidth); // Draw the operator paintOperator.setStrokeWidth(lineWidth); canvas.drawPath(path, paintOperator); } }
Java
js.Offset = function(rawptr) { this.rawptr = rawptr; } js.Offset.prototype = new konoha.Object(); js.Offset.prototype._new = function(rawptr) { this.rawptr = rawptr; } js.Offset.prototype.getTop = function() { return this.rawptr.top; } js.Offset.prototype.getLeft = function() { return this.rawptr.left; } js.jquery = {}; var initJQuery = function() { var verifyArgs = function(args) { for (var i = 0; i < args.length; i++) { if (args[i].rawptr) { args[i] = args[i].rawptr; } } return args; } var jquery = function(rawptr) { this.rawptr = rawptr; } jquery.prototype = new konoha.Object(); jquery.konohaclass = "js.jquery.JQuery"; /* Selectors */ jquery.prototype.each_ = function(callback) { this.rawptr.each(callback.rawptr); } jquery.prototype.size = function() { return this.rawptr.size(); } jquery.prototype.getSelector = function() { return new konoha.String(this.rawptr.getSelector()); } jquery.prototype.getContext = function() { return new js.dom.Node(this.rawptr.getContext()); } jquery.prototype.getNodeList = function() { return new js.dom.NodeList(this.rawptr.get()); } jquery.prototype.getNode = function(index) { return new js.dom.Node(this.rawptr.get(index)); } /* Attributes */ jquery.prototype.getAttr = function(arg) { return new konoha.String(this.rawptr.attr(arg.rawptr)); } jquery.prototype.attr = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.attr.apply(this.rawptr, args)); } jquery.prototype.removeAttr = function(name) { return new jquery(this.rawptr.removeAttr(name.rawptr)); } jquery.prototype.addClass = function(className) { return new jquery(this.rawptr.addClass(className.rawptr)); } jquery.prototype.removeClass = function(className) { return new jquery(this.rawptr.removeClass(className.rawptr)); } jquery.prototype.toggleClass = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.toggleClass.apply(this.rawptr, args)); } jquery.prototype.getHTML = function() { return new konoha.String(this.rawptr.html()); } jquery.prototype.html = function(val) { return new jquery(this.rawptr.html(val.rawptr)); } jquery.prototype.getText = function() { return new konoha.String(this.rawptr.text()); } jquery.prototype.text = function(val) { return new jquery(this.rawptr.text(val.rawptr)); } jquery.prototype.getVal = function() { return new konoha.Array(this.rawptr.val()) } jquery.prototype.val = function(val) { return new jquery(this.rawptr.val(val.rawptr)); } /* Traversing */ jquery.prototype.eq = function(position) { return new jquery(this.rawptr.eq(position)); } jquery.prototype.filter = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.filter.apply(this.rawptr, args)); } jquery.prototype.is = function(expr) { return this.rawptr.is(expr.rawptr); } jquery.prototype.opnot = function(expr) { return this.rawptr.not(expr.rawptr); } jquery.prototype.slice = function() { return new jquery(this.rawptr.slice.apply(this.rawptr, Array.prototype.slice.call(arguments))); } jquery.prototype.add = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.add.apply(this.rawptr, args)); } jquery.prototype.children = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.children.apply(this.rawptr, args)); } jquery.prototype.closest = function() { var args =verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.closest.apply(this.rawptr, args)); } jquery.prototype.contents = function() { return new jquery(this.rawptr.contents()); } jquery.prototype.find = function(expr) { return new jquery(this.rawptr.find(expr.rawptr)); } jquery.prototype.next = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.next.apply(this.rawptr, args)); } jquery.prototype.nextAll = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.nextAll.apply(this.rawptr, args)); } jquery.prototype.parent = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.parent.apply(this.rawptr, args)); } jquery.prototype.parents = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.parents.apply(this.rawptr, args)); } jquery.prototype.prev = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.prev.apply(this.rawptr, args)); } jquery.prototype.prevAll = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.prevAll.apply(this.rawptr, args)); } jquery.prototype.siblings = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.siblings.apply(this.rawptr, args)); } jquery.prototype.andSelf = function() { return new jquery(this.rawptr.andSelf()); } jquery.prototype.end = function() { return new jquery(this.rawptr.end()); } /* Manipulation */ jquery.prototype.append = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.append.apply(this.rawptr, args)); } jquery.prototype.appendTo = function(content) { return new jquery(this.rawptr.appendTo(content.rawptr)); } jquery.prototype.prepend = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.prepend.apply(this.rawptr, args)); } jquery.prototype.prependTo = function(content) { return new jquery(this.rawptr.prependTo(content.rawptr)); } jquery.prototype.after = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.after.apply(this.rawptr, args)); } jquery.prototype.before = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.before.apply(this.rawptr, args)); } jquery.prototype.insertAfter = function(content) { return new jquery(this.rawptr.insertAfter(content.rawptr)); } jquery.prototype.insertBefore = function(content) { return new jquery(this.rawptr.insertBefore(content.rawptr)); } jquery.prototype.wrap = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.wrap.apply(this.rawptr, args)); } jquery.prototype.wrapAll = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.wrapAll.apply(this.rawptr, args)); } jquery.prototype.wrapInner = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.wrapInner.apply(this.rawptr, args)); } jquery.prototype.replaceWith = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.replaceWith.apply(this.rawptr, args)); } jquery.prototype.replaceAll = function(selector) { return new jquery(this.rawptr.replaceAll(selector.rawptr)); } jquery.prototype.empty = function() { return new jquery(this.rawptr.empty()); } jquery.prototype.remove = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.remove.apply(this.rawptr, args)); } jquery.prototype.clone = function() { return new jquery(this.rawptr.clone.apply(this.rawptr, Array.prototype.slice.call(arguments))); } /* CSS */ jquery.prototype.getCss = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new konoha.String(this.rawptr.css.apply(this.rawptr, args)); } jquery.prototype.css = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.css.apply(this.rawptr, args)); } jquery.prototype.offset = function() { return new js.Offset(this.rawptr.offset()); } jquery.prototype.position = function() { return new js.Offset(this.rawptr.position()); } jquery.prototype.scrollTop = function() { return this.rawptr.scrollTop.apply(this.rawptr, Array.prototype.slice.call(arguments)); } jquery.prototype.scrollLeft = function() { return this.rawptr.scrollLeft.apply(this.rawptr, Array.prototype.slice.call(arguments)); } jquery.prototype.height = function() { return this.rawptr.height.apply(this.rawptr, Array.prototype.slice.call(arguments)); } jquery.prototype.width = function() { return this.rawptr.width.apply(this.rawptr, Array.prototype.slice.call(arguments)); } jquery.prototype.innerHeight = function() { return this.rawptr.innerHeight(); } jquery.prototype.innerWidth = function() { return this.rawptr.innerWidth(); } jquery.prototype.outerHeight = function() { return this.rawptr.outerHeight(); } jquery.prototype.outerWidth = function() { return this.rawptr.outerWidth(); } /* Events */ jquery.prototype.ready = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.ready.apply(this.rawptr, args)); } jquery.prototype.bind = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.bind.apply(this.rawptr, args)); } jquery.prototype.one = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.one.apply(this.rawptr, args)); } jquery.prototype.trigger = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.trigger.apply(this.rawptr, args)); } jquery.prototype.triggerHandler = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.triggerHandler.apply(this.rawptr, args)); } jquery.prototype.unbind = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.unbind.apply(this.rawptr, args)); } jquery.prototype.hover = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.hover.apply(this.rawptr, args)); } jquery.prototype.toggleEvent = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); args = verifyArgs(args[0]); return new jquery(this.rawptr.toggle.apply(this.rawptr, args)); } jquery.prototype.live = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.live.apply(this.rawptr, args)); } jquery.prototype.die = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.die.apply(this.rawptr, args)); } jquery.prototype.blur = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.blur.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.blur(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.change = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.change.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.change(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.click = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.click.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.click(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.dblclick = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.dblclick.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.dblclick(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.error = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.error.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.error(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.focus = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.focus.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.focus(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.keydown = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.keydown.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.keydown(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.keypress = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.keypress.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.keypress(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.keyup = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.keyup.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.keyup(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.load = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.load.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.load(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.mousedown = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.mousedown.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.mousedown(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.mousemove = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.mousemove.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.mousemove(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.mouseout = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.mouseout.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.mouseout(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.mouseover = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.mouseover.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.mouseover(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.mouseup = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.mouseup.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.mouseup(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.resize = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.resize.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.resize(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.scroll = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.scroll.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.scroll(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.select = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.select.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.select(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.submit = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.submit.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.select(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } jquery.prototype.unload = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (args.length == 0) { return new jquery(this.rawptr.unload.apply(this.rawptr, args)); } else { return new jquery(this.rawptr.unload(function(e) { args[0].apply(new js.dom.Element(this), [new js.jquery.JEvent(e)]); })); } } /* Effects */ jquery.prototype.show = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.show.apply(this.rawptr, args)); } jquery.prototype.hide = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.hide.apply(this.rawptr, args)); } jquery.prototype.toggle = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.toggle.apply(this.rawptr, args)); } jquery.prototype.slideDown = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.slideDown.apply(this.rawptr, args)); } jquery.prototype.slideUp = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.slideUp.apply(this.rawptr, args)); } jquery.prototype.slideToggle = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.slideToggle.apply(this.rawptr, args)); } jquery.prototype.fadeIn = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.fadeIn.apply(this.rawptr, args)); } jquery.prototype.fadeOut = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.fadeOut.apply(this.rawptr, args)); } jquery.prototype.fadeTo = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); return new jquery(this.rawptr.fadeTo.apply(this.rawptr, args)); } jquery.prototype._new = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (arguments.length == 1) { this.rawptr = new $(args[0]); } else if (arguments.length == 2) { this.rawptr = new $(args[0], args[1]); } else { throw ("Script !!"); } return this; } return jquery; } js.jquery.JQuery = new initJQuery(); js.jquery.JEvent = new function() { var jevent = function(rawptr) { this.rawptr = rawptr; } jevent.prototype = new konoha.Object(); jevent.konohaclass = "js.jquery.JEvent"; jevent.prototype.type = function() { return new konoha.String(this.rawptr.type); } jevent.prototype.target = function() { return new konoha.dom.Element(this.rawptr.target); } jevent.prototype.relatedTarget = function() { return new konoha.dom.Element(this.rawptr.relatedTarget); } jevent.prototype.currentTarget = function() { return new konoha.dom.Element(this.rawptr.currentTarget); } jevent.prototype.pageX = function() { return this.rawptr.pageX; } jevent.prototype.pageY = function() { return this.rawptr.pageY; } jevent.prototype.timeStamp = function() { return this.rawptr.timeStamp; } jevent.prototype.preventDefault = function() { return new jevent(this.rawptr.preventDefault()); } jevent.prototype.isDefaultPrevented = function() { return this.rawptr.isDefaultPrevented(); } jevent.prototype.stopPropagation = function() { return new jevent(this.rawptr.stopPropagation()); } jevent.prototype.isPropagationStopped = function() { return this.rawptr.isPropagationStopped(); } jevent.prototype.stopImmediatePropagation = function() { return new jevent(this.rawptr.stopImmediatePropagation()); } jevent.prototype.isImmediatePropagationStopped = function() { return this.rawptr.isImmediatePropagationStopped(); } jevent.prototype._new = function() { var args = verifyArgs(Array.prototype.slice.call(arguments)); if (arguments.length == 1) { this.rawptr = new $(args[0]); } else if (arguments.length == 2) { this.rawptr = new $(args[0], args[1]); } else { throw ("Script !!"); } return this; } return jevent; }();
Java
package br.gov.serpro.infoconv.proxy.businesscontroller; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; import javax.inject.Inject; import br.gov.frameworkdemoiselle.stereotype.BusinessController; import br.gov.serpro.infoconv.proxy.exception.AcessoNegadoException; import br.gov.serpro.infoconv.proxy.exception.CNPJNaoEncontradoException; import br.gov.serpro.infoconv.proxy.exception.CpfNaoEncontradoException; import br.gov.serpro.infoconv.proxy.exception.DadosInvalidosException; import br.gov.serpro.infoconv.proxy.exception.InfraException; import br.gov.serpro.infoconv.proxy.exception.PerfilInvalidoException; import br.gov.serpro.infoconv.proxy.rest.dto.cnpj.Perfil1CNPJ; import br.gov.serpro.infoconv.proxy.rest.dto.cnpj.Perfil2CNPJ; import br.gov.serpro.infoconv.proxy.rest.dto.cnpj.Perfil3CNPJ; import br.gov.serpro.infoconv.proxy.util.InfoconvConfig; import br.gov.serpro.infoconv.ws.cnpj.ArrayOfCNPJPerfil1; import br.gov.serpro.infoconv.ws.cnpj.ArrayOfCNPJPerfil2; import br.gov.serpro.infoconv.ws.cnpj.ArrayOfCNPJPerfil3; import br.gov.serpro.infoconv.ws.cnpj.CNPJPerfil1; import br.gov.serpro.infoconv.ws.cnpj.CNPJPerfil2; import br.gov.serpro.infoconv.ws.cnpj.CNPJPerfil3; /** * Classe responsável por interagir com o componente infoconv-ws para obter as * consultas de cnpj e transformar os erros previstos em exceções. * */ @BusinessController public class ConsultaCNPJBC { /** Classe de configuração do infoconv. */ @Inject InfoconvConfig infoconv; private static final String CPF_CONSULTANTE = "79506240949"; /** * Verifica a propriedade ERRO para saber se houve algum problema na * consulta. * * Como se trata de um webservice sempre retorna com codigo http 200 e * dentro da msg de retorno o campo "erro" informa se teve algum problema. * * Alguns "erros" são na verdade avisos por isso não levantam exceção. segue * os erros que levantam exceção: * * - AcessoNegadoException: Todos os erros que começãm com ACS - Erro. Podem * ser por falta de permissão ou algum problema com certificado. A mensagem * explica qual o problema. * * - CNPJNaoEncontradoException: Quando o cpf não está na base. Erros: CPJ * 04 * * - DadosInvalidosException: Qualquer problema de validação no servidor. * Erros: CPJ 02,06 e 11 * * - InfraException: Erros no lado do servidor (WS) Erros: CPF 00 , 01, 03, * 08, 09 * * Documentação dos códigos de Erros: * https://github.com/infoconv/infoconv-ws * * @param response * @throws AcessoNegadoException * @throws DadosInvalidosException * @throws InfraException * @throws CNPJNaoEncontradoException */ private void verificarErros(final Object retorno) throws AcessoNegadoException, DadosInvalidosException, InfraException, CNPJNaoEncontradoException { try { Class<?> c = retorno.getClass(); Field erroField = c.getDeclaredField("erro"); erroField.setAccessible(true); String erroMsg = (String) erroField.get(retorno); if (erroMsg.indexOf("ACS - Erro") > -1) { throw new AcessoNegadoException(erroMsg); } else if (erroMsg.indexOf("CPJ - Erro 04") > -1) { throw new CNPJNaoEncontradoException(erroMsg); } else if (erroMsg.indexOf("CPJ - Erro 02") > -1 || erroMsg.indexOf("CPJ - Erro 06") > -1 || erroMsg.indexOf("CPJ - Erro 11") > -1) { throw new DadosInvalidosException(erroMsg); } else if (erroMsg.indexOf("CPJ - Erro 01") > -1 || erroMsg.indexOf("CPJ - Erro 03") > -1 || erroMsg.indexOf("CPJ - Erro 00") > -1 || erroMsg.indexOf("CPJ - Erro 08") > -1 || erroMsg.indexOf("CPJ - Erro 09") > -1) { throw new InfraException(erroMsg); } } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (SecurityException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } /** * Baseado no perfil indicado monta uma lista generia com o tipo de CNPJ do * perfil como Object. * * @param listaCNPJs * @param perfil * @return * @throws PerfilInvalidoException * @throws InfraException * @throws DadosInvalidosException * @throws AcessoNegadoException * @throws CNPJNaoEncontradoException */ public List<Object> consultarListaDeCnpjPorPerfil(final String listaCNPJs, final String perfil) throws PerfilInvalidoException, AcessoNegadoException, DadosInvalidosException, InfraException, CNPJNaoEncontradoException { List<Object> lista = new ArrayList<Object>(); String perfilUpper = perfil.toUpperCase(); if (perfil == null || "P1".equals(perfilUpper)) { ArrayOfCNPJPerfil1 p = infoconv.consultarCNPJSoap.consultarCNPJP1(listaCNPJs, CPF_CONSULTANTE); lista.addAll(p.getCNPJPerfil1()); } else if ("P1T".equals(perfilUpper)) { ArrayOfCNPJPerfil1 p = infoconv.consultarCNPJSoap.consultarCNPJP1T(listaCNPJs, CPF_CONSULTANTE); lista.addAll(p.getCNPJPerfil1()); } else if ("P2".equals(perfilUpper)) { ArrayOfCNPJPerfil2 p = infoconv.consultarCNPJSoap.consultarCNPJP2(listaCNPJs, CPF_CONSULTANTE); lista.addAll(p.getCNPJPerfil2()); } else if ("P2T".equals(perfilUpper)) { ArrayOfCNPJPerfil2 p = infoconv.consultarCNPJSoap.consultarCNPJP2T(listaCNPJs, CPF_CONSULTANTE); lista.addAll(p.getCNPJPerfil2()); } else if ("P3".equals(perfilUpper)) { ArrayOfCNPJPerfil3 p = infoconv.consultarCNPJSoap.consultarCNPJP3(listaCNPJs, CPF_CONSULTANTE); lista.addAll(p.getCNPJPerfil3()); } else if ("P3T".equals(perfilUpper)) { ArrayOfCNPJPerfil3 p = infoconv.consultarCNPJSoap.consultarCNPJP3T(listaCNPJs, CPF_CONSULTANTE); lista.addAll(p.getCNPJPerfil3()); } else { throw new PerfilInvalidoException(); } verificarErros(lista.get(0)); return lista; } /** * Consulta o webservice do infoconv ConsultarCNPJSoap/ConsultarCNPJP1 * * @param listaCNPJs * @return * @throws AcessoNegadoException * @throws CpfNaoEncontradoException * @throws DadosInvalidosException * @throws InfraException */ public List<Perfil1CNPJ> listarPerfil1(String listaCNPJs) throws AcessoNegadoException, CNPJNaoEncontradoException, DadosInvalidosException, InfraException{ ArrayOfCNPJPerfil1 result = infoconv.consultarCNPJSoap.consultarCNPJP1(listaCNPJs, CPF_CONSULTANTE); verificarErros(result.getCNPJPerfil1().get(0)); List<Perfil1CNPJ> lista = new ArrayList<Perfil1CNPJ>(); for (CNPJPerfil1 perfil1 : result.getCNPJPerfil1()) { lista.add(new Perfil1CNPJ(perfil1)); } return lista; } /** * Consulta o webservice do infoconv ConsultarCNPJSoap/ConsultarCNPJP2 * * @param listaCNPJs * @return * @throws AcessoNegadoException * @throws CpfNaoEncontradoException * @throws DadosInvalidosException * @throws InfraException */ public List<Perfil2CNPJ> listarPerfil2(String listaCNPJs) throws AcessoNegadoException, CNPJNaoEncontradoException, DadosInvalidosException, InfraException{ ArrayOfCNPJPerfil2 result = infoconv.consultarCNPJSoap.consultarCNPJP2(listaCNPJs, CPF_CONSULTANTE); verificarErros(result.getCNPJPerfil2().get(0)); List<Perfil2CNPJ> lista = new ArrayList<Perfil2CNPJ>(); for (CNPJPerfil2 perfil1 : result.getCNPJPerfil2()) { lista.add(new Perfil2CNPJ(perfil1)); } return lista; } /** * Consulta o webservice do infoconv ConsultarCNPJSoap/ConsultarCNPJP3 * * @param listaCNPJs * @return * @throws AcessoNegadoException * @throws CpfNaoEncontradoException * @throws DadosInvalidosException * @throws InfraException */ public List<Perfil3CNPJ> listarPerfil3(String listaCNPJs) throws AcessoNegadoException, CNPJNaoEncontradoException, DadosInvalidosException, InfraException{ ArrayOfCNPJPerfil3 result = infoconv.consultarCNPJSoap.consultarCNPJP3(listaCNPJs, CPF_CONSULTANTE); verificarErros(result.getCNPJPerfil3().get(0)); List<Perfil3CNPJ> lista = new ArrayList<Perfil3CNPJ>(); for (CNPJPerfil3 perfil1 : result.getCNPJPerfil3()) { lista.add(new Perfil3CNPJ(perfil1)); } return lista; } }
Java
//------------------------------------------------------------------------------ // <auto-generated> // Dieser Code wurde von einem Tool generiert. // Laufzeitversion:4.0.30319.18052 // // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn // der Code erneut generiert wird. // </auto-generated> //------------------------------------------------------------------------------ namespace ClickBot.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
Java
/* * This file is part of Codecrypt. * * Copyright (C) 2013-2016 Mirek Kratochvil <exa.exa@gmail.com> * * Codecrypt 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. * * Codecrypt 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 Codecrypt. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _ccr_algorithm_h_ #define _ccr_algorithm_h_ #include "algo_suite.h" #include "bvector.h" #include "prng.h" #include "sencode.h" /* * virtual interface definition for all cryptographic algorithm instances. * * Note that the whole class could be defined static, but we really enjoy * having the tiny virtual pointers stored in some cool structure along with * the handy algorithm name. */ class algorithm { public: virtual bool provides_signatures() = 0; virtual bool provides_encryption() = 0; virtual std::string get_alg_id() = 0; void register_into_suite (algorithm_suite&s) { s[this->get_alg_id()] = this; } /* * note that these functions should be ready for different * plaintext/ciphertext/message lengths, usually padding them somehow. */ virtual int encrypt (const bvector&plain, bvector&cipher, sencode* pubkey, prng&rng) { return -1; } virtual int decrypt (const bvector&cipher, bvector&plain, sencode* privkey) { return -1; } virtual int sign (const bvector&msg, bvector&sig, sencode** privkey, bool&dirty, prng&rng) { return -1; } virtual int verify (const bvector&sig, const bvector&msg, sencode* pubkey) { return -1; } virtual int create_keypair (sencode**pub, sencode**priv, prng&rng) { return -1; } }; #endif
Java
/** * This file is part of the CRISTAL-iSE kernel. * Copyright (c) 2001-2015 The CRISTAL Consortium. 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 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.lifecycle.instance.stateMachine; import lombok.Getter; import lombok.Setter; @Getter @Setter public class TransitionQuery { /** * Name & version of the query to be run by the agent during this transition */ String name, version; public TransitionQuery() {} public TransitionQuery(String n, String v) { name = n; version = v; } }
Java
<?php namespace rocket\si\content\impl\iframe; use n2n\util\type\attrs\DataSet; use n2n\util\type\ArgUtils; use rocket\si\content\impl\InSiFieldAdapter; class IframeInSiField extends InSiFieldAdapter { private $iframeData; private $params = []; public function __construct(IframeData $iframeData) { $this->iframeData = $iframeData; } /** * @return string */ function getType(): string { return 'iframe-in'; } /** * @return array */ function getParams(): array { return $this->params; } /** * @param array $params * @return IframeInSiField */ function setParams(array $params) { ArgUtils::valArray($params, ['scalar', 'null']); $this->params = $params; return $this; } /** * {@inheritDoc} * @see \rocket\si\content\SiField::getData() */ function getData(): array { $data = $this->iframeData->toArray(); $data['params'] = $this->getParams(); $data['messages'] = $this->getMessageStrs(); return $data; } /** * {@inheritDoc} * @see \rocket\si\content\SiField::handleInput() */ function handleInput(array $data) { $ds = new DataSet($data); $this->params = $ds->reqScalarArray('params', false, true); } }
Java
using System.Collections; using System.Linq; using System.Reflection; namespace System.ComponentModel.DataAnnotations { public class EnsureNoDuplicatesAttribute : ValidationAttribute { public EnsureNoDuplicatesAttribute(Type type, string comparassionMethodName) { this.type = type; method = type.GetMethod(comparassionMethodName, BindingFlags.Static | BindingFlags.Public); if (method != null) { if (method.ReturnType == typeof(bool)) { var pars = method.GetParameters(); if (pars.Count() != 2) throw new ArgumentException($"Method '{comparassionMethodName}' in type '{type.Name}' specified for this '{nameof(EnsureNoDuplicatesAttribute)}' must has 2 parameters. Both of them must be of type of property."); } else throw new ArgumentException($"Method '{comparassionMethodName}' in type '{type.Name}' specified for this '{nameof(EnsureNoDuplicatesAttribute)}' must return 'bool'."); } else throw new ArgumentException($"Method '{comparassionMethodName}' in type '{type.Name}' specified for this '{nameof(EnsureNoDuplicatesAttribute)}' was not found. This method must be public and static."); } Type type; MethodInfo? method; string? lastDuplicateValue; public override string FormatErrorMessage(string name) { return string.Format(ErrorMessageString, name, lastDuplicateValue); } public override bool IsValid(object? value) { if (value is IList list) { if (list.Count < 2) return true; for (int i = 1; i < list.Count; i++) { if ((bool?)method?.Invoke(null, new[] { list[i - 1], list[i] }) ?? false) { lastDuplicateValue = list[i]?.ToString(); return false; } } return true; } return false; } //public override bool RequiresValidationContext => true; //protected override ValidationResult IsValid(object value, ValidationContext context) //{ // if (value is IList list) // { // if (list.Count < 2) return ValidationResult.Success; // for (int i = 1; i < list.Count; i++) // { // if ((bool)method.Invoke(null, new[] { list[i - 1], list[i] })) // { // lastDuplicateValue = list[i].ToString(); // return new ValidationResult(string.Format(ErrorMessageString, context.DisplayName, list[i])); // } // } // return ValidationResult.Success; // } // return new ValidationResult("Value isn't IList"); //} } }
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Henon Map</title> <style type="text/css"> h1 {text-align: center} </style> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta name="author" content="Mark Hale"> </head> <body> <h1>Henon Map</h1> <div align="center"> <object codetype="application/java" classid="java:HenonPlot.class" width=400 height=400> <param name="code" value="HenonPlot.class"> <param name="type" value="application/x-java-applet;version=1.3"> </object> </div> </body> </html> 
Java
#include "NodoTipo.h" NodoTipo::NodoTipo(Tipo* obj) { setTipo(obj); setDer(NULL); setIzq(NULL); _listaISBN = new ListaISBN(); } NodoTipo*&NodoTipo::getIzq() { return _izq; } void NodoTipo::setIzq(NodoTipo* _izq) { this->_izq = _izq; } NodoTipo*& NodoTipo::getDer() { return _der; } void NodoTipo::setDer(NodoTipo* _der) { this->_der = _der; } Tipo* NodoTipo::getTipo()const { return _Tipo; } void NodoTipo::setTipo(Tipo* _Tipo) { this->_Tipo = _Tipo; } NodoTipo::~NodoTipo() { _listaISBN->destruir(); delete _listaISBN; delete _Tipo; } ListaISBN* NodoTipo::getListaISBN(){ return _listaISBN; } void NodoTipo::setListaISBN(ListaISBN* l){ _listaISBN = l; } void NodoTipo::agregarISBN(int isbn){ _listaISBN->Inserta(isbn); } bool NodoTipo::borrarISBN(int isbn){ return _listaISBN->borrar(isbn); } void NodoTipo::destruirISBN(){ _listaISBN->destruir(); } string NodoTipo::MostrarListaISBN(){ return _listaISBN->toString(); }
Java
#!/bin/bash # # RktCopyHosts # # Function: RktCopyHosts # Params: $1 - Host's '/etc/hosts' location # $2 - Container's '/etc/hosts' location # Output: (Normal acbuild output) function RktCopyHosts { local HOSTS="/etc/hosts" local RKT_HOSTS="/etc/hosts" if [ "${1}" != "" ]; then HOSTS="${1}" fi if [ "${2}" != "" ]; then RKT_HOSTS="${2}" fi sudo ${ACBUILD} copy "${HOSTS}" "${RKT_HOSTS}" if [ "${?}" != "0" ]; then Error "Rkt_CopyHosts: Failed to copy '${HOSTS}' to 'rkt:${RKT_HOSTS}'." return 1 fi return 0 } # vim: tabstop=4 shiftwidth=4
Java
// -*- Mode:C++ -*- /************************************************************************\ * * * This file is part of Avango. * * * * Copyright 1997 - 2008 Fraunhofer-Gesellschaft zur Foerderung der * * angewandten Forschung (FhG), Munich, Germany. * * * * Avango 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. * * * * Avango 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 Lesser General Public * * License along with Avango. If not, see <http://www.gnu.org/licenses/>. * * * * Avango is a trademark owned by FhG. * * * \************************************************************************/ #ifndef AV_PYTHON_OSG_SHADER #define AV_PYTHON_OSG_SHADER void init_OSGShader(void); #endif
Java
<?php /**************************************************************************** * Name: quiverext.php * * 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;$i<count($r);$i++){ $FIELDTYPE=$r[$i]["FIELDTYPE"]; $TABLEREF=""; $NOTEMPTY=false; if(substr($FIELDTYPE,0,5)=="SYSID"){ $TABLEREF=substr($FIELDTYPE, 6, -1); if(substr($TABLEREF,0,1)=="#"){ $NOTEMPTY=true; $TABLEREF=substr($TABLEREF,1); } } $infos[$i]["FIELDNAME"]=$r[$i]["FIELDNAME"]; $infos[$i]["FIELDTYPE"]=$FIELDTYPE; $infos[$i]["FORMULA"]=$r[$i]["FORMULA"]; $infos[$i]["WRITABLE"]=intval($r[$i]["WRITABLE"]); $infos[$i]["TABLEREF"]=$TABLEREF; $infos[$i]["NOTEMPTY"]=$NOTEMPTY; } // INSERISCO LE INFO NELLA CACHE $global_cache["$tableviews-$TYPOLOGYID"]=$infos; } if(count($infos)>0 || $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<count($infos);$i++){ $FIELDNAME=$infos[$i]["FIELDNAME"]; $FIELDTYPE=$infos[$i]["FIELDTYPE"]; $FORMULA=$infos[$i]["FORMULA"]; $WRITABLE=$infos[$i]["WRITABLE"]; $TABLEREF=$infos[$i]["TABLEREF"]; $NOTEMPTY=$infos[$i]["NOTEMPTY"]; if($WRITABLE){ // IL CAMPO PUO' ESSERE AGGIORNATO // DETERMINO IL NOME DEL CAMPO if($FORMULA=="") $ACTUALNAME=$FIELDNAME; else $ACTUALNAME=str_replace("$TABLENAME.", "", $FORMULA); // DETERMINO IL VALORE DEL CAMPO if(isset($data[$ACTUALNAME])){ // FORMATTAZIONE IN BASE AL TIPO if($TABLEREF!=""){ // SYSID(Tabella referenziata) $value=ryqEscapize($data[$ACTUALNAME]); if($value!=""){ // Controllo che esista l'oggetto con SYSID=$value nella tabella $TABLEREF qv_linkable($maestro, $TABLEREF, $value); } elseif($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="'$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) ); } } } } } ?>
Java
/* * SupplyTask.h - Tasks issued to SupplyManager. Basically, just * produce Supply Depots while nearing capacity. */ #pragma once #include "Task.h" class BuildTask: public Task { };
Java
# -*- coding: utf-8 -*- # Copyright(C) 2014 smurail # # This file is part of a weboob module. # # This weboob module 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. # # This weboob module 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 weboob module. If not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals import re from weboob.exceptions import BrowserIncorrectPassword from weboob.browser.pages import HTMLPage, JsonPage, pagination, LoggedPage from weboob.browser.elements import ListElement, ItemElement, TableElement, method from weboob.browser.filters.standard import CleanText, CleanDecimal, DateGuesser, Env, Field, Filter, Regexp, Currency, Date from weboob.browser.filters.html import Link, Attr, TableCell from weboob.capabilities.bank import Account, Investment from weboob.capabilities.base import NotAvailable from weboob.tools.capabilities.bank.transactions import FrenchTransaction from weboob.tools.compat import urljoin from weboob.tools.capabilities.bank.investments import is_isin_valid __all__ = ['LoginPage'] class UselessPage(HTMLPage): pass class PasswordCreationPage(HTMLPage): def get_message(self): xpath = '//div[@class="bienvenueMdp"]/following-sibling::div' return '%s%s' % (CleanText(xpath + '/strong')(self.doc), CleanText(xpath, children=False)(self.doc)) class ErrorPage(HTMLPage): pass class SubscriptionPage(LoggedPage, JsonPage): pass class LoginPage(HTMLPage): pass class CMSOPage(HTMLPage): @property def logged(self): if len(self.doc.xpath('//b[text()="Session interrompue"]')) > 0: return False return True class AccountsPage(CMSOPage): TYPES = {'COMPTE CHEQUES': Account.TYPE_CHECKING, 'COMPTE TITRES': Account.TYPE_MARKET, "ACTIV'EPARGNE": Account.TYPE_SAVINGS, "TRESO'VIV": Account.TYPE_SAVINGS, } @method class iter_accounts(ListElement): item_xpath = '//div[has-class("groupe-comptes")]//li' class item(ItemElement): klass = Account class Type(Filter): def filter(self, label): for pattern, actype in AccountsPage.TYPES.items(): if label.startswith(pattern): return actype return Account.TYPE_UNKNOWN obj__history_url = Link('.//a[1]') obj_id = CleanText('.//span[has-class("numero-compte")]') & Regexp(pattern=r'(\d{3,}[\w]+)', default='') obj_label = CleanText('.//span[has-class("libelle")][1]') obj_currency = Currency('//span[has-class("montant")]') obj_balance = CleanDecimal('.//span[has-class("montant")]', replace_dots=True) obj_type = Type(Field('label')) # Last numbers replaced with XX... or we have to send sms to get RIB. obj_iban = NotAvailable # some accounts may appear on multiple areas, but the area where they come from is indicated obj__owner = CleanText('(./preceding-sibling::tr[@class="LnMnTiers"])[last()]') def validate(self, obj): if obj.id is None: obj.id = obj.label.replace(' ', '') return True def on_load(self): if self.doc.xpath('//p[contains(text(), "incident technique")]'): raise BrowserIncorrectPassword("Vous n'avez aucun compte sur cet espace. " \ "Veuillez choisir un autre type de compte.") class InvestmentPage(CMSOPage): def has_error(self): return CleanText('//span[@id="id_error_msg"]')(self.doc) @method class iter_accounts(ListElement): item_xpath = '//table[@class="Tb" and tr[1][@class="LnTit"]]/tr[@class="LnA" or @class="LnB"]' class item(ItemElement): klass = Account def obj_id(self): area_id = Regexp(CleanText('(./preceding-sibling::tr[@class="LnMnTiers"][1])//span[@class="CelMnTiersT1"]'), r'\((\d+)\)', default='')(self) acc_id = Regexp(CleanText('./td[1]'), r'(\d+)\s*(\d+)', r'\1\2')(self) if area_id: return '%s.%s' % (area_id, acc_id) return acc_id def obj__formdata(self): js = Attr('./td/a[1]', 'onclick', default=None)(self) if js is None: return args = re.search(r'\((.*)\)', js).group(1).split(',') form = args[0].strip().split('.')[1] idx = args[2].strip() idroot = args[4].strip().replace("'", "") return (form, idx, idroot) obj_url = Link('./td/a[1]', default=None) def go_account(self, form, idx, idroot): form = self.get_form(name=form) form['indiceCompte'] = idx form['idRacine'] = idroot form.submit() class CmsoTableElement(TableElement): head_xpath = '//table[has-class("Tb")]/tr[has-class("LnTit")]/td' item_xpath = '//table[has-class("Tb")]/tr[has-class("LnA") or has-class("LnB")]' class InvestmentAccountPage(CMSOPage): @method class iter_investments(CmsoTableElement): col_label = 'Valeur' col_code = 'Code' col_quantity = 'Qté' col_unitvalue = 'Cours' col_valuation = 'Valorisation' col_vdate = 'Date cours' class item(ItemElement): klass = Investment obj_label = CleanText(TableCell('label')) obj_quantity = CleanDecimal(TableCell('quantity'), replace_dots=True) obj_unitvalue = CleanDecimal(TableCell('unitvalue'), replace_dots=True) obj_valuation = CleanDecimal(TableCell('valuation'), replace_dots=True) obj_vdate = Date(CleanText(TableCell('vdate')), dayfirst=True, default=NotAvailable) def obj_code(self): if Field('label')(self) == "LIQUIDITES": return 'XX-liquidity' code = CleanText(TableCell('code'))(self) return code if is_isin_valid(code) else NotAvailable def obj_code_type(self): return Investment.CODE_TYPE_ISIN if is_isin_valid(Field('code')(self)) else NotAvailable class Transaction(FrenchTransaction): PATTERNS = [(re.compile(r'^RET DAB (?P<dd>\d{2})/?(?P<mm>\d{2})(/?(?P<yy>\d{2}))? (?P<text>.*)'), FrenchTransaction.TYPE_WITHDRAWAL), (re.compile(r'CARTE (?P<dd>\d{2})/(?P<mm>\d{2}) (?P<text>.*)'), FrenchTransaction.TYPE_CARD), (re.compile(r'^(?P<category>VIR(EMEN)?T? (SEPA)?(RECU|FAVEUR)?)( /FRM)?(?P<text>.*)'), FrenchTransaction.TYPE_TRANSFER), (re.compile(r'^PRLV (?P<text>.*)( \d+)?$'), FrenchTransaction.TYPE_ORDER), (re.compile(r'^(CHQ|CHEQUE) .*$'), FrenchTransaction.TYPE_CHECK), (re.compile(r'^(AGIOS /|FRAIS) (?P<text>.*)'), FrenchTransaction.TYPE_BANK), (re.compile(r'^(CONVENTION \d+ |F )?COTIS(ATION)? (?P<text>.*)'), FrenchTransaction.TYPE_BANK), (re.compile(r'^REMISE (?P<text>.*)'), FrenchTransaction.TYPE_DEPOSIT), (re.compile(r'^(?P<text>.*)( \d+)? QUITTANCE .*'), FrenchTransaction.TYPE_ORDER), (re.compile(r'^.* LE (?P<dd>\d{2})/(?P<mm>\d{2})/(?P<yy>\d{2})$'), FrenchTransaction.TYPE_UNKNOWN), (re.compile(r'^.* PAIEMENT (?P<dd>\d{2})/(?P<mm>\d{2}) (?P<text>.*)'), FrenchTransaction.TYPE_UNKNOWN), ] class CmsoTransactionElement(ItemElement): klass = Transaction def condition(self): return len(self.el) >= 5 and not self.el.get('id', '').startswith('libelleLong') class HistoryPage(CMSOPage): def get_date_range_list(self): return [d for d in self.doc.xpath('//select[@name="date"]/option/@value') if d] @pagination @method class iter_history(ListElement): item_xpath = '//div[contains(@class, "master-table")]//ul/li' def next_page(self): pager = self.page.doc.xpath('//div[@class="pager"]') if pager: # more than one page if only enough transactions assert len(pager) == 1 next_links = pager[0].xpath('./span/following-sibling::a[@class="page"]') if next_links: url_next_page = Link('.')(next_links[0]) url_next_page = urljoin(self.page.url, url_next_page) return self.page.browser.build_request(url_next_page) class item(CmsoTransactionElement): def date(selector): return DateGuesser(Regexp(CleanText(selector), r'\w+ (\d{2}/\d{2})'), Env('date_guesser')) | Transaction.Date(selector) # CAUTION: this website write a 'Date valeur' inside a div with a class == 'c-ope' # and a 'Date opération' inside a div with a class == 'c-val' # so actually i assume 'c-val' class is the real operation date and 'c-ope' is value date obj_date = date('./div[contains(@class, "c-val")]') obj_vdate = date('./div[contains(@class, "c-ope")]') obj_raw = Transaction.Raw(Regexp(CleanText('./div[contains(@class, "c-libelle-long")]'), r'Libellé étendu (.+)')) obj_amount = Transaction.Amount('./div[contains(@class, "c-credit")]', './div[contains(@class, "c-debit")]') class UpdateTokenMixin(object): def on_load(self): if 'Authentication' in self.response.headers: self.browser.token = self.response.headers['Authentication'].split(' ')[-1] class SSODomiPage(JsonPage, UpdateTokenMixin): def get_sso_url(self): return self.doc['urlSSO'] class AuthCheckUser(HTMLPage): pass
Java
// Created file "Lib\src\Uuid\tapi3if_i" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(IID_ITStreamControl, 0xee3bd604, 0x3868, 0x11d2, 0xa0, 0x45, 0x00, 0xc0, 0x4f, 0xb6, 0x80, 0x9f);
Java
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Sigfox lib")] [assembly: AssemblyDescription("RPi Sigfox shield support library")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Pospa.NET")] [assembly: AssemblyProduct("Sigfox lib")] [assembly: AssemblyCopyright("Copyright © Pospa.NET 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)]
Java
// Copyright 2016 Canonical Ltd. // Licensed under the LGPLv3, see LICENCE file for details. package gomaasapi import "github.com/juju/utils/set" const ( // Capability constants. NetworksManagement = "networks-management" StaticIPAddresses = "static-ipaddresses" IPv6DeploymentUbuntu = "ipv6-deployment-ubuntu" DevicesManagement = "devices-management" StorageDeploymentUbuntu = "storage-deployment-ubuntu" NetworkDeploymentUbuntu = "network-deployment-ubuntu" ) // Controller represents an API connection to a MAAS Controller. Since the API // is restful, there is no long held connection to the API server, but instead // HTTP calls are made and JSON response structures parsed. type Controller interface { // Capabilities returns a set of capabilities as defined by the string // constants. Capabilities() set.Strings BootResources() ([]BootResource, error) // Fabrics returns the list of Fabrics defined in the MAAS controller. Fabrics() ([]Fabric, error) // Spaces returns the list of Spaces defined in the MAAS controller. Spaces() ([]Space, error) // Zones lists all the zones known to the MAAS controller. Zones() ([]Zone, error) // Machines returns a list of machines that match the params. Machines(MachinesArgs) ([]Machine, error) // AllocateMachine will attempt to allocate a machine to the user. // If successful, the allocated machine is returned. AllocateMachine(AllocateMachineArgs) (Machine, ConstraintMatches, error) // ReleaseMachines will stop the specified machines, and release them // from the user making them available to be allocated again. ReleaseMachines(ReleaseMachinesArgs) error // Devices returns a list of devices that match the params. Devices(DevicesArgs) ([]Device, error) // CreateDevice creates and returns a new Device. CreateDevice(CreateDeviceArgs) (Device, error) // Files returns all the files that match the specified prefix. Files(prefix string) ([]File, error) // Return a single file by its filename. GetFile(filename string) (File, error) // AddFile adds or replaces the content of the specified filename. // If or when the MAAS api is able to return metadata about a single // file without sending the content of the file, we can return a File // instance here too. AddFile(AddFileArgs) error } // File represents a file stored in the MAAS controller. type File interface { // Filename is the name of the file. No path, just the filename. Filename() string // AnonymousURL is a URL that can be used to retrieve the conents of the // file without credentials. AnonymousURL() string // Delete removes the file from the MAAS controller. Delete() error // ReadAll returns the content of the file. ReadAll() ([]byte, error) } // Fabric represents a set of interconnected VLANs that are capable of mutual // communication. A fabric can be thought of as a logical grouping in which // VLANs can be considered unique. // // For example, a distributed network may have a fabric in London containing // VLAN 100, while a separate fabric in San Francisco may contain a VLAN 100, // whose attached subnets are completely different and unrelated. type Fabric interface { ID() int Name() string ClassType() string VLANs() []VLAN } // VLAN represents an instance of a Virtual LAN. VLANs are a common way to // create logically separate networks using the same physical infrastructure. // // Managed switches can assign VLANs to each port in either a “tagged” or an // “untagged” manner. A VLAN is said to be “untagged” on a particular port when // it is the default VLAN for that port, and requires no special configuration // in order to access. // // “Tagged” VLANs (traditionally used by network administrators in order to // aggregate multiple networks over inter-switch “trunk” lines) can also be used // with nodes in MAAS. That is, if a switch port is configured such that // “tagged” VLAN frames can be sent and received by a MAAS node, that MAAS node // can be configured to automatically bring up VLAN interfaces, so that the // deployed node can make use of them. // // A “Default VLAN” is created for every Fabric, to which every new VLAN-aware // object in the fabric will be associated to by default (unless otherwise // specified). type VLAN interface { ID() int Name() string Fabric() string // VID is the VLAN ID. eth0.10 -> VID = 10. VID() int // MTU (maximum transmission unit) is the largest size packet or frame, // specified in octets (eight-bit bytes), that can be sent. MTU() int DHCP() bool PrimaryRack() string SecondaryRack() string } // Zone represents a physical zone that a Machine is in. The meaning of a // physical zone is up to you: it could identify e.g. a server rack, a network, // or a data centre. Users can then allocate nodes from specific physical zones, // to suit their redundancy or performance requirements. type Zone interface { Name() string Description() string } // BootResource is the bomb... find something to say here. type BootResource interface { ID() int Name() string Type() string Architecture() string SubArchitectures() set.Strings KernelFlavor() string } // Device represents some form of device in MAAS. type Device interface { // TODO: add domain SystemID() string Hostname() string FQDN() string IPAddresses() []string Zone() Zone // Parent returns the SystemID of the Parent. Most often this will be a // Machine. Parent() string // Owner is the username of the user that created the device. Owner() string // InterfaceSet returns all the interfaces for the Device. InterfaceSet() []Interface // CreateInterface will create a physical interface for this machine. CreateInterface(CreateInterfaceArgs) (Interface, error) // Delete will remove this Device. Delete() error } // Machine represents a physical machine. type Machine interface { SystemID() string Hostname() string FQDN() string Tags() []string OperatingSystem() string DistroSeries() string Architecture() string Memory() int CPUCount() int IPAddresses() []string PowerState() string // Devices returns a list of devices that match the params and have // this Machine as the parent. Devices(DevicesArgs) ([]Device, error) // Consider bundling the status values into a single struct. // but need to check for consistent representation if exposed on other // entities. StatusName() string StatusMessage() string // BootInterface returns the interface that was used to boot the Machine. BootInterface() Interface // InterfaceSet returns all the interfaces for the Machine. InterfaceSet() []Interface // Interface returns the interface for the machine that matches the id // specified. If there is no match, nil is returned. Interface(id int) Interface // PhysicalBlockDevices returns all the physical block devices on the machine. PhysicalBlockDevices() []BlockDevice // PhysicalBlockDevice returns the physical block device for the machine // that matches the id specified. If there is no match, nil is returned. PhysicalBlockDevice(id int) BlockDevice // BlockDevices returns all the physical and virtual block devices on the machine. BlockDevices() []BlockDevice Zone() Zone // Start the machine and install the operating system specified in the args. Start(StartArgs) error // CreateDevice creates a new Device with this Machine as the parent. // The device will have one interface that is linked to the specified subnet. CreateDevice(CreateMachineDeviceArgs) (Device, error) } // Space is a name for a collection of Subnets. type Space interface { ID() int Name() string Subnets() []Subnet } // Subnet refers to an IP range on a VLAN. type Subnet interface { ID() int Name() string Space() string VLAN() VLAN Gateway() string CIDR() string // dns_mode // DNSServers is a list of ip addresses of the DNS servers for the subnet. // This list may be empty. DNSServers() []string } // Interface represents a physical or virtual network interface on a Machine. type Interface interface { ID() int Name() string // The parents of an interface are the names of interfaces that must exist // for this interface to exist. For example a parent of "eth0.100" would be // "eth0". Parents may be empty. Parents() []string // The children interfaces are the names of those that are dependent on this // interface existing. Children may be empty. Children() []string Type() string Enabled() bool Tags() []string VLAN() VLAN Links() []Link MACAddress() string EffectiveMTU() int // Params is a JSON field, and defaults to an empty string, but is almost // always a JSON object in practice. Gleefully ignoring it until we need it. // Update the name, mac address or VLAN. Update(UpdateInterfaceArgs) error // Delete this interface. Delete() error // LinkSubnet will attempt to make this interface available on the specified // Subnet. LinkSubnet(LinkSubnetArgs) error // UnlinkSubnet will remove the Link to the subnet, and release the IP // address associated if there is one. UnlinkSubnet(Subnet) error } // Link represents a network link between an Interface and a Subnet. type Link interface { ID() int Mode() string Subnet() Subnet // IPAddress returns the address if one has been assigned. // If unavailble, the address will be empty. IPAddress() string } // FileSystem represents a formatted filesystem mounted at a location. type FileSystem interface { // Type is the format type, e.g. "ext4". Type() string MountPoint() string Label() string UUID() string } // Partition represents a partition of a block device. It may be mounted // as a filesystem. type Partition interface { ID() int Path() string // FileSystem may be nil if not mounted. FileSystem() FileSystem UUID() string // UsedFor is a human readable string. UsedFor() string // Size is the number of bytes in the partition. Size() uint64 } // BlockDevice represents an entire block device on the machine. type BlockDevice interface { ID() int Name() string Model() string Path() string UsedFor() string Tags() []string BlockSize() uint64 UsedSize() uint64 Size() uint64 Partitions() []Partition // There are some other attributes for block devices, but we can // expose them on an as needed basis. }
Java
/*+@@file@@----------------------------------------------------------------*//*! \file MMCObj.h \par Description Extension and update of headers for PellesC compiler suite. \par Project: PellesC Headers extension \date Created on Sun Aug 7 22:15:35 2016 \date Modified on Sun Aug 7 22:15:35 2016 \author frankie \*//*-@@file@@----------------------------------------------------------------*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 500 #endif #ifndef __REQUIRED_RPCSAL_H_VERSION__ #define __REQUIRED_RPCSAL_H_VERSION__ 100 #endif #include <rpc.h> #include <rpcndr.h> #ifndef __RPCNDR_H_VERSION__ #error this stub requires an updated version of <rpcndr.h> #endif #ifndef COM_NO_WINDOWS_H #include <windows.h> #include <ole2.h> #endif #ifndef __mmcobj_h__ #define __mmcobj_h__ #if __POCC__ >= 500 #pragma once #endif #ifndef __ISnapinProperties_FWD_DEFINED__ #define __ISnapinProperties_FWD_DEFINED__ typedef interface ISnapinProperties ISnapinProperties; #endif #ifndef __ISnapinPropertiesCallback_FWD_DEFINED__ #define __ISnapinPropertiesCallback_FWD_DEFINED__ typedef interface ISnapinPropertiesCallback ISnapinPropertiesCallback; #endif #ifndef ___Application_FWD_DEFINED__ #define ___Application_FWD_DEFINED__ typedef interface _Application _Application; #endif #ifndef ___AppEvents_FWD_DEFINED__ #define ___AppEvents_FWD_DEFINED__ typedef interface _AppEvents _AppEvents; #endif #ifndef __AppEvents_FWD_DEFINED__ #define __AppEvents_FWD_DEFINED__ typedef interface AppEvents AppEvents; #endif #ifndef __Application_FWD_DEFINED__ #define __Application_FWD_DEFINED__ typedef struct Application Application; #endif #ifndef ___EventConnector_FWD_DEFINED__ #define ___EventConnector_FWD_DEFINED__ typedef interface _EventConnector _EventConnector; #endif #ifndef __AppEventsDHTMLConnector_FWD_DEFINED__ #define __AppEventsDHTMLConnector_FWD_DEFINED__ typedef struct AppEventsDHTMLConnector AppEventsDHTMLConnector; #endif #ifndef __Frame_FWD_DEFINED__ #define __Frame_FWD_DEFINED__ typedef interface Frame Frame; #endif #ifndef __Node_FWD_DEFINED__ #define __Node_FWD_DEFINED__ typedef interface Node Node; #endif #ifndef __ScopeNamespace_FWD_DEFINED__ #define __ScopeNamespace_FWD_DEFINED__ typedef interface ScopeNamespace ScopeNamespace; #endif #ifndef __Document_FWD_DEFINED__ #define __Document_FWD_DEFINED__ typedef interface Document Document; #endif #ifndef __SnapIn_FWD_DEFINED__ #define __SnapIn_FWD_DEFINED__ typedef interface SnapIn SnapIn; #endif #ifndef __SnapIns_FWD_DEFINED__ #define __SnapIns_FWD_DEFINED__ typedef interface SnapIns SnapIns; #endif #ifndef __Extension_FWD_DEFINED__ #define __Extension_FWD_DEFINED__ typedef interface Extension Extension; #endif #ifndef __Extensions_FWD_DEFINED__ #define __Extensions_FWD_DEFINED__ typedef interface Extensions Extensions; #endif #ifndef __Columns_FWD_DEFINED__ #define __Columns_FWD_DEFINED__ typedef interface Columns Columns; #endif #ifndef __Column_FWD_DEFINED__ #define __Column_FWD_DEFINED__ typedef interface Column Column; #endif #ifndef __Views_FWD_DEFINED__ #define __Views_FWD_DEFINED__ typedef interface Views Views; #endif #ifndef __View_FWD_DEFINED__ #define __View_FWD_DEFINED__ typedef interface View View; #endif #ifndef __Nodes_FWD_DEFINED__ #define __Nodes_FWD_DEFINED__ typedef interface Nodes Nodes; #endif #ifndef __ContextMenu_FWD_DEFINED__ #define __ContextMenu_FWD_DEFINED__ typedef interface ContextMenu ContextMenu; #endif #ifndef __MenuItem_FWD_DEFINED__ #define __MenuItem_FWD_DEFINED__ typedef interface MenuItem MenuItem; #endif #ifndef __Properties_FWD_DEFINED__ #define __Properties_FWD_DEFINED__ typedef interface Properties Properties; #endif #ifndef __Property_FWD_DEFINED__ #define __Property_FWD_DEFINED__ typedef interface Property Property; #endif #include <oaidl.h> #ifndef MMC_VER #define MMC_VER 0x0200 #endif #if (MMC_VER >= 0x0200) typedef _Application *PAPPLICATION; typedef _Application **PPAPPLICATION; typedef Column *PCOLUMN; typedef Column **PPCOLUMN; typedef Columns *PCOLUMNS; typedef Columns **PPCOLUMNS; typedef ContextMenu *PCONTEXTMENU; typedef ContextMenu **PPCONTEXTMENU; typedef Document *PDOCUMENT; typedef Document **PPDOCUMENT; typedef Frame *PFRAME; typedef Frame **PPFRAME; typedef MenuItem *PMENUITEM; typedef MenuItem **PPMENUITEM; typedef Node *PNODE; typedef Node **PPNODE; typedef Nodes *PNODES; typedef Nodes **PPNODES; typedef Properties *PPROPERTIES; typedef Properties **PPPROPERTIES; typedef Property *PPROPERTY; typedef Property **PPPROPERTY; typedef ScopeNamespace *PSCOPENAMESPACE; typedef ScopeNamespace **PPSCOPENAMESPACE; typedef SnapIn *PSNAPIN; typedef SnapIn **PPSNAPIN; typedef SnapIns *PSNAPINS; typedef SnapIns **PPSNAPINS; typedef Extension *PEXTENSION; typedef Extension **PPEXTENSION; typedef Extensions *PEXTENSIONS; typedef Extensions **PPEXTENSIONS; typedef View *PVIEW; typedef View **PPVIEW; typedef Views *PVIEWS; typedef Views **PPVIEWS; typedef ISnapinProperties *LPSNAPINPROPERTIES; typedef ISnapinPropertiesCallback *LPSNAPINPROPERTIESCALLBACK; typedef BOOL *PBOOL; typedef int *PINT; typedef BSTR *PBSTR; typedef VARIANT *PVARIANT; typedef long *PLONG; typedef IDispatch *PDISPATCH; typedef IDispatch **PPDISPATCH; extern RPC_IF_HANDLE __MIDL_itf_mmcobj_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_mmcobj_0000_0000_v0_0_s_ifspec; #ifndef __ISnapinProperties_INTERFACE_DEFINED__ #define __ISnapinProperties_INTERFACE_DEFINED__ typedef enum _MMC_PROPERTY_ACTION { MMC_PROPACT_DELETING = 1, MMC_PROPACT_CHANGING = (MMC_PROPACT_DELETING + 1), MMC_PROPACT_INITIALIZED = (MMC_PROPACT_CHANGING + 1) } MMC_PROPERTY_ACTION; typedef struct _MMC_SNAPIN_PROPERTY { LPCOLESTR pszPropName; VARIANT varValue; MMC_PROPERTY_ACTION eAction; } MMC_SNAPIN_PROPERTY; extern const IID IID_ISnapinProperties; typedef struct ISnapinPropertiesVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (ISnapinProperties * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (ISnapinProperties * This); ULONG(STDMETHODCALLTYPE * Release) (ISnapinProperties * This); HRESULT(STDMETHODCALLTYPE * Initialize) (ISnapinProperties * This, Properties * pProperties); HRESULT(STDMETHODCALLTYPE * QueryPropertyNames) (ISnapinProperties * This, ISnapinPropertiesCallback * pCallback); HRESULT(STDMETHODCALLTYPE * PropertiesChanged) (ISnapinProperties * This, long cProperties, MMC_SNAPIN_PROPERTY * pProperties); END_INTERFACE } ISnapinPropertiesVtbl; interface ISnapinProperties { CONST_VTBL struct ISnapinPropertiesVtbl *lpVtbl; }; #ifdef COBJMACROS #define ISnapinProperties_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISnapinProperties_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define ISnapinProperties_Release(This) ( (This)->lpVtbl -> Release(This) ) #define ISnapinProperties_Initialize(This,pProperties) ( (This)->lpVtbl -> Initialize(This,pProperties) ) #define ISnapinProperties_QueryPropertyNames(This,pCallback) ( (This)->lpVtbl -> QueryPropertyNames(This,pCallback) ) #define ISnapinProperties_PropertiesChanged(This,cProperties,pProperties) ( (This)->lpVtbl -> PropertiesChanged(This,cProperties,pProperties) ) #endif #endif #ifndef __ISnapinPropertiesCallback_INTERFACE_DEFINED__ #define __ISnapinPropertiesCallback_INTERFACE_DEFINED__ #define MMC_PROP_CHANGEAFFECTSUI ( 0x1 ) #define MMC_PROP_MODIFIABLE ( 0x2 ) #define MMC_PROP_REMOVABLE ( 0x4 ) #define MMC_PROP_PERSIST ( 0x8 ) extern const IID IID_ISnapinPropertiesCallback; typedef struct ISnapinPropertiesCallbackVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (ISnapinPropertiesCallback * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (ISnapinPropertiesCallback * This); ULONG(STDMETHODCALLTYPE * Release) (ISnapinPropertiesCallback * This); HRESULT(STDMETHODCALLTYPE * AddPropertyName) (ISnapinPropertiesCallback * This, LPCOLESTR pszPropName, DWORD dwFlags); END_INTERFACE } ISnapinPropertiesCallbackVtbl; interface ISnapinPropertiesCallback { CONST_VTBL struct ISnapinPropertiesCallbackVtbl *lpVtbl; }; #ifdef COBJMACROS #define ISnapinPropertiesCallback_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ISnapinPropertiesCallback_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define ISnapinPropertiesCallback_Release(This) ( (This)->lpVtbl -> Release(This) ) #define ISnapinPropertiesCallback_AddPropertyName(This,pszPropName,dwFlags) ( (This)->lpVtbl -> AddPropertyName(This,pszPropName,dwFlags) ) #endif #endif #ifndef __MMC20_LIBRARY_DEFINED__ #define __MMC20_LIBRARY_DEFINED__ typedef enum DocumentMode { DocumentMode_Author = 0, DocumentMode_User = (DocumentMode_Author + 1), DocumentMode_User_MDI = (DocumentMode_User + 1), DocumentMode_User_SDI = (DocumentMode_User_MDI + 1) } _DocumentMode; typedef enum DocumentMode DOCUMENTMODE; typedef enum DocumentMode *PDOCUMENTMODE; typedef enum DocumentMode **PPDOCUMENTMODE; typedef enum ListViewMode { ListMode_Small_Icons = 0, ListMode_Large_Icons = (ListMode_Small_Icons + 1), ListMode_List = (ListMode_Large_Icons + 1), ListMode_Detail = (ListMode_List + 1), ListMode_Filtered = (ListMode_Detail + 1) } _ListViewMode; typedef enum ListViewMode LISTVIEWMODE; typedef enum ListViewMode *PLISTVIEWMODE; typedef enum ListViewMode **PPLISTVIEWMODE; typedef enum ViewOptions { ViewOption_Default = 0, ViewOption_ScopeTreeHidden = 0x1, ViewOption_NoToolBars = 0x2, ViewOption_NotPersistable = 0x4, ViewOption_ActionPaneHidden = 0x8 } _ViewOptions; typedef enum ViewOptions VIEWOPTIONS; typedef enum ViewOptions *PVIEWOPTIONS; typedef enum ViewOptions **PPVIEWOPTIONS; typedef enum ExportListOptions { ExportListOptions_Default = 0, ExportListOptions_Unicode = 0x1, ExportListOptions_TabDelimited = 0x2, ExportListOptions_SelectedItemsOnly = 0x4 } _ExportListOptions; typedef enum ExportListOptions EXPORTLISTOPTIONS; extern const IID LIBID_MMC20; #ifndef ___Application_INTERFACE_DEFINED__ #define ___Application_INTERFACE_DEFINED__ extern const IID IID__Application; typedef struct _ApplicationVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (_Application * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (_Application * This); ULONG(STDMETHODCALLTYPE * Release) (_Application * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (_Application * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (_Application * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (_Application * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (_Application * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); void (STDMETHODCALLTYPE * Help) (_Application * This); void (STDMETHODCALLTYPE * Quit) (_Application * This); HRESULT(STDMETHODCALLTYPE * get_Document) (_Application * This, PPDOCUMENT Document); HRESULT(STDMETHODCALLTYPE * Load) (_Application * This, BSTR Filename); HRESULT(STDMETHODCALLTYPE * get_Frame) (_Application * This, PPFRAME Frame); HRESULT(STDMETHODCALLTYPE * get_Visible) (_Application * This, PBOOL Visible); HRESULT(STDMETHODCALLTYPE * Show) (_Application * This); HRESULT(STDMETHODCALLTYPE * Hide) (_Application * This); HRESULT(STDMETHODCALLTYPE * get_UserControl) (_Application * This, PBOOL UserControl); HRESULT(STDMETHODCALLTYPE * put_UserControl) (_Application * This, BOOL UserControl); HRESULT(STDMETHODCALLTYPE * get_VersionMajor) (_Application * This, PLONG VersionMajor); HRESULT(STDMETHODCALLTYPE * get_VersionMinor) (_Application * This, PLONG VersionMinor); END_INTERFACE } _ApplicationVtbl; interface _Application { CONST_VTBL struct _ApplicationVtbl *lpVtbl; }; #ifdef COBJMACROS #define _Application_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _Application_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define _Application_Release(This) ( (This)->lpVtbl -> Release(This) ) #define _Application_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _Application_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _Application_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _Application_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _Application_Help(This) ( (This)->lpVtbl -> Help(This) ) #define _Application_Quit(This) ( (This)->lpVtbl -> Quit(This) ) #define _Application_get_Document(This,Document) ( (This)->lpVtbl -> get_Document(This,Document) ) #define _Application_Load(This,Filename) ( (This)->lpVtbl -> Load(This,Filename) ) #define _Application_get_Frame(This,Frame) ( (This)->lpVtbl -> get_Frame(This,Frame) ) #define _Application_get_Visible(This,Visible) ( (This)->lpVtbl -> get_Visible(This,Visible) ) #define _Application_Show(This) ( (This)->lpVtbl -> Show(This) ) #define _Application_Hide(This) ( (This)->lpVtbl -> Hide(This) ) #define _Application_get_UserControl(This,UserControl) ( (This)->lpVtbl -> get_UserControl(This,UserControl) ) #define _Application_put_UserControl(This,UserControl) ( (This)->lpVtbl -> put_UserControl(This,UserControl) ) #define _Application_get_VersionMajor(This,VersionMajor) ( (This)->lpVtbl -> get_VersionMajor(This,VersionMajor) ) #define _Application_get_VersionMinor(This,VersionMinor) ( (This)->lpVtbl -> get_VersionMinor(This,VersionMinor) ) #endif #endif #ifndef ___AppEvents_INTERFACE_DEFINED__ #define ___AppEvents_INTERFACE_DEFINED__ extern const IID IID__AppEvents; typedef struct _AppEventsVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (_AppEvents * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (_AppEvents * This); ULONG(STDMETHODCALLTYPE * Release) (_AppEvents * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (_AppEvents * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (_AppEvents * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (_AppEvents * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (_AppEvents * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * OnQuit) (_AppEvents * This, PAPPLICATION Application); HRESULT(STDMETHODCALLTYPE * OnDocumentOpen) (_AppEvents * This, PDOCUMENT Document, BOOL New); HRESULT(STDMETHODCALLTYPE * OnDocumentClose) (_AppEvents * This, PDOCUMENT Document); HRESULT(STDMETHODCALLTYPE * OnSnapInAdded) (_AppEvents * This, PDOCUMENT Document, PSNAPIN SnapIn); HRESULT(STDMETHODCALLTYPE * OnSnapInRemoved) (_AppEvents * This, PDOCUMENT Document, PSNAPIN SnapIn); HRESULT(STDMETHODCALLTYPE * OnNewView) (_AppEvents * This, PVIEW View); HRESULT(STDMETHODCALLTYPE * OnViewClose) (_AppEvents * This, PVIEW View); HRESULT(STDMETHODCALLTYPE * OnViewChange) (_AppEvents * This, PVIEW View, PNODE NewOwnerNode); HRESULT(STDMETHODCALLTYPE * OnSelectionChange) (_AppEvents * This, PVIEW View, PNODES NewNodes); HRESULT(STDMETHODCALLTYPE * OnContextMenuExecuted) (_AppEvents * This, PMENUITEM MenuItem); HRESULT(STDMETHODCALLTYPE * OnToolbarButtonClicked) (_AppEvents * This); HRESULT(STDMETHODCALLTYPE * OnListUpdated) (_AppEvents * This, PVIEW View); END_INTERFACE } _AppEventsVtbl; interface _AppEvents { CONST_VTBL struct _AppEventsVtbl *lpVtbl; }; #ifdef COBJMACROS #define _AppEvents_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _AppEvents_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define _AppEvents_Release(This) ( (This)->lpVtbl -> Release(This) ) #define _AppEvents_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _AppEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _AppEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _AppEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _AppEvents_OnQuit(This,Application) ( (This)->lpVtbl -> OnQuit(This,Application) ) #define _AppEvents_OnDocumentOpen(This,Document,New) ( (This)->lpVtbl -> OnDocumentOpen(This,Document,New) ) #define _AppEvents_OnDocumentClose(This,Document) ( (This)->lpVtbl -> OnDocumentClose(This,Document) ) #define _AppEvents_OnSnapInAdded(This,Document,SnapIn) ( (This)->lpVtbl -> OnSnapInAdded(This,Document,SnapIn) ) #define _AppEvents_OnSnapInRemoved(This,Document,SnapIn) ( (This)->lpVtbl -> OnSnapInRemoved(This,Document,SnapIn) ) #define _AppEvents_OnNewView(This,View) ( (This)->lpVtbl -> OnNewView(This,View) ) #define _AppEvents_OnViewClose(This,View) ( (This)->lpVtbl -> OnViewClose(This,View) ) #define _AppEvents_OnViewChange(This,View,NewOwnerNode) ( (This)->lpVtbl -> OnViewChange(This,View,NewOwnerNode) ) #define _AppEvents_OnSelectionChange(This,View,NewNodes) ( (This)->lpVtbl -> OnSelectionChange(This,View,NewNodes) ) #define _AppEvents_OnContextMenuExecuted(This,MenuItem) ( (This)->lpVtbl -> OnContextMenuExecuted(This,MenuItem) ) #define _AppEvents_OnToolbarButtonClicked(This) ( (This)->lpVtbl -> OnToolbarButtonClicked(This) ) #define _AppEvents_OnListUpdated(This,View) ( (This)->lpVtbl -> OnListUpdated(This,View) ) #endif #endif #ifndef __AppEvents_DISPINTERFACE_DEFINED__ #define __AppEvents_DISPINTERFACE_DEFINED__ extern const IID DIID_AppEvents; typedef struct AppEventsVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (AppEvents * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (AppEvents * This); ULONG(STDMETHODCALLTYPE * Release) (AppEvents * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (AppEvents * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (AppEvents * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (AppEvents * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (AppEvents * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); END_INTERFACE } AppEventsVtbl; interface AppEvents { CONST_VTBL struct AppEventsVtbl *lpVtbl; }; #ifdef COBJMACROS #define AppEvents_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define AppEvents_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define AppEvents_Release(This) ( (This)->lpVtbl -> Release(This) ) #define AppEvents_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define AppEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define AppEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define AppEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #endif #endif extern const CLSID CLSID_Application; #ifndef ___EventConnector_INTERFACE_DEFINED__ #define ___EventConnector_INTERFACE_DEFINED__ extern const IID IID__EventConnector; typedef struct _EventConnectorVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (_EventConnector * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (_EventConnector * This); ULONG(STDMETHODCALLTYPE * Release) (_EventConnector * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (_EventConnector * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (_EventConnector * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (_EventConnector * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (_EventConnector * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * ConnectTo) (_EventConnector * This, PAPPLICATION Application); HRESULT(STDMETHODCALLTYPE * Disconnect) (_EventConnector * This); END_INTERFACE } _EventConnectorVtbl; interface _EventConnector { CONST_VTBL struct _EventConnectorVtbl *lpVtbl; }; #ifdef COBJMACROS #define _EventConnector_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define _EventConnector_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define _EventConnector_Release(This) ( (This)->lpVtbl -> Release(This) ) #define _EventConnector_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define _EventConnector_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define _EventConnector_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define _EventConnector_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define _EventConnector_ConnectTo(This,Application) ( (This)->lpVtbl -> ConnectTo(This,Application) ) #define _EventConnector_Disconnect(This) ( (This)->lpVtbl -> Disconnect(This) ) #endif #endif extern const CLSID CLSID_AppEventsDHTMLConnector; #ifndef __Frame_INTERFACE_DEFINED__ #define __Frame_INTERFACE_DEFINED__ extern const IID IID_Frame; typedef struct FrameVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Frame * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Frame * This); ULONG(STDMETHODCALLTYPE * Release) (Frame * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Frame * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Frame * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Frame * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Frame * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * Maximize) (Frame * This); HRESULT(STDMETHODCALLTYPE * Minimize) (Frame * This); HRESULT(STDMETHODCALLTYPE * Restore) (Frame * This); HRESULT(STDMETHODCALLTYPE * get_Top) (Frame * This, PINT Top); HRESULT(STDMETHODCALLTYPE * put_Top) (Frame * This, int top); HRESULT(STDMETHODCALLTYPE * get_Bottom) (Frame * This, PINT Bottom); HRESULT(STDMETHODCALLTYPE * put_Bottom) (Frame * This, int bottom); HRESULT(STDMETHODCALLTYPE * get_Left) (Frame * This, PINT Left); HRESULT(STDMETHODCALLTYPE * put_Left) (Frame * This, int left); HRESULT(STDMETHODCALLTYPE * get_Right) (Frame * This, PINT Right); HRESULT(STDMETHODCALLTYPE * put_Right) (Frame * This, int right); END_INTERFACE } FrameVtbl; interface Frame { CONST_VTBL struct FrameVtbl *lpVtbl; }; #ifdef COBJMACROS #define Frame_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Frame_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Frame_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Frame_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Frame_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Frame_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Frame_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Frame_Maximize(This) ( (This)->lpVtbl -> Maximize(This) ) #define Frame_Minimize(This) ( (This)->lpVtbl -> Minimize(This) ) #define Frame_Restore(This) ( (This)->lpVtbl -> Restore(This) ) #define Frame_get_Top(This,Top) ( (This)->lpVtbl -> get_Top(This,Top) ) #define Frame_put_Top(This,top) ( (This)->lpVtbl -> put_Top(This,top) ) #define Frame_get_Bottom(This,Bottom) ( (This)->lpVtbl -> get_Bottom(This,Bottom) ) #define Frame_put_Bottom(This,bottom) ( (This)->lpVtbl -> put_Bottom(This,bottom) ) #define Frame_get_Left(This,Left) ( (This)->lpVtbl -> get_Left(This,Left) ) #define Frame_put_Left(This,left) ( (This)->lpVtbl -> put_Left(This,left) ) #define Frame_get_Right(This,Right) ( (This)->lpVtbl -> get_Right(This,Right) ) #define Frame_put_Right(This,right) ( (This)->lpVtbl -> put_Right(This,right) ) #endif #endif #ifndef __Node_INTERFACE_DEFINED__ #define __Node_INTERFACE_DEFINED__ extern const IID IID_Node; typedef struct NodeVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Node * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Node * This); ULONG(STDMETHODCALLTYPE * Release) (Node * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Node * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Node * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Node * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Node * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get_Name) (Node * This, PBSTR Name); HRESULT(STDMETHODCALLTYPE * get_Property) (Node * This, BSTR PropertyName, PBSTR PropertyValue); HRESULT(STDMETHODCALLTYPE * get_Bookmark) (Node * This, PBSTR Bookmark); HRESULT(STDMETHODCALLTYPE * IsScopeNode) (Node * This, PBOOL IsScopeNode); HRESULT(STDMETHODCALLTYPE * get_Nodetype) (Node * This, PBSTR Nodetype); END_INTERFACE } NodeVtbl; interface Node { CONST_VTBL struct NodeVtbl *lpVtbl; }; #ifdef COBJMACROS #define Node_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Node_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Node_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Node_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Node_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Node_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Node_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Node_get_Name(This,Name) ( (This)->lpVtbl -> get_Name(This,Name) ) #define Node_get_Property(This,PropertyName,PropertyValue) ( (This)->lpVtbl -> get_Property(This,PropertyName,PropertyValue) ) #define Node_get_Bookmark(This,Bookmark) ( (This)->lpVtbl -> get_Bookmark(This,Bookmark) ) #define Node_IsScopeNode(This,IsScopeNode) ( (This)->lpVtbl -> IsScopeNode(This,IsScopeNode) ) #define Node_get_Nodetype(This,Nodetype) ( (This)->lpVtbl -> get_Nodetype(This,Nodetype) ) #endif #endif #ifndef __ScopeNamespace_INTERFACE_DEFINED__ #define __ScopeNamespace_INTERFACE_DEFINED__ extern const IID IID_ScopeNamespace; typedef struct ScopeNamespaceVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (ScopeNamespace * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (ScopeNamespace * This); ULONG(STDMETHODCALLTYPE * Release) (ScopeNamespace * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (ScopeNamespace * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (ScopeNamespace * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (ScopeNamespace * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (ScopeNamespace * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * GetParent) (ScopeNamespace * This, PNODE Node, PPNODE Parent); HRESULT(STDMETHODCALLTYPE * GetChild) (ScopeNamespace * This, PNODE Node, PPNODE Child); HRESULT(STDMETHODCALLTYPE * GetNext) (ScopeNamespace * This, PNODE Node, PPNODE Next); HRESULT(STDMETHODCALLTYPE * GetRoot) (ScopeNamespace * This, PPNODE Root); HRESULT(STDMETHODCALLTYPE * Expand) (ScopeNamespace * This, PNODE Node); END_INTERFACE } ScopeNamespaceVtbl; interface ScopeNamespace { CONST_VTBL struct ScopeNamespaceVtbl *lpVtbl; }; #ifdef COBJMACROS #define ScopeNamespace_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ScopeNamespace_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define ScopeNamespace_Release(This) ( (This)->lpVtbl -> Release(This) ) #define ScopeNamespace_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define ScopeNamespace_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define ScopeNamespace_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define ScopeNamespace_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define ScopeNamespace_GetParent(This,Node,Parent) ( (This)->lpVtbl -> GetParent(This,Node,Parent) ) #define ScopeNamespace_GetChild(This,Node,Child) ( (This)->lpVtbl -> GetChild(This,Node,Child) ) #define ScopeNamespace_GetNext(This,Node,Next) ( (This)->lpVtbl -> GetNext(This,Node,Next) ) #define ScopeNamespace_GetRoot(This,Root) ( (This)->lpVtbl -> GetRoot(This,Root) ) #define ScopeNamespace_Expand(This,Node) ( (This)->lpVtbl -> Expand(This,Node) ) #endif #endif #ifndef __Document_INTERFACE_DEFINED__ #define __Document_INTERFACE_DEFINED__ extern const IID IID_Document; typedef struct DocumentVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Document * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Document * This); ULONG(STDMETHODCALLTYPE * Release) (Document * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Document * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Document * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Document * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Document * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * Save) (Document * This); HRESULT(STDMETHODCALLTYPE * SaveAs) (Document * This, BSTR Filename); HRESULT(STDMETHODCALLTYPE * Close) (Document * This, BOOL SaveChanges); HRESULT(STDMETHODCALLTYPE * get_Views) (Document * This, PPVIEWS Views); HRESULT(STDMETHODCALLTYPE * get_SnapIns) (Document * This, PPSNAPINS SnapIns); HRESULT(STDMETHODCALLTYPE * get_ActiveView) (Document * This, PPVIEW View); HRESULT(STDMETHODCALLTYPE * get_Name) (Document * This, PBSTR Name); HRESULT(STDMETHODCALLTYPE * put_Name) (Document * This, BSTR Name); HRESULT(STDMETHODCALLTYPE * get_Location) (Document * This, PBSTR Location); HRESULT(STDMETHODCALLTYPE * get_IsSaved) (Document * This, PBOOL IsSaved); HRESULT(STDMETHODCALLTYPE * get_Mode) (Document * This, PDOCUMENTMODE Mode); HRESULT(STDMETHODCALLTYPE * put_Mode) (Document * This, DOCUMENTMODE Mode); HRESULT(STDMETHODCALLTYPE * get_RootNode) (Document * This, PPNODE Node); HRESULT(STDMETHODCALLTYPE * get_ScopeNamespace) (Document * This, PPSCOPENAMESPACE ScopeNamespace); HRESULT(STDMETHODCALLTYPE * CreateProperties) (Document * This, PPPROPERTIES Properties); HRESULT(STDMETHODCALLTYPE * get_Application) (Document * This, PPAPPLICATION Application); END_INTERFACE } DocumentVtbl; interface Document { CONST_VTBL struct DocumentVtbl *lpVtbl; }; #ifdef COBJMACROS #define Document_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Document_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Document_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Document_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Document_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Document_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Document_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Document_Save(This) ( (This)->lpVtbl -> Save(This) ) #define Document_SaveAs(This,Filename) ( (This)->lpVtbl -> SaveAs(This,Filename) ) #define Document_Close(This,SaveChanges) ( (This)->lpVtbl -> Close(This,SaveChanges) ) #define Document_get_Views(This,Views) ( (This)->lpVtbl -> get_Views(This,Views) ) #define Document_get_SnapIns(This,SnapIns) ( (This)->lpVtbl -> get_SnapIns(This,SnapIns) ) #define Document_get_ActiveView(This,View) ( (This)->lpVtbl -> get_ActiveView(This,View) ) #define Document_get_Name(This,Name) ( (This)->lpVtbl -> get_Name(This,Name) ) #define Document_put_Name(This,Name) ( (This)->lpVtbl -> put_Name(This,Name) ) #define Document_get_Location(This,Location) ( (This)->lpVtbl -> get_Location(This,Location) ) #define Document_get_IsSaved(This,IsSaved) ( (This)->lpVtbl -> get_IsSaved(This,IsSaved) ) #define Document_get_Mode(This,Mode) ( (This)->lpVtbl -> get_Mode(This,Mode) ) #define Document_put_Mode(This,Mode) ( (This)->lpVtbl -> put_Mode(This,Mode) ) #define Document_get_RootNode(This,Node) ( (This)->lpVtbl -> get_RootNode(This,Node) ) #define Document_get_ScopeNamespace(This,ScopeNamespace) ( (This)->lpVtbl -> get_ScopeNamespace(This,ScopeNamespace) ) #define Document_CreateProperties(This,Properties) ( (This)->lpVtbl -> CreateProperties(This,Properties) ) #define Document_get_Application(This,Application) ( (This)->lpVtbl -> get_Application(This,Application) ) #endif #endif #ifndef __SnapIn_INTERFACE_DEFINED__ #define __SnapIn_INTERFACE_DEFINED__ extern const IID IID_SnapIn; typedef struct SnapInVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (SnapIn * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (SnapIn * This); ULONG(STDMETHODCALLTYPE * Release) (SnapIn * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (SnapIn * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (SnapIn * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (SnapIn * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (SnapIn * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get_Name) (SnapIn * This, PBSTR Name); HRESULT(STDMETHODCALLTYPE * get_Vendor) (SnapIn * This, PBSTR Vendor); HRESULT(STDMETHODCALLTYPE * get_Version) (SnapIn * This, PBSTR Version); HRESULT(STDMETHODCALLTYPE * get_Extensions) (SnapIn * This, PPEXTENSIONS Extensions); HRESULT(STDMETHODCALLTYPE * get_SnapinCLSID) (SnapIn * This, PBSTR SnapinCLSID); HRESULT(STDMETHODCALLTYPE * get_Properties) (SnapIn * This, PPPROPERTIES Properties); HRESULT(STDMETHODCALLTYPE * EnableAllExtensions) (SnapIn * This, BOOL Enable); END_INTERFACE } SnapInVtbl; interface SnapIn { CONST_VTBL struct SnapInVtbl *lpVtbl; }; #ifdef COBJMACROS #define SnapIn_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define SnapIn_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define SnapIn_Release(This) ( (This)->lpVtbl -> Release(This) ) #define SnapIn_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define SnapIn_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define SnapIn_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define SnapIn_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define SnapIn_get_Name(This,Name) ( (This)->lpVtbl -> get_Name(This,Name) ) #define SnapIn_get_Vendor(This,Vendor) ( (This)->lpVtbl -> get_Vendor(This,Vendor) ) #define SnapIn_get_Version(This,Version) ( (This)->lpVtbl -> get_Version(This,Version) ) #define SnapIn_get_Extensions(This,Extensions) ( (This)->lpVtbl -> get_Extensions(This,Extensions) ) #define SnapIn_get_SnapinCLSID(This,SnapinCLSID) ( (This)->lpVtbl -> get_SnapinCLSID(This,SnapinCLSID) ) #define SnapIn_get_Properties(This,Properties) ( (This)->lpVtbl -> get_Properties(This,Properties) ) #define SnapIn_EnableAllExtensions(This,Enable) ( (This)->lpVtbl -> EnableAllExtensions(This,Enable) ) #endif #endif #ifndef __SnapIns_INTERFACE_DEFINED__ #define __SnapIns_INTERFACE_DEFINED__ extern const IID IID_SnapIns; typedef struct SnapInsVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (SnapIns * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (SnapIns * This); ULONG(STDMETHODCALLTYPE * Release) (SnapIns * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (SnapIns * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (SnapIns * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (SnapIns * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (SnapIns * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get__NewEnum) (SnapIns * This, IUnknown ** retval); HRESULT(STDMETHODCALLTYPE * Item) (SnapIns * This, long Index, PPSNAPIN SnapIn); HRESULT(STDMETHODCALLTYPE * get_Count) (SnapIns * This, PLONG Count); HRESULT(STDMETHODCALLTYPE * Add) (SnapIns * This, BSTR SnapinNameOrCLSID, VARIANT ParentSnapin, VARIANT Properties, PPSNAPIN SnapIn); HRESULT(STDMETHODCALLTYPE * Remove) (SnapIns * This, PSNAPIN SnapIn); END_INTERFACE } SnapInsVtbl; interface SnapIns { CONST_VTBL struct SnapInsVtbl *lpVtbl; }; #ifdef COBJMACROS #define SnapIns_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define SnapIns_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define SnapIns_Release(This) ( (This)->lpVtbl -> Release(This) ) #define SnapIns_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define SnapIns_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define SnapIns_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define SnapIns_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define SnapIns_get__NewEnum(This,retval) ( (This)->lpVtbl -> get__NewEnum(This,retval) ) #define SnapIns_Item(This,Index,SnapIn) ( (This)->lpVtbl -> Item(This,Index,SnapIn) ) #define SnapIns_get_Count(This,Count) ( (This)->lpVtbl -> get_Count(This,Count) ) #define SnapIns_Add(This,SnapinNameOrCLSID,ParentSnapin,Properties,SnapIn) ( (This)->lpVtbl -> Add(This,SnapinNameOrCLSID,ParentSnapin,Properties,SnapIn) ) #define SnapIns_Remove(This,SnapIn) ( (This)->lpVtbl -> Remove(This,SnapIn) ) #endif #endif #ifndef __Extension_INTERFACE_DEFINED__ #define __Extension_INTERFACE_DEFINED__ extern const IID IID_Extension; typedef struct ExtensionVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Extension * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Extension * This); ULONG(STDMETHODCALLTYPE * Release) (Extension * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Extension * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Extension * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Extension * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Extension * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get_Name) (Extension * This, PBSTR Name); HRESULT(STDMETHODCALLTYPE * get_Vendor) (Extension * This, PBSTR Vendor); HRESULT(STDMETHODCALLTYPE * get_Version) (Extension * This, PBSTR Version); HRESULT(STDMETHODCALLTYPE * get_Extensions) (Extension * This, PPEXTENSIONS Extensions); HRESULT(STDMETHODCALLTYPE * get_SnapinCLSID) (Extension * This, PBSTR SnapinCLSID); HRESULT(STDMETHODCALLTYPE * EnableAllExtensions) (Extension * This, BOOL Enable); HRESULT(STDMETHODCALLTYPE * Enable) (Extension * This, BOOL Enable); END_INTERFACE } ExtensionVtbl; interface Extension { CONST_VTBL struct ExtensionVtbl *lpVtbl; }; #ifdef COBJMACROS #define Extension_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Extension_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Extension_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Extension_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Extension_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Extension_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Extension_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Extension_get_Name(This,Name) ( (This)->lpVtbl -> get_Name(This,Name) ) #define Extension_get_Vendor(This,Vendor) ( (This)->lpVtbl -> get_Vendor(This,Vendor) ) #define Extension_get_Version(This,Version) ( (This)->lpVtbl -> get_Version(This,Version) ) #define Extension_get_Extensions(This,Extensions) ( (This)->lpVtbl -> get_Extensions(This,Extensions) ) #define Extension_get_SnapinCLSID(This,SnapinCLSID) ( (This)->lpVtbl -> get_SnapinCLSID(This,SnapinCLSID) ) #define Extension_EnableAllExtensions(This,Enable) ( (This)->lpVtbl -> EnableAllExtensions(This,Enable) ) #define Extension_Enable(This,Enable) ( (This)->lpVtbl -> Enable(This,Enable) ) #endif #endif #ifndef __Extensions_INTERFACE_DEFINED__ #define __Extensions_INTERFACE_DEFINED__ extern const IID IID_Extensions; typedef struct ExtensionsVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Extensions * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Extensions * This); ULONG(STDMETHODCALLTYPE * Release) (Extensions * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Extensions * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Extensions * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Extensions * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Extensions * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get__NewEnum) (Extensions * This, IUnknown ** retval); HRESULT(STDMETHODCALLTYPE * Item) (Extensions * This, long Index, PPEXTENSION Extension); HRESULT(STDMETHODCALLTYPE * get_Count) (Extensions * This, PLONG Count); END_INTERFACE } ExtensionsVtbl; interface Extensions { CONST_VTBL struct ExtensionsVtbl *lpVtbl; }; #ifdef COBJMACROS #define Extensions_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Extensions_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Extensions_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Extensions_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Extensions_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Extensions_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Extensions_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Extensions_get__NewEnum(This,retval) ( (This)->lpVtbl -> get__NewEnum(This,retval) ) #define Extensions_Item(This,Index,Extension) ( (This)->lpVtbl -> Item(This,Index,Extension) ) #define Extensions_get_Count(This,Count) ( (This)->lpVtbl -> get_Count(This,Count) ) #endif #endif #ifndef __Columns_INTERFACE_DEFINED__ #define __Columns_INTERFACE_DEFINED__ extern const IID IID_Columns; typedef struct ColumnsVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Columns * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Columns * This); ULONG(STDMETHODCALLTYPE * Release) (Columns * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Columns * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Columns * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Columns * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Columns * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * Item) (Columns * This, long Index, PPCOLUMN Column); HRESULT(STDMETHODCALLTYPE * get_Count) (Columns * This, PLONG Count); HRESULT(STDMETHODCALLTYPE * get__NewEnum) (Columns * This, IUnknown ** retval); END_INTERFACE } ColumnsVtbl; interface Columns { CONST_VTBL struct ColumnsVtbl *lpVtbl; }; #ifdef COBJMACROS #define Columns_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Columns_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Columns_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Columns_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Columns_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Columns_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Columns_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Columns_Item(This,Index,Column) ( (This)->lpVtbl -> Item(This,Index,Column) ) #define Columns_get_Count(This,Count) ( (This)->lpVtbl -> get_Count(This,Count) ) #define Columns_get__NewEnum(This,retval) ( (This)->lpVtbl -> get__NewEnum(This,retval) ) #endif #endif #ifndef __Column_INTERFACE_DEFINED__ #define __Column_INTERFACE_DEFINED__ typedef enum ColumnSortOrder { SortOrder_Ascending = 0, SortOrder_Descending = (SortOrder_Ascending + 1) } _ColumnSortOrder; typedef enum ColumnSortOrder COLUMNSORTORDER; extern const IID IID_Column; typedef struct ColumnVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Column * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Column * This); ULONG(STDMETHODCALLTYPE * Release) (Column * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Column * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Column * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Column * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Column * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * Name) (Column * This, BSTR * Name); HRESULT(STDMETHODCALLTYPE * get_Width) (Column * This, PLONG Width); HRESULT(STDMETHODCALLTYPE * put_Width) (Column * This, long Width); HRESULT(STDMETHODCALLTYPE * get_DisplayPosition) (Column * This, PLONG DisplayPosition); HRESULT(STDMETHODCALLTYPE * put_DisplayPosition) (Column * This, long Index); HRESULT(STDMETHODCALLTYPE * get_Hidden) (Column * This, PBOOL Hidden); HRESULT(STDMETHODCALLTYPE * put_Hidden) (Column * This, BOOL Hidden); HRESULT(STDMETHODCALLTYPE * SetAsSortColumn) (Column * This, COLUMNSORTORDER SortOrder); HRESULT(STDMETHODCALLTYPE * IsSortColumn) (Column * This, PBOOL IsSortColumn); END_INTERFACE } ColumnVtbl; interface Column { CONST_VTBL struct ColumnVtbl *lpVtbl; }; #ifdef COBJMACROS #define Column_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Column_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Column_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Column_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Column_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Column_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Column_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Column_Name(This,Name) ( (This)->lpVtbl -> Name(This,Name) ) #define Column_get_Width(This,Width) ( (This)->lpVtbl -> get_Width(This,Width) ) #define Column_put_Width(This,Width) ( (This)->lpVtbl -> put_Width(This,Width) ) #define Column_get_DisplayPosition(This,DisplayPosition) ( (This)->lpVtbl -> get_DisplayPosition(This,DisplayPosition) ) #define Column_put_DisplayPosition(This,Index) ( (This)->lpVtbl -> put_DisplayPosition(This,Index) ) #define Column_get_Hidden(This,Hidden) ( (This)->lpVtbl -> get_Hidden(This,Hidden) ) #define Column_put_Hidden(This,Hidden) ( (This)->lpVtbl -> put_Hidden(This,Hidden) ) #define Column_SetAsSortColumn(This,SortOrder) ( (This)->lpVtbl -> SetAsSortColumn(This,SortOrder) ) #define Column_IsSortColumn(This,IsSortColumn) ( (This)->lpVtbl -> IsSortColumn(This,IsSortColumn) ) #endif #endif #ifndef __Views_INTERFACE_DEFINED__ #define __Views_INTERFACE_DEFINED__ extern const IID IID_Views; typedef struct ViewsVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Views * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Views * This); ULONG(STDMETHODCALLTYPE * Release) (Views * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Views * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Views * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Views * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Views * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * Item) (Views * This, long Index, PPVIEW View); HRESULT(STDMETHODCALLTYPE * get_Count) (Views * This, PLONG Count); HRESULT(STDMETHODCALLTYPE * Add) (Views * This, PNODE Node, VIEWOPTIONS viewOptions); HRESULT(STDMETHODCALLTYPE * get__NewEnum) (Views * This, IUnknown ** retval); END_INTERFACE } ViewsVtbl; interface Views { CONST_VTBL struct ViewsVtbl *lpVtbl; }; #ifdef COBJMACROS #define Views_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Views_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Views_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Views_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Views_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Views_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Views_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Views_Item(This,Index,View) ( (This)->lpVtbl -> Item(This,Index,View) ) #define Views_get_Count(This,Count) ( (This)->lpVtbl -> get_Count(This,Count) ) #define Views_Add(This,Node,viewOptions) ( (This)->lpVtbl -> Add(This,Node,viewOptions) ) #define Views_get__NewEnum(This,retval) ( (This)->lpVtbl -> get__NewEnum(This,retval) ) #endif #endif #ifndef __View_INTERFACE_DEFINED__ #define __View_INTERFACE_DEFINED__ extern const IID IID_View; typedef struct ViewVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (View * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (View * This); ULONG(STDMETHODCALLTYPE * Release) (View * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (View * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (View * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (View * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (View * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get_ActiveScopeNode) (View * This, PPNODE Node); HRESULT(STDMETHODCALLTYPE * put_ActiveScopeNode) (View * This, PNODE Node); HRESULT(STDMETHODCALLTYPE * get_Selection) (View * This, PPNODES Nodes); HRESULT(STDMETHODCALLTYPE * get_ListItems) (View * This, PPNODES Nodes); HRESULT(STDMETHODCALLTYPE * SnapinScopeObject) (View * This, VARIANT ScopeNode, PPDISPATCH ScopeNodeObject); HRESULT(STDMETHODCALLTYPE * SnapinSelectionObject) (View * This, PPDISPATCH SelectionObject); HRESULT(STDMETHODCALLTYPE * Is) (View * This, PVIEW View, VARIANT_BOOL * TheSame); HRESULT(STDMETHODCALLTYPE * get_Document) (View * This, PPDOCUMENT Document); HRESULT(STDMETHODCALLTYPE * SelectAll) (View * This); HRESULT(STDMETHODCALLTYPE * Select) (View * This, PNODE Node); HRESULT(STDMETHODCALLTYPE * Deselect) (View * This, PNODE Node); HRESULT(STDMETHODCALLTYPE * IsSelected) (View * This, PNODE Node, PBOOL IsSelected); HRESULT(STDMETHODCALLTYPE * DisplayScopeNodePropertySheet) (View * This, VARIANT ScopeNode); HRESULT(STDMETHODCALLTYPE * DisplaySelectionPropertySheet) (View * This); HRESULT(STDMETHODCALLTYPE * CopyScopeNode) (View * This, VARIANT ScopeNode); HRESULT(STDMETHODCALLTYPE * CopySelection) (View * This); HRESULT(STDMETHODCALLTYPE * DeleteScopeNode) (View * This, VARIANT ScopeNode); HRESULT(STDMETHODCALLTYPE * DeleteSelection) (View * This); HRESULT(STDMETHODCALLTYPE * RenameScopeNode) (View * This, BSTR NewName, VARIANT ScopeNode); HRESULT(STDMETHODCALLTYPE * RenameSelectedItem) (View * This, BSTR NewName); HRESULT(STDMETHODCALLTYPE * get_ScopeNodeContextMenu) (View * This, VARIANT ScopeNode, PPCONTEXTMENU ContextMenu); HRESULT(STDMETHODCALLTYPE * get_SelectionContextMenu) (View * This, PPCONTEXTMENU ContextMenu); HRESULT(STDMETHODCALLTYPE * RefreshScopeNode) (View * This, VARIANT ScopeNode); HRESULT(STDMETHODCALLTYPE * RefreshSelection) (View * This); HRESULT(STDMETHODCALLTYPE * ExecuteSelectionMenuItem) (View * This, BSTR MenuItemPath); HRESULT(STDMETHODCALLTYPE * ExecuteScopeNodeMenuItem) (View * This, BSTR MenuItemPath, VARIANT ScopeNode); HRESULT(STDMETHODCALLTYPE * ExecuteShellCommand) (View * This, BSTR Command, BSTR Directory, BSTR Parameters, BSTR WindowState); HRESULT(STDMETHODCALLTYPE * get_Frame) (View * This, PPFRAME Frame); HRESULT(STDMETHODCALLTYPE * Close) (View * This); HRESULT(STDMETHODCALLTYPE * get_ScopeTreeVisible) (View * This, PBOOL Visible); HRESULT(STDMETHODCALLTYPE * put_ScopeTreeVisible) (View * This, BOOL Visible); HRESULT(STDMETHODCALLTYPE * Back) (View * This); HRESULT(STDMETHODCALLTYPE * Forward) (View * This); HRESULT(STDMETHODCALLTYPE * put_StatusBarText) (View * This, BSTR StatusBarText); HRESULT(STDMETHODCALLTYPE * get_Memento) (View * This, PBSTR Memento); HRESULT(STDMETHODCALLTYPE * ViewMemento) (View * This, BSTR Memento); HRESULT(STDMETHODCALLTYPE * get_Columns) (View * This, PPCOLUMNS Columns); HRESULT(STDMETHODCALLTYPE * get_CellContents) (View * This, PNODE Node, long Column, PBSTR CellContents); HRESULT(STDMETHODCALLTYPE * ExportList) (View * This, BSTR File, EXPORTLISTOPTIONS exportoptions); HRESULT(STDMETHODCALLTYPE * get_ListViewMode) (View * This, PLISTVIEWMODE Mode); HRESULT(STDMETHODCALLTYPE * put_ListViewMode) (View * This, LISTVIEWMODE mode); HRESULT(STDMETHODCALLTYPE * get_ControlObject) (View * This, PPDISPATCH Control); END_INTERFACE } ViewVtbl; interface View { CONST_VTBL struct ViewVtbl *lpVtbl; }; #ifdef COBJMACROS #define View_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define View_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define View_Release(This) ( (This)->lpVtbl -> Release(This) ) #define View_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define View_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define View_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define View_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define View_get_ActiveScopeNode(This,Node) ( (This)->lpVtbl -> get_ActiveScopeNode(This,Node) ) #define View_put_ActiveScopeNode(This,Node) ( (This)->lpVtbl -> put_ActiveScopeNode(This,Node) ) #define View_get_Selection(This,Nodes) ( (This)->lpVtbl -> get_Selection(This,Nodes) ) #define View_get_ListItems(This,Nodes) ( (This)->lpVtbl -> get_ListItems(This,Nodes) ) #define View_SnapinScopeObject(This,ScopeNode,ScopeNodeObject) ( (This)->lpVtbl -> SnapinScopeObject(This,ScopeNode,ScopeNodeObject) ) #define View_SnapinSelectionObject(This,SelectionObject) ( (This)->lpVtbl -> SnapinSelectionObject(This,SelectionObject) ) #define View_Is(This,View,TheSame) ( (This)->lpVtbl -> Is(This,View,TheSame) ) #define View_get_Document(This,Document) ( (This)->lpVtbl -> get_Document(This,Document) ) #define View_SelectAll(This) ( (This)->lpVtbl -> SelectAll(This) ) #define View_Select(This,Node) ( (This)->lpVtbl -> Select(This,Node) ) #define View_Deselect(This,Node) ( (This)->lpVtbl -> Deselect(This,Node) ) #define View_IsSelected(This,Node,IsSelected) ( (This)->lpVtbl -> IsSelected(This,Node,IsSelected) ) #define View_DisplayScopeNodePropertySheet(This,ScopeNode) ( (This)->lpVtbl -> DisplayScopeNodePropertySheet(This,ScopeNode) ) #define View_DisplaySelectionPropertySheet(This) ( (This)->lpVtbl -> DisplaySelectionPropertySheet(This) ) #define View_CopyScopeNode(This,ScopeNode) ( (This)->lpVtbl -> CopyScopeNode(This,ScopeNode) ) #define View_CopySelection(This) ( (This)->lpVtbl -> CopySelection(This) ) #define View_DeleteScopeNode(This,ScopeNode) ( (This)->lpVtbl -> DeleteScopeNode(This,ScopeNode) ) #define View_DeleteSelection(This) ( (This)->lpVtbl -> DeleteSelection(This) ) #define View_RenameScopeNode(This,NewName,ScopeNode) ( (This)->lpVtbl -> RenameScopeNode(This,NewName,ScopeNode) ) #define View_RenameSelectedItem(This,NewName) ( (This)->lpVtbl -> RenameSelectedItem(This,NewName) ) #define View_get_ScopeNodeContextMenu(This,ScopeNode,ContextMenu) ( (This)->lpVtbl -> get_ScopeNodeContextMenu(This,ScopeNode,ContextMenu) ) #define View_get_SelectionContextMenu(This,ContextMenu) ( (This)->lpVtbl -> get_SelectionContextMenu(This,ContextMenu) ) #define View_RefreshScopeNode(This,ScopeNode) ( (This)->lpVtbl -> RefreshScopeNode(This,ScopeNode) ) #define View_RefreshSelection(This) ( (This)->lpVtbl -> RefreshSelection(This) ) #define View_ExecuteSelectionMenuItem(This,MenuItemPath) ( (This)->lpVtbl -> ExecuteSelectionMenuItem(This,MenuItemPath) ) #define View_ExecuteScopeNodeMenuItem(This,MenuItemPath,ScopeNode) ( (This)->lpVtbl -> ExecuteScopeNodeMenuItem(This,MenuItemPath,ScopeNode) ) #define View_ExecuteShellCommand(This,Command,Directory,Parameters,WindowState) ( (This)->lpVtbl -> ExecuteShellCommand(This,Command,Directory,Parameters,WindowState) ) #define View_get_Frame(This,Frame) ( (This)->lpVtbl -> get_Frame(This,Frame) ) #define View_Close(This) ( (This)->lpVtbl -> Close(This) ) #define View_get_ScopeTreeVisible(This,Visible) ( (This)->lpVtbl -> get_ScopeTreeVisible(This,Visible) ) #define View_put_ScopeTreeVisible(This,Visible) ( (This)->lpVtbl -> put_ScopeTreeVisible(This,Visible) ) #define View_Back(This) ( (This)->lpVtbl -> Back(This) ) #define View_Forward(This) ( (This)->lpVtbl -> Forward(This) ) #define View_put_StatusBarText(This,StatusBarText) ( (This)->lpVtbl -> put_StatusBarText(This,StatusBarText) ) #define View_get_Memento(This,Memento) ( (This)->lpVtbl -> get_Memento(This,Memento) ) #define View_ViewMemento(This,Memento) ( (This)->lpVtbl -> ViewMemento(This,Memento) ) #define View_get_Columns(This,Columns) ( (This)->lpVtbl -> get_Columns(This,Columns) ) #define View_get_CellContents(This,Node,Column,CellContents) ( (This)->lpVtbl -> get_CellContents(This,Node,Column,CellContents) ) #define View_ExportList(This,File,exportoptions) ( (This)->lpVtbl -> ExportList(This,File,exportoptions) ) #define View_get_ListViewMode(This,Mode) ( (This)->lpVtbl -> get_ListViewMode(This,Mode) ) #define View_put_ListViewMode(This,mode) ( (This)->lpVtbl -> put_ListViewMode(This,mode) ) #define View_get_ControlObject(This,Control) ( (This)->lpVtbl -> get_ControlObject(This,Control) ) #endif #endif #ifndef __Nodes_INTERFACE_DEFINED__ #define __Nodes_INTERFACE_DEFINED__ extern const IID IID_Nodes; typedef struct NodesVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Nodes * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Nodes * This); ULONG(STDMETHODCALLTYPE * Release) (Nodes * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Nodes * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Nodes * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Nodes * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Nodes * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get__NewEnum) (Nodes * This, IUnknown ** retval); HRESULT(STDMETHODCALLTYPE * Item) (Nodes * This, long Index, PPNODE Node); HRESULT(STDMETHODCALLTYPE * get_Count) (Nodes * This, PLONG Count); END_INTERFACE } NodesVtbl; interface Nodes { CONST_VTBL struct NodesVtbl *lpVtbl; }; #ifdef COBJMACROS #define Nodes_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Nodes_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Nodes_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Nodes_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Nodes_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Nodes_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Nodes_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Nodes_get__NewEnum(This,retval) ( (This)->lpVtbl -> get__NewEnum(This,retval) ) #define Nodes_Item(This,Index,Node) ( (This)->lpVtbl -> Item(This,Index,Node) ) #define Nodes_get_Count(This,Count) ( (This)->lpVtbl -> get_Count(This,Count) ) #endif #endif #ifndef __ContextMenu_INTERFACE_DEFINED__ #define __ContextMenu_INTERFACE_DEFINED__ extern const IID IID_ContextMenu; typedef struct ContextMenuVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (ContextMenu * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (ContextMenu * This); ULONG(STDMETHODCALLTYPE * Release) (ContextMenu * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (ContextMenu * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (ContextMenu * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (ContextMenu * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (ContextMenu * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get__NewEnum) (ContextMenu * This, IUnknown ** retval); HRESULT(STDMETHODCALLTYPE * get_Item) (ContextMenu * This, VARIANT IndexOrPath, PPMENUITEM MenuItem); HRESULT(STDMETHODCALLTYPE * get_Count) (ContextMenu * This, PLONG Count); END_INTERFACE } ContextMenuVtbl; interface ContextMenu { CONST_VTBL struct ContextMenuVtbl *lpVtbl; }; #ifdef COBJMACROS #define ContextMenu_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define ContextMenu_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define ContextMenu_Release(This) ( (This)->lpVtbl -> Release(This) ) #define ContextMenu_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define ContextMenu_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define ContextMenu_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define ContextMenu_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define ContextMenu_get__NewEnum(This,retval) ( (This)->lpVtbl -> get__NewEnum(This,retval) ) #define ContextMenu_get_Item(This,IndexOrPath,MenuItem) ( (This)->lpVtbl -> get_Item(This,IndexOrPath,MenuItem) ) #define ContextMenu_get_Count(This,Count) ( (This)->lpVtbl -> get_Count(This,Count) ) #endif #endif #ifndef __MenuItem_INTERFACE_DEFINED__ #define __MenuItem_INTERFACE_DEFINED__ extern const IID IID_MenuItem; typedef struct MenuItemVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (MenuItem * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (MenuItem * This); ULONG(STDMETHODCALLTYPE * Release) (MenuItem * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (MenuItem * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (MenuItem * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (MenuItem * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (MenuItem * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get_DisplayName) (MenuItem * This, PBSTR DisplayName); HRESULT(STDMETHODCALLTYPE * get_LanguageIndependentName) (MenuItem * This, PBSTR LanguageIndependentName); HRESULT(STDMETHODCALLTYPE * get_Path) (MenuItem * This, PBSTR Path); HRESULT(STDMETHODCALLTYPE * get_LanguageIndependentPath) (MenuItem * This, PBSTR LanguageIndependentPath); HRESULT(STDMETHODCALLTYPE * Execute) (MenuItem * This); HRESULT(STDMETHODCALLTYPE * get_Enabled) (MenuItem * This, PBOOL Enabled); END_INTERFACE } MenuItemVtbl; interface MenuItem { CONST_VTBL struct MenuItemVtbl *lpVtbl; }; #ifdef COBJMACROS #define MenuItem_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define MenuItem_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define MenuItem_Release(This) ( (This)->lpVtbl -> Release(This) ) #define MenuItem_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define MenuItem_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define MenuItem_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define MenuItem_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define MenuItem_get_DisplayName(This,DisplayName) ( (This)->lpVtbl -> get_DisplayName(This,DisplayName) ) #define MenuItem_get_LanguageIndependentName(This,LanguageIndependentName) ( (This)->lpVtbl -> get_LanguageIndependentName(This,LanguageIndependentName) ) #define MenuItem_get_Path(This,Path) ( (This)->lpVtbl -> get_Path(This,Path) ) #define MenuItem_get_LanguageIndependentPath(This,LanguageIndependentPath) ( (This)->lpVtbl -> get_LanguageIndependentPath(This,LanguageIndependentPath) ) #define MenuItem_Execute(This) ( (This)->lpVtbl -> Execute(This) ) #define MenuItem_get_Enabled(This,Enabled) ( (This)->lpVtbl -> get_Enabled(This,Enabled) ) #endif #endif #ifndef __Properties_INTERFACE_DEFINED__ #define __Properties_INTERFACE_DEFINED__ extern const IID IID_Properties; typedef struct PropertiesVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Properties * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Properties * This); ULONG(STDMETHODCALLTYPE * Release) (Properties * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Properties * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Properties * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Properties * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Properties * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get__NewEnum) (Properties * This, IUnknown ** retval); HRESULT(STDMETHODCALLTYPE * Item) (Properties * This, BSTR Name, PPPROPERTY Property); HRESULT(STDMETHODCALLTYPE * get_Count) (Properties * This, PLONG Count); HRESULT(STDMETHODCALLTYPE * Remove) (Properties * This, BSTR Name); END_INTERFACE } PropertiesVtbl; interface Properties { CONST_VTBL struct PropertiesVtbl *lpVtbl; }; #ifdef COBJMACROS #define Properties_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Properties_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Properties_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Properties_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Properties_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Properties_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Properties_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Properties_get__NewEnum(This,retval) ( (This)->lpVtbl -> get__NewEnum(This,retval) ) #define Properties_Item(This,Name,Property) ( (This)->lpVtbl -> Item(This,Name,Property) ) #define Properties_get_Count(This,Count) ( (This)->lpVtbl -> get_Count(This,Count) ) #define Properties_Remove(This,Name) ( (This)->lpVtbl -> Remove(This,Name) ) #endif #endif #ifndef __Property_INTERFACE_DEFINED__ #define __Property_INTERFACE_DEFINED__ extern const IID IID_Property; typedef struct PropertyVtbl { BEGIN_INTERFACE HRESULT(STDMETHODCALLTYPE * QueryInterface) (Property * This, REFIID riid, void **ppvObject); ULONG(STDMETHODCALLTYPE * AddRef) (Property * This); ULONG(STDMETHODCALLTYPE * Release) (Property * This); HRESULT(STDMETHODCALLTYPE * GetTypeInfoCount) (Property * This, UINT * pctinfo); HRESULT(STDMETHODCALLTYPE * GetTypeInfo) (Property * This, UINT iTInfo, LCID lcid, ITypeInfo ** ppTInfo); HRESULT(STDMETHODCALLTYPE * GetIDsOfNames) (Property * This, REFIID riid, LPOLESTR * rgszNames, UINT cNames, LCID lcid, DISPID * rgDispId); HRESULT(STDMETHODCALLTYPE * Invoke) (Property * This, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS * pDispParams, VARIANT * pVarResult, EXCEPINFO * pExcepInfo, UINT * puArgErr); HRESULT(STDMETHODCALLTYPE * get_Value) (Property * This, PVARIANT Value); HRESULT(STDMETHODCALLTYPE * put_Value) (Property * This, VARIANT Value); HRESULT(STDMETHODCALLTYPE * get_Name) (Property * This, PBSTR Name); END_INTERFACE } PropertyVtbl; interface Property { CONST_VTBL struct PropertyVtbl *lpVtbl; }; #ifdef COBJMACROS #define Property_QueryInterface(This,riid,ppvObject) ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define Property_AddRef(This) ( (This)->lpVtbl -> AddRef(This) ) #define Property_Release(This) ( (This)->lpVtbl -> Release(This) ) #define Property_GetTypeInfoCount(This,pctinfo) ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) #define Property_GetTypeInfo(This,iTInfo,lcid,ppTInfo) ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) #define Property_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) #define Property_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) #define Property_get_Value(This,Value) ( (This)->lpVtbl -> get_Value(This,Value) ) #define Property_put_Value(This,Value) ( (This)->lpVtbl -> put_Value(This,Value) ) #define Property_get_Name(This,Name) ( (This)->lpVtbl -> get_Name(This,Name) ) #endif #endif #endif #endif extern RPC_IF_HANDLE __MIDL_itf_mmcobj_0001_0042_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_mmcobj_0001_0042_v0_0_s_ifspec; unsigned long __RPC_USER VARIANT_UserSize(unsigned long *, unsigned long, VARIANT *); unsigned char *__RPC_USER VARIANT_UserMarshal(unsigned long *, unsigned char *, VARIANT *); unsigned char *__RPC_USER VARIANT_UserUnmarshal(unsigned long *, unsigned char *, VARIANT *); void __RPC_USER VARIANT_UserFree(unsigned long *, VARIANT *); unsigned long __RPC_USER VARIANT_UserSize64(unsigned long *, unsigned long, VARIANT *); unsigned char *__RPC_USER VARIANT_UserMarshal64(unsigned long *, unsigned char *, VARIANT *); unsigned char *__RPC_USER VARIANT_UserUnmarshal64(unsigned long *, unsigned char *, VARIANT *); void __RPC_USER VARIANT_UserFree64(unsigned long *, VARIANT *); #endif
Java
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ /* * Copyright (C) 2008 Sven Herzberg * * 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 */ #ifndef __DH_ASSISTANT_VIEW_H__ #define __DH_ASSISTANT_VIEW_H__ #include <webkit/webkit.h> #include "dh-base.h" #include "dh-link.h" G_BEGIN_DECLS #define DH_TYPE_ASSISTANT_VIEW (dh_assistant_view_get_type ()) #define DH_ASSISTANT_VIEW(i) (G_TYPE_CHECK_INSTANCE_CAST ((i), DH_TYPE_ASSISTANT_VIEW, DhAssistantView)) #define DH_ASSISTANT_VIEW_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), DH_TYPE_ASSISTANT_VIEW, DhAssistantViewClass)) #define DH_IS_ASSISTANT_VIEW(i) (G_TYPE_CHECK_INSTANCE_TYPE ((i), DH_TYPE_ASSISTANT_VIEW)) #define DH_IS_ASSISTANT_VIEW_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), DH_ASSISTANT_VIEW)) #define DH_ASSISTANT_VIEW_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS ((i), DH_TYPE_ASSISTANT_VIEW, DhAssistantView)) typedef struct _DhAssistantView DhAssistantView; typedef struct _DhAssistantViewClass DhAssistantViewClass; struct _DhAssistantView { WebKitWebView parent_instance; }; struct _DhAssistantViewClass { WebKitWebViewClass parent_class; }; GType dh_assistant_view_get_type (void) G_GNUC_CONST; GtkWidget* dh_assistant_view_new (void); gboolean dh_assistant_view_search (DhAssistantView *view, const gchar *str); DhBase* dh_assistant_view_get_base (DhAssistantView *view); void dh_assistant_view_set_base (DhAssistantView *view, DhBase *base); gboolean dh_assistant_view_set_link (DhAssistantView *view, DhLink *link); G_END_DECLS #endif /* __DH_ASSISTANT_VIEW_H__ */
Java
/* ========================================== * JGraphT : a free Java graph-theory library * ========================================== * * Project Info: http://jgrapht.sourceforge.net/ * Project Creator: Barak Naveh (http://sourceforge.net/users/barak_naveh) * * (C) Copyright 2003-2008, by Barak Naveh and Contributors. * * 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. */ /* ------------------------- * GraphEdgeChangeEvent.java * ------------------------- * (C) Copyright 2003-2008, by Barak Naveh and Contributors. * * Original Author: Barak Naveh * Contributor(s): Christian Hammer * * $Id: GraphEdgeChangeEvent.java 645 2008-09-30 19:44:48Z perfecthash $ * * Changes * ------- * 10-Aug-2003 : Initial revision (BN); * 11-Mar-2004 : Made generic (CH); * */ package edu.nd.nina.event; /** * An event which indicates that a graph edge has changed, or is about to * change. The event can be used either as an indication <i>after</i> the edge * has been added or removed, or <i>before</i> it is added. The type of the * event can be tested using the {@link * edu.nd.nina.event.GraphChangeEvent#getType()} method. * * @author Barak Naveh * @since Aug 10, 2003 */ public class GraphEdgeChangeEvent<V, E> extends GraphChangeEvent { //~ Static fields/initializers --------------------------------------------- private static final long serialVersionUID = 3618134563335844662L; /** * Before edge added event. This event is fired before an edge is added to a * graph. */ public static final int BEFORE_EDGE_ADDED = 21; /** * Before edge removed event. This event is fired before an edge is removed * from a graph. */ public static final int BEFORE_EDGE_REMOVED = 22; /** * Edge added event. This event is fired after an edge is added to a graph. */ public static final int EDGE_ADDED = 23; /** * Edge removed event. This event is fired after an edge is removed from a * graph. */ public static final int EDGE_REMOVED = 24; //~ Instance fields -------------------------------------------------------- /** * The edge that this event is related to. */ protected E edge; //~ Constructors ----------------------------------------------------------- /** * Constructor for GraphEdgeChangeEvent. * * @param eventSource the source of this event. * @param type the event type of this event. * @param e the edge that this event is related to. */ public GraphEdgeChangeEvent(Object eventSource, int type, E e) { super(eventSource, type); edge = e; } //~ Methods ---------------------------------------------------------------- /** * Returns the edge that this event is related to. * * @return the edge that this event is related to. */ public E getEdge() { return edge; } } // End GraphEdgeChangeEvent.java
Java
<?php /* * * ____ _ _ __ __ _ __ __ ____ * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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\level\format\mcregion; use pocketmine\level\format\FullChunk; use pocketmine\level\format\LevelProvider; use pocketmine\nbt\NBT; use pocketmine\nbt\tag\Byte; use pocketmine\nbt\tag\ByteArray; use pocketmine\nbt\tag\Compound; use pocketmine\nbt\tag\Enum; use pocketmine\nbt\tag\Int; use pocketmine\nbt\tag\IntArray; use pocketmine\nbt\tag\Long; use pocketmine\utils\Binary; use pocketmine\utils\ChunkException; use pocketmine\utils\MainLogger; class RegionLoader{ const VERSION = 1; const COMPRESSION_GZIP = 1; const COMPRESSION_ZLIB = 2; const MAX_SECTOR_LENGTH = 256 << 12; //256 sectors, (1 MiB) public static $COMPRESSION_LEVEL = 7; protected $x; protected $z; protected $filePath; protected $filePointer; protected $lastSector; /** @var LevelProvider */ protected $levelProvider; protected $locationTable = []; public $lastUsed; public function __construct(LevelProvider $level, $regionX, $regionZ){ $this->x = $regionX; $this->z = $regionZ; $this->levelProvider = $level; $this->filePath = $this->levelProvider->getPath() . "region/r.$regionX.$regionZ.mcr"; $exists = file_exists($this->filePath); touch($this->filePath); $this->filePointer = fopen($this->filePath, "r+b"); stream_set_read_buffer($this->filePointer, 1024 * 16); //16KB stream_set_write_buffer($this->filePointer, 1024 * 16); //16KB if(!$exists){ $this->createBlank(); }else{ $this->loadLocationTable(); } $this->lastUsed = time(); } public function __destruct(){ if(is_resource($this->filePointer)){ $this->writeLocationTable(); fclose($this->filePointer); } } protected function isChunkGenerated($index){ return !($this->locationTable[$index][0] === 0 or $this->locationTable[$index][1] === 0); } public function readChunk($x, $z, $generate = true, $forward = false){ $index = self::getChunkOffset($x, $z); if($index < 0 or $index >= 4096){ return null; } $this->lastUsed = time(); if(!$this->isChunkGenerated($index)){ if($generate === true){ //Allocate space $this->locationTable[$index][0] = ++$this->lastSector; $this->locationTable[$index][1] = 1; fseek($this->filePointer, $this->locationTable[$index][0] << 12); fwrite($this->filePointer, str_pad(Binary::writeInt(0) . chr(self::COMPRESSION_ZLIB), 4096, "\x00", STR_PAD_RIGHT)); $this->writeLocationIndex($index); }else{ return null; } } fseek($this->filePointer, $this->locationTable[$index][0] << 12); $length = Binary::readInt(fread($this->filePointer, 4)); $compression = ord(fgetc($this->filePointer)); if($length <= 0 or $length > self::MAX_SECTOR_LENGTH){ //Not yet generated / corrupted if($length >= self::MAX_SECTOR_LENGTH){ $this->locationTable[$index][0] = ++$this->lastSector; $this->locationTable[$index][1] = 1; MainLogger::getLogger()->error("Corrupted chunk header detected"); } $this->generateChunk($x, $z); fseek($this->filePointer, $this->locationTable[$index][0] << 12); $length = Binary::readInt(fread($this->filePointer, 4)); $compression = ord(fgetc($this->filePointer)); } if($length > ($this->locationTable[$index][1] << 12)){ //Invalid chunk, bigger than defined number of sectors MainLogger::getLogger()->error("Corrupted bigger chunk detected"); $this->locationTable[$index][1] = $length >> 12; $this->writeLocationIndex($index); }elseif($compression !== self::COMPRESSION_ZLIB and $compression !== self::COMPRESSION_GZIP){ MainLogger::getLogger()->error("Invalid compression type"); return null; } $chunk = Chunk::fromBinary(fread($this->filePointer, $length - 1), $this->levelProvider); if($chunk instanceof Chunk){ return $chunk; }elseif($forward === false){ MainLogger::getLogger()->error("Corrupted chunk detected"); $this->generateChunk($x, $z); return $this->readChunk($x, $z, $generate, true); }else{ return null; } } public function chunkExists($x, $z){ return $this->isChunkGenerated(self::getChunkOffset($x, $z)); } public function generateChunk($x, $z){ $nbt = new Compound("Level", []); $nbt->xPos = new Int("xPos", ($this->getX() * 32) + $x); $nbt->zPos = new Int("zPos", ($this->getZ() * 32) + $z); $nbt->LastUpdate = new Long("LastUpdate", 0); $nbt->LightPopulated = new Byte("LightPopulated", 0); $nbt->TerrainPopulated = new Byte("TerrainPopulated", 0); $nbt->V = new Byte("V", self::VERSION); $nbt->InhabitedTime = new Long("InhabitedTime", 0); $nbt->Biomes = new ByteArray("Biomes", str_repeat(Binary::writeByte(-1), 256)); $nbt->HeightMap = new IntArray("HeightMap", array_fill(0, 256, 127)); $nbt->BiomeColors = new IntArray("BiomeColors", array_fill(0, 256, Binary::readInt("\x00\x85\xb2\x4a"))); $nbt->Blocks = new ByteArray("Blocks", str_repeat("\x00", 32768)); $nbt->Data = new ByteArray("Data", $half = str_repeat("\x00", 16384)); $nbt->SkyLight = new ByteArray("SkyLight", $half); $nbt->BlockLight = new ByteArray("BlockLight", $half); $nbt->Entities = new Enum("Entities", []); $nbt->Entities->setTagType(NBT::TAG_Compound); $nbt->TileEntities = new Enum("TileEntities", []); $nbt->TileEntities->setTagType(NBT::TAG_Compound); $nbt->TileTicks = new Enum("TileTicks", []); $nbt->TileTicks->setTagType(NBT::TAG_Compound); $writer = new NBT(NBT::BIG_ENDIAN); $nbt->setName("Level"); $writer->setData(new Compound("", ["Level" => $nbt])); $chunkData = $writer->writeCompressed(ZLIB_ENCODING_DEFLATE, self::$COMPRESSION_LEVEL); if($chunkData !== false){ $this->saveChunk($x, $z, $chunkData); } } protected function saveChunk($x, $z, $chunkData){ $length = strlen($chunkData) + 1; if($length + 4 > self::MAX_SECTOR_LENGTH){ throw new ChunkException("Chunk is too big! ".($length + 4)." > ".self::MAX_SECTOR_LENGTH); } $sectors = (int) ceil(($length + 4) / 4096); $index = self::getChunkOffset($x, $z); if($this->locationTable[$index][1] < $sectors){ $this->locationTable[$index][0] = $this->lastSector + 1; $this->lastSector += $sectors; //The GC will clean this shift "later" } $this->locationTable[$index][1] = $sectors; $this->locationTable[$index][2] = time(); fseek($this->filePointer, $this->locationTable[$index][0] << 12); fwrite($this->filePointer, str_pad(Binary::writeInt($length) . chr(self::COMPRESSION_ZLIB) . $chunkData, $sectors << 12, "\x00", STR_PAD_RIGHT)); $this->writeLocationIndex($index); } public function removeChunk($x, $z){ $index = self::getChunkOffset($x, $z); $this->locationTable[$index][0] = 0; $this->locationTable[$index][1] = 0; } public function writeChunk(FullChunk $chunk){ $this->lastUsed = time(); $chunkData = $chunk->toBinary(); if($chunkData !== false){ $this->saveChunk($chunk->getX() - ($this->getX() * 32), $chunk->getZ() - ($this->getZ() * 32), $chunkData); } } protected static function getChunkOffset($x, $z){ return $x + ($z << 5); } public function close(){ $this->writeLocationTable(); fclose($this->filePointer); $this->levelProvider = null; } public function doSlowCleanUp(){ for($i = 0; $i < 1024; ++$i){ if($this->locationTable[$i][0] === 0 or $this->locationTable[$i][1] === 0){ continue; } fseek($this->filePointer, $this->locationTable[$i][0] << 12); $chunk = fread($this->filePointer, $this->locationTable[$i][1] << 12); $length = Binary::readInt(substr($chunk, 0, 4)); if($length <= 1){ $this->locationTable[$i] = [0, 0, 0]; //Non-generated chunk, remove it from index } try{ $chunk = zlib_decode(substr($chunk, 5)); }catch(\Exception $e){ $this->locationTable[$i] = [0, 0, 0]; //Corrupted chunk, remove it continue; } $chunk = chr(self::COMPRESSION_ZLIB) . zlib_encode($chunk, ZLIB_ENCODING_DEFLATE, 9); $chunk = Binary::writeInt(strlen($chunk)) . $chunk; $sectors = (int) ceil(strlen($chunk) / 4096); if($sectors > $this->locationTable[$i][1]){ $this->locationTable[$i][0] = $this->lastSector + 1; $this->lastSector += $sectors; } fseek($this->filePointer, $this->locationTable[$i][0] << 12); fwrite($this->filePointer, str_pad($chunk, $sectors << 12, "\x00", STR_PAD_RIGHT)); } $this->writeLocationTable(); $n = $this->cleanGarbage(); $this->writeLocationTable(); return $n; } private function cleanGarbage(){ $sectors = []; foreach($this->locationTable as $index => $data){ //Calculate file usage if($data[0] === 0 or $data[1] === 0){ $this->locationTable[$index] = [0, 0, 0]; continue; } for($i = 0; $i < $data[1]; ++$i){ $sectors[$data[0]] = $index; } } if(count($sectors) === ($this->lastSector - 2)){ //No collection needed return 0; } ksort($sectors); $shift = 0; $lastSector = 1; //First chunk - 1 fseek($this->filePointer, 8192); $sector = 2; foreach($sectors as $sector => $index){ if(($sector - $lastSector) > 1){ $shift += $sector - $lastSector - 1; } if($shift > 0){ fseek($this->filePointer, $sector << 12); $old = fread($this->filePointer, 4096); fseek($this->filePointer, ($sector - $shift) << 12); fwrite($this->filePointer, $old, 4096); } $this->locationTable[$index][0] -= $shift; $lastSector = $sector; } ftruncate($this->filePointer, ($sector + 1) << 12); //Truncate to the end of file written return $shift; } protected function loadLocationTable(){ fseek($this->filePointer, 0); $this->lastSector = 1; $table = fread($this->filePointer, 4 * 1024 * 2); //1024 records * 4 bytes * 2 times for($i = 0; $i < 1024; ++$i){ $index = unpack("N", substr($table, $i << 2, 4))[1]; $this->locationTable[$i] = [$index >> 8, $index & 0xff, unpack("N", substr($table, 4096 + ($i << 2), 4))[1]]; if(($this->locationTable[$i][0] + $this->locationTable[$i][1] - 1) > $this->lastSector){ $this->lastSector = $this->locationTable[$i][0] + $this->locationTable[$i][1] - 1; } } } private function writeLocationTable(){ $write = []; for($i = 0; $i < 1024; ++$i){ $write[] = (($this->locationTable[$i][0] << 8) | $this->locationTable[$i][1]); } for($i = 0; $i < 1024; ++$i){ $write[] = $this->locationTable[$i][2]; } fseek($this->filePointer, 0); fwrite($this->filePointer, pack("N*", ...$write), 4096 * 2); } protected function writeLocationIndex($index){ fseek($this->filePointer, $index << 2); fwrite($this->filePointer, Binary::writeInt(($this->locationTable[$index][0] << 8) | $this->locationTable[$index][1]), 4); fseek($this->filePointer, 4096 + ($index << 2)); fwrite($this->filePointer, Binary::writeInt($this->locationTable[$index][2]), 4); } protected function createBlank(){ fseek($this->filePointer, 0); ftruncate($this->filePointer, 0); $this->lastSector = 1; $table = ""; for($i = 0; $i < 1024; ++$i){ $this->locationTable[$i] = [0, 0]; $table .= Binary::writeInt(0); } $time = time(); for($i = 0; $i < 1024; ++$i){ $this->locationTable[$i][2] = $time; $table .= Binary::writeInt($time); } fwrite($this->filePointer, $table, 4096 * 2); } public function getX(){ return $this->x; } public function getZ(){ return $this->z; } }
Java
#PBS -S /bin/bash #PBS -N mnakao_job #PBS -A XMPTCA #PBS -q tcaq-q1 #PBS -l select=1:ncpus=1:host=tcag-0001-eth0+1:ncpus=1:host=tcag-0002-eth0+1:ncpus=1:host=tcag-0003-eth0+1:ncpus=1:host=tcag-0004-eth0+1:ncpus=1:host=tcag-0005-eth0+1:ncpus=1:host=tcag-0006-eth0+1:ncpus=1:host=tcag-0007-eth0+1:ncpus=1:host=tcag-0008-eth0 #PBS -l walltime=00:01:00 . /opt/Modules/default/init/bash #--------------- # select=NODES:ncpus=CORES:mpiprocs=PROCS:ompthreads=THREADS:mem=MEMORY # NODES : num of nodes # CORES : num of cores per node # PROCS : num of procs per node # THREADS : num of threads per process #---------------- NP=8 module purge module load cuda/6.5.14 mvapich2-gdr/2.0_gnu_cuda-6.5 export LD_LIBRARY_PATH=/work/XMPTCA/mnakao/omni-compiler/PEACH2:$LD_LIBRARY_PATH cd $PBS_O_WORKDIR OPT="MV2_GPUDIRECT_LIMIT=4194304 MV2_ENABLE_AFFINITY=0 MV2_SHOW_CPU_BINDING=1 numactl --cpunodebind=0 --localalloc" for i in $(seq 1 10) do mpirun_rsh -np $NP -hostfile $PBS_NODEFILE $OPT ./L done
Java
<?php namespace Pardisan\Support\Facades; use Illuminate\Support\Facades\Facade; class Menu extends Facade { /** * Get the registered name of the component. * * @return string */ protected static function getFacadeAccessor() { return 'menu'; } }
Java
package edu.mit.blocks.codeblockutil; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.RenderingHints; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.geom.AffineTransform; import java.awt.geom.GeneralPath; import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.JToolTip; import javax.swing.KeyStroke; import javax.swing.border.Border; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import edu.mit.blocks.renderable.BlockLabel; public class LabelWidget extends JComponent { public static final int DROP_DOWN_MENU_WIDTH = 7; private static final long serialVersionUID = 837647234895L; /** Border of textfield*/ private static final Border textFieldBorder = new CompoundBorder(BorderFactory.createLoweredBevelBorder(), new EmptyBorder(1, 2, 1, 2)); /** Number formatter for this label */ private static final NumberFormatter nf = new NumberFormatter(NumberFormatter.MEDIUM_PRECISION); /** Label that is visable iff editingText is false */ private final ShadowLabel textLabel = new ShadowLabel(); /** TextField that is visable iff editingText is true */ private final BlockLabelTextField textField = new BlockLabelTextField(); /** drop down menu icon */ private final LabelMenu menu = new LabelMenu(); ; /** The label text before user begins edit (applies only to editable labels)*/ private String labelBeforeEdit = ""; /** If this is a number, then only allow nagatvie signs and periods at certain spots */ private boolean isNumber = false; /** Is labelText editable by the user -- default true */ private boolean isEditable = false; /** If focus is true, then show the combo pop up menu */ private boolean isFocused = false; /** Has ComboPopup accessable selections */ private boolean hasSiblings = false; /** True if TEXTFIELD is being edited by user. */ private boolean editingText; /** the background color of the tooltip */ private Color tooltipBackground = new Color(255, 255, 225); private double zoom = 1.0; private BlockLabel blockLabel; /** * BlockLabel Constructor that takes in BlockID as well. * Unfortunately BlockID is needed, so the label can redirect mouse actions. * */ public LabelWidget(String initLabelText, Color fieldColor, Color tooltipBackground) { if (initLabelText == null) { initLabelText = ""; } this.setFocusTraversalKeysEnabled(false);//MOVE DEFAULT FOCUS TRAVERSAL KEYS SUCH AS TABS this.setLayout(new BorderLayout()); this.tooltipBackground = tooltipBackground; this.labelBeforeEdit = initLabelText; //set up textfield colors textField.setForeground(Color.WHITE);//white text textField.setBackground(fieldColor);//background matching block color textField.setCaretColor(Color.WHITE);//white caret textField.setSelectionColor(Color.BLACK);//black highlight textField.setSelectedTextColor(Color.WHITE);//white text when highlighted textField.setBorder(textFieldBorder); textField.setMargin(textFieldBorder.getBorderInsets(textField)); } public void setBlockLabel(BlockLabel blockLabel) { this.blockLabel = blockLabel; } protected void fireTextChanged(String text) { blockLabel.textChanged(text); } protected void fireGenusChanged(String genus) { blockLabel.genusChanged(genus); } protected void fireDimensionsChanged(Dimension value) { blockLabel.dimensionsChanged(value); } protected boolean isTextValid(String text) { return blockLabel.textValid(text); } public void addKeyListenerToTextField(KeyListener l) { textField.addKeyListener(l); } public void addMouseListenerToLabel(MouseListener l) { textLabel.addMouseListener(l); } public void addMouseMotionListenerToLabel(MouseMotionListener l) { textLabel.addMouseMotionListener(l); } ////////////////////////////// //// LABEL CONFIGURATION ///// ///////////////////////////// public void showMenuIcon(boolean show) { if (this.hasSiblings) { isFocused = show; // repaints the menu and items with the new zoom level menu.popupmenu.setZoomLevel(zoom); menu.repaint(); } } /** * setEditingState sets the current editing state of the BlockLabel. * Repaints BlockLabel to reflect the change. */ public void setEditingState(boolean editing) { if (editing) { editingText = true; textField.setText(textLabel.getText().trim()); labelBeforeEdit = textLabel.getText(); this.removeAll(); this.add(textField); textField.grabFocus(); } else { //update to current textfield.text //if text entered was not empty and if it was editing before if (editingText) { //make sure to remove leading and trailing spaces before testing if text is valid //TODO if allow labels to have leading and trailing spaces, will need to modify this if statement if (isTextValid(textField.getText().trim())) { setText(textField.getText()); } else { setText(labelBeforeEdit); } } editingText = false; } } /** * editingText returns if BlockLable is being edited * @return editingText */ public boolean editingText() { return editingText; } /** * setEditable state of BlockLabel * @param isEditable specifying editable state of BlockLabel */ public void setEditable(boolean isEditable) { this.isEditable = isEditable; } /** * isEditable returns if BlockLable is editable * @return isEditable */ public boolean isEditable() { return isEditable; } public void setNumeric(boolean isNumber) { this.isNumber = isNumber; } /** * isEditable returns if BlockLable is editable * @return isEditable */ public boolean isNumeric() { return isNumber; } public void setSiblings(boolean hasSiblings, String[][] siblings) { this.hasSiblings = hasSiblings; this.menu.setSiblings(siblings); } public boolean hasSiblings() { return this.hasSiblings; } /** * set up fonts * @param font */ public void setFont(Font font) { super.setFont(font); textLabel.setFont(font); textField.setFont(font); menu.setFont(font); } /** * sets the tool tip of the label */ public void assignToolTipToLabel(String text) { this.textLabel.setToolTipText(text); } /** * getText * @return String of the current BlockLabel */ public String getText() { return textLabel.getText().trim(); } /** * setText to a NumberFormatted double * @param value */ public void setText(double value) { //check for +/- Infinity if (Math.abs(value - Double.MAX_VALUE) < 1) { updateLabelText("Infinity"); } else if (Math.abs(value + Double.MAX_VALUE) < 1) { updateLabelText("-Infinity"); } else { updateLabelText(nf.format(value)); } } /** * setText to a String (trimmed to remove excess spaces) * @param string */ public void setText(String string) { if (string != null) { updateLabelText(string.trim()); } } /** * setText to a boolean * @param bool */ public void setText(boolean bool) { updateLabelText(bool ? "True" : "False"); } /** * updateLabelText updates labelText and sychronizes textField and textLabel to it * @param text */ public void updateLabelText(String text) { //leave some space to click on if (text.equals("")) { text = " "; } //update the text everywhere textLabel.setText(text); textField.setText(text); //resize to new text updateDimensions(); //the blockLabel needs to update the data in Block this.fireTextChanged(text); //show text label and additional ComboPopup if one exists this.removeAll(); this.add(textLabel, BorderLayout.CENTER); if (hasSiblings) { this.add(menu, BorderLayout.EAST); } } //////////////////// //// RENDERING ///// //////////////////// /** * Updates the dimensions of the textRect, textLabel, and textField to the minimum size needed * to contain all of the text in the current font. */ private void updateDimensions() { Dimension updatedDimension = new Dimension( textField.getPreferredSize().width, textField.getPreferredSize().height); if (this.hasSiblings) { updatedDimension.width += LabelWidget.DROP_DOWN_MENU_WIDTH; } textField.setSize(updatedDimension); textLabel.setSize(updatedDimension); this.setSize(updatedDimension); this.fireDimensionsChanged(this.getSize()); } /** * high lights the text of the editing text field from * 0 to the end of textfield */ public void highlightText() { this.textField.setSelectionStart(0); } /** * Toggles the visual suggestion that this label may be editable depending on the specified * suggest flag and properties of the block and label. If suggest is true, the visual suggestion will display. Otherwise, nothing * is shown. For now, the visual suggestion is a simple white line boder. * Other requirements for indicator to show: * - label type must be NAME * - label must be editable * - block can not be a factory block * @param suggest */ protected void suggestEditable(boolean suggest) { if (isEditable) { if (suggest) { setBorder(BorderFactory.createLineBorder(Color.white));//show white border } else { setBorder(null);//hide white border } } } public void setZoomLevel(double newZoom) { this.zoom = newZoom; Font renderingFont;// = new Font(font.getFontName(), font.getStyle(), (int)(font.getSize()*newZoom)); AffineTransform at = new AffineTransform(); at.setToScale(newZoom, newZoom); renderingFont = this.getFont().deriveFont(at); this.setFont(renderingFont); this.repaint(); this.updateDimensions(); } public String toString() { return "Label at " + this.getLocation() + " with text: \"" + textLabel.getText() + "\""; } /** * returns true if this block should can accept a negative sign */ public boolean canProcessNegativeSign() { if (this.getText() != null && this.getText().contains("-")) { //if it already has a negative sign, //make sure we're highlighting it if (textField.getSelectedText() != null && textField.getSelectedText().contains("-")) { return true; } else { return false; } } else { //if it does not have negative sign, //make sure our highlight covers index 0 if (textField.getCaretPosition() == 0) { return true; } else { if (textField.getSelectionStart() == 0) { return true; } } } return false; } /** * BlockLabelTextField is a java JtextField that internally handles various events * and provides the semantic to interface with the user. Unliek typical JTextFields, * the blockLabelTextField allows clients to only enter certain keys board input. * It also reacts to enters and escapse by delegating the KeyEvent to the parent * RenderableBlock. */ private class BlockLabelTextField extends JTextField implements MouseListener, DocumentListener, FocusListener, ActionListener { private static final long serialVersionUID = 873847239234L; /** These Key inputs are processed by this text field */ private final char[] validNumbers = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '.'}; /** These Key inputs are processed by this text field if NOT a number block*/ private final char[] validChar = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '\'', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '-', '=', '{', '}', '|', '[', ']', '\\', ' ', ':', '"', ';', '\'', '<', '>', '?', ',', '.', '/', '`', '~'}; /** These Key inputs are processed by all this text field */ private final int[] validMasks = {KeyEvent.VK_BACK_SPACE, KeyEvent.VK_UP, KeyEvent.VK_DOWN, KeyEvent.VK_LEFT, KeyEvent.VK_RIGHT, KeyEvent.VK_END, KeyEvent.VK_HOME, '-', KeyEvent.VK_DELETE, KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL, InputEvent.SHIFT_MASK, InputEvent.SHIFT_DOWN_MASK}; /** * Contructs new block label text field */ private BlockLabelTextField() { this.addActionListener(this); this.getDocument().addDocumentListener(this); this.addFocusListener(this); this.addMouseListener(this); /* * Sets whether focus traversal keys are enabled * for this Component. Components for which focus * traversal keys are disabled receive key events * for focus traversal keys. */ this.setFocusTraversalKeysEnabled(false); } public void mousePressed(MouseEvent e) { } public void mouseReleased(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { } public void mouseExited(MouseEvent arg0) { //remove the white line border //note: make call here since text fields consume mouse events //preventing parent from responding to mouse exited events suggestEditable(false); } public void actionPerformed(ActionEvent e) { setEditingState(false); } public void changedUpdate(DocumentEvent e) { //listens for change in attributes } public void insertUpdate(DocumentEvent e) { updateDimensions(); } public void removeUpdate(DocumentEvent e) { updateDimensions(); } public void focusGained(FocusEvent e) { } public void focusLost(FocusEvent e) { setEditingState(false); } /** * for all user-generated AND/OR system generated key inputs, * either perform some action that should be triggered by * that key or */ protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) { if (isNumber) { if (e.getKeyChar() == '-' && canProcessNegativeSign()) { return super.processKeyBinding(ks, e, condition, pressed); } if (this.getText().contains(".") && e.getKeyChar() == '.') { return false; } for (char c : validNumbers) { if (e.getKeyChar() == c) { return super.processKeyBinding(ks, e, condition, pressed); } } } else { for (char c : validChar) { if (e.getKeyChar() == c) { return super.processKeyBinding(ks, e, condition, pressed); } } } for (int i : validMasks) { if (e.getKeyCode() == i) { return super.processKeyBinding(ks, e, condition, pressed); } } if ((e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) { return super.processKeyBinding(ks, e, condition, pressed); } return false; } } private class LabelMenu extends JPanel implements MouseListener, MouseMotionListener { private static final long serialVersionUID = 328149080240L; private CPopupMenu popupmenu; private GeneralPath triangle; private LabelMenu() { this.setOpaque(false); this.addMouseListener(this); this.addMouseMotionListener(this); this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); this.popupmenu = new CPopupMenu(); } /** * @param siblings = array of siblin's genus and initial label * { {genus, label}, {genus, label}, {genus, label} ....} */ private void setSiblings(String[][] siblings) { popupmenu = new CPopupMenu(); //if connected to a block, add self and add siblings for (int i = 0; i < siblings.length; i++) { final String selfGenus = siblings[i][0]; CMenuItem selfItem = new CMenuItem(siblings[i][1]); selfItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { fireGenusChanged(selfGenus); showMenuIcon(false); } }); popupmenu.add(selfItem); } } public boolean contains(Point p) { return triangle != null && triangle.contains(p); } public boolean contains(int x, int y) { return triangle != null && triangle.contains(x, y); } public void paint(Graphics g) { super.paint(g); if (isFocused) { Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); triangle = new GeneralPath(); triangle.moveTo(0, this.getHeight() / 4); triangle.lineTo(this.getWidth() - 1, this.getHeight() / 4); triangle.lineTo(this.getWidth() / 2 - 1, this.getHeight() / 4 + LabelWidget.DROP_DOWN_MENU_WIDTH); triangle.lineTo(0, this.getHeight() / 4); triangle.closePath(); g2.setColor(new Color(255, 255, 255, 100)); g2.fill(triangle); g2.setColor(Color.BLACK); g2.draw(triangle); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEvent e) { if (hasSiblings) { popupmenu.show(this, 0, 0); } } public void mouseReleased(MouseEvent e) { } public void mouseClicked(MouseEvent e) { } public void mouseDragged(MouseEvent e) { } public void mouseMoved(MouseEvent e) { } } /** * Much like a JLabel, only the text is displayed with a shadow like outline */ private class ShadowLabel extends JLabel implements MouseListener, MouseMotionListener { private static final long serialVersionUID = 90123787382L; //To get the shadow effect the text must be displayed multiple times at //multiple locations. x represents the center, white label. // o is color values (0,0,0,0.5f) and b is black. // o o // o x b o // o b o // o //offsetArrays representing the translation movement needed to get from // the center location to a specific offset location given in {{x,y},{x,y}....} //..........................................grey points.............................................black points private final int[][] shadowPositionArray = {{0, -1}, {1, -1}, {-1, 0}, {2, 0}, {-1, 1}, {1, 1}, {0, 2}, {1, 0}, {0, 1}}; private final float[] shadowColorArray = {0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0, 0}; private double offsetSize = 1; private ShadowLabel() { this.addMouseListener(this); this.addMouseMotionListener(this); } public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.addRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); //DO NOT DRAW SUPER's to prevent drawing of label's string. //Implecations: background not automatically drawn //super.paint(g); //draw shadows for (int i = 0; i < shadowPositionArray.length; i++) { int dx = shadowPositionArray[i][0]; int dy = shadowPositionArray[i][1]; g2.setColor(new Color(0, 0, 0, shadowColorArray[i])); g2.drawString(this.getText(), (int) ((4 + dx) * offsetSize), this.getHeight() + (int) ((dy - 6) * offsetSize)); } //draw main Text g2.setColor(Color.white); g2.drawString(this.getText(), (int) ((4) * offsetSize), this.getHeight() + (int) ((-6) * offsetSize)); } public JToolTip createToolTip() { return new CToolTip(tooltipBackground); } /** * Set to editing state upon mouse click if this block label is editable */ public void mouseClicked(MouseEvent e) { //if clicked and if the label is editable, if ((e.getClickCount() == 1) && isEditable) { //if clicked and if the label is editable, //then set it to the editing state when the label is clicked on setEditingState(true); textField.setSelectionStart(0); } } public void mousePressed(MouseEvent e) { } public void mouseReleased(MouseEvent e) { } public void mouseEntered(MouseEvent e) { suggestEditable(true); } public void mouseExited(MouseEvent e) { suggestEditable(false); } public void mouseDragged(MouseEvent e) { suggestEditable(false); } public void mouseMoved(MouseEvent e) { suggestEditable(true); } } }
Java
/* * This class was automatically generated with * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML * Schema. * $Id: CreditCardCreditModRqTypeDescriptor.java,v 1.1.1.1 2010-05-04 22:06:01 ryan Exp $ */ package org.chocolate_milk.model.descriptors; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import org.chocolate_milk.model.CreditCardCreditModRqType; /** * Class CreditCardCreditModRqTypeDescriptor. * * @version $Revision: 1.1.1.1 $ $Date: 2010-05-04 22:06:01 $ */ public class CreditCardCreditModRqTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * Field _elementDefinition. */ private boolean _elementDefinition; /** * Field _nsPrefix. */ private java.lang.String _nsPrefix; /** * Field _nsURI. */ private java.lang.String _nsURI; /** * Field _xmlName. */ private java.lang.String _xmlName; /** * Field _identity. */ private org.exolab.castor.xml.XMLFieldDescriptor _identity; //----------------/ //- Constructors -/ //----------------/ public CreditCardCreditModRqTypeDescriptor() { super(); _xmlName = "CreditCardCreditModRqType"; _elementDefinition = false; //-- set grouping compositor setCompositorAsSequence(); org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; org.exolab.castor.mapping.FieldHandler handler = null; org.exolab.castor.xml.FieldValidator fieldValidator = null; //-- initialize attribute descriptors //-- _requestID desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_requestID", "requestID", org.exolab.castor.xml.NodeType.Attribute); desc.setImmutable(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { @Override public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { CreditCardCreditModRqType target = (CreditCardCreditModRqType) object; return target.getRequestID(); } @Override public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { CreditCardCreditModRqType target = (CreditCardCreditModRqType) object; target.setRequestID( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } @Override @SuppressWarnings("unused") public java.lang.Object newInstance(java.lang.Object parent) { return null; } }; desc.setSchemaType("string"); desc.setHandler(handler); desc.setMultivalued(false); addFieldDescriptor(desc); //-- validation code for: _requestID fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.StringValidator typeValidator; typeValidator = new org.exolab.castor.xml.validators.StringValidator(); fieldValidator.setValidator(typeValidator); typeValidator.setWhiteSpace("preserve"); } desc.setValidator(fieldValidator); //-- initialize element descriptors //-- _creditCardCreditMod desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.chocolate_milk.model.CreditCardCreditMod.class, "_creditCardCreditMod", "CreditCardCreditMod", org.exolab.castor.xml.NodeType.Element); handler = new org.exolab.castor.xml.XMLFieldHandler() { @Override public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { CreditCardCreditModRqType target = (CreditCardCreditModRqType) object; return target.getCreditCardCreditMod(); } @Override public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { CreditCardCreditModRqType target = (CreditCardCreditModRqType) object; target.setCreditCardCreditMod( (org.chocolate_milk.model.CreditCardCreditMod) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } @Override @SuppressWarnings("unused") public java.lang.Object newInstance(java.lang.Object parent) { return null; } }; desc.setSchemaType("org.chocolate_milk.model.CreditCardCreditMod"); desc.setHandler(handler); desc.setRequired(true); desc.setMultivalued(false); addFieldDescriptor(desc); addSequenceElement(desc); //-- validation code for: _creditCardCreditMod fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(1); { //-- local scope } desc.setValidator(fieldValidator); //-- _includeRetElementList desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_includeRetElementList", "IncludeRetElement", org.exolab.castor.xml.NodeType.Element); desc.setImmutable(true); handler = new org.exolab.castor.xml.XMLFieldHandler() { @Override public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { CreditCardCreditModRqType target = (CreditCardCreditModRqType) object; return target.getIncludeRetElement(); } @Override public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException { try { CreditCardCreditModRqType target = (CreditCardCreditModRqType) object; target.addIncludeRetElement( (java.lang.String) value); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException { try { CreditCardCreditModRqType target = (CreditCardCreditModRqType) object; target.removeAllIncludeRetElement(); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } } @Override @SuppressWarnings("unused") public java.lang.Object newInstance(java.lang.Object parent) { return null; } }; desc.setSchemaType("list"); desc.setComponentType("string"); desc.setHandler(handler); desc.setMultivalued(true); addFieldDescriptor(desc); addSequenceElement(desc); //-- validation code for: _includeRetElementList fieldValidator = new org.exolab.castor.xml.FieldValidator(); fieldValidator.setMinOccurs(0); { //-- local scope org.exolab.castor.xml.validators.StringValidator typeValidator; typeValidator = new org.exolab.castor.xml.validators.StringValidator(); fieldValidator.setValidator(typeValidator); typeValidator.setWhiteSpace("preserve"); typeValidator.setMaxLength(50); } desc.setValidator(fieldValidator); } //-----------/ //- Methods -/ //-----------/ /** * Method getAccessMode. * * @return the access mode specified for this class. */ @Override() public org.exolab.castor.mapping.AccessMode getAccessMode( ) { return null; } /** * Method getIdentity. * * @return the identity field, null if this class has no * identity. */ @Override() public org.exolab.castor.mapping.FieldDescriptor getIdentity( ) { return _identity; } /** * Method getJavaClass. * * @return the Java class represented by this descriptor. */ @Override() public java.lang.Class getJavaClass( ) { return org.chocolate_milk.model.CreditCardCreditModRqType.class; } /** * Method getNameSpacePrefix. * * @return the namespace prefix to use when marshaling as XML. */ @Override() public java.lang.String getNameSpacePrefix( ) { return _nsPrefix; } /** * Method getNameSpaceURI. * * @return the namespace URI used when marshaling and * unmarshaling as XML. */ @Override() public java.lang.String getNameSpaceURI( ) { return _nsURI; } /** * Method getValidator. * * @return a specific validator for the class described by this * ClassDescriptor. */ @Override() public org.exolab.castor.xml.TypeValidator getValidator( ) { return this; } /** * Method getXMLName. * * @return the XML Name for the Class being described. */ @Override() public java.lang.String getXMLName( ) { return _xmlName; } /** * Method isElementDefinition. * * @return true if XML schema definition of this Class is that * of a global * element or element with anonymous type definition. */ public boolean isElementDefinition( ) { return _elementDefinition; } }
Java
/* * SonarQube, open source software quality management tool. * Copyright (C) 2008-2014 SonarSource * mailto:contact AT sonarsource DOT com * * SonarQube 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.api.technicaldebt.server.internal; import org.junit.Test; import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.WorkUnit; import org.sonar.api.utils.internal.WorkDuration; import static org.fest.assertions.Assertions.assertThat; public class DefaultCharacteristicTest { @Test public void test_setters_and_getters_for_characteristic() throws Exception { DefaultCharacteristic characteristic = new DefaultCharacteristic() .setId(1) .setKey("NETWORK_USE") .setName("Network use") .setOrder(5) .setParentId(2) .setRootId(2); assertThat(characteristic.id()).isEqualTo(1); assertThat(characteristic.key()).isEqualTo("NETWORK_USE"); assertThat(characteristic.name()).isEqualTo("Network use"); assertThat(characteristic.order()).isEqualTo(5); assertThat(characteristic.ruleKey()).isNull(); assertThat(characteristic.function()).isNull(); assertThat(characteristic.factorValue()).isNull(); assertThat(characteristic.factorUnit()).isNull(); assertThat(characteristic.offsetValue()).isNull(); assertThat(characteristic.offsetUnit()).isNull(); assertThat(characteristic.parentId()).isEqualTo(2); assertThat(characteristic.rootId()).isEqualTo(2); } @Test public void test_setters_and_getters_for_requirement() throws Exception { DefaultCharacteristic requirement = new DefaultCharacteristic() .setId(1) .setRuleKey(RuleKey.of("repo", "rule")) .setFunction("linear_offset") .setFactorValue(2) .setFactorUnit(WorkDuration.UNIT.MINUTES) .setOffsetValue(1) .setOffsetUnit(WorkDuration.UNIT.HOURS) .setRootId(3) .setParentId(2); assertThat(requirement.id()).isEqualTo(1); assertThat(requirement.key()).isNull(); assertThat(requirement.name()).isNull(); assertThat(requirement.order()).isNull(); assertThat(requirement.ruleKey()).isEqualTo(RuleKey.of("repo", "rule")); assertThat(requirement.function()).isEqualTo("linear_offset"); assertThat(requirement.factorValue()).isEqualTo(2); assertThat(requirement.factorUnit()).isEqualTo(WorkDuration.UNIT.MINUTES); assertThat(requirement.offsetValue()).isEqualTo(1); assertThat(requirement.offsetUnit()).isEqualTo(WorkDuration.UNIT.HOURS); assertThat(requirement.parentId()).isEqualTo(2); assertThat(requirement.rootId()).isEqualTo(3); } @Test public void is_root() throws Exception { DefaultCharacteristic characteristic = new DefaultCharacteristic() .setId(1) .setKey("NETWORK_USE") .setName("Network use") .setOrder(5) .setParentId(null) .setRootId(null); assertThat(characteristic.isRoot()).isTrue(); } @Test public void is_requirement() throws Exception { DefaultCharacteristic requirement = new DefaultCharacteristic() .setId(1) .setRuleKey(RuleKey.of("repo", "rule")) .setFunction("linear_offset") .setFactorValue(2) .setFactorUnit(WorkDuration.UNIT.MINUTES) .setOffsetValue(1) .setOffsetUnit(WorkDuration.UNIT.HOURS) .setRootId(3) .setParentId(2); assertThat(requirement.isRequirement()).isTrue(); } @Test public void test_equals() throws Exception { assertThat(new DefaultCharacteristic().setKey("NETWORK_USE")).isEqualTo(new DefaultCharacteristic().setKey("NETWORK_USE")); assertThat(new DefaultCharacteristic().setKey("NETWORK_USE")).isNotEqualTo(new DefaultCharacteristic().setKey("MAINTABILITY")); assertThat(new DefaultCharacteristic().setRuleKey(RuleKey.of("repo", "rule"))).isEqualTo(new DefaultCharacteristic().setRuleKey(RuleKey.of("repo", "rule"))); assertThat(new DefaultCharacteristic().setRuleKey(RuleKey.of("repo", "rule"))).isNotEqualTo(new DefaultCharacteristic().setRuleKey(RuleKey.of("repo2", "rule2"))); } @Test public void test_hascode() throws Exception { assertThat(new DefaultCharacteristic().setKey("NETWORK_USE").hashCode()).isEqualTo(new DefaultCharacteristic().setKey("NETWORK_USE").hashCode()); assertThat(new DefaultCharacteristic().setKey("NETWORK_USE").hashCode()).isNotEqualTo(new DefaultCharacteristic().setKey("MAINTABILITY").hashCode()); assertThat(new DefaultCharacteristic().setRuleKey(RuleKey.of("repo", "rule")).hashCode()).isEqualTo(new DefaultCharacteristic().setRuleKey(RuleKey.of("repo", "rule")).hashCode()); assertThat(new DefaultCharacteristic().setRuleKey(RuleKey.of("repo", "rule")).hashCode()).isNotEqualTo(new DefaultCharacteristic().setRuleKey(RuleKey.of("repo2", "rule2")).hashCode()); } @Test public void test_deprecated_setters_and_getters_for_characteristic() throws Exception { DefaultCharacteristic requirement = new DefaultCharacteristic() .setId(1) .setRuleKey(RuleKey.of("repo", "rule")) .setFunction("linear_offset") .setFactor(WorkUnit.create(2d, WorkUnit.MINUTES)) .setOffset(WorkUnit.create(1d, WorkUnit.HOURS)); assertThat(requirement.factor()).isEqualTo(WorkUnit.create(2d, WorkUnit.MINUTES)); assertThat(requirement.offset()).isEqualTo(WorkUnit.create(1d, WorkUnit.HOURS)); assertThat(new DefaultCharacteristic() .setId(1) .setRuleKey(RuleKey.of("repo", "rule")) .setFunction("linear") .setFactor(WorkUnit.create(2d, WorkUnit.DAYS)) .factor()).isEqualTo(WorkUnit.create(2d, WorkUnit.DAYS)); } }
Java
/* * @BEGIN LICENSE * * Psi4: an open-source quantum chemistry software package * * Copyright (c) 2007-2018 The Psi4 Developers. * * The copyrights 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 __math_test_uhf_h__ #define __math_test_uhf_h__ #include "psi4/libpsio/psio.hpp" #include "hf.h" namespace psi { namespace scf { class UHF : public HF { protected: SharedMatrix Dt_, Dt_old_; SharedMatrix Da_old_, Db_old_; SharedMatrix Ga_, Gb_, J_, Ka_, Kb_, wKa_, wKb_; void form_initialF(); void form_C(); void form_V(); void form_D(); double compute_initial_E(); virtual double compute_E(); virtual bool stability_analysis(); bool stability_analysis_pk(); virtual void form_G(); virtual void form_F(); virtual void compute_orbital_gradient(bool save_diis); bool diis(); bool test_convergency(); void save_information(); void common_init(); void save_density_and_energy(); // Finalize memory/files virtual void finalize(); // Scaling factor for orbital rotation double step_scale_; // Increment to explore different scaling factors double step_increment_; // Stability eigenvalue, for doing smart eigenvector following double stab_val; // Compute UHF NOs void compute_nos(); // Damp down the density update virtual void damp_update(); // Second-order convergence code void Hx(SharedMatrix x_a, SharedMatrix IFock_a, SharedMatrix Cocc_a, SharedMatrix Cvir_a, SharedMatrix ret_a, SharedMatrix x_b, SharedMatrix IFock_b, SharedMatrix Cocc_b, SharedMatrix Cvir_b, SharedMatrix ret_b); virtual int soscf_update(void); public: UHF(SharedWavefunction ref_wfn, std::shared_ptr<SuperFunctional> functional); UHF(SharedWavefunction ref_wfn, std::shared_ptr<SuperFunctional> functional, Options& options, std::shared_ptr<PSIO> psio); virtual ~UHF(); virtual bool same_a_b_orbs() const { return false; } virtual bool same_a_b_dens() const { return false; } /// Hessian-vector computers and solvers virtual std::vector<SharedMatrix> onel_Hx(std::vector<SharedMatrix> x); virtual std::vector<SharedMatrix> twoel_Hx(std::vector<SharedMatrix> x, bool combine = true, std::string return_basis = "MO"); virtual std::vector<SharedMatrix> cphf_Hx(std::vector<SharedMatrix> x); virtual std::vector<SharedMatrix> cphf_solve(std::vector<SharedMatrix> x_vec, double conv_tol = 1.e-4, int max_iter = 10, int print_lvl = 1); std::shared_ptr<UHF> c1_deep_copy(std::shared_ptr<BasisSet> basis); }; }} #endif
Java
// Created file "Lib\src\ksuser\X64\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(IID_IKsAggregateControl, 0x7f40eac0, 0x3947, 0x11d2, 0x87, 0x4e, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96);
Java
/**************************************************************************** ** ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** 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 <QtCore/QString> #include <QtCore/QStringList> #include <QtCore/QList> #include <private/qobject_p.h> 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<QDeclarativeEnginePrivate::SimpleList<QDeclarativeAbstractBinding> > bindValues; QList<QDeclarativeEnginePrivate::SimpleList<QDeclarativeParserStatus> > parserStatus; QList<QPair<QDeclarativeGuard<QObject>, int> > finalizedParserStatus; QDeclarativeComponentAttached *componentAttached; QList<QDeclarativeError> errors; bool completePending; }; ConstructionState state; static QObject *begin(QDeclarativeContextData *parentContext, QDeclarativeContextData *componentCreationContext, QDeclarativeCompiledData *component, int start, int count, ConstructionState *state, QList<QDeclarativeError> *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<QDeclarativeComponentPrivate *>(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
Java
'use strict'; const chai = require('chai'); const assert = chai.assert; const sinon = require('sinon'); const responseError = require('../../../server/utils/errors/responseError'); describe('responseError', () => { let spyCall; const res = {}; let error = 'An error message'; beforeEach(() => { res.status = sinon.stub().returns(res); res.json = sinon.stub(); responseError(error, res); }); it('Calls response method with default(500) error code', () => { spyCall = res.status.getCall(0); assert.isTrue(res.status.calledOnce); assert.isTrue(spyCall.calledWithExactly(500)); }); it('Returns error wrapped in json response', () => { spyCall = res.json.getCall(0); assert.isTrue(res.json.calledOnce); assert.isObject(spyCall.args[0]); assert.property(spyCall.args[0], 'response', 'status'); }); it('Calls response method with custom error code', () => { error = { description: 'Bad request', status_code: 400, }; responseError(error, res); spyCall = res.status.getCall(0); assert.isTrue(res.status.called); assert.isTrue(res.status.calledWithExactly(400)); }); });
Java
/* * Copyright (c) 2009 Erin Catto http://www.box2d.org * * 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. */ #ifndef B2_DYNAMIC_TREE_H #define B2_DYNAMIC_TREE_H #include <Box2D/Collision/b2Collision.h> #include <Box2D/Common/b2GrowableStack.h> #define b2_nullNode (-1) /// A node in the dynamic tree. The client does not interact with this directly. struct b2TreeNode { bool IsLeaf() const { return child1 == b2_nullNode; } /// Enlarged AABB b2AABB aabb; void* userData; union { int32 parent; int32 next; }; int32 child1; int32 child2; // leaf = 0, free node = -1 int32 height; }; /// A dynamic AABB tree broad-phase, inspired by Nathanael Presson's btDbvt. /// A dynamic tree arranges data in a binary tree to accelerate /// queries such as volume queries and ray casts. Leafs are proxies /// with an AABB. In the tree we expand the proxy AABB by b2_fatAABBFactor /// so that the proxy AABB is bigger than the client object. This allows the client /// object to move by small amounts without triggering a tree update. /// /// Nodes are pooled and relocatable, so we use node indices rather than pointers. class b2DynamicTree { public: /// Constructing the tree initializes the node pool. b2DynamicTree(); /// Destroy the tree, freeing the node pool. ~b2DynamicTree(); /// create a proxy. Provide a tight fitting AABB and a userData pointer. int32 CreateProxy(const b2AABB& aabb, void* userData); /// Destroy a proxy. This asserts if the id is invalid. void DestroyProxy(int32 proxyId); /// Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, /// then the proxy is removed from the tree and re-inserted. Otherwise /// the function returns immediately. /// @return true if the proxy was re-inserted. bool MoveProxy(int32 proxyId, const b2AABB& aabb1, const b2Vec2& displacement); /// Get proxy user data. /// @return the proxy user data or 0 if the id is invalid. void* GetUserData(int32 proxyId) const; /// Get the fat AABB for a proxy. const b2AABB& GetFatAABB(int32 proxyId) const; /// Query an AABB for overlapping proxies. The callback class /// is called for each proxy that overlaps the supplied AABB. template <typename T> void Query(T* callback, const b2AABB& aabb) const; /// Ray-cast against the proxies in the tree. This relies on the callback /// to perform a exact ray-cast in the case were the proxy contains a shape. /// The callback also performs the any collision filtering. This has performance /// roughly equal to k * log(n), where k is the number of collisions and n is the /// number of proxies in the tree. /// @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). /// @param callback a callback class that is called for each proxy that is hit by the ray. template <typename T> void RayCast(T* callback, const b2RayCastInput& input) const; /// Validate this tree. For testing. void Validate() const; /// Compute the height of the binary tree in O(N) time. Should not be /// called often. int32 GetHeight() const; /// Get the maximum balance of an node in the tree. The balance is the difference /// in height of the two children of a node. int32 GetMaxBalance() const; /// Get the ratio of the sum of the node areas to the root area. float32 GetAreaRatio() const; /// Build an optimal tree. Very expensive. For testing. void RebuildBottomUp(); private: int32 AllocateNode(); void FreeNode(int32 node); void InsertLeaf(int32 node); void RemoveLeaf(int32 node); int32 Balance(int32 index); int32 ComputeHeight() const; int32 ComputeHeight(int32 nodeId) const; void ValidateStructure(int32 index) const; void ValidateMetrics(int32 index) const; int32 m_root; b2TreeNode* m_nodes; int32 m_nodeCount; int32 m_nodeCapacity; int32 m_freeList; /// This is used to incrementally traverse the tree for re-balancing. uint32 m_path; int32 m_insertionCount; }; inline void* b2DynamicTree::GetUserData(int32 proxyId) const { b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); return m_nodes[proxyId].userData; } inline const b2AABB& b2DynamicTree::GetFatAABB(int32 proxyId) const { b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); return m_nodes[proxyId].aabb; } template <typename T> inline void b2DynamicTree::Query(T* callback, const b2AABB& aabb) const { b2GrowableStack<int32, 256> stack; stack.Push(m_root); while (stack.GetCount() > 0) { int32 nodeId = stack.Pop(); if (nodeId == b2_nullNode) { continue; } const b2TreeNode* node = m_nodes + nodeId; if (b2TestOverlap(node->aabb, aabb)) { if (node->IsLeaf()) { bool proceed = callback->QueryCallback(nodeId); if (proceed == false) { return; } } else { stack.Push(node->child1); stack.Push(node->child2); } } } } template <typename T> inline void b2DynamicTree::RayCast(T* callback, const b2RayCastInput& input) const { b2Vec2 p1 = input.p1; b2Vec2 p2 = input.p2; b2Vec2 r = p2 - p1; b2Assert(r.LengthSquared() > 0.0f); r.Normalize(); // v is perpendicular to the segment. b2Vec2 v = b2Cross(1.0f, r); b2Vec2 abs_v = b2Abs(v); // Separating axis for segment (Gino, p80). // |dot(v, p1 - c)| > dot(|v|, h) float32 maxFraction = input.maxFraction; // Build a bounding box for the segment. b2AABB segmentAABB; { b2Vec2 t = p1 + maxFraction * (p2 - p1); segmentAABB.lowerBound = b2Min(p1, t); segmentAABB.upperBound = b2Max(p1, t); } b2GrowableStack<int32, 256> stack; stack.Push(m_root); while (stack.GetCount() > 0) { int32 nodeId = stack.Pop(); if (nodeId == b2_nullNode) { continue; } const b2TreeNode* node = m_nodes + nodeId; if (b2TestOverlap(node->aabb, segmentAABB) == false) { continue; } // Separating axis for segment (Gino, p80). // |dot(v, p1 - c)| > dot(|v|, h) b2Vec2 c = node->aabb.GetCenter(); b2Vec2 h = node->aabb.GetExtents(); float32 separation = b2Abs(b2Dot(v, p1 - c)) - b2Dot(abs_v, h); if (separation > 0.0f) { continue; } if (node->IsLeaf()) { b2RayCastInput subInput; subInput.p1 = input.p1; subInput.p2 = input.p2; subInput.maxFraction = maxFraction; float32 value = callback->RayCastCallback(subInput, nodeId); if (value == 0.0f) { // The client has terminated the ray cast. return; } if (value > 0.0f) { // Update segment bounding box. maxFraction = value; b2Vec2 t = p1 + maxFraction * (p2 - p1); segmentAABB.lowerBound = b2Min(p1, t); segmentAABB.upperBound = b2Max(p1, t); } } else { stack.Push(node->child1); stack.Push(node->child2); } } } #endif
Java
package GT::Signals::Graphical::CandleSticks::BullishHarami; # Copyright (C) 2007 M.K.Pai # # 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. use strict; use vars qw(@ISA @NAMES); use GT::Signals; use GT::Prices; use GT::Indicators::CNDL; @ISA = qw(GT::Signals); @NAMES = ("BullishHarami"); =head1 GT::Signals::Graphical::CandleSticks::BullishHarami =head2 Overview The Bullish Harami signifies a decrease of momentum. It occurs when a small bullish (empty) line occurs after a large bearish (filled) line in such a way that close of the bullish line is above the open of the bearish line and the open of the bullish line is lower than the close of the bearish line. The Bullish Harami is a mirror image of the Bearish Engulfing Line. =head2 Construction If yesterday closed higher, a Bullish Harami will form when today's open is above yesterday's close and today's close is above yesterday's open. =head2 Representation | ### ### _|_ ### | | ### |___| ### | ### | Bullish Harami =head2 Links 1. More information about the bullish harami on Page 33 of the book "Candlestick Charting Explained" by Gregory L. Morris. Morris says that this pattern suggests a trend change. 2. Steve Nison also says that the Harami Patterns suggest a trend change. This is on page 80 of his book "Japanese Candlesticks Charting Techniques". 3. http://www.equis.com/Customer/Resources/TAAZ/. =cut sub new { my $type = shift; my $class = ref($type) || $type; my $args = shift; my $self = { "args" => defined($args) ? $args : [] }; return manage_object(\@NAMES, $self, $class, $self->{'args'}, ""); } sub initialize { my ($self) = @_; $self->{'cndl'} = GT::Indicators::CNDL->new($self->{'args'}); $self->add_indicator_dependency($self->{'cndl'}, 2); } sub detect { my ($self, $calc, $i) = @_; my $prices = $calc->prices; my $cndl_name = $self->{'cndl'}->get_name(0); my $bullish_harami_name = $self->get_name(0);; return if ($calc->signals->is_available($self->get_name(0), $i)); return if (! $self->check_dependencies($calc, $i)); my $previous_cndl_code = $calc->indicators->get($cndl_name, $i - 1); my $cndl_code = $calc->indicators->get($cndl_name, $i); # Previous CandleCode from 0 to 15 # CandleCode from 80 to 111 if (($previous_cndl_code >= 0) and ($previous_cndl_code <= 15) and ($cndl_code >= 80) and ($cndl_code <= 111) and ($prices->at($i)->[$OPEN] > $prices->at($i - 1)->[$CLOSE]) and ($prices->at($i)->[$CLOSE] < $prices->at($i - 1)->[$OPEN]) ) { $calc->signals->set($bullish_harami_name, $i, 1); } else { $calc->signals->set($bullish_harami_name, $i, 0); } } 1;
Java
worldstate-analysis-widgets [![Build Status](http://ci.cismet.de/buildStatus/icon?job=worldstate-analysis-widgets)](https://ci.cismet.de/view/html5%20javascript/job/worldstate-analysis-widgets/) =========================== The AngularJS implementation of the Scenario Comparison and Analysis and the Multi-Criteria-Analysis and Decision Support Functional Building Block. ![worldstate_analysis_widgets_example](https://cloud.githubusercontent.com/assets/973421/4491054/3979b86c-4a34-11e4-800f-034f4612860d.png) ## Get started Simply pull in the libraries and all the dependencies via [bower](http://bower.io/) ```sh bower install --save worldstate-analysis-widgets ``` There is a number of directives that are useful for the different parts of the worldstate analysis. Currently the best way to get a grip on the usage, see the <code>index.html</code> of this repo. Pull in and wire toghether the directives that you want to use in your application accordingly. However, this will only work correctly if you provide info where to find the ICMM instance to use: ```javascript angular.module( 'myCoolModule' ).config( [ '$provide', function ($provide) { 'use strict'; $provide.constant('CRISMA_DOMAIN', 'CRISMA'); // the name of the CRISMA domain to use $provide.constant('CRISMA_ICMM_API', 'http://url/to/the/icmm/api'); // the url to the API of the ICMM instance to use } } ] ); ``` ## Demo Simply checkout the project and put the app folder in your favourite web server, or even more simple, use grunt to fire up a web server for you ```sh grunt serve ```
Java
#include "sensorcontrol.h" using namespace oi; /*! * \brief SensorControl::SensorControl * \param station * \param parent */ SensorControl::SensorControl(QPointer<Station> &station, QObject *parent) : QObject(parent), station(station), sensorValid(false){ this->worker = new SensorWorker(); this->connectSensorWorker(); } /*! * \brief SensorControl::~SensorControl */ SensorControl::~SensorControl(){ this->disconnectSensorWorker(); } /*! * \brief SensorControl::getSensor * Returns a copy of the current sensor * \return */ Sensor SensorControl::getSensor(){ //get sensor Sensor sensor; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getSensor", Qt::DirectConnection, Q_RETURN_ARG(Sensor, sensor)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return sensor; } /*! * \brief SensorControl::setSensor * Sets the current sensor to the given one * \param sensor */ void SensorControl::setSensor(const QPointer<Sensor> &sensor){ //check sensor if(sensor.isNull()){ return; } //check old sensor and add it to the list of used sensors if(sensorValid){ this->usedSensors.append(this->getSensor()); } //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "setSensor", Qt::DirectConnection, Q_ARG(QPointer<Sensor>, sensor)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } //set sensor valid this->sensorValid = true; } /*! * \brief SensorControl::takeSensor * Returns the current sensor instance. That sensor will no longer be used by the sensor worker * \return */ QPointer<Sensor> SensorControl::takeSensor(){ //check old sensor and add it to the list of used sensors if(sensorValid){ this->usedSensors.append(this->getSensor()); } //call method of sensor worker QPointer<Sensor> sensor(NULL); bool hasInvoked = QMetaObject::invokeMethod(this->worker, "takeSensor", Qt::DirectConnection, Q_RETURN_ARG(QPointer<Sensor>, sensor)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } //set sensor invalid this->sensorValid = false; return sensor; } /*! * \brief SensorControl::resetSensor * Disconnects and deletes the current sensor */ void SensorControl::resetSensor(){ //check old sensor and add it to the list of used sensors if(sensorValid){ this->usedSensors.append(this->getSensor()); } //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "resetSensor", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } //set sensor invalid this->sensorValid = false; } /*! * \brief SensorControl::getUsedSensors * \return */ const QList<Sensor> &SensorControl::getUsedSensors(){ return this->usedSensors; } /*! * \brief SensorControl::setUsedSensors * \param sensors */ void SensorControl::setUsedSensors(const QList<Sensor> &sensors){ this->usedSensors = sensors; } /*! * \brief SensorControl::getStreamFormat * \return */ ReadingTypes SensorControl::getStreamFormat(){ //call method of sensor worker ReadingTypes type = eUndefinedReading; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getStreamFormat", Qt::DirectConnection, Q_RETURN_ARG(ReadingTypes, type)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return type; } /*! * \brief SensorControl::setStreamFormat * \param streamFormat */ void SensorControl::setStreamFormat(ReadingTypes streamFormat){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "setStreamFormat", Qt::QueuedConnection, Q_ARG(ReadingTypes, streamFormat)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::getIsSensorSet * \return */ bool SensorControl::getIsSensorSet(){ return this->sensorValid; } /*! * \brief SensorControl::getIsSensorConnected * \return */ bool SensorControl::getIsSensorConnected(){ //call method of sensor worker bool isConnected = false; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getIsSensorConnected", Qt::DirectConnection, Q_RETURN_ARG(bool, isConnected)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return isConnected; } /*! * \brief SensorControl::getIsReadyForMeasurement * \return */ bool SensorControl::getIsReadyForMeasurement(){ //call method of sensor worker bool isReady = false; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getIsReadyForMeasurement", Qt::DirectConnection, Q_RETURN_ARG(bool, isReady)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return isReady; } /*! * \brief SensorControl::getIsBusy * \return */ bool SensorControl::getIsBusy(){ //call method of sensor worker bool isBusy = false; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getIsBusy", Qt::DirectConnection, Q_RETURN_ARG(bool, isBusy)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return isBusy; } /*! * \brief SensorControl::getSensorStatus * \return */ QMap<QString, QString> SensorControl::getSensorStatus(){ //call method of sensor worker QMap<QString, QString> status; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getSensorStatus", Qt::DirectConnection, Q_RETURN_ARG(StringStringMap, status)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return status; } /*! * \brief SensorControl::getActiveSensorType * \return */ SensorTypes SensorControl::getActiveSensorType(){ //call method of sensor worker SensorTypes type; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getActiveSensorType", Qt::DirectConnection, Q_RETURN_ARG(SensorTypes, type)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return type; } /*! * \brief SensorControl::getSupportedReadingTypes * \return */ QList<ReadingTypes> SensorControl::getSupportedReadingTypes(){ //call method of sensor worker QList<ReadingTypes> types; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getSupportedReadingTypes", Qt::DirectConnection, Q_RETURN_ARG(QList<ReadingTypes>, types)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return types; } /*! * \brief SensorControl::getSupportedConnectionTypes * \return */ QList<ConnectionTypes> SensorControl::getSupportedConnectionTypes(){ //call method of sensor worker QList<ConnectionTypes> types; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getSupportedConnectionTypes", Qt::DirectConnection, Q_RETURN_ARG(QList<ConnectionTypes>, types)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return types; } /*! * \brief SensorControl::getSupportedSensorActions * \return */ QList<SensorFunctions> SensorControl::getSupportedSensorActions(){ //call method of sensor worker QList<SensorFunctions> actions; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getSupportedSensorActions", Qt::DirectConnection, Q_RETURN_ARG(QList<SensorFunctions>, actions)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return actions; } /*! * \brief SensorControl::getSelfDefinedActions * \return */ QStringList SensorControl::getSelfDefinedActions(){ //call method of sensor worker QStringList actions; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getSelfDefinedActions", Qt::DirectConnection, Q_RETURN_ARG(QStringList, actions)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return actions; } /*! * \brief SensorControl::getSensorConfiguration * \return */ SensorConfiguration SensorControl::getSensorConfiguration(){ //call method of sensor worker SensorConfiguration sConfig; bool hasInvoked = QMetaObject::invokeMethod(this->worker, "getSensorConfiguration", Qt::DirectConnection, Q_RETURN_ARG(SensorConfiguration, sConfig)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } return sConfig; } /*! * \brief SensorControl::setSensorConfiguration * \param sConfig */ void SensorControl::setSensorConfiguration(const SensorConfiguration &sConfig){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "setSensorConfiguration", Qt::QueuedConnection, Q_ARG(SensorConfiguration, sConfig)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::connectSensor */ void SensorControl::connectSensor(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "connectSensor", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::disconnectSensor */ void SensorControl::disconnectSensor(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "disconnectSensor", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::measure * \param geomId * \param mConfig */ void SensorControl::measure(const int &geomId, const MeasurementConfig &mConfig){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "measure", Qt::QueuedConnection, Q_ARG(int, geomId), Q_ARG(MeasurementConfig, mConfig)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::move * \param azimuth * \param zenith * \param distance * \param isRelative * \param measure * \param geomId * \param mConfig */ void SensorControl::move(const double &azimuth, const double &zenith, const double &distance, const bool &isRelative, const bool &measure, const int &geomId, const MeasurementConfig &mConfig){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "move", Qt::QueuedConnection, Q_ARG(double, azimuth), Q_ARG(double, zenith), Q_ARG(double, distance), Q_ARG(bool, isRelative), Q_ARG(bool, measure), Q_ARG(int, geomId), Q_ARG(MeasurementConfig, mConfig)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::move * \param x * \param y * \param z * \param measure * \param geomId * \param mConfig */ void SensorControl::move(const double &x, const double &y, const double &z, const bool &measure, const int &geomId, const MeasurementConfig &mConfig){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "move", Qt::QueuedConnection, Q_ARG(double, x), Q_ARG(double, y), Q_ARG(double, z), Q_ARG(bool, measure), Q_ARG(int, geomId), Q_ARG(MeasurementConfig, mConfig)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::initialize */ void SensorControl::initialize(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "initialize", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::motorState */ void SensorControl::motorState(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "motorState", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::home */ void SensorControl::home(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "home", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::toggleSight */ void SensorControl::toggleSight(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "toggleSight", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::compensation */ void SensorControl::compensation(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "compensation", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::selfDefinedAction * \param action */ void SensorControl::selfDefinedAction(const QString &action){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "selfDefinedAction", Qt::QueuedConnection, Q_ARG(QString, action)); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } void SensorControl::search(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "search", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::startReadingStream */ void SensorControl::startReadingStream(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "startReadingStream", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::stopReadingStream */ void SensorControl::stopReadingStream(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "stopReadingStream", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::startConnectionMonitoringStream */ void SensorControl::startConnectionMonitoringStream(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "startConnectionMonitoringStream", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::stopConnectionMonitoringStream */ void SensorControl::stopConnectionMonitoringStream(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "stopConnectionMonitoringStream", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::startStatusMonitoringStream */ void SensorControl::startStatusMonitoringStream(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "startStatusMonitoringStream", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::stopStatusMonitoringStream */ void SensorControl::stopStatusMonitoringStream(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "stopStatusMonitoringStream", Qt::QueuedConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } void SensorControl::finishMeasurement(){ //call method of sensor worker bool hasInvoked = QMetaObject::invokeMethod(this->worker, "finishMeasurement", Qt::DirectConnection); if(!hasInvoked){ emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); } } /*! * \brief SensorControl::connectSensorWorker */ void SensorControl::connectSensorWorker(){ //connect sensor action results QObject::connect(this->worker, &SensorWorker::commandFinished, this, &SensorControl::commandFinished, Qt::QueuedConnection); QObject::connect(this->worker, &SensorWorker::measurementFinished, this, &SensorControl::measurementFinished, Qt::QueuedConnection); QObject::connect(this->worker, &SensorWorker::measurementDone, this, &SensorControl::measurementDone, Qt::QueuedConnection); //connect streaming results QObject::connect(this->worker, &SensorWorker::realTimeReading, this, &SensorControl::realTimeReading, Qt::QueuedConnection); QObject::connect(this->worker, &SensorWorker::realTimeStatus, this, &SensorControl::realTimeStatus, Qt::QueuedConnection); QObject::connect(this->worker, &SensorWorker::connectionLost, this, &SensorControl::connectionLost, Qt::QueuedConnection); QObject::connect(this->worker, &SensorWorker::connectionReceived, this, &SensorControl::connectionReceived, Qt::QueuedConnection); QObject::connect(this->worker, &SensorWorker::isReadyForMeasurement, this, &SensorControl::isReadyForMeasurement, Qt::QueuedConnection); //connect sensor messages QObject::connect(this->worker, &SensorWorker::sensorMessage, this, &SensorControl::sensorMessage, Qt::QueuedConnection); } /*! * \brief SensorControl::disconnectSensorWorker */ void SensorControl::disconnectSensorWorker(){ } void SensorControl::setSensorWorkerThread(QPointer<QThread> t) { this->worker->moveToThread(t); }
Java
#bo general settings #set default start location Set-Location C:\ #change how powershell does tab completion #@see: http://stackoverflow.com/questions/39221953/can-i-make-powershell-tab-complete-show-me-all-options-rather-than-picking-a-sp Set-PSReadlineKeyHandler -Chord Tab -Function MenuComplete #eo general settings #bo variables $isElevated = [System.Security.Principal.WindowsPrincipal]::New( [System.Security.Principal.WindowsIdentity]::GetCurrent() ).IsInRole( [System.Security.Principal.WindowsBuiltInRole]::Administrator ) $configurationSourcePath = (Split-Path $profile -Parent) $localConfigurationFilePath = $($configurationSourcePath + "\local.profile.ps1") #eo variables #bo functions #@see: https://github.com/gummesson/kapow/blob/master/themes/bashlet.ps1 #a Function Add-StarsToTheBeginningAndTheEndOfAStringIfNeeded () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $String ) If ($String.StartsWith("*") -eq $false) { $String = $("*" + $String) } If ($String.EndsWith("*") -eq $false) { $String = $($String + "*") } Return $String } #e Function Execute-7zipAllDirectories () { [CmdletBinding()] Param( [Parameter(Mandatory=$false)] [String] $SourcePath = $PWD.Path ) $PreviousCurrentWorkingDirectory = $PWD.Path Set-Location -Path $SourcePath ForEach ($CurrentDirectory In Get-ChildItem -Path . -Depth 0 -Directory) { If (Test-Path -Path "${CurrentDirectory}.7z") { Write-Host ":: Skipping directory >>${CurrentDirectory}<<, >>${CurrentDirectory}.7z<< already exists." } Else { $ListOfArgument = @( 'a' '-t7z' '-mx9' "${CurrentDirectory}.7z" "${CurrentDirectory}" ) Write-Verbose ":: Processing directory >>${CurrentDirectory}<<." Start-Process 7z.exe -ArgumentList $ListOfArgument -NoNewWindow -Wait Write-Host ":: Archiving done, please delete directory >>${CurrentDirectory}<<." } } Set-Location -Path $PreviousCurrentWorkingDirectory } #f Function Find-Directory () { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string] $KeyWord, [Parameter(Mandatory = $false)] [string] $RootPath = $PWD.Path, [Parameter(Mandatory = $false)] [switch] $BeVerbose ) If ($BeVerbose.IsPresent) { Get-ChildItem $RootPath -Recurse -Directory | Where-Object {$_.Name -match "${KeyWord}"} } Else { Get-ChildItem $RootPath -Recurse -Directory -ErrorAction SilentlyContinue | Where-Object {$_.PSIsContainer -eq $true -and $_.Name -match "${KeyWord}"} } } Function Find-File () { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string] $KeyWord, [Parameter(Mandatory = $false)] [string] $RootPath = $PWD.Path, [Parameter(Mandatory = $false)] [switch] $BeVerbose ) If ($BeVerbose.IsPresent) { Get-ChildItem $RootPath -Recurse -File | Where-Object {$_.Name -match "${KeyWord}"} } Else { Get-ChildItem $RootPath -Recurse -File -ErrorAction SilentlyContinue | Where-Object {$_.PSIsContainer -eq $true -and $_.Name -match "${KeyWord}"} } } #g #@see https://sid-500.com/2019/07/30/powershell-retrieve-list-of-domain-computers-by-operating-system/ Function Get-ADComputerClientList () { Get-ADComputer -Filter { (OperatingSystem -notlike "*server*") -and (Enabled -eq $true) } ` -Properties Name,Operatingsystem,OperatingSystemVersion,IPv4Address | Sort-Object -Property Name | Select-Object -Property Name,Operatingsystem,OperatingSystemVersion,IPv4Address } #@see: https://sid-500.com/2019/07/30/powershell-retrieve-list-of-domain-computers-by-operating-system/ #@see: https://adsecurity.org/?p=873 Function Get-ADComputerDCList () { #primary group id: # 515 -> domain computer # 516 -> domain controller writeable (server) # 521 -> domain controller readable (client) Get-ADComputer -Filter { (PrimaryGroupId -eq 516) -or (PrimaryGroupId -eq 521) } ` -Properties Name,Operatingsystem,OperatingSystemVersion,IPv4Address,primarygroupid | Sort-Object -Property Name | Select-Object -Property Name,Operatingsystem,OperatingSystemVersion,IPv4Address,PrimaryGroupId | Format-Table } #@see: https://sid-500.com/2019/07/30/powershell-retrieve-list-of-domain-computers-by-operating-system/ Function Get-ADComputerList () { Get-ADComputer -Filter { (Enabled -eq $true) } ` -Properties Name,Operatingsystem,OperatingSystemVersion,IPv4Address,primarygroupid | Sort-Object -Property Name | Select-Object -Property Name,Operatingsystem,OperatingSystemVersion,IPv4Address,PrimaryGroupId | Format-Table } #@see https://sid-500.com/2019/07/30/powershell-retrieve-list-of-domain-computers-by-operating-system/ Function Get-ADComputerServerList () { Get-ADComputer -Filter { (OperatingSystem -like "*server*") -and (Enabled -eq $true) } ` -Properties Name,Operatingsystem,OperatingSystemVersion,IPv4Address,primarygroupid | Sort-Object -Property Name | Select-Object -Property Name,Operatingsystem,OperatingSystemVersion,IPv4Address,PrimaryGroupId | Format-Table } Function Get-ADGroupBySid () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $SID ) Get-ADGroup -Identity $SID } #@see: http://woshub.com/convert-sid-to-username-and-vice-versa/ Function Get-ADObjectBySid () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $SID ) Get-ADObject IncludeDeletedObjects -Filter "objectSid -eq '$SID'" | Select-Object name, objectClass } Function Get-ADUserBySid () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $SID ) Get-ADUser -Identity $SID } Function Get-IsSoftwareInstalled () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $SoftwareName ) #regular way to check $isInstalled = (Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where { $_.DisplayName -like "*$SoftwareName*" }) -ne $null #if we are running a 64bit windows, there is a place for 32bit software if (-Not $isInstalled) { #check if we are running 64 bit windows if (Test-Path HKLM:SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall) { $isInstalled = (Get-ItemProperty HKLM:SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where { $_.DisplayName -like "*$SoftwareName*" }) -ne $null } } #there is one legacy place left if (-Not $isInstalled) { $isInstalled = (Get-WmiObject -Class Win32_Product | WHERE { $_.Name -like "*$ProcessName*" }) } if (-Not $isInstalled) { Write-Host $("Software >>" + $SoftwareName + "<< is not installed.") } Else { Write-Host $("Software >>" + $SoftwareName + "<< is installed.") } } #@see: https://sid-500.com/2020/05/23/video-powershell-cmdlets-as-a-replacement-for-ping-arp-traceroute-and-nmap/ Function Get-ListOfLocalOpenPorts () { Get-NetTCPConnection -State Established,Listen | Sort-Object LocalPort } Function Get-UpTime () { [CmdletBinding()] Param ( [Parameter(Mandatory=$false,Position=0)] [String[]] $ListOfComputerName=$null ) $DataTable = @() $RequestForLocalHost = ($ListOfComputerName -eq $null) If ($RequestForLocalHost -eq $true) { $DateObject = (get-date) - (gcim Win32_OperatingSystem).LastBootUpTime $DataTable += [Pscustomobject]@{ComputerName = "LocalHost";Days = $DateObject.Days; Hours = $DateObject.Hours; Minutes = $DateObject.Minutes; Seconds= $DateObject.Seconds} } Else { Write-Host ":: Fetching uptime for remote computers." ForEach ($CurrentComputerName in $ListOfComputerName) { Write-Host -NoNewLine "." $DateObject = Invoke-Command -ComputerName $CurrentComputerName -ScriptBlock {(get-date) - (gcim Win32_OperatingSystem).LastBootUpTime} $DataTable += [Pscustomobject]@{ComputerName = $CurrentComputerName;Days = $DateObject.Days; Hours = $DateObject.Hours; Minutes = $DateObject.Minutes; Seconds= $DateObject.Seconds} } Write-Host "" } $DataTable | Format-Table } Function Get-UserLogon () { [CmdletBinding()] Param ( [Parameter(Mandatory=$true)] [String] $ComputerName, [Parameter(Mandatory=$false)] [Int] $Days = 10 ) $ListOfEventSearches = @( <# @see: https://social.technet.microsoft.com/wiki/contents/articles/51413.active-directory-how-to-get-user-login-history-using-powershell.aspx Either this is not working on my environment or not working in general. I can't find any log entry with a UserName or something user related when searching for this id's in that log name. I've decided to keep it in and have a look on it again by figuring out how to use the existing code with the logic of the following post: https://adamtheautomator.com/user-logon-event-id/ @{ 'ID' = 4624 'LogName' = 'Security' 'EventType' = 'SessionStart' } @{ 'ID' = 4778 'LogName' = 'Security' 'EventType' = 'RdpSessionReconnect' } #> @{ 'ID' = 7001 'LogName' = 'System' 'EventType' = 'Logon' } ) $ListOfResultObjects = @{} $StartDate = (Get-Date).AddDays(-$Days) Write-Host $(":: Fetching event logs for the last >>" + $Days + "<< days. This will take a while.") ForEach ($EventSearch in $ListOfEventSearches) { Write-Host $(" Fetching events for id >>" + $EventSearch.ID + "<<, log name >>" + $EventSearch.LogName + "<<.") $ListOfEventLogs = Get-EventLog -ComputerName $ComputerName -InstanceId $EventSearch.ID -LogName $EventSearch.LogName -After $StartDate Write-Host $(" Processing >>" + $ListOfEventLogs.Count + "<< entries.") If ($ListOfEventLogs -ne $null) { ForEach ($EventLog in $ListOfEventLogs) { $StoreEventInTheResultList = $true If ($EventLog.InstanceId -eq 7001) { $EventType = "Logon" $User = (New-Object System.Security.Principal.SecurityIdentifier $EventLog.ReplacementStrings[1]).Translate([System.Security.Principal.NTAccount]) <# Same reason as mentioned in the $ListOfEventSearches } ElseIf ($EventLog.InstanceId -eq 4624) { If ($EventLog.ReplacementStrings[8] -eq 2) { $EventType = "Local Session Start" $User = (New-Object System.Security.Principal.SecurityIdentifier $EventLog.ReplacementStrings[5]).Translate([System.Security.Principal.NTAccount]) } ElseIf ($EventLog.ReplacementStrings[8] -eq 10) { $EventType = "Remote Session Start" $User = (New-Object System.Security.Principal.SecurityIdentifier $EventLog.ReplacementStrings[5]).Translate([System.Security.Principal.NTAccount]) } Else { $StoreEventInTheResultList = $false } } ElseIf ($EventLog.InstanceId -eq 4778) { $EventType = "RDPSession Reconnect" $User = (New-Object System.Security.Principal.SecurityIdentifier $EventLog.ReplacementStrings[5]).Translate([System.Security.Principal.NTAccount]) #> } Else { $StoreEventInTheResultList = $false } If ($StoreEventInTheResultList -eq $true) { $ResultListKey = $User.Value If ($ListOfResultObjects.ContainsKey($ResultListKey)) { $ResultObject = $ListOfResultObjects[$ResultListKey] If ($ResultObject.Time -lt $EventLog.TimeWritten ) { $ResultObject.Time = $EventLog.TimeWritten $ListOfResultObjects[$ResultListKey] = $ResultObject } } Else { $ResultObject = New-Object PSObject -Property @{ Time = $EventLog.TimeWritten 'Event Type' = $EventType User = $User } $ListOfResultObjects.Add($ResultListKey, $ResultObject) } } } } } If ($ListOfResultObjects -ne $null) { <# We are doing evil things. I have no idea how to output and sort the existing list. That is the reason why we create an array we can output and sort easily. #> $ArrayOfResultObjects = @() ForEach ($key in $ListOfResultObjects.Keys) { $ArrayOfResultObjects += $ListOfResultObjects[$key] } Write-Host $(":: Dumping >>" + $ListOfResultObjects.Count + "<< event logs.") $ArrayOfResultObjects | Select Time,"Event Type",User | Sort Time -Descending } Else { Write-Host ":: Could not find any matching event logs." } } #i #@see: https://matthewjdegarmo.com/powershell/2021/03/31/how-to-import-a-locally-defined-function-into-a-remote-powershell-session.html Function Invoke-LocalCommandRemotely () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [System.String[]] $FunctionName, [Parameter(Mandatory=$true,HelpMessage='Run >>$Session = New-PSSession -ComputerName <host name>')] $Session ) Process { $FunctionName | ForEach-Object { Try { #check if we can find a function for the current function name $CurrentFunction = Get-Command -Name $_ If ($CurrentFunction) { #if there is a function available # we create a script block with the name of the # function and the body of the found function #at the end, we copy the whole function into a # script block and this script block is # executed on the (remote) session $CurrentFunctionDefinition = @" $($CurrentFunction.CommandType) $_() { $($CurrentFunction.Definition) } "@ Invoke-Command -Session $Session -ScriptBlock { Param($CodeToLoadAsString) . ([ScriptBlock]::Create($CodeToLoadAsString)) } -ArgumentList $CurrentFunctionDefinition Write-Host $(':: You can now run >>Invoke-Command -Session $Session -ScriptBlock {' + $_ + '}<<.') } } Catch { Throw $_ } } } } #k #@see: https://github.com/mikemaccana/powershell-profile/blob/master/unix.ps1 Function Kill-Process () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $ProcessName ) Get-Process $ProcessName-ErrorAction SilentlyContinue | Stop-Process } #l Function List-UserOnHost () { [CmdletBinding()] Param ( [Parameter(Mandatory=$true)] [String] $HostName, [Parameter(Mandatory=$false)] [String] $UserNameToFilterAgainstOrNull = $null ) #contains array of objects like: #>>USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME #>>randomnote1 console 1 Active none 8/14/2019 6:52 AM $arrayOfResultObjects = Invoke-Expression ("quser /server:$HostName"); #contains array of lines like: #>>USERNAME,SESSIONNAME,ID,STATE,IDLE TIME,LOGON TIME #>>randomnote1,console,1,Active,none,8/14/2019 6:52 AM $ArrayOfCommaSeparatedValues = $ArrayOfResultObjects | ForEach-Object -Process { $_ -replace '\s{2,}',',' } $ArrayOfUserObjects = $ArrayOfCommaSeparatedValues| ConvertFrom-Csv Write-Host $(":: Aktueller Host: " + $HostName) #@see: https://devblogs.microsoft.com/scripting/automating-quser-through-powershell/ #@see: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/query-user If ($UserNameToFilterAgainstOrNull -eq $null) { $ArrayOfUserObjects | Format-Table } Else { $ArrayOfUserObjects | Where-Object { ($_.USERNAME -like "*$UserNameToFilterAgainstOrNull*") -or ($_.BENUTZERNAME -like "*$UserNameToFilterAgainstOrNull*") } | Format-Table } } #m Function Mirror-UserSession () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $HostName, [Parameter(Mandatory=$false)] [String] $SessionId ) If (-not($SessionId)) { #no session id is used if there is no user logged in our you want # to login on a running pc mstsc.exe /v:$HostName } Else { #session id is used, ask if you can mirror the existing user session mstsc.exe /v:$HostName /shadow:$SessionId /control } } #p Function Prompt () { $promptColor = If ($isElevated) { "Red" } Else { "DarkGreen"} Write-Host "$env:username" -NoNewline -ForegroundColor $promptColor Write-Host "@" -NoNewline -ForegroundColor $promptColor Write-Host "$env:computername" -NoNewline -ForegroundColor $promptColor Write-Host " " -NoNewline #Write-Host $(Set-HomeDirectory("$pwd")) -ForegroundColor Yellow Write-Host $(Get-Location) -NoNewLine Write-Host ">" -NoNewline Return " " } #r Function Reload-Profile () { . $profile } Function Replace-GermanUmlauts () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $String ) Return ($String.Replace('ä','ae').Replace('Ä','Ae').Replace('ö','oe').Replace('Ö','Oe').Replace('ü','ue').Replace('Ü','Ue')) } #@see: https://4sysops.com/archives/how-to-reset-an-active-directory-password-with-powershell/ Function Reset-ADUserPassword () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $UserName, [Parameter(Mandatory=$true)] [String] $Password, [Parameter(Mandatory=$false)] [Bool] $ChangeAfterLogin = $false ) $SecuredPassword = ConvertTo-SecureString $Password -AsPlanText -Force Set-ADAccountPassword -Identity $UserName -NewPassword $SecuredPassword -Reset If ($ChangeAfterLogin -eq $true) { Set-ADUser -Identity $UserName -ChangePasswordAtLogon $true } } #s Function Search-ADComputerList () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $Name ) $Name = Add-StarsToTheBeginningAndTheEndOfAStringIfNeeded ($Name) Get-ADComputer -Filter { (Enabled -eq $true) -and (Name -like $Name) } ` -Properties Name,Operatingsystem,OperatingSystemVersion,IPv4Address,primarygroupid | Sort-Object -Property Name | Select-Object -Property Name,Operatingsystem,OperatingSystemVersion,IPv4Address,PrimaryGroupId | Format-Table } Function Search-ADUserByName () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $Name ) $Name = Add-StarsToTheBeginningAndTheEndOfAStringIfNeeded ($Name) Get-ADUser -Filter {(Name -like $Name) -or (SamAccountName -like $Name)} -Properties SamAccountName,Name,EmailAddress,Enabled,ObjectGUID,SID | SELECT SamAccountName,Name,EmailAddress,Enabled,ObjectGUID,SID } Function Search-ADUserPathOnComputerNameList () { [CmdletBinding()] Param ( [Parameter(Mandatory=$true,Position=0)] [String[]] $ListOfComputerName, [Parameter(Mandatory=$false,Position=1)] [String[]] $UserNameToFilterAgainst=$null ) ForEach ($CurrentComputerName in $ListOfComputerName) { If ((Test-NetConnection $CurrentComputerName -WarningAction SilentlyContinue).PingSucceeded -eq $true) { #contains array of objects like: #>>USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME #>>randomnote1 console 1 Active none 8/14/2019 6:52 AM $ArrayOfResultObjects = Get-ChildItem -Path ("\\" + $CurrentComputerName + "\c$\Users") #contains array of lines like: #>>Mode,LastWriteTime,Length,Name #>>d----- 15.06.2020 09:21 mustermann If ($UserNameToFilterAgainstOrNull -eq $null) { Write-Host $(":: Computer name: " + $CurrentComputerName) $ArrayOfResultObjects | Format-Table } Else { #check if the name is inside this array to only print the current terminal server when needed, else be silent. If ($ArrayOfResultObjects -like "*$UserNameToFilterAgainstOrNull*") { Write-Host $(":: Computer name: " + $CurrentComputerName) #@see: https://devblogs.microsoft.com/scripting/automating-quser-through-powershell/ #@see: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/query-user $ArrayOfResultObjects | Where-Object { ($_.NAME -like "*$UserNameToFilterAgainstOrNull*")} | Format-Table } } } Else { Write-Host $(":: Hostname >>" + $CurrentComputerName + "<< is offline. Skipping it.") } } } Function Search-ADUserSessionOnComputerNameList () { [CmdletBinding()] Param ( [Parameter(Mandatory=$true,Position=0)] [String[]] $ListOfComputerName, [Parameter(Mandatory=$false,Position=1)] [String[]] $UserNameToFilterAgainst=$null ) ForEach ($CurrentComputerName in $ListOfComputerName) { #only work on online systems #if you prefere having a visual feedback, is this line If ((Test-NetConnection $CurrentComputerName -WarningAction SilentlyContinue).PingSucceeded -eq $true) { #contains array of objects like: #>>USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME #>>randomnote1 console 1 Active none 8/14/2019 6:52 AM $ArrayOfResultObjects = Invoke-Expression ("quser /server:$CurrentComputerName"); #contains array of lines like: #>>USERNAME,SESSIONNAME,ID,STATE,IDLE TIME,LOGON TIME #>>randomnote1,console,1,Active,none,8/14/2019 6:52 AM $ArrayOfCommaSeparatedValues = $ArrayOfResultObjects | ForEach-Object -Process { $_ -replace '\s{2,}',',' } $ArrayOfUserObjects = $ArrayOfCommaSeparatedValues| ConvertFrom-Csv If ($UserNameToFilterAgainstOrNull -eq $null) { Write-Host $(":: Computer name: " + $CurrentComputerName) $ArrayOfUserObjects | Format-Table } Else { #check if the name is inside this array to only print the current terminal server when needed, else be silent. If ($ArrayOfResultObjects -like "*$UserNameToFilterAgainstOrNull*") { Write-Host $(":: Computer name: " + $CurrentComputerName) #@see: https://devblogs.microsoft.com/scripting/automating-quser-through-powershell/ #@see: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/query-user $ArrayOfUserObjects | Where-Object { ($_.USERNAME -like "*$userNameToFilterAgainstOrNull*") -or ($_.BENUTZERNAME -like "*$userNameToFilterAgainstOrNull*") } | Format-Table } } } Else { Write-Host $(":: Hostname >>" + $CurrentComputerName + "<< is offline. Skipping it.") } } } Function Search-CommandByName () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $CommandName ) $CommandName = Add-StarsToTheBeginningAndTheEndOfAStringIfNeeded ($CommandName) Get-Command -Verb Get -Noun $CommandName } Function Search-ProcessByName () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $ProcessName ) $ProcessName = Add-StarsToTheBeginningAndTheEndOfAStringIfNeeded ($ProcessName) Get-Process | Where-Object { $_.ProcessName -like $ProcessName } } Function Show-DiskStatus () { #@see: http://woshub.com/check-hard-drive-health-smart-windows/ Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object -Property DeviceID, Wear, ReadErrorsTotal, ReadErrorsCorrected, WriteErrorsTotal, WriteErrorsUncorrected, Temperature, TemperatureMax | Format-Table } Function Show-IpAndMacAddressFromComputer () { [CmdletBinding()] #@see: https://gallery.technet.microsoft.com/scriptcenter/How-do-I-get-MAC-and-IP-46382777 Param ( [Parameter(Mandatory=$true,ValueFromPipeline=$true,Position=0)] [string[]]$ListOfComputerName ) ForEach ($ComputerName in $ListOfComputerName) { If ((Test-NetConnection $ComputerName -WarningAction SilentlyContinue).PingSucceeded -eq $true) { $IpAddressToString = ([System.Net.Dns]::GetHostByName($ComputerName).AddressList[0]).IpAddressToString $IPMAC = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName $ComputerName $MacAddress = ($IPMAC | where { $_.IpAddress -eq $IpAddressToString }).MACAddress Write-Host ($ComputerName + ": IP Address >>" + $IpAddressToString + "<<, MAC Address >>" + $MacAddress + "<<.") } Else { Write-Host ("Maschine is offline >>" + $ComputerName + "<<.") -BackgroundColor Red } } } Function Show-Links () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $directoryPath ) Get-Childitem $directoryPath | Where-Object {$_.LinkType} | Select-Object FullName,LinkType,Target } #t Function Tail-Logs () { [CmdletBinding()] Param( [Parameter(Mandatory=$false)] [String] $pathToTheLogs = "C:\Windows\logs\*\" ) if (-Not $pathToTheLogs.endsWith(".log")) { $pathToTheLogs += "*.log" } Get-Content $pathToTheLogs -tail 10 -wait } #@see: https://www.powershellbros.com/test-credentials-using-powershell-function/ Function Test-ADCredential () { $DirectoryRoot = $null $Domain = $null $Password = $null $UserName = $null Try { $Credential = Get-Credential -ErrorAction Stop } Catch { $ErrorMessage = $_.Exception.Message Write-Warning "Failed to validate credentials with error message >>$ErrorMessage<<." Pause Break } Try { $DirectoryRoot = "LDAP://" + ([ADSI]'').distinguishedName $Password = $Credential.GetNetworkCredential().password $UserName = $Credential.username $Domain = New-Object System.DirectoryServices.DirectoryEntry($DirectoryRoot,$UserName,$Password) } Catch { $ErrorMessage = $_.Exception.Message Write-Warning "Faild to fetch the domain object from directory service with error message >>$ErrorMessage<<." Continue } If (!$Domain) { Write-Warning "An unexpected error has happend. Could not fetch the domain object from directory service." } Else { If ($Domain.name -ne $null) { return "User is authenticated" } Else { return "User is not authenticated" } } } #@see: https://devblogs.microsoft.com/scripting/use-a-powershell-function-to-see-if-a-command-exists/ Function Test-CommandExists () { [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String] $CommandName ) $OldErrorActionPreference = $ErrorActionPreference $ErrorActionPreference = "stop" Try { If (Get-Command $CommandName) { $CommandExists = $true } } Catch { $CommandExists = $false } Finally { $ErrorActionPreference = $OldErrorActionPreference } return $CommandExists } #eo functions #bo alias #### #PowerShell does not support creating alias command calls with arguments #@see: https://seankilleen.com/2020/04/how-to-create-a-powershell-alias-with-parameters/ #If (Test-CommandExists chocolatey) { #eo alias #bo load local/confidential code If (Test-Path $localConfigurationFilePath) { . $localConfigurationFilePath } #eo load local/confidential code # Chocolatey profile $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" }
Java
# Copyright (C) 2014 Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from lib.cuckoo.common.abstracts import Signature class InjectionRWX(Signature): name = "injection_rwx" description = "Creates RWX memory" severity = 2 confidence = 50 categories = ["injection"] authors = ["Optiv"] minimum = "1.2" evented = True def __init__(self, *args, **kwargs): Signature.__init__(self, *args, **kwargs) filter_apinames = set(["NtAllocateVirtualMemory","NtProtectVirtualMemory","VirtualProtectEx"]) filter_analysistypes = set(["file"]) def on_call(self, call, process): if call["api"] == "NtAllocateVirtualMemory" or call["api"] == "VirtualProtectEx": protection = self.get_argument(call, "Protection") # PAGE_EXECUTE_READWRITE if protection == "0x00000040": return True elif call["api"] == "NtProtectVirtualMemory": protection = self.get_argument(call, "NewAccessProtection") # PAGE_EXECUTE_READWRITE if protection == "0x00000040": return True
Java
using System; namespace MakingSense.AspNetCore.HypermediaApi.Linking.StandardRelations { public class RelatedRelation : IRelation { public Type InputModel => null; public bool IsVirtual => false; public HttpMethod? Method => null; public Type OutputModel => null; public string RelationName => "related"; } }
Java
/* * Copyright (c) 2005–2012 Goethe Center for Scientific Computing - Simulation and Modelling (G-CSC Frankfurt) * Copyright (c) 2012-2015 Goethe Center for Scientific Computing - Computational Neuroscience (G-CSC Frankfurt) * * This file is part of NeuGen. * * NeuGen is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * as published by the Free Software Foundation. * * see: http://opensource.org/licenses/LGPL-3.0 * file://path/to/NeuGen/LICENSE * * NeuGen 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. * * This version of NeuGen includes copyright notice and attribution requirements. * According to the LGPL this information must be displayed even if you modify * the source code of NeuGen. The copyright statement/attribution may not be removed. * * Attribution Requirements: * * If you create derived work you must do the following regarding copyright * notice and author attribution. * * Add an additional notice, stating that you modified NeuGen. In addition * you must cite the publications listed below. A suitable notice might read * "NeuGen source code modified by YourName 2012". * * Note, that these requirements are in full accordance with the LGPL v3 * (see 7. Additional Terms, b). * * Publications: * * S. Wolf, S. Grein, G. Queisser. NeuGen 2.0 - * Employing NeuGen 2.0 to automatically generate realistic * morphologies of hippocapal neurons and neural networks in 3D. * Neuroinformatics, 2013, 11(2), pp. 137-148, doi: 10.1007/s12021-012-9170-1 * * * J. P. Eberhard, A. Wanner, G. Wittum. NeuGen - * A tool for the generation of realistic morphology * of cortical neurons and neural networks in 3D. * Neurocomputing, 70(1-3), pp. 327-343, doi: 10.1016/j.neucom.2006.01.028 * */ package org.neugen.gui; import org.jdesktop.application.Action; /** * @author Sergei Wolf */ public final class NGAboutBox extends javax.swing.JDialog { private static final long serialVersionUID = 1L; public NGAboutBox(java.awt.Frame parent) { super(parent); initComponents(); getRootPane().setDefaultButton(closeButton); } @Action public void closeAboutBox() { dispose(); } /** * This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { closeButton = new javax.swing.JButton(); javax.swing.JLabel appTitleLabel = new javax.swing.JLabel(); javax.swing.JLabel versionLabel = new javax.swing.JLabel(); javax.swing.JLabel appVersionLabel = new javax.swing.JLabel(); javax.swing.JLabel vendorLabel = new javax.swing.JLabel(); javax.swing.JLabel appVendorLabel = new javax.swing.JLabel(); javax.swing.JLabel homepageLabel = new javax.swing.JLabel(); javax.swing.JLabel appHomepageLabel = new javax.swing.JLabel(); javax.swing.JLabel appDescLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(org.neugen.gui.NeuGenApp.class).getContext().getResourceMap(NGAboutBox.class); setTitle(resourceMap.getString("title")); // NOI18N setModal(true); setName("aboutBox"); // NOI18N setResizable(false); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(org.neugen.gui.NeuGenApp.class).getContext().getActionMap(NGAboutBox.class, this); closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N closeButton.setName("closeButton"); // NOI18N appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4)); appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N appTitleLabel.setName("appTitleLabel"); // NOI18N versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD)); versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N versionLabel.setName("versionLabel"); // NOI18N appVersionLabel.setText(resourceMap.getString("Application.version")); // NOI18N appVersionLabel.setName("appVersionLabel"); // NOI18N vendorLabel.setFont(vendorLabel.getFont().deriveFont(vendorLabel.getFont().getStyle() | java.awt.Font.BOLD)); vendorLabel.setText(resourceMap.getString("vendorLabel.text")); // NOI18N vendorLabel.setName("vendorLabel"); // NOI18N appVendorLabel.setText(resourceMap.getString("Application.vendor")); // NOI18N appVendorLabel.setName("appVendorLabel"); // NOI18N homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD)); homepageLabel.setText(resourceMap.getString("homepageLabel.text")); // NOI18N homepageLabel.setName("homepageLabel"); // NOI18N appHomepageLabel.setText(resourceMap.getString("Application.homepage")); // NOI18N appHomepageLabel.setName("appHomepageLabel"); // NOI18N appDescLabel.setText(resourceMap.getString("appDescLabel.text")); // NOI18N appDescLabel.setName("appDescLabel"); // NOI18N org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(vendorLabel) .add(appTitleLabel) .add(appDescLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(homepageLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(appVendorLabel) .add(appVersionLabel) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(closeButton) .add(appHomepageLabel))))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(appTitleLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(appDescLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionLabel) .add(appVersionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(layout.createSequentialGroup() .add(appVendorLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(appHomepageLabel)) .add(homepageLabel)) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(vendorLabel) .add(49, 49, 49)) .add(layout.createSequentialGroup() .add(18, 18, 18) .add(closeButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap()))) ); pack(); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton closeButton; // End of variables declaration//GEN-END:variables }
Java
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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. 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 <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEAPPREQUEST_H #define QTAWS_DELETEAPPREQUEST_H #include "sagemakerrequest.h" namespace QtAws { namespace SageMaker { class DeleteAppRequestPrivate; class QTAWSSAGEMAKER_EXPORT DeleteAppRequest : public SageMakerRequest { public: DeleteAppRequest(const DeleteAppRequest &other); DeleteAppRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DeleteAppRequest) }; } // namespace SageMaker } // namespace QtAws #endif
Java
// // This file is auto-generated. Please don't modify it! // package org.opencv.video; import java.util.List; import org.opencv.core.Mat; import org.opencv.core.MatOfByte; import org.opencv.core.MatOfFloat; import org.opencv.core.MatOfPoint2f; import org.opencv.core.Rect; import org.opencv.core.RotatedRect; import org.opencv.core.Size; import org.opencv.core.TermCriteria; import org.opencv.utils.Converters; public class Video { public static final int OPTFLOW_USE_INITIAL_FLOW = 4, OPTFLOW_LK_GET_MIN_EIGENVALS = 8, OPTFLOW_FARNEBACK_GAUSSIAN = 256, MOTION_TRANSLATION = 0, MOTION_EUCLIDEAN = 1, MOTION_AFFINE = 2, MOTION_HOMOGRAPHY = 3; private static final int CV_LKFLOW_INITIAL_GUESSES = 4, CV_LKFLOW_GET_MIN_EIGENVALS = 8; // // C++: Mat estimateRigidTransform(Mat src, Mat dst, bool fullAffine) // //javadoc: estimateRigidTransform(src, dst, fullAffine) public static Mat estimateRigidTransform(Mat src, Mat dst, boolean fullAffine) { Mat retVal = new Mat(estimateRigidTransform_0(src.nativeObj, dst.nativeObj, fullAffine)); return retVal; } // // C++: Ptr_BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history = 500, double dist2Threshold = 400.0, bool detectShadows = true) // //javadoc: createBackgroundSubtractorKNN(history, dist2Threshold, detectShadows) public static BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history, double dist2Threshold, boolean detectShadows) { BackgroundSubtractorKNN retVal = new BackgroundSubtractorKNN(createBackgroundSubtractorKNN_0(history, dist2Threshold, detectShadows)); return retVal; } //javadoc: createBackgroundSubtractorKNN() public static BackgroundSubtractorKNN createBackgroundSubtractorKNN() { BackgroundSubtractorKNN retVal = new BackgroundSubtractorKNN(createBackgroundSubtractorKNN_1()); return retVal; } // // C++: Ptr_BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history = 500, double varThreshold = 16, bool detectShadows = true) // //javadoc: createBackgroundSubtractorMOG2(history, varThreshold, detectShadows) public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold, boolean detectShadows) { BackgroundSubtractorMOG2 retVal = new BackgroundSubtractorMOG2(createBackgroundSubtractorMOG2_0(history, varThreshold, detectShadows)); return retVal; } //javadoc: createBackgroundSubtractorMOG2() public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2() { BackgroundSubtractorMOG2 retVal = new BackgroundSubtractorMOG2(createBackgroundSubtractorMOG2_1()); return retVal; } // // C++: Ptr_DualTVL1OpticalFlow createOptFlow_DualTVL1() // //javadoc: createOptFlow_DualTVL1() public static DualTVL1OpticalFlow createOptFlow_DualTVL1() { DualTVL1OpticalFlow retVal = new DualTVL1OpticalFlow(createOptFlow_DualTVL1_0()); return retVal; } // // C++: RotatedRect CamShift(Mat probImage, Rect& window, TermCriteria criteria) // //javadoc: CamShift(probImage, window, criteria) public static RotatedRect CamShift(Mat probImage, Rect window, TermCriteria criteria) { double[] window_out = new double[4]; RotatedRect retVal = new RotatedRect(CamShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon)); if (window != null) { window.x = (int) window_out[0]; window.y = (int) window_out[1]; window.width = (int) window_out[2]; window.height = (int) window_out[3]; } return retVal; } // // C++: double findTransformECC(Mat templateImage, Mat inputImage, Mat& warpMatrix, int motionType = MOTION_AFFINE, TermCriteria criteria = TermCriteria // (TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001), Mat inputMask = Mat()) // //javadoc: findTransformECC(templateImage, inputImage, warpMatrix, motionType, criteria, inputMask) public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType, TermCriteria criteria, Mat inputMask) { double retVal = findTransformECC_0(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj, motionType, criteria.type, criteria.maxCount, criteria.epsilon, inputMask.nativeObj); return retVal; } //javadoc: findTransformECC(templateImage, inputImage, warpMatrix, motionType) public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType) { double retVal = findTransformECC_1(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj, motionType); return retVal; } //javadoc: findTransformECC(templateImage, inputImage, warpMatrix) public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix) { double retVal = findTransformECC_2(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj); return retVal; } // // C++: int buildOpticalFlowPyramid(Mat img, vector_Mat& pyramid, Size winSize, int maxLevel, bool withDerivatives = true, int pyrBorder = BORDER_REFLECT_101, int // derivBorder = BORDER_CONSTANT, bool tryReuseInputImage = true) // //javadoc: buildOpticalFlowPyramid(img, pyramid, winSize, maxLevel, withDerivatives, pyrBorder, derivBorder, tryReuseInputImage) public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder, boolean tryReuseInputImage) { Mat pyramid_mat = new Mat(); int retVal = buildOpticalFlowPyramid_0(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel, withDerivatives, pyrBorder, derivBorder, tryReuseInputImage); Converters.Mat_to_vector_Mat(pyramid_mat, pyramid); pyramid_mat.release(); return retVal; } //javadoc: buildOpticalFlowPyramid(img, pyramid, winSize, maxLevel) public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel) { Mat pyramid_mat = new Mat(); int retVal = buildOpticalFlowPyramid_1(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel); Converters.Mat_to_vector_Mat(pyramid_mat, pyramid); pyramid_mat.release(); return retVal; } // // C++: int meanShift(Mat probImage, Rect& window, TermCriteria criteria) // //javadoc: meanShift(probImage, window, criteria) public static int meanShift(Mat probImage, Rect window, TermCriteria criteria) { double[] window_out = new double[4]; int retVal = meanShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon); if (window != null) { window.x = (int) window_out[0]; window.y = (int) window_out[1]; window.width = (int) window_out[2]; window.height = (int) window_out[3]; } return retVal; } // // C++: void calcOpticalFlowFarneback(Mat prev, Mat next, Mat& flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags) // //javadoc: calcOpticalFlowFarneback(prev, next, flow, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags) public static void calcOpticalFlowFarneback(Mat prev, Mat next, Mat flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags) { calcOpticalFlowFarneback_0(prev.nativeObj, next.nativeObj, flow.nativeObj, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags); return; } // // C++: void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, vector_Point2f prevPts, vector_Point2f& nextPts, vector_uchar& status, vector_float& err, Size winSize = Size // (21,21), int maxLevel = 3, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4) // //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel, criteria, flags, minEigThreshold) public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel, TermCriteria criteria, int flags, double minEigThreshold) { Mat prevPts_mat = prevPts; Mat nextPts_mat = nextPts; Mat status_mat = status; Mat err_mat = err; calcOpticalFlowPyrLK_0(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel, criteria.type, criteria.maxCount, criteria.epsilon, flags, minEigThreshold); return; } //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel) public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel) { Mat prevPts_mat = prevPts; Mat nextPts_mat = nextPts; Mat status_mat = status; Mat err_mat = err; calcOpticalFlowPyrLK_1(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel); return; } //javadoc: calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts, status, err) public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err) { Mat prevPts_mat = prevPts; Mat nextPts_mat = nextPts; Mat status_mat = status; Mat err_mat = err; calcOpticalFlowPyrLK_2(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj); return; } // C++: Mat estimateRigidTransform(Mat src, Mat dst, bool fullAffine) private static native long estimateRigidTransform_0(long src_nativeObj, long dst_nativeObj, boolean fullAffine); // C++: Ptr_BackgroundSubtractorKNN createBackgroundSubtractorKNN(int history = 500, double dist2Threshold = 400.0, bool detectShadows = true) private static native long createBackgroundSubtractorKNN_0(int history, double dist2Threshold, boolean detectShadows); private static native long createBackgroundSubtractorKNN_1(); // C++: Ptr_BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history = 500, double varThreshold = 16, bool detectShadows = true) private static native long createBackgroundSubtractorMOG2_0(int history, double varThreshold, boolean detectShadows); private static native long createBackgroundSubtractorMOG2_1(); // C++: Ptr_DualTVL1OpticalFlow createOptFlow_DualTVL1() private static native long createOptFlow_DualTVL1_0(); // C++: RotatedRect CamShift(Mat probImage, Rect& window, TermCriteria criteria) private static native double[] CamShift_0(long probImage_nativeObj, int window_x, int window_y, int window_width, int window_height, double[] window_out, int criteria_type, int criteria_maxCount, double criteria_epsilon); // C++: double findTransformECC(Mat templateImage, Mat inputImage, Mat& warpMatrix, int motionType = MOTION_AFFINE, TermCriteria criteria = TermCriteria // (TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001), Mat inputMask = Mat()) private static native double findTransformECC_0(long templateImage_nativeObj, long inputImage_nativeObj, long warpMatrix_nativeObj, int motionType, int criteria_type, int criteria_maxCount, double criteria_epsilon, long inputMask_nativeObj); private static native double findTransformECC_1(long templateImage_nativeObj, long inputImage_nativeObj, long warpMatrix_nativeObj, int motionType); private static native double findTransformECC_2(long templateImage_nativeObj, long inputImage_nativeObj, long warpMatrix_nativeObj); // C++: int buildOpticalFlowPyramid(Mat img, vector_Mat& pyramid, Size winSize, int maxLevel, bool withDerivatives = true, int pyrBorder = BORDER_REFLECT_101, int // derivBorder = BORDER_CONSTANT, bool tryReuseInputImage = true) private static native int buildOpticalFlowPyramid_0(long img_nativeObj, long pyramid_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder, boolean tryReuseInputImage); private static native int buildOpticalFlowPyramid_1(long img_nativeObj, long pyramid_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel); // C++: int meanShift(Mat probImage, Rect& window, TermCriteria criteria) private static native int meanShift_0(long probImage_nativeObj, int window_x, int window_y, int window_width, int window_height, double[] window_out, int criteria_type, int criteria_maxCount, double criteria_epsilon); // C++: void calcOpticalFlowFarneback(Mat prev, Mat next, Mat& flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags) private static native void calcOpticalFlowFarneback_0(long prev_nativeObj, long next_nativeObj, long flow_nativeObj, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags); // C++: void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, vector_Point2f prevPts, vector_Point2f& nextPts, vector_uchar& status, vector_float& err, Size winSize = Size // (21,21), int maxLevel = 3, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4) private static native void calcOpticalFlowPyrLK_0(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, int criteria_type, int criteria_maxCount, double criteria_epsilon, int flags, double minEigThreshold); private static native void calcOpticalFlowPyrLK_1(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel); private static native void calcOpticalFlowPyrLK_2(long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_mat_nativeObj, long nextPts_mat_nativeObj, long status_mat_nativeObj, long err_mat_nativeObj); }
Java
FILE(REMOVE_RECURSE "CommonBehavior.cpp" "CommonBehavior.h" "RGBD.cpp" "RGBD.h" "JointMotor.cpp" "JointMotor.h" "DifferentialRobot.cpp" "DifferentialRobot.h" "moc_specificworker.cxx" "moc_specificmonitor.cxx" "moc_genericmonitor.cxx" "moc_commonbehaviorI.cxx" "moc_genericworker.cxx" "ui_mainUI.h" "CMakeFiles/trainCNN.dir/specificworker.cpp.o" "CMakeFiles/trainCNN.dir/specificmonitor.cpp.o" "CMakeFiles/trainCNN.dir/opt/robocomp/classes/rapplication/rapplication.cpp.o" "CMakeFiles/trainCNN.dir/opt/robocomp/classes/qlog/qlog.cpp.o" "CMakeFiles/trainCNN.dir/main.cpp.o" "CMakeFiles/trainCNN.dir/genericmonitor.cpp.o" "CMakeFiles/trainCNN.dir/commonbehaviorI.cpp.o" "CMakeFiles/trainCNN.dir/genericworker.cpp.o" "CMakeFiles/trainCNN.dir/CommonBehavior.cpp.o" "CMakeFiles/trainCNN.dir/RGBD.cpp.o" "CMakeFiles/trainCNN.dir/JointMotor.cpp.o" "CMakeFiles/trainCNN.dir/DifferentialRobot.cpp.o" "CMakeFiles/trainCNN.dir/moc_specificworker.cxx.o" "CMakeFiles/trainCNN.dir/moc_specificmonitor.cxx.o" "CMakeFiles/trainCNN.dir/moc_genericmonitor.cxx.o" "CMakeFiles/trainCNN.dir/moc_commonbehaviorI.cxx.o" "CMakeFiles/trainCNN.dir/moc_genericworker.cxx.o" "../bin/trainCNN.pdb" "../bin/trainCNN" ) # Per-language clean rules from dependency scanning. FOREACH(lang CXX) INCLUDE(CMakeFiles/trainCNN.dir/cmake_clean_${lang}.cmake OPTIONAL) ENDFOREACH(lang)
Java
/* * HA-JDBC: High-Availability JDBC * Copyright (C) 2013 Paul Ferraro * * 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. * * 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 <http://www.gnu.org/licenses/>. */ package net.sf.hajdbc.sql.io; import java.io.OutputStream; import java.sql.SQLException; import java.util.Map; import net.sf.hajdbc.Database; import net.sf.hajdbc.invocation.Invoker; import net.sf.hajdbc.sql.ProxyFactory; /** * @author Paul Ferraro */ public class OutputStreamProxyFactory<Z, D extends Database<Z>, P> extends OutputProxyFactory<Z, D, P, OutputStream> { public OutputStreamProxyFactory(P parentProxy, ProxyFactory<Z, D, P, SQLException> parent, Invoker<Z, D, P, OutputStream, SQLException> invoker, Map<D, OutputStream> outputs) { super(parentProxy, parent, invoker, outputs); } @Override public OutputStream createProxy() { return new OutputStreamProxy<>(this); } }
Java
/** * Copyright © 2002 Instituto Superior Técnico * * This file is part of FenixEdu Academic. * * FenixEdu Academic 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. * * FenixEdu Academic 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 FenixEdu Academic. If not, see <http://www.gnu.org/licenses/>. */ package org.fenixedu.academic.domain.accounting; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.stream.Stream; import org.apache.commons.lang.StringUtils; import org.fenixedu.academic.domain.Person; import org.fenixedu.academic.domain.exceptions.DomainException; import org.fenixedu.academic.domain.exceptions.DomainExceptionWithLabelFormatter; import org.fenixedu.academic.domain.organizationalStructure.Party; import org.fenixedu.academic.util.LabelFormatter; import org.fenixedu.academic.util.Money; import org.fenixedu.bennu.core.domain.Bennu; import org.fenixedu.bennu.core.domain.User; import org.fenixedu.bennu.core.security.Authenticate; import org.fenixedu.bennu.core.signals.DomainObjectEvent; import org.fenixedu.bennu.core.signals.Signal; import org.joda.time.DateTime; import org.joda.time.LocalDate; import org.joda.time.YearMonthDay; /** * Two-ledged accounting transaction * * @author naat * */ public class AccountingTransaction extends AccountingTransaction_Base { public static final String SIGNAL_ANNUL = AccountingTransaction.class.getName() + ".annul"; public static Comparator<AccountingTransaction> COMPARATOR_BY_WHEN_REGISTERED = (leftAccountingTransaction, rightAccountingTransaction) -> { int comparationResult = leftAccountingTransaction.getWhenRegistered().compareTo(rightAccountingTransaction.getWhenRegistered()); return (comparationResult == 0) ? leftAccountingTransaction.getExternalId().compareTo( rightAccountingTransaction.getExternalId()) : comparationResult; }; protected AccountingTransaction() { super(); super.setRootDomainObject(Bennu.getInstance()); } public AccountingTransaction(User responsibleUser, Event event, Entry debit, Entry credit, AccountingTransactionDetail transactionDetail) { this(); init(responsibleUser, event, debit, credit, transactionDetail); } private AccountingTransaction(User responsibleUser, Entry debit, Entry credit, AccountingTransactionDetail transactionDetail, AccountingTransaction transactionToAdjust) { this(); init(responsibleUser, transactionToAdjust.getEvent(), debit, credit, transactionDetail, transactionToAdjust); } protected void init(User responsibleUser, Event event, Entry debit, Entry credit, AccountingTransactionDetail transactionDetail) { init(responsibleUser, event, debit, credit, transactionDetail, null); } protected void init(User responsibleUser, Event event, Entry debit, Entry credit, AccountingTransactionDetail transactionDetail, AccountingTransaction transactionToAdjust) { checkParameters(event, debit, credit); // check for operations after registered date List<String> operationsAfter = event.getOperationsAfter(transactionDetail.getWhenProcessed()); if (!operationsAfter.isEmpty()) { throw new DomainException("error.accounting.AccountingTransaction.cannot.create.transaction", String.join(",", operationsAfter)); } super.setEvent(event); super.setResponsibleUser(responsibleUser); super.addEntries(debit); super.addEntries(credit); super.setAdjustedTransaction(transactionToAdjust); super.setTransactionDetail(transactionDetail); } private void checkParameters(Event event, Entry debit, Entry credit) { if (event == null) { throw new DomainException("error.accounting.accountingTransaction.event.cannot.be.null"); } if (debit == null) { throw new DomainException("error.accounting.accountingTransaction.debit.cannot.be.null"); } if (credit == null) { throw new DomainException("error.accounting.accountingTransaction.credit.cannot.be.null"); } } @Override public void addEntries(Entry entries) { throw new DomainException("error.accounting.accountingTransaction.cannot.add.entries"); } @Override public Set<Entry> getEntriesSet() { return Collections.unmodifiableSet(super.getEntriesSet()); } @Override public void removeEntries(Entry entries) { throw new DomainException("error.accounting.accountingTransaction.cannot.remove.entries"); } @Override public void setEvent(Event event) { super.setEvent(event); } @Override public void setResponsibleUser(User responsibleUser) { throw new DomainException("error.accounting.accountingTransaction.cannot.modify.responsibleUser"); } @Override public void setAdjustedTransaction(AccountingTransaction adjustedTransaction) { throw new DomainException("error.accounting.accountingTransaction.cannot.modify.adjustedTransaction"); } @Override public void setTransactionDetail(AccountingTransactionDetail transactionDetail) { throw new DomainException("error.accounting.AccountingTransaction.cannot.modify.transactionDetail"); } @Override public void addAdjustmentTransactions(AccountingTransaction accountingTransaction) { throw new DomainException( "error.org.fenixedu.academic.domain.accounting.AccountingTransaction.cannot.add.accountingTransaction"); } @Override public Set<AccountingTransaction> getAdjustmentTransactionsSet() { return Collections.unmodifiableSet(super.getAdjustmentTransactionsSet()); } public Stream<AccountingTransaction> getAdjustmentTransactionStream() { return super.getAdjustmentTransactionsSet().stream(); } @Override public void removeAdjustmentTransactions(AccountingTransaction adjustmentTransactions) { throw new DomainException( "error.org.fenixedu.academic.domain.accounting.AccountingTransaction.cannot.remove.accountingTransaction"); } public LabelFormatter getDescriptionForEntryType(EntryType entryType) { return getEvent().getDescriptionForEntryType(entryType); } public Account getFromAccount() { return getEntry(false).getAccount(); } public Account getToAccount() { return getEntry(true).getAccount(); } public Entry getToAccountEntry() { return getEntry(true); } public Entry getFromAccountEntry() { return getEntry(false); } private Entry getEntry(boolean positive) { for (final Entry entry : super.getEntriesSet()) { if (entry.isPositiveAmount() == positive) { return entry; } } throw new DomainException("error.accounting.accountingTransaction.transaction.data.is.corrupted"); } public AccountingTransaction reimburse(User responsibleUser, PaymentMethod paymentMethod,String paymentReference, Money amountToReimburse) { return reimburse(responsibleUser, paymentMethod,paymentReference, amountToReimburse, null); } public AccountingTransaction reimburse(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, String comments) { return reimburse(responsibleUser, paymentMethod, paymentReference, amountToReimburse, comments, true); } public AccountingTransaction reimburse(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, DateTime reimburseDate, String comments) { return reimburse(responsibleUser, paymentMethod, paymentReference, amountToReimburse, comments, true, reimburseDate); } public AccountingTransaction reimburseWithoutRules(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse) { return reimburseWithoutRules(responsibleUser, paymentMethod, paymentReference, amountToReimburse, null); } public AccountingTransaction reimburseWithoutRules(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, String comments) { return reimburse(responsibleUser, paymentMethod, paymentReference, amountToReimburse, comments, false); } public void annul(final User responsibleUser, final String reason) { if (StringUtils.isEmpty(reason)) { throw new DomainException( "error.org.fenixedu.academic.domain.accounting.AccountingTransaction.cannot.annul.without.reason"); } checkRulesToAnnul(); annulReceipts(); Signal.emit(SIGNAL_ANNUL, new DomainObjectEvent<AccountingTransaction>(this)); reimburseWithoutRules(responsibleUser, getTransactionDetail().getPaymentMethod(), getTransactionDetail() .getPaymentReference(), getAmountWithAdjustment(), reason); } private void checkRulesToAnnul() { final List<String> operationsAfter = getEvent().getOperationsAfter(getWhenProcessed()); if (!operationsAfter.isEmpty()) { throw new DomainException("error.accounting.AccountingTransaction.cannot.annul.operations.after", String.join(",", operationsAfter)); } } private void annulReceipts() { getToAccountEntry().getReceiptsSet().stream().filter(Receipt::isActive).forEach(r -> { Person responsible = Optional.ofNullable(Authenticate.getUser()).map(User::getPerson).orElse(null); r.annul(responsible); }); } private AccountingTransaction reimburse(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, String comments, boolean checkRules) { return reimburse(responsibleUser, paymentMethod, paymentReference, amountToReimburse, comments, checkRules, new DateTime ()); } private AccountingTransaction reimburse(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, String comments, boolean checkRules, DateTime reimburseDate) { if (checkRules && !canApplyReimbursement(amountToReimburse)) { throw new DomainException("error.accounting.AccountingTransaction.cannot.reimburse.events.that.may.open"); } if (!getToAccountEntry().canApplyReimbursement(amountToReimburse)) { throw new DomainExceptionWithLabelFormatter( "error.accounting.AccountingTransaction.amount.to.reimburse.exceeds.entry.amount", getToAccountEntry() .getDescription()); } final AccountingTransaction transaction = new AccountingTransaction(responsibleUser, new Entry(EntryType.ADJUSTMENT, amountToReimburse.negate(), getToAccount()), new Entry(EntryType.ADJUSTMENT, amountToReimburse, getFromAccount()), new AccountingTransactionDetail(reimburseDate, paymentMethod, paymentReference, comments), this); getEvent().recalculateState(new DateTime()); return transaction; } public DateTime getWhenRegistered() { return getTransactionDetail().getWhenRegistered(); } public DateTime getWhenProcessed() { return getTransactionDetail().getWhenProcessed(); } public String getComments() { return getTransactionDetail().getComments(); } public boolean isPayed(final int civilYear) { return getWhenRegistered().getYear() == civilYear; } public boolean isAdjustingTransaction() { return getAdjustedTransaction() != null; } public boolean hasBeenAdjusted() { return !super.getAdjustmentTransactionsSet().isEmpty(); } public Entry getEntryFor(final Account account) { for (final Entry accountingEntry : super.getEntriesSet()) { if (accountingEntry.getAccount() == account) { return accountingEntry; } } throw new DomainException( "error.accounting.accountingTransaction.transaction.data.is.corrupted.because.no.entry.belongs.to.account"); } private boolean canApplyReimbursement(final Money amount) { return getEvent().canApplyReimbursement(amount); } public boolean isSourceAccountFromParty(Party party) { return getFromAccount().getParty() == party; } @Override protected void checkForDeletionBlockers(Collection<String> blockers) { super.checkForDeletionBlockers(blockers); blockers.addAll(getEvent().getOperationsAfter(getWhenProcessed())); } public void delete() { DomainException.throwWhenDeleteBlocked(getDeletionBlockers()); super.setAdjustedTransaction(null); for (; !getAdjustmentTransactionsSet().isEmpty(); getAdjustmentTransactionsSet().iterator().next().delete()) { ; } if (getTransactionDetail() != null) { getTransactionDetail().delete(); } for (; !getEntriesSet().isEmpty(); getEntriesSet().iterator().next().delete()) { ; } super.setResponsibleUser(null); super.setEvent(null); setRootDomainObject(null); super.deleteDomainObject(); } public Money getAmountWithAdjustment() { return getToAccountEntry().getAmountWithAdjustment(); } public boolean isInsidePeriod(final YearMonthDay startDate, final YearMonthDay endDate) { return isInsidePeriod(startDate.toLocalDate(), endDate.toLocalDate()); } public boolean isInsidePeriod(final LocalDate startDate, final LocalDate endDate) { return !getWhenRegistered().toLocalDate().isBefore(startDate) && !getWhenRegistered().toLocalDate().isAfter(endDate); } public boolean isInstallment() { return false; } public PaymentMethod getPaymentMethod() { return getTransactionDetail().getPaymentMethod(); } public Money getOriginalAmount() { return getToAccountEntry().getOriginalAmount(); } }
Java
package net.amygdalum.testrecorder.profile; import static org.assertj.core.api.Assertions.assertThat; import java.io.ByteArrayOutputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.net.URL; import java.nio.file.Path; import java.util.Enumeration; import java.util.stream.Stream; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import net.amygdalum.testrecorder.util.ExtensibleClassLoader; import net.amygdalum.testrecorder.util.LogLevel; import net.amygdalum.testrecorder.util.LoggerExtension; public class ClassPathConfigurationLoaderTest { @Nested class testLoad { @Test void common() throws Exception { ExtensibleClassLoader classLoader = new ExtensibleClassLoader(ClassPathConfigurationLoaderTest.class.getClassLoader()); classLoader.defineResource("agentconfig/net.amygdalum.testrecorder.profile.ConfigNoArgumentsNonExclusive", "net.amygdalum.testrecorder.profile.DefaultConfigNoArguments".getBytes()); ClassPathConfigurationLoader loader = new ClassPathConfigurationLoader(classLoader); assertThat(loader.load(ConfigNoArgumentsNonExclusive.class).findFirst()).containsInstanceOf(DefaultConfigNoArguments.class); } @ExtendWith(LoggerExtension.class) @Test void withClassLoaderError(@LogLevel("error") ByteArrayOutputStream error) throws Exception { ExtensibleClassLoader classLoader = new ExtensibleClassLoader(ClassPathConfigurationLoaderTest.class.getClassLoader()) { @Override public Enumeration<URL> getResources(String name) throws IOException { throw new IOException(); } }; classLoader.defineResource("agentconfig/net.amygdalum.testrecorder.profile.ConfigNoArgumentsNonExclusive", "net.amygdalum.testrecorder.profile.DefaultConfigNoArguments".getBytes()); ClassPathConfigurationLoader loader = new ClassPathConfigurationLoader(classLoader); assertThat(loader.load(ConfigNoArgumentsNonExclusive.class).findFirst()).isNotPresent(); assertThat(error.toString()).contains("cannot load configuration from classpath"); } @ExtendWith(LoggerExtension.class) @Test void withFileNotFound(@LogLevel("debug") ByteArrayOutputStream debug) throws Exception { ExtensibleClassLoader classLoader = new ExtensibleClassLoader(ClassPathConfigurationLoaderTest.class.getClassLoader()); classLoader.defineResource("agentconfig/net.amygdalum.testrecorder.profile.ConfigNoArgumentsNonExclusive", "net.amygdalum.testrecorder.profile.DefaultConfigNoArguments".getBytes()); ClassPathConfigurationLoader loader = new ClassPathConfigurationLoader(classLoader) { @Override protected <T> Stream<T> configsFrom(Path path, Class<T> clazz, Object[] args) throws IOException { throw new FileNotFoundException(); } }; assertThat(loader.load(ConfigNoArgumentsNonExclusive.class).findFirst()).isNotPresent(); assertThat(debug.toString()).contains("did not find configuration file"); } @ExtendWith(LoggerExtension.class) @Test void withIOException(@LogLevel("error") ByteArrayOutputStream error) throws Exception { ExtensibleClassLoader classLoader = new ExtensibleClassLoader(ClassPathConfigurationLoaderTest.class.getClassLoader()); classLoader.defineResource("agentconfig/net.amygdalum.testrecorder.profile.ConfigNoArgumentsNonExclusive", "net.amygdalum.testrecorder.profile.DefaultConfigNoArguments".getBytes()); ClassPathConfigurationLoader loader = new ClassPathConfigurationLoader(classLoader) { @Override protected <T> Stream<T> configsFrom(Path path, Class<T> clazz, Object[] args) throws IOException { throw new IOException(); } }; assertThat(loader.load(ConfigNoArgumentsNonExclusive.class).findFirst()).isNotPresent(); assertThat(error.toString()).contains("cannot load configuration file"); } } }
Java
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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. 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 <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_TAGRESOURCEREQUEST_H #define QTAWS_TAGRESOURCEREQUEST_H #include "iot1clickdevicesservicerequest.h" namespace QtAws { namespace IoT1ClickDevicesService { class TagResourceRequestPrivate; class QTAWSIOT1CLICKDEVICESSERVICE_EXPORT TagResourceRequest : public IoT1ClickDevicesServiceRequest { public: TagResourceRequest(const TagResourceRequest &other); TagResourceRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(TagResourceRequest) }; } // namespace IoT1ClickDevicesService } // namespace QtAws #endif
Java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2014, Arnaud Roques * * Project Info: http://plantuml.sourceforge.net * * This file is part of PlantUML. * * PlantUML 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. * * PlantUML 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. * * * Original Author: Arnaud Roques */ package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; public class TextBlockGeneric implements TextBlock { private final TextBlock textBlock; private final HtmlColor background; private final HtmlColor border; public TextBlockGeneric(TextBlock textBlock, HtmlColor background, HtmlColor border) { this.textBlock = textBlock; this.border = border; this.background = background; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = textBlock.calculateDimension(stringBounder); return dim; } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeBackColor(background)); ug = ug.apply(new UChangeColor(border)); final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug.apply(new UStroke(2, 2, 1)).draw(new URectangle(dim.getWidth(), dim.getHeight())); textBlock.drawU(ug); } }
Java
/* * SonarQube * Copyright (C) 2009-2022 SonarSource SA * mailto:info AT sonarsource DOT com * * 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. * * 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.authentication.ws; import org.junit.Test; import org.sonar.core.platform.ListContainer; import static org.assertj.core.api.Assertions.assertThat; public class AuthenticationWsModuleTest { @Test public void verify_count_of_added_components() { ListContainer container = new ListContainer(); new AuthenticationWsModule().configure(container); assertThat(container.getAddedObjects()).hasSize(4); } }
Java
/* * Copyright (C) 2015 Morwenn * * The SGL 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. * * The SGL 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 <http://www.gnu.org/licenses/>. */ #ifndef SGL_TYPE_TRAITS_IS_FLOATING_POINT_H_ #define SGL_TYPE_TRAITS_IS_FLOATING_POINT_H_ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <sgl/detail/common.h> #define sgl_is_floating_point(value) \ _Generic( (value), \ float: true, \ double: true, \ long double: true, \ default: false \ ) #endif // SGL_TYPE_TRAITS_IS_FLOATING_POINT_H_
Java
<?php /*************************************************************************************/ /* This file is part of the RainbowPHP package. If you think this file is lost, */ /* please send it to anyone kind enough to take care of it. Thank you. */ /* */ /* email : bperche9@gmail.com */ /* web : http://www.benjaminperche.fr */ /* */ /* For the full copyright and license information, please view the LICENSE.txt */ /* file that was distributed with this source code. */ /*************************************************************************************/ namespace RainbowPHP\Generator; use RainbowPHP\DataProvider\DataProviderInterface; use RainbowPHP\File\FileHandlerInterface; use RainbowPHP\Formatter\FormatterInterface; use RainbowPHP\Formatter\LineFormatter; use RainbowPHP\Transformer\TransformerInterface; /** * Class FileGenerator * @package RainbowPHP\Generator * @author Benjamin Perche <bperche9@gmail.com> */ class FileGenerator implements FileGeneratorInterface { protected $fileHandler; protected $transformer; protected $dataProvider; protected $formatter; public function __construct( FileHandlerInterface $fileHandler, TransformerInterface $transformer, DataProviderInterface $dataProvider, FormatterInterface $formatter = null ) { $this->fileHandler = $fileHandler; $this->transformer = $transformer; $this->dataProvider = $dataProvider; $this->formatter = $formatter ?: new LineFormatter(); } public function generateFile() { foreach ($this->dataProvider->generate() as $value) { if (null !== $value) { $this->fileHandler->writeLine($this->formatter->format($value, $this->transformer->transform($value))); } } } }
Java
/*************************************************************************** * Copyright (C) 2010 by Ralf Kaestner, Nikolas Engelhard, Yves Pilat * * ralf.kaestner@gmail.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. * ***************************************************************************/ #ifndef BOX_H #define BOX_H #include "utils/geometry.h" template <typename T, size_t K> class Box : public Geometry<T, K> { public: template <typename... P> inline Box(const P&... parameters); inline ~Box(); inline Box& operator=(const Box<T, K>& src); }; #include "utils/box.tpp" #endif
Java
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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. 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 <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DESCRIBEPULLREQUESTEVENTSREQUEST_H #define QTAWS_DESCRIBEPULLREQUESTEVENTSREQUEST_H #include "codecommitrequest.h" namespace QtAws { namespace CodeCommit { class DescribePullRequestEventsRequestPrivate; class QTAWSCODECOMMIT_EXPORT DescribePullRequestEventsRequest : public CodeCommitRequest { public: DescribePullRequestEventsRequest(const DescribePullRequestEventsRequest &other); DescribePullRequestEventsRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DescribePullRequestEventsRequest) }; } // namespace CodeCommit } // namespace QtAws #endif
Java
<?php namespace pocketmine\entity; use pocketmine\item\Item as ItemItem; use pocketmine\nbt\tag\IntTag; class Slime extends Monster{ const NETWORK_ID = self::SLIME; const DATA_SIZE = 16; public $height = 2; public $width = 2; public $lenght = 2;//TODO: Size protected $exp_min = 1; protected $exp_max = 1;//TODO: Size public function initEntity(){ $this->setMaxHealth(1); parent::initEntity(); if (!isset($this->namedtag->Size)){ $this->setSize(mt_rand(0, 3)); } $this->setSize($this->getSize()); } public function getName(): string{ return "Slime"; } public function getDrops(): array{ return [ ItemItem::get(ItemItem::SLIMEBALL, 0, mt_rand(0, 2)) ]; } public function setSize($value){ $this->namedtag->Size = new IntTag("Size", $value); $this->setDataProperty(self::DATA_SIZE, self::DATA_TYPE_INT, $value); } public function getSize(){ return $this->namedtag["Size"]; } }
Java
using System.Globalization; using System.ServiceProcess; using System.Threading; using Castle.Core.Logging; using Consumentor.ShopGun.Component; using Consumentor.ShopGun.Configuration; namespace Consumentor.ShopGun.Services { public abstract class ServiceHostBase : ServiceBase { public abstract void OnStartService(string[] args); public abstract void OnStopService(); protected IContainer IocContainer { get; private set; } protected ServiceHostBase(IContainer iocContainer, string serviceName) { IocContainer = iocContainer; ServiceName = serviceName; } public ILogger Log { get; set; } protected override void OnStart(string[] args) { Log.Debug("Service OnStart"); SetCultureInfo(); OnStartService(args); base.OnStart(args); } protected void SetCultureInfo() { var cultureConfiguration = IocContainer.Resolve<IServiceCultureConfiguration>(); Thread.CurrentThread.CurrentCulture = cultureConfiguration.CultureInfo; Thread.CurrentThread.CurrentUICulture = cultureConfiguration.UICulture; Log.Debug("Service {0} started with CurrentCulture: {1}", ServiceName, CultureInfo.CurrentCulture.ToString()); Log.Debug("Service {0} started with CurrentUICulture: {1}", ServiceName, CultureInfo.CurrentUICulture.ToString()); } protected override void OnStop() { Log.Debug("Service OnStop"); OnStopService(); base.OnStop(); } } }
Java
#include "GAPhysicsBaseTemp.h" //------------------------------GAPhysicsBase------------------------------------------ GAPhysicsBase::GAPhysicsBase() { } int GAPhysicsBase::testCollideWith(GAPhysicsBase* object2,GAVector3& collidePoint) { return 0; } //--------------------------------GALine----------------------------------------------- GALine::GALine() { p1=GAVector3(0,0,0); p2=GAVector3(1,1,1); } GALine::GALine(GAVector3 p1_,GAVector3 p2_) { p1=p1_; p2=p2_; } //-------------------------------GASegment--------------------------------------------- GASegment::GASegment() { pstart=GAVector3(0,0,0); pend=GAVector3(1,1,1); } GASegment::GASegment(GAVector3 pstart_,GAVector3 pend_) { pstart=pstart_; pend=pend_; } //-------------------------------GAPlane----------------------------------------------- GAPlane::GAPlane() { } int GAPlane::testCollideWith(GAPhysicsBase* object2,GAVector3& collidePoint) { return 0; } //-----------------------------------GACube-------------------------------------------- GACube::GACube() { } int GACube::testCollideWith(GAPhysicsBase* object2,GAVector3& collidePoint) { return 0; } int GACube::testCollideWithCube(GACube* object2,GAVector3& collidePoint) { return 0; } //--------------------------------GACylinder------------------------------------------- //--------------------------------GASphere--------------------------------------------- //--------------------------------GACapsule--------------------------------------------
Java
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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. 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 <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEHOSTEDZONEREQUEST_H #define QTAWS_DELETEHOSTEDZONEREQUEST_H #include "route53request.h" namespace QtAws { namespace Route53 { class DeleteHostedZoneRequestPrivate; class QTAWSROUTE53_EXPORT DeleteHostedZoneRequest : public Route53Request { public: DeleteHostedZoneRequest(const DeleteHostedZoneRequest &other); DeleteHostedZoneRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DeleteHostedZoneRequest) }; } // namespace Route53 } // namespace QtAws #endif
Java
/******************************************************************************* * Este arquivo é parte do Biblivre5. * * Biblivre5 é 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 3 da * Licença, ou (caso queira) qualquer versão posterior. * * Este programa é distribuído na esperança de que possa ser útil, * mas SEM NENHUMA GARANTIA; nem mesmo a garantia implícita de * MERCANTIBILIDADE OU ADEQUAÇÃO PARA UM FIM PARTICULAR. Veja a * Licença Pública Geral GNU para maiores detalhes. * * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto * com este programa, Se não, veja em <http://www.gnu.org/licenses/>. * * @author Alberto Wagner <alberto@biblivre.org.br> * @author Danniel Willian <danniel@biblivre.org.br> ******************************************************************************/ package biblivre.core; import java.io.File; import java.util.LinkedList; import org.json.JSONArray; public class JavascriptCacheableList<T extends IFJson> extends LinkedList<T> implements IFCacheableJavascript { private static final long serialVersionUID = 1L; private String variable; private String prefix; private String suffix; private JavascriptCache cache; public JavascriptCacheableList(String variable, String prefix, String suffix) { this.variable = variable; this.prefix = prefix; this.suffix = suffix; } @Override public String getCacheFileNamePrefix() { return this.prefix; } @Override public String getCacheFileNameSuffix() { return this.suffix; } @Override public String toJavascriptString() { JSONArray array = new JSONArray(); for (T el : this) { array.put(el.toJSONObject()); } return this.variable + " = " + array.toString() + ";"; } @Override public File getCacheFile() { if (this.cache == null) { this.cache = new JavascriptCache(this); } return this.cache.getCacheFile(); } @Override public String getCacheFileName() { if (this.cache == null) { this.cache = new JavascriptCache(this); } return this.cache.getFileName(); } @Override public void invalidateCache() { this.cache = null; } }
Java
package yaycrawler.admin; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.context.web.SpringBootServletInitializer; public class ServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(Application.class); } }
Java
// Copyright © 2004, 2010, Oracle and/or its affiliates. All rights reserved. // // MySQL Connector/NET is licensed under the terms of the GPLv2 // <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most // MySQL Connectors. There are special exceptions to the terms and // conditions of the GPLv2 as it is applied to this software, see the // FLOSS License Exception // <http://www.mysql.com/about/legal/licensing/foss-exception.html>. // // 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., // 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA using System; using System.Collections.Generic; using System.Data.Common; using System.Security; using System.Security.Permissions; namespace MySql.Data.MySqlClient { [Serializable, AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] public sealed class MySqlClientPermissionAttribute : DBDataPermissionAttribute { // Methods public MySqlClientPermissionAttribute(SecurityAction action) : base(action) { } public override IPermission CreatePermission() { return new MySqlClientPermission(this); } } }
Java
using System; using System.Linq; using System.Threading; using System.Web.Mvc; using Arashi.Core; using Arashi.Core.Domain; using Arashi.Services.Localization; namespace Arashi.Web.Mvc.Views { public abstract class AdminViewUserControlBase : WebViewPage //ViewUserControl { private ILocalizationService localizationService; /// <summary> /// Constructor /// </summary> protected AdminViewUserControlBase() { localizationService = IoC.Resolve<ILocalizationService>(); } /// <summary> /// Get the current RequestContext /// </summary> public IRequestContext RequestContext { get { if (ViewData.ContainsKey("Context") && ViewData["Context"] != null) return ViewData["Context"] as IRequestContext; else return null; } } #region Localization Support /// <summary> /// Get a localized global resource /// </summary> /// <param name="token"></param> /// <returns></returns> protected string GlobalResource(string token) { return localizationService.GlobalResource(token, Thread.CurrentThread.CurrentUICulture); } /// <summary> /// Get a localized global resource filled with format parameters /// </summary> /// <param name="token"></param> /// <param name="args"></param> /// <returns></returns> protected string GlobalResource(string token, params object[] args) { return string.Format(GlobalResource(token), args); } #endregion } public abstract class AdminViewUserControlBase<TModel> : WebViewPage<TModel> // ViewUserControl<TModel> where TModel : class { private ILocalizationService localizationService; /// <summary> /// Constructor /// </summary> protected AdminViewUserControlBase() { localizationService = IoC.Resolve<ILocalizationService>(); } /// <summary> /// Get the current RequestContext /// </summary> public IRequestContext RequestContext { get { if (ViewData.ContainsKey("Context") && ViewData["Context"] != null) return ViewData["Context"] as IRequestContext; else return null; } } #region Localization Support /// <summary> /// Get a localized global resource /// </summary> /// <param name="token"></param> /// <returns></returns> protected string GlobalResource(string token) { return localizationService.GlobalResource(token, Thread.CurrentThread.CurrentUICulture); } /// <summary> /// Get a localized global resource filled with format parameters /// </summary> /// <param name="token"></param> /// <param name="args"></param> /// <returns></returns> protected string GlobalResource(string token, params object[] args) { return string.Format(GlobalResource(token), args); } #endregion } }
Java
/** * Kopernicus Planetary System Modifier * ------------------------------------------------------------- * 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 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 * * This library is intended to be used as a plugin for Kerbal Space Program * which is copyright of TakeTwo Interactive. Your usage of Kerbal Space Program * itself is governed by the terms of its EULA, not the license above. * * https://kerbalspaceprogram.com */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Collections; using KSP; using KSP.IO; using UnityEngine; namespace Kopernicus.Configuration { public class ConfigReader { [Persistent] public bool EnforceShaders = false; [Persistent] public bool WarnShaders = false; [Persistent] public int EnforcedShaderLevel = 2; [Persistent] public int ScatterCullDistance = 5000; [Persistent] public string UseKopernicusAsteroidSystem = "True"; [Persistent] public int SolarRefreshRate = 1; public UrlDir.UrlConfig[] baseConfigs; public void loadMainSettings() { baseConfigs = GameDatabase.Instance.GetConfigs("Kopernicus_config"); if (baseConfigs.Length == 0) { Debug.LogWarning("No Kopernicus_Config file found, using defaults"); return; } if (baseConfigs.Length > 1) { Debug.LogWarning("Multiple Kopernicus_Config files detected, check your install"); } try { ConfigNode.LoadObjectFromConfig(this, baseConfigs[0].config); } catch { Debug.LogWarning("Error loading config, using defaults"); } } } }
Java
<?php /* * * ____ _ _ __ __ _ __ __ ____ * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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\entity; use pocketmine\nbt\tag\String; class Creeper extends Monster implements Explosive{ protected function initEntity(){ $this->namedtag->id = new String("id", "Creeper"); } }
Java
/********************************************************** DO NOT EDIT This file was generated from stone specification "users" www.prokarpaty.net ***********************************************************/ #include "dropbox/users/UsersFullAccount.h" using namespace dropboxQt; namespace dropboxQt{ namespace users{ ///FullAccount FullAccount::operator QJsonObject()const{ QJsonObject js; this->toJson(js); return js; } void FullAccount::toJson(QJsonObject& js)const{ Account::toJson(js); if(!m_country.isEmpty()) js["country"] = QString(m_country); if(!m_locale.isEmpty()) js["locale"] = QString(m_locale); if(!m_referral_link.isEmpty()) js["referral_link"] = QString(m_referral_link); js["team"] = (QJsonObject)m_team; if(!m_team_member_id.isEmpty()) js["team_member_id"] = QString(m_team_member_id); js["is_paired"] = m_is_paired; m_account_type.toJson(js, "account_type"); } void FullAccount::fromJson(const QJsonObject& js){ Account::fromJson(js); m_country = js["country"].toString(); m_locale = js["locale"].toString(); m_referral_link = js["referral_link"].toString(); m_team.fromJson(js["team"].toObject()); m_team_member_id = js["team_member_id"].toString(); m_is_paired = js["is_paired"].toVariant().toBool(); m_account_type.fromJson(js["account_type"].toObject()); } QString FullAccount::toString(bool multiline)const { QJsonObject js; toJson(js); QJsonDocument doc(js); QString s(doc.toJson(multiline ? QJsonDocument::Indented : QJsonDocument::Compact)); return s; } std::unique_ptr<FullAccount> FullAccount::factory::create(const QByteArray& data) { QJsonDocument doc = QJsonDocument::fromJson(data); QJsonObject js = doc.object(); return create(js); } std::unique_ptr<FullAccount> FullAccount::factory::create(const QJsonObject& js) { std::unique_ptr<FullAccount> rv; rv = std::unique_ptr<FullAccount>(new FullAccount); rv->fromJson(js); return rv; } }//users }//dropboxQt
Java
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md # /usr/local/Library/Contributions/example-formula.rb # PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! class RubyDmSqliteAdapter < Formula homepage "" head "git://git.kali.org/packages/ruby-dm-sqlite-adapter.git" version "dm" # depends_on "cmake" => :build depends_on :x11 # if your formula requires any X11/XQuartz components def install # ENV.deparallelize # if your formula fails when building in parallel # Remove unrecognized options if warned by configure system "./configure", "--disable-debug", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" # system "cmake", ".", *std_cmake_args system "make", "install" # if this fails, try separate make/make install steps end test do # `test do` will create, run in and delete a temporary directory. # # This test will fail and we won't accept that! It's enough to just replace # "false" with the main program this formula installs, but it'd be nice if you # were more thorough. Run the test with `brew test ruby-dm-sqlite-adapter`. Options passed # to `brew install` such as `--HEAD` also need to be provided to `brew test`. # # The installed folder is not in the path, so use the entire path to any # executables being tested: `system "#{bin}/program", "do", "something"`. system "false" end end
Java
#include "zjson.h" #define Start 0x1<<1 #define ObjectInitial 0x1<<2 #define MemberKey 0x1<<3 #define KeyValueDelimiter 0x1<<4 #define MemberValue 0x1<<5 #define MemberDelimiter 0x1<<6 #define ObjectFinish 0x1<<7 #define ArrayInitial 0x1<<8 #define Element 0x1<<9 #define ElementDelimiter 0x1<<10 #define ArrayFinish 0x1<<11 #define Finish 0x1<<12 /* * Log macro * What we can catch: * - JSON string * - current state * - current character * - current token start and end positions * - current line number and column number */ #define ERR(e) do{\ put_err_token(); \ printf("Unexpected char: '%c'\n" \ "\tstatus [%s] \n" \ "\tfunction %s:%d\n" \ "\ttoken position:(%d,%d)\n", \ *(e),StateStrings[_log2(state)-1],__FUNCTION__,__LINE__,line,column);\ exit(EXIT_FAILURE);\ }while(0) #define match(s, st) (s)&(st) #define SET_TOKEN_START(ptr) token_start = (ptr) #define SET_TOKEN_END(ptr) token_end = (ptr) #define PEEK(ptr) (*(ptr)) #define EAT(ptr) do{SET_TOKEN_START(ptr);(ptr)++;column++;}while(0); typedef int State; typedef struct stack { jval *head; struct stack *next; } stack; static inline int is_xdigit(jchar ch); static inline int is_digit(jchar ch); static inline int _log2(int n); static void put_err_token(void); static void put_context(void); static void stack_push(stack *st, jval *elem); static jval *stack_pop(stack *st); static jstr eat_key(const jchar **pp); static jval *eat_string(const jchar **); static jval *eat_num(const jchar **); static jval *eat_true(const jchar **); static jval *eat_false(const jchar **); static jval *eat_null(const jchar **); static const char *StateStrings[] = { "Start", "ObjectInitial", "MemberKey", "KeyValueDelimiter", "MemberValue", "MemberDelimiter", "ObjectFinish", "ArrayInitial", "Element", "ElementDelimiter", "ArrayFinish", "Finish" }; static const unsigned char firstByteMark[7] = {0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC}; static State state = Start; static int line = 1, column = 1; static const char *token_start = NULL, *token_end = NULL, *JSON = NULL; static inline int _log2(int n) { int e = 0; while (n >>= 1) e++; return e; } static void put_context(void) { const char *ptr = JSON; int count = 0; while (count < line) { ptr++; if (*ptr == '\n') count++; } } static void put_err_token(void) { printf("Error Token:\n\t"); const char *ptr = token_start, *ptr2 = token_start; while (ptr <= token_end) printf("%c", *ptr++); printf("\n\t"); while (ptr2++ < token_end) printf(" "); printf("^"); printf("\n\t"); } static void literal_value_handler(const jchar **pp, jval *currentNode, jstr currentKey, jval *(*handle)(const jchar **)) { if (match(state, ArrayInitial | ElementDelimiter)) { state = Element; zJSON_set_arr_value(currentNode, handle(pp)); } else if (match(state, KeyValueDelimiter)) { state = MemberValue; zJSON_set_key_value(currentNode, currentKey, handle(pp)); } else ERR(*pp); } static void obj_arr_handler(const jchar **pp, vtype type, jval **pcurrentNode, stack *nodeStack, jchar *currentKey) { jval *newObjOrArray = zJSON_new_jval(type); if (match(state, Start)) { EAT(*pp); } else if (match(state, KeyValueDelimiter)) { zJSON_set_key_value(*pcurrentNode, currentKey, newObjOrArray); stack_push(nodeStack, *pcurrentNode); EAT(*pp); } else if (match(state, ArrayInitial | ElementDelimiter)) { zJSON_set_arr_value(*pcurrentNode, newObjOrArray); stack_push(nodeStack, *pcurrentNode); EAT(*pp); } else { ERR(*pp); } state = (type == OBJ) ? ObjectInitial : ArrayInitial; *pcurrentNode = newObjOrArray; } static jval *eat_literal(const jchar **pp, const char *str) { SET_TOKEN_START(*pp); const char *s = str; jval *v = NULL; while (*s) { if (**pp == *s) { (*pp)++; s++; } else { ERR(*pp); } } if (*str == 't') { v = zJSON_new_true(); } if (*str == 'f') { v = zJSON_new_false(); } if (*str == 'n') { v = zJSON_new_null(); } SET_TOKEN_END(*pp); return v; } inline jval *eat_true(const jchar **pp) { return eat_literal(pp, "true"); } inline jval *eat_false(const jchar **pp) { return eat_literal(pp, "false"); } inline jval *eat_null(const jchar **pp) { return eat_literal(pp, "null"); } #define __PREV(pp) (*(*pp-1)) #define __NEXT(pp) (*(*pp+1)) static unsigned parse_hex4(const char *str) { unsigned hex = 0; for (int i = 0; i < 4; ++i) { unsigned hc = 0; int ex = 0x1000 >> (i * 4); if ('0' <= str[i] && str[i] <= '9') { hc = 00 + str[i] - '0'; } else if ('A' <= str[i] && str[i] <= 'Z') { hc = 10 + str[i] - 'A'; } else if ('a' <= str[i] && str[i] <= 'z') { hc = 10 + str[i] - 'a'; } else return -1; hex += hc * ex; } return hex; } jstr eat_key(const jchar **pp) { SET_TOKEN_START(*pp); (*pp)++;/* skip the first '"'*/ const jchar *start_pos = *pp,*end_pos; size_t len = 0,unicode_len; unsigned uc,uc2; while (*pp && !(**pp == '\"' && __PREV(pp) != '\\') && ++len){ if (*((*pp)++) == '\\') (*pp)++; } /* Skip every escaped character, calculate the lenghth, Each unicode char occupies 5 bytes */ jstr str = malloc(len + 1); /* free() at free_jpair() */ end_pos = *pp; *pp = start_pos; char * ptr = str; while (*pp <= end_pos && !(**pp == '\"' && __PREV(pp) != '\\')){ if (**pp != '\\') { *ptr++ = *((*pp)++); } else { switch (__NEXT(pp)) { case 'b': *ptr++ = '\b'; (*pp) += 2; break; case 'f': *ptr++ = '\f'; (*pp) += 2; break; case 'n': *ptr++ = '\n'; (*pp) += 2; break; case 'r': *ptr++ = '\r'; (*pp) += 2; break; case 't': *ptr++ = '\t'; (*pp) += 2; break; case '"': *ptr++ = '"'; (*pp) += 2; break; case '/': *ptr++ = '/'; (*pp) += 2; break; case '\\':*ptr++ = '\\'; (*pp) += 2; break; case 'u': uc = parse_hex4((*pp)+2); (*pp) += 6;/* Why ? */ if ((uc >= 0xDC00 && uc <= 0xDFFF) || uc == 0) { ERR((*pp)); } /* invalid unicode number */ if (uc >= 0xD800 && uc <= 0xDBFF) { uc2 = parse_hex4((*pp)+2); (*pp) += 6; if ((uc2 >= 0xDC00 && uc2 <= 0xDFFF) || uc2 == 0) { ERR((*pp)); } uc = 0x10000 + (((uc & 0x3FF) << 10) | (uc2 & 0x3FF)); } unicode_len = 4; if (uc < 0x80) unicode_len = 1; else if (uc < 0x800) unicode_len = 2; else if (uc < 0x10000) unicode_len = 3; ptr += unicode_len; switch (unicode_len) { case 4: *--ptr = ((uc | 0x80) & 0xBF); uc >>= 6; case 3: *--ptr = ((uc | 0x80) & 0xBF); uc >>= 6; case 2: *--ptr = ((uc | 0x80) & 0xBF); uc >>= 6; case 1: *--ptr = ( uc | firstByteMark[unicode_len]); } ptr += unicode_len; break; default: ERR(*pp); } } } str[len] = 0; (*pp)++;/*skip the last '"'*/ column += len; SET_TOKEN_END(*pp); return str; } jval *eat_string(const jchar **pp) { strv->vstr = eat_key(pp); return strv; } static inline int is_digit(jchar ch) { return ((ch >= '0') && (ch <= '9')) || (ch == '.'); } static inline int is_xdigit(jchar ch) { return ((ch >= '0') && (ch <= '9')) || ((ch >= 'A') && (ch <= 'F')) || ((ch >= 'a') && (ch <= 'f')); } jval *eat_num(const jchar **pp) { //TODO SET_TOKEN_START(*pp); jchar buffer[41] = {0}; jchar *ptr = buffer; int dbl_flag = 0; if (**pp == '-') *(ptr++) = *((*pp)++); if (**pp != '.') { while (is_digit(**pp)) { *(ptr++) = *((*pp)++); } } else { ERR(*pp); } ptr = buffer; while (*ptr) if(*ptr++ == '.')dbl_flag = 1; jval *intv = zJSON_new_jval(dbl_flag?DBL:NUM); intv->vdouble = atof(buffer); SET_TOKEN_END(*pp); return intv; } void stack_push(stack *st, jval *head) { stack *e = malloc(sizeof(stack)); /* free at stack_pop() */ assert(e); e->head = head; e->next = st->next; st->next = e; } jval *stack_pop(stack *st) { if (st->next == NULL) return NULL; jval *head = st->next->head; stack *e = st->next; st->next = e->next; free(e);//crash here invalid next size FIXME! return head; } jval *zJSON_parse(const jchar *json) { JSON = json; const jchar *p = json; token_start = json; token_end = token_start; jval *currentNode = NULL; jchar *currentKey = NULL; stack *nodeStack = malloc(sizeof(stack)); /* free() at this function's end */ nodeStack->head = NULL; nodeStack->next = NULL; while (1) { switch (PEEK(p)) { case '{': case '[': obj_arr_handler(&p,(*p == '{')?OBJ:ARR,&currentNode,nodeStack,currentKey); break; case '"': if (match(state, ObjectInitial | MemberDelimiter)) { state = MemberKey; zJSON_set_key(currentNode, currentKey = eat_key(&p)); } else literal_value_handler(&p, currentNode, currentKey, eat_string); break; case 't': literal_value_handler(&p, currentNode, currentKey, eat_true); break; case 'f': literal_value_handler(&p, currentNode, currentKey, eat_false); break; case 'n': literal_value_handler(&p, currentNode, currentKey, eat_null); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '-': literal_value_handler(&p, currentNode, currentKey, eat_num); break; case '}': case ']': if (match(state, ObjectInitial | MemberValue | ArrayInitial | Element)) { jval *t_currentNode; if ((t_currentNode = stack_pop(nodeStack))) { currentNode = t_currentNode; state = (currentNode->type == ARR) ? Element : MemberValue; EAT(p); } else { EAT(p); goto AUTOMATA_END; } } else ERR(p); break; case ',': if (match(state, MemberValue)) { state = MemberDelimiter; EAT(p); } else if (match(state, Element)) { state = ElementDelimiter; EAT(p); } else ERR(p); break; case ':': if (match(state, MemberKey)) { state = KeyValueDelimiter; EAT(p); } else ERR(p); break; case '\n': line++; column = 1; /*NO break here*/ case '\t': case ' ': EAT(p); break; case '\0': if (match(state, ArrayFinish | ObjectFinish)) state = Finish; else ERR(p); goto AUTOMATA_END; default: ERR(p); } } AUTOMATA_END: free(nodeStack); state = Start; return currentNode; }
Java
# Define helper methods to create test data # for mail view module MailViewTestData def admin_email @admin_email ||= FactoryGirl.build(:email, address: "admin@marketplace.com") end def admin @admin ||= FactoryGirl.build(:person, emails: [admin_email]) end def author @author ||= FactoryGirl.build(:person) end def starter @starter ||= FactoryGirl.build(:person) end def member return @member unless @member.nil? @member ||= FactoryGirl.build(:person) @member.emails.first.confirmation_token = "123456abcdef" @member end def community_memberships @community_memberships ||= [ FactoryGirl.build(:community_membership, person: admin, admin: true), FactoryGirl.build(:community_membership, person: author), FactoryGirl.build(:community_membership, person: starter), FactoryGirl.build(:community_membership, person: member) ] end def members @members ||= [admin, author, starter, member] end def payment_gateway @braintree_payment_gateway ||= FactoryGirl.build(:braintree_payment_gateway) end def checkout_payment_gateway @checkout_payment_gateway ||= FactoryGirl.build(:checkout_payment_gateway) end def payment return @payment unless @payment.nil? @payment ||= FactoryGirl.build(:braintree_payment, id: 55, payment_gateway: payment_gateway, payer: starter, recipient: author ) # Avoid infinite loop, set conversation here @payment.transaction = transaction @payment end def checkout_payment return @checkout_payment unless @checkout_payment.nil? @checkout_payment ||= FactoryGirl.build(:checkout_payment, id: 55, payment_gateway: checkout_payment_gateway, payer: starter, recipient: author ) # Avoid infinite loop, set conversation here @checkout_payment.conversation = conversation @checkout_payment end def listing @listing ||= FactoryGirl.build(:listing, author: author, id: 123 ) end def participations @participations ||= [ FactoryGirl.build(:participation, person: author), FactoryGirl.build(:participation, person: starter, is_starter: true) ] end def transaction @transaction ||= FactoryGirl.build(:transaction, id: 99, community: community, listing: listing, payment: payment, conversation: conversation, automatic_confirmation_after_days: 5 ) end def paypal_transaction @paypal_transaction ||= FactoryGirl.build(:transaction, id: 100, community: paypal_community, listing: listing, conversation: conversation, payment_gateway: :paypal, current_state: :paid, shipping_price_cents: 100 ) end def paypal_community @paypal_community ||= FactoryGirl.build(:community, custom_color1: "00FF99", id: 999 ) end def conversation @conversation ||= FactoryGirl.build(:conversation, id: 99, community: community, listing: listing, participations: participations, participants: [author, starter], messages: [message] ) end def message @message ||= FactoryGirl.build(:message, sender: starter, id: 123 ) end def community @community ||= FactoryGirl.build(:community, payment_gateway: payment_gateway, custom_color1: "FF0099", admins: [admin], members: members, community_memberships: community_memberships ) end def checkout_community @checkout_community ||= FactoryGirl.build(:community, payment_gateway: checkout_payment_gateway, custom_color1: "FF0099", admins: [admin], members: members, community_memberships: community_memberships ) end end
Java
package br.com.vepo.datatransform.model; import org.springframework.beans.factory.annotation.Autowired; public abstract class Repository<T> { @Autowired protected MongoConnection mongoConnection; public <V> T find(Class<T> clazz, V key) { return mongoConnection.getMorphiaDataStore().get(clazz, key); } public void persist(T obj) { mongoConnection.getMorphiaDataStore().save(obj); } }
Java
--Copyright (C) 2009 <SWGEmu> --This File is part of Core3. --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 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 St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version --which carries forward this exception. object_weapon_melee_2h_sword_base_shared_2h_sword_base = SharedWeaponObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hold_r.iff", attackType = 1, certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/weapon/client_melee_sword_basic.cdf", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 1, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "string_id_table", gameObjectType = 131080, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "@obj_n:unknown_weapon", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/default_weapon.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0, weaponEffect = "bolt", weaponEffectIndex = 0 } ObjectTemplates:addTemplate(object_weapon_melee_2h_sword_base_shared_2h_sword_base, 3231039364) object_weapon_melee_2h_sword_base_shared_crafted_lightsaber_base = SharedWeaponObjectTemplate:new { appearanceFilename = "", arrangementDescriptorFilename = "abstract/slot/arrangement/wearables/hold_both.iff", attackType = 1, certificationsRequired = {}, clearFloraRadius = 0, clientDataFile = "clientdata/weapon/client_melee_lightsaber_basic.cdf", collisionActionBlockFlags = 0, collisionActionFlags = 51, collisionActionPassFlags = 1, collisionMaterialBlockFlags = 0, collisionMaterialFlags = 1, collisionMaterialPassFlags = 0, containerType = 1, containerVolumeLimit = 0, customizationVariableMapping = {}, detailedDescription = "string_id_table", gameObjectType = 131080, locationReservationRadius = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "@obj_n:unknown_weapon", onlyVisibleInTools = 0, paletteColorCustomizationVariables = {}, portalLayoutFilename = "", rangedIntCustomizationVariables = {}, scale = 1, scaleThresholdBeforeExtentTest = 0.5, sendToClient = 1, slotDescriptorFilename = "abstract/slot/descriptor/default_lightsaber.iff", snapToTerrain = 1, socketDestinations = {}, structureFootprintFileName = "", surfaceType = 0, targetable = 1, useStructureFootprintOutline = 0, weaponEffect = "bolt", weaponEffectIndex = 0 } ObjectTemplates:addTemplate(object_weapon_melee_2h_sword_base_shared_crafted_lightsaber_base, 3974479430)
Java
// Copyright 2012, 2013 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package charmrepo_test import ( jc "github.com/juju/testing/checkers" gc "gopkg.in/check.v1" "gopkg.in/juju/charm.v6-unstable" "gopkg.in/juju/charmrepo.v0" "gopkg.in/juju/charmrepo.v0/csclient" charmtesting "gopkg.in/juju/charmrepo.v0/testing" ) var TestCharms = charmtesting.NewRepo("internal/test-charm-repo", "quantal") type inferRepoSuite struct{} var _ = gc.Suite(&inferRepoSuite{}) var inferRepositoryTests = []struct { url string localRepoPath string err string }{{ url: "cs:trusty/django", }, { url: "local:precise/wordpress", err: "path to local repository not specified", }, { url: "local:precise/haproxy-47", localRepoPath: "/tmp/repo-path", }} func (s *inferRepoSuite) TestInferRepository(c *gc.C) { for i, test := range inferRepositoryTests { c.Logf("test %d: %s", i, test.url) ref := charm.MustParseReference(test.url) repo, err := charmrepo.InferRepository( ref, charmrepo.NewCharmStoreParams{}, test.localRepoPath) if test.err != "" { c.Assert(err, gc.ErrorMatches, test.err) c.Assert(repo, gc.IsNil) continue } c.Assert(err, jc.ErrorIsNil) switch store := repo.(type) { case *charmrepo.LocalRepository: c.Assert(store.Path, gc.Equals, test.localRepoPath) case *charmrepo.CharmStore: c.Assert(store.URL(), gc.Equals, csclient.ServerURL) default: c.Fatal("unknown repository type") } } }
Java
<?php namespace Clearbooks\Labs\Toggle\Entity; class Parasol extends ToggleStub { protected $name = "Parasol"; protected $desc = "An MASsIVE Umbrella"; protected $id = 2; protected $toggleTitle = "Parasols 4 Dayz"; }
Java
package org.com.json; /* Copyright (c) 2002 JSON.org 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 shall be used for Good, not Evil. 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 java.util.Iterator; /** * This provides static methods to convert an XML text into a JSONObject, * and to covert a JSONObject into an XML text. * @author JSON.org * @version 2008-10-14 */ public class XML { /** The Character '&'. */ public static final Character AMP = new Character('&'); /** The Character '''. */ public static final Character APOS = new Character('\''); /** The Character '!'. */ public static final Character BANG = new Character('!'); /** The Character '='. */ public static final Character EQ = new Character('='); /** The Character '>'. */ public static final Character GT = new Character('>'); /** The Character '<'. */ public static final Character LT = new Character('<'); /** The Character '?'. */ public static final Character QUEST = new Character('?'); /** The Character '"'. */ public static final Character QUOT = new Character('"'); /** The Character '/'. */ public static final Character SLASH = new Character('/'); /** * Replace special characters with XML escapes: * <pre> * &amp; <small>(ampersand)</small> is replaced by &amp;amp; * &lt; <small>(less than)</small> is replaced by &amp;lt; * &gt; <small>(greater than)</small> is replaced by &amp;gt; * &quot; <small>(double quote)</small> is replaced by &amp;quot; * </pre> * @param string The string to be escaped. * @return The escaped string. */ public static String escape(String string) { StringBuffer sb = new StringBuffer(); for (int i = 0, len = string.length(); i < len; i++) { char c = string.charAt(i); switch (c) { case '&': sb.append("&amp;"); break; case '<': sb.append("&lt;"); break; case '>': sb.append("&gt;"); break; case '"': sb.append("&quot;"); break; default: sb.append(c); } } return sb.toString(); } /** * Throw an exception if the string contains whitespace. * Whitespace is not allowed in tagNames and attributes. * @param string * @throws JSONException */ public static void noSpace(String string) throws JSONException { int i, length = string.length(); if (length == 0) { throw new JSONException("Empty string."); } for (i = 0; i < length; i += 1) { if (Character.isWhitespace(string.charAt(i))) { throw new JSONException("'" + string + "' contains a space character."); } } } /** * Scan the content following the named tag, attaching it to the context. * @param x The XMLTokener containing the source string. * @param context The JSONObject that will include the new material. * @param name The tag name. * @return true if the close tag is processed. * @throws JSONException */ private static boolean parse(XMLTokener x, JSONObject context, String name) throws JSONException { char c; int i; String n; JSONObject o = null; String s; Object t; // Test for and skip past these forms: // <!-- ... --> // <! ... > // <![ ... ]]> // <? ... ?> // Report errors for these forms: // <> // <= // << t = x.nextToken(); // <! if (t == BANG) { c = x.next(); if (c == '-') { if (x.next() == '-') { x.skipPast("-->"); return false; } x.back(); } else if (c == '[') { t = x.nextToken(); if (t.equals("CDATA")) { if (x.next() == '[') { s = x.nextCDATA(); if (s.length() > 0) { context.accumulate("content", s); } return false; } } throw x.syntaxError("Expected 'CDATA['"); } i = 1; do { t = x.nextMeta(); if (t == null) { throw x.syntaxError("Missing '>' after '<!'."); } else if (t == LT) { i += 1; } else if (t == GT) { i -= 1; } } while (i > 0); return false; } else if (t == QUEST) { // <? x.skipPast("?>"); return false; } else if (t == SLASH) { // Close tag </ t = x.nextToken(); if (name == null) { throw x.syntaxError("Mismatched close tag" + t); } if (!t.equals(name)) { throw x.syntaxError("Mismatched " + name + " and " + t); } if (x.nextToken() != GT) { throw x.syntaxError("Misshaped close tag"); } return true; } else if (t instanceof Character) { throw x.syntaxError("Misshaped tag"); // Open tag < } else { n = (String)t; t = null; o = new JSONObject(); for (;;) { if (t == null) { t = x.nextToken(); } // attribute = value if (t instanceof String) { s = (String)t; t = x.nextToken(); if (t == EQ) { t = x.nextToken(); if (!(t instanceof String)) { throw x.syntaxError("Missing value"); } o.accumulate(s, JSONObject.stringToValue((String)t)); t = null; } else { o.accumulate(s, ""); } // Empty tag <.../> } else if (t == SLASH) { if (x.nextToken() != GT) { throw x.syntaxError("Misshaped tag"); } context.accumulate(n, o); return false; // Content, between <...> and </...> } else if (t == GT) { for (;;) { t = x.nextContent(); if (t == null) { if (n != null) { throw x.syntaxError("Unclosed tag " + n); } return false; } else if (t instanceof String) { s = (String)t; if (s.length() > 0) { o.accumulate("content", JSONObject.stringToValue(s)); } // Nested element } else if (t == LT) { if (parse(x, o, n)) { if (o.length() == 0) { context.accumulate(n, ""); } else if (o.length() == 1 && o.opt("content") != null) { context.accumulate(n, o.opt("content")); } else { context.accumulate(n, o); } return false; } } } } else { throw x.syntaxError("Misshaped tag"); } } } } /** * Convert a well-formed (but not necessarily valid) XML string into a * JSONObject. Some information may be lost in this transformation * because JSON is a data format and XML is a document format. XML uses * elements, attributes, and content text, while JSON uses unordered * collections of name/value pairs and arrays of values. JSON does not * does not like to distinguish between elements and attributes. * Sequences of similar elements are represented as JSONArrays. Content * text may be placed in a "content" member. Comments, prologs, DTDs, and * <code>&lt;[ [ ]]></code> are ignored. * @param string The source string. * @return A JSONObject containing the structured data from the XML string. * @throws JSONException */ public static JSONObject toJSONObject(String string) throws JSONException { JSONObject o = new JSONObject(); XMLTokener x = new XMLTokener(string); while (x.more() && x.skipPast("<")) { parse(x, o, null); } return o; } /** * Convert a JSONObject into a well-formed, element-normal XML string. * @param o A JSONObject. * @return A string. * @throws JSONException */ public static String toString(Object o) throws JSONException { return toString(o, null); } /** * Convert a JSONObject into a well-formed, element-normal XML string. * @param o A JSONObject. * @param tagName The optional name of the enclosing tag. * @return A string. * @throws JSONException */ public static String toString(Object o, String tagName) throws JSONException { StringBuffer b = new StringBuffer(); int i; JSONArray ja; JSONObject jo; String k; Iterator keys; int len; String s; Object v; if (o instanceof JSONObject) { // Emit <tagName> if (tagName != null) { b.append('<'); b.append(tagName); b.append('>'); } // Loop thru the keys. jo = (JSONObject)o; keys = jo.keys(); while (keys.hasNext()) { k = keys.next().toString(); v = jo.opt(k); if (v == null) { v = ""; } if (v instanceof String) { s = (String)v; } else { s = null; } // Emit content in body if (k.equals("content")) { if (v instanceof JSONArray) { ja = (JSONArray)v; len = ja.length(); for (i = 0; i < len; i += 1) { if (i > 0) { b.append('\n'); } b.append(escape(ja.get(i).toString())); } } else { b.append(escape(v.toString())); } // Emit an array of similar keys } else if (v instanceof JSONArray) { ja = (JSONArray)v; len = ja.length(); for (i = 0; i < len; i += 1) { v = ja.get(i); if (v instanceof JSONArray) { b.append('<'); b.append(k); b.append('>'); b.append(toString(v)); b.append("</"); b.append(k); b.append('>'); } else { b.append(toString(v, k)); } } } else if (v.equals("")) { b.append('<'); b.append(k); b.append("/>"); // Emit a new tag <k> } else { b.append(toString(v, k)); } } if (tagName != null) { // Emit the </tagname> close tag b.append("</"); b.append(tagName); b.append('>'); } return b.toString(); // XML does not have good support for arrays. If an array appears in a place // where XML is lacking, synthesize an <array> element. } else if (o instanceof JSONArray) { ja = (JSONArray)o; len = ja.length(); for (i = 0; i < len; ++i) { v = ja.opt(i); b.append(toString(v, (tagName == null) ? "array" : tagName)); } return b.toString(); } else { s = (o == null) ? "null" : escape(o.toString()); return (tagName == null) ? "\"" + s + "\"" : (s.length() == 0) ? "<" + tagName + "/>" : "<" + tagName + ">" + s + "</" + tagName + ">"; } } }
Java
ALTER TABLE [dbo].[StockTechnicalIndicators] WITH CHECK ADD CONSTRAINT [FK_StockTechnicalIndicators_Stock] FOREIGN KEY([StockNo]) REFERENCES [dbo].[Stock] ([StockNo]) GO ALTER TABLE [dbo].[StockTechnicalIndicators] CHECK CONSTRAINT [FK_StockTechnicalIndicators_Stock] GO
Java
package com.silicolife.textmining.processes.ie.ner.nerlexicalresources; import java.util.ArrayList; import java.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import com.fasterxml.jackson.annotation.JsonIgnore; import com.silicolife.textmining.core.datastructures.documents.AnnotatedDocumentImpl; import com.silicolife.textmining.core.datastructures.exceptions.process.InvalidConfigurationException; import com.silicolife.textmining.core.datastructures.init.InitConfiguration; import com.silicolife.textmining.core.datastructures.process.ProcessOriginImpl; import com.silicolife.textmining.core.datastructures.report.processes.NERProcessReportImpl; import com.silicolife.textmining.core.datastructures.utils.GenerateRandomId; import com.silicolife.textmining.core.datastructures.utils.Utils; import com.silicolife.textmining.core.datastructures.utils.conf.GlobalOptions; import com.silicolife.textmining.core.datastructures.utils.conf.OtherConfigurations; import com.silicolife.textmining.core.datastructures.utils.multithearding.IParallelJob; import com.silicolife.textmining.core.interfaces.core.dataaccess.exception.ANoteException; import com.silicolife.textmining.core.interfaces.core.document.IAnnotatedDocument; import com.silicolife.textmining.core.interfaces.core.document.IPublication; import com.silicolife.textmining.core.interfaces.core.document.corpus.ICorpus; import com.silicolife.textmining.core.interfaces.core.report.processes.INERProcessReport; import com.silicolife.textmining.core.interfaces.process.IProcessOrigin; import com.silicolife.textmining.core.interfaces.process.IE.IIEProcess; import com.silicolife.textmining.core.interfaces.process.IE.INERProcess; import com.silicolife.textmining.core.interfaces.process.IE.ner.INERConfiguration; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.configuration.INERLexicalResourcesConfiguration; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.configuration.INERLexicalResourcesPreProcessingModel; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.configuration.NERLexicalResourcesPreProssecingEnum; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.multithreading.NERParallelStep; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.preprocessingmodel.NERPreprocessingFactory; public class NERLexicalResources implements INERProcess{ public static String nerlexicalresourcesTagger = "NER Lexical Resources Tagger"; public static final IProcessOrigin nerlexicalresourcesOrigin= new ProcessOriginImpl(GenerateRandomId.generateID(),nerlexicalresourcesTagger); private boolean stop = false; private ExecutorService executor; public NERLexicalResources() { } public INERProcessReport executeCorpusNER(INERConfiguration configuration) throws ANoteException, InvalidConfigurationException { validateConfiguration(configuration); INERLexicalResourcesConfiguration lexicalResurcesConfiguration = (INERLexicalResourcesConfiguration) configuration; NERLexicalResourcesPreProssecingEnum preprocessing = lexicalResurcesConfiguration.getPreProcessingOption(); INERLexicalResourcesPreProcessingModel model = NERPreprocessingFactory.build(lexicalResurcesConfiguration,preprocessing); IIEProcess processToRun = getIEProcess(lexicalResurcesConfiguration,model); // creates the thread executor that in each thread executes the ner for a document executor = Executors.newFixedThreadPool(OtherConfigurations.getThreadsNumber()); InitConfiguration.getDataAccess().createIEProcess(processToRun); InitConfiguration.getDataAccess().registerCorpusProcess(configuration.getCorpus(), processToRun); NERProcessReportImpl report = new NERProcessReportImpl(nerlexicalresourcesTagger,processToRun); stop = false; if(!stop) { processingParallelNER(report,lexicalResurcesConfiguration,processToRun,model); } else { report.setFinishing(false); } return report; } private IIEProcess getIEProcess(INERLexicalResourcesConfiguration lexicalResurcesConfiguration,INERLexicalResourcesPreProcessingModel model) { String description = NERLexicalResources.nerlexicalresourcesTagger + " " +Utils.SimpleDataFormat.format(new Date()); Properties properties = model.getProperties(lexicalResurcesConfiguration); IIEProcess processToRun = lexicalResurcesConfiguration.getIEProcess(); processToRun.setName(description); processToRun.setProperties(properties); if(processToRun.getCorpus() == null) processToRun.setCorpus(lexicalResurcesConfiguration.getCorpus()); return processToRun; } private void processingParallelNER(NERProcessReportImpl report,INERLexicalResourcesConfiguration configuration,IIEProcess process,INERLexicalResourcesPreProcessingModel model) throws ANoteException { int size = process.getCorpus().getCorpusStatistics().getDocumentNumber(); long startTime = Calendar.getInstance().getTimeInMillis(); long actualTime,differTime; int i=0; Collection<IPublication> docs = process.getCorpus().getArticlesCorpus().getAllDocuments().values(); List<IParallelJob<Integer>> jobs = new ArrayList<>(); for(IPublication pub:docs) { if(!stop) { List<Long> classIdCaseSensative = new ArrayList<Long>(); IAnnotatedDocument annotDoc = new AnnotatedDocumentImpl(pub,process, process.getCorpus()); String text = annotDoc.getDocumentAnnotationText(); if(text==null) { // Logger logger = Logger.getLogger(Workbench.class.getName()); // logger.warn("The article whit id: "+pub.getId()+"not contains abstract "); System.err.println("The article whit id: "+pub.getId()+"not contains abstract "); } else { jobs.add(executeNER(process.getCorpus(), executor,classIdCaseSensative, annotDoc, text,configuration,model,process)); } report.incrementDocument(); } else { report.setFinishing(false); break; } } startTime = Calendar.getInstance().getTimeInMillis(); executor.shutdown(); // loop to give the progress bar of jobs while(!jobs.isEmpty() && !stop){ actualTime = Calendar.getInstance().getTimeInMillis(); differTime = actualTime - startTime; Iterator<IParallelJob<Integer>> itjobs = jobs.iterator(); while(itjobs.hasNext() && !stop){ IParallelJob<Integer> job = itjobs.next(); if(job.isFinished()){ report.incrementEntitiesAnnotated(job.getResultJob()); itjobs.remove(); } } if(differTime > 10000 * i) { int step = size-jobs.size(); memoryAndProgressAndTime(step, size, startTime); i++; } } //in case of stop, that will kill the running jobs if(stop){ for(IParallelJob<Integer> job : jobs) job.kill(); } try { executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS); } catch (InterruptedException e) { throw new ANoteException(e); } actualTime = Calendar.getInstance().getTimeInMillis(); report.setTime(actualTime-startTime); } @JsonIgnore protected void memoryAndProgress(int step, int total) { System.out.println((GlobalOptions.decimalformat.format((double) step / (double) total * 100)) + " %..."); // System.gc(); // System.out.println((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024) + " MB "); } @JsonIgnore protected void memoryAndProgressAndTime(int step, int total, long startTime) { System.out.println((GlobalOptions.decimalformat.format((double) step / (double) total * 100)) + " %..."); // System.gc(); // System.out.println((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024) + " MB "); } private IParallelJob<Integer> executeNER(ICorpus corpus,ExecutorService executor,List<Long> classIdCaseSensative,IAnnotatedDocument annotDoc,String text,INERLexicalResourcesConfiguration confguration,INERLexicalResourcesPreProcessingModel nerpreprocessingmodel,IIEProcess process) { IParallelJob<Integer> job = new NERParallelStep(nerpreprocessingmodel,annotDoc, process, corpus, text, classIdCaseSensative,confguration.getCaseSensitive(),confguration.isNormalized()); executor.submit(job); return job; } public void stop() { stop = true; //removes the jobs from executor and attempts to interrput the threads executor.shutdownNow(); } @Override public void validateConfiguration(INERConfiguration configuration)throws InvalidConfigurationException { if(configuration instanceof INERLexicalResourcesConfiguration) { INERLexicalResourcesConfiguration lexicalResurcesConfiguration = (INERLexicalResourcesConfiguration) configuration; if(lexicalResurcesConfiguration.getCorpus()==null) { throw new InvalidConfigurationException("Corpus can not be null"); } } else throw new InvalidConfigurationException("configuration must be INERLexicalResourcesConfiguration isntance"); } }
Java
/*! * angular-datatables - v0.4.1 * https://github.com/l-lin/angular-datatables * License: MIT */ !function(a,b,c,d){"use strict";function e(a,b){function c(a){function c(a,c){function e(a){var c="T";return h.dom=h.dom?h.dom:b.dom,-1===h.dom.indexOf(c)&&(h.dom=c+h.dom),h.hasTableTools=!0,d.isString(a)&&h.withTableToolsOption("sSwfPath",a),h}function f(a,b){return d.isString(a)&&(h.oTableTools=h.oTableTools&&null!==h.oTableTools?h.oTableTools:{},h.oTableTools[a]=b),h}function g(a){return d.isArray(a)&&h.withTableToolsOption("aButtons",a),h}var h=a(c);return h.withTableTools=e,h.withTableToolsOption=f,h.withTableToolsButtons=g,h}var e=a.newOptions,f=a.fromSource,g=a.fromFnPromise;return a.newOptions=function(){return c(e)},a.fromSource=function(a){return c(f,a)},a.fromFnPromise=function(a){return c(g,a)},a}a.decorator("DTOptionsBuilder",c),c.$inject=["$delegate"]}d.module("datatables.tabletools",["datatables"]).config(e),e.$inject=["$provide","DT_DEFAULT_OPTIONS"]}(window,document,jQuery,angular);
Java
# Copyright (c) 2013 - The pycangjie authors # # This file is part of pycangjie, the Python bindings to libcangjie. # # pycangjie 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. # # pycangjie 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 pycangjie. If not, see <http://www.gnu.org/licenses/>. import itertools import operator import string import subprocess import unittest import cangjie class MetaTest(type): """Metaclass for our test cases The goal is to provide every TestCase class with methods like test_a(), test_b(), etc..., in other words, one method per potential Cangjie input code. Well, not quite, because that would be 12356630 methods (the number of strings composed of 1 to 5 lowercase ascii letters), and even though my laptop has 8Go of RAM, the test process gets killed by the OOM killer. :) So we cheat, and use libcangjie's wildcard support, so that we only generate 26 + 26^2 = 702 methods. """ def __init__(cls, name, bases, dct): super(MetaTest, cls).__init__(name, bases, dct) def gen_codes(): """Generate the 702 possible input codes""" # First, the 1-character codes for c in string.ascii_lowercase: yield c # Next, the 2-characters-with-wildcard codes for t in itertools.product(string.ascii_lowercase, repeat=2): yield '*'.join(t) def tester(code): def func(cls): return cls.run_test(code) return func # Generate the test_* methods for code in gen_codes(): setattr(cls, "test_%s" % code.replace("*", ""), tester(code)) class BaseTestCase(unittest.TestCase): """Base test class, grouping the common stuff for all our unit tests""" def __init__(self, name): super().__init__(name) self.cli_cmd = ["/usr/bin/libcangjie_cli"] + self.cli_options self.language = (cangjie.filters.BIG5 | cangjie.filters.HKSCS | cangjie.filters.PUNCTUATION | cangjie.filters.CHINESE | cangjie.filters.ZHUYIN | cangjie.filters.KANJI | cangjie.filters.KATAKANA | cangjie.filters.HIRAGANA | cangjie.filters.SYMBOLS) def setUp(self): self.cj = cangjie.Cangjie(self.version, self.language) def tearDown(self): del self.cj def run_command(self, cmd): """Run a command, deal with errors, and return its stdout""" proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = proc.communicate() try: cangjie.errors.handle_error_code(proc.returncode, msg="Unknown error while running" " libcangjie_cli (%d)" % proc.returncode) except cangjie.errors.CangjieNoCharsError: return "" try: return out.decode("utf-8") except UnicodeDecodeError: # Python's 'utf-8' codec trips over b"\xed\xa1\x9d\xed\xbc\xb2", # but according to [1] and [2], it is a valid sequence of 2 chars: # U+D85D \xed\xa1\x9d # U+DF32 \xed\xbc\xb2 # [1] http://www.utf8-chartable.de/unicode-utf8-table.pl?start=55389&utf8=string-literal # [2] http://www.utf8-chartable.de/unicode-utf8-table.pl?start=57138&utf8=string-literal # TODO: Investigate this further, and eventually open a bug report out2 = [] for line in out.split("\n".encode("utf-8")): try: out2.append(line.decode("utf-8")) except UnicodeDecodeError: pass return "\n".join(out2) def run_test(self, input_code): """Run the actual test This compares the output of the libcangjie_cli tool with the output from pycangjie. The idea is that if pycangjie produces the same results as a C++ tool compiled against libcangjie, then pycangjie properly wraps libcangjie. We do not try to verify that pycangjie produces valid results here, validity is to be checked in libcangjie. Note that this whole test is based on scraping the output of libcangjie_cli, which is quite fragile. """ # Get a list of CangjieChar from libcangjie_cli as a reference tmp_expected = self.run_command(self.cli_cmd+[input_code]).split("\n") tmp_expected = map(lambda x: x.strip(" \n"), tmp_expected) tmp_expected = filter(lambda x: len(x) > 0, tmp_expected) expected = [] for item in tmp_expected: chchar, simpchar, code, frequency = item.split(", ") chchar = chchar.split(": ")[-1].strip("'") simpchar = simpchar.split(": ")[-1].strip("'") code = code.split(": ")[-1].strip("'") frequency = int(frequency.split(" ")[-1]) expected.append(cangjie._core.CangjieChar(chchar.encode("utf-8"), simpchar.encode("utf-8"), code.encode("utf-8"), frequency)) expected = sorted(expected, key=operator.attrgetter('chchar', 'code')) try: # And compare with what pycangjie produces results = sorted(self.cj.get_characters(input_code), key=operator.attrgetter('chchar', 'code')) self.assertEqual(results, expected) except cangjie.errors.CangjieNoCharsError: self.assertEqual(len(expected), 0)
Java
/*#include "StdAfx.h"*/ #include "Sqlite3Ex.h" #include <string.h> Sqlite3Ex::Sqlite3Ex(void) :m_pSqlite(NULL) { memset(m_szErrMsg, 0x00, ERRMSG_LENGTH); } Sqlite3Ex::~Sqlite3Ex(void) { } bool Sqlite3Ex::Open(const wchar_t* szDbPath) { int nRet = sqlite3_open16(szDbPath, &m_pSqlite); if (SQLITE_OK != nRet) { SetErrMsg(sqlite3_errmsg(m_pSqlite)); return false; } return true; } bool Sqlite3Ex::Close() { bool bRet = false; if (SQLITE_OK == sqlite3_close(m_pSqlite)) { bRet = true; m_pSqlite = NULL; } return bRet; } bool Sqlite3Ex::CreateTable(const char* szTableName, int nColNum, Sqlite3ExColumnAttrib emColAttrib, ...) { if (NULL == szTableName || 0 == strlen(szTableName) || 0 >= nColNum) { SetErrMsg("Parameter is invalid."); return false; } std::string strSql("CREATE TABLE "); strSql += szTableName; strSql += "("; va_list ap; va_start(ap, nColNum); char szTmp[SQLITE3EX_COLSTRFORPARAM_LEN]; for (int i = 0; i != nColNum; ++i) { ::memset(szTmp, 0x00, SQLITE3EX_COLSTRFORPARAM_LEN); Sqlite3ExColumnAttrib & ta = va_arg(ap, Sqlite3ExColumnAttrib); ta.GetStringForSQL(szTmp); strSql += szTmp; strSql += ","; } va_end(ap); *(strSql.end() - 1) = ')'; return Sqlite3Ex_ExecuteNonQuery(strSql.c_str()); } bool Sqlite3Ex::BegTransAction() { return Sqlite3Ex_ExecuteNonQuery("BEGIN TRANSACTION"); } bool Sqlite3Ex::EndTransAction() { return Sqlite3Ex_ExecuteNonQuery("END TRANSACTION"); } bool Sqlite3Ex::Sqlite3Ex_Exec(const char* szQuery, LPEXEC_CALLBACK callback, void* pFirstParam) { char* szErrMsg = NULL; int nRet = sqlite3_exec(m_pSqlite, szQuery, callback, pFirstParam, &szErrMsg); if (SQLITE_OK != nRet) { SetErrMsg(szErrMsg); sqlite3_free(szErrMsg); return false; } return true; } bool Sqlite3Ex::GetTableNames(std::vector<std::string> & vecTableNames) { char* szErrMsg = NULL; char** pRetData = NULL; int nRow, nCol; int nRet = sqlite3_get_table(m_pSqlite, "SELECT name FROM sqlite_master WHERE type='table'", &pRetData, &nRow, &nCol, &szErrMsg); if (SQLITE_OK != nRet) { SetErrMsg(szErrMsg); sqlite3_free(szErrMsg); return false; } vecTableNames.resize(nRow); for (int i = 1; i <= nRow; ++i) //i´Ó1¿ªÊ¼,ÒÔΪË÷Òý0´¦µÄ¹Ì¶¨ÖµÊÇ"name" vecTableNames[i - 1] = pRetData[i]; sqlite3_free_table(pRetData); return true; } ////////////////////////////////////////////////////////////////////////// int Sqlite3Ex::ExecuteReader_CallBack(void* pFirstParam, int iColNum, char** pRecordArr, char** pColNameArr) { if (iColNum <= 0) return 0; Sqlite3Ex_Reader* pReader = (Sqlite3Ex_Reader*)pFirstParam; if (NULL == pReader) return 0; std::vector<std::string>* pVecLine = new std::vector<std::string>; pVecLine->resize(iColNum); for (int i = 0; i != iColNum; ++i) (*pVecLine)[i] = pRecordArr[i]; pReader->m_vecResult.push_back(pVecLine); return 0; } bool Sqlite3Ex::Sqlite3Ex_ExecuteReader(const char* szQuery, Sqlite3Ex_Reader* pReader) { char* szErrMsg = NULL; if (SQLITE_OK == sqlite3_exec(m_pSqlite, szQuery, ExecuteReader_CallBack, (void*)pReader, &szErrMsg)) return true; SetErrMsg(szErrMsg); sqlite3_free(szErrMsg); return false; } bool Sqlite3Ex::Sqlite3Ex_ExecuteNonQuery(const char* szQuery) { char* szErrMsg = NULL; if (SQLITE_OK == sqlite3_exec(m_pSqlite, szQuery, NULL, NULL, &szErrMsg)) return true; SetErrMsg(szErrMsg); sqlite3_free(szErrMsg); return false; } bool Sqlite3Ex::IsOpen() { if (!m_pSqlite) return false; return true; } //////////////////////////////////////////////////////////////////////////
Java
<?php /** * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0 * @copyright Aimeos (aimeos.org), 2018-2022 */ namespace Aimeos\Admin\JQAdm\Type\Media\Property; class StandardTest extends \PHPUnit\Framework\TestCase { private $context; private $object; private $view; protected function setUp() : void { $this->view = \TestHelper::view(); $this->context = \TestHelper::context(); $this->object = new \Aimeos\Admin\JQAdm\Type\Media\Property\Standard( $this->context ); $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page( $this->object, $this->context ); $this->object->setAimeos( \TestHelper::getAimeos() ); $this->object->setView( $this->view ); } protected function tearDown() : void { unset( $this->object, $this->view, $this->context ); } public function testCreate() { $result = $this->object->create(); $this->assertStringContainsString( 'media/property', $result ); $this->assertEmpty( $this->view->get( 'errors' ) ); } public function testCreateException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'getSubClients' ) ) ->getMock(); $object->expects( $this->once() )->method( 'getSubClients' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->create(); } public function testCopy() { $manager = \Aimeos\MShop::create( $this->context, 'media/property/type' ); $param = ['type' => 'unittest', 'id' => $manager->find( 'size', [], 'media' )->getId()]; $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); $this->view->addHelper( 'param', $helper ); $result = $this->object->copy(); $this->assertStringContainsString( 'size', $result ); } public function testCopyException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'getSubClients' ) ) ->getMock(); $object->expects( $this->once() )->method( 'getSubClients' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->copy(); } public function testDelete() { $this->assertNull( $this->getClientMock( ['redirect'], false )->delete() ); } public function testDeleteException() { $object = $this->getClientMock( ['getSubClients', 'search'] ); $object->expects( $this->once() )->method( 'getSubClients' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->expects( $this->once() )->method( 'search' ); $object->delete(); } public function testGet() { $manager = \Aimeos\MShop::create( $this->context, 'media/property/type' ); $param = ['type' => 'unittest', 'id' => $manager->find( 'size', [], 'media' )->getId()]; $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); $this->view->addHelper( 'param', $helper ); $result = $this->object->get(); $this->assertStringContainsString( 'size', $result ); } public function testGetException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'getSubClients' ) ) ->getMock(); $object->expects( $this->once() )->method( 'getSubClients' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->get(); } public function testSave() { $manager = \Aimeos\MShop::create( $this->context, 'media/property/type' ); $param = array( 'type' => 'unittest', 'item' => array( 'media.property.type.id' => '', 'media.property.type.status' => '1', 'media.property.type.domain' => 'product', 'media.property.type.code' => 'jqadm@test', 'media.property.type.label' => 'jqadm test', ), ); $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); $this->view->addHelper( 'param', $helper ); $result = $this->object->save(); $manager->delete( $manager->find( 'jqadm@test', [], 'product' )->getId() ); $this->assertEmpty( $this->view->get( 'errors' ) ); $this->assertNull( $result ); } public function testSaveException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'fromArray' ) ) ->getMock(); $object->expects( $this->once() )->method( 'fromArray' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->save(); } public function testSearch() { $param = array( 'type' => 'unittest', 'locale' => 'de', 'filter' => array( 'key' => array( 0 => 'media.property.type.code' ), 'op' => array( 0 => '==' ), 'val' => array( 0 => 'size' ), ), 'sort' => array( '-media.property.type.id' ), ); $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); $this->view->addHelper( 'param', $helper ); $result = $this->object->search(); $this->assertStringContainsString( '>size<', $result ); } public function testSearchException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'initCriteria' ) ) ->getMock(); $object->expects( $this->once() )->method( 'initCriteria' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->search(); } public function testGetSubClientInvalid() { $this->expectException( \Aimeos\Admin\JQAdm\Exception::class ); $this->object->getSubClient( '$unknown$' ); } public function testGetSubClientUnknown() { $this->expectException( \Aimeos\Admin\JQAdm\Exception::class ); $this->object->getSubClient( 'unknown' ); } public function getClientMock( $methods, $real = true ) { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( (array) $methods ) ->getMock(); $object->setAimeos( \TestHelper::getAimeos() ); $object->setView( $this->getViewNoRender( $real ) ); return $object; } protected function getViewNoRender( $real = true ) { $view = $this->getMockBuilder( \Aimeos\MW\View\Standard::class ) ->setConstructorArgs( array( [] ) ) ->setMethods( array( 'render' ) ) ->getMock(); $manager = \Aimeos\MShop::create( $this->context, 'media/property/type' ); $param = ['site' => 'unittest', 'id' => $real ? $manager->find( 'size', [], 'media' )->getId() : -1]; $helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param ); $view->addHelper( 'param', $helper ); $helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $this->context->config() ); $view->addHelper( 'config', $helper ); $helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, [] ); $view->addHelper( 'access', $helper ); return $view; } }
Java
############################################################################# # Makefile for building: animatedtiles.app/Contents/MacOS/animatedtiles # Generated by qmake (2.01a) (Qt 4.7.4) on: ? 4? 16 23:07:08 2015 # Project: animatedtiles.pro # Template: app # Command: /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/bin/qmake -spec ../../../mkspecs/macx-g++ -o Makefile animatedtiles.pro ############################################################################# ####### Compiler, tools and options CC = gcc CXX = g++ DEFINES = -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -DQT_SHARED CFLAGS = -pipe -Xarch_x86_64 -mmacosx-version-min=10.5 -g -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W $(DEFINES) CXXFLAGS = -pipe -Xarch_x86_64 -mmacosx-version-min=10.5 -g -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W $(DEFINES) INCPATH = -I../../../mkspecs/macx-g++ -I. -I../../../include/QtCore -I../../../include/QtGui -I../../../include -I.moc/debug-shared -F/Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/lib LINK = g++ LFLAGS = -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Xarch_x86_64 -mmacosx-version-min=10.5 LIBS = $(SUBLIBS) -F/Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/lib -L/Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/lib -framework QtGui -L/Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/lib -F/Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/lib -framework QtCore AR = ar cq RANLIB = ranlib -s QMAKE = /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/bin/qmake TAR = tar -cf COMPRESS = gzip -9f COPY = cp -f SED = sed COPY_FILE = cp -f COPY_DIR = cp -f -R STRIP = INSTALL_FILE = $(COPY_FILE) INSTALL_DIR = $(COPY_DIR) INSTALL_PROGRAM = $(COPY_FILE) DEL_FILE = rm -f SYMLINK = ln -f -s DEL_DIR = rmdir MOVE = mv -f CHK_DIR_EXISTS= test -d MKDIR = mkdir -p export MACOSX_DEPLOYMENT_TARGET = 10.5 ####### Output directory OBJECTS_DIR = .obj/debug-shared/ ####### Files SOURCES = main.cpp .rcc/debug-shared/qrc_animatedtiles.cpp OBJECTS = .obj/debug-shared/main.o \ .obj/debug-shared/qrc_animatedtiles.o DIST = ../../../mkspecs/common/unix.conf \ ../../../mkspecs/common/mac.conf \ ../../../mkspecs/common/mac-g++.conf \ ../../../mkspecs/features/exclusive_builds.prf \ ../../../mkspecs/features/default_pre.prf \ ../../../mkspecs/features/mac/default_pre.prf \ ../../../.qmake.cache \ ../../../mkspecs/qconfig.pri \ ../../../mkspecs/modules/qt_webkit_version.pri \ ../../../mkspecs/features/qt_functions.prf \ ../../../mkspecs/features/qt_config.prf \ ../../../mkspecs/features/debug.prf \ ../../../mkspecs/features/default_post.prf \ ../../../mkspecs/features/mac/default_post.prf \ ../../../mkspecs/features/mac/x86_64.prf \ ../../../mkspecs/features/mac/objective_c.prf \ ../../../mkspecs/features/unix/dylib.prf \ ../../../mkspecs/features/unix/largefile.prf \ ../../../mkspecs/features/dll.prf \ ../../../mkspecs/features/shared.prf \ ../../../mkspecs/features/warn_on.prf \ ../../../mkspecs/features/qt.prf \ ../../../mkspecs/features/unix/thread.prf \ ../../../mkspecs/features/moc.prf \ ../../../mkspecs/features/mac/rez.prf \ ../../../mkspecs/features/mac/sdk.prf \ ../../../mkspecs/features/resources.prf \ ../../../mkspecs/features/uic.prf \ ../../../mkspecs/features/yacc.prf \ ../../../mkspecs/features/lex.prf \ animatedtiles.pro QMAKE_TARGET = animatedtiles DESTDIR = TARGET = animatedtiles.app/Contents/MacOS/animatedtiles ####### Custom Compiler Variables QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \ -Xarch_x86_64 \ -mmacosx-version-min=10.5 \ -g \ -arch \ x86_64 \ -Xarch_x86_64 \ -mmacosx-version-min=10.5 \ -Wall \ -W first: all ####### Implicit rules .SUFFIXES: .o .c .cpp .cc .cxx .C .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" ####### Build rules all: Makefile animatedtiles.app/Contents/PkgInfo animatedtiles.app/Contents/Resources/empty.lproj animatedtiles.app/Contents/Info.plist $(TARGET) $(TARGET): $(OBJECTS) @$(CHK_DIR_EXISTS) animatedtiles.app/Contents/MacOS/ || $(MKDIR) animatedtiles.app/Contents/MacOS/ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) Makefile: animatedtiles.pro ../../../.qmake.cache ../../../mkspecs/macx-g++/qmake.conf ../../../mkspecs/common/unix.conf \ ../../../mkspecs/common/mac.conf \ ../../../mkspecs/common/mac-g++.conf \ ../../../mkspecs/features/exclusive_builds.prf \ ../../../mkspecs/features/default_pre.prf \ ../../../mkspecs/features/mac/default_pre.prf \ ../../../.qmake.cache \ ../../../mkspecs/qconfig.pri \ ../../../mkspecs/modules/qt_webkit_version.pri \ ../../../mkspecs/features/qt_functions.prf \ ../../../mkspecs/features/qt_config.prf \ ../../../mkspecs/features/debug.prf \ ../../../mkspecs/features/default_post.prf \ ../../../mkspecs/features/mac/default_post.prf \ ../../../mkspecs/features/mac/x86_64.prf \ ../../../mkspecs/features/mac/objective_c.prf \ ../../../mkspecs/features/unix/dylib.prf \ ../../../mkspecs/features/unix/largefile.prf \ ../../../mkspecs/features/dll.prf \ ../../../mkspecs/features/shared.prf \ ../../../mkspecs/features/warn_on.prf \ ../../../mkspecs/features/qt.prf \ ../../../mkspecs/features/unix/thread.prf \ ../../../mkspecs/features/moc.prf \ ../../../mkspecs/features/mac/rez.prf \ ../../../mkspecs/features/mac/sdk.prf \ ../../../mkspecs/features/resources.prf \ ../../../mkspecs/features/uic.prf \ ../../../mkspecs/features/yacc.prf \ ../../../mkspecs/features/lex.prf \ /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/lib/QtGui.framework/QtGui.prl \ /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/lib/QtCore.framework/QtCore.prl $(QMAKE) -spec ../../../mkspecs/macx-g++ -o Makefile animatedtiles.pro ../../../mkspecs/common/unix.conf: ../../../mkspecs/common/mac.conf: ../../../mkspecs/common/mac-g++.conf: ../../../mkspecs/features/exclusive_builds.prf: ../../../mkspecs/features/default_pre.prf: ../../../mkspecs/features/mac/default_pre.prf: ../../../.qmake.cache: ../../../mkspecs/qconfig.pri: ../../../mkspecs/modules/qt_webkit_version.pri: ../../../mkspecs/features/qt_functions.prf: ../../../mkspecs/features/qt_config.prf: ../../../mkspecs/features/debug.prf: ../../../mkspecs/features/default_post.prf: ../../../mkspecs/features/mac/default_post.prf: ../../../mkspecs/features/mac/x86_64.prf: ../../../mkspecs/features/mac/objective_c.prf: ../../../mkspecs/features/unix/dylib.prf: ../../../mkspecs/features/unix/largefile.prf: ../../../mkspecs/features/dll.prf: ../../../mkspecs/features/shared.prf: ../../../mkspecs/features/warn_on.prf: ../../../mkspecs/features/qt.prf: ../../../mkspecs/features/unix/thread.prf: ../../../mkspecs/features/moc.prf: ../../../mkspecs/features/mac/rez.prf: ../../../mkspecs/features/mac/sdk.prf: ../../../mkspecs/features/resources.prf: ../../../mkspecs/features/uic.prf: ../../../mkspecs/features/yacc.prf: ../../../mkspecs/features/lex.prf: /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/lib/QtGui.framework/QtGui.prl: /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/lib/QtCore.framework/QtCore.prl: qmake: FORCE @$(QMAKE) -spec ../../../mkspecs/macx-g++ -o Makefile animatedtiles.pro animatedtiles.app/Contents/PkgInfo: @$(CHK_DIR_EXISTS) animatedtiles.app/Contents || $(MKDIR) animatedtiles.app/Contents @$(DEL_FILE) animatedtiles.app/Contents/PkgInfo @echo "APPL????" >animatedtiles.app/Contents/PkgInfo animatedtiles.app/Contents/Resources/empty.lproj: @$(CHK_DIR_EXISTS) animatedtiles.app/Contents/Resources || $(MKDIR) animatedtiles.app/Contents/Resources @touch animatedtiles.app/Contents/Resources/empty.lproj animatedtiles.app/Contents/Info.plist: @$(CHK_DIR_EXISTS) animatedtiles.app/Contents || $(MKDIR) animatedtiles.app/Contents @$(DEL_FILE) animatedtiles.app/Contents/Info.plist @sed -e "s,@ICON@,,g" -e "s,@EXECUTABLE@,animatedtiles,g" -e "s,@TYPEINFO@,????,g" ../../../mkspecs/macx-g++/Info.plist.app >animatedtiles.app/Contents/Info.plist dist: @$(CHK_DIR_EXISTS) .obj/debug-shared/animatedtiles1.0.0 || $(MKDIR) .obj/debug-shared/animatedtiles1.0.0 $(COPY_FILE) --parents $(SOURCES) $(DIST) .obj/debug-shared/animatedtiles1.0.0/ && $(COPY_FILE) --parents animatedtiles.qrc .obj/debug-shared/animatedtiles1.0.0/ && $(COPY_FILE) --parents main.cpp .obj/debug-shared/animatedtiles1.0.0/ && (cd `dirname .obj/debug-shared/animatedtiles1.0.0` && $(TAR) animatedtiles1.0.0.tar animatedtiles1.0.0 && $(COMPRESS) animatedtiles1.0.0.tar) && $(MOVE) `dirname .obj/debug-shared/animatedtiles1.0.0`/animatedtiles1.0.0.tar.gz . && $(DEL_FILE) -r .obj/debug-shared/animatedtiles1.0.0 clean:compiler_clean -$(DEL_FILE) $(OBJECTS) -$(DEL_FILE) *~ core *.core ####### Sub-libraries distclean: clean -$(DEL_FILE) -r animatedtiles.app -$(DEL_FILE) Makefile check: first mocclean: compiler_moc_header_clean compiler_moc_source_clean mocables: compiler_moc_header_make_all compiler_moc_source_make_all compiler_objective_c_make_all: compiler_objective_c_clean: compiler_moc_header_make_all: compiler_moc_header_clean: compiler_rcc_make_all: .rcc/debug-shared/qrc_animatedtiles.cpp compiler_rcc_clean: -$(DEL_FILE) .rcc/debug-shared/qrc_animatedtiles.cpp .rcc/debug-shared/qrc_animatedtiles.cpp: animatedtiles.qrc /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/bin/rcc -name animatedtiles animatedtiles.qrc -o .rcc/debug-shared/qrc_animatedtiles.cpp compiler_image_collection_make_all: .uic/debug-shared/qmake_image_collection.cpp compiler_image_collection_clean: -$(DEL_FILE) .uic/debug-shared/qmake_image_collection.cpp compiler_moc_source_make_all: .moc/debug-shared/main.moc compiler_moc_source_clean: -$(DEL_FILE) .moc/debug-shared/main.moc .moc/debug-shared/main.moc: ../../../include/QtGui/QtGui \ ../../../include/QtCore/QtCore \ ../../../include/QtCore/qxmlstream.h \ ../../../src/corelib/xml/qxmlstream.h \ ../../../include/QtCore/qiodevice.h \ ../../../src/corelib/io/qiodevice.h \ ../../../include/QtCore/qobject.h \ ../../../src/corelib/kernel/qobject.h \ ../../../include/QtCore/qobjectdefs.h \ ../../../src/corelib/kernel/qobjectdefs.h \ ../../../include/QtCore/qnamespace.h \ ../../../src/corelib/global/qnamespace.h \ ../../../include/QtCore/qglobal.h \ ../../../src/corelib/global/qglobal.h \ ../../../include/QtCore/qconfig.h \ ../../../src/corelib/global/qconfig.h \ ../../../include/QtCore/qfeatures.h \ ../../../src/corelib/global/qfeatures.h \ ../../../include/QtCore/qstring.h \ ../../../src/corelib/tools/qstring.h \ ../../../include/QtCore/qchar.h \ ../../../src/corelib/tools/qchar.h \ ../../../include/QtCore/qbytearray.h \ ../../../src/corelib/tools/qbytearray.h \ ../../../include/QtCore/qatomic.h \ ../../../src/corelib/thread/qatomic.h \ ../../../include/QtCore/qbasicatomic.h \ ../../../src/corelib/thread/qbasicatomic.h \ ../../../include/QtCore/qatomic_bootstrap.h \ ../../../src/corelib/arch/qatomic_bootstrap.h \ ../../../include/QtCore/qatomic_arch.h \ ../../../src/corelib/arch/qatomic_arch.h \ ../../../include/QtCore/qatomic_vxworks.h \ ../../../src/corelib/arch/qatomic_vxworks.h \ ../../../include/QtCore/qatomic_powerpc.h \ ../../../src/corelib/arch/qatomic_powerpc.h \ ../../../include/QtCore/qatomic_alpha.h \ ../../../src/corelib/arch/qatomic_alpha.h \ ../../../include/QtCore/qatomic_arm.h \ ../../../src/corelib/arch/qatomic_arm.h \ ../../../include/QtCore/qatomic_armv6.h \ ../../../src/corelib/arch/qatomic_armv6.h \ ../../../include/QtCore/qatomic_avr32.h \ ../../../src/corelib/arch/qatomic_avr32.h \ ../../../include/QtCore/qatomic_bfin.h \ ../../../src/corelib/arch/qatomic_bfin.h \ ../../../include/QtCore/qatomic_generic.h \ ../../../src/corelib/arch/qatomic_generic.h \ ../../../include/QtCore/qatomic_i386.h \ ../../../src/corelib/arch/qatomic_i386.h \ ../../../include/QtCore/qatomic_ia64.h \ ../../../src/corelib/arch/qatomic_ia64.h \ ../../../include/QtCore/qatomic_macosx.h \ ../../../src/corelib/arch/qatomic_macosx.h \ ../../../include/QtCore/qatomic_x86_64.h \ ../../../src/corelib/arch/qatomic_x86_64.h \ ../../../include/QtCore/qatomic_mips.h \ ../../../src/corelib/arch/qatomic_mips.h \ ../../../include/QtCore/qatomic_parisc.h \ ../../../src/corelib/arch/qatomic_parisc.h \ ../../../include/QtCore/qatomic_s390.h \ ../../../src/corelib/arch/qatomic_s390.h \ ../../../include/QtCore/qatomic_sparc.h \ ../../../src/corelib/arch/qatomic_sparc.h \ ../../../include/QtCore/qatomic_windows.h \ ../../../src/corelib/arch/qatomic_windows.h \ ../../../include/QtCore/qatomic_windowsce.h \ ../../../src/corelib/arch/qatomic_windowsce.h \ ../../../include/QtCore/qatomic_symbian.h \ ../../../src/corelib/arch/qatomic_symbian.h \ ../../../include/QtCore/qatomic_sh.h \ ../../../src/corelib/arch/qatomic_sh.h \ ../../../include/QtCore/qatomic_sh4a.h \ ../../../src/corelib/arch/qatomic_sh4a.h \ ../../../include/Qt3Support/q3cstring.h \ ../../../src/qt3support/tools/q3cstring.h \ ../../../include/QtCore/qstringbuilder.h \ ../../../src/corelib/tools/qstringbuilder.h \ ../../../include/QtCore/qmap.h \ ../../../src/corelib/tools/qmap.h \ ../../../include/QtCore/qiterator.h \ ../../../src/corelib/tools/qiterator.h \ ../../../include/QtCore/qlist.h \ ../../../src/corelib/tools/qlist.h \ ../../../include/QtCore/qalgorithms.h \ ../../../src/corelib/tools/qalgorithms.h \ ../../../include/QtCore/qcoreevent.h \ ../../../src/corelib/kernel/qcoreevent.h \ ../../../include/QtCore/qscopedpointer.h \ ../../../src/corelib/tools/qscopedpointer.h \ ../../../include/QtCore/qvector.h \ ../../../src/corelib/tools/qvector.h \ ../../../include/QtCore/QPointF \ ../../../include/QtCore/qpoint.h \ ../../../src/corelib/tools/qpoint.h \ ../../../include/QtCore/QPoint \ ../../../include/QtCore/qtextcodec.h \ ../../../src/corelib/codecs/qtextcodec.h \ ../../../include/QtCore/qtextcodecplugin.h \ ../../../src/corelib/codecs/qtextcodecplugin.h \ ../../../include/QtCore/qplugin.h \ ../../../src/corelib/plugin/qplugin.h \ ../../../include/QtCore/qpointer.h \ ../../../src/corelib/kernel/qpointer.h \ ../../../include/QtCore/qfactoryinterface.h \ ../../../src/corelib/plugin/qfactoryinterface.h \ ../../../include/QtCore/qstringlist.h \ ../../../src/corelib/tools/qstringlist.h \ ../../../include/QtCore/qdatastream.h \ ../../../src/corelib/io/qdatastream.h \ ../../../include/QtCore/qregexp.h \ ../../../src/corelib/tools/qregexp.h \ ../../../include/QtCore/qstringmatcher.h \ ../../../src/corelib/tools/qstringmatcher.h \ ../../../include/Qt3Support/q3valuelist.h \ ../../../src/qt3support/tools/q3valuelist.h \ ../../../include/QtCore/qlinkedlist.h \ ../../../src/corelib/tools/qlinkedlist.h \ ../../../include/QtCore/qabstracteventdispatcher.h \ ../../../src/corelib/kernel/qabstracteventdispatcher.h \ ../../../include/QtCore/qeventloop.h \ ../../../src/corelib/kernel/qeventloop.h \ ../../../include/QtCore/qabstractitemmodel.h \ ../../../src/corelib/kernel/qabstractitemmodel.h \ ../../../include/QtCore/qvariant.h \ ../../../src/corelib/kernel/qvariant.h \ ../../../include/QtCore/qmetatype.h \ ../../../src/corelib/kernel/qmetatype.h \ ../../../include/QtCore/qhash.h \ ../../../src/corelib/tools/qhash.h \ ../../../include/QtCore/qpair.h \ ../../../src/corelib/tools/qpair.h \ ../../../include/QtCore/qbasictimer.h \ ../../../src/corelib/kernel/qbasictimer.h \ ../../../include/QtCore/qcoreapplication.h \ ../../../src/corelib/kernel/qcoreapplication.h \ ../../../include/QtCore/qmath.h \ ../../../src/corelib/kernel/qmath.h \ ../../../include/QtCore/qmetaobject.h \ ../../../src/corelib/kernel/qmetaobject.h \ ../../../include/QtCore/qmimedata.h \ ../../../src/corelib/kernel/qmimedata.h \ ../../../include/QtCore/qobjectcleanuphandler.h \ ../../../src/corelib/kernel/qobjectcleanuphandler.h \ ../../../include/QtCore/qsharedmemory.h \ ../../../src/corelib/kernel/qsharedmemory.h \ ../../../include/QtCore/qsignalmapper.h \ ../../../src/corelib/kernel/qsignalmapper.h \ ../../../include/QtCore/qsocketnotifier.h \ ../../../src/corelib/kernel/qsocketnotifier.h \ ../../../include/QtCore/qsystemsemaphore.h \ ../../../src/corelib/kernel/qsystemsemaphore.h \ ../../../include/QtCore/qtimer.h \ ../../../src/corelib/kernel/qtimer.h \ ../../../include/QtCore/qtranslator.h \ ../../../src/corelib/kernel/qtranslator.h \ ../../../include/QtCore/qabstractanimation.h \ ../../../src/corelib/animation/qabstractanimation.h \ ../../../include/QtCore/qanimationgroup.h \ ../../../src/corelib/animation/qanimationgroup.h \ ../../../include/QtCore/qparallelanimationgroup.h \ ../../../src/corelib/animation/qparallelanimationgroup.h \ ../../../include/QtCore/qpauseanimation.h \ ../../../src/corelib/animation/qpauseanimation.h \ ../../../include/QtCore/qpropertyanimation.h \ ../../../src/corelib/animation/qpropertyanimation.h \ ../../../include/QtCore/qvariantanimation.h \ ../../../src/corelib/animation/qvariantanimation.h \ ../../../include/QtCore/qeasingcurve.h \ ../../../src/corelib/tools/qeasingcurve.h \ ../../../include/QtCore/qsequentialanimationgroup.h \ ../../../src/corelib/animation/qsequentialanimationgroup.h \ ../../../include/QtCore/qendian.h \ ../../../src/corelib/global/qendian.h \ ../../../include/QtCore/qlibraryinfo.h \ ../../../src/corelib/global/qlibraryinfo.h \ ../../../include/QtCore/QDate \ ../../../include/QtCore/qdatetime.h \ ../../../src/corelib/tools/qdatetime.h \ ../../../include/QtCore/qsharedpointer.h \ ../../../src/corelib/tools/qsharedpointer.h \ ../../../include/QtCore/qshareddata.h \ ../../../src/corelib/tools/qshareddata.h \ ../../../include/QtCore/qsharedpointer_impl.h \ ../../../src/corelib/tools/qsharedpointer_impl.h \ ../../../include/QtCore/qnumeric.h \ ../../../src/corelib/global/qnumeric.h \ ../../../include/QtCore/qmutex.h \ ../../../src/corelib/thread/qmutex.h \ ../../../include/QtCore/qreadwritelock.h \ ../../../src/corelib/thread/qreadwritelock.h \ ../../../include/QtCore/qsemaphore.h \ ../../../src/corelib/thread/qsemaphore.h \ ../../../include/QtCore/qthread.h \ ../../../src/corelib/thread/qthread.h \ ../../../include/QtCore/qthreadstorage.h \ ../../../src/corelib/thread/qthreadstorage.h \ ../../../include/QtCore/qwaitcondition.h \ ../../../src/corelib/thread/qwaitcondition.h \ ../../../include/QtCore/qabstractstate.h \ ../../../src/corelib/statemachine/qabstractstate.h \ ../../../include/QtCore/qabstracttransition.h \ ../../../src/corelib/statemachine/qabstracttransition.h \ ../../../include/QtCore/qeventtransition.h \ ../../../src/corelib/statemachine/qeventtransition.h \ ../../../include/QtCore/qfinalstate.h \ ../../../src/corelib/statemachine/qfinalstate.h \ ../../../include/QtCore/qhistorystate.h \ ../../../src/corelib/statemachine/qhistorystate.h \ ../../../include/QtCore/qsignaltransition.h \ ../../../src/corelib/statemachine/qsignaltransition.h \ ../../../include/QtCore/qstate.h \ ../../../src/corelib/statemachine/qstate.h \ ../../../include/QtCore/qstatemachine.h \ ../../../src/corelib/statemachine/qstatemachine.h \ ../../../include/QtCore/qset.h \ ../../../src/corelib/tools/qset.h \ ../../../include/QtCore/qabstractfileengine.h \ ../../../src/corelib/io/qabstractfileengine.h \ ../../../include/QtCore/qdir.h \ ../../../src/corelib/io/qdir.h \ ../../../include/QtCore/qfileinfo.h \ ../../../src/corelib/io/qfileinfo.h \ ../../../include/QtCore/qfile.h \ ../../../src/corelib/io/qfile.h \ ../../../include/QtCore/qbuffer.h \ ../../../src/corelib/io/qbuffer.h \ ../../../include/QtCore/qdebug.h \ ../../../src/corelib/io/qdebug.h \ ../../../include/QtCore/qtextstream.h \ ../../../src/corelib/io/qtextstream.h \ ../../../include/QtCore/qlocale.h \ ../../../src/corelib/tools/qlocale.h \ ../../../include/QtCore/qcontiguouscache.h \ ../../../src/corelib/tools/qcontiguouscache.h \ ../../../include/QtCore/qdiriterator.h \ ../../../src/corelib/io/qdiriterator.h \ ../../../include/QtCore/qfilesystemwatcher.h \ ../../../src/corelib/io/qfilesystemwatcher.h \ ../../../include/QtCore/qfsfileengine.h \ ../../../src/corelib/io/qfsfileengine.h \ ../../../include/QtCore/qprocess.h \ ../../../src/corelib/io/qprocess.h \ ../../../include/QtCore/qresource.h \ ../../../src/corelib/io/qresource.h \ ../../../include/QtCore/qsettings.h \ ../../../src/corelib/io/qsettings.h \ ../../../include/QtCore/qtemporaryfile.h \ ../../../src/corelib/io/qtemporaryfile.h \ ../../../include/QtCore/qurl.h \ ../../../src/corelib/io/qurl.h \ ../../../include/QtCore/qfuture.h \ ../../../src/corelib/concurrent/qfuture.h \ ../../../include/QtCore/qfutureinterface.h \ ../../../src/corelib/concurrent/qfutureinterface.h \ ../../../include/QtCore/qrunnable.h \ ../../../src/corelib/concurrent/qrunnable.h \ ../../../include/QtCore/qtconcurrentexception.h \ ../../../src/corelib/concurrent/qtconcurrentexception.h \ ../../../include/QtCore/qtconcurrentresultstore.h \ ../../../src/corelib/concurrent/qtconcurrentresultstore.h \ ../../../include/QtCore/qtconcurrentcompilertest.h \ ../../../src/corelib/concurrent/qtconcurrentcompilertest.h \ ../../../include/QtCore/qfuturesynchronizer.h \ ../../../src/corelib/concurrent/qfuturesynchronizer.h \ ../../../include/QtCore/qfuturewatcher.h \ ../../../src/corelib/concurrent/qfuturewatcher.h \ ../../../include/QtCore/qtconcurrentfilter.h \ ../../../src/corelib/concurrent/qtconcurrentfilter.h \ ../../../include/QtCore/qtconcurrentfilterkernel.h \ ../../../src/corelib/concurrent/qtconcurrentfilterkernel.h \ ../../../include/QtCore/qtconcurrentiteratekernel.h \ ../../../src/corelib/concurrent/qtconcurrentiteratekernel.h \ ../../../include/QtCore/qtconcurrentmedian.h \ ../../../src/corelib/concurrent/qtconcurrentmedian.h \ ../../../include/QtCore/qtconcurrentthreadengine.h \ ../../../src/corelib/concurrent/qtconcurrentthreadengine.h \ ../../../include/QtCore/qthreadpool.h \ ../../../src/corelib/concurrent/qthreadpool.h \ ../../../include/QtCore/qtconcurrentmapkernel.h \ ../../../src/corelib/concurrent/qtconcurrentmapkernel.h \ ../../../include/QtCore/qtconcurrentreducekernel.h \ ../../../src/corelib/concurrent/qtconcurrentreducekernel.h \ ../../../include/QtCore/qtconcurrentfunctionwrappers.h \ ../../../src/corelib/concurrent/qtconcurrentfunctionwrappers.h \ ../../../include/QtCore/qtconcurrentmap.h \ ../../../src/corelib/concurrent/qtconcurrentmap.h \ ../../../include/QtCore/qtconcurrentrun.h \ ../../../src/corelib/concurrent/qtconcurrentrun.h \ ../../../include/QtCore/qtconcurrentrunbase.h \ ../../../src/corelib/concurrent/qtconcurrentrunbase.h \ ../../../include/QtCore/qtconcurrentstoredfunctioncall.h \ ../../../src/corelib/concurrent/qtconcurrentstoredfunctioncall.h \ ../../../include/QtCore/qlibrary.h \ ../../../src/corelib/plugin/qlibrary.h \ ../../../include/QtCore/qpluginloader.h \ ../../../src/corelib/plugin/qpluginloader.h \ ../../../include/QtCore/quuid.h \ ../../../src/corelib/plugin/quuid.h \ ../../../include/QtCore/qbitarray.h \ ../../../src/corelib/tools/qbitarray.h \ ../../../include/QtCore/qbytearraymatcher.h \ ../../../src/corelib/tools/qbytearraymatcher.h \ ../../../include/QtCore/qcache.h \ ../../../src/corelib/tools/qcache.h \ ../../../include/QtCore/qcontainerfwd.h \ ../../../src/corelib/tools/qcontainerfwd.h \ ../../../include/QtCore/qcryptographichash.h \ ../../../src/corelib/tools/qcryptographichash.h \ ../../../include/QtCore/qelapsedtimer.h \ ../../../src/corelib/tools/qelapsedtimer.h \ ../../../include/QtCore/qline.h \ ../../../src/corelib/tools/qline.h \ ../../../include/QtCore/qmargins.h \ ../../../src/corelib/tools/qmargins.h \ ../../../include/QtCore/qqueue.h \ ../../../src/corelib/tools/qqueue.h \ ../../../include/QtCore/qrect.h \ ../../../src/corelib/tools/qrect.h \ ../../../include/QtCore/qsize.h \ ../../../src/corelib/tools/qsize.h \ ../../../include/QtCore/qstack.h \ ../../../src/corelib/tools/qstack.h \ ../../../include/QtCore/qtextboundaryfinder.h \ ../../../src/corelib/tools/qtextboundaryfinder.h \ ../../../include/QtCore/qtimeline.h \ ../../../src/corelib/tools/qtimeline.h \ ../../../include/QtCore/qvarlengtharray.h \ ../../../src/corelib/tools/qvarlengtharray.h \ ../../../include/QtGui/qbrush.h \ ../../../src/gui/painting/qbrush.h \ ../../../include/QtGui/qcolor.h \ ../../../src/gui/painting/qcolor.h \ ../../../include/QtGui/qrgb.h \ ../../../src/gui/painting/qrgb.h \ ../../../include/QtGui/qmatrix.h \ ../../../src/gui/painting/qmatrix.h \ ../../../include/QtGui/qpolygon.h \ ../../../src/gui/painting/qpolygon.h \ ../../../include/QtGui/qregion.h \ ../../../src/gui/painting/qregion.h \ ../../../include/QtGui/qwindowdefs.h \ ../../../src/gui/kernel/qwindowdefs.h \ ../../../include/QtGui/qmacdefines_mac.h \ ../../../src/gui/kernel/qmacdefines_mac.h \ ../../../include/QtGui/qwindowdefs_win.h \ ../../../src/gui/kernel/qwindowdefs_win.h \ ../../../include/QtGui/qwmatrix.h \ ../../../src/gui/painting/qwmatrix.h \ ../../../include/QtGui/qtransform.h \ ../../../src/gui/painting/qtransform.h \ ../../../include/QtGui/qpainterpath.h \ ../../../src/gui/painting/qpainterpath.h \ ../../../include/QtGui/qimage.h \ ../../../src/gui/image/qimage.h \ ../../../include/QtGui/qpaintdevice.h \ ../../../src/gui/painting/qpaintdevice.h \ ../../../include/QtGui/qpixmap.h \ ../../../src/gui/image/qpixmap.h \ ../../../include/QtGui/qcolormap.h \ ../../../src/gui/painting/qcolormap.h \ ../../../include/QtGui/qdrawutil.h \ ../../../src/gui/painting/qdrawutil.h \ ../../../include/QtGui/qpaintengine.h \ ../../../src/gui/painting/qpaintengine.h \ ../../../include/QtGui/qpainter.h \ ../../../src/gui/painting/qpainter.h \ ../../../include/QtGui/qtextoption.h \ ../../../src/gui/text/qtextoption.h \ ../../../include/QtGui/qpen.h \ ../../../src/gui/painting/qpen.h \ ../../../include/QtGui/qfontinfo.h \ ../../../src/gui/text/qfontinfo.h \ ../../../include/QtGui/qfont.h \ ../../../src/gui/text/qfont.h \ ../../../include/QtGui/qfontmetrics.h \ ../../../src/gui/text/qfontmetrics.h \ ../../../include/QtGui/qprintengine.h \ ../../../src/gui/painting/qprintengine.h \ ../../../include/QtGui/qprinter.h \ ../../../src/gui/painting/qprinter.h \ ../../../include/QtGui/qprinterinfo.h \ ../../../src/gui/painting/qprinterinfo.h \ ../../../include/QtGui/QPrinter \ ../../../include/QtCore/QList \ ../../../include/QtGui/qstylepainter.h \ ../../../src/gui/painting/qstylepainter.h \ ../../../include/QtGui/qstyle.h \ ../../../src/gui/styles/qstyle.h \ ../../../include/QtGui/qicon.h \ ../../../src/gui/image/qicon.h \ ../../../include/QtGui/qpalette.h \ ../../../src/gui/kernel/qpalette.h \ ../../../include/QtGui/qsizepolicy.h \ ../../../src/gui/kernel/qsizepolicy.h \ ../../../include/QtGui/qwidget.h \ ../../../src/gui/kernel/qwidget.h \ ../../../include/QtGui/qcursor.h \ ../../../src/gui/kernel/qcursor.h \ ../../../include/QtGui/qkeysequence.h \ ../../../src/gui/kernel/qkeysequence.h \ ../../../include/QtGui/qevent.h \ ../../../src/gui/kernel/qevent.h \ ../../../include/QtGui/qmime.h \ ../../../src/gui/kernel/qmime.h \ ../../../include/QtGui/qdrag.h \ ../../../src/gui/kernel/qdrag.h \ ../../../include/QtGui/qaction.h \ ../../../src/gui/kernel/qaction.h \ ../../../include/QtGui/qactiongroup.h \ ../../../src/gui/kernel/qactiongroup.h \ ../../../include/QtGui/qapplication.h \ ../../../src/gui/kernel/qapplication.h \ ../../../include/QtGui/qdesktopwidget.h \ ../../../src/gui/kernel/qdesktopwidget.h \ ../../../include/QtGui/qtransportauth_qws.h \ ../../../src/gui/embedded/qtransportauth_qws.h \ ../../../include/QtGui/qboxlayout.h \ ../../../src/gui/kernel/qboxlayout.h \ ../../../include/QtGui/qlayout.h \ ../../../src/gui/kernel/qlayout.h \ ../../../include/QtGui/qlayoutitem.h \ ../../../src/gui/kernel/qlayoutitem.h \ ../../../include/QtGui/qgridlayout.h \ ../../../src/gui/kernel/qgridlayout.h \ ../../../include/QtGui/qclipboard.h \ ../../../src/gui/kernel/qclipboard.h \ ../../../include/QtGui/qformlayout.h \ ../../../src/gui/kernel/qformlayout.h \ ../../../include/QtGui/QLayout \ ../../../include/QtGui/qgesture.h \ ../../../src/gui/kernel/qgesture.h \ ../../../include/QtGui/qgesturerecognizer.h \ ../../../src/gui/kernel/qgesturerecognizer.h \ ../../../include/QtGui/qsessionmanager.h \ ../../../src/gui/kernel/qsessionmanager.h \ ../../../include/QtGui/qshortcut.h \ ../../../src/gui/kernel/qshortcut.h \ ../../../include/QtGui/qsound.h \ ../../../src/gui/kernel/qsound.h \ ../../../include/QtGui/qstackedlayout.h \ ../../../src/gui/kernel/qstackedlayout.h \ ../../../include/QtGui/qtooltip.h \ ../../../src/gui/kernel/qtooltip.h \ ../../../include/QtGui/qwhatsthis.h \ ../../../src/gui/kernel/qwhatsthis.h \ ../../../include/QtGui/qwidgetaction.h \ ../../../src/gui/kernel/qwidgetaction.h \ ../../../include/QtGui/qgraphicsanchorlayout.h \ ../../../src/gui/graphicsview/qgraphicsanchorlayout.h \ ../../../include/QtGui/qgraphicsitem.h \ ../../../src/gui/graphicsview/qgraphicsitem.h \ ../../../include/QtGui/qgraphicslayout.h \ ../../../src/gui/graphicsview/qgraphicslayout.h \ ../../../include/QtGui/qgraphicslayoutitem.h \ ../../../src/gui/graphicsview/qgraphicslayoutitem.h \ ../../../include/QtGui/qgraphicsgridlayout.h \ ../../../src/gui/graphicsview/qgraphicsgridlayout.h \ ../../../include/QtGui/qgraphicsitemanimation.h \ ../../../src/gui/graphicsview/qgraphicsitemanimation.h \ ../../../include/QtGui/qgraphicslinearlayout.h \ ../../../src/gui/graphicsview/qgraphicslinearlayout.h \ ../../../include/QtGui/qgraphicsproxywidget.h \ ../../../src/gui/graphicsview/qgraphicsproxywidget.h \ ../../../include/QtGui/qgraphicswidget.h \ ../../../src/gui/graphicsview/qgraphicswidget.h \ ../../../include/QtGui/qgraphicsscene.h \ ../../../src/gui/graphicsview/qgraphicsscene.h \ ../../../include/QtGui/qgraphicssceneevent.h \ ../../../src/gui/graphicsview/qgraphicssceneevent.h \ ../../../include/QtGui/qgraphicstransform.h \ ../../../src/gui/graphicsview/qgraphicstransform.h \ ../../../include/QtCore/QObject \ ../../../include/QtGui/QVector3D \ ../../../include/QtGui/qvector3d.h \ ../../../src/gui/math3d/qvector3d.h \ ../../../include/QtGui/QTransform \ ../../../include/QtGui/QMatrix4x4 \ ../../../include/QtGui/qmatrix4x4.h \ ../../../src/gui/math3d/qmatrix4x4.h \ ../../../include/QtGui/qvector4d.h \ ../../../src/gui/math3d/qvector4d.h \ ../../../include/QtGui/qquaternion.h \ ../../../src/gui/math3d/qquaternion.h \ ../../../include/QtGui/qgenericmatrix.h \ ../../../src/gui/math3d/qgenericmatrix.h \ ../../../include/QtGui/qgraphicsview.h \ ../../../src/gui/graphicsview/qgraphicsview.h \ ../../../include/QtGui/qscrollarea.h \ ../../../src/gui/widgets/qscrollarea.h \ ../../../include/QtGui/qabstractscrollarea.h \ ../../../src/gui/widgets/qabstractscrollarea.h \ ../../../include/QtGui/qframe.h \ ../../../src/gui/widgets/qframe.h \ ../../../include/QtGui/qkeyeventtransition.h \ ../../../src/gui/statemachine/qkeyeventtransition.h \ ../../../include/QtGui/qmouseeventtransition.h \ ../../../src/gui/statemachine/qmouseeventtransition.h \ ../../../include/QtGui/qbitmap.h \ ../../../src/gui/image/qbitmap.h \ ../../../include/QtGui/qiconengine.h \ ../../../src/gui/image/qiconengine.h \ ../../../include/QtGui/qiconengineplugin.h \ ../../../src/gui/image/qiconengineplugin.h \ ../../../include/QtGui/qimageiohandler.h \ ../../../src/gui/image/qimageiohandler.h \ ../../../include/QtGui/qimagereader.h \ ../../../src/gui/image/qimagereader.h \ ../../../include/QtGui/qimagewriter.h \ ../../../src/gui/image/qimagewriter.h \ ../../../include/QtGui/qmovie.h \ ../../../src/gui/image/qmovie.h \ ../../../include/QtGui/qpicture.h \ ../../../src/gui/image/qpicture.h \ ../../../include/QtGui/qpictureformatplugin.h \ ../../../src/gui/image/qpictureformatplugin.h \ ../../../include/QtGui/qpixmapcache.h \ ../../../src/gui/image/qpixmapcache.h \ ../../../include/QtGui/qabstracttextdocumentlayout.h \ ../../../src/gui/text/qabstracttextdocumentlayout.h \ ../../../include/QtGui/qtextlayout.h \ ../../../src/gui/text/qtextlayout.h \ ../../../include/QtGui/qtextformat.h \ ../../../src/gui/text/qtextformat.h \ ../../../include/QtGui/qtextdocument.h \ ../../../src/gui/text/qtextdocument.h \ ../../../include/QtGui/qtextcursor.h \ ../../../src/gui/text/qtextcursor.h \ ../../../include/QtGui/qfontdatabase.h \ ../../../src/gui/text/qfontdatabase.h \ ../../../include/QtGui/qstatictext.h \ ../../../src/gui/text/qstatictext.h \ ../../../include/QtGui/qsyntaxhighlighter.h \ ../../../src/gui/text/qsyntaxhighlighter.h \ ../../../include/QtGui/qtextobject.h \ ../../../src/gui/text/qtextobject.h \ ../../../include/QtGui/qtextdocumentfragment.h \ ../../../src/gui/text/qtextdocumentfragment.h \ ../../../include/QtGui/qtextdocumentwriter.h \ ../../../src/gui/text/qtextdocumentwriter.h \ ../../../include/QtGui/qtextlist.h \ ../../../src/gui/text/qtextlist.h \ ../../../include/QtGui/qtexttable.h \ ../../../src/gui/text/qtexttable.h \ ../../../include/QtGui/qvector2d.h \ ../../../src/gui/math3d/qvector2d.h \ ../../../include/QtGui/qabstractbutton.h \ ../../../src/gui/widgets/qabstractbutton.h \ ../../../include/QtGui/qabstractslider.h \ ../../../src/gui/widgets/qabstractslider.h \ ../../../include/QtGui/qabstractspinbox.h \ ../../../src/gui/widgets/qabstractspinbox.h \ ../../../include/QtGui/qvalidator.h \ ../../../src/gui/widgets/qvalidator.h \ ../../../include/QtGui/qbuttongroup.h \ ../../../src/gui/widgets/qbuttongroup.h \ ../../../include/QtGui/qcalendarwidget.h \ ../../../src/gui/widgets/qcalendarwidget.h \ ../../../include/QtGui/qcheckbox.h \ ../../../src/gui/widgets/qcheckbox.h \ ../../../include/QtGui/qcombobox.h \ ../../../src/gui/widgets/qcombobox.h \ ../../../include/QtGui/qabstractitemdelegate.h \ ../../../src/gui/itemviews/qabstractitemdelegate.h \ ../../../include/QtGui/qstyleoption.h \ ../../../src/gui/styles/qstyleoption.h \ ../../../include/QtGui/qslider.h \ ../../../src/gui/widgets/qslider.h \ ../../../include/QtGui/qtabbar.h \ ../../../src/gui/widgets/qtabbar.h \ ../../../include/QtGui/qtabwidget.h \ ../../../src/gui/widgets/qtabwidget.h \ ../../../include/QtGui/qrubberband.h \ ../../../src/gui/widgets/qrubberband.h \ ../../../include/QtGui/qcommandlinkbutton.h \ ../../../src/gui/widgets/qcommandlinkbutton.h \ ../../../include/QtGui/qpushbutton.h \ ../../../src/gui/widgets/qpushbutton.h \ ../../../include/QtGui/qdatetimeedit.h \ ../../../src/gui/widgets/qdatetimeedit.h \ ../../../include/QtGui/qdial.h \ ../../../src/gui/widgets/qdial.h \ ../../../include/QtGui/qdialogbuttonbox.h \ ../../../src/gui/widgets/qdialogbuttonbox.h \ ../../../include/QtGui/qdockwidget.h \ ../../../src/gui/widgets/qdockwidget.h \ ../../../include/QtGui/qfocusframe.h \ ../../../src/gui/widgets/qfocusframe.h \ ../../../include/QtGui/qfontcombobox.h \ ../../../src/gui/widgets/qfontcombobox.h \ ../../../include/QtGui/qgroupbox.h \ ../../../src/gui/widgets/qgroupbox.h \ ../../../include/QtGui/qlabel.h \ ../../../src/gui/widgets/qlabel.h \ ../../../include/QtGui/qlcdnumber.h \ ../../../src/gui/widgets/qlcdnumber.h \ ../../../include/QtGui/qlineedit.h \ ../../../src/gui/widgets/qlineedit.h \ ../../../include/QtGui/qmainwindow.h \ ../../../src/gui/widgets/qmainwindow.h \ ../../../include/QtGui/qmdiarea.h \ ../../../src/gui/widgets/qmdiarea.h \ ../../../include/QtGui/qmdisubwindow.h \ ../../../src/gui/widgets/qmdisubwindow.h \ ../../../include/QtGui/qmenu.h \ ../../../src/gui/widgets/qmenu.h \ ../../../include/QtGui/qmenubar.h \ ../../../src/gui/widgets/qmenubar.h \ ../../../include/QtGui/qmenudata.h \ ../../../src/gui/widgets/qmenudata.h \ ../../../include/QtGui/qplaintextedit.h \ ../../../src/gui/widgets/qplaintextedit.h \ ../../../include/QtGui/qtextedit.h \ ../../../src/gui/widgets/qtextedit.h \ ../../../include/QtGui/qprintpreviewwidget.h \ ../../../src/gui/widgets/qprintpreviewwidget.h \ ../../../include/QtGui/qprogressbar.h \ ../../../src/gui/widgets/qprogressbar.h \ ../../../include/QtGui/qradiobutton.h \ ../../../src/gui/widgets/qradiobutton.h \ ../../../include/QtGui/qscrollbar.h \ ../../../src/gui/widgets/qscrollbar.h \ ../../../include/QtGui/qsizegrip.h \ ../../../src/gui/widgets/qsizegrip.h \ ../../../include/QtGui/qspinbox.h \ ../../../src/gui/widgets/qspinbox.h \ ../../../include/QtGui/qsplashscreen.h \ ../../../src/gui/widgets/qsplashscreen.h \ ../../../include/QtGui/qsplitter.h \ ../../../src/gui/widgets/qsplitter.h \ ../../../include/QtGui/qstackedwidget.h \ ../../../src/gui/widgets/qstackedwidget.h \ ../../../include/QtGui/qstatusbar.h \ ../../../src/gui/widgets/qstatusbar.h \ ../../../include/QtGui/qtextbrowser.h \ ../../../src/gui/widgets/qtextbrowser.h \ ../../../include/QtGui/qtoolbar.h \ ../../../src/gui/widgets/qtoolbar.h \ ../../../include/QtGui/qtoolbox.h \ ../../../src/gui/widgets/qtoolbox.h \ ../../../include/QtGui/qtoolbutton.h \ ../../../src/gui/widgets/qtoolbutton.h \ ../../../include/QtGui/qworkspace.h \ ../../../src/gui/widgets/qworkspace.h \ ../../../include/QtGui/qaccessible.h \ ../../../src/gui/accessible/qaccessible.h \ ../../../include/QtGui/qaccessible2.h \ ../../../src/gui/accessible/qaccessible2.h \ ../../../include/QtGui/qaccessiblebridge.h \ ../../../src/gui/accessible/qaccessiblebridge.h \ ../../../include/QtGui/qaccessibleobject.h \ ../../../src/gui/accessible/qaccessibleobject.h \ ../../../include/QtGui/qaccessibleplugin.h \ ../../../src/gui/accessible/qaccessibleplugin.h \ ../../../include/QtGui/qaccessiblewidget.h \ ../../../src/gui/accessible/qaccessiblewidget.h \ ../../../include/QtGui/qsymbianevent.h \ ../../../src/gui/symbian/qsymbianevent.h \ ../../../include/QtGui/qcompleter.h \ ../../../src/gui/util/qcompleter.h \ ../../../include/QtGui/qdesktopservices.h \ ../../../src/gui/util/qdesktopservices.h \ ../../../include/QtGui/qsystemtrayicon.h \ ../../../src/gui/util/qsystemtrayicon.h \ ../../../include/QtGui/qundogroup.h \ ../../../src/gui/util/qundogroup.h \ ../../../include/QtGui/qundostack.h \ ../../../src/gui/util/qundostack.h \ ../../../include/QtGui/qundoview.h \ ../../../src/gui/util/qundoview.h \ ../../../include/QtGui/qlistview.h \ ../../../src/gui/itemviews/qlistview.h \ ../../../include/QtGui/qabstractitemview.h \ ../../../src/gui/itemviews/qabstractitemview.h \ ../../../include/QtGui/qitemselectionmodel.h \ ../../../src/gui/itemviews/qitemselectionmodel.h \ ../../../include/QtGui/qcdestyle.h \ ../../../src/gui/styles/qcdestyle.h \ ../../../include/QtGui/qmotifstyle.h \ ../../../src/gui/styles/qmotifstyle.h \ ../../../include/QtGui/qcommonstyle.h \ ../../../src/gui/styles/qcommonstyle.h \ ../../../include/QtGui/qcleanlooksstyle.h \ ../../../src/gui/styles/qcleanlooksstyle.h \ ../../../include/QtGui/qwindowsstyle.h \ ../../../src/gui/styles/qwindowsstyle.h \ ../../../include/QtGui/qgtkstyle.h \ ../../../src/gui/styles/qgtkstyle.h \ ../../../include/QtGui/QCleanlooksStyle \ ../../../include/QtGui/QPalette \ ../../../include/QtGui/QFont \ ../../../include/QtGui/QFileDialog \ ../../../include/QtGui/qfiledialog.h \ ../../../src/gui/dialogs/qfiledialog.h \ ../../../include/QtGui/qdialog.h \ ../../../src/gui/dialogs/qdialog.h \ ../../../include/QtGui/qplastiquestyle.h \ ../../../src/gui/styles/qplastiquestyle.h \ ../../../include/QtGui/qproxystyle.h \ ../../../src/gui/styles/qproxystyle.h \ ../../../include/QtGui/QCommonStyle \ ../../../include/QtGui/qs60style.h \ ../../../src/gui/styles/qs60style.h \ ../../../include/QtGui/qstylefactory.h \ ../../../src/gui/styles/qstylefactory.h \ ../../../include/QtGui/qstyleplugin.h \ ../../../src/gui/styles/qstyleplugin.h \ ../../../include/QtGui/qwindowscestyle.h \ ../../../src/gui/styles/qwindowscestyle.h \ ../../../include/QtGui/qwindowsmobilestyle.h \ ../../../src/gui/styles/qwindowsmobilestyle.h \ ../../../include/QtGui/qwindowsvistastyle.h \ ../../../src/gui/styles/qwindowsvistastyle.h \ ../../../include/QtGui/qwindowsxpstyle.h \ ../../../src/gui/styles/qwindowsxpstyle.h \ ../../../include/QtGui/qabstractproxymodel.h \ ../../../src/gui/itemviews/qabstractproxymodel.h \ ../../../include/QtGui/qcolumnview.h \ ../../../src/gui/itemviews/qcolumnview.h \ ../../../include/QtGui/qdatawidgetmapper.h \ ../../../src/gui/itemviews/qdatawidgetmapper.h \ ../../../include/QtGui/qdirmodel.h \ ../../../src/gui/itemviews/qdirmodel.h \ ../../../include/QtGui/qfileiconprovider.h \ ../../../src/gui/itemviews/qfileiconprovider.h \ ../../../include/QtGui/qheaderview.h \ ../../../src/gui/itemviews/qheaderview.h \ ../../../include/QtGui/qitemdelegate.h \ ../../../src/gui/itemviews/qitemdelegate.h \ ../../../include/QtGui/qitemeditorfactory.h \ ../../../src/gui/itemviews/qitemeditorfactory.h \ ../../../include/QtGui/qlistwidget.h \ ../../../src/gui/itemviews/qlistwidget.h \ ../../../include/QtGui/qproxymodel.h \ ../../../src/gui/itemviews/qproxymodel.h \ ../../../include/QtGui/qsortfilterproxymodel.h \ ../../../src/gui/itemviews/qsortfilterproxymodel.h \ ../../../include/QtGui/qstandarditemmodel.h \ ../../../src/gui/itemviews/qstandarditemmodel.h \ ../../../include/QtGui/qstringlistmodel.h \ ../../../src/gui/itemviews/qstringlistmodel.h \ ../../../include/QtGui/qstyleditemdelegate.h \ ../../../src/gui/itemviews/qstyleditemdelegate.h \ ../../../include/QtGui/qtableview.h \ ../../../src/gui/itemviews/qtableview.h \ ../../../include/QtGui/qtablewidget.h \ ../../../src/gui/itemviews/qtablewidget.h \ ../../../include/QtGui/qtreeview.h \ ../../../src/gui/itemviews/qtreeview.h \ ../../../include/QtGui/qtreewidget.h \ ../../../src/gui/itemviews/qtreewidget.h \ ../../../include/QtGui/qtreewidgetitemiterator.h \ ../../../src/gui/itemviews/qtreewidgetitemiterator.h \ ../../../include/QtGui/qgraphicseffect.h \ ../../../src/gui/effects/qgraphicseffect.h \ ../../../include/QtGui/qs60mainapplication.h \ ../../../src/gui/s60framework/qs60mainapplication.h \ ../../../include/QtGui/qs60mainappui.h \ ../../../src/gui/s60framework/qs60mainappui.h \ ../../../include/QtGui/qs60maindocument.h \ ../../../src/gui/s60framework/qs60maindocument.h \ ../../../include/QtGui/qinputcontext.h \ ../../../src/gui/inputmethod/qinputcontext.h \ ../../../include/QtGui/qinputcontextfactory.h \ ../../../src/gui/inputmethod/qinputcontextfactory.h \ ../../../include/QtGui/qinputcontextplugin.h \ ../../../src/gui/inputmethod/qinputcontextplugin.h \ ../../../include/QtGui/qabstractpagesetupdialog.h \ ../../../src/gui/dialogs/qabstractpagesetupdialog.h \ ../../../include/QtGui/qabstractprintdialog.h \ ../../../src/gui/dialogs/qabstractprintdialog.h \ ../../../include/QtGui/qcolordialog.h \ ../../../src/gui/dialogs/qcolordialog.h \ ../../../include/QtGui/qerrormessage.h \ ../../../src/gui/dialogs/qerrormessage.h \ ../../../include/QtGui/qfilesystemmodel.h \ ../../../src/gui/dialogs/qfilesystemmodel.h \ ../../../include/QtGui/qfontdialog.h \ ../../../src/gui/dialogs/qfontdialog.h \ ../../../include/QtGui/qinputdialog.h \ ../../../src/gui/dialogs/qinputdialog.h \ ../../../include/QtGui/qmessagebox.h \ ../../../src/gui/dialogs/qmessagebox.h \ ../../../include/QtGui/qpagesetupdialog.h \ ../../../src/gui/dialogs/qpagesetupdialog.h \ ../../../include/QtGui/qprintdialog.h \ ../../../src/gui/dialogs/qprintdialog.h \ ../../../include/QtGui/qprintpreviewdialog.h \ ../../../src/gui/dialogs/qprintpreviewdialog.h \ ../../../include/QtGui/qprogressdialog.h \ ../../../src/gui/dialogs/qprogressdialog.h \ ../../../include/QtGui/qwizard.h \ ../../../src/gui/dialogs/qwizard.h \ ../../../include/QtGui/qvfbhdr.h \ ../../../src/gui/embedded/qvfbhdr.h \ ../../../include/QtGui/qwsembedwidget.h \ ../../../src/gui/embedded/qwsembedwidget.h \ main.cpp /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ main.cpp -o .moc/debug-shared/main.moc compiler_rez_source_make_all: compiler_rez_source_clean: compiler_uic_make_all: compiler_uic_clean: compiler_yacc_decl_make_all: compiler_yacc_decl_clean: compiler_yacc_impl_make_all: compiler_yacc_impl_clean: compiler_lex_make_all: compiler_lex_clean: compiler_clean: compiler_rcc_clean compiler_moc_source_clean ####### Compile .obj/debug-shared/main.o: main.cpp ../../../include/QtGui/QtGui \ ../../../include/QtCore/QtCore \ ../../../include/QtCore/qxmlstream.h \ ../../../src/corelib/xml/qxmlstream.h \ ../../../include/QtCore/qiodevice.h \ ../../../src/corelib/io/qiodevice.h \ ../../../include/QtCore/qobject.h \ ../../../src/corelib/kernel/qobject.h \ ../../../include/QtCore/qobjectdefs.h \ ../../../src/corelib/kernel/qobjectdefs.h \ ../../../include/QtCore/qnamespace.h \ ../../../src/corelib/global/qnamespace.h \ ../../../include/QtCore/qglobal.h \ ../../../src/corelib/global/qglobal.h \ ../../../include/QtCore/qconfig.h \ ../../../src/corelib/global/qconfig.h \ ../../../include/QtCore/qfeatures.h \ ../../../src/corelib/global/qfeatures.h \ ../../../include/QtCore/qstring.h \ ../../../src/corelib/tools/qstring.h \ ../../../include/QtCore/qchar.h \ ../../../src/corelib/tools/qchar.h \ ../../../include/QtCore/qbytearray.h \ ../../../src/corelib/tools/qbytearray.h \ ../../../include/QtCore/qatomic.h \ ../../../src/corelib/thread/qatomic.h \ ../../../include/QtCore/qbasicatomic.h \ ../../../src/corelib/thread/qbasicatomic.h \ ../../../include/QtCore/qatomic_bootstrap.h \ ../../../src/corelib/arch/qatomic_bootstrap.h \ ../../../include/QtCore/qatomic_arch.h \ ../../../src/corelib/arch/qatomic_arch.h \ ../../../include/QtCore/qatomic_vxworks.h \ ../../../src/corelib/arch/qatomic_vxworks.h \ ../../../include/QtCore/qatomic_powerpc.h \ ../../../src/corelib/arch/qatomic_powerpc.h \ ../../../include/QtCore/qatomic_alpha.h \ ../../../src/corelib/arch/qatomic_alpha.h \ ../../../include/QtCore/qatomic_arm.h \ ../../../src/corelib/arch/qatomic_arm.h \ ../../../include/QtCore/qatomic_armv6.h \ ../../../src/corelib/arch/qatomic_armv6.h \ ../../../include/QtCore/qatomic_avr32.h \ ../../../src/corelib/arch/qatomic_avr32.h \ ../../../include/QtCore/qatomic_bfin.h \ ../../../src/corelib/arch/qatomic_bfin.h \ ../../../include/QtCore/qatomic_generic.h \ ../../../src/corelib/arch/qatomic_generic.h \ ../../../include/QtCore/qatomic_i386.h \ ../../../src/corelib/arch/qatomic_i386.h \ ../../../include/QtCore/qatomic_ia64.h \ ../../../src/corelib/arch/qatomic_ia64.h \ ../../../include/QtCore/qatomic_macosx.h \ ../../../src/corelib/arch/qatomic_macosx.h \ ../../../include/QtCore/qatomic_x86_64.h \ ../../../src/corelib/arch/qatomic_x86_64.h \ ../../../include/QtCore/qatomic_mips.h \ ../../../src/corelib/arch/qatomic_mips.h \ ../../../include/QtCore/qatomic_parisc.h \ ../../../src/corelib/arch/qatomic_parisc.h \ ../../../include/QtCore/qatomic_s390.h \ ../../../src/corelib/arch/qatomic_s390.h \ ../../../include/QtCore/qatomic_sparc.h \ ../../../src/corelib/arch/qatomic_sparc.h \ ../../../include/QtCore/qatomic_windows.h \ ../../../src/corelib/arch/qatomic_windows.h \ ../../../include/QtCore/qatomic_windowsce.h \ ../../../src/corelib/arch/qatomic_windowsce.h \ ../../../include/QtCore/qatomic_symbian.h \ ../../../src/corelib/arch/qatomic_symbian.h \ ../../../include/QtCore/qatomic_sh.h \ ../../../src/corelib/arch/qatomic_sh.h \ ../../../include/QtCore/qatomic_sh4a.h \ ../../../src/corelib/arch/qatomic_sh4a.h \ ../../../include/Qt3Support/q3cstring.h \ ../../../src/qt3support/tools/q3cstring.h \ ../../../include/QtCore/qstringbuilder.h \ ../../../src/corelib/tools/qstringbuilder.h \ ../../../include/QtCore/qmap.h \ ../../../src/corelib/tools/qmap.h \ ../../../include/QtCore/qiterator.h \ ../../../src/corelib/tools/qiterator.h \ ../../../include/QtCore/qlist.h \ ../../../src/corelib/tools/qlist.h \ ../../../include/QtCore/qalgorithms.h \ ../../../src/corelib/tools/qalgorithms.h \ ../../../include/QtCore/qcoreevent.h \ ../../../src/corelib/kernel/qcoreevent.h \ ../../../include/QtCore/qscopedpointer.h \ ../../../src/corelib/tools/qscopedpointer.h \ ../../../include/QtCore/qvector.h \ ../../../src/corelib/tools/qvector.h \ ../../../include/QtCore/QPointF \ ../../../include/QtCore/qpoint.h \ ../../../src/corelib/tools/qpoint.h \ ../../../include/QtCore/QPoint \ ../../../include/QtCore/qtextcodec.h \ ../../../src/corelib/codecs/qtextcodec.h \ ../../../include/QtCore/qtextcodecplugin.h \ ../../../src/corelib/codecs/qtextcodecplugin.h \ ../../../include/QtCore/qplugin.h \ ../../../src/corelib/plugin/qplugin.h \ ../../../include/QtCore/qpointer.h \ ../../../src/corelib/kernel/qpointer.h \ ../../../include/QtCore/qfactoryinterface.h \ ../../../src/corelib/plugin/qfactoryinterface.h \ ../../../include/QtCore/qstringlist.h \ ../../../src/corelib/tools/qstringlist.h \ ../../../include/QtCore/qdatastream.h \ ../../../src/corelib/io/qdatastream.h \ ../../../include/QtCore/qregexp.h \ ../../../src/corelib/tools/qregexp.h \ ../../../include/QtCore/qstringmatcher.h \ ../../../src/corelib/tools/qstringmatcher.h \ ../../../include/Qt3Support/q3valuelist.h \ ../../../src/qt3support/tools/q3valuelist.h \ ../../../include/QtCore/qlinkedlist.h \ ../../../src/corelib/tools/qlinkedlist.h \ ../../../include/QtCore/qabstracteventdispatcher.h \ ../../../src/corelib/kernel/qabstracteventdispatcher.h \ ../../../include/QtCore/qeventloop.h \ ../../../src/corelib/kernel/qeventloop.h \ ../../../include/QtCore/qabstractitemmodel.h \ ../../../src/corelib/kernel/qabstractitemmodel.h \ ../../../include/QtCore/qvariant.h \ ../../../src/corelib/kernel/qvariant.h \ ../../../include/QtCore/qmetatype.h \ ../../../src/corelib/kernel/qmetatype.h \ ../../../include/QtCore/qhash.h \ ../../../src/corelib/tools/qhash.h \ ../../../include/QtCore/qpair.h \ ../../../src/corelib/tools/qpair.h \ ../../../include/QtCore/qbasictimer.h \ ../../../src/corelib/kernel/qbasictimer.h \ ../../../include/QtCore/qcoreapplication.h \ ../../../src/corelib/kernel/qcoreapplication.h \ ../../../include/QtCore/qmath.h \ ../../../src/corelib/kernel/qmath.h \ ../../../include/QtCore/qmetaobject.h \ ../../../src/corelib/kernel/qmetaobject.h \ ../../../include/QtCore/qmimedata.h \ ../../../src/corelib/kernel/qmimedata.h \ ../../../include/QtCore/qobjectcleanuphandler.h \ ../../../src/corelib/kernel/qobjectcleanuphandler.h \ ../../../include/QtCore/qsharedmemory.h \ ../../../src/corelib/kernel/qsharedmemory.h \ ../../../include/QtCore/qsignalmapper.h \ ../../../src/corelib/kernel/qsignalmapper.h \ ../../../include/QtCore/qsocketnotifier.h \ ../../../src/corelib/kernel/qsocketnotifier.h \ ../../../include/QtCore/qsystemsemaphore.h \ ../../../src/corelib/kernel/qsystemsemaphore.h \ ../../../include/QtCore/qtimer.h \ ../../../src/corelib/kernel/qtimer.h \ ../../../include/QtCore/qtranslator.h \ ../../../src/corelib/kernel/qtranslator.h \ ../../../include/QtCore/qabstractanimation.h \ ../../../src/corelib/animation/qabstractanimation.h \ ../../../include/QtCore/qanimationgroup.h \ ../../../src/corelib/animation/qanimationgroup.h \ ../../../include/QtCore/qparallelanimationgroup.h \ ../../../src/corelib/animation/qparallelanimationgroup.h \ ../../../include/QtCore/qpauseanimation.h \ ../../../src/corelib/animation/qpauseanimation.h \ ../../../include/QtCore/qpropertyanimation.h \ ../../../src/corelib/animation/qpropertyanimation.h \ ../../../include/QtCore/qvariantanimation.h \ ../../../src/corelib/animation/qvariantanimation.h \ ../../../include/QtCore/qeasingcurve.h \ ../../../src/corelib/tools/qeasingcurve.h \ ../../../include/QtCore/qsequentialanimationgroup.h \ ../../../src/corelib/animation/qsequentialanimationgroup.h \ ../../../include/QtCore/qendian.h \ ../../../src/corelib/global/qendian.h \ ../../../include/QtCore/qlibraryinfo.h \ ../../../src/corelib/global/qlibraryinfo.h \ ../../../include/QtCore/QDate \ ../../../include/QtCore/qdatetime.h \ ../../../src/corelib/tools/qdatetime.h \ ../../../include/QtCore/qsharedpointer.h \ ../../../src/corelib/tools/qsharedpointer.h \ ../../../include/QtCore/qshareddata.h \ ../../../src/corelib/tools/qshareddata.h \ ../../../include/QtCore/qsharedpointer_impl.h \ ../../../src/corelib/tools/qsharedpointer_impl.h \ ../../../include/QtCore/qnumeric.h \ ../../../src/corelib/global/qnumeric.h \ ../../../include/QtCore/qmutex.h \ ../../../src/corelib/thread/qmutex.h \ ../../../include/QtCore/qreadwritelock.h \ ../../../src/corelib/thread/qreadwritelock.h \ ../../../include/QtCore/qsemaphore.h \ ../../../src/corelib/thread/qsemaphore.h \ ../../../include/QtCore/qthread.h \ ../../../src/corelib/thread/qthread.h \ ../../../include/QtCore/qthreadstorage.h \ ../../../src/corelib/thread/qthreadstorage.h \ ../../../include/QtCore/qwaitcondition.h \ ../../../src/corelib/thread/qwaitcondition.h \ ../../../include/QtCore/qabstractstate.h \ ../../../src/corelib/statemachine/qabstractstate.h \ ../../../include/QtCore/qabstracttransition.h \ ../../../src/corelib/statemachine/qabstracttransition.h \ ../../../include/QtCore/qeventtransition.h \ ../../../src/corelib/statemachine/qeventtransition.h \ ../../../include/QtCore/qfinalstate.h \ ../../../src/corelib/statemachine/qfinalstate.h \ ../../../include/QtCore/qhistorystate.h \ ../../../src/corelib/statemachine/qhistorystate.h \ ../../../include/QtCore/qsignaltransition.h \ ../../../src/corelib/statemachine/qsignaltransition.h \ ../../../include/QtCore/qstate.h \ ../../../src/corelib/statemachine/qstate.h \ ../../../include/QtCore/qstatemachine.h \ ../../../src/corelib/statemachine/qstatemachine.h \ ../../../include/QtCore/qset.h \ ../../../src/corelib/tools/qset.h \ ../../../include/QtCore/qabstractfileengine.h \ ../../../src/corelib/io/qabstractfileengine.h \ ../../../include/QtCore/qdir.h \ ../../../src/corelib/io/qdir.h \ ../../../include/QtCore/qfileinfo.h \ ../../../src/corelib/io/qfileinfo.h \ ../../../include/QtCore/qfile.h \ ../../../src/corelib/io/qfile.h \ ../../../include/QtCore/qbuffer.h \ ../../../src/corelib/io/qbuffer.h \ ../../../include/QtCore/qdebug.h \ ../../../src/corelib/io/qdebug.h \ ../../../include/QtCore/qtextstream.h \ ../../../src/corelib/io/qtextstream.h \ ../../../include/QtCore/qlocale.h \ ../../../src/corelib/tools/qlocale.h \ ../../../include/QtCore/qcontiguouscache.h \ ../../../src/corelib/tools/qcontiguouscache.h \ ../../../include/QtCore/qdiriterator.h \ ../../../src/corelib/io/qdiriterator.h \ ../../../include/QtCore/qfilesystemwatcher.h \ ../../../src/corelib/io/qfilesystemwatcher.h \ ../../../include/QtCore/qfsfileengine.h \ ../../../src/corelib/io/qfsfileengine.h \ ../../../include/QtCore/qprocess.h \ ../../../src/corelib/io/qprocess.h \ ../../../include/QtCore/qresource.h \ ../../../src/corelib/io/qresource.h \ ../../../include/QtCore/qsettings.h \ ../../../src/corelib/io/qsettings.h \ ../../../include/QtCore/qtemporaryfile.h \ ../../../src/corelib/io/qtemporaryfile.h \ ../../../include/QtCore/qurl.h \ ../../../src/corelib/io/qurl.h \ ../../../include/QtCore/qfuture.h \ ../../../src/corelib/concurrent/qfuture.h \ ../../../include/QtCore/qfutureinterface.h \ ../../../src/corelib/concurrent/qfutureinterface.h \ ../../../include/QtCore/qrunnable.h \ ../../../src/corelib/concurrent/qrunnable.h \ ../../../include/QtCore/qtconcurrentexception.h \ ../../../src/corelib/concurrent/qtconcurrentexception.h \ ../../../include/QtCore/qtconcurrentresultstore.h \ ../../../src/corelib/concurrent/qtconcurrentresultstore.h \ ../../../include/QtCore/qtconcurrentcompilertest.h \ ../../../src/corelib/concurrent/qtconcurrentcompilertest.h \ ../../../include/QtCore/qfuturesynchronizer.h \ ../../../src/corelib/concurrent/qfuturesynchronizer.h \ ../../../include/QtCore/qfuturewatcher.h \ ../../../src/corelib/concurrent/qfuturewatcher.h \ ../../../include/QtCore/qtconcurrentfilter.h \ ../../../src/corelib/concurrent/qtconcurrentfilter.h \ ../../../include/QtCore/qtconcurrentfilterkernel.h \ ../../../src/corelib/concurrent/qtconcurrentfilterkernel.h \ ../../../include/QtCore/qtconcurrentiteratekernel.h \ ../../../src/corelib/concurrent/qtconcurrentiteratekernel.h \ ../../../include/QtCore/qtconcurrentmedian.h \ ../../../src/corelib/concurrent/qtconcurrentmedian.h \ ../../../include/QtCore/qtconcurrentthreadengine.h \ ../../../src/corelib/concurrent/qtconcurrentthreadengine.h \ ../../../include/QtCore/qthreadpool.h \ ../../../src/corelib/concurrent/qthreadpool.h \ ../../../include/QtCore/qtconcurrentmapkernel.h \ ../../../src/corelib/concurrent/qtconcurrentmapkernel.h \ ../../../include/QtCore/qtconcurrentreducekernel.h \ ../../../src/corelib/concurrent/qtconcurrentreducekernel.h \ ../../../include/QtCore/qtconcurrentfunctionwrappers.h \ ../../../src/corelib/concurrent/qtconcurrentfunctionwrappers.h \ ../../../include/QtCore/qtconcurrentmap.h \ ../../../src/corelib/concurrent/qtconcurrentmap.h \ ../../../include/QtCore/qtconcurrentrun.h \ ../../../src/corelib/concurrent/qtconcurrentrun.h \ ../../../include/QtCore/qtconcurrentrunbase.h \ ../../../src/corelib/concurrent/qtconcurrentrunbase.h \ ../../../include/QtCore/qtconcurrentstoredfunctioncall.h \ ../../../src/corelib/concurrent/qtconcurrentstoredfunctioncall.h \ ../../../include/QtCore/qlibrary.h \ ../../../src/corelib/plugin/qlibrary.h \ ../../../include/QtCore/qpluginloader.h \ ../../../src/corelib/plugin/qpluginloader.h \ ../../../include/QtCore/quuid.h \ ../../../src/corelib/plugin/quuid.h \ ../../../include/QtCore/qbitarray.h \ ../../../src/corelib/tools/qbitarray.h \ ../../../include/QtCore/qbytearraymatcher.h \ ../../../src/corelib/tools/qbytearraymatcher.h \ ../../../include/QtCore/qcache.h \ ../../../src/corelib/tools/qcache.h \ ../../../include/QtCore/qcontainerfwd.h \ ../../../src/corelib/tools/qcontainerfwd.h \ ../../../include/QtCore/qcryptographichash.h \ ../../../src/corelib/tools/qcryptographichash.h \ ../../../include/QtCore/qelapsedtimer.h \ ../../../src/corelib/tools/qelapsedtimer.h \ ../../../include/QtCore/qline.h \ ../../../src/corelib/tools/qline.h \ ../../../include/QtCore/qmargins.h \ ../../../src/corelib/tools/qmargins.h \ ../../../include/QtCore/qqueue.h \ ../../../src/corelib/tools/qqueue.h \ ../../../include/QtCore/qrect.h \ ../../../src/corelib/tools/qrect.h \ ../../../include/QtCore/qsize.h \ ../../../src/corelib/tools/qsize.h \ ../../../include/QtCore/qstack.h \ ../../../src/corelib/tools/qstack.h \ ../../../include/QtCore/qtextboundaryfinder.h \ ../../../src/corelib/tools/qtextboundaryfinder.h \ ../../../include/QtCore/qtimeline.h \ ../../../src/corelib/tools/qtimeline.h \ ../../../include/QtCore/qvarlengtharray.h \ ../../../src/corelib/tools/qvarlengtharray.h \ ../../../include/QtGui/qbrush.h \ ../../../src/gui/painting/qbrush.h \ ../../../include/QtGui/qcolor.h \ ../../../src/gui/painting/qcolor.h \ ../../../include/QtGui/qrgb.h \ ../../../src/gui/painting/qrgb.h \ ../../../include/QtGui/qmatrix.h \ ../../../src/gui/painting/qmatrix.h \ ../../../include/QtGui/qpolygon.h \ ../../../src/gui/painting/qpolygon.h \ ../../../include/QtGui/qregion.h \ ../../../src/gui/painting/qregion.h \ ../../../include/QtGui/qwindowdefs.h \ ../../../src/gui/kernel/qwindowdefs.h \ ../../../include/QtGui/qmacdefines_mac.h \ ../../../src/gui/kernel/qmacdefines_mac.h \ ../../../include/QtGui/qwindowdefs_win.h \ ../../../src/gui/kernel/qwindowdefs_win.h \ ../../../include/QtGui/qwmatrix.h \ ../../../src/gui/painting/qwmatrix.h \ ../../../include/QtGui/qtransform.h \ ../../../src/gui/painting/qtransform.h \ ../../../include/QtGui/qpainterpath.h \ ../../../src/gui/painting/qpainterpath.h \ ../../../include/QtGui/qimage.h \ ../../../src/gui/image/qimage.h \ ../../../include/QtGui/qpaintdevice.h \ ../../../src/gui/painting/qpaintdevice.h \ ../../../include/QtGui/qpixmap.h \ ../../../src/gui/image/qpixmap.h \ ../../../include/QtGui/qcolormap.h \ ../../../src/gui/painting/qcolormap.h \ ../../../include/QtGui/qdrawutil.h \ ../../../src/gui/painting/qdrawutil.h \ ../../../include/QtGui/qpaintengine.h \ ../../../src/gui/painting/qpaintengine.h \ ../../../include/QtGui/qpainter.h \ ../../../src/gui/painting/qpainter.h \ ../../../include/QtGui/qtextoption.h \ ../../../src/gui/text/qtextoption.h \ ../../../include/QtGui/qpen.h \ ../../../src/gui/painting/qpen.h \ ../../../include/QtGui/qfontinfo.h \ ../../../src/gui/text/qfontinfo.h \ ../../../include/QtGui/qfont.h \ ../../../src/gui/text/qfont.h \ ../../../include/QtGui/qfontmetrics.h \ ../../../src/gui/text/qfontmetrics.h \ ../../../include/QtGui/qprintengine.h \ ../../../src/gui/painting/qprintengine.h \ ../../../include/QtGui/qprinter.h \ ../../../src/gui/painting/qprinter.h \ ../../../include/QtGui/qprinterinfo.h \ ../../../src/gui/painting/qprinterinfo.h \ ../../../include/QtGui/QPrinter \ ../../../include/QtCore/QList \ ../../../include/QtGui/qstylepainter.h \ ../../../src/gui/painting/qstylepainter.h \ ../../../include/QtGui/qstyle.h \ ../../../src/gui/styles/qstyle.h \ ../../../include/QtGui/qicon.h \ ../../../src/gui/image/qicon.h \ ../../../include/QtGui/qpalette.h \ ../../../src/gui/kernel/qpalette.h \ ../../../include/QtGui/qsizepolicy.h \ ../../../src/gui/kernel/qsizepolicy.h \ ../../../include/QtGui/qwidget.h \ ../../../src/gui/kernel/qwidget.h \ ../../../include/QtGui/qcursor.h \ ../../../src/gui/kernel/qcursor.h \ ../../../include/QtGui/qkeysequence.h \ ../../../src/gui/kernel/qkeysequence.h \ ../../../include/QtGui/qevent.h \ ../../../src/gui/kernel/qevent.h \ ../../../include/QtGui/qmime.h \ ../../../src/gui/kernel/qmime.h \ ../../../include/QtGui/qdrag.h \ ../../../src/gui/kernel/qdrag.h \ ../../../include/QtGui/qaction.h \ ../../../src/gui/kernel/qaction.h \ ../../../include/QtGui/qactiongroup.h \ ../../../src/gui/kernel/qactiongroup.h \ ../../../include/QtGui/qapplication.h \ ../../../src/gui/kernel/qapplication.h \ ../../../include/QtGui/qdesktopwidget.h \ ../../../src/gui/kernel/qdesktopwidget.h \ ../../../include/QtGui/qtransportauth_qws.h \ ../../../src/gui/embedded/qtransportauth_qws.h \ ../../../include/QtGui/qboxlayout.h \ ../../../src/gui/kernel/qboxlayout.h \ ../../../include/QtGui/qlayout.h \ ../../../src/gui/kernel/qlayout.h \ ../../../include/QtGui/qlayoutitem.h \ ../../../src/gui/kernel/qlayoutitem.h \ ../../../include/QtGui/qgridlayout.h \ ../../../src/gui/kernel/qgridlayout.h \ ../../../include/QtGui/qclipboard.h \ ../../../src/gui/kernel/qclipboard.h \ ../../../include/QtGui/qformlayout.h \ ../../../src/gui/kernel/qformlayout.h \ ../../../include/QtGui/QLayout \ ../../../include/QtGui/qgesture.h \ ../../../src/gui/kernel/qgesture.h \ ../../../include/QtGui/qgesturerecognizer.h \ ../../../src/gui/kernel/qgesturerecognizer.h \ ../../../include/QtGui/qsessionmanager.h \ ../../../src/gui/kernel/qsessionmanager.h \ ../../../include/QtGui/qshortcut.h \ ../../../src/gui/kernel/qshortcut.h \ ../../../include/QtGui/qsound.h \ ../../../src/gui/kernel/qsound.h \ ../../../include/QtGui/qstackedlayout.h \ ../../../src/gui/kernel/qstackedlayout.h \ ../../../include/QtGui/qtooltip.h \ ../../../src/gui/kernel/qtooltip.h \ ../../../include/QtGui/qwhatsthis.h \ ../../../src/gui/kernel/qwhatsthis.h \ ../../../include/QtGui/qwidgetaction.h \ ../../../src/gui/kernel/qwidgetaction.h \ ../../../include/QtGui/qgraphicsanchorlayout.h \ ../../../src/gui/graphicsview/qgraphicsanchorlayout.h \ ../../../include/QtGui/qgraphicsitem.h \ ../../../src/gui/graphicsview/qgraphicsitem.h \ ../../../include/QtGui/qgraphicslayout.h \ ../../../src/gui/graphicsview/qgraphicslayout.h \ ../../../include/QtGui/qgraphicslayoutitem.h \ ../../../src/gui/graphicsview/qgraphicslayoutitem.h \ ../../../include/QtGui/qgraphicsgridlayout.h \ ../../../src/gui/graphicsview/qgraphicsgridlayout.h \ ../../../include/QtGui/qgraphicsitemanimation.h \ ../../../src/gui/graphicsview/qgraphicsitemanimation.h \ ../../../include/QtGui/qgraphicslinearlayout.h \ ../../../src/gui/graphicsview/qgraphicslinearlayout.h \ ../../../include/QtGui/qgraphicsproxywidget.h \ ../../../src/gui/graphicsview/qgraphicsproxywidget.h \ ../../../include/QtGui/qgraphicswidget.h \ ../../../src/gui/graphicsview/qgraphicswidget.h \ ../../../include/QtGui/qgraphicsscene.h \ ../../../src/gui/graphicsview/qgraphicsscene.h \ ../../../include/QtGui/qgraphicssceneevent.h \ ../../../src/gui/graphicsview/qgraphicssceneevent.h \ ../../../include/QtGui/qgraphicstransform.h \ ../../../src/gui/graphicsview/qgraphicstransform.h \ ../../../include/QtCore/QObject \ ../../../include/QtGui/QVector3D \ ../../../include/QtGui/qvector3d.h \ ../../../src/gui/math3d/qvector3d.h \ ../../../include/QtGui/QTransform \ ../../../include/QtGui/QMatrix4x4 \ ../../../include/QtGui/qmatrix4x4.h \ ../../../src/gui/math3d/qmatrix4x4.h \ ../../../include/QtGui/qvector4d.h \ ../../../src/gui/math3d/qvector4d.h \ ../../../include/QtGui/qquaternion.h \ ../../../src/gui/math3d/qquaternion.h \ ../../../include/QtGui/qgenericmatrix.h \ ../../../src/gui/math3d/qgenericmatrix.h \ ../../../include/QtGui/qgraphicsview.h \ ../../../src/gui/graphicsview/qgraphicsview.h \ ../../../include/QtGui/qscrollarea.h \ ../../../src/gui/widgets/qscrollarea.h \ ../../../include/QtGui/qabstractscrollarea.h \ ../../../src/gui/widgets/qabstractscrollarea.h \ ../../../include/QtGui/qframe.h \ ../../../src/gui/widgets/qframe.h \ ../../../include/QtGui/qkeyeventtransition.h \ ../../../src/gui/statemachine/qkeyeventtransition.h \ ../../../include/QtGui/qmouseeventtransition.h \ ../../../src/gui/statemachine/qmouseeventtransition.h \ ../../../include/QtGui/qbitmap.h \ ../../../src/gui/image/qbitmap.h \ ../../../include/QtGui/qiconengine.h \ ../../../src/gui/image/qiconengine.h \ ../../../include/QtGui/qiconengineplugin.h \ ../../../src/gui/image/qiconengineplugin.h \ ../../../include/QtGui/qimageiohandler.h \ ../../../src/gui/image/qimageiohandler.h \ ../../../include/QtGui/qimagereader.h \ ../../../src/gui/image/qimagereader.h \ ../../../include/QtGui/qimagewriter.h \ ../../../src/gui/image/qimagewriter.h \ ../../../include/QtGui/qmovie.h \ ../../../src/gui/image/qmovie.h \ ../../../include/QtGui/qpicture.h \ ../../../src/gui/image/qpicture.h \ ../../../include/QtGui/qpictureformatplugin.h \ ../../../src/gui/image/qpictureformatplugin.h \ ../../../include/QtGui/qpixmapcache.h \ ../../../src/gui/image/qpixmapcache.h \ ../../../include/QtGui/qabstracttextdocumentlayout.h \ ../../../src/gui/text/qabstracttextdocumentlayout.h \ ../../../include/QtGui/qtextlayout.h \ ../../../src/gui/text/qtextlayout.h \ ../../../include/QtGui/qtextformat.h \ ../../../src/gui/text/qtextformat.h \ ../../../include/QtGui/qtextdocument.h \ ../../../src/gui/text/qtextdocument.h \ ../../../include/QtGui/qtextcursor.h \ ../../../src/gui/text/qtextcursor.h \ ../../../include/QtGui/qfontdatabase.h \ ../../../src/gui/text/qfontdatabase.h \ ../../../include/QtGui/qstatictext.h \ ../../../src/gui/text/qstatictext.h \ ../../../include/QtGui/qsyntaxhighlighter.h \ ../../../src/gui/text/qsyntaxhighlighter.h \ ../../../include/QtGui/qtextobject.h \ ../../../src/gui/text/qtextobject.h \ ../../../include/QtGui/qtextdocumentfragment.h \ ../../../src/gui/text/qtextdocumentfragment.h \ ../../../include/QtGui/qtextdocumentwriter.h \ ../../../src/gui/text/qtextdocumentwriter.h \ ../../../include/QtGui/qtextlist.h \ ../../../src/gui/text/qtextlist.h \ ../../../include/QtGui/qtexttable.h \ ../../../src/gui/text/qtexttable.h \ ../../../include/QtGui/qvector2d.h \ ../../../src/gui/math3d/qvector2d.h \ ../../../include/QtGui/qabstractbutton.h \ ../../../src/gui/widgets/qabstractbutton.h \ ../../../include/QtGui/qabstractslider.h \ ../../../src/gui/widgets/qabstractslider.h \ ../../../include/QtGui/qabstractspinbox.h \ ../../../src/gui/widgets/qabstractspinbox.h \ ../../../include/QtGui/qvalidator.h \ ../../../src/gui/widgets/qvalidator.h \ ../../../include/QtGui/qbuttongroup.h \ ../../../src/gui/widgets/qbuttongroup.h \ ../../../include/QtGui/qcalendarwidget.h \ ../../../src/gui/widgets/qcalendarwidget.h \ ../../../include/QtGui/qcheckbox.h \ ../../../src/gui/widgets/qcheckbox.h \ ../../../include/QtGui/qcombobox.h \ ../../../src/gui/widgets/qcombobox.h \ ../../../include/QtGui/qabstractitemdelegate.h \ ../../../src/gui/itemviews/qabstractitemdelegate.h \ ../../../include/QtGui/qstyleoption.h \ ../../../src/gui/styles/qstyleoption.h \ ../../../include/QtGui/qslider.h \ ../../../src/gui/widgets/qslider.h \ ../../../include/QtGui/qtabbar.h \ ../../../src/gui/widgets/qtabbar.h \ ../../../include/QtGui/qtabwidget.h \ ../../../src/gui/widgets/qtabwidget.h \ ../../../include/QtGui/qrubberband.h \ ../../../src/gui/widgets/qrubberband.h \ ../../../include/QtGui/qcommandlinkbutton.h \ ../../../src/gui/widgets/qcommandlinkbutton.h \ ../../../include/QtGui/qpushbutton.h \ ../../../src/gui/widgets/qpushbutton.h \ ../../../include/QtGui/qdatetimeedit.h \ ../../../src/gui/widgets/qdatetimeedit.h \ ../../../include/QtGui/qdial.h \ ../../../src/gui/widgets/qdial.h \ ../../../include/QtGui/qdialogbuttonbox.h \ ../../../src/gui/widgets/qdialogbuttonbox.h \ ../../../include/QtGui/qdockwidget.h \ ../../../src/gui/widgets/qdockwidget.h \ ../../../include/QtGui/qfocusframe.h \ ../../../src/gui/widgets/qfocusframe.h \ ../../../include/QtGui/qfontcombobox.h \ ../../../src/gui/widgets/qfontcombobox.h \ ../../../include/QtGui/qgroupbox.h \ ../../../src/gui/widgets/qgroupbox.h \ ../../../include/QtGui/qlabel.h \ ../../../src/gui/widgets/qlabel.h \ ../../../include/QtGui/qlcdnumber.h \ ../../../src/gui/widgets/qlcdnumber.h \ ../../../include/QtGui/qlineedit.h \ ../../../src/gui/widgets/qlineedit.h \ ../../../include/QtGui/qmainwindow.h \ ../../../src/gui/widgets/qmainwindow.h \ ../../../include/QtGui/qmdiarea.h \ ../../../src/gui/widgets/qmdiarea.h \ ../../../include/QtGui/qmdisubwindow.h \ ../../../src/gui/widgets/qmdisubwindow.h \ ../../../include/QtGui/qmenu.h \ ../../../src/gui/widgets/qmenu.h \ ../../../include/QtGui/qmenubar.h \ ../../../src/gui/widgets/qmenubar.h \ ../../../include/QtGui/qmenudata.h \ ../../../src/gui/widgets/qmenudata.h \ ../../../include/QtGui/qplaintextedit.h \ ../../../src/gui/widgets/qplaintextedit.h \ ../../../include/QtGui/qtextedit.h \ ../../../src/gui/widgets/qtextedit.h \ ../../../include/QtGui/qprintpreviewwidget.h \ ../../../src/gui/widgets/qprintpreviewwidget.h \ ../../../include/QtGui/qprogressbar.h \ ../../../src/gui/widgets/qprogressbar.h \ ../../../include/QtGui/qradiobutton.h \ ../../../src/gui/widgets/qradiobutton.h \ ../../../include/QtGui/qscrollbar.h \ ../../../src/gui/widgets/qscrollbar.h \ ../../../include/QtGui/qsizegrip.h \ ../../../src/gui/widgets/qsizegrip.h \ ../../../include/QtGui/qspinbox.h \ ../../../src/gui/widgets/qspinbox.h \ ../../../include/QtGui/qsplashscreen.h \ ../../../src/gui/widgets/qsplashscreen.h \ ../../../include/QtGui/qsplitter.h \ ../../../src/gui/widgets/qsplitter.h \ ../../../include/QtGui/qstackedwidget.h \ ../../../src/gui/widgets/qstackedwidget.h \ ../../../include/QtGui/qstatusbar.h \ ../../../src/gui/widgets/qstatusbar.h \ ../../../include/QtGui/qtextbrowser.h \ ../../../src/gui/widgets/qtextbrowser.h \ ../../../include/QtGui/qtoolbar.h \ ../../../src/gui/widgets/qtoolbar.h \ ../../../include/QtGui/qtoolbox.h \ ../../../src/gui/widgets/qtoolbox.h \ ../../../include/QtGui/qtoolbutton.h \ ../../../src/gui/widgets/qtoolbutton.h \ ../../../include/QtGui/qworkspace.h \ ../../../src/gui/widgets/qworkspace.h \ ../../../include/QtGui/qaccessible.h \ ../../../src/gui/accessible/qaccessible.h \ ../../../include/QtGui/qaccessible2.h \ ../../../src/gui/accessible/qaccessible2.h \ ../../../include/QtGui/qaccessiblebridge.h \ ../../../src/gui/accessible/qaccessiblebridge.h \ ../../../include/QtGui/qaccessibleobject.h \ ../../../src/gui/accessible/qaccessibleobject.h \ ../../../include/QtGui/qaccessibleplugin.h \ ../../../src/gui/accessible/qaccessibleplugin.h \ ../../../include/QtGui/qaccessiblewidget.h \ ../../../src/gui/accessible/qaccessiblewidget.h \ ../../../include/QtGui/qsymbianevent.h \ ../../../src/gui/symbian/qsymbianevent.h \ ../../../include/QtGui/qcompleter.h \ ../../../src/gui/util/qcompleter.h \ ../../../include/QtGui/qdesktopservices.h \ ../../../src/gui/util/qdesktopservices.h \ ../../../include/QtGui/qsystemtrayicon.h \ ../../../src/gui/util/qsystemtrayicon.h \ ../../../include/QtGui/qundogroup.h \ ../../../src/gui/util/qundogroup.h \ ../../../include/QtGui/qundostack.h \ ../../../src/gui/util/qundostack.h \ ../../../include/QtGui/qundoview.h \ ../../../src/gui/util/qundoview.h \ ../../../include/QtGui/qlistview.h \ ../../../src/gui/itemviews/qlistview.h \ ../../../include/QtGui/qabstractitemview.h \ ../../../src/gui/itemviews/qabstractitemview.h \ ../../../include/QtGui/qitemselectionmodel.h \ ../../../src/gui/itemviews/qitemselectionmodel.h \ ../../../include/QtGui/qcdestyle.h \ ../../../src/gui/styles/qcdestyle.h \ ../../../include/QtGui/qmotifstyle.h \ ../../../src/gui/styles/qmotifstyle.h \ ../../../include/QtGui/qcommonstyle.h \ ../../../src/gui/styles/qcommonstyle.h \ ../../../include/QtGui/qcleanlooksstyle.h \ ../../../src/gui/styles/qcleanlooksstyle.h \ ../../../include/QtGui/qwindowsstyle.h \ ../../../src/gui/styles/qwindowsstyle.h \ ../../../include/QtGui/qgtkstyle.h \ ../../../src/gui/styles/qgtkstyle.h \ ../../../include/QtGui/QCleanlooksStyle \ ../../../include/QtGui/QPalette \ ../../../include/QtGui/QFont \ ../../../include/QtGui/QFileDialog \ ../../../include/QtGui/qfiledialog.h \ ../../../src/gui/dialogs/qfiledialog.h \ ../../../include/QtGui/qdialog.h \ ../../../src/gui/dialogs/qdialog.h \ ../../../include/QtGui/qplastiquestyle.h \ ../../../src/gui/styles/qplastiquestyle.h \ ../../../include/QtGui/qproxystyle.h \ ../../../src/gui/styles/qproxystyle.h \ ../../../include/QtGui/QCommonStyle \ ../../../include/QtGui/qs60style.h \ ../../../src/gui/styles/qs60style.h \ ../../../include/QtGui/qstylefactory.h \ ../../../src/gui/styles/qstylefactory.h \ ../../../include/QtGui/qstyleplugin.h \ ../../../src/gui/styles/qstyleplugin.h \ ../../../include/QtGui/qwindowscestyle.h \ ../../../src/gui/styles/qwindowscestyle.h \ ../../../include/QtGui/qwindowsmobilestyle.h \ ../../../src/gui/styles/qwindowsmobilestyle.h \ ../../../include/QtGui/qwindowsvistastyle.h \ ../../../src/gui/styles/qwindowsvistastyle.h \ ../../../include/QtGui/qwindowsxpstyle.h \ ../../../src/gui/styles/qwindowsxpstyle.h \ ../../../include/QtGui/qabstractproxymodel.h \ ../../../src/gui/itemviews/qabstractproxymodel.h \ ../../../include/QtGui/qcolumnview.h \ ../../../src/gui/itemviews/qcolumnview.h \ ../../../include/QtGui/qdatawidgetmapper.h \ ../../../src/gui/itemviews/qdatawidgetmapper.h \ ../../../include/QtGui/qdirmodel.h \ ../../../src/gui/itemviews/qdirmodel.h \ ../../../include/QtGui/qfileiconprovider.h \ ../../../src/gui/itemviews/qfileiconprovider.h \ ../../../include/QtGui/qheaderview.h \ ../../../src/gui/itemviews/qheaderview.h \ ../../../include/QtGui/qitemdelegate.h \ ../../../src/gui/itemviews/qitemdelegate.h \ ../../../include/QtGui/qitemeditorfactory.h \ ../../../src/gui/itemviews/qitemeditorfactory.h \ ../../../include/QtGui/qlistwidget.h \ ../../../src/gui/itemviews/qlistwidget.h \ ../../../include/QtGui/qproxymodel.h \ ../../../src/gui/itemviews/qproxymodel.h \ ../../../include/QtGui/qsortfilterproxymodel.h \ ../../../src/gui/itemviews/qsortfilterproxymodel.h \ ../../../include/QtGui/qstandarditemmodel.h \ ../../../src/gui/itemviews/qstandarditemmodel.h \ ../../../include/QtGui/qstringlistmodel.h \ ../../../src/gui/itemviews/qstringlistmodel.h \ ../../../include/QtGui/qstyleditemdelegate.h \ ../../../src/gui/itemviews/qstyleditemdelegate.h \ ../../../include/QtGui/qtableview.h \ ../../../src/gui/itemviews/qtableview.h \ ../../../include/QtGui/qtablewidget.h \ ../../../src/gui/itemviews/qtablewidget.h \ ../../../include/QtGui/qtreeview.h \ ../../../src/gui/itemviews/qtreeview.h \ ../../../include/QtGui/qtreewidget.h \ ../../../src/gui/itemviews/qtreewidget.h \ ../../../include/QtGui/qtreewidgetitemiterator.h \ ../../../src/gui/itemviews/qtreewidgetitemiterator.h \ ../../../include/QtGui/qgraphicseffect.h \ ../../../src/gui/effects/qgraphicseffect.h \ ../../../include/QtGui/qs60mainapplication.h \ ../../../src/gui/s60framework/qs60mainapplication.h \ ../../../include/QtGui/qs60mainappui.h \ ../../../src/gui/s60framework/qs60mainappui.h \ ../../../include/QtGui/qs60maindocument.h \ ../../../src/gui/s60framework/qs60maindocument.h \ ../../../include/QtGui/qinputcontext.h \ ../../../src/gui/inputmethod/qinputcontext.h \ ../../../include/QtGui/qinputcontextfactory.h \ ../../../src/gui/inputmethod/qinputcontextfactory.h \ ../../../include/QtGui/qinputcontextplugin.h \ ../../../src/gui/inputmethod/qinputcontextplugin.h \ ../../../include/QtGui/qabstractpagesetupdialog.h \ ../../../src/gui/dialogs/qabstractpagesetupdialog.h \ ../../../include/QtGui/qabstractprintdialog.h \ ../../../src/gui/dialogs/qabstractprintdialog.h \ ../../../include/QtGui/qcolordialog.h \ ../../../src/gui/dialogs/qcolordialog.h \ ../../../include/QtGui/qerrormessage.h \ ../../../src/gui/dialogs/qerrormessage.h \ ../../../include/QtGui/qfilesystemmodel.h \ ../../../src/gui/dialogs/qfilesystemmodel.h \ ../../../include/QtGui/qfontdialog.h \ ../../../src/gui/dialogs/qfontdialog.h \ ../../../include/QtGui/qinputdialog.h \ ../../../src/gui/dialogs/qinputdialog.h \ ../../../include/QtGui/qmessagebox.h \ ../../../src/gui/dialogs/qmessagebox.h \ ../../../include/QtGui/qpagesetupdialog.h \ ../../../src/gui/dialogs/qpagesetupdialog.h \ ../../../include/QtGui/qprintdialog.h \ ../../../src/gui/dialogs/qprintdialog.h \ ../../../include/QtGui/qprintpreviewdialog.h \ ../../../src/gui/dialogs/qprintpreviewdialog.h \ ../../../include/QtGui/qprogressdialog.h \ ../../../src/gui/dialogs/qprogressdialog.h \ ../../../include/QtGui/qwizard.h \ ../../../src/gui/dialogs/qwizard.h \ ../../../include/QtGui/qvfbhdr.h \ ../../../src/gui/embedded/qvfbhdr.h \ ../../../include/QtGui/qwsembedwidget.h \ ../../../src/gui/embedded/qwsembedwidget.h \ .moc/debug-shared/main.moc $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/debug-shared/main.o main.cpp .obj/debug-shared/qrc_animatedtiles.o: .rcc/debug-shared/qrc_animatedtiles.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/debug-shared/qrc_animatedtiles.o .rcc/debug-shared/qrc_animatedtiles.cpp ####### Install install_target: all FORCE @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ $(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.app" -$(INSTALL_DIR) "animatedtiles.app" "$(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.app" uninstall_target: FORCE -$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.app" -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ install_sources: all FORCE @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ -$(INSTALL_FILE) /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/examples/animation/animatedtiles/main.cpp $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ -$(INSTALL_FILE) /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/examples/animation/animatedtiles/animatedtiles.qrc $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ -$(INSTALL_FILE) /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/examples/animation/animatedtiles/animatedtiles.pro $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ -$(INSTALL_DIR) /Users/ssangkong/NVRAM_KWU/qt-everywhere-opensource-src-4.7.4/examples/animation/animatedtiles/images $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ uninstall_sources: FORCE -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/main.cpp -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.qrc -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.pro -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/images -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ install: install_target install_sources FORCE uninstall: uninstall_target uninstall_sources FORCE FORCE:
Java
package repack.org.bouncycastle.crypto.agreement; import repack.org.bouncycastle.crypto.BasicAgreement; import repack.org.bouncycastle.crypto.CipherParameters; import repack.org.bouncycastle.crypto.params.ECDomainParameters; import repack.org.bouncycastle.crypto.params.ECPrivateKeyParameters; import repack.org.bouncycastle.crypto.params.ECPublicKeyParameters; import repack.org.bouncycastle.crypto.params.MQVPrivateParameters; import repack.org.bouncycastle.crypto.params.MQVPublicParameters; import repack.org.bouncycastle.math.ec.ECAlgorithms; import repack.org.bouncycastle.math.ec.ECConstants; import repack.org.bouncycastle.math.ec.ECPoint; import java.math.BigInteger; public class ECMQVBasicAgreement implements BasicAgreement { MQVPrivateParameters privParams; public void init( CipherParameters key) { this.privParams = (MQVPrivateParameters) key; } public BigInteger calculateAgreement(CipherParameters pubKey) { MQVPublicParameters pubParams = (MQVPublicParameters) pubKey; ECPrivateKeyParameters staticPrivateKey = privParams.getStaticPrivateKey(); ECPoint agreement = calculateMqvAgreement(staticPrivateKey.getParameters(), staticPrivateKey, privParams.getEphemeralPrivateKey(), privParams.getEphemeralPublicKey(), pubParams.getStaticPublicKey(), pubParams.getEphemeralPublicKey()); return agreement.getX().toBigInteger(); } // The ECMQV Primitive as described in SEC-1, 3.4 private ECPoint calculateMqvAgreement( ECDomainParameters parameters, ECPrivateKeyParameters d1U, ECPrivateKeyParameters d2U, ECPublicKeyParameters Q2U, ECPublicKeyParameters Q1V, ECPublicKeyParameters Q2V) { BigInteger n = parameters.getN(); int e = (n.bitLength() + 1) / 2; BigInteger powE = ECConstants.ONE.shiftLeft(e); // The Q2U public key is optional ECPoint q; if(Q2U == null) { q = parameters.getG().multiply(d2U.getD()); } else { q = Q2U.getQ(); } BigInteger x = q.getX().toBigInteger(); BigInteger xBar = x.mod(powE); BigInteger Q2UBar = xBar.setBit(e); BigInteger s = d1U.getD().multiply(Q2UBar).mod(n).add(d2U.getD()).mod(n); BigInteger xPrime = Q2V.getQ().getX().toBigInteger(); BigInteger xPrimeBar = xPrime.mod(powE); BigInteger Q2VBar = xPrimeBar.setBit(e); BigInteger hs = parameters.getH().multiply(s).mod(n); // ECPoint p = Q1V.getQ().multiply(Q2VBar).add(Q2V.getQ()).multiply(hs); ECPoint p = ECAlgorithms.sumOfTwoMultiplies( Q1V.getQ(), Q2VBar.multiply(hs).mod(n), Q2V.getQ(), hs); if(p.isInfinity()) { throw new IllegalStateException("Infinity is not a valid agreement value for MQV"); } return p; } }
Java
/** * Copyright (C) 2015 Łukasz Tomczak <lksztmczk@gmail.com>. * * This file is part of OpenInTerminal plugin. * * OpenInTerminal plugin 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. * * OpenInTerminal plugin 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 OpenInTerminal plugin. If not, see <http://www.gnu.org/licenses/>. */ package settings; /** * @author Łukasz Tomczak <lksztmczk@gmail.com> */ public class OpenInTerminalSettingsState { private String terminalCommand; private String terminalCommandOptions; public OpenInTerminalSettingsState() { } public OpenInTerminalSettingsState(String terminalCommand, String terminalCommandOptions) { this.terminalCommand = terminalCommand; this.terminalCommandOptions = terminalCommandOptions; } public String getTerminalCommand() { return terminalCommand; } public void setTerminalCommand(String terminalCommand) { this.terminalCommand = terminalCommand; } public String getTerminalCommandOptions() { return terminalCommandOptions; } public void setTerminalCommandOptions(String terminalCommandOptions) { this.terminalCommandOptions = terminalCommandOptions; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OpenInTerminalSettingsState that = (OpenInTerminalSettingsState) o; if (!terminalCommand.equals(that.terminalCommand)) return false; return terminalCommandOptions.equals(that.terminalCommandOptions); } @Override public int hashCode() { int result = terminalCommand.hashCode(); result = 31 * result + terminalCommandOptions.hashCode(); return result; } }
Java
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * gmpy_mpz_prp.h * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Python interface to the GMP or MPIR, MPFR, and MPC multiple precision * * libraries. * * * * Copyright 2012 - 2022 Case Van Horsen * * * * This file is part of GMPY2. * * * * GMPY2 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. * * * * GMPY2 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 GMPY2; if not, see <http://www.gnu.org/licenses/> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef GMPY_PRP_H #define GMPY_PRP_H #ifdef __cplusplus extern "C" { #endif static PyObject * GMPY_mpz_is_fermat_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_euler_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_strong_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_fibonacci_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_lucas_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_stronglucas_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_extrastronglucas_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_selfridge_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_strongselfridge_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_bpsw_prp(PyObject *self, PyObject *args); static PyObject * GMPY_mpz_is_strongbpsw_prp(PyObject *self, PyObject *args); #ifdef __cplusplus } #endif #endif
Java
<?php namespace pocketmine\item; class Melon extends Food{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::MELON, $meta, $count, "Melon"); } public function getFoodRestore(){ return 2; } public function getSaturationRestore(){ return 1.2; } }
Java
require 'support/matchers/type'
Java
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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. 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 <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_PUTCONFIGURATIONSETDELIVERYOPTIONSREQUEST_P_H #define QTAWS_PUTCONFIGURATIONSETDELIVERYOPTIONSREQUEST_P_H #include "pinpointemailrequest_p.h" #include "putconfigurationsetdeliveryoptionsrequest.h" namespace QtAws { namespace PinpointEmail { class PutConfigurationSetDeliveryOptionsRequest; class PutConfigurationSetDeliveryOptionsRequestPrivate : public PinpointEmailRequestPrivate { public: PutConfigurationSetDeliveryOptionsRequestPrivate(const PinpointEmailRequest::Action action, PutConfigurationSetDeliveryOptionsRequest * const q); PutConfigurationSetDeliveryOptionsRequestPrivate(const PutConfigurationSetDeliveryOptionsRequestPrivate &other, PutConfigurationSetDeliveryOptionsRequest * const q); private: Q_DECLARE_PUBLIC(PutConfigurationSetDeliveryOptionsRequest) }; } // namespace PinpointEmail } // namespace QtAws #endif
Java
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AlterUsersTable2 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']); }); } }
Java
<h3>Lucky Guess? Or Calculated Risk?</h3> <h4>(λ)</h4> <p>From the example on the previous page, it looks like our game will need at least 3 different kinds of expressions:<code>guess</code>, <code>smaller</code>, and <code>bigger</code>.</p> <p>For the expressions to do what we want, we need to define the functions behind them.</p> <p>Before we do that, let's think about the strategy behind this simple game. The basic steps are: <ul> <li><span>set the upper and lower limits of the player's number</span></li> <li><span>guess a number halfway between the upper and lower limits</span></li> <li><span>lower the upper limit if the player says the number is smaller</span></li> <li><span>raise the lower limit if the player says the number is bigger</span></li> </ul> </p> <p>I'll let you in on a secret: your program won't actually <em>guess</em> the number, it will <em>find</em> it using a simple and effective <font class="red">binary search</font> algorithm.</p> <p>The risk? There isn't one&#8230; seemed like a cool title.</p> <p>Now type: <code class="expr">(define lower 1)</code></p> <aside id="info"> <span><font class="red">binary search</font><br>divides a range of values into halves, and continues to narrow down the field of search until the unknown value is found. It is the classic example of a "divide and conquer" algorithm.</span> </aside>
Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns='http://www.w3.org/1999/xhtml' lang='he' dir='rtl'> <head> <meta http-equiv='Content-Type' content='text/html; charset=windows-1255' /> <meta charset='windows-1255' /> <meta http-equiv='Content-Script-Type' content='text/javascript' /> <meta http-equiv='revisit-after' content='15 days' /> <title>òùå ëîå òùá</title> <link rel='stylesheet' type='text/css' href='../../_script/klli.css' /> <link rel='stylesheet' type='text/css' href='../../tnk1/_themes/klli.css' /> <meta property='og:url' content='https://tora.us.fm/tnk1/messages/prqim_t0125_2.html'/> <meta name='author' content="çâé äåôø" /> <meta name='receiver' content="" /> <meta name='jmQovc' content="tnk1/messages/prqim_t0125_2.html" /> <meta name='tvnit' content="" /> <link rel='canonical' href='https://tora.us.fm/tnk1/messages/prqim_t0125_2.html' /> </head> <!-- PHP Programming by Erel Segal-Halevi --> <body lang='he' dir='rtl' id = 'tnk1_messages_prqim_t0125_2' class='prfym1 '> <div class='pnim'> <script type='text/javascript' src='../../_script/vars.js'></script> <!--NiwutElyon0--> <div class='NiwutElyon'> <div class='NiwutElyon'><a class='link_to_homepage' href='../../tnk1/index.html'>øàùé</a>&gt;<a href='../../tnk1/dmut/index.html'>àéùéí áúð"ê</a>&gt;<a href='../../tnk1/sig/prtdmut.html'>ôøèé ãîåéåú</a>&gt;<a href='../../tnk1/dmut/mjmauyot.html'>îùîòåéåú ùì ùîåú</a>&gt;</div> </div> <!--NiwutElyon1--> <h1 id='h1'>òùå ëîå òùá</h1> <div id='idfields'> <p>÷åã: òùå ëîå òùá áúð"ê</p> <p>ñåâ: ôøèéí1</p> <p>îàú: çâé äåôø</p> <p>àì: </p> </div> <script type='text/javascript'>kotrt()</script> <div id='tokn'> "åéöà äøàùåï àãîåðé ëåìå ëàãøú ùéòø åé÷øàå ùîå òùå" (áøàùéú, ëä', 25).<br />ôéøåù äùí - ëîå òùá. åòùå âí äâãéì ìòùåú áöéãå, àê æäå ëáø ãøù (åáàéåá, îà', 5 - "àéï òì àôø îùìå äòùå ìáìé çú", åáàéåá, î', 19 - "äåà øàùéú ãøëé àì äòùå éâù çøáå", ëùí ùááøàùéú, ëæ', 40 äåà àåîø - "òì çøáê úçéä") <br /> <br /> </div><!--tokn--> <h2 id='tguvot'>úâåáåú</h2> <ul id='ultguvot'> <li></li> </ul><!--end--> <script type='text/javascript'>tguva(); txtit()</script> </div><!--pnim--> </body> </html>
Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns='http://www.w3.org/1999/xhtml' lang='he' dir='rtl'> <head> <meta http-equiv='Content-Type' content='text/html; charset=windows-1255' /> <meta http-equiv='Content-Script-Type' content='text/javascript' /> <meta http-equiv='revisit-after' content='15 days' /> <title>ìçùåá ìôðé ùîãáøéí - ëãé ìà ìäâéã ùèåéåú</title> <link rel='stylesheet' type='text/css' href='../../../_script/klli.css' /> <link rel='stylesheet' type='text/css' href='../../../tnk1/_themes/klli.css' /> <meta property='og:url' content='http://tora.us.fm/tnk1/ktuv/mjly/mj-18-13.html'/> <meta name='author' content="àøàì (äâää: éòì)" /> <meta name='receiver' content="ñâìåú îùìé" /> <meta name='jmQovc' content="tnk1/ktuv/mjly/mj-18-13.html" /> <meta name='tvnit' content="" /> <link rel='canonical' href='http://tora.us.fm/tnk1/ktuv/mjly/mj-18-13.html' /> </head> <!-- PHP Programming by Erel Segal - Rent a Brain http://tora.us.fm/rentabrain --> <body lang='he' dir='rtl' id = 'tnk1_ktuv_mjly_mj_18_13' class='twkn1 '> <div class='pnim'> <script type='text/javascript' src='../../../_script/vars.js'></script> <!--NiwutElyon0--> <div class='NiwutElyon'> <div class='NiwutElyon'><a class='link_to_homepage' href='../../../tnk1/index.html'>øàùé</a>&gt;<a href='../../../tnk1/prqim/ktuv.html'>ëúåáéí</a>&gt;<a href='../../../tnk1/prqim/t28.htm'>îùìé</a>&gt;<a href='../../../tnk1/ktuv/mjly/sgulot.html'>ñâìåú îùìé ìôé ôø÷éí</a>&gt;<a href='../../../tnk1/ktuv/mjly/sgulot18.html'>ñâìåú îùìé éç</a>&gt;</div> <div class='NiwutElyon'><a class='link_to_homepage' href='../../../tnk1/index.html'>øàùé</a>&gt;<a href='../../../tnk1/msr/0.html'>áéï àãí ìðôùå</a>&gt;<a href='../../../tnk1/msr/0hamqa.html'>äòî÷ä</a>&gt;<a href='../../../tnk1/ktuv/mjly/ewil_dibur.html'>àåéìéí åãéáåøéí</a>&gt;</div> <div class='NiwutElyon'><a class='link_to_homepage' href='../../../tnk1/index.html'>øàùé</a>&gt;<a href='../../../tnk1/msr/3.html'>áéï àãí ìçáøå</a>&gt;<a href='../../../tnk1/ktuv/mjly/dibur_wjtiqa.html'>ãéáåøéí</a>&gt;<a href='../../../tnk1/msr/3wikux.html'>åéëåçéí</a>&gt;<a href='../../../tnk1/msr/svlnut_dibur.html'>ñáìðåú áãéáåø</a>&gt;</div> <div class='NiwutElyon'><a class='link_to_homepage' href='../../../tnk1/index.html'>øàùé</a>&gt;<a href='../../../tnk1/msr/0.html'>áéï àãí ìðôùå</a>&gt;<a href='../../../tnk1/msr/0xpzon.html'>îéãú äçéôæåï</a>&gt;</div> </div> <!--NiwutElyon1--> <h1 id='h1'>ìçùåá ìôðé ùîãáøéí - ëãé ìà ìäâéã ùèåéåú</h1> <div id='idfields'> <p>÷åã: áéàåø:îùìé éç13 áúð"ê</p> <p>ñåâ: úåëï1</p> <p>îàú: àøàì (äâää: éòì)</p> <p>àì: ñâìåú îùìé</p> </div> <script type='text/javascript'>kotrt()</script> <div id='tokn'> <p> <a class="psuq" href="/tnk1/prqim/t2818.htm#13">îùìé éç13</a>: "<q class="psuq">îÅùÑÄéá ãÌÈáÈø áÌÀèÆøÆí éÄùÑÀîÈò - àÄåÌÆìÆú äÄéà ìåÉ åëÀìÄîÌÈä</q>"</p> <p>îé ùòåðä <strong>úùåáä</strong> ìôðé <strong>ùùîò</strong> (äáéï) òã äñåó àú äèòðä ùì äöã äùðé - úùåáúå úäéä <strong>àåéìéú</strong> (ùèçéú) åúáéà òìéå áåùä <strong>åëìéîä</strong>.</p> <h2>òöåú</h2> <p>ìôòîéí, áîäìê åéëåç ñåòø, àçã äöããéí îáéï ùäåà èòä, àáì ÷ùä ìå ìäåãåú áèòåú; äåà äâï ëì-ëê áìäè òì òîãúå, ù÷ùä ìå ìäåãåú ùëì ääúìäáåú äæàú äéúä áçéðí. àí éáéò çøèä, äåà òìåì ìáééù àú òöîå. äôúøåï ìáòéä æå äåà ìäéæäø - ìà ìäâéã àú ëì îä ùçåùáéí ááú-àçú: </p> <p> <strong>ãáø</strong> <a href="/tnk1/kma/qjrim1/dbr.html">= ãéáåø</a>; <strong>&#160; éùîò</strong> <a href="/tnk1/kma/hvdlim1/jma_hqjiv.html"> = éáéï</a>;&#160;&#160; åäôñå÷ îìîãðå, ùìôðé ùäàãí <strong>îùéá áãéáåøå</strong>, äåà öøéê <strong>ìùîåò</strong> åìäáéï äéèá àú äùàìä àå äèòðä ùäåà îùéá òìéä. </p> <p> <strong>àéååìú</strong> <a href="/tnk1/kma/qjrim1/ewil.html"> = ùèçéåú</a>; &#160; åäôñå÷ îìîãðå, ùîé ùàéðå çåùá ìôðé ùäåà òåðä - òìåì ìòðåú úùåáä ùèçéú, ùúëìéí àåúå áôðé äùåîòéí. </p> <p>éùðï ëîä ñéáåú ùáâììï àðùéí èåòéí å"îùéáéí ãáø áèøí éùîòå". ðúàø àåúï áäãøâä îä÷ìä àì ä÷ùä: </p> <ul> <li> äñéáä ä÷ìä áéåúø (ëìåîø, äëé ôçåú îæé÷ä) äéà <strong>äøöåï ìäôâéï éãò</strong>: ñéáä æå îàôééðú úìîéãéí áëéúä àå îúîåããéí áçéãåï, ùîøåá äúìäáåúí ìäôâéï àú éãéòåúéäí, <q class="psuq">îùéáéí</q> îééã ìàçø ùäùåàì äúçéì ìùàåì, òåã <q class="psuq">ìôðé ùùîòå</q> àú ñåó äùàìä. ìôòîéí äí èåòéí åòåðéí òì ùàìä ùåðä îæå ùäúëååï äùåàì ìùàåì (<q class="psuq">àéååìú</q>), ãáø ùîòìä çéåëéí òì ôðéäí ùì äúìîéãéí àå äîúîåããéí äàçøéí (<q class="psuq">ëìéîä</q>), áîéåçã àí äçéãåï äåà çéãåï úð"ê...&#160;</li> <li> ñéáä ÷ùä éåúø äéà <strong>äøöåï ìäåëéç òîãä</strong>: ñéáä æå îàôééðú àðùéí ùîòåøáéí áåéëåç ñåòø, áîéåçã òì ø÷ò àéãéàåìåâé, ùîøåá ìäéèåúí ìäåëéç àú öã÷ú òîãúí, äí çåùùéí ùäåéëåç éñúééí ìôðé ùéñôé÷å ìäâéã àú ãòúí, å- <q class="psuq">îùéáéí</q> ìèòðåú ùì äéøéá òåã <q class="psuq">ìôðé ùùîòå åäáéðå</q> àåúï òã äñåó. ìôòîéí äí ìà òåðéí áãéå÷ òì äèòðåú ùì äéøéá àìà òì èòðåú ÷öú ùåðåú, åáëì î÷øä ëàùø òåðéí îäø îãé äúùåáåú äï áøîä ðîåëä (<q class="psuq">àéååìú</q>), å÷ì îàã ìéøéá ìãçåú àåúï (<q class="psuq">ëìéîä</q>).</li> <li> äñéáä ÷ùä éåúø äéà <strong>äæìæåì</strong>: ñéáä æå îàôééðú àðùéí áòìé äù÷ôú-òåìí îâåáùú åáèçåï òöîé øá. ëàùø îéùäå áà åèåòï èòðä ðâã äù÷ôú äòåìí ùìäí, äí áèåçéí ùäí ëáø ùîòå àú äèòðä äæàú, åùëáø éù ìäí úùåáä (ùîöàå áòöîí áòáø, àå ù÷øàå áñôø/áòéúåï). àéï ìäí æîï ìçùåá îçãù - äí ôùåè ùåìôéí úùåáä îåëðä <q class="psuq">åîùéáéí,&#160;</q> <q class="psuq">ìôðé ùùîòå</q> åäáéðå òã äñåó àú äèòðä (åáðéâåã ìñòéó ä÷åãí - äí ìà ôåòìéí îúåê ìäéèåú åñòøú-øâùåú, àìà îúåê áèçåï òöîé îåôøæ). àê áëì èòðä, âí àí äéà ðùîòú îåëøú, éù çéãåù; åëàùø îðñéí "ìçñåê" åìòðåú úùåáåú îåëðåú ìèòðåú çãùåú - äúåöàä äéà úùåáåú ìà ðëåðåú (<q class="psuq">àéååìú</q>), ùâåøîåú ðæ÷ ìäù÷ôú äòåìí ùòìéä îðñéí ìäâï (<q class="psuq">ëìéîä</q>).</li></ul> <p>äîùåúó ìëì äñéáåú äåà - çåñø ñáìðåú. åäîñø - ìä÷ùéá åìçùåá äéèá ìôðé ùòåðéí! áéï àí îãåáø áëéúä àå áåéëåç, áðåùà ìéîåãé àéùé àå àéãéàåìåâé - öøéê ìä÷ùéá äéèá ìãáøé äöã äùðé, ìçùåá òìéäí, ìòëì àåúí, ìùúå÷ ëîä ùðéåú (ìôçåú), åø÷ àçø-ëê ìäùéá. </p> <p>åëê àîøå çæ"ì: "<q class="mfrj">çëí... àéðå ðáäì ìäùéá... åçéìåôéäï áâåìí</q>" <small>(<a href="http://www.mechon-mamre.org/b/h/h49.htm">îùðä àáåú ä å</a>)</small>.</p> <h2>ä÷áìåú</h2> <p>äôñå÷ îîùéê àú äôñå÷ ä÷åãí, äîãáø òì âåáä ìá, ëé äâàåä âåøîú "<q class="mfrj">ìäéåú äàãí ðáäì ìäùéá, ëé ðøàä ìå ùàí éàçø áîòðä ôéå, ééâøò îòøëå åîçæ÷úå, åæä âåøí ùëîä ôòîéí éùéá ãáøéí ùìà ëäìëä, ëãé ìîäø úùåáúå ìùåàì...</q>" <small class="small"> (øî"ã ååàìé)</small>.</p> <div class="advanced"> <h2>"îùéá ãáø" áàéðèøðè </h2> <p>àðé ëåúá áôåøåîéí áàéðèøðè ëáø ùðéí øáåú. ôòîéí øáåú àðé øåàä áôåøåí äåãòä ùàðé îøâéù ùàðé çééá ìäâéá òìéä îééã. áäúçìä áàîú äééúé îâéá îééã, åëîòè úîéã äúçøèúé òì äúâåáä îàåçø éåúø, ëùøàéúé àéê äîâéáéí äáàéí "÷èìå" àåúä. àáì ôòí àçú, äúâåáä ùìé ìà ð÷ìèä áâìì ú÷ìä èëðéú, åðàìöúé áöòø øá ìëúåá àåúä ùåá ìîçøú. ìäôúòúé, äè÷ñè äùðé ùëúáúé äéä ááéøåø äøáä éåúø èåá, ù÷åì åøöéðé îäè÷ñè äøàùåï ùðîç÷ - ñåó-ñåó ôøñîúé úâåáä ùìà äúçøèúé òìéä îàåçø éåúø!</p> <p>åàæ äçìèúé, ùëãàé ìðäåâ áàåúå àåôï âí ëùàéï ú÷ìä èëðéú: ôùåè ìùîåø àú äè÷ñè äøàùåï ùòåìä áãòúé á÷åáõ òì äîçùá ùìé, ìòáåø òìéå ùåá ìàçø ëîä ùòåú ëùääúøâùåú äøàùåðéú ùåëëú, åø÷ àæ ìôøñí. àó ôòí ìà äúçøèúé òì äîúðä îñåâ æä - ëì òéëåá áôøñåí úîéã äéä ìèåáä.&#160;</p> <p>ìëï ùîçúé îàã ëùâéìéúé ùáùéøåú äãåàì ùì gmail ðéúï ìäåñéó äùäéä îúåçëîú ìôðé ùìéçú ãåàì. ðéúï ìá÷ù îäàúø, ùáëì ôòí ùùåìçéí ãåàì áùòåú îñåééîåú, äåà éùàì àú äùåìç çîù ùàìåú ôùåèåú áçùáåï, òì-îðú ìååãà ùäåà òøðé. àí äåà èåòä, äàúø àåîø ìå "àúä ëðøàä òééó, ìê úùúä îéí åúðåç, åúðñä ùåá". ëùæä ÷åøä ìé, àðé ÷åøà ùåá àú ëì ääåãòä, åëîòè úîéã îâìä ùèòéúé âí áäåãòä òöîä... îåîìõ!</p></div> </div><!--tokn--> <h2 id='tguvot'>úâåáåú</h2> <ul id='ultguvot'> </ul><!--end--> <script type='text/javascript'>tguva(); txtit()</script> </div><!--pnim--> </body> </html>
Java