code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
using System; using System.Web; using System.Web.Mvc; using SmartStore.Core; using SmartStore.Core.Domain.Catalog; using SmartStore.Core.Domain.Customers; using SmartStore.Core.Domain.Media; using SmartStore.Core.Html; using SmartStore.Services.Catalog; using SmartStore.Services.Media; using SmartStore.Services.Orders; using SmartStore.Web.Framework.Controllers; namespace SmartStore.Web.Controllers { public partial class DownloadController : PublicControllerBase { private readonly IDownloadService _downloadService; private readonly IProductService _productService; private readonly IOrderService _orderService; private readonly IWorkContext _workContext; private readonly CustomerSettings _customerSettings; public DownloadController( IDownloadService downloadService, IProductService productService, IOrderService orderService, IWorkContext workContext, CustomerSettings customerSettings) { this._downloadService = downloadService; this._productService = productService; this._orderService = orderService; this._workContext = workContext; this._customerSettings = customerSettings; } private ActionResult GetFileContentResultFor(Download download, Product product, byte[] data) { if (data == null || data.LongLength == 0) { NotifyError(T("Common.Download.NoDataAvailable")); return new RedirectResult(Url.Action("Info", "Customer")); } var fileName = (download.Filename.HasValue() ? download.Filename : download.Id.ToString()); var contentType = (download.ContentType.HasValue() ? download.ContentType : "application/octet-stream"); return new FileContentResult(data, contentType) { FileDownloadName = fileName + download.Extension }; } private ActionResult GetFileContentResultFor(Download download, Product product) { return GetFileContentResultFor(download, product, _downloadService.LoadDownloadBinary(download)); } public ActionResult Sample(int productId) { var product = _productService.GetProductById(productId); if (product == null) return HttpNotFound(); if (!product.HasSampleDownload) { NotifyError(T("Common.Download.HasNoSample")); return RedirectToAction("ProductDetails", "Product", new { productId = productId }); } var download = _downloadService.GetDownloadById(product.SampleDownloadId.GetValueOrDefault()); if (download == null) { NotifyError(T("Common.Download.SampleNotAvailable")); return RedirectToAction("ProductDetails", "Product", new { productId = productId }); } if (download.UseDownloadUrl) return new RedirectResult(download.DownloadUrl); return GetFileContentResultFor(download, product); } public ActionResult GetDownload(Guid id, bool agree = false) { if (id == Guid.Empty) return HttpNotFound(); var orderItem = _orderService.GetOrderItemByGuid(id); if (orderItem == null) return HttpNotFound(); var order = orderItem.Order; var product = orderItem.Product; var hasNotification = false; if (!_downloadService.IsDownloadAllowed(orderItem)) { hasNotification = true; NotifyError(T("Common.Download.NotAllowed")); } if (_customerSettings.DownloadableProductsValidateUser) { if (_workContext.CurrentCustomer == null) return new HttpUnauthorizedResult(); if (order.CustomerId != _workContext.CurrentCustomer.Id) { hasNotification = true; NotifyError(T("Account.CustomerOrders.NotYourOrder")); } } var download = _downloadService.GetDownloadById(product.DownloadId); if (download == null) { hasNotification = true; NotifyError(T("Common.Download.NoDataAvailable")); } if (product.HasUserAgreement && !agree) { hasNotification = true; } if (!product.UnlimitedDownloads && orderItem.DownloadCount >= product.MaxNumberOfDownloads) { hasNotification = true; NotifyError(T("Common.Download.MaxNumberReached", product.MaxNumberOfDownloads)); } if (hasNotification) { return RedirectToAction("UserAgreement", "Customer", new { id = id }); } if (download.UseDownloadUrl) { orderItem.DownloadCount++; _orderService.UpdateOrder(order); return new RedirectResult(download.DownloadUrl); } else { var data = _downloadService.LoadDownloadBinary(download); if (data == null || data.LongLength == 0) { NotifyError(T("Common.Download.NoDataAvailable")); return RedirectToAction("UserAgreement", "Customer", new { id = id }); } orderItem.DownloadCount++; _orderService.UpdateOrder(order); return GetFileContentResultFor(download, product, data); } } public ActionResult GetLicense(Guid id) { if (id == Guid.Empty) return HttpNotFound(); var orderItem = _orderService.GetOrderItemByGuid(id); if (orderItem == null) return HttpNotFound(); var order = orderItem.Order; var product = orderItem.Product; if (!_downloadService.IsLicenseDownloadAllowed(orderItem)) { NotifyError(T("Common.Download.NotAllowed")); return RedirectToAction("DownloadableProducts", "Customer"); } if (_customerSettings.DownloadableProductsValidateUser) { if (_workContext.CurrentCustomer == null) return new HttpUnauthorizedResult(); if (order.CustomerId != _workContext.CurrentCustomer.Id) { NotifyError(T("Account.CustomerOrders.NotYourOrder")); return RedirectToAction("DownloadableProducts", "Customer"); } } var download = _downloadService.GetDownloadById(orderItem.LicenseDownloadId.HasValue ? orderItem.LicenseDownloadId.Value : 0); if (download == null) { NotifyError(T("Common.Download.NotAvailable")); return RedirectToAction("DownloadableProducts", "Customer"); } if (download.UseDownloadUrl) return new RedirectResult(download.DownloadUrl); return GetFileContentResultFor(download, product); } public ActionResult GetFileUpload(Guid downloadId) { var download = _downloadService.GetDownloadByGuid(downloadId); if (download == null) { NotifyError(T("Common.Download.NotAvailable")); return RedirectToAction("DownloadableProducts", "Customer"); } if (download.UseDownloadUrl) return new RedirectResult(download.DownloadUrl); return GetFileContentResultFor(download, null); } public ActionResult GetUserAgreement(int productId, bool? asPlainText) { var product = _productService.GetProductById(productId); if (product == null) return Content(T("Products.NotFound", productId)); if (!product.IsDownload || !product.HasUserAgreement || product.UserAgreementText.IsEmpty()) return Content(T("DownloadableProducts.HasNoUserAgreement")); if (asPlainText ?? false) { var agreement = HtmlUtils.ConvertHtmlToPlainText(product.UserAgreementText); agreement = HtmlUtils.StripTags(HttpUtility.HtmlDecode(agreement)); return Content(agreement); } return Content(product.UserAgreementText); } } }
nitware/estore
src/Presentation/SmartStore.Web/Controllers/DownloadController.cs
C#
gpl-3.0
8,284
<? function auth_check_login() { ob_start(); session_start(); if ( $_SESSION["auth_id"] != "BVS@BIREME" ) { ob_end_clean(); header("Location: /admin/index.php?error=TIMEOUT"); exit; } ob_end_clean(); } ?>
SuporteCTRL/suitesaber
htdocs/site/site/admin/auth_check.php
PHP
gpl-3.0
261
/* Copyright © 2014-2015 by The qTox Project Contributors This file is part of qTox, a Qt-based graphical interface for Tox. qTox is libre software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. qTox 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 qTox. If not, see <http://www.gnu.org/licenses/>. */ #ifndef FILETRANSFERWIDGET_H #define FILETRANSFERWIDGET_H #include <QWidget> #include <QTime> #include "src/chatlog/chatlinecontent.h" #include "src/core/corestructs.h" namespace Ui { class FileTransferWidget; } class QVariantAnimation; class QPushButton; class FileTransferWidget : public QWidget { Q_OBJECT public: explicit FileTransferWidget(QWidget* parent, ToxFile file); virtual ~FileTransferWidget(); void autoAcceptTransfer(const QString& path); bool isActive() const; protected slots: void onFileTransferInfo(ToxFile file); void onFileTransferAccepted(ToxFile file); void onFileTransferCancelled(ToxFile file); void onFileTransferPaused(ToxFile file); void onFileTransferResumed(ToxFile file); void onFileTransferFinished(ToxFile file); void fileTransferRemotePausedUnpaused(ToxFile file, bool paused); void fileTransferBrokenUnbroken(ToxFile file, bool broken); protected: QString getHumanReadableSize(qint64 size); void hideWidgets(); void setupButtons(); void handleButton(QPushButton* btn); void showPreview(const QString& filename); void acceptTransfer(const QString& filepath); void setBackgroundColor(const QColor& c, bool whiteFont); void setButtonColor(const QColor& c); bool drawButtonAreaNeeded() const; virtual void paintEvent(QPaintEvent*) final override; private slots: void onTopButtonClicked(); void onBottomButtonClicked(); void onPreviewButtonClicked(); private: static QPixmap scaleCropIntoSquare(const QPixmap &source, int targetSize); private: Ui::FileTransferWidget *ui; ToxFile fileInfo; QTime lastTick; quint64 lastBytesSent = 0; QVariantAnimation* backgroundColorAnimation = nullptr; QVariantAnimation* buttonColorAnimation = nullptr; QColor backgroundColor; QColor buttonColor; static const uint8_t TRANSFER_ROLLING_AVG_COUNT = 4; uint8_t meanIndex = 0; qreal meanData[TRANSFER_ROLLING_AVG_COUNT] = {0.0}; bool active; }; #endif // FILETRANSFERWIDGET_H
apprb/qTox
src/chatlog/content/filetransferwidget.h
C
gpl-3.0
2,830
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Example Mathematical Olympiad: XMO 2014 in Example Host Country Name</title> <link rel="stylesheet" href="https://www.example.org/subdir/xmo.css" type="text/css"> </head> <body> <h1>XMO: XMO 2014 in <a href="/subdir/countries/country1/">Example Host Country Name</a></h1> <table class="xmo-list"> <tr><th>XMO number</th><td>1</td></tr> <tr><th>Year</th><td>2014 (<a href="http://www.example.com/" target="_blank">home page</a>)</td></tr> <tr><th>Country</th><td><a href="/subdir/countries/country1/">Example Host Country Name</a></td></tr> <tr><th>City</th><td>Example Host City Name</td></tr> <tr><th>Start date</th><td>2014-04-01</td></tr> <tr><th>End date</th><td>2014-04-02</td></tr> <tr><th>Contact name</th><td>Example Contact Name</td></tr> <tr><th>Contact email</th><td>info@example.com</td></tr> <tr><th>Participating teams</th><td>3 (<a href="/subdir/xmos/xmo1/countries/">list</a>)</td></tr> <tr><th>Contestants</th><td>5 (<a href="/subdir/xmos/xmo1/scoreboard/">scoreboard</a>, <a href="/subdir/xmos/xmo1/people/">list of participants</a>, <a href="/subdir/xmos/xmo1/people/summary/">table of participants with photos</a>)</td></tr> <tr><th>Number of exams</th><td>2</td></tr> <tr><th>Number of problems</th><td>6 (marked out of: 7+7+7+7+7+7)</td></tr> <tr><th>Gold medals</th><td>2 (scores &ge; 28)</td></tr> <tr><th>Silver medals</th><td>1 (scores &ge; 21)</td></tr> <tr><th>Bronze medals</th><td>1 (scores &ge; 14)</td></tr> <tr><th>Honourable mentions</th><td>1</td></tr> </table> <!-- #include virtual="xmos/xmo1/extra.html" --> <h2>Day 1 papers</h2> <ul> <li><a href="https://www.example.org/subdir/xmos/xmo1/paper-day1-bg-English.pdf">English</a></li> <li><a href="https://www.example.org/subdir/xmos/xmo1/paper-day1-English.pdf">English</a> (without background design)</li> <li><a href="https://www.example.org/subdir/xmos/xmo1/paper-day1-bg-French.pdf">French</a></li> <li><a href="https://www.example.org/subdir/xmos/xmo1/paper-day1-French.pdf">French</a> (without background design)</li> </ul> <h2>Day 2 papers</h2> <ul> <li><a href="https://www.example.org/subdir/xmos/xmo1/paper-day2-bg-English.pdf">English</a></li> <li><a href="https://www.example.org/subdir/xmos/xmo1/paper-day2-English.pdf">English</a> (without background design)</li> <li><a href="https://www.example.org/subdir/xmos/xmo1/paper-day2-bg-French.pdf">French</a> (corrected)</li> <li><a href="https://www.example.org/subdir/xmos/xmo1/paper-day2-French.pdf">French</a> (without background design, corrected)</li> </ul> </body> </html>
jsm28/matholymp-py
test-data/mo-static-generate/subdir/out/xmos/xmo1/index.html
HTML
gpl-3.0
2,618
/*! @file @verbatim $Id: AVIStructures.h 52604 2008-04-23 05:33:29Z jbraness $ Copyright (c) 2007 DivX, Inc. All rights reserved. This software is the confidential and proprietary information of DivX, Inc. and may be used only in accordance with the terms of your license from DivX, Inc. @endverbatim */ #ifndef _AVISTRUCTURES_H_ #define _AVISTRUCTURES_H_ #ifdef __cplusplus extern "C" { #endif #include "DivXInt.h" typedef struct _AviStructureHeader_ { char cId[4]; uint32_t size; char cType[4]; } AVIStructureHeader; typedef AVIStructureHeader RiffHeader; typedef AVIStructureHeader ListHeader; typedef struct __AVIHeader__ { int32_t dwMicroSecPerFrame; /* set to 0 ? */ int32_t dwMaxBytesPerSec; /* maximum transfer rate */ int32_t dwPaddingGranularity; /* pad to multiples of this size, normally 2K */ int32_t dwFlags; int32_t dwTotalFrames; /* number of frames in first RIFF 'AVI ' chunk */ int32_t dwInitialFrames; int32_t dwStreams; int32_t dwSuggestedBufferSize; int32_t dwWidth; int32_t dwHeight; int32_t dwReserved[4]; } AVIHeader; typedef struct _AVIStreamHeader_ { char cId[4]; int32_t size; char ccType[4]; char ccHandler[4]; int32_t dwFlags; /* Contains AVITF_* flags */ int16_t wPriority; int16_t wLanguage; int32_t dwInitialFrames; int32_t dwScale; int32_t dwRate; /* dwRate / dwScale == samples/second */ int32_t dwStart; int32_t dwLength; /* In units above... */ int32_t dwSuggestedBufferSize; int32_t dwQuality; int32_t dwSampleSize; int16_t rcFrame_left; int16_t rcFrame_top; int16_t rcFrame_right; int16_t rcFrame_bottom; } AVIStreamHeader; typedef struct _AviChunkHeader_ { char cId[4]; uint32_t size; } AVIChunkHeader; typedef struct _AVIStreamFormatVideo_ { uint32_t biSize; int32_t biWidth; int32_t biHeight; int16_t biPlanes; int16_t biBitCount; char cCompression[4]; uint32_t biSizeImage; int32_t biXPelsPerMeter; int32_t biYPelsPerMeter; uint32_t biClrUsed; uint32_t biClrImportant; } AVIStreamFormatVideo, AVIStreamFormatSubtitle; typedef struct _AVIStreamFormatAudio_ { int16_t wFormatTag; /* format type */ int16_t nChannels; /* number of channels (i.e. mono, stereo...) */ int32_t nSamplesPerSec; /* sample rate */ int32_t nAvgBytesPerSec; /* for buffer estimation */ int16_t nBlockAlign; /* block size of data */ int16_t wBitsPerSample; /* number of bits per sample of mono data */ int16_t cbSize; /* the count in bytes of the size of extra information (after cbSize) */ #define AVI_STRF_MAX_EXTRA 22 uint8_t extra[AVI_STRF_MAX_EXTRA]; /* any extra information, e.g. mp3 needs this */ } AVIStreamFormatAudio; typedef struct __AVI1IndexEntry__ { char cId[4]; uint32_t dwFlags; uint32_t dwOffset; uint32_t dwSize; } AVI1IndexEntry; typedef struct _AVIStreamInfoDRM_ { int32_t version; uint32_t sizeDRMInfo; uint8_t *drmInfo; /* encrpyted drm info. */ uint64_t drmOffset; } AVIStreamInfoDRM; #define DRM_INFO_CONSTANTSIZE ( sizeof( uint32_t ) + sizeof( int32_t ) ) typedef struct _DivXIdChunkHeader_ { char cId[4]; uint32_t size; uint32_t chunkId; } DivXIdChunkHeader; typedef struct MediaSourceType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t Reserved; uint64_t RiffOffset; } MediaSource; typedef struct MediaTrackType { char FourCC[4]; uint32_t ChunkSize; uint32_t ObjectID; uint32_t MediaSourceID; char TrackID[4]; int32_t StartTime; int32_t EndTime; int32_t LanguageCodeLen; int16_t LanguageCode[2]; int32_t TranslationLookupID; int32_t TypeLen; int16_t Type[20]; } MediaTrack; #define MTConstantSize ( sizeof( MediaTrack ) -\ ( sizeof( int16_t ) *\ 20 ) - ( 2 * sizeof( int32_t ) ) - ( sizeof( int16_t ) * 2 ) ) typedef struct DivxMediaManagerType { char FourCC[4]; uint32_t ChunkSize; uint64_t Offset; char VersionId[3]; uint32_t MenuVersion; int32_t ObjectID; int32_t StartingMenuID; uint32_t DefaultMenuLanguageLen; uint16_t cDefLang[16 ]; } DivxMediaManagerChunkHeader; /* wchar default language string follows */ typedef struct DivxMediaMenuType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t BackgroundVideoID; int32_t BackgroundAudioID; int32_t StartingMenuItemID; int32_t EnterAction; int32_t ExitAction; int32_t MenuTypeLen; uint16_t MenuType[32]; int32_t MenuNameLen; uint16_t MenuName[32]; } DivXMediaMenu; #define DMMConstantSize ( sizeof( DivXMediaMenu ) -\ ( 64 * sizeof( uint16_t ) ) - sizeof( int32_t ) ) typedef struct ButtonMenuType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t OverlayID; int32_t UpAction; int32_t DownAction; int32_t LeftAction; int32_t RightAction; int32_t SelectAction; int32_t ButtonNameLen; int16_t ButtonName[64]; } ButtonMenu; #define BMENConstantSize ( sizeof( ButtonMenu ) - ( 64 * sizeof( uint16_t ) ) ) typedef struct MenuRectangleType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t Left; int32_t Top; int32_t Width; int32_t Height; } MenuRectangle; typedef struct LanguageMenusType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t LanguageCodeLen; int16_t LanguageCode[2]; int32_t StartingMenuID; int32_t RootMenuID; } LanguageMenus; typedef struct TranslationType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t LanguageCodeLen; int16_t LanguageCode[2]; int32_t ValueLen; } TranslationEntry; typedef struct _StreamInfoStruct_ { uint64_t riffOffset; /* uint64_t indexOffset; uint32_t moviOffset; uint32_t headerOffset; */ uint8_t cFourCC[4]; uint8_t typeIndex; uint8_t trackIndex; uint8_t trackType; uint64_t startFrame; uint64_t endFrame; uint64_t startTime; uint64_t endTime; uint32_t lookupId; } StreamInfo; #define VIDEO_TRACK 0 #define AUDIO_TRACK 1 #define SUBTITLE_TRACK 2 typedef struct SubtitleSelectActionType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t TitleID; char TrackID[4]; } SubtitleSelectAction; typedef struct AudioSelectActionType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t TitleID; char TrackID[4]; } AudioSelectAction; typedef struct PlayFromCurrentOffsetType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t TitleID; int32_t MediaObjectID; } PlayFromCurrentOffset; typedef struct MenuTransitionActionType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t MenuID; int32_t ButtonMenuID; } MenuTransitionAction; typedef struct ButtonTransitionActionType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t ButtonMenuID; } ButtonTransitionAction; typedef struct PlayActionType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t TitleID; int32_t MediaObjectID; } PlayAction; typedef struct _MenuInfo_ { int32_t ObjectID; int32_t BackgroundVideoID; int32_t BackgroundAudioID; int32_t StartingMenuItemID; int32_t MenuTypeLen; uint16_t MenuType[32]; int32_t MenuNameLen; uint16_t MenuName[32]; } MenuInfo; typedef struct TitleType { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t TranslationLookupID; int32_t DefaultAudioLen; int16_t DefaultAudioTrack[4]; int32_t DefaultSubtitleLen; int16_t DefaultSubtitleTrack[4]; } TitleInfo; typedef struct _ChapterInfo_ { char FourCC[4]; uint32_t size; int32_t ObjectId; int32_t LookupId; uint64_t startFrame; uint64_t endFrame; uint64_t startTime; uint64_t endTime; } ChapterInfo; typedef struct _ChapterHeader_ { char FourCC[4]; uint32_t size; int32_t ObjectId; int32_t LookupId; } ChapterHeader; typedef struct _ButtonInfo_ { char FourCC[4]; uint32_t ChunkSize; int32_t ObjectID; int32_t OverlayID; int32_t UpAction; int32_t DownAction; int32_t LeftAction; int32_t RightAction; int32_t SelectAction; int32_t ButtonNameLen; int16_t ButtonName[64]; } ButtonInfo; #ifdef __cplusplus } #endif #endif /* _AVISTRUCTURES_H_ */
dr4g0nsr/mplayer-skyviia-8860
mplayer_android/Divx_lib/DivXMediaFormat/src/DMFLayer1/AVI/AVICommon/AVIStructures.h
C
gpl-3.0
9,249
<!DOCTYPE html> <html> <head> <meta charset = "utf-8"> <title>Ghidra Java Coding Standards</title> <style media="screen" type="text/css"> li { margin-left: 90px; font-family:times new roman; font-size:14pt; } h1 { color:#000080; font-family:times new roman; font-size:36pt; font-style:italic; font-weight:bold; text-align:center; } h2 { margin: 10px; margin-top: 40px; color:#984c4c; font-family:times new roman; font-size:18pt; font-weight:bold; } h3 { margin-left: 37px; margin-top: 20px; color:#0000ff; font-family:times new roman; font-size:14pt; font-weight:bold; } h4 { margin-left: 70px; margin-top: 10px; font-family:times new roman; font-size:14pt; font-weight:normal; } h5 { margin-left: 70px; margin-top: 10px; font-family:times new roman; font-size:14pt; font-weight:normal; } h6 { color:#000080; font-family:times new roman; font-size:18pt; font-style:italic; font-weight:bold; text-align:center; } p { margin-left: 90px; font-family:times new roman; font-size:14pt; } body { counter-reset: section; } h2 { counter-reset: topic; } h3 { counter-reset: rule; } h2::before { counter-increment: section; content: counter(section) ": "; } h3::before { counter-increment: topic; content: counter(section) "." counter(topic) " "; } h4::before { counter-increment: rule; content: counter(section) "." counter(topic) "." counter(rule) " "; } div.info { margin-left: 10px; margin-top: 80px; font-family:times new roman; font-size:18pt; font-weight:bold; } </style> </head> <body> <H1> Ghidra's Java Style Guide </H1> <H6> Ver 1.1 - 20190307 </H6> <H2> Introduction </H2> <P> The purpose of this document is to record the Ghidra team's accepted rules for code formatting, naming conventions, code complexity, and other best practices. Many of the rules listed in this document are not universal absolutes and many blur into areas of personal preferences. The purpose of these types of rules is not to definitely state that one way is better than another, but that we are consistent throughout the team.</P> <P> Most of these rules came from one or more of the listed references at the end of this document. Many of these rules were listed in just about every guide. Where they disagreed, We generally went with the majority. Some rules seem arbitrary as to the actual value used, but that a value was needed seemed universal. For example, just about every reference stated a maximum character line length. We think all were either 80 or 100. So everyone seems to think it is important to have some limit, but they don't agree to the actual number.</P> <H3> Most Important Rules of All </H3> <H4> Any of the rules or suggestions in this document can be broken, but you must document why breaking the rule makes the code better. </H4> <H4> Program for people, not machines. The primary goal of your development efforts should be that your code is easy for other people to understand. </H4> <H2> Naming Conventions </H2> <H3> General Naming Rules </H3> <H4> Names for classes, interfaces, methods, parameters, instance variables and long-lived local variables should not contain abbreviations or acronyms except for well known ones (the abbreviation is more commonly used than the full name) like URL and HTML. </H4> <P> The following exceptions are allowed (The list can be expanded with majority approval) </P> <UL> <LI> Utils - can be used as a suffix for the name of a class of static utility methods (e.g., StringUtils) </LI> </UL> <H4> If an abbreviation or acronym is used, only the first letter should be capitalized. (Unless it is the beginning of a method or variable name, in which case the first letter is also lower case.) </H4> <P> For example, use fooUrl, not fooURL. </P> <H3> Package Naming </H3> <H4> Package names should start with ghidra.&lt;module group&gt;.&lt;module name&gt;. (e.g., ghidra.framework.docking.)</H4> <H4> Package names should be all lower case, preferably one word and no abbreviations. </H4> <H3> Class Naming </H3> <H4> Class names should be nouns.</H4> <H4> Class names should use upper CamelCase where the first letter of each word is capitalized.</H4> <P> Examples: Table, FoldingTable, WoodTable </P> <H4> Classes that extend other classes should use the base class name as a base and prepend it with what is more specific about the extended class. </H4> <P>For example, if the base class is "Truck", the subclasses would have names like "DumpTruck", "DeliveryTruck", or "FlyingTruck". </P> <H4> The design pattern of an interface with one or more implementations should use the following naming conventions:</H4> <UL> <LI> Foo - The interface should be named the fundamental thing. </LI> <LI> AbstractFoo - An abstract implementation intended to be used as the base of a hierarchy of classes. </LI> <LI> DefaultFoo - A "default" implementation that would be appropriate for the majority of use cases. </LI> <LI> {descriptive}Foo - Other implementations should describe what makes them unique. </LI> </UL> <H4> Test class names should end with "Test" (e.g., FooTest).</H4> <H4> Test doubles or stub objects should use the following naming rules: </H4> <UL> <LI> DummyFoo - a stub that returns empty or null values because they are irrelevant to the test. </LI> <LI> SpyFoo - may provide values to the environment, but also records statistics. </LI> <LI> MockFoo - provides values to the environment and usually has some form of expectations. </LI> <LI> FakeFoo - replaces real functionality with a simplified version (like replacing Database access with in-memory data). </LI> </UL> <H3> Interface Naming </H3> <H4> Interface names should be nouns, or adjectives ending with "able" such as Runnable or Serializable.</H4> <H4> Interface names should use upper CamelCase where the first letter of each word is capitalized.</H4> <H3> Method Naming </H3> <H4> Method names should use lower CamelCase where the first letter of each word is capitalized except for the first word.</H4> <H4> Method names should generally be verbs or other descriptions of actions. </H4> <H4> Specific naming conventions: </H4> <UL> <LI> Methods that access a class's attributes should start with "get" or "set". </LI> <LI> Methods that return a boolean should start with "is". Sometimes "has", "can", or "should" are more appropriate. </LI> <LI> Methods that look something up should start with "find" </LI> </UL> <H4> Methods that return a value should be named based on what they return. Void methods should be named based on what they do. </H4> <PRE> public Foo buildFoo() { // returns a Foo so method name is based on Foo ... } public int getSize() { // returns a primitive, which is the size, so name is based on "size" ... } public void startServer() { // doesn't return anything so name it based on what it does ... } public boolean installHandler(Handler handler) { // even though it returns a boolean, its not about returning ... // a boolean, so name it based on what it does } </PRE> <H3> Instance Variable Naming </H3> <H4> Instance Variable names should use lower CamelCase where the first letter of each word is capitalized except for the first word.</H4> <H3> Local Variable and Parameter Naming </H3> <H4> Local Variable names should use lower CamelCase where the first letter of each word is capitalized except for the first word.</H4> <H4> Variable names should be proportional in length to their scope. </H4> <UL> <LI> Names that live throughout large blocks or methods should have very descriptive names and avoid abbreviations. </LI> <LI> Names that exist in small blocks can use short or abbreviated names. </LI> <LI> Names that exist in tiny blocks can use one letter names (e.g., lambdas). </LI> </UL> <H4> Variable names should generally have the same name as their class (e.g., Person person or Button button). </H4> <UL> <LI> If for some reason, this rule doesn't seem to fit, then that is a strong indication that the type is badly named. </LI> <LI> Some variables have a role. These variables can often be named {role}Type. For example, Button openButton or Point startPoint, endPoint. </LI> </UL> <H4> Collections should be named the plural form of the type without the collection type name. For example, use List<Dog> dogs, not List<Dog> dogList. </H4> <H3> Enum Naming </H3> <H4> Enum class names should be like any other class (UpperCamelCase). </H4> <H4> Enum value names should be all upper case.</H4> <PRE> public enum AnalyzerStatus { ENABLED, DELAYED, DISABLED } </PRE> <H3> Loop Counters </H3> <H4> Use of i, j, k, etc. is acceptable as generic loop counters, unless a more descriptive name would greatly enhance the readability. </H4> <H3> Constants (static final fields) </H3> <H4> Constants should be all upper case with words separated by "_" (underscore char). </H4> <P> Examples: MAXIMUM_VELOCITY, or DEFAULT_COLOR </P> <H3> Generic Types </H3> <H4> Generic type names should be named in one of two styles: </H4> <UL> <LI> A single Capital Letter, optionally followed by a single number (e.g., T, X, V, T2) </LI> <UL> <LI> T is used most often for single parameter types. </LI> <LI> R is commonly used for return type. </LI> <LI> K,V is commonly used for key,value types. </LI> </UL> <LI> A name in the form used for classes followed by the capital letter T (e.g., ActionT, RowT, ColumnT). Try to avoid using this full name form unless it greatly enhances readability. </LI> </UL> <H3> Utility Classes </H3> <H4>Utility class names should end in "Utils".</H4> <H2> Source File Structure </H2> <H3> File Order </H3> <H4> A Java File should be organized in the following order </H4> <UL> <LI> Header </LI> <LI> Package statement </LI> <LI> Import statements </LI> <LI> Class Javadocs </LI> <LI> Class declaration </LI> <LI> Static Variables </LI> <LI> Static factory methods </LI> <LI> Instance Variables </LI> <LI> Constructors </LI> <LI> methods </LI> <LI> Private classes </LI> </UL> <H4> Local variables should be declared when first needed and not at the top of the method and should be initialized as close to the declaration as possible (preferably at the same time). </H4> <H4> Overloaded methods should be next to each other. </H4> <H4> Modifiers should appear in the following order: </H4> <UL> <LI> access modifier (public/private/protected) </LI> <LI> abstract </LI> <LI> static </LI> <LI> final </LI> <LI> transient </LI> <LI> volatile </LI> <LI> default </LI> <LI> synchronized </LI> <LI> native </LI> <LI> strictfp </LI> </UL> <H2> Formatting </H2> <P> Most of these are handled by the eclipse formatter and are here to document the Ghidra formatting style. <H3> Line Length </H3> <H4> Java code will have a character limit of 100 characters per line. </H4> <H3> Indenting </H3> <H4> New blocks are indented using a tab character (the tab should be 4 spaces wide).</H4> <H4> Line continuation should be indented the same as a new block. </H4> <H3> Braces </H3> <H4> Braces should always be used where optional. <H4> Braces should follow the Kernighan and Ritchie style for nonempty blocks and block-like structures. </H4> <UL> <LI> No line break before the opening brace. </LI> <LI> Line break after the opening brace. </LI> <LI> Line break before the closing brace. </LI> <LI> Line break after the closing brace. </LI> </UL> <H4> Empty blocks should look as follows. </H4> <PRE> void doNothing() { // comment as to why we are doing nothing } </PRE> <H3> White Space </H3> <H4> A single blank line should be used to separate the following sections: </H4> <UL> <LI> Copyright notice</LI> <LI> Package statement </LI> <LI> Import section </LI> <LI> Class declarations </LI> <LI> Methods </LI> <LI> Constructors </LI> </UL> <H4> A single blank line should be used: </H4> <UL> <LI> Between statements as needed to break code into logical sections. </LI> <LI> Between import statements as needed to break into logical groups. </LI> <LI> Between fields as needed to break into logical groups. </LI> <LI> Between the javadoc description and the javadoc tag section. </LI> </UL> <H4> A single space should be used: </H4> <UL> <LI> To separate keywords from neighboring opening or closing brackets and braces. </LI> <LI> Before and after all binary operators </LI> <LI> After a // that starts a comment </LI> <LI> Before a // that starts an end of line comment </LI> <LI> After semicolons separating parts of a "for" loop </LI> </UL> <H3> Variable Assignment </H3> <H4> Each variable should be declared on its own line. </H4> <PRE> don't: int i,j; do: int i; int j; </PRE> <H2> Comments </H2> <H3> Javadoc </H3> <H4> Javadoc blocks are normally of the form </H4> <PRE> /** * Some description with normal * wrapping. */ </PRE> <H4> Javadoc paragraphs should be separated by a single blank line (Starts with an aligned *) and each paragraph other than the initial description should start with &ltp&gt. </H4> <H4> When referencing other methods, use links (e.g., {@link #method(type1, type2, ...} or {@link Classname#method(type1, type2, ...}). </H4> <H4> Block tags should never appear without a description. </H4> <H4> Descriptions in block tags should not end in a period, unless followed by another sentence. </H4> <H4> Block tags that are used should appear in the following order: </H4> <UL> <LI> @param </LI> <LI> @return </LI> <LI> @throws </LI> <LI> @see </LI> <LI> @deprecated </LI> </UL> <H4> The Javadoc block should begin with a brief summary fragment. This fragment should be a noun phrase or a verb phrase and not a complete sentence. However, the fragment is capitalized and punctuated as if it were a complete sentence. </H4> <PRE> For example, do /** * Sets the warning level for the messaging system. */ not /** * This method sets the warning level for the messaging system. */ </PRE> <H4> Javadoc should be present for every public class and every public or protected method with the following exceptions: </H4> <UL> <LI> Methods that override a super method. </LI> </UL> <H3> Code Comments </H3> <H4>Block comments are indented at the same level as the surrounding code.</H4> <H4>Block comments should be preceded by a blank line unless it is the first line of the block.</H4> <H4>Block comments should be one of the following forms: </H4> <PRE> /* * This is // I like this * nice. // also. */ </PRE> <H4> Any empty code block should have a comment so that the reader will know it was intentional. Also, the comment should not be something like "// empty" or "don't care", but instead should state why it is empty or why you don't care.</H4> <H4> Comments should indicate the 'why' you are doing something, not just 'what' you are doing. The code tells us what it is doing. Comments should not be pseudo code.</H4> <H4> Prefer creating a descriptive method to using a block comment. So if you feel that a block comment is needed to explain the next block of code, then it probably would be better off moved to a method with a name that says what the code does.</H4> <H4> Use of comments in code should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structure. </H4> <H4> Tricky code should not be commented. Instead, it should be rewritten. </H4> <H2> Complexity </H2> <H3> Method Size </H3> <H4> Avoid long methods. </H4> <UL> <LI> Methods should perform one clearly defined task. </LI> <LI> Methods should generally fit on one page (approximately 30 lines). </LI> </UL> <H3> Method Complexity </H3> <H4>A method should be completely understandable (what, how, why) in about 30 seconds. </H4> <H4> Method Complexity should be kept low, according to the following scale:</H4> <UL> <LI><TT>0-5</TT>: The method is *probably* fine</LI> <LI><TT>6-10</TT>: The method is questionable; seek to simplify</LI> <LI><TT>11+</TT>: OMG! Unacceptable!</LI> </UL> <P>Calculating Complexity:</P> <UL> <LI> Start with one. </LI> <LI> Add one for each of the following. </LI> <UL> <LI> Returns: Each return other than a simple early guard condition or the last statement in the method. </LI> <LI> Selection: if, else if, case, default. </LI> <LI> Loops: for, while, do-while, break, and continue. </LI> <LI> Operators: &&, ||, ? </LI> <LI> Exceptions: catch, finally, throw. </LI> </UL> </UL> <H4>Methods should avoid deep nesting. </H4> <UL> <LI> 2 or less - good </LI> <LI> 3 or 4 - questionable </LI> <LI> 5 or more - unacceptable </LI> </UL> <H4>Methods and constructors should avoid large numbers of parameters.</H4> <UL> <LI> 3 or less - good </LI> <LI> 4 or 5 - questionable </LI> <LI> 6 or 7 - bad, should consider redesign </LI> <LI> 8 or more - unacceptable </LI> </UL> <H4>All blocks of code in a method should be at the same level of abstraction </H4> <PRE> // example of mixed levels: void doDailyChores() { dust(); vacuum(); mopFloor(); addDirtyClothesToWashingMachine(); placeDetergentInWashingMachine(); closeWashingMachineDoor(); startWashingMachine(); cleanToilet(); } // fixed void doDailyChores() { dust(); vacuum(); mopFloor(); washClothes(); cleanToilet(); } </PRE> <H4>Methods and constructors should generally avoid multiple parameters of the same type, unless the method's purpose is to process multiple instances of the same type (e.g., comparator, math functions). This is especially egregious for boolean parameters.</H4> <H4>Tips for lowering complexity </H4> <UL> <LI> Keep the number of nesting levels low </LI> <LI> Keep the number of variables used low </LI> <LI> Keep the lines of code low </LI> <LI> Keep 'span' low (the number of lines between successive references to variables) </LI> <LI> Keep 'live time' low (the number of lines that a variable is in use) </LI> </UL> <H2> Testing </H2> <H3> Unit testing </H3> <H4>A single test case should only test one result. If there are more than 2 or 3 asserts in a single test, consider breaking into multiple tests. </H4> <H4>Unit tests should run fast (a single test case (method) should be less than a second) </H4> <H2> Miscellaneous </H2> <H3> @Override </H3> <H4> Methods that override a method in a parent class should use the @Override tag. </H4> <H4> Methods that implement an interface method should use the @Override tag. </H4> <H4> Methods that use the @Override tag do not need a Javadoc comment. </H4> <H3> Use of Tuple Objects<A,B> </H3> <H4> Use of Pair<A,B>, Triple<A,B,C>, etc. should be avoided. If the multiple values being returned are related, then the method is conceptually returning a higher level object and so should return that. Otherwise, the method should be redesigned. </H4> <H3> Exception Handling </H3> <H4> Exceptions should never have empty code blocks. There should at least be a comment explaining why there is no code for the exception. </H4> <H4> If the caught exception is believed to be impossible to happen, the correct action is to throw an AssertException with a message explaining that it should never happen. </H4> <H3> Final </H3> <H4> Instance variables that are immutable should be declared final unless there is a compelling reason not to. </H4> <H3> Shadowing </H3> <H4> Avoid hiding/shadowing methods, variables, and type variables in outer scopes. </H4> <H3> Access modifiers </H3> <H4> Class instance fields should not be public. They should be private whenever possible, but protected and package are acceptable.</H4> <H3> Java-specific constructs</H3> <H4> Use the try-with-resources pattern whenever possible. </H4> <H4> Always parameterize types when possible (e.g., JComboBox&lt;String&gt; vs. JComboBox). </H4> <H4> If an object has an isEmpty() method, use it instead of checking its size == 0. </H4> <H3> Miscellaneous </H3> <H4> Mutating method parameters is discouraged. </H4> <H4> Magic numbers should not appear in the code. Other than 0, or 1, the number should be declared as a constant. </H4> <H4> Avoid creating a new Utilities class <B>*every time you need to share code*</B>. Try to add to an existing utilities class OR take advantage of code re-use via inheritance. </H4> <H3> Rules that shouldn't need to be stated, but do</H3> <H4> Test your feature yourself before submitting for review and make sure the tests pass. </H4> <div class="info"> Notes: </div> <H5>Complexity</H5> <P> 'The McCabe measure of complexity isn't the only sound measure, but it's the measure most discussed in computing literature and it's especially helpful when you're thinking about control flow. Other measures include the amount of data used, the number of nesting levels in control constructs, the number of lines of code, the number of lines between successive references to variables ("span"), the number of lines that a variable is in use ("live time"), and the amount of input and output. Some researchers have developed composite metrics based on combinations of these simpler ones.' (McCabe) </P> <P> 'Moving part of a routine into another routine doesn't reduce the overall complexity of the program; it just moves the decision points around. But it reduces the amount of complexity you have to deal with at any one time. Since the important goal is to minimize the number of items you have to juggle mentally, reducing the complexity of a given routine is worthwhile.' (McCabe) </P> <P> 'Excessive indentation, or "nesting," has been pilloried in computing literature for 25 years and is still one of the chief culprits in confusing code. Studies by Noam Chomsky and Gerald Weinberg suggest that few people can understand more than three levels of nested ifs (Yourdon 1986a), and many researchers recommend avoiding nesting to more than three or four levels (Myers 1976, Marca 1981, and Ledgard and Tauer 1987a). Deep nesting works against what Chapter 5, describes as Software's Primary Technical Imperative: Managing Complexity. That is reason enough to avoid deep nesting.' (McCabe) </P> <P> 'There is no code so big, twisted, or complex that maintenance can't make it worse.'<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Gerald Weinberg </P> <div class="info"> References: </div> <UL> <LI> Google Java Style Guide </LI> <LI> OpenJDK Style Guide </LI> <LI> Java Programming Style Guidelines - Geotechnical Software Services </LI> <LI> Code Complete, Steve McConnell </LI> <LI> Java Code Conventions </LI> <LI> Netscapes Software Coding Standards for Java </LI> <LI> C / C++ / Java Coding Standards from NASA </LI> <LI> Coding Standards for Java from AmbySoft </LI> <LI> Clean Code, Robert Martin (Uncle Bob) </LI> </UL> </body> </html>
thomashaw/SecGen
modules/utilities/unix/audit_tools/ghidra/files/release/docs/GhidraCodingStandards.html
HTML
gpl-3.0
24,220
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Example - example-example33-production</title> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.7/angular.min.js"></script> </head> <body ng-app=""> <input ng-keyup="count = count + 1" ng-init="count=0"> key up count: {{count}} </body> </html>
billrive/billrive
billrive-app/src/main/resources/public/lib/angular-1.3.0-beta.8/docs/examples/example-example33/index-production.html
HTML
gpl-3.0
351
/* This source file is part of Rigs of Rods Copyright 2005-2012 Pierre-Michel Ricordel Copyright 2007-2012 Thomas Fischer Copyright 2013-2014 Petr Ohlidal For more information, see http://www.rigsofrods.com/ Rigs of Rods is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. Rigs of Rods 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 Rigs of Rods. If not, see <http://www.gnu.org/licenses/>. */ #include "SkyXManager.h" #include "Application.h" #include "HydraxWater.h" #include "OgreSubsystem.h" #include "TerrainManager.h" #include "TerrainGeometryManager.h" using namespace Ogre; using namespace RoR; SkyXManager::SkyXManager(Ogre::String configFile) { InitLight(); //Ogre::ResourceGroupManager::getSingleton().addResourceLocation("..\\resource\\SkyX\\","FileSystem", "SkyX",true); //Temp mBasicController = new SkyX::BasicController(); mSkyX = new SkyX::SkyX(gEnv->sceneManager, mBasicController); mCfgFileManager = new SkyX::CfgFileManager(mSkyX, mBasicController, gEnv->mainCamera); mCfgFileManager->load(configFile); mSkyX->create(); RoR::App::GetOgreSubsystem()->GetOgreRoot()->addFrameListener(mSkyX); RoR::App::GetOgreSubsystem()->GetRenderWindow()->addListener(mSkyX); } SkyXManager::~SkyXManager() { RoR::App::GetOgreSubsystem()->GetRenderWindow()->removeListener(mSkyX); mSkyX->remove(); mSkyX = nullptr; delete mBasicController; mBasicController = nullptr; } Vector3 SkyXManager::getMainLightDirection() { if (mBasicController != nullptr) return mBasicController->getSunDirection(); return Ogre::Vector3(0.0,0.0,0.0); } Light *SkyXManager::getMainLight() { return mLight1; } bool SkyXManager::update(float dt) { UpdateSkyLight(); mSkyX->update(dt); return true; } bool SkyXManager::UpdateSkyLight() { Ogre::Vector3 lightDir = -getMainLightDirection(); Ogre::Vector3 sunPos = gEnv->mainCamera->getDerivedPosition() - lightDir*mSkyX->getMeshManager()->getSkydomeRadius(gEnv->mainCamera); // Calculate current color gradients point float point = (-lightDir.y + 1.0f) / 2.0f; if (App::GetSimTerrain ()->getHydraxManager ()) { App::GetSimTerrain ()->getHydraxManager ()->GetHydrax ()->setWaterColor (mWaterGradient.getColor (point)); App::GetSimTerrain ()->getHydraxManager ()->GetHydrax ()->setSunPosition (sunPos*0.1); } mLight0 = gEnv->sceneManager->getLight("Light0"); mLight1 = gEnv->sceneManager->getLight("Light1"); mLight0->setPosition(sunPos*0.02); mLight1->setDirection(lightDir); if (App::GetSimTerrain()->getWater()) { App::GetSimTerrain()->getWater()->WaterSetSunPosition(sunPos*0.1); } //setFadeColour was removed with https://github.com/RigsOfRods/rigs-of-rods/pull/1459 /* Ogre::Vector3 sunCol = mSunGradient.getColor(point); mLight0->setSpecularColour(sunCol.x, sunCol.y, sunCol.z); if (App::GetSimTerrain()->getWater()) App::GetSimTerrain()->getWater()->setFadeColour(Ogre::ColourValue(sunCol.x, sunCol.y, sunCol.z)); */ Ogre::Vector3 ambientCol = mAmbientGradient.getColor(point); mLight1->setDiffuseColour(ambientCol.x, ambientCol.y, ambientCol.z); mLight1->setPosition(100,100,100); if (mBasicController->getTime().x > 12) { if (mBasicController->getTime().x > mBasicController->getTime().z) mLight0->setVisible(false); else mLight0->setVisible(true); } else { if (mBasicController->getTime ().x < mBasicController->getTime ().z) mLight0->setVisible (false); else mLight0->setVisible (true); } if (round (mBasicController->getTime ().x) != mLastHour) { TerrainGeometryManager* gm = App::GetSimTerrain ()->getGeometryManager (); if (gm) gm->updateLightMap (); mLastHour = round (mBasicController->getTime ().x); } return true; } bool SkyXManager::InitLight() { // Water mWaterGradient = SkyX::ColorGradient(); mWaterGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.058209,0.535822,0.779105)*0.4, 1)); mWaterGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.058209,0.535822,0.729105)*0.3, 0.8)); mWaterGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.058209,0.535822,0.679105)*0.25, 0.6)); mWaterGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.058209,0.535822,0.679105)*0.2, 0.5)); mWaterGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.058209,0.535822,0.679105)*0.1, 0.45)); mWaterGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.058209,0.535822,0.679105)*0.025, 0)); // Sun mSunGradient = SkyX::ColorGradient(); mSunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.8,0.75,0.55)*1.5, 1.0f)); mSunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.8,0.75,0.55)*1.4, 0.75f)); mSunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.8,0.75,0.55)*1.3, 0.5625f)); mSunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.6,0.5,0.2)*1.5, 0.5f)); mSunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.5,0.5,0.5)*0.25, 0.45f)); mSunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.5,0.5,0.5)*0.01, 0.0f)); // Ambient mAmbientGradient = SkyX::ColorGradient(); mAmbientGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(1,1,1)*1, 1.0f)); mAmbientGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(1,1,1)*1, 0.6f)); mAmbientGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(1,1,1)*0.6, 0.5f)); mAmbientGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(1,1,1)*0.3, 0.45f)); mAmbientGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(1,1,1)*0.1, 0.35f)); mAmbientGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(1,1,1)*0.05, 0.0f)); gEnv->sceneManager->setAmbientLight(ColourValue(0.35,0.35,0.35)); //Not needed because terrn2 has ambientlight settings // Light mLight0 = gEnv->sceneManager->createLight("Light0"); mLight0->setDiffuseColour(1, 1, 1); mLight0->setCastShadows(false); mLight1 = gEnv->sceneManager->createLight("Light1"); mLight1->setType(Ogre::Light::LT_DIRECTIONAL); return true; } size_t SkyXManager::getMemoryUsage() { //TODO return 0; } void SkyXManager::freeResources() { //TODO }
ulteq/rigs-of-rods
source/main/gfx/SkyXManager.cpp
C++
gpl-3.0
6,681
/* Copyright (C) 2011 Andrew Cotter This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** \file helpers.hpp \brief Helper macros, functions and classes */ #ifndef __HELPERS_HPP__ #define __HELPERS_HPP__ #include <boost/static_assert.hpp> #include <boost/cstdint.hpp> #include <cmath> namespace GTSVM { //============================================================================ // ARRAYLENGTH macro //============================================================================ #define ARRAYLENGTH( array ) \ ( sizeof( array ) / sizeof( array[ 0 ] ) ) //============================================================================ // LIKELY and UNLIKELY macros //============================================================================ #if defined( __GNUC__ ) && ( __GNUC__ >= 3 ) #define LIKELY( boolean ) __builtin_expect( ( boolean ), 1 ) #define UNLIKELY( boolean ) __builtin_expect( ( boolean ), 0 ) #else /* defined( __GNUC__ ) && ( __GNUC__ >= 3 ) */ #define LIKELY( boolean ) ( boolean ) #define UNLIKELY( boolean ) ( boolean ) #endif /* defined( __GNUC__ ) && ( __GNUC__ >= 3 ) */ #ifdef __cplusplus //============================================================================ // Power helper template //============================================================================ template< unsigned int t_Number, unsigned int t_Power > struct Power { enum { RESULT = t_Number * Power< t_Number, t_Power - 1 >::RESULT }; }; template< unsigned int t_Number > struct Power< t_Number, 0 > { enum { RESULT = 1 }; }; //============================================================================ // Signum helper functions //============================================================================ template< typename t_Type > inline t_Type Signum( t_Type const& value ) { t_Type result = 0; if ( value < 0 ) result = -1; else if ( value > 0 ) result = 1; return result; } template< typename t_Type > inline t_Type Signum( t_Type const& value, t_Type const& scale ) { t_Type result = 0; if ( value < 0 ) result = -scale; else if ( value > 0 ) result = scale; return result; } //============================================================================ // Square helper function //============================================================================ template< typename t_Type > inline t_Type Square( t_Type const& value ) { return( value * value ); } //============================================================================ // Cube helper function //============================================================================ template< typename t_Type > inline t_Type Cube( t_Type const& value ) { return( value * value * value ); } //============================================================================ // CountBits helper functions //============================================================================ inline unsigned char CountBits( boost::uint8_t number ) { BOOST_STATIC_ASSERT( sizeof( number ) == 1 ); number = ( number & 0x55 ) + ( ( number >> 1 ) & 0x55 ); number = ( number & 0x33 ) + ( ( number >> 2 ) & 0x33 ); number = ( number & 0x0f ) + ( number >> 4 ); return number; } inline unsigned short CountBits( boost::uint16_t number ) { BOOST_STATIC_ASSERT( sizeof( number ) == 2 ); number = ( number & 0x5555 ) + ( ( number >> 1 ) & 0x5555 ); number = ( number & 0x3333 ) + ( ( number >> 2 ) & 0x3333 ); number = ( number & 0x0f0f ) + ( ( number >> 4 ) & 0x0f0f ); number = ( number & 0x00ff ) + ( number >> 8 ); return number; } inline unsigned int CountBits( boost::uint32_t number ) { BOOST_STATIC_ASSERT( sizeof( number ) == 4 ); number = ( number & 0x55555555 ) + ( ( number >> 1 ) & 0x55555555 ); number = ( number & 0x33333333 ) + ( ( number >> 2 ) & 0x33333333 ); number = ( number & 0x0f0f0f0f ) + ( ( number >> 4 ) & 0x0f0f0f0f ); number = ( number & 0x00ff00ff ) + ( ( number >> 8 ) & 0x00ff00ff ); number = ( number & 0x0000ffff ) + ( number >> 16 ); return number; } inline unsigned long long CountBits( boost::uint64_t number ) { BOOST_STATIC_ASSERT( sizeof( number ) == 8 ); number = ( number & 0x5555555555555555ull ) + ( ( number >> 1 ) & 0x5555555555555555ull ); number = ( number & 0x3333333333333333ull ) + ( ( number >> 2 ) & 0x3333333333333333ull ); number = ( number & 0x0f0f0f0f0f0f0f0full ) + ( ( number >> 4 ) & 0x0f0f0f0f0f0f0f0full ); number = ( number & 0x00ff00ff00ff00ffull ) + ( ( number >> 8 ) & 0x00ff00ff00ff00ffull ); number = ( number & 0x0000ffff0000ffffull ) + ( ( number >> 16 ) & 0x0000ffff0000ffffull ); number = ( number & 0x00000000ffffffffull ) + ( number >> 32 ); return number; } //============================================================================ // HighBit helper functions //============================================================================ inline unsigned int HighBit( boost::uint8_t number ) { BOOST_STATIC_ASSERT( sizeof( number ) == 1 ); unsigned int bit = 0; if ( number & 0xf0 ) { bit += 4; number >>= 4; } if ( number & 0x0c ) { bit += 2; number >>= 2; } if ( number & 0x02 ) ++bit; return bit; } inline unsigned int HighBit( boost::uint16_t number ) { BOOST_STATIC_ASSERT( sizeof( number ) == 2 ); unsigned int bit = 0; if ( number & 0xff00 ) { bit += 8; number >>= 8; } if ( number & 0x00f0 ) { bit += 4; number >>= 4; } if ( number & 0x000c ) { bit += 2; number >>= 2; } if ( number & 0x0002 ) ++bit; return bit; } inline unsigned int HighBit( boost::uint32_t number ) { BOOST_STATIC_ASSERT( sizeof( number ) == 4 ); unsigned int bit = 0; if ( number & 0xffff0000 ) { bit += 16; number >>= 16; } if ( number & 0x0000ff00 ) { bit += 8; number >>= 8; } if ( number & 0x000000f0 ) { bit += 4; number >>= 4; } if ( number & 0x0000000c ) { bit += 2; number >>= 2; } if ( number & 0x00000002 ) ++bit; return bit; } inline unsigned int HighBit( boost::uint64_t number ) { BOOST_STATIC_ASSERT( sizeof( number ) == 8 ); unsigned int bit = 0; if ( number & 0xffffffff00000000ull ) { bit += 32; number >>= 32; } if ( number & 0x00000000ffff0000ull ) { bit += 16; number >>= 16; } if ( number & 0x000000000000ff00ull ) { bit += 8; number >>= 8; } if ( number & 0x00000000000000f0ull ) { bit += 4; number >>= 4; } if ( number & 0x000000000000000cull ) { bit += 2; number >>= 2; } if ( number & 0x0000000000000002ull ) ++bit; return bit; } } // namespace GTSVM #endif /* __cplusplus */ #endif /* __HELPERS_HPP__ */
mjmg/Rgtsvm
src/helpers.hpp
C++
gpl-3.0
7,286
/** * This file is part of a demo that shows how to use RT2D, a 2D OpenGL framework. * * - Copyright 2015 Rik Teerling <rik@onandoffables.com> * - Initial commit * - Copyright 2015 Your Name <you@yourhost.com> * - What you did */ #include "scene01.h" Scene01::Scene01() : SuperScene() { // Start Timer t t.start(); text[0]->message("Scene01: Parent/child, Sprite, Spritesheet, blendcolor"); text[4]->message("<SPACE> reset UV animation"); text[5]->message("<Arrow keys> move camera"); // Create an Entity with a custom pivot point. default_entity = new BasicEntity(); default_entity->addSprite("assets/default.tga", 0.75f, 0.25f, 3, 0); // custom pivot point, filter, wrap (0=repeat, 1=mirror, 2=clamp) default_entity->position = Point2(SWIDTH/3, SHEIGHT/2); // To create a Sprite with specific properties, create it first, then add it to an Entity later. // It will be unique once you added it to an Entity. Except for non-dynamic Texture wrapping/filtering if it's loaded from disk and handled by the ResourceManager. // You must delete it yourself after you've added it to all the Entities you want. Sprite* f_spr = new Sprite(); f_spr->setupSprite("assets/grayscale.tga", 0.5f, 0.5f, 1.0f, 1.0f, 1, 2); // filename, pivot.x, pivot.y, uvdim.x, uvdim.y, filter, wrap f_spr->color = GREEN; // green child1_entity = new BasicEntity(); child1_entity->position = Point2(100, -100); // position relative to parent (default_entity) child1_entity->addSprite(f_spr); delete f_spr; // Create an Entity that's going to be a Child of default_entity. // Easiest way to create a Sprite with sensible defaults. @see Sprite::setupSprite() child2_entity = new BasicEntity(); child2_entity->addSprite("assets/grayscale.tga"); child2_entity->sprite()->color = RED; // red child2_entity->position = Point2(64, 64); // position relative to parent (child1_entity) // An example of using a SpriteSheet ("animated texture"). // Remember you can also animate UV's of any Sprite (uvoffset). animated_entity = new BasicEntity(); animated_entity->addLine("assets/default.line"); // Add a line (default line fits nicely) animated_entity->addSpriteSheet("assets/spritesheet.tga", 4, 4); // divide Texture in 4x4 slices animated_entity->position = Point2(SWIDTH/3*2, SHEIGHT/2); // Create a UI entity ui_element = new BasicEntity(); //ui_element->position = Point2(SWIDTH-150, 20); // sticks to camera in update() // filter + wrap inherited from default_entity above (is per texturename. "assets/default.tga" already loaded). ui_element->addSprite("assets/default.tga", 0.5f, 0.0f); // Default texture. Pivot point top middle. Pivot(0,0) is top left. ui_element->sprite()->size = Point2(256, 64); // texture is 512x512. Make Mesh half the width, 1 row of squares (512/8). ui_element->sprite()->uvdim = Point2(0.5f, 0.125f); // UV 1/8 of the height. ui_element->sprite()->uvoffset = Point2(0.0f, 0.0f); // Show bottom row. UV(0,0) is bottom left. // create a tree-structure to send to the Renderer // by adding them to each other and/or the scene ('this', or one of the layers[]) child1_entity->addChild(child2_entity); default_entity->addChild(child1_entity); layers[1]->addChild(default_entity); layers[1]->addChild(animated_entity); layers[top_layer]->addChild(ui_element); } Scene01::~Scene01() { // deconstruct and delete the Tree child1_entity->removeChild(child2_entity); default_entity->removeChild(child1_entity); layers[1]->removeChild(default_entity); layers[1]->removeChild(animated_entity); layers[top_layer]->removeChild(ui_element); delete animated_entity; delete child2_entity; delete child1_entity; delete default_entity; delete ui_element; } void Scene01::update(float deltaTime) { // ############################################################### // Make SuperScene do what it needs to do // - Escape key stops Scene // - Move Camera // ############################################################### SuperScene::update(deltaTime); SuperScene::moveCamera(deltaTime); // ############################################################### // Mouse cursor in screen coordinates // ############################################################### int mousex = input()->getMouseX(); int mousey = input()->getMouseY(); std::string cursortxt = "cursor ("; cursortxt.append(std::to_string(mousex)); cursortxt.append(","); cursortxt.append(std::to_string(mousey)); cursortxt.append(")"); text[9]->message(cursortxt); // ############################################################### // Rotate default_entity // ############################################################### default_entity->rotation -= 90 * DEG_TO_RAD * deltaTime; // 90 deg. per sec. if (default_entity->rotation < TWO_PI) { default_entity->rotation += TWO_PI; } // ############################################################### // alpha child1_entity + child2_entity // ############################################################### static float counter = 0; child1_entity->sprite()->color.a = abs(sin(counter)*255); child2_entity->sprite()->color.a = abs(cos(counter)*255); counter+=deltaTime/2; if (counter > TWO_PI) { counter = 0; } // ############################################################### // Animate animated_entity // ############################################################### animated_entity->rotation += 22.5 * DEG_TO_RAD * deltaTime; if (animated_entity->rotation > -TWO_PI) { animated_entity->rotation -= TWO_PI; } static int f = 0; if (f > 15) { f = 0; } animated_entity->sprite()->frame(f); if (t.seconds() > 0.25f) { static RGBAColor rgb = RED; animated_entity->sprite()->color = rgb; rgb = Color::rotate(rgb, 0.025f); f++; t.start(); } // ############################################################### // ui_element uvoffset // ############################################################### static float xoffset = 0.0f; xoffset += deltaTime / 2; if (input()->getKey( GLFW_KEY_SPACE )) { xoffset = 0.0f; } ui_element->sprite()->uvoffset.x = xoffset; ui_element->position = Point2(camera()->position.x + SWIDTH/2 - 150, camera()->position.y - SHEIGHT/2 + 20); }
Thalliuss/RT2D_Project
demo/scene01.cpp
C++
gpl-3.0
6,195
using UnityEngine; using UnityEditor; using System.Collections; using System.Collections.Generic; using Frontiers.World; [CustomEditor(typeof(BannerEditor))] public class BannerEditorEditor : Editor { protected BannerEditor be; public void Awake() { be = (BannerEditor)target; } public override void OnInspectorGUI() { EditorStyles.textField.wordWrap = true; DrawDefaultInspector(); be.DrawEditor(); } }
SignpostMarv/FRONTIERS
Assets/Editor/Frontiers/BannerEditorEditor.cs
C#
gpl-3.0
436
<?php // Heading $_['heading_title'] = 'Cliente'; // Text $_['text_login'] = 'Login'; $_['text_success'] = 'Hai modificato con successo i clienti!'; $_['text_approved'] = 'Hai attivato %s account!'; $_['text_wait'] = 'Attendi!'; $_['text_balance'] = 'Saldo:'; // Column $_['column_name'] = 'Nome cliente'; $_['column_email'] = 'E-Mail'; $_['column_customer_group'] = 'Gruppo clienti'; $_['column_status'] = 'Stato'; $_['column_approved'] = 'Approvato'; $_['column_date_added'] = 'Data inserimento'; $_['column_description'] = 'Descrizione'; $_['column_amount'] = 'Imporot'; $_['column_points'] = 'Punti'; $_['column_ip'] = 'IP'; $_['column_total'] = 'Account Totali'; $_['column_action'] = 'Azione'; // Entry $_['entry_firstname'] = 'Nome:'; $_['entry_lastname'] = 'Cognome:'; $_['entry_email'] = 'E-Mail:'; $_['entry_telephone'] = 'Telefono:'; $_['entry_fax'] = 'Fax:'; $_['entry_newsletter'] = 'Newsletter:'; $_['entry_customer_group'] = 'Gruppo clienti:'; $_['entry_status'] = 'Stato:'; $_['entry_password'] = 'Password:'; $_['entry_confirm'] = 'Conferma:'; $_['entry_company'] = 'Azienda:'; $_['entry_address_1'] = 'Indirizzo 1:'; $_['entry_address_2'] = 'Indirizzo 2:'; $_['entry_city'] = 'Citt&agrave;:'; $_['entry_postcode'] = 'CAP:'; $_['entry_country'] = 'Nazione:'; $_['entry_zone'] = 'Provincia:'; $_['entry_default'] = 'Indirizzo di Default:'; $_['entry_amount'] = 'Importo:'; $_['entry_points'] = 'Punti:'; $_['entry_description'] = 'Descrizione:'; // Error $_['error_warning'] = 'Attenzione: Controlla il modulo, ci sono alcuni errori!'; $_['error_permission'] = 'Attenzione: Non hai i permessi necessari per modificare i clienti!'; $_['error_firstname'] = 'Il nome deve essere maggiore di 1 carattere e minore di 32!'; $_['error_lastname'] = 'Il cognome deve essere maggiore di 1 carattere e minore di 32!'; $_['error_email'] = 'L\'indirizzo e-mail sembra essere non valido!'; $_['error_telephone'] = 'Il Telefono deve essere maggiore di 3 caratteri e minore di 32!'; $_['error_password'] = 'La password deve essere maggiore di 3 caratteri e minore di 20!'; $_['error_confirm'] = 'Le due password non coincodono!'; $_['error_address_1'] = 'L\'indirizzo deve essere lungo almeno 3 caratteri e non pi&ugrave; di 128 caratteri!'; $_['error_city'] = 'La citt&agrave; deve essere lungo almeno 3 caratteri e non pi&ugrave; di 128 caratteri!'; $_['error_postcode'] = 'Il CAP deve essere tra i 2 ed i 10 caratteri per questa nazione!'; $_['error_country'] = 'Per favore seleziona lo stato!'; $_['error_zone'] = 'Per favore seleziona la provincia'; ?>
censam/open_cart
multilanguage/OC-Europa-1-5-1-3-9.part01/upload/admin/language/italian/sale/customer.php
PHP
gpl-3.0
3,022
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Grid Format - A topics based format that uses a grid of user selectable images to popup a light box of the section. * * @package course/format * @subpackage grid * @copyright &copy; 2013 G J Barnard in respect to modifications of standard topics format. * @author G J Barnard - gjbarnard at gmail dot com and {@link http://moodle.org/user/profile.php?id=442195} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ // Instructions. // 1. Ensure this file and the image '515-797no09sa.jpg' are in the Moodle installation folder '/course/format/grid/test'. // 2. Ensure the value of courseid is for a valid course in the URL i.e. image_test.php?courseid=2. // 3.1 In a browser, log into Moodle so that you have a valid MoodleSession cookie. // 3.2 In another tab of the same browser navigate to 'your moodle installation'/course/format/grid/test/image_test.php. // E.g. http://localhost/moodlegjb/course/format/grid/test/image_test.php. // Success: Image shows. // Failure: Image does not show. require_once('../../../../config.php'); global $CFG, $DB; require_once($CFG->libdir . '/filelib.php'); require_once($CFG->libdir . '/weblib.php'); require_once($CFG->libdir . '/outputcomponents.php'); require_once($CFG->dirroot . '/repository/lib.php'); require_once($CFG->dirroot . '/course/format/lib.php'); // For format_base. require_once($CFG->dirroot . '/course/lib.php'); // For course functions. require_once($CFG->dirroot . '/course/format/grid/lib.php'); // For format_grid. $courseid = required_param('courseid', PARAM_INT); /* Script settings */ define('GRID_ITEM_IMAGE_WIDTH', 210); define('GRID_ITEM_IMAGE_HEIGHT', 140); $context = context_course::instance($courseid); $contextid = $context->id; // Find an section id to use:.... $sections = $DB->get_records('course_sections', array('course' => $courseid)); // Use the first. $sectionid = reset($sections)->id; // Adapted code from test_convert_image()' of '/lib/filestorage/tests/file_storage_test.php'. $imagefilename = '515-797no09sa.jpg'; // Image taken by G J Barnard 2002 - Only use for these tests. $filepath = $CFG->dirroot . '/course/format/grid/test/' . $imagefilename; $filerecord = array( 'contextid' => $contextid, 'component' => 'course', 'filearea' => 'section', 'itemid' => $sectionid, 'filepath' => '/gridtest/', 'filename' => $imagefilename ); $fs = get_file_storage(); $convertedfilename = 'converted_' . $imagefilename; // Clean area from previous test run... if ($file = $fs->get_file($contextid, 'course', 'section', $sectionid, $filerecord['filepath'], $imagefilename)) { $file->delete(); } if ($file = $fs->get_file($contextid, 'course', 'section', $sectionid, $filerecord['filepath'], $convertedfilename)) { $file->delete(); } $original = $fs->create_file_from_pathname($filerecord, $filepath); $filerecord['filename'] = $convertedfilename; $converted = $fs->convert_image($filerecord, $original, GRID_ITEM_IMAGE_WIDTH, GRID_ITEM_IMAGE_HEIGHT, true, 75); require_once('test_header.php'); $o = html_writer::tag('h1', 'Upload and convert image....'); $o .= html_writer::start_tag('div'); $o .= html_writer::tag('p', 'Original image:'); $src = $CFG->wwwroot . '/course/format/grid/test/' . $imagefilename; $o .= html_writer::empty_tag('img', array('src' => $src, 'alt' => 'Grid Format Image Test Original')); $o .= html_writer::end_tag('div'); $o .= html_writer::start_tag('div'); $o .= html_writer::tag('p', 'Converted image:'); $src = moodle_url::make_pluginfile_url($contextid, 'course', 'section', $sectionid, '/gridtest/', $convertedfilename); $o .= html_writer::empty_tag('img', array('src' => $src, 'alt' => 'Grid Format Image Test Converted')); $o .= html_writer::end_tag('div'); $o .= html_writer::tag('p', 'Converted object:'); $o .= print_r($converted, true); $o .= html_writer::start_tag('div'); $o .= html_writer::empty_tag('br'); $o .= html_writer::tag('p', 'Course Id: ' . $courseid); $o .= html_writer::tag('p', 'Context Id: ' . $contextid); $o .= html_writer::tag('p', 'Item / Section Id: ' . $sectionid); $o .= html_writer::tag('p', 'Plugin URL: ' . $src); $o .= html_writer::empty_tag('br'); $o .= html_writer::end_tag('div'); echo $o; $o = html_writer::tag('h1', 'Convert image and set as section 2 image, repeat to check delete method....'); // Use the second. $sectionid = next($sections)->id; $courseformat = course_get_format($courseid); // Clean up from previous test.... $courseformat->delete_image($sectionid, $contextid); // This test.... $storedfilerecord = $courseformat->create_original_image_record($contextid, $sectionid, $imagefilename); $sectionimage = $courseformat->get_image($courseid, $sectionid); $courseformat->create_section_image($original, $storedfilerecord, $sectionimage); $o .= html_writer::start_tag('div'); $o .= html_writer::tag('p', 'Original image resized to maximum width:'); $src = moodle_url::make_pluginfile_url($contextid, 'course', 'section', $sectionid, '/', $imagefilename); $o .= html_writer::empty_tag('img', array('src' => $src, 'alt' => 'Grid Format Image Test Original Resized')); $o .= html_writer::end_tag('div'); $o .= html_writer::start_tag('div'); $o .= html_writer::tag('p', 'Converted image to current course settings:'); $sectionimage = $courseformat->get_image($courseid, $sectionid); $src = moodle_url::make_pluginfile_url($contextid, 'course', 'section', $sectionid, $courseformat->get_image_path(), $sectionimage->displayedimageindex . '_' . $sectionimage->image); $o .= html_writer::empty_tag('img', array('src' => $src, 'alt' => 'Grid Format Image Test Converted to current course settings')); $o .= html_writer::end_tag('div'); $currentsettings = $courseformat->get_settings(); $o .= html_writer::start_tag('div'); $o .= html_writer::tag('p', 'Current settings: ' . print_r($currentsettings, true)); $ratios = format_grid::get_image_container_ratios(); $resizemethods = array( 1 => new lang_string('scale', 'format_grid'), // Scale. 2 => new lang_string('crop', 'format_grid') // Crop. ); $o .= html_writer::tag('p', 'Width: ' . $currentsettings['imagecontainerwidth']); $o .= html_writer::tag('p', 'Ratio: ' . $ratios[$currentsettings['imagecontainerratio']]); $o .= html_writer::tag('p', 'Resize method: ' . $resizemethods[$currentsettings['imageresizemethod']]); $o .= html_writer::end_tag('div'); echo $o; require_once('test_footer.php'); // Remove original... $original->delete(); unset($original);
amoskarugaba/moodle
course/format/grid/test/image_test.php
PHP
gpl-3.0
7,159
<?php class OperationData { public static $tablename = "operation"; public function OperationData(){ $this->name = ""; $this->product_id = ""; $this->q = ""; $this->cut_id = ""; $this->operation_type_id = ""; $this->is_oficial = "0"; $this->created_at = "NOW()"; } public function add(){ $sql = "insert into ".self::$tablename." (product_id,q,operation_type_id,is_oficial,sell_id,created_at) "; $sql .= "value (\"$this->product_id\",\"$this->q\",$this->operation_type_id,\"$this->is_oficial\",$this->sell_id,$this->created_at)"; return Executor::doit($sql); } public function add_q(){ $sql = "update ".self::$tablename." set q=$this->q where id=$this->id"; Executor::doit($sql); } public static function delById($id){ $sql = "delete from ".self::$tablename." where id=$id"; Executor::doit($sql); } public function del(){ $sql = "delete from ".self::$tablename." where id=$this->id"; Executor::doit($sql); } // partiendo de que ya tenemos creado un objecto OperationData previamente utilizamos el contexto public function update(){ $sql = "update ".self::$tablename." set product_id=\"$this->product_id\",q=\"$this->q\",is_oficial=\"$this->is_oficial\" where id=$this->id"; Executor::doit($sql); } public static function getById($id){ $sql = "select * from ".self::$tablename." where id=$id"; $query = Executor::doit($sql); $found = null; $data = new OperationData(); while($r = $query[0]->fetch_array()){ $data->id = $r['id']; $data->product_id = $r['product_id']; $data->q = $r['q']; $data->is_oficial = $r['is_oficial']; $data->operation_type_id = $r['operation_type_id']; $data->sell_id = $r['sell_id']; $data->created_at = $r['created_at']; $found = $data; break; } return $found; } public static function getAll(){ $sql = "select * from ".self::$tablename." order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getAllDates(){ $sql = "select *,date(created_at) as d from ".self::$tablename." group by date(created_at) order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $array[$cnt]->d = $r['d']; $cnt++; } return $array; } public static function getAllByDate($start){ $sql = "select *,price_out as price,product.name as name,category.name as cname from ".self::$tablename." inner join product on (operation.product_id=product.id) inner join category on (product.category_id=category.id) inner join sell on (sell.id=operation.sell_id) where date(operation.created_at) = \"$start\" and is_applied=1 order by operation.created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->price = $r['price']; $array[$cnt]->name = $r['name']; $array[$cnt]->cname = $r['cname']; $array[$cnt]->unit = $r['unit']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getAllByDateAndCategoryId($start,$cat_id){ $sql = "select *,price_out as price,product.name as name,category.name as cname,product.unit as punit from ".self::$tablename." inner join sell on (sell.id=operation.sell_id) inner join product on (operation.product_id=product.id) inner join category on (product.category_id=category.id) where date(operation.created_at) = \"$start\" and product.category_id=$cat_id and sell.is_applied=1 order by operation.created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->price = $r['price']; $array[$cnt]->name = $r['name']; $array[$cnt]->cname = $r['cname']; $array[$cnt]->unit = $r['punit']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getAllByDateOfficial($start,$end){ $sql = "select * from ".self::$tablename." where date(created_at) > \"$start\" and date(created_at) <= \"$end\" order by created_at desc"; if($start == $end){ $sql = "select * from ".self::$tablename." where date(created_at) = \"$start\" order by created_at desc"; } $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getAllByDateOfficialBP($product, $start,$end){ $sql = "select * from ".self::$tablename." where date(created_at) > \"$start\" and date(created_at) <= \"$end\" and product_id=$product order by created_at desc"; if($start == $end){ $sql = "select * from ".self::$tablename." where date(created_at) = \"$start\" and product_id=$product order by created_at desc"; } $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public function getProduct(){ return ProductData::getById($this->product_id); } public function getOperationType(){ return OperationTypeData::getById($this->operation_type_id); } //////////////////////////////////////////////////////////////////// public static function getQ($product_id,$cut_id){ $q=0; $operations = self::getAllByProductIdCutId($product_id,$cut_id); $input_id = OperationTypeData::getByName("entrada")->id; $output_id = OperationTypeData::getByName("salida")->id; foreach($operations as $operation){ if($operation->operation_type_id==$input_id){ $q+=$operation->q; } else if($operation->operation_type_id==$output_id){ $q+=(-$operation->q); } } // print_r($data); return $q; } public static function getQYesF($product_id,$cut_id){ $q=0; $operations = self::getAllByProductIdCutId($product_id,$cut_id); $input_id = OperationTypeData::getByName("entrada")->id; $output_id = OperationTypeData::getByName("salida")->id; foreach($operations as $operation){ if($operation->is_oficial){ if($operation->operation_type_id==$input_id){ $q+=$operation->q; } else if($operation->operation_type_id==$output_id){ $q+=(-$operation->q); } } } // print_r($data); return $q; } public static function getQNoF($product_id,$cut_id){ $q = self::getQ($product_id,$cut_id); $f = self::getQYesF($product_id,$cut_id); return $q-$f; } public static function getAllByProductIdCutId($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getAllByProductIdCutIdOficial($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getAllByProductIdCutIdUnOficial($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id and is_oficial=0 order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getAllProductsBySellId($sell_id){ $sql = "select * from ".self::$tablename." where sell_id=$sell_id order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getAllByProductIdCutIdYesF($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getAllByProductIdCutIdNoF($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id and is_oficial=0 order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// public static function getOutputQ($product_id,$cut_id){ $q=0; $operations = self::getOutputByProductIdCutId($product_id,$cut_id); $input_id = OperationTypeData::getByName("entrada")->id; $output_id = OperationTypeData::getByName("salida")->id; foreach($operations as $operation){ if($operation->operation_type_id==$input_id){ $q+=$operation->q; } else if($operation->operation_type_id==$output_id){ $q+=(-$operation->q); } } // print_r($data); return $q; } public static function getOutputQYesF($product_id,$cut_id){ $q=0; $operations = self::getOutputByProductIdCutIdYesF($product_id,$cut_id); $input_id = OperationTypeData::getByName("entrada")->id; $output_id = OperationTypeData::getByName("salida")->id; foreach($operations as $operation){ if($operation->operation_type_id==$input_id){ $q+=$operation->q; } else if($operation->operation_type_id==$output_id){ $q+=(-$operation->q); } } // print_r($data); return $q; } public static function getOutputQNoF($product_id,$cut_id){ $q=0; $operations = self::getOutputByProductIdCutIdNoF($product_id,$cut_id); $input_id = OperationTypeData::getByName("entrada")->id; $output_id = OperationTypeData::getByName("salida")->id; foreach($operations as $operation){ if($operation->operation_type_id==$input_id){ $q+=$operation->q; } else if($operation->operation_type_id==$output_id){ $q+=(-$operation->q); } } // print_r($data); return $q; } public static function getOutputByProductIdCutId($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id and operation_type_id=2 order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getOutputByProductIdCutIdYesF($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id and operation_type_id=2 order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getOutputByProductIdCutIdNoF($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id and is_oficial=0 and operation_type_id=2 order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// public static function getInputQ($product_id,$cut_id){ $q=0; $operations = self::getInputByProductIdCutId($product_id,$cut_id); $input_id = OperationTypeData::getByName("entrada")->id; $output_id = OperationTypeData::getByName("salida")->id; foreach($operations as $operation){ if($operation->operation_type_id==$input_id){ $q+=$operation->q; } else if($operation->operation_type_id==$output_id){ $q+=(-$operation->q); } } // print_r($data); return $q; } public static function getInputQYesF($product_id,$cut_id){ $q=0; $operations = self::getInputByProductIdCutIdYesF($product_id,$cut_id); $input_id = OperationTypeData::getByName("entrada")->id; $output_id = OperationTypeData::getByName("salida")->id; foreach($operations as $operation){ if($operation->operation_type_id==$input_id){ $q+=$operation->q; } else if($operation->operation_type_id==$output_id){ $q+=(-$operation->q); } } // print_r($data); return $q; } public static function getInputQNoF($product_id,$cut_id){ $q=0; $operations = self::getInputByProductIdCutIdNoF($product_id,$cut_id); $input_id = OperationTypeData::getByName("entrada")->id; $output_id = OperationTypeData::getByName("salida")->id; foreach($operations as $operation){ if($operation->operation_type_id==$input_id){ $q+=$operation->q; } else if($operation->operation_type_id==$output_id){ $q+=(-$operation->q); } } // print_r($data); return $q; } public static function getInputByProductIdCutId($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id and operation_type_id=1 order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getInputByProductIdCutIdYesF($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id and operation_type_id=1 order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } public static function getInputByProductIdCutIdNoF($product_id,$cut_id){ $sql = "select * from ".self::$tablename." where product_id=$product_id and cut_id=$cut_id and is_oficial=0 and operation_type_id=1 order by created_at desc"; $query = Executor::doit($sql); $array = array(); $cnt = 0; while($r = $query[0]->fetch_array()){ $array[$cnt] = new OperationData(); $array[$cnt]->id = $r['id']; $array[$cnt]->product_id = $r['product_id']; $array[$cnt]->q = $r['q']; $array[$cnt]->is_oficial = $r['is_oficial']; $array[$cnt]->cut_id = $r['cut_id']; $array[$cnt]->operation_type_id = $r['operation_type_id']; $array[$cnt]->created_at = $r['created_at']; $cnt++; } return $array; } //////////////////////////////////////////////////////////////////////////// } ?>
cyberiaVirtual/kaluna_vta
core/modules/index/model/OperationData.php
PHP
gpl-3.0
19,750
/**************************************************************************** Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.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 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. ****************************************************************************/ /** * The main class of Armature, it plays armature animation, manages and updates bones' state. * @class * @extends ccs.Node * * @property {ccs.Bone} parentBone - The parent bone of the armature node * @property {ccs.ArmatureAnimation} animation - The animation * @property {ccs.ArmatureData} armatureData - The armature data * @property {String} name - The name of the armature * @property {cc.SpriteBatchNode} batchNode - The batch node of the armature * @property {Number} version - The version * @property {Object} body - The body of the armature * @property {ccs.ColliderFilter} colliderFilter - <@writeonly> The collider filter of the armature */ ccs.Armature = ccs.Node.extend(/** @lends ccs.Armature# */{ animation: null, armatureData: null, batchNode: null, _parentBone: null, _boneDic: null, _topBoneList: null, _armatureIndexDic: null, _offsetPoint: null, version: 0, _armatureTransformDirty: true, _body: null, _blendFunc: null, _className: "Armature", /** * Create a armature node. * Constructor of ccs.Armature * @param {String} name * @param {ccs.Bone} parentBone * @example * var armature = new ccs.Armature(); */ ctor: function (name, parentBone) { cc.Node.prototype.ctor.call(this); this._name = ""; this._topBoneList = []; this._armatureIndexDic = {}; this._offsetPoint = cc.p(0, 0); this._armatureTransformDirty = true; this._blendFunc = {src: cc.BLEND_SRC, dst: cc.BLEND_DST}; name && ccs.Armature.prototype.init.call(this, name, parentBone); // Hack way to avoid RendererWebGL from skipping Armature this._texture = {}; }, /** * Initializes a CCArmature with the specified name and CCBone * @param {String} [name] * @param {ccs.Bone} [parentBone] * @return {Boolean} */ init: function (name, parentBone) { if (parentBone) this._parentBone = parentBone; this.removeAllChildren(); this.animation = new ccs.ArmatureAnimation(); this.animation.init(this); this._boneDic = {}; this._topBoneList.length = 0; //this._name = name || ""; var armatureDataManager = ccs.armatureDataManager; var animationData; if (name !== "") { //animationData animationData = armatureDataManager.getAnimationData(name); cc.assert(animationData, "AnimationData not exist!"); this.animation.setAnimationData(animationData); //armatureData var armatureData = armatureDataManager.getArmatureData(name); cc.assert(armatureData, "ArmatureData not exist!"); this.armatureData = armatureData; //boneDataDic var boneDataDic = armatureData.getBoneDataDic(); for (var key in boneDataDic) { var bone = this.createBone(String(key)); //! init bone's Tween to 1st movement's 1st frame do { var movData = animationData.getMovement(animationData.movementNames[0]); if (!movData) break; var _movBoneData = movData.getMovementBoneData(bone.getName()); if (!_movBoneData || _movBoneData.frameList.length <= 0) break; var frameData = _movBoneData.getFrameData(0); if (!frameData) break; bone.getTweenData().copy(frameData); bone.changeDisplayWithIndex(frameData.displayIndex, false); } while (0); } this.update(0); this.updateOffsetPoint(); } else { name = "new_armature"; this.armatureData = new ccs.ArmatureData(); this.armatureData.name = name; animationData = new ccs.AnimationData(); animationData.name = name; armatureDataManager.addArmatureData(name, this.armatureData); armatureDataManager.addAnimationData(name, animationData); this.animation.setAnimationData(animationData); } this._renderCmd.initShaderCache(); this.setCascadeOpacityEnabled(true); this.setCascadeColorEnabled(true); return true; }, visit: function (parent) { var cmd = this._renderCmd, parentCmd = parent ? parent._renderCmd : null; // quick return if not visible if (!this._visible) { cmd._propagateFlagsDown(parentCmd); return; } cmd.visit(parentCmd); cmd._dirtyFlag = 0; }, addChild: function (child, localZOrder, tag) { if (child instanceof ccui.Widget) { cc.log("Armature doesn't support to add Widget as its child, it will be fix soon."); return; } cc.Node.prototype.addChild.call(this, child, localZOrder, tag); }, /** * create a bone with name * @param {String} boneName * @return {ccs.Bone} */ createBone: function (boneName) { var existedBone = this.getBone(boneName); if (existedBone) return existedBone; var boneData = this.armatureData.getBoneData(boneName); var parentName = boneData.parentName; var bone = null; if (parentName) { this.createBone(parentName); bone = new ccs.Bone(boneName); this.addBone(bone, parentName); } else { bone = new ccs.Bone(boneName); this.addBone(bone, ""); } bone.setBoneData(boneData); bone.getDisplayManager().changeDisplayWithIndex(-1, false); return bone; }, /** * Add a Bone to this Armature * @param {ccs.Bone} bone The Bone you want to add to Armature * @param {String} parentName The parent Bone's name you want to add to. If it's null, then set Armature to its parent */ addBone: function (bone, parentName) { cc.assert(bone, "Argument must be non-nil"); var locBoneDic = this._boneDic; if (bone.getName()) cc.assert(!locBoneDic[bone.getName()], "bone already added. It can't be added again"); if (parentName) { var boneParent = locBoneDic[parentName]; if (boneParent) boneParent.addChildBone(bone); else this._topBoneList.push(bone); } else this._topBoneList.push(bone); bone.setArmature(this); locBoneDic[bone.getName()] = bone; this.addChild(bone); }, /** * Remove a bone with the specified name. If recursion it will also remove child Bone recursively. * @param {ccs.Bone} bone The bone you want to remove * @param {Boolean} recursion Determine whether remove the bone's child recursion. */ removeBone: function (bone, recursion) { cc.assert(bone, "bone must be added to the bone dictionary!"); bone.setArmature(null); bone.removeFromParent(recursion); cc.arrayRemoveObject(this._topBoneList, bone); delete this._boneDic[bone.getName()]; this.removeChild(bone, true); }, /** * Gets a bone with the specified name * @param {String} name The bone's name you want to get * @return {ccs.Bone} */ getBone: function (name) { return this._boneDic[name]; }, /** * Change a bone's parent with the specified parent name. * @param {ccs.Bone} bone The bone you want to change parent * @param {String} parentName The new parent's name */ changeBoneParent: function (bone, parentName) { cc.assert(bone, "bone must be added to the bone dictionary!"); var parentBone = bone.getParentBone(); if (parentBone) { cc.arrayRemoveObject(parentBone.getChildren(), bone); bone.setParentBone(null); } if (parentName) { var boneParent = this._boneDic[parentName]; if (boneParent) { boneParent.addChildBone(bone); cc.arrayRemoveObject(this._topBoneList, bone); } else this._topBoneList.push(bone); } }, /** * Get CCArmature's bone dictionary * @return {Object} Armature's bone dictionary */ getBoneDic: function () { return this._boneDic; }, /** * Set contentSize and Calculate anchor point. */ updateOffsetPoint: function () { // Set contentsize and Calculate anchor point. var rect = this.getBoundingBox(); this.setContentSize(rect); var locOffsetPoint = this._offsetPoint; locOffsetPoint.x = -rect.x; locOffsetPoint.y = -rect.y; if (rect.width !== 0 && rect.height !== 0) this.setAnchorPoint(locOffsetPoint.x / rect.width, locOffsetPoint.y / rect.height); }, getOffsetPoints: function () { return {x: this._offsetPoint.x, y: this._offsetPoint.y}; }, /** * Sets animation to this Armature * @param {ccs.ArmatureAnimation} animation */ setAnimation: function (animation) { this.animation = animation; }, /** * Gets the animation of this Armature. * @return {ccs.ArmatureAnimation} */ getAnimation: function () { return this.animation; }, /** * armatureTransformDirty getter * @returns {Boolean} */ getArmatureTransformDirty: function () { return this._armatureTransformDirty; }, /** * The update callback of ccs.Armature, it updates animation's state and updates bone's state. * @override * @param {Number} dt */ update: function (dt) { this.animation.update(dt); var locTopBoneList = this._topBoneList; for (var i = 0; i < locTopBoneList.length; i++) locTopBoneList[i].update(dt); this._armatureTransformDirty = false; }, /** * The callback when ccs.Armature enter stage. * @override */ onEnter: function () { cc.Node.prototype.onEnter.call(this); this.scheduleUpdate(); }, /** * The callback when ccs.Armature exit stage. * @override */ onExit: function () { cc.Node.prototype.onExit.call(this); this.unscheduleUpdate(); }, /** * This boundingBox will calculate all bones' boundingBox every time * @returns {cc.Rect} */ getBoundingBox: function () { var minX, minY, maxX, maxY = 0; var first = true; var boundingBox = cc.rect(0, 0, 0, 0), locChildren = this._children; var len = locChildren.length; for (var i = 0; i < len; i++) { var bone = locChildren[i]; if (bone) { var r = bone.getDisplayManager().getBoundingBox(); if (r.x === 0 && r.y === 0 && r.width === 0 && r.height === 0) continue; if (first) { minX = r.x; minY = r.y; maxX = r.x + r.width; maxY = r.y + r.height; first = false; } else { minX = r.x < boundingBox.x ? r.x : boundingBox.x; minY = r.y < boundingBox.y ? r.y : boundingBox.y; maxX = r.x + r.width > boundingBox.x + boundingBox.width ? r.x + r.width : boundingBox.x + boundingBox.width; maxY = r.y + r.height > boundingBox.y + boundingBox.height ? r.y + r.height : boundingBox.y + boundingBox.height; } boundingBox.x = minX; boundingBox.y = minY; boundingBox.width = maxX - minX; boundingBox.height = maxY - minY; } } return cc.rectApplyAffineTransform(boundingBox, this.getNodeToParentTransform()); }, /** * when bone contain the point ,then return it. * @param {Number} x * @param {Number} y * @returns {ccs.Bone} */ getBoneAtPoint: function (x, y) { var locChildren = this._children; for (var i = locChildren.length - 1; i >= 0; i--) { var child = locChildren[i]; if (child instanceof ccs.Bone && child.getDisplayManager().containPoint(x, y)) return child; } return null; }, /** * Sets parent bone of this Armature * @param {ccs.Bone} parentBone */ setParentBone: function (parentBone) { this._parentBone = parentBone; var locBoneDic = this._boneDic; for (var key in locBoneDic) { locBoneDic[key].setArmature(this); } }, /** * Return parent bone of ccs.Armature. * @returns {ccs.Bone} */ getParentBone: function () { return this._parentBone; }, /** * draw contour */ drawContour: function () { cc._drawingUtil.setDrawColor(255, 255, 255, 255); cc._drawingUtil.setLineWidth(1); var locBoneDic = this._boneDic; for (var key in locBoneDic) { var bone = locBoneDic[key]; var detector = bone.getColliderDetector(); if (!detector) continue; var bodyList = detector.getColliderBodyList(); for (var i = 0; i < bodyList.length; i++) { var body = bodyList[i]; var vertexList = body.getCalculatedVertexList(); cc._drawingUtil.drawPoly(vertexList, vertexList.length, true); } } }, setBody: function (body) { if (this._body === body) return; this._body = body; this._body.data = this; var child, displayObject, locChildren = this._children; for (var i = 0; i < locChildren.length; i++) { child = locChildren[i]; if (child instanceof ccs.Bone) { var displayList = child.getDisplayManager().getDecorativeDisplayList(); for (var j = 0; j < displayList.length; j++) { displayObject = displayList[j]; var detector = displayObject.getColliderDetector(); if (detector) detector.setBody(this._body); } } } }, getShapeList: function () { if (this._body) return this._body.shapeList; return null; }, getBody: function () { return this._body; }, /** * Sets the blendFunc to ccs.Armature * @param {cc.BlendFunc|Number} blendFunc * @param {Number} [dst] */ setBlendFunc: function (blendFunc, dst) { if (dst === undefined) { this._blendFunc.src = blendFunc.src; this._blendFunc.dst = blendFunc.dst; } else { this._blendFunc.src = blendFunc; this._blendFunc.dst = dst; } }, /** * Returns the blendFunc of ccs.Armature * @returns {cc.BlendFunc} */ getBlendFunc: function () { return new cc.BlendFunc(this._blendFunc.src, this._blendFunc.dst); }, /** * set collider filter * @param {ccs.ColliderFilter} filter */ setColliderFilter: function (filter) { var locBoneDic = this._boneDic; for (var key in locBoneDic) locBoneDic[key].setColliderFilter(filter); }, /** * Returns the armatureData of ccs.Armature * @return {ccs.ArmatureData} */ getArmatureData: function () { return this.armatureData; }, /** * Sets armatureData to this Armature * @param {ccs.ArmatureData} armatureData */ setArmatureData: function (armatureData) { this.armatureData = armatureData; }, getBatchNode: function () { return this.batchNode; }, setBatchNode: function (batchNode) { this.batchNode = batchNode; }, /** * version getter * @returns {Number} */ getVersion: function () { return this.version; }, /** * version setter * @param {Number} version */ setVersion: function (version) { this.version = version; }, _createRenderCmd: function () { if (cc._renderType === cc.game.RENDER_TYPE_CANVAS) return new ccs.Armature.CanvasRenderCmd(this); else return new ccs.Armature.WebGLRenderCmd(this); } }); var _p = ccs.Armature.prototype; /** @expose */ _p.parentBone; cc.defineGetterSetter(_p, "parentBone", _p.getParentBone, _p.setParentBone); /** @expose */ _p.body; cc.defineGetterSetter(_p, "body", _p.getBody, _p.setBody); /** @expose */ _p.colliderFilter; cc.defineGetterSetter(_p, "colliderFilter", null, _p.setColliderFilter); _p = null; /** * Allocates an armature, and use the ArmatureData named name in ArmatureDataManager to initializes the armature. * @param {String} [name] Bone name * @param {ccs.Bone} [parentBone] the parent bone * @return {ccs.Armature} * @deprecated since v3.1, please use new construction instead */ ccs.Armature.create = function (name, parentBone) { return new ccs.Armature(name, parentBone); };
corumcorp/redsentir
redsentir/static/juego/frameworks/cocos2d-html5/extensions/cocostudio/armature/CCArmature.js
JavaScript
gpl-3.0
18,849
#!/bin/sh groff -t -e -mandoc -Tlatin1 man/fucheck.1 > MANUAL
fepz/fucheck
generateTextManual.sh
Shell
gpl-3.0
62
#include "jednostki.h" #include "generatormt.h" #include "nucleus_data.h" #include "calg5.h" #include "util2.h" using namespace std; template < class T > static inline T pow2 (T x) { return x * x; } static inline double bessj0(double x) { if(fabs(x)<0.000001) return cos(x); else return sin(x)/x; } static double MI2(double rms2, double q,double r) { double qr=q*r; double r2=r*r; double cosqr=cos(qr); double sinqr=sin(qr); return (((((cosqr*qr/6-sinqr/2)*qr-cosqr)*qr+sinqr)*rms2/r2 + sinqr)/r - cosqr*q)/r2; } static double MI(double rms2, double q,double r) { double qr=q*r; double r2=r*r; double r3=r2*r; double cosqr=cos(qr); double sinqr=sin(qr); return (-cosqr*qr+sinqr)/r3 // + (((cosqr*qr/6-sinqr/2)*qr -cosqr)*qr+sinqr)*rms2/r2/r3; +(cosqr*qr*qr-2*cosqr-2*sinqr*qr)/r2/r2/6; } static double prfMI(double t[3], double r) { static double const twoPi2=2*Pi*Pi; if(r==0) r=0.00001; double rms2=t[0]*t[0]; return max(0.0, (MI2(rms2,200,r)-MI2(rms2,0.01,r))/twoPi2); } ///density profile for the HO model static double prfHO(double t[3], double r) { double x=r/t[0],x2=x*x; return t[2]*(1+t[1]*x2)*exp(-x2); } ///density profile for the MHO model static double prfMHO(double t[3], double r) { double x=r/t[0]; return (t[2]*(1+t[1]*x*x)*exp(-x*x)); } ///density profile for the 2pF model static double prf2pF(double t[3], double r) { return t[2]/(1.+exp((r-t[0])/t[1])); } ///density profile for the 3pF model static double prf3pF(double t[4], double r) { double x=r/t[0]; return t[3]* (1+t[2]*x*x) /(1+exp((r-t[0])/t[1])); } ///density profile for the 3pG model static double prf3pG(double t[4], double r) { double x=r/t[0], x2=x*x; return max(0.,t[3]*(1+t[2]*x2)/(1+exp((r*r-t[0]*t[0])/(t[1]*t[1])))); } ///density profile for the FB model static double prfFB(double fb[], double r) { if(r>fb[0]) // fb[0]- radius return 0; double suma=0; double x=Pi*r/fb[0]; for(int j=1; j<=17 and fb[j] ; j++) { suma+=fb[j]*bessj0(j*x); } return max(0.,suma); } ///density profile for the SOG model static double prfSOG(double sog[],double r) { static const double twoPi32=2*Pi*sqrt(Pi); //double rms=sog[0]; double g=sog[1]/sqrt(1.5); double coef=twoPi32*g*g*g; double suma=0; for(int j=2; j<25 ; j+=2) { double Ri=sog[j]; double Qi=sog[j+1]; double Ai=Qi/(coef*(1+2*pow2(Ri/g))); suma+=Ai*(exp(-pow2((r-Ri)/g))+exp(-pow2((r+Ri)/g))); } return max(0.,suma); } static double prfUG(double ug[],double r) { double xi=1.5/ug[0]/ug[0]; return ug[1]*exp( -r*r*xi); } // Uniform Gaussian model static double ug_11_12 [2]= {2.946, 0.296785}; // Harmonic-oscillator model (HO): a, alfa, rho0(calculated) static double ho_3_4 [3]= {1.772 , 0.327, 0.151583}; static double ho_4_5 [3]= {1.776 , 0.631, 0.148229}; static double ho_5_5 [3]= {1.718 , 0.837, 0.157023}; static double ho_5_6 [3]= {1.698 , 0.811, 0.182048}; static double ho_8_8 [3]= {1.83314, 1.544, 0.140667}; static double ho_8_9 [3]= {1.79818, 1.498, 0.161712}; static double ho_8_10[3]= {1.84114, 1.513, 0.158419}; // Modified harmonic-oscillator model (MHO): a, alfa, rho0(calculated) static double mho_6_7[3]= {1.6359, 1.40316, 0.171761}; static double mho_6_8[3]= {1.734 , 1.3812 , 0.156987}; // show MI złe rms-y static double mi_1_0[4]= {0.86212 , 0.36 , 1.18 ,1}; static double mi_1_1[4]= {2.1166 , 0.21 , 0.77 ,1}; static double mi_2_1[4]= {1.976 , 0.45 , 1.92 ,1}; static double mi_2_2[4]= {1.67114 , 0.51 , 2.01 ,1}; // Two-parameter Fermi model: c=a , z=alfa, rho0(calculated) static double _2pF_9_10 [3]= {2.58 ,0.567 ,0.178781}; static double _2pF_10_10[3]= {2.740 ,0.572 ,0.162248}; static double _2pF_10_12[3]= {2.782 ,0.549 ,0.176167}; static double _2pF_12_12[3]= {2.98 ,0.55132,0.161818}; static double _2pF_12_14[3]= {3.05 ,0.523 ,0.16955 }; static double _2pF_13_14[3]= {2.84 ,0.569 ,0.201502}; static double _2pF_18_18[3]= {3.54 ,0.507 ,0.161114}; static double _2pF_18_22[3]= {3.53 ,0.542 ,0.176112}; static double _2pF_22_26[3]= {3.84315,0.5885 ,0.163935}; static double _2pF_23_28[3]= {3.94 ,0.505 ,0.17129 }; static double _2pF_24_26[3]= {3.941 ,0.5665 ,0.161978}; static double _2pF_24_28[3]= {4.01015,0.5785 ,0.159698}; static double _2pF_24_29[3]= {4.000 ,0.557 ,0.165941}; static double _2pF_25_30[3]= {3.8912 ,0.567 ,0.184036}; static double _2pF_26_28[3]= {4.074 ,0.536 ,0.162833}; static double _2pF_26_30[3]= {4.111 ,0.558 ,0.162816}; static double _2pF_26_32[3]= {4.027 ,0.576 ,0.176406}; static double _2pF_27_32[3]= {4.158 ,0.575 ,0.164824}; static double _2pF_29_34[3]= {4.218 ,0.596 ,0.167424}; static double _2pF_29_36[3]= {4.252 ,0.589 ,0.169715}; static double _2pF_30_34[3]= {4.285 ,0.584 ,0.164109}; static double _2pF_30_36[3]= {4.340 ,0.559 ,0.165627}; static double _2pF_30_38[3]= {4.393 ,0.544 ,0.166314}; static double _2pF_30_40[3]= {4.426 ,0.551 ,0.167171}; static double _2pF_32_38[3]= {4.442 ,0.5857 ,0.162741}; static double _2pF_32_40[3]= {4.452 ,0.5737 ,0.167365}; static double _2pF_38_50[3]= {4.83 ,0.49611,0.168863}; static double _2pF_39_50[3]= {4.76 ,0.57129,0.172486}; static double _2pF_41_52[3]= {4.875 ,0.57329,0.168620}; static double _2pF_79_118[3]={6.386 ,0.53527, 0.168879}; static double _2pF_Th232a[3]={6.7915 ,0.57115, 0.165272}; static double _2pF_Th232b[3]={6.851 ,0.518 , 0.163042}; static double _2pF_U238a[3]= {6.8054 ,0.60516, 0.167221}; static double _2pF_U238b[3]= {6.874 ,0.556 , 0.164318}; // Three-parameter Fermi model: c=a , z=alfa, w, rho0 (calculated) static double _3pF_7_7[4]= {2.57000 ,0.5052 ,-0.18070 ,0.0127921 }; static double _3pF_7_8[4]= {2.33430 ,0.4985 , 0.13930 ,0.011046 }; static double _3pF_12_12a[4]={3.10833 ,0.6079 ,-0.16330 ,0.00707021}; static double _3pF_12_12b[4]={3.19234 ,0.6046 ,-0.24920 ,0.00742766}; static double _3pF_12_13[4]= {3.22500 ,0.5840 ,-0.23634 ,0.00714492}; static double _3pF_14_14[4]= {3.34090 ,0.5803 ,-0.23390 ,0.00646414}; static double _3pF_14_15[4]= {3.33812 ,0.5472 ,-0.20312 ,0.00631729}; static double _3pF_14_16[4]= {3.25221 ,0.5532 ,-0.07822 ,0.00585623}; static double _3pF_15_16[4]= {3.36925 ,0.5826 ,-0.17324 ,0.00584405}; static double _3pF_17_18[4]= {3.47632 ,0.5995 ,-0.102 ,0.00489787}; static double _3pF_17_20[4]= {3.55427 ,0.5885 ,-0.132 ,0.0048052 }; static double _3pF_19_20[4]= {3.74325 ,0.5856 ,-0.2012 ,0.00451813}; static double _3pF_20_20[4]= {3.76623 ,0.5865 ,-0.16123 ,0.00424562}; static double _3pF_20_28[4]= {3.7369 ,0.5245 ,-0.030 ,0.00393303}; static double _3pF_28_30[4]= {4.3092 ,0.5169 ,-0.1308 ,0.00291728}; static double _3pF_28_32[4]= {4.4891 ,0.5369 ,-0.2668 ,0.00293736}; static double _3pF_28_33[4]= {4.4024 ,0.5401 ,-0.1983 ,0.00290083}; static double _3pF_28_34[4]= {4.4425 ,0.5386 ,-0.2090 ,0.0028575 }; static double _3pF_28_36[4]= {4.5211 ,0.5278 ,-0.2284 ,0.00277699}; // Three-parameter Gaussian model: c=a, z=alfa, w , rho0 (calculated) static double _3pG_16_16[4]= {2.549 ,2.1911 ,0.16112 ,0.00700992}; static double _3pG_40_50[4]= {4.434 ,2.5283 ,0.35025 ,0.00184643}; static double _3pG_40_51[4]= {4.32520 ,2.5813 ,0.43325 ,0.00181638}; static double _3pG_40_52[4]= {4.45520 ,2.5503 ,0.33425 ,0.00183439}; static double _3pG_40_54[4]= {4.49420 ,2.5853 ,0.29625 ,0.00182715}; static double _3pG_40_56[4]= {4.50320 ,2.6023 ,0.34125 ,0.00175563}; static double _3pG_42_50[4]= {4.6110 ,2.527 ,0.1911 ,0.0018786 }; //H3(1,2)Be84 static double fb_1_2[18]={3.5, 0.25182e-1, 0.34215e-1, 0.15257e-1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0}; //He3(2,1)Re84bs static double fb_2_1[18]={5, 0.20020e-1, 0.41934e-1, 0.36254e-1, 0.17941e-1, 0.46608e-2, 0.46834e-2, 0.52042e-2, 0.38280e-2, 0.25661e-2, 0.14182e-2, 0.61390e-3, 0.22929e-3}; //C12(6,6)Ca80 static double fb_6_6a[18]={8.0, 0.15721e-1, 0.38732e-1, 0.36808e-1, 0.14671e-1,-0.43277e-2, -0.97752e-2,-0.68908e-2,-0.27631e-2,-0.63568e-3, 0.71809e-5, 0.18441e-3, 0.75066e-4, 0.51069e-4, 0.14308e-4, 0.23170e-5, 0.68465e-6, 0}; //C12(6,6)Re82 static double fb_6_6b[18]={8.0, 0.15737e-1, 0.38897e-1, 0.37085e-1, 0.14795e-1,-0.44831e-2, -0.10057e-1,-0.68696e-2,-0.28813e-2,-0.77229e-3, 0.66908e-4, 0.10636e-3,-0.36864e-4,-0.50135e-5, 0.94550e-5,-0.47687e-5, 0, 0}; //N15(7,8)Vr86 static double fb_7_8[18]={7.0, 0.25491e-1, 0.50618e-1, 0.29822e-1, -0.55196e-2, -0.15913e-1, -0.76184e-2,-0.23992e-2,-0.47940e-3, 0, 0, 0, 0, 0, 0, 0, 0, 0}; //O16(8,8)La82 static double fb_8_8[18]= {8.0, 0.20238e-1, 0.44793e-1, 0.33533e-1, 0.35030e-2,-0.12293e-1, -0.10329e-1,-0.34036e-2,-0.41627e-3,-0.94435e-3,-0.25771e-3, 0.23759e-3,-0.10603e-3, 0.41480e-4, 0,0, 0, 0}; //Al27(13,14)Ro86 static double fb_13_14[18]={7.0, 0.43418e-1, 0.60298e-1, 0.28950e-2,-0.23522e-1,-0.79791e-2, 0.23010e-2, 0.10794e-2, 0.12574e-3,-0.13021e-3, 0.56563e-4, -0.18011e-4, 0.42869e-5, 0, 0, 0, 0,0}; //Si28(14,14)Mi82 static double fb_14_14[18]={8.0, 0.33495e-1, 0.59533e-1, 0.20979e-1,-0.16900e-1,-0.14998e-1, -0.93248e-3, 0.33266e-2, 0.59244e-3,-0.40013e-3, 0.12242e-3, -0.12994e-4,-0.92784e-5, 0.72595e-5,-0.42096e-5, 0, 0, 0}; //Si29(14,15)Mi82 static double fb_14_15[18]={8.0, 0.33521e-1, 0.59679e-1, 0.20593e-1,-0.18646e-1,-0.1655e-1, -0.11922e-2, 0.28025e-2,-0.67353e-4,-0.34619e-3, 0.17611e-3, -0.57173e-5, 0.12371e-4, 0, 0, 0, 0, 0}; //Si30(14,16)Mi82 static double fb_14_16[18]={8.5, 0.28397e-1, 0.54163e-1, 0.25167e-1,-0.12858e-1,-0.17592e-1, -0.46722e-2, 0.24804e-2, 0.14760e-2,-0.30168e-3, 0.48346e-4, 0.00000e0, -0.51570e-5, 0.30261e-5, 0, 0, 0, 0}; //P31(15,16)Mi82 static double fb_15_16[18]={8.0, 0.35305e-1, 0.59642e-1, 0.17274e-1,-0.19303e-1,-0.13545e-1, 0.63209e-3, 0.35462e-2, 0.83653e-3,-0.47904e-3, 0.19099e-3, -0.69611e-4, 0.23196e-4, -0.77780e-5,0,0, 0,0}; //S32(16,16)Ry83b static double fb_16_16[18]={8.0, 0.37251e-1, 0.60248e-1, 0.14748e-1,-0.18352e-1,-0.10347e-1, 0.30461e-2, 0.35277e-2,-0.39834e-4,-0.97177e-4, 0.92279e-4, -0.51931e-4, 0.22958e-4,-0.86609e-5, 0.28879e-5,-0.86632e-6, 0, 0}; //S34(16,18)Ry83b static double fb_16_18[18]={8,0.37036e-1, 0.58506e-1, 0.12082e-1,-0.19022e-1,-0.83421e-2, 0.45434e-2, 0.28346e-2,-0.52304e-3, 0.27754e-4, 0.59403e-4, -0.42794e-4, 0.20407e-4,-0.79934e-5, 0.27354e-5,-0.83914e-6, 0, 0}; //S36(16,29)Ry83b static double fb_16_20[18]={8,0.37032e-1, 0.57939e-1, 0.10049e-1,-0.19852e-1,-0.67176e-2, 0.61882e-2, 0.37795e-2,-0.55272e-3,-0.12904e-3, 0.15845e-3, -0.84063e-4, 0.34010e-4,-0.11663e-4, 0.35204e-5, 0.95135e-6, 0, 0}; //Ar40(18,22)Ot82 static double fb_18_22[18]={9.0, 0.30451e-1, 0.55337e-1, 0.20203e-1,-0.16765e-1,-0.13578e-1, -0.43204e-4, 0.91988e-3,-0.41205e-3, 0.11971e-3,-0.19801e-4, -0.43204e-5, 0.61205e-5,-0.37803e-5, 0.18001e-5,-0.77407e-6, 0, 0}; //Ca40(20,20)Em83b static double fb_20_20[18]={8.0, 0.44846e-1, 0.61326e-1,-0.16818e-2,-0.26217e-1,-0.29725e-2, 0.85534e-2, 0.35322e-2,-0.48258e-3,-0.39346e-3, 0.20338e-3, 0.25461e-4,-0.17794e-4, 0.67394e-5,-0.21033e-5, 0, 0,0}; //Ca48(20,24)Em83b static double fb_20_24[18]={8.0, 0.44782e-1, 0.59523e-1,-0.74148e-2,-0.29466e-1,-0.28350e-3, 0.10829e-1, 0.30465e-2,-0.10237e-2,-0.17830e-3, 0.55391e-4, -0.22644e-4, 0.82671e-5,-0.27343e-5, 0.82461e-6,-0.22780e-6, 0,0}; //Ti48(22,26)Se85 static double fb_22_26[18]={10.0, 0.27850e-1, 0.55432e-1, 0.26369e-1,-0.17091e-1,-0.21798e-1, -0.24889e-2, 0.76631e-2, 0.34554e-2,-0.67477e-3, 0.10764e-3, -0.16564e-5,-0.55566e-5, 0, 0, 0, 0, 0}; //Ti48(22,28)Se85 static double fb_22_28[18]={9.5, 0.31818e-1, 0.58556e-1, 0.19637e-1,-0.24309e-1,-0.18748e-1, 0.33741e-2, 0.89961e-2, 0.37954e-2,-0.41238e-3, 0.12540e-3, 0, 0, 0, 0, 0, 0, 0}; //Cr50(24,26)Li83c static double fb_24_26[18]={9.0, 0.39174e-1, 0.61822e-1, 0.68550e-2,-0.30170e-1,-0.98745e-2, 0.87944e-2, 0.68502e-2,-0.93609e-3,-0.24962e-2,-0.15361e-2, -0.73687e-3, 0,0,0,0, 0,0}; //Cr52(24,28)Li83c static double fb_24_28[18]={9.0, 0.39287e-1, 0.62477e-1, 0.62482e-2,-0.32885e-1,-0.10648e-1, 0.10520e-1, 0.85478e-2,-0.24003e-3,-0.20499e-2,-0.12001e-2, -0.56649e-3, 0 ,0 ,0,0, 0,0}; //Cr54(24,30)Li83c static double fb_24_30[18]={9.0, 0.39002e-1, 0.60305e-1, 0.45845e-2,-0.30723e-1,-0.91355e-2, 0.93251e-2, 0.60583e-2,-0.15602e-2,-0.76809e-3, 0.76809e-3, -0.34804e-3, 0, 0, 0, 0, 0, 0}; //Fe54(26,28)Wo76 static double fb_26_28[18]={9.0, 0.42339e-1, 0.64428e-1, 0.15840e-2,-0.35171e-1,-0.10116e-1, 0.12069e-1, 0.62230e-2,-0.12045e-2, 0.13561e-3, 0.10428e-4, -0.16980e-4, 0.91817e-5,-0.39988e-5, 0.15731e-5,-0.57862e-6, 0.20186e-6,-0.67892e-7}; //Fe56(26,30)Wo76 static double fb_26_30[18]={9.0, 0.42018e-1, 0.62337e-1, 0.23995e-3,-0.32776e-1,-0.79941e-2, 0.10844e-1, 0.49123e-2,-0.22144e-2,-0.18146e-3, 0.37261e-3, -0.23296e-3, 0.11494e-3,-0.50596e-4, 0.20652e-4,-0.79428e-5, 0.28986e-5,-0.10075e-5}; //Fe58(26,32)Wo76 static double fb_26_32[18]={9.0, 0.41791e-1, 0.60524e-1,-0.14978e-2,-0.31183e-1,-0.58013e-2, 0.10611e-1, 0.41629e-2,-0.29045e-5, 0.54106e-3,-0.38689e-3, 0.20514e-3,-0.95237e-4, 0.40707e-4,-0.16346e-1, 0.62233e-5, -0.22568e-5, 0.78077e-6}; //Co59(27,32)Sc77 static double fb_27_32[18]={9.0, 0.43133e-1, 0.61249e-1,-0.32523e-2,-0.32681e-1,-0.49583e-2, 0.11494e-1, 0.55428e-2, 0.31398e-3,-0.70578e-4, 0.53725e-5, -0.74650e-6, 0.19793e-5,-0.28059e-5, 0.27183e-5,-0.19454e-5, 0.10963e-5,-0.51114e-6}; //Ni58(28,30)Be83 static double fb_28_30a[18]={9.0, 0.44880e-1, 0.64756e-1,-0.27899e-2,-0.37016e-1,-0.71915e-2, 0.13594e-1, 0.66331e-2,-0.14095e-2,-0.10141e-2, 0.38616e-3, -0.13871e-3, 0.47788e-4,-0.15295e-4, 0.59131e-5,-0.67880e-5, 0,0}; //Ni58(28,30)Wo76 static double fb_28_30b[18]={9.0, 0.45030e-1, 0.65044e-1,-0.32843e-2,-0.36241e-1,-0.67442e-2, 0.13146e-1, 0.50903e-2,-0.20787e-2, 0.12901e-3, 0.14828e-3, -0.11530e-3, 0.60881e-4,-0.27676e-4, 0.11506e-4, 0.44764e-5, 0.16468e-5,-0.57496e-6}; //Ni60(28,32)Be83 static double fb_28_32a[18]={9.0, 0.44668e-1, 0.63072e-1,-0.42797e-2,-0.34806e-1,-0.48625e-2, 0.12794e-1, 0.54401e-2,-0.14075e-2,-0.76976e-3, 0.33487e-3, -0.13141e-3, 0.52132e-4,-0.20394e-4, 0.59131e-5,-0.67880e-5, 0,0}; //Ni60(28,32)Wo76 static double fb_28_32b[18]={9.0, 0.44855e-1, 0.63476e-1,-0.51001e-2,-0.34496e-1,-0.43132e-2, 0.12767e-1, 0.49935e-2,-0.92940e-3, 0.28281e-3,-0.76557e-4, 0.18677e-4, 0.36855e-5,-0.32276e-6, 0.19843e-6, 0.16275e-6, -0.82891e-7,-0.34896e-7}; //Ni60(28,32)Wo80 static double fb_28_32c[18]={9.0, 0.44142e-1, 0.62987e-1,-0.49864e-2,-0.34306e-1,-0.44060e-2, 0.12810e-1, 0.46914e-2,-0.84373e-3, 0.36928e-3,-0.15003e-3, 0.59665e-4,-0.23215e-4, 0.88005e-5,-0.32305e-5, 0.11496e-5, -0.39658e-6, 0.13145e-6}; //Ni62(28,34)Wo76 static double fb_28_34[18]={9.0, 0.44581e-1, 0.61478e-1,-0.69425e-2,-0.33126e-1,-0.24964e-2, 0.12674e-1, 0.37148e-2,-0.20881e-2, 0.30193e-3, 0.57573e-4, -0.77965e-4, 0.46906e-4,-0.22724e-4, 0.98243e-5,-0.39250e-5, 0.14732e-5, 0.52344e-6}; //Ni64(28,36)Wo76 static double fb_28_36[18]={9.0, 0.44429e-1, 0.60116e-1,-0.92003e-2,-0.33452e-1,-0.52856e-3, 0.13156e-1, 0.35152e-2,-0.21671e-2, 0.46497e-4, 0.25366e-3, -0.18438e-2, 0.96874e-4,-0.44224e-4, 0.18493e-4,-0.72361e-5, -0.72361e-5,-0.93929e-6}; //Cu63(29,34)Sc77 static double fb_29_34[18]={9.0, 0.45598e-1, 0.60706e-1,-0.78616e-2,-0.31638e-1,-0.14447e-2, 0.10953e-1, 0.42578e-2,-0.24224e-3,-0.30067e-3, 0.23903e-3, -0.12910e-3, 0.60195e-4,-0.25755e-4, 0.10332e-4,-0.39330e-5, 0.14254e-5,-0.49221e-6}; //Cu65(29,36)Sc77 static double fb_29_36[18]={9.0, 0.45444e-1, 0.59544e-1,-0.94968e-2,-0.31561e-1, 0.22898e-3, 0.11189e-1, 0.37360e-2,-0.64873e-3,-0.51133e-3, 0.43765e-3, -0.24276e-3, 0.11507e-3, 0.11507e-3, 0.20140e-4,-0.76945e-5, 0.28055e-5,-0.97411e-6}; //Zn64(30,34)Wo76 static double fb_30_34[18]={9.0, 0.47038e-1, 0.61536e-1, 0.90045e-2,-0.30669e-1,-0.78705e-3, 0.10034e-1, 0.14053e-2,-0.20640e-2, 0.35105e-3, 0.27303e-4, -0.63811e-4, 0.40893e-4,-0.20311e-4, 0.88986e-5,-0.35849e-5, 0.13522e-5,-0.38635e-6}; //Zn66(30,36)Wo76 static double fb_30_36[18]={9.0, 0.46991e-1, 0.60995e-1,-0.96693e-2,-0.30457e-1,-0.53435e-3, 0.97083e-2, 0.14091e-2,-0.70813e-3, 0.20809e-3,-0.48275e-4, 0.12680e-5, 0.91369e-6,-0.14874e-5, 0.88831e-6,-0.41689e-6, 0.17283e-6,-0.65968e-7}; //Zn68(30,38)Wo76 static double fb_30_38[18]={9.0, 0.46654e-1, 0.58827e-1,-0.12283e-1,-0.29865e-1, 0.25669e-2, 0.10235e-1, 0.31861e-2,-0.17351e-3,-0.42979e-3, 0.33700e-3, -0.18435e-3, 0.87043e-4,-0.37612e-4, 0.15220e-4,-0.58282e-5, 0.21230e-5,-0.73709e-6}; //Zn70(30,40)Wo76 static double fb_30_40[18]={9.0, 0.46363e-1, 0.57130e-1,-0.13877e-1,-0.30030e-1, 0.35341e-2, 0.10113e-1, 0.41029e-2, 0.76469e-3,-0.10138e-2, 0.60837e-3, -0.29929e-3, 0.13329e-3,-0.55502e-4, 0.21893e-4,-0.82286e-5, 0.29559e-5,-0.10148e-5}; //Ge70(32,38)Ma84 static double fb_32_38[18]={10.0, 0.38182e-1, 0.60306e-1, 0.64346e-2,-0.29427e-1,-0.95888e-2, 0.87849e-2, 0.49187e-2,-0.15189e-2,-0.17385e-2,-0.16794e-3, -0.11746e-3, 0.65768e-4,-0.30691e-4, 0.13051e-5,-0.52251e-5, 0,0}; //Ge72(32,40)Ma84 static double fb_32_40[18]={10.0, 0.38083e-1, 0.59342e-1, 0.47718e-2,-0.29953e-1,-0.88476e-2, 0.96205e-2, 0.47901e-2,-0.16869e-2,-0.15406e-2,-0.97230e-4, -0.47640e-4,-0.15669e-5, 0.67076e-5,-0.44500e-5, 0.22158e-5, 0,0}; //Ge74(32,42)Ma84 static double fb_32_42[18]={10, 0.37989e-1, 0.58298e-1, 0.27406e-2,-0.30666e-1,-0.81505e-2, 0.10231e-1, 0.49382e-2,-0.16270e-2,-0.13937e-2, 0.15476e-3, 0.14396e-3,-0.73075e-4, 0.31998e-4,-0.12822e-4, 0.48406e-5, 0, 0}; //Ge76(32,44)Ma84 static double fb_32_44[18]={10, 0.37951e-1, 0.57876e-1, 0.15303e-2,-0.31822e-1,-0.76875e-2, 0.11237e-1, 0.50780e-2,-0.17293e-2,-0.15523e-2, 0.72439e-4, 0.16560e-3,-0.86631e-4, 0.39159e-4,-0.16259e-4, 0.63681e-5, 0, 0}; //Sr88(38,40)St76 static double fb_38_40[18]={9.0, 0.56435e-1, 0.55072e-1,-0.33363e-1,-0.26061e-1, 0.15749e-1, 0.75233e-2,-0.55044e-2,-0.23643e-2, 0.39362e-3,-0.22733e-3, 0.12519e-3,-0.61176e-4, 0.27243e-4,-0.11285e-4, 0.43997e-5, -0.16248e-5, 0.57053e-6}; //Zr90(40,50)Ro76 static double fb_40_50[18]={10.0, 0.46188e-1, 0.61795e-1,-0.12315e-1,-0.36915e-1, 0.25175e-2, 0.15234e-1,-0.55146e-3,-0.60631e-2,-0.12198e-2, 0.36200e-3, -0.16466e-3, 0.53305e-4,-0.50873e-5,-0.85658e-5, 0.86095e-5, 0,0}; //Zr92(40,52)Ro76 static double fb_40_52[18]={10.0, 0.45939e-1, 0.60104e-1,-0.13341e-1,-0.35106e-1, 0.31760e-2, 0.13753e-1,-0.82682e-3,-0.53001e-2,-0.97579e-3, 0.26489e-3, -0.15873e-3, 0.69301e-4,-0.22278e-4, 0.39533e-5, 0.10609e-5, 0,0}; //Zr94(40,54)Ro76 static double fb_40_54[18]={10.0, 0.45798e-1 ,0.59245e-1,-0.13389e-1,-0.33252e-1, 0.39888e-2, 0.12750e-1,-0.15793e-2,-0.56692e-2,-0.15698e-2, 0.54394e-4, -0.24032e-4, 0.38401e-4,-0.31690e-4, 0.18481e-4,-0.85367e-5, 0,0}; //Mo92(42,50)La86 static double fb_42_50[18]={12.0, 0.30782e-1, 0.59896e-1, 0.22016e-1,-0.28945e-1,-0.26707e-1, 0.40426e-2, 0.14429e-1, 0.31696e-2,-0.63061e-2,-0.45119e-2, 0.46236e-3, 0.94909e-3,-0.38930e-3,-0.14808e-3, 0.19622e-3, -0.40197e-4,-0.71949e-4}; //Mo94(42,52)La86 static double fb_42_52[18]={12, 0.30661e-1, 0.58828e-1, 0.20396e-1,-0.28830e-1,-0.25077e-1, 0.44768e-2, 0.13127e-1, 0.19548e-2,-0.61403e-2,-0.35825e-2, 0.73790e-3, 0.61882e-3,-0.40556e-3,-0.55748e-5,-0.12453e-3, -0.57812e-4,-0.21657e-4}; //Mo96(42,54)La86 static double fb_42_54[18]={12, 0.30564e-1, 0.58013e-1, 0.19255e-1,-0.28372e-1,-0.23304e-1, 0.49894e-2, 0.12126e-1, 0.10496e-2,-0.62592e-2,-0.32814e-2, 0.89668e-3, 0.50636e-3,-0.43412e-3, 0.71531e-4, 0.76745e-4, -0.54316e-4, 0.23386e-6}; //Mo98(42,56)Dr75 static double fb_42_56[18]={12, 0.30483e-1, 0.57207e-1, 0.17888e-1,-0.28388e-1,-0.21778e-1, 0.56780e-2, 0.11236e-1, 0.82176e-3,-0.50390e-2,-0.23877e-2, 0.71492e-3, 0.29839e-3,-0.31408e-3, 0.80177e-3, 0.43682e-4, -0.51394e-4, 0.22293e-4}; //Mo100(42,58)Dr75 static double fb_42_58[18]={12, 0.30353e-1, 0.56087e-1, 0.16057e-1,-0.28767e-1,-0.20683e-1, 0.62429e-2, 0.11058e-1, 0.11502e-2,-0.39395e-2,-0.14978e-2, 0.76350e-3, 0.10554e-3,-0.25658e-3, 0.10964e-3, 0.10015e-4, -0.40341e-4, 0.25744e-4}; //Pd104(46,58)La86 static double fb_46_58[18]={11, 0.41210e-1, 0.62846e-1,-0.21202e-2,-0.38359e-1,-0.44693e-2, 0.16656e-1, 0.36873e-2,-0.57534e-2,-0.32499e-2, 0.69844e-3, 0.16304e-2, 0.59882e-3, 0, 0, 0, 0, 0}; //Pd106(46,60)La86 static double fb_46_60[18]={11, 0.41056e-1, 0.61757e-1,-0.29891e-2,-0.37356e-1,-0.35348e-2, 0.16085e-1, 0.28502e-2,-0.55764e-2,-0.15433e-2, 0.22281e-2, 0.13160e-2, 0.16508e-4, 0, 0, 0, 0,0}; //Pd108(46,62)La86 static double fb_46_62[18]={11, 0.40754e-1, 0.59460e-1,-0.54077e-2,-0.36305e-1,-0.21987e-2, 0.15418e-1, 0.25927e-2,-0.52781e-2,-0.19757e-2, 0.10339e-2, 0.22891e-3,-0.33464e-3,0, 0, 0, 0, 0}; //Pd110(46,64)La86 static double fb_46_64[18]={11.0,0.40668e-1, 0.58793e-1,-0.61375e-2,-0.35983e-1,-0.17447e-2, 0.14998e-1, 0.19994e-2,-0.53170e-2,-0.14289e-2, 0.16033e-2, 0.31574e-3,-0.42195e-3,0,0,0, 0,0}; //Sm144(62,82)Mo81 static double fb_62_82[18]={9.25,0.74734e-1, 0.26145e-1,-0.63832e-1, 0.10432e-1, 0.19183e-1, -0.12572e-1,-0.39707e-2,-0.18703e-2, 0.12602e-2,-0.11902e-2, -0.15703e-2,0,0,0,0, 0,0}; //Sm148(62,86)Ho80 static double fb_62_86a[18]={9.5, 0.70491e-1, 0.32601e-1,-0.55421e-1, 0.50111e-2, 0.20216e-1, -0.85944e-2,-0.40106e-2, 0.19303e-2,-0.49689e-3,-0.17040e-3, 0,0,0,0,0, 0,0}; //Sm148(62,86)Mo81 static double fb_62_86b[18]={9.25,0.73859e-1, 0.24023e-1,-0.59437e-1, 0.10761e-1, 0.17022e-1, -0.11401e-1,-0.18102e-2, 0.93011e-3, 0.98012e-3,-0.12601e-2, -0.17402e-2,0,0,0,0, 0,0}; //Sm150(62,88)Mo81 static double fb_62_88[18]={9.25,0.73338e-1, 0.24626e-1,-0.52773e-1, 0.10582e-1, 0.15353e-1, -0.95624e-2,-0.18804e-2,-0.79019e-3, 0.10102e-2,-0.26606e-2, -0.18304e-2,0,0,0,0, 0,0}; //Sm152(62,90)Ho80 static double fb_62_90a[18]={10.5,0.56097e-1, 0.45123e-1,-0.40310e-1,-0.18171e-1, 0.20515e-1, 0.49023e-2,-0.67674e-2,-0.18927e-2, 0.15333e-2, 0, 0,0,0,0,0, 0,0}; //Sm152(62,90)Mo81 static double fb_62_90b[18]={9.25,0.72646e-1, 0.21824e-1,-0.54112e-1, 0.98321e-2, 0.16213e-1, -0.65614e-2, 0.53611e-2,-0.14103e-2,-0.99022e-3,-0.23005e-2, 0,0,0,0,0, 0,0}; //Sm154(62,92)Ho80 static double fb_62_92[18]={10.5,0.55859e-1, 0.44002e-1,-0.40342e-1,-0.17989e-1, 0.19817e-1, 0.51643e-2,-0.60212e-2,-0.23127e-2, 0.47024e-3, 0, 0,0,0,0,0, 0,0}; //Gd154(64,90)He82 static double fb_64_90[18]={10.0,0.63832e-1, 0.36983e-1,-0.48193e-1,-0.51046e-2, 0.19805e-1, -0.82574e-3,-0.46942e-2,0,0,0, 0,0,0,0,0, 0,0}; //Gd158(64,94)Mu84 static double fb_64_94[18]={10.5,0.57217e-1, 0.43061e-1,-0.41996e-1,-0.17203e-1, 0.19933e-1, 0.51060e-2,-0.73665e-2,-0.20926e-2, 0.21883e-2,0, 0,0,0,0,0, 0,0}; //Er166(68,98)Ca78 static double fb_68_98[18]={11.0,0.54426e-1, 0.47165e-1,-0.38654e-1,-0.19672e-1, 0.22092e-1, 0.78708e-2,-0.53005e-2, 0.50005e-3, 0.52005e-3,-0.35003e-3, 0.12001e-3,0,0,0,0, 0,0}; //Yb174(70,104)Sa79 static double fb_70_104[18]={11.0,0.54440e-1, 0.40034e-1,-0.45606e-1,-0.20932e-1, 0.20455e-1, 0.27061e-2,-0.60489e-2,-0.15918e-3, 0.11938e-2, 0, 0,0,0,0,0, 0,0}; //Lu175(71,104)Sa79 static double fb_71_104[18]={11.0,0.55609e-1, 0.42243e-1,-0.45028e-1,-0.19491e-1, 0.22514e-1, 0.38982e-2,-0.72395e-2, 0.31822e-3,-0.23866e-3,0, 0,0,0,0,0, 0,0}; //Os192(76,116)Re84 static double fb_76_116[18]={11.0,0.59041e-1, 0.41498e-1,-0.49900e-1,-0.10183e-1, 0.29067e-1, -0.57382e-2,-0.92348e-2, 0.36170e-2, 0.28736e-2, 0.24194e-3, -0.16766e-2, 0.73610e-3, 0,0,0, 0,0}; //Pt196(78,118)Bo83 static double fb_78_118[18]={12.0,0.50218e-1, 0.53722e-1,-0.35015e-1,-0.34588e-1, 0.23564e-1, 0.14340e-1,-0.13270e-1,-0.51212e-2, 0.56088e-2, 0.14890e-2, -0.10928e-2, 0.55662e-3,-0.50557e-4,-0.19708e-3, 0.24016e-3, 0,0}; //Tl203(81,122)Eu78 static double fb_81_122[18]={12.0,0.51568e-1, 0.51562e-1,-0.39299e-1,-0.30826e-1, 0.27491e-1, 0.10795e-1,-0.15922e-1,-0.25527e-2, 0.58548e-2, 0.19324e-3, -0.17925e-3, 0.14307e-3,-0.91669e-4, 0.53497e-4,-0.29492e-4, 0.15625e-4,-0.80141e-5}; //Tl205(81,124)Eu78 static double fb_81_124[18]={12.0,0.51518e-1, 0.51165e-1,-0.39559e-1,-0.30118e-1, 0.27600e-1, 0.10412e-1,-0.15725e-1,-0.26546e-2, 0.70184e-2, 0.82116e-3, -0.51805e-3, 0.32560e-3,-0.18670e-3, 0.10202e-3,-0.53857e-4, 0.27672e-4,-0.13873e-4}; //Pb204(82,122)Eu78 static double fb_82_122[18]={12.0,0.52102e-1, 0.51786e-1,-0.39188e-1,-0.29242e-1, 0.28992e-1, 0.11040e-1,-0.14591e-1,-0.94917e-3, 0.71349e-2, 0.24780e-3, -0.61656e-3, 0.42335e-3,-0.25250e-3, 0.14106e-3,-0.75446e-4, 0.39143e-4,-0.19760e-4}; //Pb206(82,124)Eu78 static double fb_82_124[18]={12.0,0.52019e-1, 0.51190e-1,-0.39459e-1,-0.28405e-1, 0.28862e-1, 0.10685e-1,-0.14550e-1,-0.13519e-2, 0.77624e-2,-0.41882e-4, -0.97010e-3, 0.69611e-3,-0.42410e-3, 0.23857e-3,-0.12828e-3, 0.66663e-4,-0.33718e-4}; //Pb207(82,125)Eu78 static double fb_82_125[18]={12.0,0.51981e-1, 0.51059e-1,-0.39447e-1,-0.28428e-1, 0.28988e-1, 0.10329e-1,-0.14029e-1,-0.46728e-3, 0.67984e-2, 0.56905e-3, -0.50430e-3, 0.32796e-3,-0.19157e-3, 0.10565e-3,-0.56200e-4, 0.29020e-4,-0.14621e-4}; //Pb208(82,126)Eu78 static double fb_82_126a[18]={12.0,0.51936e-1, 0.50768e-1,-0.39646e-1,-0.28218e-1, 0.28916e-1, 0.98910e-2,-0.14388e-1,-0.98262e-3, 0.72578e-2, 0.82318e-3, -0.14823e-2, 0.13245e-3,-0.84345e-4, 0.48417e-4,-0.26562e-4, 0.14035e-4,-0.71863e-5}; //Pb208(82,126)Fr77b static double fb_82_126b[18]={11.0,0.62732e-1, 0.38542e-1,-0.55105e-1,-0.26990e-2, 0.31016e-1, -0.99486e-2,-0.93012e-2, 0.76653e-2, 0.20885e-2,-0.17840e-2, -0.74876e-4, 0.32278e-3,-0.11353e-3,0,0, 0,0}; //Bi209(83,126)Eu78 static double fb_83_126[18]={12.0,0.52448e-1, 0.50400e-1,-0.41014e-1,-0.27927e-1, 0.29587e-1, 0.98017e-2,-0.14930e-1,-0.31967e-3, 0.77252e-2, 0.57533e-3, -0.82529e-3, 0.25728e-3,-0.11043e-3, 0.51930e-4,-0.24767e-4, 0.11863e-4,-0.56554e-5}; // Sum Of Gausians { rms, RP, R1, Q1,R2, Q2, ...,R12 ,Q12} //H3(1,2)Ju85s static double sog_1_2[26]= { 1.764,0.80, 0.0, 0.035952, 0.2, 0.027778, 0.5, 0.131291, 0.8, 0.221551, 1.2, 0.253691, 1.6, 0.072905, 2.0, 0.152243, 2.5, 0.051564, 3.0, 0.053023, 0,0, 0,0, 0,0 }; //He3(2,1)MC77 static double sog_2_1[26]= { 1.835, 1.10, 0.0, 0.000029, 0.6, 0.606482, 1.0, 0.066077, 1.3, 0.000023, 1.8, 0.204417, 2.3, 0.115236, 2.7, 0.000001, 3.2, 0.006974, 4.1, 0.000765, 0,0, 0,0, 0,0 }; //He4(2,2)Si82 static double sog_2_2[26]= { 1.6768,1.00, 0.2, 0.034724, 0.6, 0.430761, 0.9, 0.203166, 1.4, 0.192986, 1.9, 0.083866, 2.3, 0.033007, 2.6, 0.014201, 3.1, 0.000000, 3.5, 0.006860, 4.2, 0.000000, 4.9, 0.000438, 5.2, 0.000000 }; //C12(6,6)Si82 static double sog_6_6[26]= { 2.4696, 1.20, 0.0, 0.016690, 0.4, 0.050325, 1.0, 0.128621, 1.3, 0.180515, 1.7, 0.219097, 2.3, 0.278416, 2.7, 0.058779, 3.5, 0.057817, 4.3, 0.007739, 5.4, 0.002001, 6.7, 0.000007, 0, 0 }; //O16(8,8)Si70b static double sog_8_8[26]= { 2.711, 1.30, 0.4, 0.057056, 1.1, 0.195701, 1.9, 0.311188, 2.2, 0.224321, 2.7, 0.059946, 3.3, 0.135714, 4.1, 0.000024, 4.6, 0.013961, 5.3, 0.000007, 5.6, 0.000002, 5.9, 0.002096, 6.4, 0.000002 }; //Mg24(12,12)Li74 static double sog_12_12[26]= { 3.027, 1.25, 0.1, 0.007372, 0.6, 0.061552, 1.1, 0.056984, 1.5, 0.035187, 1.9, 0.291692, 2.6, 0.228920, 3.2, 0.233532, 4.1, 0.074086, 4.7, 0.000002, 5.2, 0.010876, 6.1, 0.000002, 7.0, 0.000002 }; //Si28(14,14)Li74 static double sog_14_14[26]= { 3.121, 1.30, 0.4, 0.033149, 1.0, 0.106452, 1.9, 0.206866, 2.4, 0.286391, 3.2, 0.250448, 3.6, 0.056944, 4.1, 0.016829, 4.6, 0.039630, 5.1, 0.000002, 5.5, 0.000938, 6.0, 0.000002, 6.9, 0.002366 }; //S32(16,16)Li74 static double sog_16_16[26]= { 3.258, 1.35, 0.4, 0.045356, 1.1, 0.067478, 1.7, 0.172560, 2.5, 0.324870, 3.2, 0.254889, 4.0, 0.101799, 4.6, 0.022166, 5.0, 0.002081, 5.5, 0.005616, 6.3, 0.000020, 7.3, 0.000020, 7.7, 0.003219 }; //K39(19,20)Si74 static double sog_19_20[26]= { 3.427, 1.45, 0.4, 0.043308, 0.9, 0.036283, 1.7, 0.110517, 2.1, 0.147676, 2.6, 0.189541, 3.2, 0.274173, 3.7, 0.117691, 4.2, 0.058273, 4.7, 0.000006, 5.5, 0.021380, 5.9, 0.000002, 6.9, 0.001145 }; //Ca40(20,20)Si79 static double sog_20_20[26]= { 3.4803, 1.45, 0.4, 0.042870, 1.2, 0.056020, 1.8, 0.167853, 2.7, 0.317962, 3.2, 0.155450, 3.6, 0.161897, 4.3, 0.053763, 4.6, 0.032612, 5.4, 0.004803, 6.3, 0.004541, 6.6, 0.000015, 8.1, 0.002218 }; //Ca48(20,28)Si74 static double sog_20_28[26]= { 3.460, 1.45, 0.6, 0.063035, 1.1, 0.011672, 1.7, 0.064201, 2.1, 0.203813, 2.9, 0.259070, 3.4, 0.307899, 4.3, 0.080585, 5.2, 0.008498, 5.7, 0.000025, 6.2, 0.000005, 6.5, 0.000004, 7.4, 0.001210 }; //Ni58(28,30)Ca80b static double sog_28_30[26]= { 3.7724, 1.45, 0.5, 0.035228, 1.4, 0.065586, 2.2, 0.174552, 3.0, 0.199916, 3.4, 0.232360, 3.9, 0.118496, 4.2, 0.099325, 4.6, 0.029860, 5.2, 0.044912, 5.9, 0.000232, 6.6, 0.000002, 7.9, 0.000010 }; //Sn116(50,66)Ca82a static double sog_50_66[26]= { 4.6271, 1.60, 0.1, 0.005727, 0.7, 0.009643, 1.3, 0.038209, 1.8, 0.009466, 2.3, 0.096665, 3.1, 0.097840, 3.8, 0.269373, 4.8, 0.396671, 5.5, 0.026390, 6.1, 0.048157, 7.1, 0.001367, 8.1, 0.000509 }; //Sn124(50,74)Ca82a static double sog_50_74[26]= { 4.6771, 1.60, 0.1, 0.004877, 0.7, 0.010685, 1.3, 0.030309, 1.8, 0.015857, 2.3, 0.088927, 3.1, 0.091917, 3.8, 0.257379, 4.8, 0.401877, 5.5, 0.053646, 6.1, 0.043193, 7.1, 0.001319, 8.1, 0.000036 }; //Tl205(81,124)Fr83 static double sog_81_124[26]= { 5.479, 1.70, 0.6, 0.007818, 1.1, 0.022853, 2.1, 0.000084, 2.6, 0.105635, 3.1, 0.022340, 3.8, 0.059933, 4.4, 0.235874, 5.0, 0.000004, 5.7, 0.460292, 6.8, 0.081621, 7.2, 0.002761, 8.6, 0.000803 }; //Pb206(82,124)Fr83 static double sog_82_124[26]= { 5.490, 1.70, 0.6, 0.010615, 1.1, 0.021108, 2.1, 0.000060, 2.6, 0.102206, 3.1, 0.023476, 3.8, 0.065884, 4.4, 0.226032, 5.0, 0.000005, 5.7, 0.459690, 6.8, 0.086351, 7.2, 0.004589, 8.6, 0.000011 }; //Pb208(82,126)Fr77a static double sog_82_126[26]= { 5.5032, 1.70, 0.1, 0.003845, 0.7, 0.009724, 1.6, 0.033093, 2.1, 0.000120, 2.7, 0.083107, 3.5, 0.080869, 4.2, 0.139957, 5.1, 0.260892, 6.0, 0.336013, 6.6, 0.033637, 7.6, 0.018729, 8.7, 0.000020 }; nucleus_data dens_data[]= { nucleus_data( 1, 2, prfFB, fb_1_2 ), nucleus_data( 2, 1, prfFB, fb_2_1 ), nucleus_data( 6, 6, prfFB, fb_6_6a ), nucleus_data( 6, 6, prfFB, fb_6_6b ), nucleus_data( 7, 8, prfFB, fb_7_8 ), nucleus_data( 8, 8, prfFB, fb_8_8 ), nucleus_data(13, 14, prfFB, fb_13_14 ), nucleus_data(14, 14, prfFB, fb_14_14 ), nucleus_data(14, 15, prfFB, fb_14_15 ), nucleus_data(14, 16, prfFB, fb_14_16 ), nucleus_data(15, 16, prfFB, fb_15_16 ), nucleus_data(16, 16, prfFB, fb_16_16 ), nucleus_data(16, 18, prfFB, fb_16_18 ), nucleus_data(16, 20, prfFB, fb_16_20 ), nucleus_data(18, 22, prfFB, fb_18_22 ), nucleus_data(20, 20, prfFB, fb_20_20 ), nucleus_data(20, 24, prfFB, fb_20_24 ), nucleus_data(22, 26, prfFB, fb_22_26 ), nucleus_data(22, 28, prfFB, fb_22_28 ), nucleus_data(24, 26, prfFB, fb_24_26 ), nucleus_data(24, 28, prfFB, fb_24_28 ), nucleus_data(24, 30, prfFB, fb_24_30 ), nucleus_data(26, 28, prfFB, fb_26_28 ), nucleus_data(26, 30, prfFB, fb_26_30 ), nucleus_data(26, 32, prfFB, fb_26_32 ), nucleus_data(27, 32, prfFB, fb_27_32 ), nucleus_data(28, 30, prfFB, fb_28_30a ), nucleus_data(28, 30, prfFB, fb_28_30b ), nucleus_data(28, 32, prfFB, fb_28_32a ), nucleus_data(28, 32, prfFB, fb_28_32b ), nucleus_data(28, 32, prfFB, fb_28_32c ), nucleus_data(28, 34, prfFB, fb_28_34 ), nucleus_data(28, 36, prfFB, fb_28_36 ), nucleus_data(29, 34, prfFB, fb_29_34 ), nucleus_data(29, 36, prfFB, fb_29_36 ), nucleus_data(30, 34, prfFB, fb_30_34 ), nucleus_data(30, 36, prfFB, fb_30_36 ), nucleus_data(30, 38, prfFB, fb_30_38 ), nucleus_data(30, 40, prfFB, fb_30_40 ), nucleus_data(32, 38, prfFB, fb_32_38 ), nucleus_data(32, 40, prfFB, fb_32_40 ), nucleus_data(32, 42, prfFB, fb_32_42 ), nucleus_data(32, 44, prfFB, fb_32_44 ), nucleus_data(38, 40, prfFB, fb_38_40 ), nucleus_data(40, 50, prfFB, fb_40_50 ), nucleus_data(40, 52, prfFB, fb_40_52 ), nucleus_data(40, 54, prfFB, fb_40_54 ), nucleus_data(42, 50, prfFB, fb_42_50 ), nucleus_data(42, 52, prfFB, fb_42_52 ), nucleus_data(42, 54, prfFB, fb_42_54 ), nucleus_data(42, 56, prfFB, fb_42_56 ), nucleus_data(42, 58, prfFB, fb_42_58 ), nucleus_data(46, 58, prfFB, fb_46_58 ), nucleus_data(46, 60, prfFB, fb_46_60 ), nucleus_data(46, 62, prfFB, fb_46_62 ), nucleus_data(46, 64, prfFB, fb_46_64 ), nucleus_data(62, 82, prfFB, fb_62_82 ), nucleus_data(62, 86, prfFB, fb_62_86a ), nucleus_data(62, 86, prfFB, fb_62_86b ), nucleus_data(62, 88, prfFB, fb_62_88 ), nucleus_data(62, 90, prfFB, fb_62_90a ), nucleus_data(62, 90, prfFB, fb_62_90b ), nucleus_data(62, 92, prfFB, fb_62_92 ), nucleus_data(64, 90, prfFB, fb_64_90 ), nucleus_data(64, 94, prfFB, fb_64_94 ), nucleus_data(68, 98, prfFB, fb_68_98 ), nucleus_data(70,104, prfFB, fb_70_104 ), nucleus_data(71,104, prfFB, fb_71_104 ), nucleus_data(76,116, prfFB, fb_76_116 ), nucleus_data(78,118, prfFB, fb_78_118 ), nucleus_data(81,122, prfFB, fb_81_122 ), nucleus_data(81,124, prfFB, fb_81_124 ), nucleus_data(82,122, prfFB, fb_82_122 ), nucleus_data(82,124, prfFB, fb_82_124 ), nucleus_data(82,125, prfFB, fb_82_125 ), nucleus_data(82,126, prfFB, fb_82_126a), nucleus_data(82,126, prfFB, fb_82_126b), nucleus_data(83,126, prfFB, fb_83_126 ), nucleus_data( 1, 2, prfSOG, sog_1_2 ), nucleus_data( 2, 1, prfSOG, sog_2_1 ), nucleus_data( 2, 2, prfSOG, sog_2_2 ), nucleus_data( 6, 6, prfSOG, sog_6_6 ), nucleus_data( 8, 8, prfSOG, sog_8_8 ), nucleus_data(12, 12, prfSOG, sog_12_12 ), nucleus_data(14, 14, prfSOG, sog_14_14 ), nucleus_data(16, 16, prfSOG, sog_16_16 ), nucleus_data(19, 20, prfSOG, sog_19_20 ), nucleus_data(20, 20, prfSOG, sog_20_20 ), nucleus_data(20, 28, prfSOG, sog_20_28 ), nucleus_data(28, 30, prfSOG, sog_28_30 ), nucleus_data(50, 66, prfSOG, sog_50_66 ), nucleus_data(50, 74, prfSOG, sog_50_74 ), nucleus_data(81,124, prfSOG, sog_81_124), nucleus_data(82,124, prfSOG, sog_82_124), nucleus_data(82,126, prfSOG, sog_82_126), nucleus_data( 3, 4, prfHO, ho_3_4 ), nucleus_data( 4, 5, prfHO, ho_4_5 ), nucleus_data( 5, 5, prfHO, ho_5_5 ), nucleus_data( 5, 6, prfHO, ho_5_6 ), nucleus_data( 8, 8, prfHO, ho_8_8 ), nucleus_data( 8, 9, prfHO, ho_8_9 ), nucleus_data( 8, 10, prfHO, ho_8_10 ), nucleus_data( 6, 7, prfMHO, mho_6_7 ), nucleus_data( 6, 8, prfMHO, mho_6_8 ), nucleus_data(7, 7, prf3pF, _3pF_7_7 ), nucleus_data(7 , 8, prf3pF, _3pF_7_8 ), nucleus_data(12, 12, prf3pF, _3pF_12_12a), nucleus_data(12, 12, prf3pF, _3pF_12_12b), nucleus_data(12, 13, prf3pF, _3pF_12_13), nucleus_data(14, 14, prf3pF, _3pF_14_14), nucleus_data(14, 15, prf3pF, _3pF_14_15), nucleus_data(14, 16, prf3pF, _3pF_14_16), nucleus_data(15, 16, prf3pF, _3pF_15_16), nucleus_data(17, 18, prf3pF, _3pF_17_18), nucleus_data(17, 20, prf3pF, _3pF_17_20), nucleus_data(19, 20, prf3pF, _3pF_19_20), nucleus_data(20, 20, prf3pF, _3pF_20_20), nucleus_data(20, 28, prf3pF, _3pF_20_28), nucleus_data(28, 30, prf3pF, _3pF_28_30), nucleus_data(28, 32, prf3pF, _3pF_28_32), nucleus_data(28, 33, prf3pF, _3pF_28_33), nucleus_data(28, 34, prf3pF, _3pF_28_34), nucleus_data(28, 36, prf3pF, _3pF_28_36), nucleus_data(16, 16, prf3pG, _3pG_16_16), nucleus_data(40, 50, prf3pG, _3pG_40_50), nucleus_data(40, 51, prf3pG, _3pG_40_51), nucleus_data(40, 52, prf3pG, _3pG_40_52), nucleus_data(40, 54, prf3pG, _3pG_40_54), nucleus_data(40, 56, prf3pG, _3pG_40_56), nucleus_data(42, 50, prf3pG, _3pG_42_50), nucleus_data( 9, 10, prf2pF, _2pF_9_10 ), nucleus_data(10, 10, prf2pF, _2pF_10_10), nucleus_data(10, 12, prf2pF, _2pF_10_12), nucleus_data(12, 12, prf2pF, _2pF_12_12), nucleus_data(12, 14, prf2pF, _2pF_12_14), nucleus_data(13, 14, prf2pF, _2pF_13_14), nucleus_data(18, 18, prf2pF, _2pF_18_18), nucleus_data(18, 22, prf2pF, _2pF_18_22), nucleus_data(22, 26, prf2pF, _2pF_22_26), nucleus_data(23, 28, prf2pF, _2pF_23_28), nucleus_data(24, 26, prf2pF, _2pF_24_26), nucleus_data(24, 28, prf2pF, _2pF_24_28), nucleus_data(24, 29, prf2pF, _2pF_24_29), nucleus_data(25, 30, prf2pF, _2pF_25_30), nucleus_data(26, 28, prf2pF, _2pF_26_28), nucleus_data(26, 30, prf2pF, _2pF_26_30), nucleus_data(26, 32, prf2pF, _2pF_26_32), nucleus_data(27, 32, prf2pF, _2pF_27_32), nucleus_data(29, 34, prf2pF, _2pF_29_34), nucleus_data(29, 36, prf2pF, _2pF_29_36), nucleus_data(30, 34, prf2pF, _2pF_30_34), nucleus_data(30, 36, prf2pF, _2pF_30_36), nucleus_data(30, 38, prf2pF, _2pF_30_38), nucleus_data(30, 40, prf2pF, _2pF_30_40), nucleus_data(32, 38, prf2pF, _2pF_32_38), nucleus_data(32, 40, prf2pF, _2pF_32_40), nucleus_data(38, 50, prf2pF, _2pF_38_50), nucleus_data(39, 50, prf2pF, _2pF_39_50), nucleus_data(41, 52, prf2pF, _2pF_41_52), nucleus_data(79, 118, prf2pF, _2pF_79_118), nucleus_data(90, 142, prf2pF, _2pF_Th232a), nucleus_data(90, 142, prf2pF, _2pF_Th232b), nucleus_data(92, 146, prf2pF, _2pF_U238a), nucleus_data(92, 146, prf2pF, _2pF_U238b), // nucleus_data( 1, 0, prfMI, mi_1_0 ), // nucleus_data( 1, 1, prfMI, mi_1_1 ), // nucleus_data( 2, 1, prfMI, mi_2_1 ), // nucleus_data( 2, 2, prfMI, mi_2_2 ), nucleus_data( 11, 12, prfUG, ug_11_12 ), nucleus_data( 0, 0, 0, 0) }; double nucleus_data::dens(double r) { double X=dens_fun(dens_params,r/fermi)/fermi3; if(dens_fun==prf3pF || dens_fun==prf3pG || dens_fun==prfSOG) return X*(_p+_n); if(dens_fun==prfFB) return X*(_p+_n)/_p; return X; } const char* nucleus_data::name() { //return el[p].name; if(dens_fun==prfFB) return " FB"; if(dens_fun==prfSOG) return "SOG"; if(dens_fun==prf2pF) return "2pF"; if(dens_fun==prf3pF) return "3pF"; if(dens_fun==prf3pG) return "3pG"; if(dens_fun==prfHO) return " HO"; if(dens_fun==prfMHO) return "MHO"; if(dens_fun==prfMI) return " MI"; if(dens_fun==prfUG) return " UG"; return ""; } double nucleus_data::r() { if(_r==0) { if(dens_fun==prfFB) return _r=dens_params[0]*fermi; double r0=0; double r1=20.0*fermi; double oldrs=r1; double rs=0; double ds0=1e-7*dens(0); do { oldrs=rs; rs=(r0+r1)/2; double ds=dens(rs); if(ds>ds0) r0=rs; else r1=rs; } while(rs!=oldrs); _r=rs; } return _r; } double nucleus_data::random_r() { if(_max_rr_dens==0) { double R=r(),d=0; for(double a=0;a<R;a+=R/100) _max_rr_dens=max(_max_rr_dens,a*a*dens(a)); } static int i=0,j=0; ++j; double r0=r(),r1; do { ++i; r1 = r0*frandom(); } while ( r1*r1*dens(r1) < frandom ()*_max_rr_dens); // cout<<i*1./j<<endl; return r1; } double nucleus_data::kF() { if(_kF==0) { _kF=calg5a(makefun(*this,&nucleus_data::kf_helper),0,r())/ calg5a(makefun(*this,&nucleus_data::dens_helper),0,r()) ; } return _kF; } double nucleus_data::Mf() { if(_Mf==0) { // _Mf=calg5a(makefun(*this,&nucleus_data::mf_helper),0,r())/ // calg5a(makefun(*this,&nucleus_data::dens_helper),0,r()); _Mf=Meff(kF()); } return _Mf; } nucleus_data* best_data(int p, int n) { int p0=p,n0=n,x=1000000000; nucleus_data *d=dens_data; for(nucleus_data *data=dens_data; data->p() >0; data++) { int x1=pow2(data->p()-p0)+pow2(data->n()-n0)+pow2(data->p()+data->n()-p0-n0); if(x1<x) { x=x1; d=data; if(x==0) return data; } } return d; } double density(double r_,int p, int n) { double A=p+n; if(p>83) ///< for big nuclei use rescaled Pb profile return ::density(r_*cbrt((82+126)/A),82,126); double r=r_; nucleus_data *d=best_data(p,n); r*=cbrt(A/d->A()); // and scale its size if needed return max(d->dens(r),0.); } double Meff(double kf) { static const double MEF[3000]= { 938.919,938.918,938.918,938.918,938.917,938.915,938.913,938.909,938.904, 938.899,938.891,938.882,938.871,938.858,938.843,938.826,938.806,938.784, 938.759,938.731,938.699,938.665,938.627,938.585,938.54,938.491,938.437, 938.38,938.318,938.251,938.179,938.103,938.021,937.935,937.843,937.745, 937.641,937.532,937.417,937.295,937.167,937.032,936.891,936.743,936.587, 936.425,936.255,936.077,935.892,935.699,935.498,935.289,935.072,934.845, 934.611,934.367,934.114,933.853,933.582,933.301,933.011,932.711,932.401, 932.08,931.75,931.409,931.057,930.695,930.322,929.937,929.541,929.134, 928.716,928.285,927.843,927.388,926.921,926.442,925.951,925.446,924.929, 924.399,923.855,923.298,922.728,922.144,921.546,920.934,920.308,919.667, 919.012,918.343,917.658,916.959,916.245,915.515,914.77,914.009,913.233, 912.44,911.632,910.807,909.966,909.109,908.235,907.344,906.436,905.511, 904.568,903.608,902.631,901.635,900.622,899.591,898.541,897.473,896.387, 895.282,894.157,893.014,891.852,890.671,889.47,888.249,887.009,885.749, 884.469,883.168,881.848,880.506,879.144,877.762,876.358,874.933,873.488, 872.02,870.531,869.021,867.489,865.934,864.358,862.76,861.139,859.495, 857.829,856.14,854.429,852.694,850.936,849.155,847.35,845.521,843.669, 841.793,839.893,837.969,836.021,834.048,832.051,830.029,827.983,825.911, 823.815,821.694,819.547,817.375,815.177,812.954,810.706,808.431,806.131, 803.805,801.452,799.074,796.669,794.237,791.78,789.295,786.784,784.246, 781.682,779.09,776.472,773.826,771.153,768.453,765.726,762.972,760.19, 757.38,754.543,751.679,748.787,745.867,742.92,739.944,736.942,733.911, 730.853,727.767,724.653,721.511,718.341,715.144,711.919,708.667,705.386, 702.078,698.743,695.38,691.99,688.572,685.127,681.654,678.155,674.628, 671.075,667.495,663.889,660.256,656.596,652.911,649.2,645.463,641.701, 637.913,634.101,630.264,626.402,622.516,618.607,614.674,610.718,606.74, 602.739,598.716,594.671,590.606,586.52,582.414,578.288,574.144,569.981, 565.8,561.603,557.388,553.158,548.913,544.653,540.38,536.093,531.795, 527.486,523.166,518.837,514.499,510.154,505.802,501.445,497.083,492.718, 488.351,483.983,479.615,475.248,470.883,466.522,462.166,457.816,453.474, 449.14,444.817,440.505,436.205,431.92,427.65,423.397,419.162,414.947, 410.752,406.579,402.43,398.305,394.206,390.134,386.091,382.077,378.094, 374.142,370.223,366.338,362.488,358.673,354.895,351.154,347.452,343.788, 340.163,336.579,333.035,329.532,326.071,322.652,319.275,315.94,312.648, 309.399,306.193,303.03,299.91,296.833,293.799,290.808,287.859,284.953, 282.088,279.266,276.485,273.746,271.048,268.39,265.772,263.193,260.655, 258.154,255.692,253.268,250.881,248.531,246.217,243.939,241.696,239.488, 237.313,235.172,233.065,230.989,228.946,226.933,224.952,223,221.079, 219.186,217.323,215.487,213.679,211.898,210.143,208.415,206.712,205.034, 203.381,201.752,200.146,198.564,197.005,195.467,193.952,192.459,190.986, 189.534,188.102,186.69,185.298,183.925,182.57,181.234,179.916,178.616, 177.333,176.066,174.817,173.584,172.367,171.166,169.98,168.81,167.654, 166.513,165.386,164.274,163.175,162.09,161.018,159.959,158.913,157.88, 156.859,155.85,154.853,153.868,152.894,151.932,150.981,150.041,149.111, 148.192,147.284,146.385,145.497,144.618,143.75,142.89,142.04,141.2, 140.368,139.545,138.731,137.926,137.129,136.34,135.56,134.788,134.023, 133.267,132.518,131.777,131.043,130.317,129.597,128.885,128.18,127.482, 126.791,126.106,125.428,124.757,124.092,123.433,122.78,122.134,121.493, 120.859,120.23,119.607,118.99,118.379,117.773,117.173,116.578,115.988, 115.403,114.824,114.25,113.68,113.116,112.557,112.002,111.453,110.908, 110.367,109.831,109.3,108.773,108.251,107.733,107.219,106.709,106.204, 105.703,105.206,104.712,104.223,103.738,103.257,102.779,102.305,101.836, 101.369,100.907,100.448,99.9921,99.5401,99.0916,98.6466,98.205,97.7667, 97.3317,96.9001,96.4716,96.0464,95.6243,95.2054,94.7896,94.3768,93.9671, 93.5604,93.1566,92.7557,92.3578,91.9627,91.5704,91.181,90.7943,90.4104, 90.0292,89.6506,89.2748,88.9015,88.5308,88.1628,87.7972,87.4342,87.0737, 86.7156,86.36,86.0068,85.656,85.3075,84.9614,84.6177,84.2762,83.937, 83.6,83.2653,82.9327,82.6024,82.2742,81.9482,81.6242,81.3024,80.9827, 80.665,80.3494,80.0357,79.7241,79.4145,79.1068,78.8011,78.4972,78.1953, 77.8953,77.5972,77.3009,77.0065,76.7138,76.423,76.134,75.8467,75.5612, 75.2775,74.9954,74.7151,74.4365,74.1595,73.8842,73.6105,73.3385,73.0681, 72.7993,72.5321,72.2665,72.0025,71.7399,71.479,71.2195,70.9616,70.7051, 70.4502,70.1967,69.9447,69.6941,69.445,69.1972,68.9509,68.706,68.4625, 68.2204,67.9796,67.7402,67.5021,67.2653,67.0299,66.7958,66.563,66.3314, 66.1012,65.8722,65.6445,65.418,65.1928,64.9687,64.746,64.5244,64.304, 64.0848,63.8668,63.65,63.4343,63.2198,63.0064,62.7941,62.583,62.373, 62.1641,61.9564,61.7497,61.5441,61.3395,61.1361,60.9337,60.7323,60.532, 60.3328,60.1345,59.9373,59.7411,59.5459,59.3517,59.1585,58.9663,58.7751, 58.5848,58.3955,58.2071,58.0197,57.8333,57.6478,57.4632,57.2795,57.0968, 56.9149,56.734,56.5539,56.3748,56.1965,56.0191,55.8426,55.6669,55.4921, 55.3182,55.1451,54.9728,54.8014,54.6308,54.4611,54.2921,54.124,53.9567, 53.7902,53.6244,53.4595,53.2954,53.132,52.9694,52.8076,52.6465,52.4863, 52.3267,52.1679,52.0099,51.8526,51.696,51.5402,51.3851,51.2307,51.077, 50.924,50.7718,50.6202,50.4694,50.3192,50.1697,50.021,49.8728,49.7254, 49.5786,49.4326,49.2871,49.1423,48.9982,48.8548,48.7119,48.5698,48.4282, 48.2873,48.147,48.0074,47.8683,47.7299,47.5921,47.4549,47.3184,47.1824, 47.047,46.9122,46.778,46.6444,46.5114,46.379,46.2471,46.1158,45.9851, 45.855,45.7254,45.5964,45.4679,45.34,45.2126,45.0858,44.9595,44.8338, 44.7086,44.584,44.4598,44.3362,44.2132,44.0906,43.9686,43.8471,43.7261, 43.6056,43.4856,43.3661,43.2471,43.1286,43.0107,42.8932,42.7761,42.6596, 42.5436,42.428,42.313,42.1984,42.0842,41.9706,41.8574,41.7446,41.6324, 41.5206,41.4092,41.2983,41.1879,41.0779,40.9683,40.8592,40.7506,40.6424, 40.5346,40.4272,40.3203,40.2138,40.1078,40.0021,39.8969,39.7921,39.6877, 39.5838,39.4802,39.3771,39.2744,39.1721,39.0701,38.9686,38.8675,38.7668, 38.6665,38.5666,38.467,38.3679,38.2691,38.1708,38.0728,37.9752,37.8779, 37.7811,37.6846,37.5885,37.4928,37.3974,37.3024,37.2078,37.1135,37.0196, 36.9261,36.8329,36.7401,36.6476,36.5555,36.4637,36.3723,36.2812,36.1904, 36.1001,36.01,35.9203,35.8309,35.7419,35.6532,35.5648,35.4768,35.3891, 35.3017,35.2146,35.1279,35.0415,34.9554,34.8697,34.7842,34.6991,34.6143, 34.5297,34.4456,34.3617,34.2781,34.1948,34.1119,34.0292,33.9468,33.8648, 33.783,33.7016,33.6204,33.5395,33.459,33.3787,33.2987,33.219,33.1396, 33.0604,32.9816,32.903,32.8248,32.7468,32.669,32.5916,32.5144,32.4375, 32.3609,32.2846,32.2085,32.1327,32.0572,31.9819,31.9069,31.8322,31.7577, 31.6835,31.6096,31.5359,31.4624,31.3893,31.3164,31.2437,31.1713,31.0991, 31.0272,30.9556,30.8842,30.813,30.7421,30.6715,30.601,30.5309,30.4609, 30.3912,30.3218,30.2526,30.1836,30.1149,30.0463,29.9781,29.91,29.8422, 29.7747,29.7073,29.6402,29.5733,29.5067,29.4402,29.374,29.308,29.2423, 29.1767,29.1114,29.0463,28.9814,28.9168,28.8523,28.7881,28.7241,28.6603, 28.5967,28.5333,28.4701,28.4072,28.3444,28.2819,28.2196,28.1574,28.0955, 28.0338,27.9723,27.911,27.8499,27.789,27.7283,27.6678,27.6075,27.5473, 27.4874,27.4277,27.3682,27.3088,27.2497,27.1908,27.132,27.0734,27.0151, 26.9569,26.8989,26.8411,26.7835,26.726,26.6688,26.6117,26.5548,26.4981, 26.4416,26.3852,26.3291,26.2731,26.2173,26.1617,26.1062,26.0509,25.9959, 25.9409,25.8862,25.8316,25.7772,25.723,25.6689,25.615,25.5613,25.5078, 25.4544,25.4012,25.3481,25.2952,25.2425,25.19,25.1376,25.0853,25.0333, 24.9814,24.9296,24.8781,24.8267,24.7754,24.7243,24.6734,24.6226,24.5719, 24.5215,24.4711,24.421,24.371,24.3211,24.2714,24.2219,24.1725,24.1232, 24.0741,24.0252,23.9764,23.9277,23.8792,23.8309,23.7827,23.7346,23.6867, 23.6389,23.5913,23.5438,23.4965,23.4493,23.4022,23.3553,23.3085,23.2619, 23.2154,23.1691,23.1228,23.0768,23.0308,22.985,22.9394,22.8938,22.8484, 22.8032,22.758,22.713,22.6682,22.6235,22.5789,22.5344,22.4901,22.4459, 22.4018,22.3579,22.314,22.2704,22.2268,22.1834,22.1401,22.0969,22.0538, 22.0109,21.9681,21.9254,21.8829,21.8405,21.7982,21.756,21.7139,21.672, 21.6302,21.5885,21.5469,21.5055,21.4641,21.4229,21.3818,21.3408,21.3, 21.2592,21.2186,21.1781,21.1377,21.0974,21.0572,21.0172,20.9772,20.9374, 20.8977,20.8581,20.8186,20.7792,20.74,20.7008,20.6618,20.6229,20.584, 20.5453,20.5067,20.4682,20.4298,20.3916,20.3534,20.3153,20.2774,20.2395, 20.2018,20.1641,20.1266,20.0892,20.0518,20.0146,19.9775,19.9405,19.9035, 19.8667,19.83,19.7934,19.7569,19.7205,19.6842,19.648,19.6119,19.5759, 19.54,19.5041,19.4684,19.4328,19.3973,19.3619,19.3266,19.2913,19.2562, 19.2212,19.1862,19.1514,19.1166,19.082,19.0474,19.0129,18.9786,18.9443, 18.9101,18.876,18.842,18.8081,18.7742,18.7405,18.7069,18.6733,18.6399, 18.6065,18.5732,18.54,18.5069,18.4739,18.441,18.4081,18.3754,18.3427, 18.3101,18.2776,18.2452,18.2129,18.1807,18.1485,18.1165,18.0845,18.0526, 18.0208,17.989,17.9574,17.9258,17.8944,17.863,17.8317,17.8004,17.7693, 17.7382,17.7072,17.6763,17.6455,17.6147,17.5841,17.5535,17.523,17.4926, 17.4622,17.432,17.4018,17.3717,17.3416,17.3117,17.2818,17.252,17.2223, 17.1926,17.163,17.1335,17.1041,17.0748,17.0455,17.0163,16.9872,16.9582, 16.9292,16.9003,16.8715,16.8427,16.814,16.7854,16.7569,16.7284,16.7001, 16.6717,16.6435,16.6153,16.5872,16.5592,16.5313,16.5034,16.4755,16.4478, 16.4201,16.3925,16.365,16.3375,16.3101,16.2828,16.2555,16.2283,16.2012, 16.1741,16.1472,16.1202,16.0934,16.0666,16.0399,16.0132,15.9866,15.9601, 15.9336,15.9072,15.8809,15.8546,15.8285,15.8023,15.7763,15.7502,15.7243, 15.6984,15.6726,15.6469,15.6212,15.5956,15.57,15.5445,15.5191,15.4937, 15.4684,15.4431,15.4179,15.3928,15.3678,15.3428,15.3178,15.2929,15.2681, 15.2433,15.2186,15.194,15.1694,15.1449,15.1204,15.096,15.0717,15.0474, 15.0232,14.999,14.9749,14.9508,14.9268,14.9029,14.879,14.8552,14.8314, 14.8077,14.7841,14.7605,14.7369,14.7134,14.69,14.6666,14.6433,14.6201, 14.5969,14.5737,14.5506,14.5276,14.5046,14.4816,14.4588,14.4359,14.4132, 14.3904,14.3678,14.3452,14.3226,14.3001,14.2777,14.2553,14.2329,14.2106, 14.1884,14.1662,14.144,14.122,14.0999,14.0779,14.056,14.0341,14.0123, 13.9905,13.9688,13.9471,13.9255,13.9039,13.8824,13.8609,13.8395,13.8181, 13.7968,13.7755,13.7543,13.7331,13.7119,13.6909,13.6698,13.6488,13.6279, 13.607,13.5861,13.5654,13.5446,13.5239,13.5032,13.4826,13.4621,13.4416, 13.4211,13.4007,13.3803,13.36,13.3397,13.3195,13.2993,13.2791,13.259, 13.239,13.219,13.199,13.1791,13.1592,13.1394,13.1196,13.0999,13.0802, 13.0605,13.0409,13.0214,13.0018,12.9824,12.9629,12.9436,12.9242,12.9049, 12.8857,12.8664,12.8473,12.8281,12.8091,12.79,12.771,12.7521,12.7331, 12.7143,12.6954,12.6766,12.6579,12.6392,12.6205,12.6019,12.5833,12.5648, 12.5463,12.5278,12.5094,12.491,12.4726,12.4543,12.4361,12.4179,12.3997, 12.3815,12.3634,12.3454,12.3274,12.3094,12.2914,12.2735,12.2557,12.2378, 12.22,12.2023,12.1846,12.1669,12.1493,12.1317,12.1141,12.0966,12.0791, 12.0617,12.0443,12.0269,12.0096,11.9923,11.975,11.9578,11.9406,11.9235, 11.9064,11.8893,11.8723,11.8553,11.8383,11.8214,11.8045,11.7876,11.7708, 11.754,11.7373,11.7206,11.7039,11.6872,11.6706,11.6541,11.6375,11.621, 11.6046,11.5881,11.5717,11.5554,11.5391,11.5228,11.5065,11.4903,11.4741, 11.4579,11.4418,11.4257,11.4097,11.3937,11.3777,11.3617,11.3458,11.3299, 11.3141,11.2983,11.2825,11.2667,11.251,11.2353,11.2197,11.204,11.1885, 11.1729,11.1574,11.1419,11.1264,11.111,11.0956,11.0802,11.0649,11.0496, 11.0343,11.0191,11.0039,10.9887,10.9736,10.9585,10.9434,10.9283,10.9133, 10.8983,10.8834,10.8684,10.8535,10.8387,10.8238,10.809,10.7943,10.7795, 10.7648,10.7501,10.7355,10.7208,10.7063,10.6917,10.6772,10.6626,10.6482, 10.6337,10.6193,10.6049,10.5906,10.5762,10.5619,10.5477,10.5334,10.5192, 10.505,10.4909,10.4767,10.4626,10.4486,10.4345,10.4205,10.4065,10.3925, 10.3786,10.3647,10.3508,10.337,10.3232,10.3094,10.2956,10.2819,10.2682, 10.2545,10.2408,10.2272,10.2136,10.2,10.1865,10.173,10.1595,10.146, 10.1326,10.1191,10.1058,10.0924,10.0791,10.0658,10.0525,10.0392,10.026, 10.0128,9.99961,9.98646,9.97333,9.96024,9.94716,9.93411,9.92109,9.90809, 9.89512,9.88218,9.86926,9.85636,9.84349,9.83065,9.81783,9.80503,9.79226, 9.77952,9.76679,9.7541,9.74143,9.72878,9.71616,9.70356,9.69099,9.67844, 9.66592,9.65342,9.64094,9.62849,9.61606,9.60366,9.59128,9.57892,9.56659, 9.55428,9.542,9.52973,9.5175,9.50528,9.49309,9.48093,9.46878,9.45666, 9.44456,9.43249,9.42044,9.40841,9.3964,9.38442,9.37246,9.36052,9.34861, 9.33672,9.32485,9.313,9.30118,9.28938,9.2776,9.26584,9.25411,9.2424, 9.23071,9.21904,9.20739,9.19577,9.18417,9.17259,9.16103,9.14949,9.13798, 9.12649,9.11502,9.10357,9.09214,9.08073,9.06935,9.05798,9.04664,9.03532, 9.02402,9.01274,9.00148,8.99024,8.97903,8.96783,8.95666,8.9455,8.93437, 8.92326,8.91217,8.9011,8.89005,8.87902,8.86801,8.85702,8.84605,8.8351, 8.82417,8.81327,8.80238,8.79151,8.78066,8.76984,8.75903,8.74824,8.73747, 8.72673,8.716,8.70529,8.6946,8.68393,8.67328,8.66265,8.65204,8.64145, 8.63088,8.62033,8.6098,8.59928,8.58879,8.57831,8.56786,8.55742,8.547, 8.5366,8.52622,8.51586,8.50552,8.49519,8.48489,8.4746,8.46433,8.45409, 8.44385,8.43364,8.42345,8.41327,8.40312,8.39298,8.38286,8.37276,8.36267, 8.35261,8.34256,8.33253,8.32252,8.31253,8.30255,8.29259,8.28265,8.27273, 8.26283,8.25294,8.24307,8.23322,8.22339,8.21357,8.20378,8.194,8.18423, 8.17449,8.16476,8.15505,8.14535,8.13568,8.12602,8.11637,8.10675,8.09714, 8.08755,8.07797,8.06842,8.05888,8.04935,8.03985,8.03036,8.02088,8.01143, 8.00199,7.99257,7.98316,7.97377,7.9644,7.95504,7.9457,7.93637,7.92707, 7.91777,7.9085,7.89924,7.89,7.88077,7.87156,7.86237,7.85319,7.84403, 7.83488,7.82575,7.81664,7.80754,7.79846,7.78939,7.78034,7.7713,7.76228, 7.75328,7.74429,7.73532,7.72636,7.71742,7.70849,7.69958,7.69069,7.68181, 7.67294,7.66409,7.65526,7.64644,7.63764,7.62885,7.62008,7.61132,7.60257, 7.59385,7.58513,7.57643,7.56775,7.55908,7.55043,7.54179,7.53317,7.52456, 7.51596,7.50738,7.49882,7.49027,7.48173,7.47321,7.4647,7.45621,7.44773, 7.43927,7.43082,7.42238,7.41396,7.40556,7.39717,7.38879,7.38042,7.37208, 7.36374,7.35542,7.34711,7.33882,7.33054,7.32228,7.31402,7.30579,7.29756, 7.28935,7.28116,7.27298,7.26481,7.25665,7.24851,7.24039,7.23227,7.22417, 7.21609,7.20801,7.19995,7.19191,7.18388,7.17586,7.16785,7.15986,7.15188, 7.14392,7.13596,7.12802,7.1201,7.11219,7.10429,7.0964,7.08853,7.08067, 7.07282,7.06499,7.05716,7.04936,7.04156,7.03378,7.02601,7.01825,7.01051, 7.00278,6.99506,6.98735,6.97966,6.97198,6.96431,6.95666,6.94902,6.94139, 6.93377,6.92616,6.91857,6.91099,6.90343,6.89587,6.88833,6.8808,6.87328, 6.86577,6.85828,6.8508,6.84333,6.83587,6.82843,6.821,6.81358,6.80617, 6.79877,6.79139,6.78401,6.77665,6.76931,6.76197,6.75464,6.74733,6.74003, 6.73274,6.72546,6.7182,6.71095,6.7037,6.69647,6.68925,6.68205,6.67485, 6.66767,6.6605,6.65334,6.64619,6.63905,6.63192,6.62481,6.6177,6.61061, 6.60353,6.59646,6.58941,6.58236,6.57532,6.5683,6.56129,6.55428,6.54729, 6.54032,6.53335,6.52639,6.51944,6.51251,6.50559,6.49867,6.49177,6.48488, 6.478,6.47113,6.46427,6.45742,6.45059,6.44376,6.43695,6.43014,6.42335, 6.41657,6.4098,6.40304,6.39629,6.38955,6.38282,6.3761,6.36939,6.36269, 6.35601,6.34933,6.34266,6.33601,6.32936,6.32273,6.3161,6.30949,6.30289, 6.29629,6.28971,6.28314,6.27658,6.27002,6.26348,6.25695,6.25043,6.24392, 6.23742,6.23093,6.22445,6.21798,6.21152,6.20507,6.19862,6.19219,6.18577, 6.17936,6.17296,6.16657,6.16019,6.15382,6.14746,6.14111,6.13477,6.12844, 6.12211,6.1158,6.1095,6.10321,6.09692,6.09065,6.08439,6.07813,6.07189, 6.06565,6.05943,6.05321,6.04701,6.04081,6.03462,6.02845,6.02228,6.01612, 6.00997,6.00383,5.9977,5.99158,5.98547,5.97937,5.97327,5.96719,5.96111, 5.95505,5.94899,5.94295,5.93691,5.93088,5.92486,5.91885,5.91285,5.90686, 5.90087,5.8949,5.88894,5.88298,5.87703,5.8711,5.86517,5.85925,5.85334, 5.84744,5.84154,5.83566,5.82978,5.82392,5.81806,5.81221,5.80637,5.80054, 5.79472,5.7889,5.7831,5.7773,5.77152,5.76574,5.75997,5.75421,5.74845, 5.74271,5.73697,5.73125,5.72553,5.71982,5.71412,5.70842,5.70274,5.69706, 5.69139,5.68574,5.68008,5.67444,5.66881,5.66318,5.65757,5.65196,5.64636, 5.64076,5.63518,5.6296,5.62404,5.61848,5.61293,5.60738,5.60185,5.59632, 5.59081,5.5853,5.57979,5.5743,5.56881,5.56334,5.55787,5.55241,5.54695, 5.54151,5.53607,5.53064,5.52522,5.5198,5.5144,5.509,5.50361,5.49823, 5.49286,5.48749,5.48213,5.47678,5.47144,5.4661,5.46078,5.45546,5.45014, 5.44484,5.43954,5.43426,5.42898,5.4237,5.41844,5.41318,5.40793,5.40269, 5.39745,5.39223,5.38701,5.38179,5.37659,5.37139,5.3662,5.36102,5.35585, 5.35068,5.34552,5.34037,5.33522,5.33008,5.32496,5.31983,5.31472,5.30961, 5.30451,5.29942,5.29433,5.28925,5.28418,5.27912,5.27406,5.26901,5.26397, 5.25893,5.25391,5.24889,5.24387,5.23887,5.23387,5.22888,5.22389,5.21891, 5.21394,5.20898,5.20402,5.19907,5.19413,5.1892,5.18427,5.17935,5.17443, 5.16952,5.16462,5.15973,5.15484,5.14997,5.14509,5.14023,5.13537,5.13052, 5.12567,5.12083,5.116,5.11118,5.10636,5.10155,5.09674,5.09195,5.08716, 5.08237,5.0776,5.07283,5.06806,5.0633,5.05855,5.05381,5.04907,5.04434, 5.03962,5.0349,5.03019,5.02549,5.02079,5.0161,5.01142,5.00674,5.00207, 4.9974,4.99274,4.98809,4.98345,4.97881,4.97418,4.96955,4.96493,4.96032, 4.95571,4.95111,4.94652,4.94193,4.93735,4.93278,4.92821,4.92365,4.91909, 4.91454,4.91,4.90546,4.90093,4.89641,4.89189,4.88738,4.88287,4.87837, 4.87388,4.8694,4.86491,4.86044,4.85597,4.85151,4.84705,4.8426,4.83816, 4.83372,4.82929,4.82487,4.82045,4.81603,4.81163,4.80723,4.80283,4.79844, 4.79406,4.78968,4.78531,4.78094,4.77658,4.77223,4.76788,4.76354,4.75921, 4.75488,4.75055,4.74624,4.74192,4.73762,4.73332,4.72902,4.72474,4.72045, 4.71618,4.7119,4.70764,4.70338,4.69913,4.69488,4.69064,4.6864,4.68217, 4.67794,4.67372,4.66951,4.6653,4.6611,4.6569,4.65271,4.64853,4.64435, 4.64017,4.636,4.63184,4.62768,4.62353,4.61939,4.61525,4.61111,4.60698, 4.60286,4.59874,4.59463,4.59052,4.58642,4.58232,4.57823,4.57414,4.57006, 4.56599,4.56192,4.55786,4.5538,4.54975,4.5457,4.54166,4.53762,4.53359, 4.52956,4.52554,4.52153,4.51752,4.51351,4.50951,4.50552,4.50153,4.49755, 4.49357,4.4896,4.48563,4.48167,4.47771,4.47376,4.46981,4.46587,4.46193, 4.458,4.45408,4.45016,4.44624,4.44233,4.43843,4.43453,4.43063,4.42674, 4.42286,4.41898,4.4151,4.41123,4.40737,4.40351,4.39965,4.39581,4.39196, 4.38812,4.38429,4.38046,4.37664,4.37282,4.369,4.36519,4.36139,4.35759, 4.3538,4.35001,4.34622,4.34244,4.33867,4.3349,4.33113,4.32738,4.32362, 4.31987,4.31613,4.31238,4.30865,4.30492,4.30119,4.29747,4.29376,4.29005, 4.28634,4.28264,4.27894,4.27525,4.27156,4.26788,4.2642,4.26053,4.25686, 4.2532,4.24954,4.24588,4.24223,4.23859,4.23495,4.23131,4.22768,4.22406, 4.22044,4.21682,4.21321,4.2096,4.206,4.2024,4.1988,4.19522,4.19163, 4.18805,4.18448,4.18091,4.17734,4.17378,4.17022,4.16667,4.16312,4.15958, 4.15604,4.1525,4.14897,4.14545,4.14193,4.13841,4.1349,4.13139,4.12789, 4.12439,4.1209,4.11741,4.11392,4.11044,4.10696,4.10349,4.10002,4.09656, 4.0931,4.08965,4.0862,4.08275,4.07931,4.07587,4.07244,4.06901,4.06559, 4.06217,4.05875,4.05534,4.05193,4.04853,4.04513,4.04174,4.03835,4.03496, 4.03158,4.0282,4.02483,4.02146,4.0181,4.01474,4.01138,4.00803,4.00468, 4.00134,3.998,3.99467,3.99133,3.98801,3.98469,3.98137,3.97805,3.97474, 3.97144,3.96813,3.96484,3.96154,3.95825,3.95497,3.95169,3.94841,3.94514, 3.94187,3.9386,3.93534,3.93208,3.92883,3.92558,3.92234,3.9191,3.91586, 3.91263,3.9094,3.90617,3.90295,3.89973,3.89652,3.89331,3.89011,3.88691, 3.88371,3.88051,3.87733,3.87414,3.87096,3.86778,3.86461,3.86144,3.85827, 3.85511,3.85195,3.8488,3.84565,3.8425,3.83936,3.83622,3.83308,3.82995, 3.82683,3.8237,3.82058,3.81747,3.81435,3.81125,3.80814,3.80504,3.80194, 3.79885,3.79576,3.79268,3.78959,3.78652,3.78344,3.78037,3.7773,3.77424, 3.77118,3.76813,3.76507,3.76203,3.75898,3.75594,3.7529,3.74987,3.74684, 3.74381,3.74079,3.73777,3.73476,3.73175,3.72874,3.72573,3.72273,3.71974, 3.71674,3.71375,3.71077,3.70778,3.7048,3.70183,3.69886,3.69589,3.69292, 3.68996,3.68701,3.68405,3.6811,3.67815,3.67521,3.67227,3.66933,3.6664, 3.66347,3.66055,3.65762,3.6547,3.65179,3.64888,3.64597,3.64306,3.64016, 3.63726,3.63437,3.63148,3.62859,3.62571,3.62282,3.61995,3.61707,3.6142, 3.61134,3.60847,3.60561,3.60275,3.5999,3.59705,3.5942,3.59136,3.58852, 3.58568,3.58285,3.58002,3.57719,3.57437,3.57155,3.56873,3.56592,3.56311, 3.5603,3.5575,3.5547,3.5519,3.54911,3.54632,3.54353,3.54075,3.53797, 3.53519,3.53242,3.52965,3.52688,3.52412,3.52136,3.5186,3.51584,3.51309, 3.51035,3.5076,3.50486,3.50212,3.49939,3.49665,3.49393,3.4912,3.48848, 3.48576,3.48304,3.48033,3.47762,3.47491,3.47221,3.46951,3.46681,3.46412, 3.46143,3.45874,3.45606,3.45338,3.4507,3.44802,3.44535,3.44268,3.44002, 3.43735,3.43469,3.43204,3.42938,3.42673,3.42409,3.42144,3.4188,3.41616, 3.41353,3.4109,3.40827,3.40564,3.40302,3.4004,3.39778,3.39517,3.39256, 3.38995,3.38734,3.38474,3.38214,3.37955,3.37695,3.37436,3.37178,3.36919, 3.36661,3.36403,3.36146,3.35889,3.35632,3.35375,3.35119,3.34863,3.34607, 3.34352,3.34096,3.33842,3.33587,3.33333,3.33079,3.32825,3.32572,3.32319, 3.32066,3.31813,3.31561,3.31309,3.31057,3.30806,3.30555,3.30304,3.30053, 3.29803,3.29553,3.29303,3.29054,3.28805,3.28556,3.28307,3.28059,3.27811, 3.27563,3.27316,3.27069,3.26822,3.26575,3.26329,3.26083,3.25837,3.25592, 3.25347,3.25102,3.24857,3.24613,3.24368,3.24125,3.23881,3.23638,3.23395, 3.23152,3.2291,3.22667,3.22426,3.22184,3.21943,3.21701,3.21461,3.2122, 3.2098,3.2074,3.205,3.2026,3.20021,3.19782,3.19544,3.19305,3.19067, 3.18829,3.18592,3.18354,3.18117,3.1788,3.17644,3.17407,3.17171,3.16936, 3.167,3.16465,3.1623,3.15995,3.15761,3.15526,3.15293,3.15059,3.14825, 3.14592,3.14359,3.14127,3.13894,3.13662,3.1343,3.13199,3.12967,3.12736, 3.12505,3.12275,3.12044,3.11814,3.11585,3.11355,3.11126,3.10897,3.10668, 3.10439,3.10211,3.09983,3.09755,3.09527,3.093,3.09073,3.08846,3.0862, 3.08393,3.08167,3.07942,3.07716,3.07491,3.07266,3.07041,3.06816,3.06592, 3.06368,3.06144,3.0592,3.05697,3.05474,3.05251,3.05028,3.04806,3.04584, 3.04362,3.0414,3.03919,3.03698,3.03477,3.03256,3.03036,3.02815,3.02595, 3.02376,3.02156,3.01937,3.01718,3.01499,3.01281,3.01062,3.00844,3.00627, 3.00409,3.00192,2.99974,2.99758,2.99541,2.99325,2.99108,2.98892,2.98677, 2.98461,2.98246,2.98031,2.97816,2.97602,2.97387,2.97173,2.96959,2.96746, 2.96532,2.96319,2.96106,2.95894,2.95681,2.95469,2.95257,2.95045,2.94834, 2.94622,2.94411,2.942,2.9399,2.93779,2.93569,2.93359,2.93149,2.9294, 2.9273,2.92521,2.92312,2.92104,2.91895,2.91687,2.91479,2.91271,2.91064, 2.90857,2.9065,2.90443,2.90236,2.9003,2.89823,2.89617,2.89412,2.89206, 2.89001,2.88796,2.88591,2.88386,2.88182,2.87978,2.87773,2.8757,2.87366, 2.87163,2.8696,2.86757,2.86554,2.86351,2.86149,2.85947,2.85745,2.85544, 2.85342,2.85141,2.8494,2.84739,2.84538,2.84338,2.84138,2.83938,2.83738, 2.83539,2.83339,2.8314,2.82941,2.82743,2.82544,2.82346,2.82148,2.8195, 2.81752,2.81555,2.81358,2.81161,2.80964,2.80767,2.80571,2.80375,2.80179, 2.79983,2.79787,2.79592,2.79397,2.79202,2.79007,2.78812,2.78618,2.78424, 2.7823,2.78036,2.77843,2.77649,2.77456,2.77263,2.7707,2.76878,2.76685, 2.76493,2.76301,2.7611,2.75918,2.75727,2.75536,2.75345,2.75154,2.74963, 2.74773,2.74583,2.74393,2.74203,2.74013,2.73824,2.73635,2.73446,2.73257, 2.73069,2.7288,2.72692,2.72504,2.72316,2.72129,2.71941,2.71754,2.71567, 2.7138,2.71193,2.71007,2.70821,2.70634,2.70449,2.70263,2.70077,2.69892, 2.69707,2.69522,2.69337,2.69153,2.68968,2.68784,2.686,2.68416,2.68233, 2.68049,2.67866,2.67683,2.675,2.67318,2.67135,2.66953,2.66771,2.66589, 2.66407,2.66226,2.66044,2.65863,2.65682,2.65501,2.65321,2.6514,2.6496, 2.6478,2.646,2.6442,2.64241,2.64061,2.63882,2.63703,2.63524,2.63346, 2.63167,2.62989,2.62811,2.62633,2.62455,2.62278,2.621,2.61923,2.61746, 2.61569,2.61393,2.61216,2.6104,2.60864,2.60688,2.60512,2.60337,2.60161, 2.59986,2.59811,2.59636,2.59462,2.59287,2.59113,2.58939,2.58765,2.58591, 2.58417,2.58244,2.5807,2.57897,2.57724,2.57552,2.57379,2.57207,2.57034, 2.56862,2.5669,2.56519,2.56347,2.56176,2.56005,2.55834,2.55663,2.55492, 2.55322,2.55151,2.54981,2.54811,2.54641,2.54471,2.54302,2.54133,2.53963, 2.53794,2.53626,2.53457 }; int i = int(kf); double x = kf-i; if(i>2999) return 2;//or maybe tablica_Mef[2999]; else return MEF[i]*(1-x) + MEF[i+1]*x; }
cjusz/nuwro
src/nucleus_data.cc
C++
gpl-3.0
68,022
package org.gnubridge.presentation.gui; import java.awt.Point; import org.gnubridge.core.Card; import org.gnubridge.core.Direction; import org.gnubridge.core.East; import org.gnubridge.core.Deal; import org.gnubridge.core.Hand; import org.gnubridge.core.North; import org.gnubridge.core.South; import org.gnubridge.core.West; import org.gnubridge.core.deck.Suit; public class OneColumnPerColor extends HandDisplay { public OneColumnPerColor(Direction human, Direction player, Deal game, CardPanelHost owner) { super(human, player, game, owner); } final static int CARD_OFFSET = 30; @Override public void display() { dispose(cards); Hand hand = new Hand(game.getPlayer(player).getHand()); Point upperLeft = calculateUpperLeft(human, player); for (Suit color : Suit.list) { int j = 0; for (Card card : hand.getSuitHi2Low(color)) { CardPanel cardPanel = new CardPanel(card); cards.add(cardPanel); if (human.equals(South.i())) { cardPanel.setPlayable(true); } owner.addCard(cardPanel); cardPanel.setLocation((int) upperLeft.getX(), (int) upperLeft.getY() + CARD_OFFSET * j); j++; } upperLeft.setLocation(upperLeft.getX() + CardPanel.IMAGE_WIDTH + 2, upperLeft.getY()); } } private Point calculateUpperLeft(Direction human, Direction player) { Direction slot = new HumanAlwaysOnBottom(human).mapRelativeTo(player); if (North.i().equals(slot)) { return new Point(235, 5); } else if (West.i().equals(slot)) { return new Point(3, owner.getTotalHeight() - 500); } else if (East.i().equals(slot)) { return new Point(512, owner.getTotalHeight() - 500); } else if (South.i().equals(slot)) { return new Point(235, owner.getTableBottom() + 1); } throw new RuntimeException("unknown direction"); } }
pslusarz/gnubridge
src/main/java/org/gnubridge/presentation/gui/OneColumnPerColor.java
Java
gpl-3.0
1,786
/* * Copyright (c) 2000-2005, 2008-2011 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ /* * Modification History * * June 1, 2001 Allan Nathanson <ajn@apple.com> * - public API conversion * * March 31, 2000 Allan Nathanson <ajn@apple.com> * - initial revision */ #include <mach/mach.h> #include <mach/mach_error.h> #include <SystemConfiguration/SystemConfiguration.h> #include <SystemConfiguration/SCPrivate.h> #include "SCDynamicStoreInternal.h" #include "config.h" /* MiG generated file */ Boolean SCDynamicStoreNotifyCancel(SCDynamicStoreRef store) { SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; kern_return_t status; int sc_status; if (store == NULL) { /* sorry, you must provide a session */ _SCErrorSet(kSCStatusNoStoreSession); return FALSE; } switch (storePrivate->notifyStatus) { case NotifierNotRegistered : /* if no notifications have been registered */ return TRUE; case Using_NotifierInformViaRunLoop : CFRunLoopSourceInvalidate(storePrivate->rls); storePrivate->rls = NULL; return TRUE; case Using_NotifierInformViaDispatch : (void) SCDynamicStoreSetDispatchQueue(store, NULL); return TRUE; default : break; } if (storePrivate->server == MACH_PORT_NULL) { /* sorry, you must have an open session to play */ sc_status = kSCStatusNoStoreServer; goto done; } status = notifycancel(storePrivate->server, (int *)&sc_status); if (__SCDynamicStoreCheckRetryAndHandleError(store, status, &sc_status, "SCDynamicStoreNotifyCancel notifycancel()")) { sc_status = kSCStatusOK; } done : /* set notifier inactive */ storePrivate->notifyStatus = NotifierNotRegistered; if (sc_status != kSCStatusOK) { _SCErrorSet(sc_status); return FALSE; } return TRUE; }
LubosD/darling
src/configd/SystemConfiguration.fproj/SCDNotifierCancel.c
C
gpl-3.0
2,715
### Berry Berry is multiplatform and modern image viewer, focused on better user interface... ### How to Compile #### Install dependencies Install gcc, g++, libexiv2, Qt5Core, Qt5DBus, Qt5Gui, Qt5Multimedia, Qt5MultimediaQuick_p, Qt5Network, Qt5PrintSupport, Qt5Qml, Qt5Quick, Qt5Sql, Qt5Svg, and Qt5Widgets. on Ubuntu: sudo apt-get install g++ gcc libexiv2-dev qtbase5-dev libqt5sql5-sqlite libqt5multimediaquick-p5 libqt5multimedia5-plugins libqt5multimedia5 libqt5qml5 libqt5qml-graphicaleffects libqt5qml-quickcontrols qtdeclarative5-dev libqt5quick5 For other distributions search for the corresponding packages. #### Get source code from git repository If you want get source from git repository you should install git on your system: sudo apt-get install git After git installed, get code with this command: git clone https://github.com/Aseman-Land/Berry.git #### Start building Switch to source directory cd berry ##### Ubuntu mkdir build && cd build qmake -r .. make You can use command below after building to clean build directory on the each step. make clean
hoowang/Berry
README.md
Markdown
gpl-3.0
1,121
#Region "Microsoft.VisualBasic::1832a06e22224b31f8fa10e2ca2102b9, ..\sciBASIC#\mime\text%html\HTML\CSS\Parser\enums.vb" ' Author: ' ' asuka (amethyst.asuka@gcmodeller.org) ' xieguigang (xie.guigang@live.com) ' xie (genetics@smrucc.org) ' ' Copyright (c) 2016 GPL3 Licensed ' ' ' GNU GENERAL PUBLIC LICENSE (GPL3) ' ' This program is free software: you can redistribute it and/or modify ' it under the terms of the GNU General Public License as published by ' the Free Software Foundation, either version 3 of the License, or ' (at your option) any later version. ' ' This program is distributed in the hope that it will be useful, ' but WITHOUT ANY WARRANTY; without even the implied warranty of ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ' GNU General Public License for more details. ' ' You should have received a copy of the GNU General Public License ' along with this program. If not, see <http://www.gnu.org/licenses/>. #End Region Imports System.ComponentModel ''' <summary> ''' Define Tag type. ''' </summary> Public Enum CSSTagTypes As Byte ''' <summary> ''' Normal HTMl Tag. ''' </summary> tag = 0 ''' <summary> ''' Class in HTML Code. ''' </summary> [class] ''' <summary> ''' Tag in HTML Code. ''' </summary> id End Enum ''' <summary> ''' HTML Tags. ''' </summary> Public Enum HtmlTags h1 h2 h3 h4 h5 h6 body a img ol ul li table tr th nav heder footer form [option] [select] button textarea input audio video iframe hr em div pre p span End Enum ''' <summary> ''' Css properties list. ''' </summary> Public Enum CssProperty As Int32 ''' <summary> ''' font-weight ''' </summary> <Description("font-weight")> font_weight ''' <summary> ''' border-radius ''' </summary> <Description("border-radius")> border_radius ''' <summary> ''' color-stop ''' </summary> <Description("color-stop")> color_stop ''' <summary> ''' alignment-adjust ''' </summary> <Description("alignment-adjust")> alignment_adjust ''' <summary> ''' alignment-baseline ''' </summary> <Description("alignment-baseline")> alignment_baseline ''' <summary> ''' animation ''' </summary> <Description("animation")> animation ''' <summary> ''' animation-delay ''' </summary> <Description("animation-delay")> animation_delay ''' <summary> ''' animation-direction ''' </summary> <Description("animation-direction")> animation_direction ''' <summary> ''' animation-duration ''' </summary> <Description("animation-duration")> animation_duration ''' <summary> ''' animation-iteration-count ''' </summary> <Description("animation-iteration-count")> animation_iteration_count ''' <summary> ''' animation-name ''' </summary> <Description("animation-name")> animation_name ''' <summary> ''' animation-play-state ''' </summary> <Description("animation-play-state")> animation_play_state ''' <summary> ''' animation-timing-function ''' </summary> <Description("animation-timing-function")> animation_timing_function ''' <summary> ''' appearance ''' </summary> <Description("appearance")> appearance ''' <summary> ''' azimuth ''' </summary> <Description("azimuth")> azimuth ''' <summary> ''' backface-visibility ''' </summary> <Description("backface-visibility")> backface_visibility ''' <summary> ''' background ''' </summary> <Description("background")> background ''' <summary> ''' background-attachment ''' </summary> <Description("background-attachment")> background_attachment ''' <summary> ''' background-break ''' </summary> <Description("background-break")> background_break ''' <summary> ''' background-clip ''' </summary> <Description("background-clip")> background_clip ''' <summary> ''' background-color ''' </summary> <Description("background-color")> background_color ''' <summary> ''' background-image ''' </summary> <Description("background-image")> background_image ''' <summary> ''' background-origin ''' </summary> <Description("background-origin")> background_origin ''' <summary> ''' background-position ''' </summary> <Description("background-position")> background_position ''' <summary> ''' background-repeat ''' </summary> <Description("background-repeat")> background_repeat ''' <summary> ''' background-size ''' </summary> <Description("background-size")> background_size ''' <summary> ''' baseline-shift ''' </summary> <Description("baseline-shift")> baseline_shift ''' <summary> ''' binding ''' </summary> <Description("binding")> binding ''' <summary> ''' bleed ''' </summary> <Description("bleed")> bleed ''' <summary> ''' bookmark-label ''' </summary> <Description("bookmark-label")> bookmark_label ''' <summary> ''' bookmark-level ''' </summary> <Description("bookmark-level")> bookmark_level ''' <summary> ''' bookmark-state ''' </summary> <Description("bookmark-state")> bookmark_state ''' <summary> ''' bookmark-target ''' </summary> <Description("bookmark-target")> bookmark_target ''' <summary> ''' border ''' </summary> <Description("border")> border ''' <summary> ''' border-bottom ''' </summary> <Description("border-bottom")> border_bottom ''' <summary> ''' border-bottom-color ''' </summary> <Description("border-bottom-color")> border_bottom_color ''' <summary> ''' border-bottom-left-radius ''' </summary> <Description("border-bottom-left-radius")> border_bottom_left_radius ''' <summary> ''' border-bottom-right-radius ''' </summary> <Description("border-bottom-right-radius")> border_bottom_right_radius ''' <summary> ''' border-bottom-style ''' </summary> <Description("border-bottom-style")> border_bottom_style ''' <summary> ''' border-bottom-width ''' </summary> <Description("border-bottom-width")> border_bottom_width ''' <summary> ''' border-collapse ''' </summary> <Description("border-collapse")> border_collapse ''' <summary> ''' border-color ''' </summary> <Description("border-color")> border_color ''' <summary> ''' border-image ''' </summary> <Description("border-image")> border_image ''' <summary> ''' border-image-outset ''' </summary> <Description("border-image-outset")> border_image_outset ''' <summary> ''' border-image-repeat ''' </summary> <Description("border-image-repeat")> border_image_repeat ''' <summary> ''' border-image-slice ''' </summary> <Description("border-image-slice")> border_image_slice ''' <summary> ''' border-image-source ''' </summary> <Description("border-image-source")> border_image_source ''' <summary> ''' border-image-width ''' </summary> <Description("border-image-width")> border_image_width ''' <summary> ''' border-left ''' </summary> <Description("border-left")> border_left ''' <summary> ''' border-left-color ''' </summary> <Description("border-left-color")> border_left_color ''' <summary> ''' border-left-style ''' </summary> <Description("border-left-style")> border_left_style ''' <summary> ''' border-left-width ''' </summary> <Description("border-left-width")> border_left_width ''' <summary> ''' border-right ''' </summary> <Description("border-right")> border_right ''' <summary> ''' border-right-color ''' </summary> <Description("border-right-color")> border_right_color ''' <summary> ''' border-right-style ''' </summary> <Description("border-right-style")> border_right_style ''' <summary> ''' border-right-width ''' </summary> <Description("border-right-width")> border_right_width ''' <summary> ''' border-spacing ''' </summary> <Description("border-spacing")> border_spacing ''' <summary> ''' border-style ''' </summary> <Description("border-style")> border_style ''' <summary> ''' border-top ''' </summary> <Description("border-top")> border_top ''' <summary> ''' border-top-color ''' </summary> <Description("border-top-color")> border_top_color ''' <summary> ''' border-top-left-radius ''' </summary> <Description("border-top-left-radius")> border_top_left_radius ''' <summary> ''' border-top-right-radius ''' </summary> <Description("border-top-right-radius")> border_top_right_radius ''' <summary> ''' border-top-style ''' </summary> <Description("border-top-style")> border_top_style ''' <summary> ''' border-top-width ''' </summary> <Description("border-top-width")> border_top_width ''' <summary> ''' border-width ''' </summary> <Description("border-width")> border_width ''' <summary> ''' bottom ''' </summary> <Description("bottom")> bottom ''' <summary> ''' box-align ''' </summary> <Description("box-align")> box_align ''' <summary> ''' box-decoration-break ''' </summary> <Description("box-decoration-break")> box_decoration_break ''' <summary> ''' box-direction ''' </summary> <Description("box-direction")> box_direction ''' <summary> ''' box-flex ''' </summary> <Description("box-flex")> box_flex ''' <summary> ''' box-flex-group ''' </summary> <Description("box-flex-group")> box_flex_group ''' <summary> ''' box-lines ''' </summary> <Description("box-lines")> box_lines ''' <summary> ''' box-ordinal-group ''' </summary> <Description("box-ordinal-group")> box_ordinal_group ''' <summary> ''' box-orient ''' </summary> <Description("box-orient")> box_orient ''' <summary> ''' box-pack ''' </summary> <Description("box-pack")> box_pack ''' <summary> ''' box-shadow ''' </summary> <Description("box-shadow")> box_shadow ''' <summary> ''' box-sizing ''' </summary> <Description("box-sizing")> box_sizing ''' <summary> ''' break-after ''' </summary> <Description("break-after")> break_after ''' <summary> ''' break-before ''' </summary> <Description("break-before")> break_before ''' <summary> ''' break-inside ''' </summary> <Description("break-inside")> break_inside ''' <summary> ''' caption-side ''' </summary> <Description("caption-side")> caption_side ''' <summary> ''' clear ''' </summary> <Description("clear")> clear ''' <summary> ''' clip ''' </summary> <Description("clip")> clip ''' <summary> ''' color ''' </summary> <Description("color")> color ''' <summary> ''' color-profile ''' </summary> <Description("color-profile")> color_profile ''' <summary> ''' column-count ''' </summary> <Description("column-count")> column_count ''' <summary> ''' column-fill ''' </summary> <Description("column-fill")> column_fill ''' <summary> ''' column-gap ''' </summary> <Description("column-gap")> column_gap ''' <summary> ''' column-rule ''' </summary> <Description("column-rule")> column_rule ''' <summary> ''' column-rule-color ''' </summary> <Description("column-rule-color")> column_rule_color ''' <summary> ''' column-rule-style ''' </summary> <Description("column-rule-style")> column_rule_style ''' <summary> ''' column-rule-width ''' </summary> <Description("column-rule-width")> column_rule_width ''' <summary> ''' column-span ''' </summary> <Description("column-span")> column_span ''' <summary> ''' column-width ''' </summary> <Description("column-width")> column_width ''' <summary> ''' columns ''' </summary> <Description("columns")> columns ''' <summary> ''' content ''' </summary> <Description("content")> content ''' <summary> ''' counter-increment ''' </summary> <Description("counter-increment")> counter_increment ''' <summary> ''' counter-reset ''' </summary> <Description("counter-reset")> counter_reset ''' <summary> ''' crop ''' </summary> <Description("crop")> crop ''' <summary> ''' cue ''' </summary> <Description("cue")> cue ''' <summary> ''' cue-after ''' </summary> <Description("cue-after")> cue_after ''' <summary> ''' cue-before ''' </summary> <Description("cue-before")> cue_before ''' <summary> ''' cursor ''' </summary> <Description("cursor")> cursor ''' <summary> ''' direction ''' </summary> <Description("direction")> direction ''' <summary> ''' display ''' </summary> <Description("display")> display ''' <summary> ''' dominant-baseline ''' </summary> <Description("dominant-baseline")> dominant_baseline ''' <summary> ''' drop-initial-after-adjust ''' </summary> <Description("drop-initial-after-adjust")> drop_initial_after_adjust ''' <summary> ''' drop-initial-after-align ''' </summary> <Description("drop-initial-after-align")> drop_initial_after_align ''' <summary> ''' drop-initial-before-adjust ''' </summary> <Description("drop-initial-before-adjust")> drop_initial_before_adjust ''' <summary> ''' drop-initial-before-align ''' </summary> <Description("drop-initial-before-align")> drop_initial_before_align ''' <summary> ''' drop-initial-size ''' </summary> <Description("drop-initial-size")> drop_initial_size ''' <summary> ''' drop-initial-value ''' </summary> <Description("drop-initial-value")> drop_initial_value ''' <summary> ''' elevation ''' </summary> <Description("elevation")> elevation ''' <summary> ''' empty-cells ''' </summary> <Description("empty-cells")> empty_cells ''' <summary> ''' filter ''' </summary> <Description("filter")> filter ''' <summary> ''' fit ''' </summary> <Description("fit")> fit ''' <summary> ''' fit-position ''' </summary> <Description("fit-position")> fit_position ''' <summary> ''' float-offset ''' </summary> <Description("float-offset")> float_offset ''' <summary> ''' font ''' </summary> <Description("font")> font ''' <summary> ''' font-effect ''' </summary> <Description("font-effect")> font_effect ''' <summary> ''' font-emphasize ''' </summary> <Description("font-emphasize")> font_emphasize ''' <summary> ''' font-family ''' </summary> <Description("font-family")> font_family ''' <summary> ''' font-size ''' </summary> <Description("font-size")> font_size ''' <summary> ''' font-size-adjust ''' </summary> <Description("font-size-adjust")> font_size_adjust ''' <summary> ''' font-stretch ''' </summary> <Description("font-stretch")> font_stretch ''' <summary> ''' font-style ''' </summary> <Description("font-style")> font_style ''' <summary> ''' font-variant ''' </summary> <Description("font-variant")> font_variant ''' <summary> ''' grid-columns ''' </summary> <Description("grid-columns")> grid_columns ''' <summary> ''' grid-rows ''' </summary> <Description("grid-rows")> grid_rows ''' <summary> ''' hanging-punctuation ''' </summary> <Description("hanging-punctuation")> hanging_punctuation ''' <summary> ''' height ''' </summary> <Description("height")> height ''' <summary> ''' hyphenate-after ''' </summary> <Description("hyphenate-after")> hyphenate_after ''' <summary> ''' hyphenate-before ''' </summary> <Description("hyphenate-before")> hyphenate_before ''' <summary> ''' hyphenate-character ''' </summary> <Description("hyphenate-character")> hyphenate_character ''' <summary> ''' hyphenate-lines ''' </summary> <Description("hyphenate-lines")> hyphenate_lines ''' <summary> ''' hyphenate-resource ''' </summary> <Description("hyphenate-resource")> hyphenate_resource ''' <summary> ''' hyphens ''' </summary> <Description("hyphens")> hyphens ''' <summary> ''' icon ''' </summary> <Description("icon")> icon ''' <summary> ''' image-orientation ''' </summary> <Description("image-orientation")> image_orientation ''' <summary> ''' image-rendering ''' </summary> <Description("image-rendering")> image_rendering ''' <summary> ''' image-resolution ''' </summary> <Description("image-resolution")> image_resolution ''' <summary> ''' inline-box-align ''' </summary> <Description("inline-box-align")> inline_box_align ''' <summary> ''' left ''' </summary> <Description("left")> left ''' <summary> ''' letter-spacing ''' </summary> <Description("letter-spacing")> letter_spacing ''' <summary> ''' line-height ''' </summary> <Description("line-height")> line_height ''' <summary> ''' line-stacking ''' </summary> <Description("line-stacking")> line_stacking ''' <summary> ''' line-stacking-ruby ''' </summary> <Description("line-stacking-ruby")> line_stacking_ruby ''' <summary> ''' line-stacking-shift ''' </summary> <Description("line-stacking-shift")> line_stacking_shift ''' <summary> ''' line-stacking-strategy ''' </summary> <Description("line-stacking-strategy")> line_stacking_strategy ''' <summary> ''' list-style ''' </summary> <Description("list-style")> list_style ''' <summary> ''' list-style-image ''' </summary> <Description("list-style-image")> list_style_image ''' <summary> ''' list-style-position ''' </summary> <Description("list-style-position")> list_style_position ''' <summary> ''' list-style-type ''' </summary> <Description("list-style-type")> list_style_type ''' <summary> ''' margin ''' </summary> <Description("margin")> margin ''' <summary> ''' margin-bottom ''' </summary> <Description("margin-bottom")> margin_bottom ''' <summary> ''' margin-left ''' </summary> <Description("margin-left")> margin_left ''' <summary> ''' margin-right ''' </summary> <Description("margin-right")> margin_right ''' <summary> ''' margin-top ''' </summary> <Description("margin-top")> margin_top ''' <summary> ''' mark ''' </summary> <Description("mark")> mark ''' <summary> ''' mark-after ''' </summary> <Description("mark-after")> mark_after ''' <summary> ''' mark-before ''' </summary> <Description("mark-before")> mark_before ''' <summary> ''' marker-offset ''' </summary> <Description("marker-offset")> marker_offset ''' <summary> ''' marks ''' </summary> <Description("marks")> marks ''' <summary> ''' marquee-direction ''' </summary> <Description("marquee-direction")> marquee_direction ''' <summary> ''' marquee-play-count ''' </summary> <Description("marquee-play-count")> marquee_play_count ''' <summary> ''' marquee-speed ''' </summary> <Description("marquee-speed")> marquee_speed ''' <summary> ''' marquee-style ''' </summary> <Description("marquee-style")> marquee_style ''' <summary> ''' max-height ''' </summary> <Description("max-height")> max_height ''' <summary> ''' max-width ''' </summary> <Description("max-width")> max_width ''' <summary> ''' min-height ''' </summary> <Description("min-height")> min_height ''' <summary> ''' min-width ''' </summary> <Description("min-width")> min_width ''' <summary> ''' move-to ''' </summary> <Description("move-to")> move_to ''' <summary> ''' nav-down ''' </summary> <Description("nav-down")> nav_down ''' <summary> ''' nav-index ''' </summary> <Description("nav-index")> nav_index ''' <summary> ''' nav-left ''' </summary> <Description("nav-left")> nav_left ''' <summary> ''' nav-right ''' </summary> <Description("nav-right")> nav_right ''' <summary> ''' nav-up ''' </summary> <Description("nav-up")> nav_up ''' <summary> ''' opacity ''' </summary> <Description("opacity")> opacity ''' <summary> ''' orphans ''' </summary> <Description("orphans")> orphans ''' <summary> ''' outline ''' </summary> <Description("outline")> outline ''' <summary> ''' outline-color ''' </summary> <Description("outline-color")> outline_color ''' <summary> ''' outline-offset ''' </summary> <Description("outline-offset")> outline_offset ''' <summary> ''' outline-style ''' </summary> <Description("outline-style")> outline_style ''' <summary> ''' outline-width ''' </summary> <Description("outline-width")> outline_width ''' <summary> ''' overflow ''' </summary> <Description("overflow")> overflow ''' <summary> ''' overflow-style ''' </summary> <Description("overflow-style")> overflow_style ''' <summary> ''' overflow-x ''' </summary> <Description("overflow-x")> overflow_x ''' <summary> ''' overflow-y ''' </summary> <Description("overflow-y")> overflow_y ''' <summary> ''' padding ''' </summary> <Description("padding")> padding ''' <summary> ''' padding-bottom ''' </summary> <Description("padding-bottom")> padding_bottom ''' <summary> ''' padding-left ''' </summary> <Description("padding-left")> padding_left ''' <summary> ''' padding-right ''' </summary> <Description("padding-right")> padding_right ''' <summary> ''' padding-top ''' </summary> <Description("padding-top")> padding_top ''' <summary> ''' page ''' </summary> <Description("page")> page ''' <summary> ''' page-break-after ''' </summary> <Description("page-break-after")> page_break_after ''' <summary> ''' page-break-before ''' </summary> <Description("page-break-before")> page_break_before ''' <summary> ''' page-break-inside ''' </summary> <Description("page-break-inside")> page_break_inside ''' <summary> ''' page-policy ''' </summary> <Description("page-policy")> page_policy ''' <summary> ''' pause ''' </summary> <Description("pause")> pause ''' <summary> ''' pause-after ''' </summary> <Description("pause-after")> pause_after ''' <summary> ''' pause-before ''' </summary> <Description("pause-before")> pause_before ''' <summary> ''' perspective ''' </summary> <Description("perspective")> perspective ''' <summary> ''' perspective-origin ''' </summary> <Description("perspective-origin")> perspective_origin ''' <summary> ''' phonemes ''' </summary> <Description("phonemes")> phonemes ''' <summary> ''' pitch ''' </summary> <Description("pitch")> pitch ''' <summary> ''' pitch-range ''' </summary> <Description("pitch-range")> pitch_range ''' <summary> ''' play-during ''' </summary> <Description("play-during")> play_during ''' <summary> ''' position ''' </summary> <Description("position")> position ''' <summary> ''' presentation-level ''' </summary> <Description("presentation-level")> presentation_level ''' <summary> ''' punctuation-trim ''' </summary> <Description("punctuation-trim")> punctuation_trim ''' <summary> ''' quotes ''' </summary> <Description("quotes")> quotes ''' <summary> ''' rendering-intent ''' </summary> <Description("rendering-intent")> rendering_intent ''' <summary> ''' resize ''' </summary> <Description("resize")> resize ''' <summary> ''' rest ''' </summary> <Description("rest")> rest ''' <summary> ''' rest-after ''' </summary> <Description("rest-after")> rest_after ''' <summary> ''' rest-before ''' </summary> <Description("rest-before")> rest_before ''' <summary> ''' richness ''' </summary> <Description("richness")> richness ''' <summary> ''' right ''' </summary> <Description("right")> right ''' <summary> ''' rotation ''' </summary> <Description("rotation")> rotation ''' <summary> ''' rotation-point ''' </summary> <Description("rotation-point")> rotation_point ''' <summary> ''' ruby-align ''' </summary> <Description("ruby-align")> ruby_align ''' <summary> ''' ruby-overhang ''' </summary> <Description("ruby-overhang")> ruby_overhang ''' <summary> ''' ruby-position ''' </summary> <Description("ruby-position")> ruby_position ''' <summary> ''' ruby-span ''' </summary> <Description("ruby-span")> ruby_span ''' <summary> ''' size ''' </summary> <Description("size")> size ''' <summary> ''' speak ''' </summary> <Description("speak")> speak ''' <summary> ''' speak-header ''' </summary> <Description("speak-header")> speak_header ''' <summary> ''' speak-numeral ''' </summary> <Description("speak-numeral")> speak_numeral ''' <summary> ''' speak-punctuation ''' </summary> <Description("speak-punctuation")> speak_punctuation ''' <summary> ''' speech-rate ''' </summary> <Description("speech-rate")> speech_rate ''' <summary> ''' stress ''' </summary> <Description("stress")> stress ''' <summary> ''' string-set ''' </summary> <Description("string-set")> string_set ''' <summary> ''' table-layout ''' </summary> <Description("table-layout")> table_layout ''' <summary> ''' target ''' </summary> <Description("target")> target ''' <summary> ''' target-name ''' </summary> <Description("target-name")> target_name ''' <summary> ''' target-new ''' </summary> <Description("target-new")> target_new ''' <summary> ''' target-position ''' </summary> <Description("target-position")> target_position ''' <summary> ''' text-align ''' </summary> <Description("text-align")> text_align ''' <summary> ''' text-align-last ''' </summary> <Description("text-align-last")> text_align_last ''' <summary> ''' text-decoration ''' </summary> <Description("text-decoration")> text_decoration ''' <summary> ''' text-emphasis ''' </summary> <Description("text-emphasis")> text_emphasis ''' <summary> ''' text-height ''' </summary> <Description("text-height")> text_height ''' <summary> ''' text-indent ''' </summary> <Description("text-indent")> text_indent ''' <summary> ''' text-justify ''' </summary> <Description("text-justify")> text_justify ''' <summary> ''' text-outline ''' </summary> <Description("text-outline")> text_outline ''' <summary> ''' text-overflow ''' </summary> <Description("text-overflow")> text_overflow ''' <summary> ''' text-shadow ''' </summary> <Description("text-shadow")> text_shadow ''' <summary> ''' text-transform ''' </summary> <Description("text-transform")> text_transform ''' <summary> ''' text-wrap ''' </summary> <Description("text-wrap")> text_wrap ''' <summary> ''' top ''' </summary> <Description("top")> top ''' <summary> ''' transform ''' </summary> <Description("transform")> transform ''' <summary> ''' transform-origin ''' </summary> <Description("transform-origin")> transform_origin ''' <summary> ''' transform-style ''' </summary> <Description("transform-style")> transform_style ''' <summary> ''' transition ''' </summary> <Description("transition")> transition ''' <summary> ''' transition-delay ''' </summary> <Description("transition-delay")> transition_delay ''' <summary> ''' transition-duration ''' </summary> <Description("transition-duration")> transition_duration ''' <summary> ''' transition-property ''' </summary> <Description("transition-property")> transition_property ''' <summary> ''' transition-timing-function ''' </summary> <Description("transition-timing-function")> transition_timing_function ''' <summary> ''' unicode-bidi ''' </summary> <Description("unicode-bidi")> unicode_bidi ''' <summary> ''' vertical-align ''' </summary> <Description("vertical-align")> vertical_align ''' <summary> ''' visibility ''' </summary> <Description("visibility")> visibility ''' <summary> ''' voice-balance ''' </summary> <Description("voice-balance")> voice_balance ''' <summary> ''' voice-duration ''' </summary> <Description("voice-duration")> voice_duration ''' <summary> ''' voice-family ''' </summary> <Description("voice-family")> voice_family ''' <summary> ''' voice-pitch ''' </summary> <Description("voice-pitch")> voice_pitch ''' <summary> ''' voice-pitch-range ''' </summary> <Description("voice-pitch-range")> voice_pitch_range ''' <summary> ''' voice-rate ''' </summary> <Description("voice-rate")> voice_rate ''' <summary> ''' voice-stress ''' </summary> <Description("voice-stress")> voice_stress ''' <summary> ''' voice-volume ''' </summary> <Description("voice-volume")> voice_volume ''' <summary> ''' volume ''' </summary> <Description("volume")> volume ''' <summary> ''' white-space ''' </summary> <Description("white-space")> white_space ''' <summary> ''' white-space-collapse ''' </summary> <Description("white-space-collapse")> white_space_collapse ''' <summary> ''' widows ''' </summary> <Description("widows")> widows ''' <summary> ''' width ''' </summary> <Description("width")> width ''' <summary> ''' word-break ''' </summary> <Description("word-break")> word_break ''' <summary> ''' word-spacing ''' </summary> <Description("word-spacing")> word_spacing ''' <summary> ''' word-wrap ''' </summary> <Description("word-wrap")> word_wrap ''' <summary> ''' fixed ''' </summary> <Description("fixed")> fixed ''' <summary> ''' linear-gradient ''' </summary> <Description("linear-gradient")> linear_gradient ''' <summary> ''' color-dodge ''' </summary> <Description("color-dodge")> color_dodge ''' <summary> ''' center ''' </summary> <Description("center")> center ''' <summary> ''' content-box ''' </summary> <Description("content-box")> content_box ''' <summary> ''' -webkit-flex ''' </summary> <Description("-webkit-flex")> _webkit_flex ''' <summary> ''' flex ''' </summary> <Description("flex")> flex ''' <summary> ''' row-reverse ''' </summary> <Description("row-reverse")> row_reverse ''' <summary> ''' space-around ''' </summary> <Description("space-around")> space_around ''' <summary> ''' first ''' </summary> <Description("first")> first ''' <summary> ''' justify ''' </summary> <Description("justify")> justify ''' <summary> ''' inter-word ''' </summary> <Description("inter-word")> inter_word ''' <summary> ''' uppercase ''' </summary> <Description("uppercase")> uppercase ''' <summary> ''' lowercase ''' </summary> <Description("lowercase")> lowercase ''' <summary> ''' capitalize ''' </summary> <Description("capitalize")> capitalize ''' <summary> ''' nowrap ''' </summary> <Description("nowrap")> nowrap ''' <summary> ''' break-all ''' </summary> <Description("break-all")> break_all ''' <summary> ''' break-word ''' </summary> <Description("break-word")> break_word ''' <summary> ''' overline ''' </summary> <Description("overline")> overline ''' <summary> ''' line-through ''' </summary> <Description("line-through")> line_through ''' <summary> ''' wavy ''' </summary> <Description("wavy")> wavy ''' <summary> ''' myFirstFont ''' </summary> <Description("myFirstFont")> myFirstFont ''' <summary> ''' sensation ''' </summary> <Description("sensation")> sensation End Enum
genetics-potato/sciBASIC
mime/text%html/HTML/CSS/Parser/enums.vb
Visual Basic
gpl-3.0
33,649
// Copyright CERN and copyright holders of ALICE O2. This software is // distributed under the terms of the GNU General Public License v3 (GPL // Version 3), copied verbatim in the file "COPYING". // // See http://alice-o2.web.cern.ch/license for full licensing information. // // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. #ifndef FRAMEWORK_CALLBACKREGISTRY_H #define FRAMEWORK_CALLBACKREGISTRY_H /// @file CallbackRegistry.h /// @author Matthias Richter /// @since 2018-04-26 /// @brief A generic registry for callbacks #include "Framework/TypeTraits.h" #include <tuple> #include <stdexcept> // runtime_error #include <utility> // declval namespace o2 { namespace framework { template <typename KeyT, KeyT _id, typename CallbackT> struct RegistryPair { using id = std::integral_constant<KeyT, _id>; using type = CallbackT; type callback; }; template <typename CallbackId, typename... Args> class CallbackRegistry { public: // FIXME: // - add more checks // - recursive check of the argument pack // - required to be of type RegistryPair // - callback type is specialization of std::function // - extend to variable return type static constexpr std::size_t size = sizeof...(Args); // set callback for slot template <typename U> void set(CallbackId id, U&& cb) { set<size>(id, cb); } // execute callback at specified slot with argument pack template <typename... TArgs> auto operator()(CallbackId id, TArgs&&... args) { exec<size>(id, std::forward<TArgs>(args)...); } private: // helper trait to check whether class has a constructor taking callback as argument template <class T, typename CB> struct has_matching_callback { template <class U, typename V> static int check(decltype(U(std::declval<V>()))*); template <typename U, typename V> static char check(...); static const bool value = sizeof(check<T, CB>(nullptr)) == sizeof(int); }; // set the callback function of the specified id // this iterates over defined slots and sets the matching callback template <std::size_t pos, typename U> typename std::enable_if<pos != 0>::type set(CallbackId id, U&& cb) { if (std::tuple_element<pos - 1, decltype(mStore)>::type::id::value != id) { return set<pos - 1>(id, cb); } // note: there are two substitutions, the one for callback matching the slot type sets the // callback, while the other substitution should never be called setAt<pos - 1, typename std::tuple_element<pos - 1, decltype(mStore)>::type::type>(cb); } // termination of the recursive loop template <std::size_t pos, typename U> typename std::enable_if<pos == 0>::type set(CallbackId id, U&& cb) { } // set the callback at specified slot position template <std::size_t pos, typename U, typename F> typename std::enable_if<has_matching_callback<U, F>::value == true>::type setAt(F&& cb) { // create a new std::function object and init with the callback function std::get<pos>(mStore).callback = (U)(cb); } // substitution for not matching callback template <std::size_t pos, typename U, typename F> typename std::enable_if<has_matching_callback<U, F>::value == false>::type setAt(F&& cb) { throw std::runtime_error("mismatch in function substitution at position " + std::to_string(pos)); } // exec callback of specified id template <std::size_t pos, typename... TArgs> typename std::enable_if<pos != 0>::type exec(CallbackId id, TArgs&&... args) { if (std::tuple_element<pos - 1, decltype(mStore)>::type::id::value != id) { return exec<pos - 1>(id, std::forward<TArgs>(args)...); } // build a callable function type from the result type of the slot and the // argument pack, this is used to selcet the matching substitution using FunT = typename std::tuple_element<pos - 1, decltype(mStore)>::type::type; using ResT = typename FunT::result_type; using CheckT = std::function<ResT(TArgs...)>; FunT& fct = std::get<pos - 1>(mStore).callback; auto& storedTypeId = fct.target_type(); execAt<pos - 1, FunT, CheckT>(std::forward<TArgs>(args)...); } // termination of the recursive loop template <std::size_t pos, typename... TArgs> typename std::enable_if<pos == 0>::type exec(CallbackId id, TArgs&&... args) { } // exec callback at specified slot template <std::size_t pos, typename U, typename V, typename... TArgs> typename std::enable_if<std::is_same<U, V>::value == true>::type execAt(TArgs&&... args) { if (std::get<pos>(mStore).callback) { std::get<pos>(mStore).callback(std::forward<TArgs>(args)...); } } // substitution for not matching argument pack template <std::size_t pos, typename U, typename V, typename... TArgs> typename std::enable_if<std::is_same<U, V>::value == false>::type execAt(TArgs&&... args) { } // store of RegistryPairs std::tuple<Args...> mStore; }; } // namespace framework } // namespace o2 #endif // FRAMEWORK_CALLBACKREGISTRY_H
AllaMaevskaya/AliceO2
Framework/Core/include/Framework/CallbackRegistry.h
C
gpl-3.0
5,160
<b>Users Currently Logged In</b> <ul> <?php if (!empty($currentUsers)):foreach($currentUsers as $u):?> <li> <?php echo $u->getFullName();?> </li> <?php endforeach;endif;?> </ul>
2pisoftware/cmfive
system/modules/admin/templates/index.tpl.php
PHP
gpl-3.0
214
<?php /******* Biblioteka implementująca BotAPI GG http://boty.gg.pl/ Copyright (C) 2013 GG Network S.A. Marcin Bagiński <marcin.baginski@firma.gg.pl> 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 program. If not, see<http://www.gnu.org/licenses/>. *******/ require_once(dirname(__FILE__).'/PushConnection.php'); define ('FORMAT_NONE', 0x00); define ('FORMAT_BOLD_TEXT', 0x01); define ('FORMAT_ITALIC_TEXT', 0x02); define ('FORMAT_UNDERLINE_TEXT', 0x04); define ('FORMAT_NEW_LINE', 0x08); define ('IMG_FILE', true); define ('IMG_RAW', false); define('BOTAPI_VERSION', 'GGBotApi-2.4-PHP'); require_once(dirname(__FILE__).'/PushConnection.php'); /** * @brief Reprezentacja wiadomości */ class MessageBuilder { /** * Tablica numerów GG do których ma trafić wiadomość */ public $recipientNumbers=array(); /** * Określa czy wiadomość zostanie wysłana do numerów będących offline, domyślnie true */ public $sendToOffline=true; public $html=''; public $text=''; public $format=''; public $R=0; public $G=0; public $B=0; /** * Konstruktor MessageBuilder */ public function __construct() { } /** * Czyści całą wiadomość */ public function clear() { $this->recipientNumbers=array(); $this->sendToOffline=true; $this->html=''; $this->text=''; $this->format=''; $this->R=0; $this->G=0; $this->B=0; } /** * Dodaje tekst do wiadomości * * @param string $text tekst do wysłania * @param int $formatBits styl wiadomości (FORMAT_BOLD_TEXT, FORMAT_ITALIC_TEXT, FORMAT_UNDERLINE_TEXT), domyślnie brak * @param int $R, $G, $B składowe koloru tekstu w formacie RGB * * @return MessageBuilder this */ public function addText($text, $formatBits=FORMAT_NONE, $R=0, $G=0, $B=0) { if ($formatBits & FORMAT_NEW_LINE) $text.="\r\n"; $text=str_replace("\r\r", "\r", str_replace("\n", "\r\n", $text)); $html=str_replace("\r\n", '<br>', htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8')); if ($this->format!==NULL) { $this->format.=pack( 'vC', mb_strlen($this->text, 'UTF-8'), (($formatBits & FORMAT_BOLD_TEXT)) | (($formatBits & FORMAT_ITALIC_TEXT)) | (($formatBits & FORMAT_UNDERLINE_TEXT)) | ((1 || $R!=$this->R || $G!=$this->G || $B!=$this->B) * 0x08) ); $this->format.=pack('CCC', $R, $G, $B); $this->R=$R; $this->G=$G; $this->B=$B; $this->text.=$text; } if ($R || $G || $B) $html='<span style="color:#'.str_pad(dechex($R), 2, '0', STR_PAD_LEFT).str_pad(dechex($G), 2, '0', STR_PAD_LEFT).str_pad(dechex($B), 2, '0', STR_PAD_LEFT).';">'.$html.'</span>'; if ($formatBits & FORMAT_BOLD_TEXT) $html='<b>'.$html.'</b>'; if ($formatBits & FORMAT_ITALIC_TEXT) $html='<i>'.$html.'</i>'; if ($formatBits & FORMAT_UNDERLINE_TEXT) $html='<u>'.$html.'</u>'; $this->html.=$html; return $this; } /** * Dodaje tekst do wiadomości * * @param string $text tekst do wysłania w formacie BBCode * * @return MessageBuilder this */ public function addBBcode($bbcode) { $tagsLength=0; $heap=array(); $start=0; $bbcode=str_replace('[br]', "\n", $bbcode); while (preg_match('/\[(\/)?(b|i|u|color)(=#?[0-9a-fA-F]{6})?\]/', $bbcode, $out, PREG_OFFSET_CAPTURE, $start)) { $s=substr($bbcode, $start, $out[0][1]-$start); $c=array(0, 0, 0); if (strlen($s)) { $flags=0; $c=array(0, 0, 0); foreach ($heap as $h) { switch ($h[0]) { case 'b': { $flags|=0x01; break; } case 'i': { $flags|=0x02; break; } case 'u': { $flags|=0x04; break; } case 'color': { $c=$h[1]; break; } } } $this->addText($s, $flags, $c[0], $c[1], $c[2]); } $start=$out[0][1]+strlen($out[0][0]); if ($out[1][0]=='') { switch ($out[2][0]) { case 'b': case 'i': case 'u': { array_push($heap, array($out[2][0])); break; } case 'color': { $c=hexdec(substr($out[3][0], -6, 6)); $c=array( ($c >> 16) & 0xFF, ($c >> 8) & 0xFF, ($c >> 0) & 0xFF ); array_push($heap, array('color', $c)); break; } } $tagsLength+=strlen($out[0][0]); } else { array_pop($heap); $tagsLength+=strlen($out[0][0]); } } $s=substr($bbcode, $start); if (strlen($s)) $this->addText($s); return $this; } /** * Dodaje tekst do wiadomości * * @param string $text tekst do wysłania w HTMLu * * @return MessageBuilder this */ public function addRawHtml($html) { $this->html.=$html; return $this; } /** * Ustawia tekst do wiadomości * * @param string $html tekst do wysłania w HTMLu * * @return MessageBuilder this */ public function setRawHtml($html) { $this->html=$html; return $this; } /** * Ustawia tekst wiadomości alternatywnej * * @param string $text tekst do wysłania dla GG7.7 i starszych * * @return MessageBuilder this */ public function setAlternativeText($message) { $this->format=NULL; $this->text=$message; return $this; } /** * Dodaje obraz do wiadomości * * @param string $fileName nazwa pliku w formacie JPEG * * @return MessageBuilder this */ public function addImage($fileName, $isFile=IMG_FILE) { if ($isFile==IMG_FILE) $fileName=file_get_contents($fileName); $crc=crc32($fileName); $hash=sprintf('%08x%08x', $crc, strlen($fileName)); if (empty(PushConnection::$lastAuthorization)) throw new Exception('Użyj klasy PushConnection'); $P=new PushConnection(); if (!$P->existsImage($hash)) if (!$P->putImage($fileName)) throw new Exception('Nie udało się wysłać obrazka'); $this->format.=pack('vCCCVV', strlen($this->text), 0x80, 0x09, 0x01, strlen($fileName), $crc); $this->addRawHtml('<img name="'.$hash.'">'); return $this; } /** * Ustawia odbiorców wiadomości * * @param int|string|array recipientNumbers numer GG adresata (lub tablica) * * @return MessageBuilder this */ public function setRecipients($recipientNumbers) { $this->recipientNumbers=(array) $recipientNumbers; return $this; } /** * Zawsze dostarcza wiadomość * * @return MessageBuilder this */ public function setSendToOffline($sendToOffline) { $this->sendToOffline=$sendToOffline; return $this; } /** * Tworzy sformatowaną wiadomość do wysłania do BotMastera */ public function getProtocolMessage() { if (preg_match('/^<span[^>]*>.+<\/span>$/s', $this->html, $o)) { if ($o[0]!=$this->html) $this->html='<span style="color:#000000; font-family:\'MS Shell Dlg 2\'; font-size:9pt; ">'.$this->html.'</span>'; } else $this->html='<span style="color:#000000; font-family:\'MS Shell Dlg 2\'; font-size:9pt; ">'.$this->html.'</span>'; $s=pack('VVVV', strlen($this->html)+1, strlen($this->text)+1, 0, ((empty($this->format)) ? 0 : strlen($this->format)+3)).$this->html."\0".$this->text."\0".((empty($this->format)) ? '' : pack('Cv', 0x02, strlen($this->format)).$this->format); return $s; } /** * Zwraca na wyjście sformatowaną wiadomość do wysłania do BotMastera */ public function reply() { if (sizeof($this->recipientNumbers)) header('To: '.join(',', $this->recipientNumbers)); if (!$this->sendToOffline) header('Send-to-offline: 0'); header('BotApi-Version: '.BOTAPI_VERSION); echo $this->getProtocolMessage(); } }
michibo112/czacik.pl
MessageBuilder.php
PHP
gpl-3.0
7,896
<?php /* Gibbon, Flexible & Open School System Copyright (C) 2010, Ross Parker This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @session_start() ; $proceed=FALSE ; $public=FALSE ; if (isset($_SESSION[$guid]["username"])==FALSE) { $public=TRUE ; //Get public access $publicApplications=getSettingByScope($connection2, 'Application Form', 'publicApplications') ; if ($publicApplications=="Y") { $proceed=TRUE ; } } else { if (isActionAccessible($guid, $connection2, "/modules/Application Form/applicationForm.php")!=FALSE) { $proceed=TRUE ; } } //Set gibbonPersonID of the person completing the application $gibbonPersonID=NULL ; if (isset($_SESSION[$guid]["gibbonPersonID"])) { $gibbonPersonID=$_SESSION[$guid]["gibbonPersonID"] ; } if ($proceed==FALSE) { //Acess denied print "<div class='error'>" ; print _("You do not have access to this action.") ; print "</div>" ; } else { //Proceed! print "<div class='trail'>" ; if (isset($_SESSION[$guid]["username"])) { print "<div class='trailHead'><a href='" . $_SESSION[$guid]["absoluteURL"] . "'>" . _("Home") . "</a> > <a href='" . $_SESSION[$guid]["absoluteURL"] . "/index.php?q=/modules/" . getModuleName($_GET["q"]) . "/" . getModuleEntry($_GET["q"], $connection2, $guid) . "'>" . _(getModuleName($_GET["q"])) . "</a> > </div><div class='trailEnd'>" . $_SESSION[$guid]["organisationNameShort"] . " " . _('Application Form') . "</div>" ; } else { print "<div class='trailHead'><a href='" . $_SESSION[$guid]["absoluteURL"] . "'>" . _("Home") . "</a> > </div><div class='trailEnd'>" . $_SESSION[$guid]["organisationNameShort"] . " " . _('Application Form') . "</div>" ; } print "</div>" ; //Get intro $intro=getSettingByScope($connection2, 'Application Form', 'introduction') ; if ($intro!="") { print "<p>" ; print $intro ; print "</p>" ; } if (isset($_SESSION[$guid]["username"])==false) { if ($intro!="") { print "<br/><br/>" ; } print "<p style='font-weight: bold; text-decoration: none; color: #c00'><i><u>" . sprintf(_('If you have an %1$s %2$s account, please log in now to prevent creation of duplicate data about you! Once logged in, you can find the form under People > Data in the main menu.'), $_SESSION[$guid]["organisationNameShort"], $_SESSION[$guid]["systemName"]) . "</u></i> " . sprintf(_('If you do not have an %1$s %2$s account, please use the form below.'), $_SESSION[$guid]["organisationNameShort"], $_SESSION[$guid]["systemName"]) . "</p>" ; } if (isset($_GET["addReturn"])) { $addReturn=$_GET["addReturn"] ; } else { $addReturn="" ; } $addReturnMessage="" ; $class="error" ; if (!($addReturn=="")) { if ($addReturn=="fail0") { $addReturnMessage=_("Your request failed because you do not have access to this action.") ; } else if ($addReturn=="fail2") { $addReturnMessage=_("Your request failed due to a database error.") ; } else if ($addReturn=="fail3") { $addReturnMessage=_("Your request failed because your inputs were invalid.") ; } else if ($addReturn=="fail4") { $addReturnMessage=_("Your request failed because your inputs were invalid.") ; } else if ($addReturn=="success0" OR $addReturn=="success1" OR $addReturn=="success2" OR $addReturn=="success4") { if ($addReturn=="success0") { $addReturnMessage=_("Your application was successfully submitted. Our admissions team will review your application and be in touch in due course.") ; } else if ($addReturn=="success1") { $addReturnMessage=_("Your application was successfully submitted and payment has been made to your credit card. Our admissions team will review your application and be in touch in due course.") ; } else if ($addReturn=="success2") { $addReturnMessage=_("Your application was successfully submitted, but payment could not be made to your credit card. Our admissions team will review your application and be in touch in due course.") ; } else if ($addReturn=="success3") { $addReturnMessage=_("Your application was successfully submitted, payment has been made to your credit card, but there has been an error recording your payment. Please print this screen and contact the school ASAP. Our admissions team will review your application and be in touch in due course.") ; } else if ($addReturn=="success4") { $addReturnMessage=_("Your application was successfully submitted, but payment could not be made as the payment gateway does not support the system's currency. Our admissions team will review your application and be in touch in due course.") ; } if (isset($_GET["id"])) { if ($_GET["id"]!="") { $addReturnMessage=$addReturnMessage . "<br/><br/>" . _('If you need to contact the school in reference to this application, please quote the following number:') . " <b><u>" . $_GET["id"] . "</b></u>." ; } } if ($_SESSION[$guid]["organisationAdmissionsName"]!="" AND $_SESSION[$guid]["organisationAdmissionsEmail"]!="") { $addReturnMessage=$addReturnMessage . "<br/><br/>Please contact <a href='mailto:" . $_SESSION[$guid]["organisationAdmissionsEmail"] . "'>" . $_SESSION[$guid]["organisationAdmissionsName"] . "</a> if you have any questions, comments or complaints." ; } $class="success" ; } print "<div class='$class'>" ; print $addReturnMessage; print "</div>" ; } $currency=getSettingByScope($connection2, "System", "currency") ; $applicationFee=getSettingByScope($connection2, "Application Form", "applicationFee") ; $enablePayments=getSettingByScope($connection2, "System", "enablePayments") ; $paypalAPIUsername=getSettingByScope($connection2, "System", "paypalAPIUsername") ; $paypalAPIPassword=getSettingByScope($connection2, "System", "paypalAPIPassword") ; $paypalAPISignature=getSettingByScope($connection2, "System", "paypalAPISignature") ; if ($applicationFee>0 AND is_numeric($applicationFee)) { print "<div class='warning'>" ; print _("Please note that there is an application fee of:") . " <b><u>" . $currency . $applicationFee . "</u></b>." ; if ($enablePayments=="Y" AND $paypalAPIUsername!="" AND $paypalAPIPassword!="" AND $paypalAPISignature!="") { print " " . _('Payment must be made by credit card, using our secure PayPal payment gateway. When you press Submit at the end of this form, you will be directed to PayPal in order to make payment. During this process we do not see or store your credit card details.') ; } print "</div>" ; } ?> <form method="post" action="<?php print $_SESSION[$guid]["absoluteURL"] . "/modules/" . $_SESSION[$guid]["module"] . "/applicationFormProcess.php" ?>" enctype="multipart/form-data"> <table class='smallIntBorder' cellspacing='0' style="width: 100%"> <tr class='break'> <td colspan=2> <h3><?php print _('Student') ?></h3> </td> </tr> <tr> <td colspan=2> <h4><?php print _('Student Personal Data') ?></h4> </td> </tr> <tr> <td style='width: 275px'> <b><?php print _('Surname') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Family name as shown in ID documents.') ?></i></span> </td> <td class="right"> <input name="surname" id="surname" maxlength=30 value="" type="text" style="width: 300px"> <script type="text/javascript"> var surname=new LiveValidation('surname'); surname.add(Validate.Presence); </script> </td> </tr> <tr> <td> <b><?php print _('First Name') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('First name as shown in ID documents.') ?></i></span> </td> <td class="right"> <input name="firstName" id="firstName" maxlength=30 value="" type="text" style="width: 300px"> <script type="text/javascript"> var firstName=new LiveValidation('firstName'); firstName.add(Validate.Presence); </script> </td> </tr> <tr> <td> <b><?php print _('Preferred Name') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Most common name, alias, nickname, etc.') ?></i></span> </td> <td class="right"> <input name="preferredName" id="preferredName" maxlength=30 value="" type="text" style="width: 300px"> <script type="text/javascript"> var preferredName=new LiveValidation('preferredName'); preferredName.add(Validate.Presence); </script> </td> </tr> <tr> <td> <b><?php print _('Official Name') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Full name as shown in ID documents.') ?></i></span> </td> <td class="right"> <input title='Please enter full name as shown in ID documents' name="officialName" id="officialName" maxlength=150 value="" type="text" style="width: 300px"> <script type="text/javascript"> var officialName=new LiveValidation('officialName'); officialName.add(Validate.Presence); </script> </td> </tr> <tr> <td> <b><?php print _('Name In Characters') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Chinese or other character-based name.') ?></i></span> </td> <td class="right"> <input name="nameInCharacters" id="nameInCharacters" maxlength=20 value="" type="text" style="width: 300px"> </td> </tr> <tr> <td> <b><?php print _('Gender') ?> *</b><br/> </td> <td class="right"> <select name="gender" id="gender" style="width: 302px"> <option value="Please select..."><?php print _('Please select...') ?></option> <option value="F"><?php print _('Female') ?></option> <option value="M"><?php print _('Male') ?></option> </select> <script type="text/javascript"> var gender=new LiveValidation('gender'); gender.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> </td> </tr> <tr> <td> <b><?php print _('Date of Birth') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Format:') . " " . $_SESSION[$guid]["i18n"]["dateFormat"] ?></i></span> </td> <td class="right"> <input name="dob" id="dob" maxlength=10 value="" type="text" style="width: 300px"> <script type="text/javascript"> var dob=new LiveValidation('dob'); dob.add( Validate.Format, {pattern: <?php if ($_SESSION[$guid]["i18n"]["dateFormatRegEx"]=="") { print "/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$/i" ; } else { print $_SESSION[$guid]["i18n"]["dateFormatRegEx"] ; } ?>, failureMessage: "Use <?php if ($_SESSION[$guid]["i18n"]["dateFormat"]=="") { print "dd/mm/yyyy" ; } else { print $_SESSION[$guid]["i18n"]["dateFormat"] ; }?>." } ); dob.add(Validate.Presence); </script> <script type="text/javascript"> $(function() { $( "#dob" ).datepicker(); }); </script> </td> </tr> <tr> <td colspan=2> <h4><?php print _('Student Background') ?></h4> </td> </tr> <tr> <td> <b><?php print _('Home Language') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('The primary language used in the student\'s home.') ?></i></span> </td> <td class="right"> <input name="languageHome" id="languageHome" maxlength=30 value="" type="text" style="width: 300px"> </td> <script type="text/javascript"> $(function() { var availableTags=[ <?php try { $dataAuto=array(); $sqlAuto="SELECT DISTINCT languageHome FROM gibbonApplicationForm ORDER BY languageHome" ; $resultAuto=$connection2->prepare($sqlAuto); $resultAuto->execute($dataAuto); } catch(PDOException $e) { } while ($rowAuto=$resultAuto->fetch()) { print "\"" . $rowAuto["languageHome"] . "\", " ; } ?> ]; $( "#languageHome" ).autocomplete({source: availableTags}); }); </script> <script type="text/javascript"> var languageHome=new LiveValidation('languageHome'); languageHome.add(Validate.Presence); </script> </tr> <tr> <td> <b><?php print _('First Language') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Student\'s native/first/mother language.') ?></i></span> </td> <td class="right"> <input name="languageFirst" id="languageFirst" maxlength=30 value="" type="text" style="width: 300px"> </td> <script type="text/javascript"> $(function() { var availableTags=[ <?php try { $dataAuto=array(); $sqlAuto="SELECT DISTINCT languageFirst FROM gibbonApplicationForm ORDER BY languageFirst" ; $resultAuto=$connection2->prepare($sqlAuto); $resultAuto->execute($dataAuto); } catch(PDOException $e) { } while ($rowAuto=$resultAuto->fetch()) { print "\"" . $rowAuto["languageFirst"] . "\", " ; } ?> ]; $( "#languageFirst" ).autocomplete({source: availableTags}); }); </script> <script type="text/javascript"> var languageFirst=new LiveValidation('languageFirst'); languageFirst.add(Validate.Presence); </script> </tr> <tr> <td> <b><?php print _('Second Language') ?></b><br/> </td> <td class="right"> <input name="languageSecond" id="languageSecond" maxlength=30 value="" type="text" style="width: 300px"> </td> <script type="text/javascript"> $(function() { var availableTags=[ <?php try { $dataAuto=array(); $sqlAuto="SELECT DISTINCT languageSecond FROM gibbonApplicationForm ORDER BY languageSecond" ; $resultAuto=$connection2->prepare($sqlAuto); $resultAuto->execute($dataAuto); } catch(PDOException $e) { } while ($rowAuto=$resultAuto->fetch()) { print "\"" . $rowAuto["languageSecond"] . "\", " ; } ?> ]; $( "#languageSecond" ).autocomplete({source: availableTags}); }); </script> </tr> <tr> <td> <b><?php print _('Third Language') ?></b><br/> </td> <td class="right"> <input name="languageThird" id="languageThird" maxlength=30 value="" type="text" style="width: 300px"> </td> <script type="text/javascript"> $(function() { var availableTags=[ <?php try { $dataAuto=array(); $sqlAuto="SELECT DISTINCT languageThird FROM gibbonApplicationForm ORDER BY languageThird" ; $resultAuto=$connection2->prepare($sqlAuto); $resultAuto->execute($dataAuto); } catch(PDOException $e) { } while ($rowAuto=$resultAuto->fetch()) { print "\"" . $rowAuto["languageThird"] . "\", " ; } ?> ]; $( "#languageThird" ).autocomplete({source: availableTags}); }); </script> </tr> <tr> <td> <b><?php print _('Country of Birth') ?></b><br/> </td> <td class="right"> <select name="countryOfBirth" id="countryOfBirth" style="width: 302px"> <?php try { $dataSelect=array(); $sqlSelect="SELECT printable_name FROM gibbonCountry ORDER BY printable_name" ; $resultSelect=$connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch(PDOException $e) { } print "<option value=''></option>" ; while ($rowSelect=$resultSelect->fetch()) { print "<option value='" . $rowSelect["printable_name"] . "'>" . htmlPrep(_($rowSelect["printable_name"])) . "</option>" ; } ?> </select> </td> </tr> <tr> <td> <b><?php print _('Citizenship') ?></b><br/> </td> <td class="right"> <select name="citizenship1" id="citizenship1" style="width: 302px"> <?php print "<option value=''></option>" ; $nationalityList=getSettingByScope($connection2, "User Admin", "nationality") ; if ($nationalityList=="") { try { $dataSelect=array(); $sqlSelect="SELECT printable_name FROM gibbonCountry ORDER BY printable_name" ; $resultSelect=$connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch(PDOException $e) { } while ($rowSelect=$resultSelect->fetch()) { print "<option value='" . $rowSelect["printable_name"] . "'>" . htmlPrep(_($rowSelect["printable_name"])) . "</option>" ; } } else { $nationalities=explode(",", $nationalityList) ; foreach ($nationalities as $nationality) { print "<option value='" . trim($nationality) . "'>" . trim($nationality) . "</option>" ; } } ?> </select> </td> </tr> <tr> <td> <b><?php print _('Citizenship Passport Number') ?></b><br/> </td> <td class="right"> <input name="citizenship1Passport" id="citizenship1Passport" maxlength=30 value="" type="text" style="width: 300px"> </td> </tr> <tr> <td> <?php if ($_SESSION[$guid]["country"]=="") { print "<b>" . _('National ID Card Number') . "</b><br/>" ; } else { print "<b>" . $_SESSION[$guid]["country"] . " " . _('ID Card Number') . "</b><br/>" ; } ?> </td> <td class="right"> <input name="nationalIDCardNumber" id="nationalIDCardNumber" maxlength=30 value="" type="text" style="width: 300px"> </td> </tr> <tr> <td> <?php if ($_SESSION[$guid]["country"]=="") { print "<b>" . _('Residency/Visa Type') . "</b><br/>" ; } else { print "<b>" . $_SESSION[$guid]["country"] . " " . _('Residency/Visa Type') . "</b><br/>" ; } ?> </td> <td class="right"> <?php $residencyStatusList=getSettingByScope($connection2, "User Admin", "residencyStatus") ; if ($residencyStatusList=="") { print "<input name='residencyStatus' id='residencyStatus' maxlength=30 value='' type='text' style='width: 300px'>" ; } else { print "<select name='residencyStatus' id='residencyStatus' style='width: 302px'>" ; print "<option value=''></option>" ; $residencyStatuses=explode(",", $residencyStatusList) ; foreach ($residencyStatuses as $residencyStatus) { $selected="" ; if (trim($residencyStatus)==$row["residencyStatus"]) { $selected="selected" ; } print "<option $selected value='" . trim($residencyStatus) . "'>" . trim($residencyStatus) . "</option>" ; } print "</select>" ; } ?> </td> </tr> <tr> <td> <?php if ($_SESSION[$guid]["country"]=="") { print "<b>" . _('Visa Expiry Date') . "</b><br/>" ; } else { print "<b>" . $_SESSION[$guid]["country"] . " " . _('Visa Expiry Date') . "</b><br/>" ; } print "<span style='font-size: 90%'><i>Format: " ; if ($_SESSION[$guid]["i18n"]["dateFormat"]=="") { print "dd/mm/yyyy" ; } else { print $_SESSION[$guid]["i18n"]["dateFormat"] ; } print ". " . _('If relevant.') . "</i></span>" ; ?> </td> <td class="right"> <input name="visaExpiryDate" id="visaExpiryDate" maxlength=10 value="" type="text" style="width: 300px"> <script type="text/javascript"> var visaExpiryDate=new LiveValidation('visaExpiryDate'); visaExpiryDate.add( Validate.Format, {pattern: <?php if ($_SESSION[$guid]["i18n"]["dateFormatRegEx"]=="") { print "/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$/i" ; } else { print $_SESSION[$guid]["i18n"]["dateFormatRegEx"] ; } ?>, failureMessage: "Use <?php if ($_SESSION[$guid]["i18n"]["dateFormat"]=="") { print "dd/mm/yyyy" ; } else { print $_SESSION[$guid]["i18n"]["dateFormat"] ; }?>." } ); </script> <script type="text/javascript"> $(function() { $( "#visaExpiryDate" ).datepicker(); }); </script> </td> </tr> <tr> <td colspan=2> <h4><?php print _('Student Contact') ?></h4> </td> </tr> <tr> <td> <b><?php print _('Email') ?></b><br/> </td> <td class="right"> <input name="email" id="email" maxlength=50 value="" type="text" style="width: 300px"> <script type="text/javascript"> var email=new LiveValidation('email'); email.add(Validate.Email); </script> </td> </tr> <?php for ($i=1; $i<3; $i++) { ?> <tr> <td> <b><?php print _('Phone') ?> <?php print $i ?></b><br/> <span style="font-size: 90%"><i><?php print _('Type, country code, number.') ?></i></span> </td> <td class="right"> <input name="phone<?php print $i ?>" id="phone<?php print $i ?>" maxlength=20 value="" type="text" style="width: 160px"> <select name="phone<?php print $i ?>CountryCode" id="phone<?php print $i ?>CountryCode" style="width: 60px"> <?php print "<option value=''></option>" ; try { $dataSelect=array(); $sqlSelect="SELECT * FROM gibbonCountry ORDER BY printable_name" ; $resultSelect=$connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch(PDOException $e) { } while ($rowSelect=$resultSelect->fetch()) { print "<option value='" . $rowSelect["iddCountryCode"] . "'>" . htmlPrep($rowSelect["iddCountryCode"]) . " - " . htmlPrep(_($rowSelect["printable_name"])) . "</option>" ; } ?> </select> <select style="width: 70px" name="phone<?php print $i ?>Type"> <option value=""></option> <option value="Mobile"><?php print _('Mobile') ?></option> <option value="Home"><?php print _('Home') ?></option> <option value="Work"><?php print _('Work') ?></option> <option value="Fax"><?php print _('Fax') ?></option> <option value="Pager"><?php print _('Pager') ?></option> <option value="Other"><?php print _('Other') ?></option> </select> </td> </tr> <?php } ?> <tr> <td colspan=2> <h4><?php print _('Student Medical & Development') ?></h4> </td> </tr> <tr> <td colspan=2 style='padding-top: 15px'> <b><?php print _('Medical Information') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Please indicate any medical conditions.') ?></i></span><br/> <textarea name="medicalInformation" id="medicalInformation" rows=5 style="width:738px; margin: 5px 0px 0px 0px"></textarea> </td> </tr> <tr> <td colspan=2 style='padding-top: 15px'> <b><?php print _('Development Information') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Provide any comments or information concerning your child\'s development that may be relevant to your child\’s performance in the classroom or elsewhere? (Incorrect or withheld information may affect continued enrolment).') ?></i></span><br/> <textarea name="developmentInformation" id="developmentInformation" rows=5 style="width:738px; margin: 5px 0px 0px 0px"></textarea> </td> </tr> <tr> <td colspan=2> <h4><?php print _('Student Education') ?></h4> </td> </tr> <tr> <td> <b><?php print _('Anticipated Year of Entry') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('What school year will the student join in?') ?></i></span> </td> <td class="right"> <select name="gibbonSchoolYearIDEntry" id="gibbonSchoolYearIDEntry" style="width: 302px"> <?php print "<option value='Please select...'>" . _('Please select...') . "</option>" ; try { $dataSelect=array(); $sqlSelect="SELECT * FROM gibbonSchoolYear WHERE (status='Current' OR status='Upcoming') ORDER BY sequenceNumber" ; $resultSelect=$connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch(PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>" ; } while ($rowSelect=$resultSelect->fetch()) { print "<option value='" . $rowSelect["gibbonSchoolYearID"] . "'>" . htmlPrep($rowSelect["name"]) . "</option>" ; } ?> </select> <script type="text/javascript"> var gibbonSchoolYearIDEntry=new LiveValidation('gibbonSchoolYearIDEntry'); gibbonSchoolYearIDEntry.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> </td> </tr> <tr> <td> <b><?php print _('Intended Start Date') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Student\'s intended first day at school.') ?><br/><?php print _('Format:') ?> <?php if ($_SESSION[$guid]["i18n"]["dateFormat"]=="") { print "dd/mm/yyyy" ; } else { print $_SESSION[$guid]["i18n"]["dateFormat"] ; }?></i></span> </td> <td class="right"> <input name="dateStart" id="dateStart" maxlength=10 value="" type="text" style="width: 300px"> <script type="text/javascript"> var dateStart=new LiveValidation('dateStart'); dateStart.add( Validate.Format, {pattern: <?php if ($_SESSION[$guid]["i18n"]["dateFormatRegEx"]=="") { print "/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$/i" ; } else { print $_SESSION[$guid]["i18n"]["dateFormatRegEx"] ; } ?>, failureMessage: "Use <?php if ($_SESSION[$guid]["i18n"]["dateFormat"]=="") { print "dd/mm/yyyy" ; } else { print $_SESSION[$guid]["i18n"]["dateFormat"] ; }?>." } ); dateStart.add(Validate.Presence); </script> <script type="text/javascript"> $(function() { $( "#dateStart" ).datepicker(); }); </script> </td> </tr> <tr> <td> <b><?php print _('Year Group at Entry') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Which year level will student enter.') ?></i></span> </td> <td class="right"> <select name="gibbonYearGroupIDEntry" id="gibbonYearGroupIDEntry" style="width: 302px"> <?php print "<option value='Please select...'>" . _('Please select...') . "</option>" ; try { $dataSelect=array(); $sqlSelect="SELECT * FROM gibbonYearGroup ORDER BY sequenceNumber" ; $resultSelect=$connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch(PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>" ; } while ($rowSelect=$resultSelect->fetch()) { print "<option value='" . $rowSelect["gibbonYearGroupID"] . "'>" . htmlPrep(_($rowSelect["name"])) . "</option>" ; } ?> </select> <script type="text/javascript"> var gibbonYearGroupIDEntry=new LiveValidation('gibbonYearGroupIDEntry'); gibbonYearGroupIDEntry.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> </td> </tr> <?php $dayTypeOptions=getSettingByScope($connection2, 'User Admin', 'dayTypeOptions') ; if ($dayTypeOptions!="") { ?> <tr> <td> <b><?php print _('Day Type') ?></b><br/> <span style="font-size: 90%"><i><?php print getSettingByScope($connection2, 'User Admin', 'dayTypeText') ; ?></i></span> </td> <td class="right"> <select name="dayType" id="dayType" style="width: 302px"> <?php $dayTypes=explode(",", $dayTypeOptions) ; foreach ($dayTypes as $dayType) { print "<option value='" . trim($dayType) . "'>" . trim($dayType) . "</option>" ; } ?> </select> </td> </tr> <?php } ?> <tr> <td colspan=2 style='padding-top: 15px'> <b><?php print _('Previous Schools') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Please give information on the last two schools attended by the applicant.') ?></i></span> </td> </tr> <tr> <td colspan=2> <?php print "<table cellspacing='0' style='width: 100%'>" ; print "<tr class='head'>" ; print "<th>" ; print _("School Name") ; print "</th>" ; print "<th>" ; print _("Address") ; print "</th>" ; print "<th>" ; print sprintf(_('Grades%1$sAttended'), "<br/>") ; print "</th>" ; print "<th>" ; print sprintf(_('Language of%1$sInstruction'), "<br/>") ; print "</th>" ; print "<th>" ; print _("Joining Date") . "<br/><span style='font-size: 80%'>" ; if ($_SESSION[$guid]["i18n"]["dateFormat"]=="") { print "dd/mm/yyyy" ; } else { print $_SESSION[$guid]["i18n"]["dateFormat"] ; } print "</span>" ; print "</th>" ; print "</tr>" ; for ($i=1; $i<3; $i++) { if ((($i%2)-1)==0) { $rowNum="even" ; } else { $rowNum="odd" ; } print "<tr class=$rowNum>" ; print "<td>" ; print "<input name='schoolName$i' id='schoolName$i' maxlength=50 value='' type='text' style='width:120px; float: left'>" ; print "</td>" ; print "<td>" ; print "<input name='schoolAddress$i' id='schoolAddress$i' maxlength=255 value='' type='text' style='width:120px; float: left'>" ; print "</td>" ; print "<td>" ; print "<input name='schoolGrades$i' id='schoolGrades$i' maxlength=20 value='' type='text' style='width:70px; float: left'>" ; print "</td>" ; print "<td>" ; print "<input name='schoolLanguage$i' id='schoolLanguage$i' maxlength=50 value='' type='text' style='width:100px; float: left'>" ; ?> <script type="text/javascript"> $(function() { var availableTags=[ <?php try { $dataAuto=array(); $sqlAuto="SELECT DISTINCT schoolLanguage" . $i . " FROM gibbonApplicationForm ORDER BY schoolLanguage" . $i ; $resultAuto=$connection2->prepare($sqlAuto); $resultAuto->execute($dataAuto); } catch(PDOException $e) { } while ($rowAuto=$resultAuto->fetch()) { print "\"" . $rowAuto["schoolLanguage" . $i] . "\", " ; } ?> ]; $( "#schoolLanguage<?php print $i ?>" ).autocomplete({source: availableTags}); }); </script> <?php print "</td>" ; print "<td>" ; ?> <input name="<?php print "schoolDate$i" ?>" id="<?php print "schoolDate$i" ?>" maxlength=10 value="" type="text" style="width:90px; float: left"> <script type="text/javascript"> $(function() { $( "#<?php print "schoolDate$i" ?>" ).datepicker(); }); </script> <?php print "</td>" ; print "</tr>" ; } print "</table>" ; ?> </td> </tr> <?php //FAMILY try { $dataSelect=array("gibbonPersonID"=>$gibbonPersonID); $sqlSelect="SELECT * FROM gibbonFamily JOIN gibbonFamilyAdult ON (gibbonFamily.gibbonFamilyID=gibbonFamilyAdult.gibbonFamilyID) WHERE gibbonFamilyAdult.gibbonPersonID=:gibbonPersonID ORDER BY name" ; $resultSelect=$connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch(PDOException $e) { } if ($public==TRUE OR $resultSelect->rowCount()<1) { ?> <input type="hidden" name="gibbonFamily" value="FALSE"> <tr class='break'> <td colspan=2> <h3> <?php print _('Home Address') ?> </h3> <p> <?php print _('This address will be used for all members of the family. If an individual within the family needs a different address, this can be set through Data Updater after admission.') ?> </p> </td> </tr> <tr> <td> <b><?php print _('Home Address') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Unit, Building, Street') ?></i></span> </td> <td class="right"> <input name="homeAddress" id="homeAddress" maxlength=255 value="" type="text" style="width: 300px"> <script type="text/javascript"> var homeAddress=new LiveValidation('homeAddress'); homeAddress.add(Validate.Presence); </script> </td> </tr> <tr> <td> <b><?php print _('Home Address (District)') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('County, State, District') ?></i></span> </td> <td class="right"> <input name="homeAddressDistrict" id="homeAddressDistrict" maxlength=30 value="" type="text" style="width: 300px"> </td> <script type="text/javascript"> $(function() { var availableTags=[ <?php try { $dataAuto=array(); $sqlAuto="SELECT DISTINCT name FROM gibbonDistrict ORDER BY name" ; $resultAuto=$connection2->prepare($sqlAuto); $resultAuto->execute($dataAuto); } catch(PDOException $e) { } while ($rowAuto=$resultAuto->fetch()) { print "\"" . $rowAuto["name"] . "\", " ; } ?> ]; $( "#homeAddressDistrict" ).autocomplete({source: availableTags}); }); </script> <script type="text/javascript"> var homeAddressDistrict=new LiveValidation('homeAddressDistrict'); homeAddressDistrict.add(Validate.Presence); </script> </tr> <tr> <td> <b><?php print _('Home Address (Country)') ?> *</b><br/> </td> <td class="right"> <select name="homeAddressCountry" id="homeAddressCountry" style="width: 302px"> <?php try { $dataSelect=array(); $sqlSelect="SELECT printable_name FROM gibbonCountry ORDER BY printable_name" ; $resultSelect=$connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch(PDOException $e) { } print "<option value='Please select...'>" . _('Please select...') . "</option>" ; while ($rowSelect=$resultSelect->fetch()) { print "<option value='" . $rowSelect["printable_name"] . "'>" . htmlPrep(_($rowSelect["printable_name"])) . "</option>" ; } ?> </select> <script type="text/javascript"> var homeAddressCountry=new LiveValidation('homeAddressCountry'); homeAddressCountry.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> </td> </tr> <?php if (isset($_SESSION[$guid]["username"])) { $start=2 ; ?> <tr class='break'> <td colspan=2> <h3> <?php print _('Parent/Guardian 1') ?> <?php if ($i==1) { print "<span style='font-size: 75%'></span>" ; } ?> </h3> </td> </tr> <tr> <td> <b><?php print _('Username') ?></b><br/> <span style="font-size: 90%"><i><?php print _('System login ID.') ?></i></span> </td> <td class="right"> <input readonly name='parent1username' maxlength=30 value="<?php print $_SESSION[$guid]["username"] ?>" type="text" style="width: 300px"> </td> </tr> <tr> <td> <b><?php print _('Surname') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Family name as shown in ID documents.') ?></i></span> </td> <td class="right"> <input readonly name='parent1surname' maxlength=30 value="<?php print $_SESSION[$guid]["surname"] ?>" type="text" style="width: 300px"> </td> </tr> <tr> <td> <b><?php print _('Preferred Name') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Most common name, alias, nickname, etc.') ?></i></span> </td> <td class="right"> <input readonly name='parent1preferredName' maxlength=30 value="<?php print $_SESSION[$guid]["preferredName"] ?>" type="text" style="width: 300px"> </td> </tr> <tr> <td> <b><?php print _('Relationship') ?> *</b><br/> </td> <td class="right"> <select name="parent1relationship" id="parent1relationship" style="width: 302px"> <option value="Please select..."><?php print _('Please select...') ?></option> <option value="Mother"><?php print _('Mother') ?></option> <option value="Father"><?php print _('Father') ?></option> <option value="Step-Mother"><?php print _('Step-Mother') ?></option> <option value="Step-Father"><?php print _('Step-Father') ?></option> <option value="Adoptive Parent"><?php print _('Adoptive Parent') ?></option> <option value="Guardian"><?php print _('Guardian') ?></option> <option value="Grandmother"><?php print _('Grandmother') ?></option> <option value="Grandfather"><?php print _('Grandfather') ?></option> <option value="Aunt"><?php print _('Aunt') ?></option> <option value="Uncle"><?php print _('Uncle') ?></option> <option value="Nanny/Helper"><?php print _('Nanny/Helper') ?></option> <option value="Other"><?php print _('Other') ?></option> </select> <script type="text/javascript"> var parent1relationship=new LiveValidation('parent1relationship'); parent1relationship.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> </td> </tr> <input name='parent1gibbonPersonID' value="<?php print $gibbonPersonID ?>" type="hidden"> <?php } else { $start=1 ; } for ($i=$start;$i<3;$i++) { ?> <tr class='break'> <td colspan=2> <h3> <?php print _('Parent/Guardian') ?> <?php print $i ?> <?php if ($i==1) { print "<span style='font-size: 75%'> (e.g. mother)</span>" ; } else if ($i==2 AND $gibbonPersonID=="") { print "<span style='font-size: 75%'> (e.g. father)</span>" ; } ?> </h3> </td> </tr> <?php if ($i==2) { ?> <tr> <td class='right' colspan=2> <script type="text/javascript"> /* Advanced Options Control */ $(document).ready(function(){ $("#secondParent").click(function(){ if ($('input[name=secondParent]:checked').val()=="No" ) { $(".secondParent").slideUp("fast"); $("#parent2title").attr("disabled", "disabled"); $("#parent2surname").attr("disabled", "disabled"); $("#parent2firstName").attr("disabled", "disabled"); $("#parent2preferredName").attr("disabled", "disabled"); $("#parent2officialName").attr("disabled", "disabled"); $("#parent2nameInCharacters").attr("disabled", "disabled"); $("#parent2gender").attr("disabled", "disabled"); $("#parent2relationship").attr("disabled", "disabled"); $("#parent2languageFirst").attr("disabled", "disabled"); $("#parent2languageSecond").attr("disabled", "disabled"); $("#parent2citizenship1").attr("disabled", "disabled"); $("#parent2nationalIDCardNumber").attr("disabled", "disabled"); $("#parent2residencyStatus").attr("disabled", "disabled"); $("#parent2visaExpiryDate").attr("disabled", "disabled"); $("#parent2email").attr("disabled", "disabled"); $("#parent2phone1Type").attr("disabled", "disabled"); $("#parent2phone1CountryCode").attr("disabled", "disabled"); $("#parent2phone1").attr("disabled", "disabled"); $("#parent2phone2Type").attr("disabled", "disabled"); $("#parent2phone2CountryCode").attr("disabled", "disabled"); $("#parent2phone2").attr("disabled", "disabled"); $("#parent2profession").attr("disabled", "disabled"); $("#parent2employer").attr("disabled", "disabled"); } else { $(".secondParent").slideDown("fast", $(".secondParent").css("display","table-row")); $("#parent2title").removeAttr("disabled"); $("#parent2surname").removeAttr("disabled"); $("#parent2firstName").removeAttr("disabled"); $("#parent2preferredName").removeAttr("disabled"); $("#parent2officialName").removeAttr("disabled"); $("#parent2nameInCharacters").removeAttr("disabled"); $("#parent2gender").removeAttr("disabled"); $("#parent2relationship").removeAttr("disabled"); $("#parent2languageFirst").removeAttr("disabled"); $("#parent2languageSecond").removeAttr("disabled"); $("#parent2citizenship1").removeAttr("disabled"); $("#parent2nationalIDCardNumber").removeAttr("disabled"); $("#parent2residencyStatus").removeAttr("disabled"); $("#parent2visaExpiryDate").removeAttr("disabled"); $("#parent2email").removeAttr("disabled"); $("#parent2phone1Type").removeAttr("disabled"); $("#parent2phone1CountryCode").removeAttr("disabled"); $("#parent2phone1").removeAttr("disabled"); $("#parent2phone2Type").removeAttr("disabled"); $("#parent2phone2CountryCode").removeAttr("disabled"); $("#parent2phone2").removeAttr("disabled"); $("#parent2profession").removeAttr("disabled"); $("#parent2employer").removeAttr("disabled"); } }); }); </script> <span style='font-weight: bold; font-style: italic'>Do not include a second parent/gaurdian <input id='secondParent' name='secondParent' type='checkbox' value='No'/></span> </td> </tr> <?php } ?> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td colspan=2> <h4><?php print _('Parent/Guardian') ?> <?php print $i ?> <?php print _('Personal Data') ?></h4> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Title') ?> *</b><br/> <span style="font-size: 90%"><i></i></span> </td> <td class="right"> <select style="width: 302px" id="<?php print "parent$i" ?>title" name="<?php print "parent$i" ?>title"> <option value="Please select..."><?php print _('Please select...') ?></option> <option value="Ms.">Ms.</option> <option value="Miss">Miss</option> <option value="Mr.">Mr.</option> <option value="Mrs.">Mrs.</option> <option value="Dr.">Dr.</option> </select> <script type="text/javascript"> var <?php print "parent$i" ?>title=new LiveValidation('<?php print "parent$i" ?>title'); <?php print "parent$i" ?>title.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Surname') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Family name as shown in ID documents.') ?></i></span> </td> <td class="right"> <input name="<?php print "parent$i" ?>surname" id="<?php print "parent$i" ?>surname" maxlength=30 value="" type="text" style="width: 300px"> <script type="text/javascript"> var <?php print "parent$i" ?>surname=new LiveValidation('<?php print "parent$i" ?>surname'); <?php print "parent$i" ?>surname.add(Validate.Presence); </script> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('First Name') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('First name as shown in ID documents.') ?></i></span> </td> <td class="right"> <input name="<?php print "parent$i" ?>firstName" id="<?php print "parent$i" ?>firstName" maxlength=30 value="" type="text" style="width: 300px"> <script type="text/javascript"> var <?php print "parent$i" ?>firstName=new LiveValidation('<?php print "parent$i" ?>firstName'); <?php print "parent$i" ?>firstName.add(Validate.Presence); </script> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Preferred Name') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Most common name, alias, nickname, etc.') ?></i></span> </td> <td class="right"> <input name="<?php print "parent$i" ?>preferredName" id="<?php print "parent$i" ?>preferredName" maxlength=30 value="" type="text" style="width: 300px"> <script type="text/javascript"> var <?php print "parent$i" ?>preferredName=new LiveValidation('<?php print "parent$i" ?>preferredName'); <?php print "parent$i" ?>preferredName.add(Validate.Presence); </script> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Official Name') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Full name as shown in ID documents.') ?></i></span> </td> <td class="right"> <input title='Please enter full name as shown in ID documents' name="<?php print "parent$i" ?>officialName" id="<?php print "parent$i" ?>officialName" maxlength=150 value="" type="text" style="width: 300px"> <script type="text/javascript"> var <?php print "parent$i" ?>officialName=new LiveValidation('<?php print "parent$i" ?>officialName'); <?php print "parent$i" ?>officialName.add(Validate.Presence); </script> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Name In Characters') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Chinese or other character-based name.') ?></i></span> </td> <td class="right"> <input name="<?php print "parent$i" ?>nameInCharacters" id="<?php print "parent$i" ?>nameInCharacters" maxlength=20 value="" type="text" style="width: 300px"> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Gender') ?> *</b><br/> </td> <td class="right"> <select name="<?php print "parent$i" ?>gender" id="<?php print "parent$i" ?>gender" style="width: 302px"> <option value="Please select..."><?php print _('Please select...') ?></option> <option value="F"><?php print _('Female') ?></option> <option value="M"><?php print _('Male') ?></option> </select> <script type="text/javascript"> var <?php print "parent$i" ?>gender=new LiveValidation('<?php print "parent$i" ?>gender'); <?php print "parent$i" ?>gender.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Relationship') ?> *</b><br/> </td> <td class="right"> <select name="<?php print "parent$i" ?>relationship" id="<?php print "parent$i" ?>relationship" style="width: 302px"> <option value="Please select..."><?php print _('Please select...') ?></option> <option value="Mother"><?php print _('Mother') ?></option> <option value="Father"><?php print _('Father') ?></option> <option value="Step-Mother"><?php print _('Step-Mother') ?></option> <option value="Step-Father"><?php print _('Step-Father') ?></option> <option value="Adoptive Parent"><?php print _('Adoptive Parent') ?></option> <option value="Guardian"><?php print _('Guardian') ?></option> <option value="Grandmother"><?php print _('Grandmother') ?></option> <option value="Grandfather"><?php print _('Grandfather') ?></option> <option value="Aunt"><?php print _('Aunt') ?></option> <option value="Uncle"><?php print _('Uncle') ?></option> <option value="Nanny/Helper"><?php print _('Nanny/Helper') ?></option> <option value="Other"><?php print _('Other') ?></option> </select> <script type="text/javascript"> var <?php print "parent$i" ?>relationship=new LiveValidation('<?php print "parent$i" ?>relationship'); <?php print "parent$i" ?>relationship.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td colspan=2> <h4><?php print _('Parent/Guardian') ?> <?php print $i ?> <?php print _('Personal Background') ?></h4> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('First Language') ?></b><br/> </td> <td class="right"> <input name="<?php print "parent$i" ?>languageFirst" id="<?php print "parent$i" ?>languageFirst" maxlength=30 value="" type="text" style="width: 300px"> </td> <script type="text/javascript"> $(function() { var availableTags=[ <?php try { $dataAuto=array(); $sqlAuto="SELECT DISTINCT languageFirst FROM gibbonApplicationForm ORDER BY languageFirst" ; $resultAuto=$connection2->prepare($sqlAuto); $resultAuto->execute($dataAuto); } catch(PDOException $e) { } while ($rowAuto=$resultAuto->fetch()) { print "\"" . $rowAuto["languageFirst"] . "\", " ; } ?> ]; $( "#<?php print 'parent' . $i ?>languageFirst" ).autocomplete({source: availableTags}); }); </script> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Second Language') ?></b><br/> </td> <td class="right"> <input name="<?php print "parent$i" ?>languageSecond" id="<?php print "parent$i" ?>languageSecond" maxlength=30 value="" type="text" style="width: 300px"> </td> <script type="text/javascript"> $(function() { var availableTags=[ <?php try { $dataAuto=array(); $sqlAuto="SELECT DISTINCT languageSecond FROM gibbonApplicationForm ORDER BY languageSecond" ; $resultAuto=$connection2->prepare($sqlAuto); $resultAuto->execute($dataAuto); } catch(PDOException $e) { } while ($rowAuto=$resultAuto->fetch()) { print "\"" . $rowAuto["languageSecond"] . "\", " ; } ?> ]; $( "#<?php print 'parent' . $i ?>languageSecond" ).autocomplete({source: availableTags}); }); </script> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Citizenship') ?></b><br/> </td> <td class="right"> <select name="<?php print "parent$i" ?>citizenship1" id="<?php print "parent$i" ?>citizenship1" style="width: 302px"> <?php print "<option value=''></option>" ; $nationalityList=getSettingByScope($connection2, "User Admin", "nationality") ; if ($nationalityList=="") { try { $dataSelect=array(); $sqlSelect="SELECT printable_name FROM gibbonCountry ORDER BY printable_name" ; $resultSelect=$connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch(PDOException $e) { } while ($rowSelect=$resultSelect->fetch()) { print "<option value='" . $rowSelect["printable_name"] . "'>" . htmlPrep(_($rowSelect["printable_name"])) . "</option>" ; } } else { $nationalities=explode(",", $nationalityList) ; foreach ($nationalities as $nationality) { print "<option value='" . trim($nationality) . "'>" . trim($nationality) . "</option>" ; } } ?> </select> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <?php if ($_SESSION[$guid]["country"]=="") { print "<b>" . _('National ID Card Number') . "</b><br/>" ; } else { print "<b>" . $_SESSION[$guid]["country"] . " " . _('ID Card Number') . "</b><br/>" ; } ?> </td> <td class="right"> <input name="<?php print "parent$i" ?>nationalIDCardNumber" id="<?php print "parent$i" ?>nationalIDCardNumber" maxlength=30 value="" type="text" style="width: 300px"> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <?php if ($_SESSION[$guid]["country"]=="") { print "<b>" . _('Residency/Visa Type') . "</b><br/>" ; } else { print "<b>" . $_SESSION[$guid]["country"] . " " . _('Residency/Visa Type') . "</b><br/>" ; } ?> </td> <td class="right"> <?php $residencyStatusList=getSettingByScope($connection2, "User Admin", "residencyStatus") ; if ($residencyStatusList=="") { print "<input name='parent" . $i . "residencyStatus' id='parent" . $i . "residencyStatus' maxlength=30 type='text' style='width: 300px'>" ; } else { print "<select name='parent" . $i . "residencyStatus' id='parent" . $i . "residencyStatus' style='width: 302px'>" ; print "<option value=''></option>" ; $residencyStatuses=explode(",", $residencyStatusList) ; foreach ($residencyStatuses as $residencyStatus) { $selected="" ; if (trim($residencyStatus)==$row["parent" . $i . "residencyStatus"]) { $selected="selected" ; } print "<option $selected value='" . trim($residencyStatus) . "'>" . trim($residencyStatus) . "</option>" ; } print "</select>" ; } ?> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <?php if ($_SESSION[$guid]["country"]=="") { print "<b>" . _('Visa Expiry Date') . "</b><br/>" ; } else { print "<b>" . $_SESSION[$guid]["country"] . " " . _('Visa Expiry Date') . "</b><br/>" ; } print "<span style='font-size: 90%'><i>" . _('Format:') . " " ; if ($_SESSION[$guid]["i18n"]["dateFormat"]=="") { print "dd/mm/yyyy" ; } else { print $_SESSION[$guid]["i18n"]["dateFormat"] ; } print ". " . _('If relevant.') . "</i></span>" ; ?> </td> <td class="right"> <input name="<?php print "parent$i" ?>visaExpiryDate" id="<?php print "parent$i" ?>visaExpiryDate" maxlength=10 value="" type="text" style="width: 300px"> <script type="text/javascript"> var <?php print "parent$i" ?>visaExpiryDate=new LiveValidation('<?php print "parent$i" ?>visaExpiryDate'); <?php print "parent$i" ?>visaExpiryDate.add( Validate.Format, {pattern: <?php if ($_SESSION[$guid]["i18n"]["dateFormatRegEx"]=="") { print "/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$/i" ; } else { print $_SESSION[$guid]["i18n"]["dateFormatRegEx"] ; } ?>, failureMessage: "Use <?php if ($_SESSION[$guid]["i18n"]["dateFormat"]=="") { print "dd/mm/yyyy" ; } else { print $_SESSION[$guid]["i18n"]["dateFormat"] ; }?>." } ); </script> <script type="text/javascript"> $(function() { $( "#<?php print "parent$i" ?>visaExpiryDate" ).datepicker(); }); </script> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td colspan=2> <h4><?php print _('Parent/Guardian') ?> <?php print $i ?> <?php print _('Contact') ?></h4> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Email') ?> *</b><br/> </td> <td class="right"> <input name="<?php print "parent$i" ?>email" id="<?php print "parent$i" ?>email" maxlength=50 value="" type="text" style="width: 300px"> <script type="text/javascript"> var <?php print "parent$i" ?>email=new LiveValidation('<?php print "parent$i" ?>email'); <?php print "parent$i" . "email.add(Validate.Email);"; print "parent$i" . "email.add(Validate.Presence);" ; ?> </script> </td> </tr> <?php for ($y=1; $y<3; $y++) { ?> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Phone') ?> <?php print $y ; if ($y==1) { print " *" ;}?></b><br/> <span style="font-size: 90%"><i><?php print _('Type, country code, number.') ?></i></span> </td> <td class="right"> <input name="<?php print "parent$i" ?>phone<?php print $y ?>" id="<?php print "parent$i" ?>phone<?php print $y ?>" maxlength=20 value="" type="text" style="width: 160px"> <?php if ($y==1) { ?> <script type="text/javascript"> var <?php print "parent$i" ?>phone<?php print $y ?>=new LiveValidation('<?php print "parent$i" ?>phone<?php print $y ?>'); <?php print "parent$i" ?>phone<?php print $y ?>.add(Validate.Presence); </script> <?php } ?> <select name="<?php print "parent$i" ?>phone<?php print $y ?>CountryCode" id="<?php print "parent$i" ?>phone<?php print $y ?>CountryCode" style="width: 60px"> <?php print "<option value=''></option>" ; try { $dataSelect=array(); $sqlSelect="SELECT * FROM gibbonCountry ORDER BY printable_name" ; $resultSelect=$connection2->prepare($sqlSelect); $resultSelect->execute($dataSelect); } catch(PDOException $e) { } while ($rowSelect=$resultSelect->fetch()) { print "<option value='" . $rowSelect["iddCountryCode"] . "'>" . htmlPrep($rowSelect["iddCountryCode"]) . " - " . htmlPrep(_($rowSelect["printable_name"])) . "</option>" ; } ?> </select> <select style="width: 70px" name="<?php print "parent$i" ?>phone<?php print $y ?>Type"> <option value=""></option> <option value="Mobile"><?php print _('Mobile') ?></option> <option value="Home"><?php print _('Home') ?></option> <option value="Work"><?php print _('Work') ?></option> <option value="Fax"><?php print _('Fax') ?></option> <option value="Pager"><?php print _('Pager') ?></option> <option value="Other"><?php print _('Other') ?></option> </select> </td> </tr> <?php } ?> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td colspan=2> <h4><?php print _('Parent/Guardian') ?> <?php print $i ?> <?php print _('Employment') ?></h4> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Profession') ?> *</b><br/> </td> <td class="right"> <input name="<?php print "parent$i" ?>profession" id="<?php print "parent$i" ?>profession" maxlength=30 value="" type="text" style="width: 300px"> <script type="text/javascript"> var <?php print "parent$i" ?>profession=new LiveValidation('<?php print "parent$i" ?>profession'); <?php print "parent$i" ?>profession.add(Validate.Presence); </script> </td> </tr> <tr <?php if ($i==2) { print "class='secondParent'" ; }?>> <td> <b><?php print _('Employer') ?></b><br/> </td> <td class="right"> <input name="<?php print "parent$i" ?>employer" id="<?php print "parent$i" ?>employer" maxlength=30 value="" type="text" style="width: 300px"> </td> </tr> <?php } } else { ?> <input type="hidden" name="gibbonFamily" value="TRUE"> <tr class='break'> <td colspan=2> <h3><?php print _('Family') ?></h3> <p><?php print _('Choose the family you wish to associate this application with.') ?></p> <?php print "<table cellspacing='0' style='width: 100%'>" ; print "<tr class='head'>" ; print "<th>" ; print _("Family Name") ; print "</th>" ; print "<th>" ; print _("Selected") ; print "</th>" ; print "<th>" ; print _("Relationships") ; print "</th>" ; print "</tr>" ; $rowCount=1 ; while ($rowSelect=$resultSelect->fetch()) { if (($rowCount%2)==0) { $rowNum="odd" ; } else { $rowNum="even" ; } print "<tr class=$rowNum>" ; print "<td>" ; print "<b>" . $rowSelect["name"] . "</b><br/>" ; print "</td>" ; print "<td>" ; $checked="" ; if ($rowCount==1) { $checked="checked" ; } print "<input $checked value='" . $rowSelect["gibbonFamilyID"] . "' name='gibbonFamilyID' type='radio'/>" ; print "</td>" ; print "<td>" ; try { $dataRelationships=array("gibbonFamilyID"=>$rowSelect["gibbonFamilyID"]); $sqlRelationships="SELECT surname, preferredName, title, gender, gibbonFamilyAdult.gibbonPersonID FROM gibbonFamilyAdult JOIN gibbonPerson ON (gibbonFamilyAdult.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE gibbonFamilyID=:gibbonFamilyID" ; $resultRelationships=$connection2->prepare($sqlRelationships); $resultRelationships->execute($dataRelationships); } catch(PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>" ; } while ($rowRelationships=$resultRelationships->fetch()) { print "<div style='width: 100%'>" ; print formatName($rowRelationships["title"], $rowRelationships["preferredName"], $rowRelationships["surname"], "Parent") ; ?> <select name="<?php print $rowSelect["gibbonFamilyID"] ?>-relationships[]" id="relationships[]" style="width: 200px"> <option <?php if ($rowRelationships["gender"]=="F") { print "selected" ; } ?> value="Mother"><?php print _('Mother') ?></option> <option <?php if ($rowRelationships["gender"]=="M") { print "selected" ; } ?> value="Father"><?php print _('Father') ?></option> <option value="Step-Mother"><?php print _('Step-Mother') ?></option> <option value="Step-Father"><?php print _('Step-Father') ?></option> <option value="Adoptive Parent"><?php print _('Adoptive Parent') ?></option> <option value="Guardian"><?php print _('Guardian') ?></option> <option value="Grandmother"><?php print _('Grandmother') ?></option> <option value="Grandfather"><?php print _('Grandfather') ?></option> <option value="Aunt"><?php print _('Aunt') ?></option> <option value="Uncle"><?php print _('Uncle') ?></option> <option value="Nanny/Helper"><?php print _('Nanny/Helper') ?></option> <option value="Other"><?php print _('Other') ?></option> </select> <input type="hidden" name="<?php print $rowSelect["gibbonFamilyID"] ?>-relationshipsGibbonPersonID[]" value="<?php print $rowRelationships["gibbonPersonID"] ?>"> <?php print "</div>" ; print "<br/>" ; } print "</td>" ; print "</tr>" ; $rowCount++ ; } print "</table>" ; ?> </td> </tr> <?php } ?> <tr class='break'> <td colspan=2> <h3><?php print _('Siblings') ?></h3> </td> </tr> <tr> <td colspan=2 style='padding-top: 0px'> <p><?php print _('Please give information on the applicants\'s siblings.') ?></p> </td> </tr> <tr> <td colspan=2> <?php print "<table cellspacing='0' style='width: 100%'>" ; print "<tr class='head'>" ; print "<th>" ; print _("Sibling Name") ; print "</th>" ; print "<th>" ; print _("Date of Birth") . "<br/><span style='font-size: 80%'>" . $_SESSION[$guid]["i18n"]["dateFormat"] . "</span>" ; print "</th>" ; print "<th>" ; print _("School Attending") ; print "</th>" ; print "<th>" ; print _("Joining Date") . "<br/><span style='font-size: 80%'>" . $_SESSION[$guid]["i18n"]["dateFormat"] . "</span>" ; print "</th>" ; print "</tr>" ; $rowCount=1 ; //List siblings who have been to or are at the school if (isset($gibbonFamilyID)) { try { $dataSibling=array("gibbonFamilyID"=>$gibbonFamilyID); $sqlSibling="SELECT surname, preferredName, dob, dateStart FROM gibbonFamilyChild JOIN gibbonPerson ON (gibbonFamilyChild.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE gibbonFamilyID=:gibbonFamilyID ORDER BY dob ASC, surname, preferredName" ; $resultSibling=$connection2->prepare($sqlSibling); $resultSibling->execute($dataSibling); } catch(PDOException $e) { print "<div class='error'>" . $e->getMessage() . "</div>" ; } while ($rowSibling=$resultSibling->fetch()) { if (($rowCount%2)==0) { $rowNum="odd" ; } else { $rowNum="even" ; } print "<tr class=$rowNum>" ; print "<td>" ; print "<input name='siblingName$rowCount' id='siblingName$rowCount' maxlength=50 value='" . formatName("", $rowSibling["preferredName"], $rowSibling["surname"], "Student") . "' type='text' style='width:120px; float: left'>" ; print "</td>" ; print "<td>" ; ?> <input name="<?php print "siblingDOB$rowCount" ?>" id="<?php print "siblingDOB$rowCount" ?>" maxlength=10 value="<?php print dateConvertBack($guid, $rowSibling["dob"]) ?>" type="text" style="width:90px; float: left"><br/> <script type="text/javascript"> $(function() { $( "#<?php print "siblingDOB$rowCount" ?>" ).datepicker(); }); </script> <?php print "</td>" ; print "<td>" ; print "<input name='siblingSchool$rowCount' id='siblingSchool$rowCount' maxlength=50 value='" . $_SESSION[$guid]["organisationName"] . "' type='text' style='width:200px; float: left'>" ; print "</td>" ; print "<td>" ; ?> <input name="<?php print "siblingSchoolJoiningDate$rowCount" ?>" id="<?php print "siblingSchoolJoiningDate$rowCount" ?>" maxlength=10 value="<?php print dateConvertBack($guid, $rowSibling["dateStart"]) ?>" type="text" style="width:90px; float: left"> <script type="text/javascript"> $(function() { $( "#<?php print "siblingSchoolJoiningDate$rowCount" ?>" ).datepicker(); }); </script> <?php print "</td>" ; print "</tr>" ; $rowCount++ ; } } //Space for other siblings for ($i=$rowCount; $i<4; $i++) { if (($i%2)==0) { $rowNum="even" ; } else { $rowNum="odd" ; } print "<tr class=$rowNum>" ; print "<td>" ; print "<input name='siblingName$i' id='siblingName$i' maxlength=50 value='' type='text' style='width:120px; float: left'>" ; print "</td>" ; print "<td>" ; ?> <input name="<?php print "siblingDOB$i" ?>" id="<?php print "siblingDOB$i" ?>" maxlength=10 value="" type="text" style="width:90px; float: left"><br/> <script type="text/javascript"> $(function() { $( "#<?php print "siblingDOB$i" ?>" ).datepicker(); }); </script> <?php print "</td>" ; print "<td>" ; print "<input name='siblingSchool$i' id='siblingSchool$i' maxlength=50 value='' type='text' style='width:200px; float: left'>" ; print "</td>" ; print "<td>" ; ?> <input name="<?php print "siblingSchoolJoiningDate$i" ?>" id="<?php print "siblingSchoolJoiningDate$i" ?>" maxlength=10 value="" type="text" style="width:120px; float: left"> <script type="text/javascript"> $(function() { $( "#<?php print "siblingSchoolJoiningDate$i" ?>" ).datepicker(); }); </script> <?php print "</td>" ; print "</tr>" ; } print "</table>" ; ?> </td> </tr> <?php $languageOptionsActive=getSettingByScope($connection2, 'Application Form', 'languageOptionsActive') ; if ($languageOptionsActive=="On") { ?> <tr class='break'> <td colspan=2> <h3><?php print _('Language Selection') ?></h3> <?php $languageOptionsBlurb=getSettingByScope($connection2, 'Application Form', 'languageOptionsBlurb') ; if ($languageOptionsBlurb!="") { print "<p>" ; print $languageOptionsBlurb ; print "</p>" ; } ?> </td> </tr> <tr> <td> <b><?php print _('Language Choice') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Please choose preferred additional language to study.') ?></i></span> </td> <td class="right"> <select name="languageChoice" id="languageChoice" style="width: 302px"> <?php print "<option value='Please select...'>" . _('Please select...') . "</option>" ; $languageOptionsLanguageList=getSettingByScope($connection2, "Application Form", "languageOptionsLanguageList") ; $languages=explode(",", $languageOptionsLanguageList) ; foreach ($languages as $language) { print "<option value='" . trim($language) . "'>" . trim($language) . "</option>" ; } ?> </select> <script type="text/javascript"> var languageChoice=new LiveValidation('languageChoice'); languageChoice.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> </td> </tr> <tr> <td colspan=2 style='padding-top: 15px'> <b><?php print _('Language Choice Experience') ?> *</b><br/> <span style="font-size: 90%"><i><?php print _('Has the applicant studied the selected language before? If so, please describe the level and type of experience.') ?></i></span><br/> <textarea name="languageChoiceExperience" id="languageChoiceExperience" rows=5 style="width:738px; margin: 5px 0px 0px 0px"></textarea> <script type="text/javascript"> var languageChoiceExperience=new LiveValidation('languageChoiceExperience'); languageChoiceExperience.add(Validate.Presence); </script> </td> </tr> <?php } ?> <tr class='break'> <td colspan=2> <h3><?php print _('Scholarships') ?></h3> <?php //Get scholarships info $scholarship=getSettingByScope($connection2, 'Application Form', 'scholarships') ; if ($scholarship!="") { print "<p>" ; print $scholarship ; print "</p>" ; } ?> </td> </tr> <tr> <td> <b><?php print _('Interest') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Indicate if you are interested in a scholarship.') ?></i></span><br/> </td> <td class="right"> <input type="radio" id="scholarshipInterest" name="scholarshipInterest" class="type" value="Y" /> Yes <input checked type="radio" id="scholarshipInterest" name="scholarshipInterest" class="type" value="N" /> No </td> </tr> <tr> <td> <b><?php print _('Required?') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Is a scholarship required for you to take up a place at the school?') ?></i></span><br/> </td> <td class="right"> <input type="radio" id="scholarshipRequired" name="scholarshipRequired" class="type" value="Y" /> Yes <input checked type="radio" id="scholarshipRequired" name="scholarshipRequired" class="type" value="N" /> No </td> </tr> <tr class='break'> <td colspan=2> <h3><?php print _('Payment') ?></h3> </td> </tr> <script type="text/javascript"> /* Resource 1 Option Control */ $(document).ready(function(){ $("#companyNameRow").css("display","none"); $("#companyContactRow").css("display","none"); $("#companyAddressRow").css("display","none"); $("#companyEmailRow").css("display","none"); $("#companyCCFamilyRow").css("display","none"); $("#companyPhoneRow").css("display","none"); $("#companyAllRow").css("display","none"); $("#companyCategoriesRow").css("display","none"); $(".payment").click(function(){ if ($('input[name=payment]:checked').val()=="Family" ) { $("#companyNameRow").css("display","none"); $("#companyContactRow").css("display","none"); $("#companyAddressRow").css("display","none"); $("#companyEmailRow").css("display","none"); $("#companyCCFamilyRow").css("display","none"); $("#companyPhoneRow").css("display","none"); $("#companyAllRow").css("display","none"); $("#companyCategoriesRow").css("display","none"); } else { $("#companyNameRow").slideDown("fast", $("#companyNameRow").css("display","table-row")); $("#companyContactRow").slideDown("fast", $("#companyContactRow").css("display","table-row")); $("#companyAddressRow").slideDown("fast", $("#companyAddressRow").css("display","table-row")); $("#companyEmailRow").slideDown("fast", $("#companyEmailRow").css("display","table-row")); $("#companyCCFamilyRow").slideDown("fast", $("#companyCCFamilyRow").css("display","table-row")); $("#companyPhoneRow").slideDown("fast", $("#companyPhoneRow").css("display","table-row")); $("#companyAllRow").slideDown("fast", $("#companyAllRow").css("display","table-row")); if ($('input[name=companyAll]:checked').val()=="N" ) { $("#companyCategoriesRow").slideDown("fast", $("#companyCategoriesRow").css("display","table-row")); } } }); $(".companyAll").click(function(){ if ($('input[name=companyAll]:checked').val()=="Y" ) { $("#companyCategoriesRow").css("display","none"); } else { $("#companyCategoriesRow").slideDown("fast", $("#companyCategoriesRow").css("display","table-row")); } }); }); </script> <tr id="familyRow"> <td colspan=2> <p><?php print _('If you choose family, future invoices will be sent according to your family\'s contact preferences, which can be changed at a later date by contacting the school. For example you may wish both parents to receive the invoice, or only one. Alternatively, if you choose Company, you can choose for all or only some fees to be covered by the specified company.') ?></p> </td> </tr> <tr> <td> <b><?php print _('Send Future Invoices To') ?></b><br/> </td> <td class="right"> <input type="radio" name="payment" value="Family" class="payment" checked /> Family <input type="radio" name="payment" value="Company" class="payment" /> Company </td> </tr> <tr id="companyNameRow"> <td> <b><?php print _('Company Name') ?></b><br/> </td> <td class="right"> <input name="companyName" id="companyName" maxlength=100 value="" type="text" style="width: 300px"> </td> </tr> <tr id="companyContactRow"> <td> <b><?php print _('Company Contact Person') ?></b><br/> </td> <td class="right"> <input name="companyContact" id="companyContact" maxlength=100 value="" type="text" style="width: 300px"> </td> </tr> <tr id="companyAddressRow"> <td> <b><?php print _('Company Address') ?></b><br/> </td> <td class="right"> <input name="companyAddress" id="companyAddress" maxlength=255 value="" type="text" style="width: 300px"> </td> </tr> <tr id="companyEmailRow"> <td> <b><?php print _('Company Email') ?></b><br/> </td> <td class="right"> <input name="companyEmail" id="companyEmail" maxlength=255 value="" type="text" style="width: 300px"> <script type="text/javascript"> var companyEmail=new LiveValidation('companyEmail'); companyEmail.add(Validate.Email); </script> </td> </tr> <tr id="companyCCFamilyRow"> <td> <b><?php print _('CC Family?') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Should the family be sent a copy of billing emails?') ?></i></span> </td> <td class="right"> <select name="companyCCFamily" id="companyCCFamily" style="width: 302px"> <option value="N" /> <?php print _('No') ?> <option value="Y" /> <?php print _('Yes') ?> </select> </td> </tr> <tr id="companyPhoneRow"> <td> <b><?php print _('Company Phone') ?></b><br/> </td> <td class="right"> <input name="companyPhone" id="companyPhone" maxlength=20 value="" type="text" style="width: 300px"> </td> </tr> <?php try { $dataCat=array(); $sqlCat="SELECT * FROM gibbonFinanceFeeCategory WHERE active='Y' AND NOT gibbonFinanceFeeCategoryID=1 ORDER BY name" ; $resultCat=$connection2->prepare($sqlCat); $resultCat->execute($dataCat); } catch(PDOException $e) { } if ($resultCat->rowCount()<1) { print "<input type=\"hidden\" name=\"companyAll\" value=\"Y\" class=\"companyAll\"/>" ; } else { ?> <tr id="companyAllRow"> <td> <b><?php print _('Company All?') ?></b><br/> <span style="font-size: 90%"><i><?php print _('Should all items be billed to the specified company, or just some?') ?></i></span> </td> <td class="right"> <input type="radio" name="companyAll" value="Y" class="companyAll" checked /> <?php print _('All') ?> <input type="radio" name="companyAll" value="N" class="companyAll" /> <?php print _('Selected') ?> </td> </tr> <tr id="companyCategoriesRow"> <td> <b><?php print _('Company Fee Categories') ?></b><br/> <span style="font-size: 90%"><i><?php print _('If the specified company is not paying all fees, which categories are they paying?') ?></i></span> </td> <td class="right"> <?php while ($rowCat=$resultCat->fetch()) { print $rowCat["name"] . " <input type='checkbox' name='gibbonFinanceFeeCategoryIDList[]' value='" . $rowCat["gibbonFinanceFeeCategoryID"] . "'/><br/>" ; } print _("Other") . " <input type='checkbox' name='gibbonFinanceFeeCategoryIDList[]' value='0001'/><br/>" ; ?> </td> </tr> <?php } $requiredDocuments=getSettingByScope($connection2, "Application Form", "requiredDocuments") ; $requiredDocumentsText=getSettingByScope($connection2, "Application Form", "requiredDocumentsText") ; $requiredDocumentsCompulsory=getSettingByScope($connection2, "Application Form", "requiredDocumentsCompulsory") ; if ($requiredDocuments!="" AND $requiredDocuments!=FALSE) { ?> <tr class='break'> <td colspan=2> <h3><?php print _('Supporting Documents') ?></h3> <?php if ($requiredDocumentsText!="" OR $requiredDocumentsCompulsory!="") { print "<p>" ; print $requiredDocumentsText . " " ; if ($requiredDocumentsCompulsory=="Y") { print _("These documents must all be included before the application can be submitted.") ; } else { print _("These documents are all required, but can be submitted separately to this form if preferred. Please note, however, that your application will be processed faster if the documents are included here.") ; } print "</p>" ; } ?> </td> </tr> <?php //Get list of acceptable file extensions try { $dataExt=array(); $sqlExt="SELECT * FROM gibbonFileExtension" ; $resultExt=$connection2->prepare($sqlExt); $resultExt->execute($dataExt); } catch(PDOException $e) { } $ext="" ; while ($rowExt=$resultExt->fetch()) { $ext=$ext . "'." . $rowExt["extension"] . "'," ; } $requiredDocumentsList=explode(",", $requiredDocuments) ; $count=0 ; foreach ($requiredDocumentsList AS $document) { ?> <tr> <td> <b><?php print $document ; if ($requiredDocumentsCompulsory=="Y") { print " *" ; } ?></b><br/> </td> <td class="right"> <?php print "<input type='file' name='file$count' id='file$count'><br/>" ; print "<input type='hidden' name='fileName$count' id='filefileName$count' value='$document'>" ; if ($requiredDocumentsCompulsory=="Y") { print "<script type='text/javascript'>" ; print "var file$count=new LiveValidation('file$count');" ; print "file$count.add( Validate.Inclusion, { within: [" . $ext . "], failureMessage: 'Illegal file type!', partialMatch: true, caseSensitive: false } );" ; print "file$count.add(Validate.Presence);" ; print "</script>" ; } $count++ ; ?> </td> </tr> <?php } ?> <tr> <td colspan=2> <?php print getMaxUpload() ; ?> <input type="hidden" name="fileCount" value="<?php print $count ?>"> </td> </tr> <?php } ?> <tr class='break'> <td colspan=2> <h3><?php print _('Miscellaneous') ?></h3> </td> </tr> <tr> <td> <b><?php print _('How Did You Hear About Us?') ?> *</b><br/> </td> <td class="right"> <?php $howDidYouHearList=getSettingByScope($connection2, "Application Form", "howDidYouHear") ; if ($howDidYouHearList=="") { print "<input name='howDidYouHear' id='howDidYouHear' maxlength=30 value='" . $row["howDidYouHear"] . "' type='text' style='width: 300px'>" ; } else { print "<select name='howDidYouHear' id='howDidYouHear' style='width: 302px'>" ; print "<option value='Please select...'>" . _('Please select...') . "</option>" ; $howDidYouHears=explode(",", $howDidYouHearList) ; foreach ($howDidYouHears as $howDidYouHear) { print "<option value='" . trim($howDidYouHear) . "'>" . trim($howDidYouHear) . "</option>" ; } print "</select>" ; ?> <script type="text/javascript"> var howDidYouHear=new LiveValidation('howDidYouHear'); howDidYouHear.add(Validate.Exclusion, { within: ['Please select...'], failureMessage: "<?php print _('Select something!') ?>"}); </script> <?php } ?> </td> </tr> <script type="text/javascript"> $(document).ready(function(){ $("#howDidYouHear").change(function(){ if ($('#howDidYouHear option:selected').val()=="Please select..." ) { $("#tellUsMoreRow").css("display","none"); } else { $("#tellUsMoreRow").slideDown("fast", $("#tellUsMoreRow").css("display","table-row")); } }); }); </script> <tr id="tellUsMoreRow" style='display: none'> <td> <b><?php print _('Tell Us More') ?> </b><br/> <span style="font-size: 90%"><i><?php print _('The name of a person or link to a website, etc.') ?></i></span> </td> <td class="right"> <input name="howDidYouHearMore" id="howDidYouHearMore" maxlength=255 value="" type="text" style="width: 300px"> </td> </tr> <?php $privacySetting=getSettingByScope( $connection2, "User Admin", "privacy" ) ; $privacyBlurb=getSettingByScope( $connection2, "User Admin", "privacyBlurb" ) ; $privacyOptions=getSettingByScope( $connection2, "User Admin", "privacyOptions" ) ; if ($privacySetting=="Y" AND $privacyBlurb!="" AND $privacyOptions!="") { ?> <tr> <td> <b><?php print _('Privacy') ?> *</b><br/> <span style="font-size: 90%"><i><?php print htmlPrep($privacyBlurb) ?><br/> </i></span> </td> <td class="right"> <?php $options=explode(",",$privacyOptions) ; foreach ($options AS $option) { print $option . " <input type='checkbox' name='privacyOptions[]' value='" . htmlPrep($option) . "'/><br/>" ; } ?> </td> </tr> <?php } //Get agreement $agreement=getSettingByScope($connection2, 'Application Form', 'agreement') ; if ($agreement!="") { print "<tr class='break'>" ; print "<td colspan=2>" ; print "<h3>" ; print _("Agreement") ; print "</h3>" ; print "<p>" ; print $agreement ; print "</p>" ; print "</td>" ; print "</tr>" ; print "<tr>" ; print "<td>" ; print "<b>" . _('Do you agree to the above?') . "</b><br/>" ; print "</td>" ; print "<td class='right'>" ; print "Yes <input type='checkbox' name='agreement' id='agreement'>" ; ?> <script type="text/javascript"> var agreement=new LiveValidation('agreement'); agreement.add( Validate.Acceptance ); </script> <?php print "</td>" ; print "</tr>" ; } ?> <tr> <td> <span style="font-size: 90%"><i>* <?php print _("denotes a required field") ; ?></i></span> </td> <td class="right"> <input type="hidden" name="address" value="<?php print $_SESSION[$guid]["address"] ?>"> <input type="submit" value="<?php print _("Submit") ; ?>"> </td> </tr> </table> </form> <?php //Get postscrript $postscript=getSettingByScope($connection2, 'Application Form', 'postscript') ; if ($postscript!="") { print "<h2>" ; print _("Further Information") ; print "</h2>" ; print "<p style='padding-bottom: 15px'>" ; print $postscript ; print "</p>" ; } } ?>
dimas-latief/core
modules/Application Form/applicationForm.php
PHP
gpl-3.0
86,438
# 操作系统安装与配置 ### Kali1.1a 操作系统配置 #### Contents - [Install Kali](Kali1.1a/Install-kali.md) - 安装Kali系统 - [Configure Kali Apt Sources](Kali1.1a/Configure-Apt-sources.md) - 配置Kali Apt源 - [Install mate desktop to kali](Kali1.1a/Install-Mate-disktop.md) - 安装mate桌面系统 - [Install Mint Themes to Kali](Kali1.1a/Install-Mint-Themes.md) - 安装mint桌面主题 #### 自动安装脚本 自动安装工具[脚本](Kali1.1a/autogen.sh)不包含安装显卡驱动,显卡需要根据自己的情况去安装。 ```sh root@Hack:~/ # chmod +x autogen.sh && ./autogen.sh ``` #### CentOs6.5 local exploit ```sh rush.q6e@Hack:~/ # gcc -O2 centos6.5.c rush.q6e@Hack:~/ # ./a.out 2.6.37-3.x x86_64 sd@fucksheep.org 2010 -sh-4.1# id uid=0(root) gid=0(root) 组=0(root), ``` #### CentOs7 local exploit ```sh rush.q6e@Hack:~/ # gcc -o exp centos7.c -lpthread rush.q6e@Hack:~/ # ./exp CVE-2014-3153 exploit by Chen Kaiqu(kaiquchen@163.com) Press RETURN after one second... Checking whether exploitable..OK Seaching good magic... magic1=0xffff88001d06fc70 magic2=0xffff880004891c80 magic1=0xffff88002c8f5c70 magic2=0xffff88003cb59c80 Good magic found Hacking... ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 1434357615 [root@Hack ~]# ```
wackonline/security
0s/README.md
Markdown
gpl-3.0
1,304
// uScript Action Node // (C) 2011 Detox Studios LLC using UnityEngine; using System.Collections; [NodePath("Actions/Assets")] [NodeCopyright("Copyright 2011 by Detox Studios LLC")] [NodeToolTip("Loads a PhysicMaterial")] [NodeAuthor("Detox Studios LLC", "http://www.detoxstudios.com")] [NodeHelp("http://docs.uscript.net/#3-Working_With_uScript/3.4-Nodes.htm")] [FriendlyName("Load PhysicMaterial", "Loads a PhysicMaterial file from your Resources directory.")] public class uScriptAct_LoadPhysicMaterial : uScriptLogic { public bool Out { get { return true; } } public void In( [FriendlyName("Asset Path", "The PhysicMaterial file to load. The supported file format is: \"physicMaterial\".")] [AssetPathField(AssetType.PhysicMaterial)] string name, [FriendlyName("Loaded Asset", "The PhysicMaterial loaded from the specified file path.")] out PhysicMaterial asset ) { asset = Resources.Load(name) as PhysicMaterial; if ( null == asset ) { uScriptDebug.Log( "Asset " + name + " couldn't be loaded, are you sure it's in a Resources folder?", uScriptDebug.Type.Warning ); } } #if UNITY_EDITOR public override Hashtable EditorDragDrop( object o ) { if ( typeof(PhysicMaterial).IsAssignableFrom( o.GetType() ) ) { PhysicMaterial ac = (PhysicMaterial)o; string path = UnityEditor.AssetDatabase.GetAssetPath( ac.GetInstanceID( ) ); int index = path.IndexOf( "Resources/" ); if ( index > 0 ) { path = path.Substring( index + "Resources/".Length ); int dot = path.LastIndexOf( '.' ); if ( dot >= 0 ) path = path.Substring( 0, dot ); Hashtable hashtable = new Hashtable( ); hashtable[ "name" ] = path; return hashtable; } } return null; } #endif }
neroziros/GameJam2017
Assets/uScript/uScriptRuntime/Nodes/Actions/Assets/uScriptAct_LoadPhysicMaterial.cs
C#
gpl-3.0
1,905
/*global define*/ /*global test*/ /*global equal*/ define(['models/config'], function (Model) { 'use strict'; module('Config model'); test('Can be created with default values', function() { var note = new Model(); equal(note.get('name'), '', 'For default config name is empty'); equal(note.get('value'), '', 'For default config value is empty'); }); test('Update attributes', function(){ var note = new Model(); note.set('name', 'new-config'); equal(note.get('name'), 'new-config'); equal(note.get('value'), '', 'For default config value is empty'); }); });
elopio/laverna
test/spec/Models/config.js
JavaScript
gpl-3.0
641
//#line 2 "/opt/ros/indigo/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template" // ********************************************************* // // File autogenerated for the dwa_local_planner package // by the dynamic_reconfigure package. // Please do not edit. // // ********************************************************/ #ifndef __dwa_local_planner__DWAPLANNERCONFIG_H__ #define __dwa_local_planner__DWAPLANNERCONFIG_H__ #include <dynamic_reconfigure/config_tools.h> #include <limits> #include <ros/node_handle.h> #include <dynamic_reconfigure/ConfigDescription.h> #include <dynamic_reconfigure/ParamDescription.h> #include <dynamic_reconfigure/Group.h> #include <dynamic_reconfigure/config_init_mutex.h> #include <boost/any.hpp> namespace dwa_local_planner { class DWAPlannerConfigStatics; class DWAPlannerConfig { public: class AbstractParamDescription : public dynamic_reconfigure::ParamDescription { public: AbstractParamDescription(std::string n, std::string t, uint32_t l, std::string d, std::string e) { name = n; type = t; level = l; description = d; edit_method = e; } virtual void clamp(DWAPlannerConfig &config, const DWAPlannerConfig &max, const DWAPlannerConfig &min) const = 0; virtual void calcLevel(uint32_t &level, const DWAPlannerConfig &config1, const DWAPlannerConfig &config2) const = 0; virtual void fromServer(const ros::NodeHandle &nh, DWAPlannerConfig &config) const = 0; virtual void toServer(const ros::NodeHandle &nh, const DWAPlannerConfig &config) const = 0; virtual bool fromMessage(const dynamic_reconfigure::Config &msg, DWAPlannerConfig &config) const = 0; virtual void toMessage(dynamic_reconfigure::Config &msg, const DWAPlannerConfig &config) const = 0; virtual void getValue(const DWAPlannerConfig &config, boost::any &val) const = 0; }; typedef boost::shared_ptr<AbstractParamDescription> AbstractParamDescriptionPtr; typedef boost::shared_ptr<const AbstractParamDescription> AbstractParamDescriptionConstPtr; template <class T> class ParamDescription : public AbstractParamDescription { public: ParamDescription(std::string name, std::string type, uint32_t level, std::string description, std::string edit_method, T DWAPlannerConfig::* f) : AbstractParamDescription(name, type, level, description, edit_method), field(f) {} T (DWAPlannerConfig::* field); virtual void clamp(DWAPlannerConfig &config, const DWAPlannerConfig &max, const DWAPlannerConfig &min) const { if (config.*field > max.*field) config.*field = max.*field; if (config.*field < min.*field) config.*field = min.*field; } virtual void calcLevel(uint32_t &comb_level, const DWAPlannerConfig &config1, const DWAPlannerConfig &config2) const { if (config1.*field != config2.*field) comb_level |= level; } virtual void fromServer(const ros::NodeHandle &nh, DWAPlannerConfig &config) const { nh.getParam(name, config.*field); } virtual void toServer(const ros::NodeHandle &nh, const DWAPlannerConfig &config) const { nh.setParam(name, config.*field); } virtual bool fromMessage(const dynamic_reconfigure::Config &msg, DWAPlannerConfig &config) const { return dynamic_reconfigure::ConfigTools::getParameter(msg, name, config.*field); } virtual void toMessage(dynamic_reconfigure::Config &msg, const DWAPlannerConfig &config) const { dynamic_reconfigure::ConfigTools::appendParameter(msg, name, config.*field); } virtual void getValue(const DWAPlannerConfig &config, boost::any &val) const { val = config.*field; } }; class AbstractGroupDescription : public dynamic_reconfigure::Group { public: AbstractGroupDescription(std::string n, std::string t, int p, int i, bool s) { name = n; type = t; parent = p; state = s; id = i; } std::vector<AbstractParamDescriptionConstPtr> abstract_parameters; bool state; virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &config) const = 0; virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &config) const =0; virtual void updateParams(boost::any &cfg, DWAPlannerConfig &top) const= 0; virtual void setInitialState(boost::any &cfg) const = 0; void convertParams() { for(std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = abstract_parameters.begin(); i != abstract_parameters.end(); ++i) { parameters.push_back(dynamic_reconfigure::ParamDescription(**i)); } } }; typedef boost::shared_ptr<AbstractGroupDescription> AbstractGroupDescriptionPtr; typedef boost::shared_ptr<const AbstractGroupDescription> AbstractGroupDescriptionConstPtr; template<class T, class PT> class GroupDescription : public AbstractGroupDescription { public: GroupDescription(std::string name, std::string type, int parent, int id, bool s, T PT::* f) : AbstractGroupDescription(name, type, parent, id, s), field(f) { } GroupDescription(const GroupDescription<T, PT>& g): AbstractGroupDescription(g.name, g.type, g.parent, g.id, g.state), field(g.field), groups(g.groups) { parameters = g.parameters; abstract_parameters = g.abstract_parameters; } virtual bool fromMessage(const dynamic_reconfigure::Config &msg, boost::any &cfg) const { PT* config = boost::any_cast<PT*>(cfg); if(!dynamic_reconfigure::ConfigTools::getGroupState(msg, name, (*config).*field)) return false; for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i) { boost::any n = &((*config).*field); if(!(*i)->fromMessage(msg, n)) return false; } return true; } virtual void setInitialState(boost::any &cfg) const { PT* config = boost::any_cast<PT*>(cfg); T* group = &((*config).*field); group->state = state; for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i) { boost::any n = boost::any(&((*config).*field)); (*i)->setInitialState(n); } } virtual void updateParams(boost::any &cfg, DWAPlannerConfig &top) const { PT* config = boost::any_cast<PT*>(cfg); T* f = &((*config).*field); f->setParams(top, abstract_parameters); for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i) { boost::any n = &((*config).*field); (*i)->updateParams(n, top); } } virtual void toMessage(dynamic_reconfigure::Config &msg, const boost::any &cfg) const { const PT config = boost::any_cast<PT>(cfg); dynamic_reconfigure::ConfigTools::appendGroup<T>(msg, name, id, parent, config.*field); for(std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = groups.begin(); i != groups.end(); ++i) { (*i)->toMessage(msg, config.*field); } } T (PT::* field); std::vector<DWAPlannerConfig::AbstractGroupDescriptionConstPtr> groups; }; class DEFAULT { public: DEFAULT() { state = true; name = "Default"; } void setParams(DWAPlannerConfig &config, const std::vector<AbstractParamDescriptionConstPtr> params) { for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator _i = params.begin(); _i != params.end(); ++_i) { boost::any val; (*_i)->getValue(config, val); if("max_trans_vel"==(*_i)->name){max_trans_vel = boost::any_cast<double>(val);} if("min_trans_vel"==(*_i)->name){min_trans_vel = boost::any_cast<double>(val);} if("max_vel_x"==(*_i)->name){max_vel_x = boost::any_cast<double>(val);} if("min_vel_x"==(*_i)->name){min_vel_x = boost::any_cast<double>(val);} if("max_vel_y"==(*_i)->name){max_vel_y = boost::any_cast<double>(val);} if("min_vel_y"==(*_i)->name){min_vel_y = boost::any_cast<double>(val);} if("max_rot_vel"==(*_i)->name){max_rot_vel = boost::any_cast<double>(val);} if("min_rot_vel"==(*_i)->name){min_rot_vel = boost::any_cast<double>(val);} if("acc_lim_x"==(*_i)->name){acc_lim_x = boost::any_cast<double>(val);} if("acc_lim_y"==(*_i)->name){acc_lim_y = boost::any_cast<double>(val);} if("acc_lim_theta"==(*_i)->name){acc_lim_theta = boost::any_cast<double>(val);} if("acc_limit_trans"==(*_i)->name){acc_limit_trans = boost::any_cast<double>(val);} if("prune_plan"==(*_i)->name){prune_plan = boost::any_cast<bool>(val);} if("xy_goal_tolerance"==(*_i)->name){xy_goal_tolerance = boost::any_cast<double>(val);} if("yaw_goal_tolerance"==(*_i)->name){yaw_goal_tolerance = boost::any_cast<double>(val);} if("trans_stopped_vel"==(*_i)->name){trans_stopped_vel = boost::any_cast<double>(val);} if("rot_stopped_vel"==(*_i)->name){rot_stopped_vel = boost::any_cast<double>(val);} if("sim_time"==(*_i)->name){sim_time = boost::any_cast<double>(val);} if("sim_granularity"==(*_i)->name){sim_granularity = boost::any_cast<double>(val);} if("angular_sim_granularity"==(*_i)->name){angular_sim_granularity = boost::any_cast<double>(val);} if("path_distance_bias"==(*_i)->name){path_distance_bias = boost::any_cast<double>(val);} if("goal_distance_bias"==(*_i)->name){goal_distance_bias = boost::any_cast<double>(val);} if("occdist_scale"==(*_i)->name){occdist_scale = boost::any_cast<double>(val);} if("stop_time_buffer"==(*_i)->name){stop_time_buffer = boost::any_cast<double>(val);} if("oscillation_reset_dist"==(*_i)->name){oscillation_reset_dist = boost::any_cast<double>(val);} if("oscillation_reset_angle"==(*_i)->name){oscillation_reset_angle = boost::any_cast<double>(val);} if("forward_point_distance"==(*_i)->name){forward_point_distance = boost::any_cast<double>(val);} if("scaling_speed"==(*_i)->name){scaling_speed = boost::any_cast<double>(val);} if("max_scaling_factor"==(*_i)->name){max_scaling_factor = boost::any_cast<double>(val);} if("vx_samples"==(*_i)->name){vx_samples = boost::any_cast<int>(val);} if("vy_samples"==(*_i)->name){vy_samples = boost::any_cast<int>(val);} if("vth_samples"==(*_i)->name){vth_samples = boost::any_cast<int>(val);} if("use_dwa"==(*_i)->name){use_dwa = boost::any_cast<bool>(val);} if("restore_defaults"==(*_i)->name){restore_defaults = boost::any_cast<bool>(val);} } } double max_trans_vel; double min_trans_vel; double max_vel_x; double min_vel_x; double max_vel_y; double min_vel_y; double max_rot_vel; double min_rot_vel; double acc_lim_x; double acc_lim_y; double acc_lim_theta; double acc_limit_trans; bool prune_plan; double xy_goal_tolerance; double yaw_goal_tolerance; double trans_stopped_vel; double rot_stopped_vel; double sim_time; double sim_granularity; double angular_sim_granularity; double path_distance_bias; double goal_distance_bias; double occdist_scale; double stop_time_buffer; double oscillation_reset_dist; double oscillation_reset_angle; double forward_point_distance; double scaling_speed; double max_scaling_factor; int vx_samples; int vy_samples; int vth_samples; bool use_dwa; bool restore_defaults; bool state; std::string name; }groups; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double max_trans_vel; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double min_trans_vel; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double max_vel_x; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double min_vel_x; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double max_vel_y; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double min_vel_y; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double max_rot_vel; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double min_rot_vel; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double acc_lim_x; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double acc_lim_y; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double acc_lim_theta; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double acc_limit_trans; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" bool prune_plan; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double xy_goal_tolerance; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double yaw_goal_tolerance; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double trans_stopped_vel; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double rot_stopped_vel; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double sim_time; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double sim_granularity; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double angular_sim_granularity; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double path_distance_bias; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double goal_distance_bias; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double occdist_scale; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double stop_time_buffer; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double oscillation_reset_dist; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double oscillation_reset_angle; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double forward_point_distance; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double scaling_speed; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" double max_scaling_factor; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" int vx_samples; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" int vy_samples; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" int vth_samples; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" bool use_dwa; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" bool restore_defaults; //#line 218 "/opt/ros/indigo/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template" bool __fromMessage__(dynamic_reconfigure::Config &msg) { const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__(); const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__(); int count = 0; for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) if ((*i)->fromMessage(msg, *this)) count++; for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i ++) { if ((*i)->id == 0) { boost::any n = boost::any(this); (*i)->updateParams(n, *this); (*i)->fromMessage(msg, n); } } if (count != dynamic_reconfigure::ConfigTools::size(msg)) { ROS_ERROR("DWAPlannerConfig::__fromMessage__ called with an unexpected parameter."); ROS_ERROR("Booleans:"); for (unsigned int i = 0; i < msg.bools.size(); i++) ROS_ERROR(" %s", msg.bools[i].name.c_str()); ROS_ERROR("Integers:"); for (unsigned int i = 0; i < msg.ints.size(); i++) ROS_ERROR(" %s", msg.ints[i].name.c_str()); ROS_ERROR("Doubles:"); for (unsigned int i = 0; i < msg.doubles.size(); i++) ROS_ERROR(" %s", msg.doubles[i].name.c_str()); ROS_ERROR("Strings:"); for (unsigned int i = 0; i < msg.strs.size(); i++) ROS_ERROR(" %s", msg.strs[i].name.c_str()); // @todo Check that there are no duplicates. Make this error more // explicit. return false; } return true; } // This version of __toMessage__ is used during initialization of // statics when __getParamDescriptions__ can't be called yet. void __toMessage__(dynamic_reconfigure::Config &msg, const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__, const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__) const { dynamic_reconfigure::ConfigTools::clear(msg); for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) (*i)->toMessage(msg, *this); for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i) { if((*i)->id == 0) { (*i)->toMessage(msg, *this); } } } void __toMessage__(dynamic_reconfigure::Config &msg) const { const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__(); const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__(); __toMessage__(msg, __param_descriptions__, __group_descriptions__); } void __toServer__(const ros::NodeHandle &nh) const { const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__(); for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) (*i)->toServer(nh, *this); } void __fromServer__(const ros::NodeHandle &nh) { static bool setup=false; const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__(); for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) (*i)->fromServer(nh, *this); const std::vector<AbstractGroupDescriptionConstPtr> &__group_descriptions__ = __getGroupDescriptions__(); for (std::vector<AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); i++){ if (!setup && (*i)->id == 0) { setup = true; boost::any n = boost::any(this); (*i)->setInitialState(n); } } } void __clamp__() { const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__(); const DWAPlannerConfig &__max__ = __getMax__(); const DWAPlannerConfig &__min__ = __getMin__(); for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) (*i)->clamp(*this, __max__, __min__); } uint32_t __level__(const DWAPlannerConfig &config) const { const std::vector<AbstractParamDescriptionConstPtr> &__param_descriptions__ = __getParamDescriptions__(); uint32_t level = 0; for (std::vector<AbstractParamDescriptionConstPtr>::const_iterator i = __param_descriptions__.begin(); i != __param_descriptions__.end(); ++i) (*i)->calcLevel(level, config, *this); return level; } static const dynamic_reconfigure::ConfigDescription &__getDescriptionMessage__(); static const DWAPlannerConfig &__getDefault__(); static const DWAPlannerConfig &__getMax__(); static const DWAPlannerConfig &__getMin__(); static const std::vector<AbstractParamDescriptionConstPtr> &__getParamDescriptions__(); static const std::vector<AbstractGroupDescriptionConstPtr> &__getGroupDescriptions__(); private: static const DWAPlannerConfigStatics *__get_statics__(); }; template <> // Max and min are ignored for strings. inline void DWAPlannerConfig::ParamDescription<std::string>::clamp(DWAPlannerConfig &config, const DWAPlannerConfig &max, const DWAPlannerConfig &min) const { return; } class DWAPlannerConfigStatics { friend class DWAPlannerConfig; DWAPlannerConfigStatics() { DWAPlannerConfig::GroupDescription<DWAPlannerConfig::DEFAULT, DWAPlannerConfig> Default("Default", "", 0, 0, true, &DWAPlannerConfig::groups); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.max_trans_vel = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.max_trans_vel = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.max_trans_vel = 0.55; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_trans_vel", "double", 0, "The absolute value of the maximum translational velocity for the robot in m/s", "", &DWAPlannerConfig::max_trans_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_trans_vel", "double", 0, "The absolute value of the maximum translational velocity for the robot in m/s", "", &DWAPlannerConfig::max_trans_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.min_trans_vel = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.min_trans_vel = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.min_trans_vel = 0.1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("min_trans_vel", "double", 0, "The absolute value of the minimum translational velocity for the robot in m/s", "", &DWAPlannerConfig::min_trans_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("min_trans_vel", "double", 0, "The absolute value of the minimum translational velocity for the robot in m/s", "", &DWAPlannerConfig::min_trans_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.max_vel_x = -std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.max_vel_x = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.max_vel_x = 0.55; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_vel_x", "double", 0, "The maximum x velocity for the robot in m/s", "", &DWAPlannerConfig::max_vel_x))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_vel_x", "double", 0, "The maximum x velocity for the robot in m/s", "", &DWAPlannerConfig::max_vel_x))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.min_vel_x = -std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.min_vel_x = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.min_vel_x = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("min_vel_x", "double", 0, "The minimum x velocity for the robot in m/s", "", &DWAPlannerConfig::min_vel_x))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("min_vel_x", "double", 0, "The minimum x velocity for the robot in m/s", "", &DWAPlannerConfig::min_vel_x))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.max_vel_y = -std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.max_vel_y = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.max_vel_y = 0.1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_vel_y", "double", 0, "The maximum y velocity for the robot in m/s", "", &DWAPlannerConfig::max_vel_y))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_vel_y", "double", 0, "The maximum y velocity for the robot in m/s", "", &DWAPlannerConfig::max_vel_y))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.min_vel_y = -std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.min_vel_y = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.min_vel_y = -0.1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("min_vel_y", "double", 0, "The minimum y velocity for the robot in m/s", "", &DWAPlannerConfig::min_vel_y))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("min_vel_y", "double", 0, "The minimum y velocity for the robot in m/s", "", &DWAPlannerConfig::min_vel_y))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.max_rot_vel = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.max_rot_vel = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.max_rot_vel = 1.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_rot_vel", "double", 0, "The absolute value of the maximum rotational velocity for the robot in rad/s", "", &DWAPlannerConfig::max_rot_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_rot_vel", "double", 0, "The absolute value of the maximum rotational velocity for the robot in rad/s", "", &DWAPlannerConfig::max_rot_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.min_rot_vel = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.min_rot_vel = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.min_rot_vel = 0.4; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("min_rot_vel", "double", 0, "The absolute value of the minimum rotational velocity for the robot in rad/s", "", &DWAPlannerConfig::min_rot_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("min_rot_vel", "double", 0, "The absolute value of the minimum rotational velocity for the robot in rad/s", "", &DWAPlannerConfig::min_rot_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.acc_lim_x = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.acc_lim_x = 20.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.acc_lim_x = 2.5; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("acc_lim_x", "double", 0, "The acceleration limit of the robot in the x direction", "", &DWAPlannerConfig::acc_lim_x))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("acc_lim_x", "double", 0, "The acceleration limit of the robot in the x direction", "", &DWAPlannerConfig::acc_lim_x))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.acc_lim_y = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.acc_lim_y = 20.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.acc_lim_y = 2.5; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("acc_lim_y", "double", 0, "The acceleration limit of the robot in the y direction", "", &DWAPlannerConfig::acc_lim_y))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("acc_lim_y", "double", 0, "The acceleration limit of the robot in the y direction", "", &DWAPlannerConfig::acc_lim_y))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.acc_lim_theta = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.acc_lim_theta = 20.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.acc_lim_theta = 3.2; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("acc_lim_theta", "double", 0, "The acceleration limit of the robot in the theta direction", "", &DWAPlannerConfig::acc_lim_theta))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("acc_lim_theta", "double", 0, "The acceleration limit of the robot in the theta direction", "", &DWAPlannerConfig::acc_lim_theta))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.acc_limit_trans = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.acc_limit_trans = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.acc_limit_trans = 0.1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("acc_limit_trans", "double", 0, "The absolute value of the maximum translational acceleration for the robot in m/s^2", "", &DWAPlannerConfig::acc_limit_trans))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("acc_limit_trans", "double", 0, "The absolute value of the maximum translational acceleration for the robot in m/s^2", "", &DWAPlannerConfig::acc_limit_trans))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.prune_plan = 0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.prune_plan = 1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.prune_plan = 0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<bool>("prune_plan", "bool", 0, "Start following closest point of global plan, not first point (if different).", "", &DWAPlannerConfig::prune_plan))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<bool>("prune_plan", "bool", 0, "Start following closest point of global plan, not first point (if different).", "", &DWAPlannerConfig::prune_plan))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.xy_goal_tolerance = -std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.xy_goal_tolerance = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.xy_goal_tolerance = 0.1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("xy_goal_tolerance", "double", 0, "Within what maximum distance we consider the robot to be in goal", "", &DWAPlannerConfig::xy_goal_tolerance))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("xy_goal_tolerance", "double", 0, "Within what maximum distance we consider the robot to be in goal", "", &DWAPlannerConfig::xy_goal_tolerance))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.yaw_goal_tolerance = -std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.yaw_goal_tolerance = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.yaw_goal_tolerance = 0.1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("yaw_goal_tolerance", "double", 0, "Within what maximum angle difference we consider the robot to face goal direction", "", &DWAPlannerConfig::yaw_goal_tolerance))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("yaw_goal_tolerance", "double", 0, "Within what maximum angle difference we consider the robot to face goal direction", "", &DWAPlannerConfig::yaw_goal_tolerance))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.trans_stopped_vel = -std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.trans_stopped_vel = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.trans_stopped_vel = 0.1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("trans_stopped_vel", "double", 0, "Below what maximum velocity we consider the robot to be stopped in translation", "", &DWAPlannerConfig::trans_stopped_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("trans_stopped_vel", "double", 0, "Below what maximum velocity we consider the robot to be stopped in translation", "", &DWAPlannerConfig::trans_stopped_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.rot_stopped_vel = -std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.rot_stopped_vel = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.rot_stopped_vel = 0.1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("rot_stopped_vel", "double", 0, "Below what maximum rotation velocity we consider the robot to be stopped in rotation", "", &DWAPlannerConfig::rot_stopped_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("rot_stopped_vel", "double", 0, "Below what maximum rotation velocity we consider the robot to be stopped in rotation", "", &DWAPlannerConfig::rot_stopped_vel))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.sim_time = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.sim_time = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.sim_time = 1.7; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("sim_time", "double", 0, "The amount of time to roll trajectories out for in seconds", "", &DWAPlannerConfig::sim_time))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("sim_time", "double", 0, "The amount of time to roll trajectories out for in seconds", "", &DWAPlannerConfig::sim_time))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.sim_granularity = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.sim_granularity = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.sim_granularity = 0.025; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("sim_granularity", "double", 0, "The granularity with which to check for collisions along each trajectory in meters", "", &DWAPlannerConfig::sim_granularity))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("sim_granularity", "double", 0, "The granularity with which to check for collisions along each trajectory in meters", "", &DWAPlannerConfig::sim_granularity))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.angular_sim_granularity = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.angular_sim_granularity = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.angular_sim_granularity = 0.1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("angular_sim_granularity", "double", 0, "The granularity with which to check for collisions for rotations in radians", "", &DWAPlannerConfig::angular_sim_granularity))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("angular_sim_granularity", "double", 0, "The granularity with which to check for collisions for rotations in radians", "", &DWAPlannerConfig::angular_sim_granularity))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.path_distance_bias = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.path_distance_bias = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.path_distance_bias = 32.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("path_distance_bias", "double", 0, "The weight for the path distance part of the cost function", "", &DWAPlannerConfig::path_distance_bias))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("path_distance_bias", "double", 0, "The weight for the path distance part of the cost function", "", &DWAPlannerConfig::path_distance_bias))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.goal_distance_bias = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.goal_distance_bias = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.goal_distance_bias = 24.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("goal_distance_bias", "double", 0, "The weight for the goal distance part of the cost function", "", &DWAPlannerConfig::goal_distance_bias))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("goal_distance_bias", "double", 0, "The weight for the goal distance part of the cost function", "", &DWAPlannerConfig::goal_distance_bias))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.occdist_scale = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.occdist_scale = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.occdist_scale = 0.01; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("occdist_scale", "double", 0, "The weight for the obstacle distance part of the cost function", "", &DWAPlannerConfig::occdist_scale))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("occdist_scale", "double", 0, "The weight for the obstacle distance part of the cost function", "", &DWAPlannerConfig::occdist_scale))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.stop_time_buffer = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.stop_time_buffer = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.stop_time_buffer = 0.2; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("stop_time_buffer", "double", 0, "The amount of time that the robot must stop before a collision in order for a trajectory to be considered valid in seconds", "", &DWAPlannerConfig::stop_time_buffer))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("stop_time_buffer", "double", 0, "The amount of time that the robot must stop before a collision in order for a trajectory to be considered valid in seconds", "", &DWAPlannerConfig::stop_time_buffer))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.oscillation_reset_dist = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.oscillation_reset_dist = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.oscillation_reset_dist = 0.05; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("oscillation_reset_dist", "double", 0, "The distance the robot must travel before oscillation flags are reset, in meters", "", &DWAPlannerConfig::oscillation_reset_dist))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("oscillation_reset_dist", "double", 0, "The distance the robot must travel before oscillation flags are reset, in meters", "", &DWAPlannerConfig::oscillation_reset_dist))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.oscillation_reset_angle = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.oscillation_reset_angle = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.oscillation_reset_angle = 0.2; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("oscillation_reset_angle", "double", 0, "The angle the robot must turn before oscillation flags are reset, in radians", "", &DWAPlannerConfig::oscillation_reset_angle))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("oscillation_reset_angle", "double", 0, "The angle the robot must turn before oscillation flags are reset, in radians", "", &DWAPlannerConfig::oscillation_reset_angle))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.forward_point_distance = -std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.forward_point_distance = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.forward_point_distance = 0.325; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("forward_point_distance", "double", 0, "The distance from the center point of the robot to place an additional scoring point, in meters", "", &DWAPlannerConfig::forward_point_distance))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("forward_point_distance", "double", 0, "The distance from the center point of the robot to place an additional scoring point, in meters", "", &DWAPlannerConfig::forward_point_distance))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.scaling_speed = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.scaling_speed = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.scaling_speed = 0.25; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("scaling_speed", "double", 0, "The absolute value of the velocity at which to start scaling the robot's footprint, in m/s", "", &DWAPlannerConfig::scaling_speed))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("scaling_speed", "double", 0, "The absolute value of the velocity at which to start scaling the robot's footprint, in m/s", "", &DWAPlannerConfig::scaling_speed))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.max_scaling_factor = 0.0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.max_scaling_factor = std::numeric_limits<double>::infinity(); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.max_scaling_factor = 0.2; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_scaling_factor", "double", 0, "The maximum factor to scale the robot's footprint by", "", &DWAPlannerConfig::max_scaling_factor))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<double>("max_scaling_factor", "double", 0, "The maximum factor to scale the robot's footprint by", "", &DWAPlannerConfig::max_scaling_factor))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.vx_samples = 1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.vx_samples = 2147483647; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.vx_samples = 3; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<int>("vx_samples", "int", 0, "The number of samples to use when exploring the x velocity space", "", &DWAPlannerConfig::vx_samples))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<int>("vx_samples", "int", 0, "The number of samples to use when exploring the x velocity space", "", &DWAPlannerConfig::vx_samples))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.vy_samples = 1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.vy_samples = 2147483647; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.vy_samples = 10; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<int>("vy_samples", "int", 0, "The number of samples to use when exploring the y velocity space", "", &DWAPlannerConfig::vy_samples))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<int>("vy_samples", "int", 0, "The number of samples to use when exploring the y velocity space", "", &DWAPlannerConfig::vy_samples))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.vth_samples = 1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.vth_samples = 2147483647; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.vth_samples = 20; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<int>("vth_samples", "int", 0, "The number of samples to use when exploring the theta velocity space", "", &DWAPlannerConfig::vth_samples))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<int>("vth_samples", "int", 0, "The number of samples to use when exploring the theta velocity space", "", &DWAPlannerConfig::vth_samples))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.use_dwa = 0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.use_dwa = 1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.use_dwa = 1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<bool>("use_dwa", "bool", 0, "Use dynamic window approach to constrain sampling velocities to small window.", "", &DWAPlannerConfig::use_dwa))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<bool>("use_dwa", "bool", 0, "Use dynamic window approach to constrain sampling velocities to small window.", "", &DWAPlannerConfig::use_dwa))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __min__.restore_defaults = 0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __max__.restore_defaults = 1; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __default__.restore_defaults = 0; //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.abstract_parameters.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<bool>("restore_defaults", "bool", 0, "Restore to the original configuration.", "", &DWAPlannerConfig::restore_defaults))); //#line 262 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __param_descriptions__.push_back(DWAPlannerConfig::AbstractParamDescriptionConstPtr(new DWAPlannerConfig::ParamDescription<bool>("restore_defaults", "bool", 0, "Restore to the original configuration.", "", &DWAPlannerConfig::restore_defaults))); //#line 233 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" Default.convertParams(); //#line 233 "/opt/ros/indigo/lib/python2.7/dist-packages/dynamic_reconfigure/parameter_generator_catkin.py" __group_descriptions__.push_back(DWAPlannerConfig::AbstractGroupDescriptionConstPtr(new DWAPlannerConfig::GroupDescription<DWAPlannerConfig::DEFAULT, DWAPlannerConfig>(Default))); //#line 353 "/opt/ros/indigo/share/dynamic_reconfigure/cmake/../templates/ConfigType.h.template" for (std::vector<DWAPlannerConfig::AbstractGroupDescriptionConstPtr>::const_iterator i = __group_descriptions__.begin(); i != __group_descriptions__.end(); ++i) { __description_message__.groups.push_back(**i); } __max__.__toMessage__(__description_message__.max, __param_descriptions__, __group_descriptions__); __min__.__toMessage__(__description_message__.min, __param_descriptions__, __group_descriptions__); __default__.__toMessage__(__description_message__.dflt, __param_descriptions__, __group_descriptions__); } std::vector<DWAPlannerConfig::AbstractParamDescriptionConstPtr> __param_descriptions__; std::vector<DWAPlannerConfig::AbstractGroupDescriptionConstPtr> __group_descriptions__; DWAPlannerConfig __max__; DWAPlannerConfig __min__; DWAPlannerConfig __default__; dynamic_reconfigure::ConfigDescription __description_message__; static const DWAPlannerConfigStatics *get_instance() { // Split this off in a separate function because I know that // instance will get initialized the first time get_instance is // called, and I am guaranteeing that get_instance gets called at // most once. static DWAPlannerConfigStatics instance; return &instance; } }; inline const dynamic_reconfigure::ConfigDescription &DWAPlannerConfig::__getDescriptionMessage__() { return __get_statics__()->__description_message__; } inline const DWAPlannerConfig &DWAPlannerConfig::__getDefault__() { return __get_statics__()->__default__; } inline const DWAPlannerConfig &DWAPlannerConfig::__getMax__() { return __get_statics__()->__max__; } inline const DWAPlannerConfig &DWAPlannerConfig::__getMin__() { return __get_statics__()->__min__; } inline const std::vector<DWAPlannerConfig::AbstractParamDescriptionConstPtr> &DWAPlannerConfig::__getParamDescriptions__() { return __get_statics__()->__param_descriptions__; } inline const std::vector<DWAPlannerConfig::AbstractGroupDescriptionConstPtr> &DWAPlannerConfig::__getGroupDescriptions__() { return __get_statics__()->__group_descriptions__; } inline const DWAPlannerConfigStatics *DWAPlannerConfig::__get_statics__() { const static DWAPlannerConfigStatics *statics; if (statics) // Common case return statics; boost::mutex::scoped_lock lock(dynamic_reconfigure::__init_mutex__); if (statics) // In case we lost a race. return statics; statics = DWAPlannerConfigStatics::get_instance(); return statics; } } #endif // __DWAPLANNERRECONFIGURATOR_H__
clubcapra/Ibex
install/include/dwa_local_planner/DWAPlannerConfig.h
C
gpl-3.0
68,559
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Version details * * @package block_tag_flickr * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2020110900; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2020110300; // Requires this Moodle version $plugin->component = 'block_tag_flickr'; // Full name of the plugin (used for diagnostics)
iomad/iomad
blocks/tag_flickr/version.php
PHP
gpl-3.0
1,183
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.inputmethod.latin; import android.content.Context; import com.android.inputmethod.keyboard.ProximityInfo; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.makedict.DictEncoder; import com.android.inputmethod.latin.makedict.FormatSpec; import com.android.inputmethod.latin.makedict.FusionDictionary; import com.android.inputmethod.latin.makedict.FusionDictionary.PtNodeArray; import com.android.inputmethod.latin.makedict.FusionDictionary.WeightedString; import com.android.inputmethod.latin.makedict.UnsupportedFormatException; import com.android.inputmethod.latin.utils.CollectionUtils; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; /** * An in memory dictionary for memorizing entries and writing a binary dictionary. */ public class DictionaryWriter extends AbstractDictionaryWriter { private static final int BINARY_DICT_VERSION = 3; private static final FormatSpec.FormatOptions FORMAT_OPTIONS = new FormatSpec.FormatOptions(BINARY_DICT_VERSION, true /* supportsDynamicUpdate */); private FusionDictionary mFusionDictionary; public DictionaryWriter(final Context context, final String dictType) { super(context, dictType); clear(); } @Override public void clear() { final HashMap<String, String> attributes = CollectionUtils.newHashMap(); mFusionDictionary = new FusionDictionary(new PtNodeArray(), new FusionDictionary.DictionaryOptions(attributes, false, false)); } /** * Adds a word unigram to the fusion dictionary. */ // TODO: Create "cache dictionary" to cache fresh words for frequently updated dictionaries, // considering performance regression. @Override public void addUnigramWord(final String word, final String shortcutTarget, final int frequency, final int shortcutFreq, final boolean isNotAWord) { if (shortcutTarget == null) { mFusionDictionary.add(word, frequency, null, isNotAWord); } else { // TODO: Do this in the subclass, with this class taking an arraylist. final ArrayList<WeightedString> shortcutTargets = CollectionUtils.newArrayList(); shortcutTargets.add(new WeightedString(shortcutTarget, shortcutFreq)); mFusionDictionary.add(word, frequency, shortcutTargets, isNotAWord); } } @Override public void addBigramWords(final String word0, final String word1, final int frequency, final boolean isValid, final long lastModifiedTime) { mFusionDictionary.setBigram(word0, word1, frequency); } @Override public void removeBigramWords(final String word0, final String word1) { // This class don't support removing bigram words. } @Override protected void writeDictionary(final DictEncoder dictEncoder, final Map<String, String> attributeMap) throws IOException, UnsupportedFormatException { for (final Map.Entry<String, String> entry : attributeMap.entrySet()) { mFusionDictionary.addOptionAttribute(entry.getKey(), entry.getValue()); } dictEncoder.writeDictionary(mFusionDictionary, FORMAT_OPTIONS); } @Override public ArrayList<SuggestedWordInfo> getSuggestions(final WordComposer composer, final String prevWord, final ProximityInfo proximityInfo, boolean blockOffensiveWords, final int[] additionalFeaturesOptions) { // This class doesn't support suggestion. return null; } @Override public boolean isValidWord(String word) { // This class doesn't support dictionary retrieval. return false; } }
s20121035/rk3288_android5.1_repo
packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/DictionaryWriter.java
Java
gpl-3.0
4,412
/* pybind11/attr.h: Infrastructure for processing custom type and function attributes Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #pragma once #include "cast.h" NAMESPACE_BEGIN(pybind11) /// \addtogroup annotations /// @{ /// Annotation for methods struct is_method { handle class_; is_method(const handle &c) : class_(c) { } }; /// Annotation for operators struct is_operator { }; /// Annotation for parent scope struct scope { handle value; scope(const handle &s) : value(s) { } }; /// Annotation for documentation struct doc { const char *value; doc(const char *value) : value(value) { } }; /// Annotation for function names struct name { const char *value; name(const char *value) : value(value) { } }; /// Annotation indicating that a function is an overload associated with a given "sibling" struct sibling { handle value; sibling(const handle &value) : value(value.ptr()) { } }; /// Annotation indicating that a class derives from another given type template <typename T> struct base { PYBIND11_DEPRECATED("base<T>() was deprecated in favor of specifying 'T' as a template argument to class_") base() { } }; /// Keep patient alive while nurse lives template <size_t Nurse, size_t Patient> struct keep_alive { }; /// Annotation indicating that a class is involved in a multiple inheritance relationship struct multiple_inheritance { }; /// Annotation which enables dynamic attributes, i.e. adds `__dict__` to a class struct dynamic_attr { }; /// Annotation which enables the buffer protocol for a type struct buffer_protocol { }; /// Annotation which requests that a special metaclass is created for a type struct metaclass { handle value; PYBIND11_DEPRECATED("py::metaclass() is no longer required. It's turned on by default now.") metaclass() {} /// Override pybind11's default metaclass explicit metaclass(handle value) : value(value) { } }; /// Annotation to mark enums as an arithmetic type struct arithmetic { }; /** \rst A call policy which places one or more guard variables (``Ts...``) around the function call. For example, this definition: .. code-block:: cpp m.def("foo", foo, py::call_guard<T>()); is equivalent to the following pseudocode: .. code-block:: cpp m.def("foo", [](args...) { T scope_guard; return foo(args...); // forwarded arguments }); \endrst */ template <typename... Ts> struct call_guard; template <> struct call_guard<> { using type = detail::void_type; }; template <typename T> struct call_guard<T> { static_assert(std::is_default_constructible<T>::value, "The guard type must be default constructible"); using type = T; }; template <typename T, typename... Ts> struct call_guard<T, Ts...> { struct type { T guard{}; // Compose multiple guard types with left-to-right default-constructor order typename call_guard<Ts...>::type next{}; }; }; /// @} annotations NAMESPACE_BEGIN(detail) /* Forward declarations */ enum op_id : int; enum op_type : int; struct undefined_t; template <op_id id, op_type ot, typename L = undefined_t, typename R = undefined_t> struct op_; template <typename... Args> struct init; template <typename... Args> struct init_alias; inline void keep_alive_impl(size_t Nurse, size_t Patient, function_call &call, handle ret); /// Internal data structure which holds metadata about a keyword argument struct argument_record { const char *name; ///< Argument name const char *descr; ///< Human-readable version of the argument value handle value; ///< Associated Python object bool convert : 1; ///< True if the argument is allowed to convert when loading bool none : 1; ///< True if None is allowed when loading argument_record(const char *name, const char *descr, handle value, bool convert, bool none) : name(name), descr(descr), value(value), convert(convert), none(none) { } }; /// Internal data structure which holds metadata about a bound function (signature, overloads, etc.) struct function_record { function_record() : is_constructor(false), is_stateless(false), is_operator(false), has_args(false), has_kwargs(false), is_method(false) { } /// Function name char *name = nullptr; /* why no C++ strings? They generate heavier code.. */ // User-specified documentation string char *doc = nullptr; /// Human-readable version of the function signature char *signature = nullptr; /// List of registered keyword arguments std::vector<argument_record> args; /// Pointer to lambda function which converts arguments and performs the actual call handle (*impl) (function_call &) = nullptr; /// Storage for the wrapped function pointer and captured data, if any void *data[3] = { }; /// Pointer to custom destructor for 'data' (if needed) void (*free_data) (function_record *ptr) = nullptr; /// Return value policy associated with this function return_value_policy policy = return_value_policy::automatic; /// True if name == '__init__' bool is_constructor : 1; /// True if this is a stateless function pointer bool is_stateless : 1; /// True if this is an operator (__add__), etc. bool is_operator : 1; /// True if the function has a '*args' argument bool has_args : 1; /// True if the function has a '**kwargs' argument bool has_kwargs : 1; /// True if this is a method bool is_method : 1; /// Number of arguments (including py::args and/or py::kwargs, if present) std::uint16_t nargs; /// Python method object PyMethodDef *def = nullptr; /// Python handle to the parent scope (a class or a module) handle scope; /// Python handle to the sibling function representing an overload chain handle sibling; /// Pointer to next overload function_record *next = nullptr; }; /// Special data structure which (temporarily) holds metadata about a bound class struct type_record { PYBIND11_NOINLINE type_record() : multiple_inheritance(false), dynamic_attr(false), buffer_protocol(false) { } /// Handle to the parent scope handle scope; /// Name of the class const char *name = nullptr; // Pointer to RTTI type_info data structure const std::type_info *type = nullptr; /// How large is the underlying C++ type? size_t type_size = 0; /// How large is the type's holder? size_t holder_size = 0; /// The global operator new can be overridden with a class-specific variant void *(*operator_new)(size_t) = ::operator new; /// Function pointer to class_<..>::init_instance void (*init_instance)(instance *, const void *) = nullptr; /// Function pointer to class_<..>::dealloc void (*dealloc)(const detail::value_and_holder &) = nullptr; /// List of base classes of the newly created type list bases; /// Optional docstring const char *doc = nullptr; /// Custom metaclass (optional) handle metaclass; /// Multiple inheritance marker bool multiple_inheritance : 1; /// Does the class manage a __dict__? bool dynamic_attr : 1; /// Does the class implement the buffer protocol? bool buffer_protocol : 1; /// Is the default (unique_ptr) holder type used? bool default_holder : 1; PYBIND11_NOINLINE void add_base(const std::type_info &base, void *(*caster)(void *)) { auto base_info = detail::get_type_info(base, false); if (!base_info) { std::string tname(base.name()); detail::clean_type_id(tname); pybind11_fail("generic_type: type \"" + std::string(name) + "\" referenced unknown base type \"" + tname + "\""); } if (default_holder != base_info->default_holder) { std::string tname(base.name()); detail::clean_type_id(tname); pybind11_fail("generic_type: type \"" + std::string(name) + "\" " + (default_holder ? "does not have" : "has") + " a non-default holder type while its base \"" + tname + "\" " + (base_info->default_holder ? "does not" : "does")); } bases.append((PyObject *) base_info->type); if (base_info->type->tp_dictoffset != 0) dynamic_attr = true; if (caster) base_info->implicit_casts.emplace_back(type, caster); } }; inline function_call::function_call(function_record &f, handle p) : func(f), parent(p) { args.reserve(f.nargs); args_convert.reserve(f.nargs); } /** * Partial template specializations to process custom attributes provided to * cpp_function_ and class_. These are either used to initialize the respective * fields in the type_record and function_record data structures or executed at * runtime to deal with custom call policies (e.g. keep_alive). */ template <typename T, typename SFINAE = void> struct process_attribute; template <typename T> struct process_attribute_default { /// Default implementation: do nothing static void init(const T &, function_record *) { } static void init(const T &, type_record *) { } static void precall(function_call &) { } static void postcall(function_call &, handle) { } }; /// Process an attribute specifying the function's name template <> struct process_attribute<name> : process_attribute_default<name> { static void init(const name &n, function_record *r) { r->name = const_cast<char *>(n.value); } }; /// Process an attribute specifying the function's docstring template <> struct process_attribute<doc> : process_attribute_default<doc> { static void init(const doc &n, function_record *r) { r->doc = const_cast<char *>(n.value); } }; /// Process an attribute specifying the function's docstring (provided as a C-style string) template <> struct process_attribute<const char *> : process_attribute_default<const char *> { static void init(const char *d, function_record *r) { r->doc = const_cast<char *>(d); } static void init(const char *d, type_record *r) { r->doc = const_cast<char *>(d); } }; template <> struct process_attribute<char *> : process_attribute<const char *> { }; /// Process an attribute indicating the function's return value policy template <> struct process_attribute<return_value_policy> : process_attribute_default<return_value_policy> { static void init(const return_value_policy &p, function_record *r) { r->policy = p; } }; /// Process an attribute which indicates that this is an overloaded function associated with a given sibling template <> struct process_attribute<sibling> : process_attribute_default<sibling> { static void init(const sibling &s, function_record *r) { r->sibling = s.value; } }; /// Process an attribute which indicates that this function is a method template <> struct process_attribute<is_method> : process_attribute_default<is_method> { static void init(const is_method &s, function_record *r) { r->is_method = true; r->scope = s.class_; } }; /// Process an attribute which indicates the parent scope of a method template <> struct process_attribute<scope> : process_attribute_default<scope> { static void init(const scope &s, function_record *r) { r->scope = s.value; } }; /// Process an attribute which indicates that this function is an operator template <> struct process_attribute<is_operator> : process_attribute_default<is_operator> { static void init(const is_operator &, function_record *r) { r->is_operator = true; } }; /// Process a keyword argument attribute (*without* a default value) template <> struct process_attribute<arg> : process_attribute_default<arg> { static void init(const arg &a, function_record *r) { if (r->is_method && r->args.empty()) r->args.emplace_back("self", nullptr, handle(), true /*convert*/, false /*none not allowed*/); r->args.emplace_back(a.name, nullptr, handle(), !a.flag_noconvert, a.flag_none); } }; /// Process a keyword argument attribute (*with* a default value) template <> struct process_attribute<arg_v> : process_attribute_default<arg_v> { static void init(const arg_v &a, function_record *r) { if (r->is_method && r->args.empty()) r->args.emplace_back("self", nullptr /*descr*/, handle() /*parent*/, true /*convert*/, false /*none not allowed*/); if (!a.value) { #if !defined(NDEBUG) std::string descr("'"); if (a.name) descr += std::string(a.name) + ": "; descr += a.type + "'"; if (r->is_method) { if (r->name) descr += " in method '" + (std::string) str(r->scope) + "." + (std::string) r->name + "'"; else descr += " in method of '" + (std::string) str(r->scope) + "'"; } else if (r->name) { descr += " in function '" + (std::string) r->name + "'"; } pybind11_fail("arg(): could not convert default argument " + descr + " into a Python object (type not registered yet?)"); #else pybind11_fail("arg(): could not convert default argument " "into a Python object (type not registered yet?). " "Compile in debug mode for more information."); #endif } r->args.emplace_back(a.name, a.descr, a.value.inc_ref(), !a.flag_noconvert, a.flag_none); } }; /// Process a parent class attribute. Single inheritance only (class_ itself already guarantees that) template <typename T> struct process_attribute<T, enable_if_t<is_pyobject<T>::value>> : process_attribute_default<handle> { static void init(const handle &h, type_record *r) { r->bases.append(h); } }; /// Process a parent class attribute (deprecated, does not support multiple inheritance) template <typename T> struct process_attribute<base<T>> : process_attribute_default<base<T>> { static void init(const base<T> &, type_record *r) { r->add_base(typeid(T), nullptr); } }; /// Process a multiple inheritance attribute template <> struct process_attribute<multiple_inheritance> : process_attribute_default<multiple_inheritance> { static void init(const multiple_inheritance &, type_record *r) { r->multiple_inheritance = true; } }; template <> struct process_attribute<dynamic_attr> : process_attribute_default<dynamic_attr> { static void init(const dynamic_attr &, type_record *r) { r->dynamic_attr = true; } }; template <> struct process_attribute<buffer_protocol> : process_attribute_default<buffer_protocol> { static void init(const buffer_protocol &, type_record *r) { r->buffer_protocol = true; } }; template <> struct process_attribute<metaclass> : process_attribute_default<metaclass> { static void init(const metaclass &m, type_record *r) { r->metaclass = m.value; } }; /// Process an 'arithmetic' attribute for enums (does nothing here) template <> struct process_attribute<arithmetic> : process_attribute_default<arithmetic> {}; template <typename... Ts> struct process_attribute<call_guard<Ts...>> : process_attribute_default<call_guard<Ts...>> { }; /** * Process a keep_alive call policy -- invokes keep_alive_impl during the * pre-call handler if both Nurse, Patient != 0 and use the post-call handler * otherwise */ template <size_t Nurse, size_t Patient> struct process_attribute<keep_alive<Nurse, Patient>> : public process_attribute_default<keep_alive<Nurse, Patient>> { template <size_t N = Nurse, size_t P = Patient, enable_if_t<N != 0 && P != 0, int> = 0> static void precall(function_call &call) { keep_alive_impl(Nurse, Patient, call, handle()); } template <size_t N = Nurse, size_t P = Patient, enable_if_t<N != 0 && P != 0, int> = 0> static void postcall(function_call &, handle) { } template <size_t N = Nurse, size_t P = Patient, enable_if_t<N == 0 || P == 0, int> = 0> static void precall(function_call &) { } template <size_t N = Nurse, size_t P = Patient, enable_if_t<N == 0 || P == 0, int> = 0> static void postcall(function_call &call, handle ret) { keep_alive_impl(Nurse, Patient, call, ret); } }; /// Recursively iterate over variadic template arguments template <typename... Args> struct process_attributes { static void init(const Args&... args, function_record *r) { int unused[] = { 0, (process_attribute<typename std::decay<Args>::type>::init(args, r), 0) ... }; ignore_unused(unused); } static void init(const Args&... args, type_record *r) { int unused[] = { 0, (process_attribute<typename std::decay<Args>::type>::init(args, r), 0) ... }; ignore_unused(unused); } static void precall(function_call &call) { int unused[] = { 0, (process_attribute<typename std::decay<Args>::type>::precall(call), 0) ... }; ignore_unused(unused); } static void postcall(function_call &call, handle fn_ret) { int unused[] = { 0, (process_attribute<typename std::decay<Args>::type>::postcall(call, fn_ret), 0) ... }; ignore_unused(unused); } }; template <typename T> using is_call_guard = is_instantiation<call_guard, T>; /// Extract the ``type`` from the first `call_guard` in `Extras...` (or `void_type` if none found) template <typename... Extra> using extract_guard_t = typename exactly_one_t<is_call_guard, call_guard<>, Extra...>::type; /// Check the number of named arguments at compile time template <typename... Extra, size_t named = constexpr_sum(std::is_base_of<arg, Extra>::value...), size_t self = constexpr_sum(std::is_same<is_method, Extra>::value...)> constexpr bool expected_num_args(size_t nargs, bool has_args, bool has_kwargs) { return named == 0 || (self + named + has_args + has_kwargs) == nargs; } NAMESPACE_END(detail) NAMESPACE_END(pybind11)
argman/EAST
lanms/include/pybind11/attr.h
C
gpl-3.0
18,075
var searchData= [ ['operator_2a',['operator*',['../class_complex.html#a789de21d72aa21414c26e0dd0966313a',1,'Complex']]], ['operator_2b',['operator+',['../class_complex.html#a5a7bc077499ace978055b0e6b9072ee9',1,'Complex']]], ['operator_5e',['operator^',['../class_complex.html#a952d42791b6b729c16406e21f9615f9f',1,'Complex']]] ];
philippeganz/mandelbrot
docs/search/functions_6.js
JavaScript
gpl-3.0
335
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Atto text editor recordrtc version file. * * @package atto_recordrtc * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) * @author Jacob Prud'homme (jacob [dt] prudhomme [at] blindsidenetworks [dt] com) * @copyright 2017 Blindside Networks Inc. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2020061500; $plugin->requires = 2020060900; $plugin->component = 'atto_recordrtc'; $plugin->maturity = MATURITY_STABLE;
stopfstedt/moodle
lib/editor/atto/plugins/recordrtc/version.php
PHP
gpl-3.0
1,229
/* Moonshine - a Lua-based chat client * * Copyright (C) 2010 Dylan William Hardison * * This file is part of Moonshine. * * Moonshine is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Moonshine 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 Moonshine. If not, see <http://www.gnu.org/licenses/>. */ #include <moonshine/async-queue-source.h> #include <glib.h> #include <unistd.h> static guint tag = 0; void my_free_func(gpointer data) { g_print("free: %s\n", ((GString *)data)->str); g_string_free((GString *)data, TRUE); } void my_pool_func(gpointer data, gpointer userdata) { static int count = 1; GAsyncQueue *queue = userdata; GString *name = data; GString *msg = g_string_new(""); g_string_printf(msg, "count: %d", count++); g_print("- %s\n", name->str); g_string_free(name, TRUE); g_print("queue: %s\n", msg->str); g_async_queue_push(queue, msg); } gboolean my_queue_func(gpointer data, gpointer userdata) { GString *msg = data; GString *prefix = userdata; g_print("%s%s\n", prefix->str, msg->str); g_string_free(msg, TRUE); return TRUE; } gboolean my_start_func(gpointer userdata) { GAsyncQueue *queue = g_async_queue_new_full(my_free_func); GThreadPool *pool = g_thread_pool_new(my_pool_func, g_async_queue_ref(queue), 1, TRUE, NULL); tag = ms_async_queue_add_watch(queue, my_queue_func, g_string_new("msg: "), my_free_func); g_async_queue_unref(queue); g_thread_pool_push(pool, g_string_new("foo"), NULL); g_thread_pool_push(pool, g_string_new("bar"), NULL); g_thread_pool_push(pool, g_string_new("baz"), NULL); return FALSE; } gboolean my_beep_func(gpointer userdata) { g_print("beep!\n"); return FALSE; } gboolean my_stop_func(gpointer userdata) { g_print("stopping...\n"); gboolean rv = g_source_remove(tag); g_print("g_source_remove(%d): %s\n", tag, rv ? "TRUE" : "FALSE"); return FALSE; } int main(int argc, char *argv[]) { GMainLoop *loop = g_main_loop_new(NULL, FALSE); g_thread_init(NULL); g_timeout_add(10, my_start_func, NULL); //g_timeout_add(1000, my_beep_func, NULL); //g_timeout_add(5000, my_beep_func, NULL); g_timeout_add(5000, my_stop_func, NULL); g_main_loop_run(loop); return 0; }
bdonlan/moonshine
src/async-queue-test.c
C
gpl-3.0
2,762
/* * linux/kernel/math/div.c * * (C) 1991 Linus Torvalds */ /* * temporary real division routine. */ #include <linux/math_emu.h> static void shift_left(int * c) { __asm__ __volatile__("movl (%0),%%eax ; addl %%eax,(%0)\n\t" "movl 4(%0),%%eax ; adcl %%eax,4(%0)\n\t" "movl 8(%0),%%eax ; adcl %%eax,8(%0)\n\t" "movl 12(%0),%%eax ; adcl %%eax,12(%0)" ::"r" ((long) c):"ax"); } static void shift_right(int * c) { __asm__("shrl $1,12(%0) ; rcrl $1,8(%0) ; rcrl $1,4(%0) ; rcrl $1,(%0)" ::"r" ((long) c)); } static int try_sub(int * a, int * b) { char ok; __asm__ __volatile__("movl (%1),%%eax ; subl %%eax,(%2)\n\t" "movl 4(%1),%%eax ; sbbl %%eax,4(%2)\n\t" "movl 8(%1),%%eax ; sbbl %%eax,8(%2)\n\t" "movl 12(%1),%%eax ; sbbl %%eax,12(%2)\n\t" "setae %%al":"=a" (ok):"c" ((long) a),"d" ((long) b)); return ok; } static void div64(int * a, int * b, int * c) { int tmp[4]; int i; unsigned int mask = 0; c += 4; for (i = 0 ; i<64 ; i++) { if (!(mask >>= 1)) { c--; mask = 0x80000000; } tmp[0] = a[0]; tmp[1] = a[1]; tmp[2] = a[2]; tmp[3] = a[3]; if (try_sub(b,tmp)) { *c |= mask; a[0] = tmp[0]; a[1] = tmp[1]; a[2] = tmp[2]; a[3] = tmp[3]; } shift_right(b); } } void fdiv(const temp_real * src1, const temp_real * src2, temp_real * result) { int i,sign; int a[4],b[4],tmp[4] = {0,0,0,0}; sign = (src1->exponent ^ src2->exponent) & 0x8000; if (!(src2->a || src2->b)) { set_ZE(); return; } i = (src1->exponent & 0x7fff) - (src2->exponent & 0x7fff) + 16383; if (i<0) { set_UE(); result->exponent = sign; result->a = result->b = 0; return; } a[0] = a[1] = 0; a[2] = src1->a; a[3] = src1->b; b[0] = b[1] = 0; b[2] = src2->a; b[3] = src2->b; while (b[3] >= 0) { i++; shift_left(b); } div64(a,b,tmp); if (tmp[0] || tmp[1] || tmp[2] || tmp[3]) { while (i && tmp[3] >= 0) { i--; shift_left(tmp); } if (tmp[3] >= 0) set_DE(); } else i = 0; if (i>0x7fff) { set_OE(); return; } if (tmp[0] || tmp[1]) set_PE(); result->exponent = i | sign; result->a = tmp[2]; result->b = tmp[3]; }
honyyang/Linux-0.12
linux-0.12/kernel/math/div.c
C
gpl-3.0
2,099
<!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"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>ublas: Member List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main&nbsp;Page</span></a></li> <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li> <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>boost::numeric::ublas::vector&lt; T, A &gt; Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>, including all inherited members.<table> <tr bgcolor="#f0f0f0"><td><b>array_type</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a449aa3da7748032b856c4ad74549f14d">assign</a>(const vector_expression&lt; AE &gt; &amp;ae)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a2ece9f4455a3a98e4ab98d131d440f85">assign_temporary</a>(vector &amp;v)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a3737e9b662f9ba10fa87789de4fa37f6">begin</a>() const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a3160d419e77bfd6fe805e4a70cbf882b">begin</a>()</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#aad56668044d71db97be9e44db273f09a">clear</a>()</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>closure_type</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>complexity</b> (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a></td><td><code> [static]</code></td></tr> <tr bgcolor="#f0f0f0"><td><b>const_closure_type</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>const_pointer</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>const_reference</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>const_reverse_iterator</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>container_type</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a941dea529f7d464d5f044657528c4922">data</a>() const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a2fa457a2e17d4a1b56730078a9eed38f">data</a>()</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>difference_type</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a5ca7b44d2563752edcd0cc0ad5f2113c">empty</a>() const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a0bde39bb3dac56f1c0c8cc6e044942ab">end</a>() const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#afdb08490029b3d55cdec200d665bfa04">end</a>()</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#ac3700c206fa1bf8e5205edbb859432c1">erase_element</a>(size_type i)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>expression_type</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__expression.html">boost::numeric::ublas::vector_expression&lt; vector&lt; T, A &gt; &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__expression.html">boost::numeric::ublas::vector_expression&lt; vector&lt; T, A &gt; &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a3be04f746cfe32f0de3aaa2a5273f3a1">find</a>(size_type i) const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#ac7ed001baef390b605d6b932a055e5f3">find</a>(size_type i)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a0ad6b2bb8196fc36e33d3aa47d296500">find_element</a>(size_type i)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a5b1de2ac98f634b04640bcea98fe8298">find_element</a>(size_type i) const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a35b8f3eae165e33d8d4e33f86f40b954">insert_element</a>(size_type i, const_reference t)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a40757a37ac3ad92fc89895a200ac5de3">max_size</a>() const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#ac02f6ccd9710c186f9ae734e6395b742">minus_assign</a>(const vector_expression&lt; AE &gt; &amp;ae)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#aa511fcff4d8dba52bf163fbc9664dfbf">operator()</a>(size_type i) const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a4b53f6b15f6aaa81b059bbdcaaf00fab">operator()</a>(size_type i)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>operator()</b>() const (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>operator()</b>() (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a6cee4bffbd0981075d11f4e7fc5e04d2">operator*=</a>(const AT &amp;at)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a9ec4c7260a33c9ad841339b4f59aa73b">operator+=</a>(const vector_expression&lt; AE &gt; &amp;ae)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a953fa9e2fa2e610674e5f94391f60333">operator+=</a>(const vector_container&lt; C &gt; &amp;v)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a74138b9c59c7dee5d4cfea50359efaa3">operator-=</a>(const vector_expression&lt; AE &gt; &amp;ae)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a04918781e246fb21d1fb0f36948c04fb">operator-=</a>(const vector_container&lt; C &gt; &amp;v)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a6800b804a49a7bd4ce3767d1ea0aafc0">operator/=</a>(const AT &amp;at)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a1724d353e3006619a995342bc6be134e">operator=</a>(const vector &amp;v)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#af778c9aad1d18346fe2ec22642454755">operator=</a>(const vector_container&lt; C &gt; &amp;v)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#af7df90fe154185ba4688750a8acc0c68">operator=</a>(const vector_expression&lt; AE &gt; &amp;ae)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a0cfc171dac4e78549a96c43062a052c6">operator[]</a>(size_type i) const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a10b3c5c3a5042f21a996eeb75c447529">operator[]</a>(size_type i)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#afd874b1ba7fe6a5b961cc3b228cd1208">plus_assign</a>(const vector_expression&lt; AE &gt; &amp;ae)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>pointer</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a1860dd32b80e7418fbf49fe7b99f6012">rbegin</a>() const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a1595a26c1f668988af4a8bbe86ae4ed4">rbegin</a>()</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>reference</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a0098add795c37e4d67f6f98436e1aac8">rend</a>() const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a423d1dc8dbf20b2180093a504dea0ea2">rend</a>()</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a113118def88db3755da6690b6ec903f0">resize</a>(size_type size, bool preserve=true)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>reverse_iterator</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a44062e23411cf30e80dd25d500cdfe2e">serialize</a>(Archive &amp;ar, const unsigned int)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a1b9ef7522219d74ebd27bab25e4b6841">size</a>() const </td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>size_type</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>storage_category</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#aedce8a2ea66b86b1e3efb21bba7be0c5">swap</a>(vector &amp;v)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a7ec2565da7f04f5f8ba42785be772df7">swap</a>(vector &amp;v1, vector &amp;v2)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td><code> [friend]</code></td></tr> <tr bgcolor="#f0f0f0"><td><b>type_category</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector__container.html">boost::numeric::ublas::vector_container&lt; vector&lt; T, A &gt; &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>ublas_expression</b>() (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1ublas__expression.html">boost::numeric::ublas::ublas_expression&lt; vector&lt; T, A &gt; &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1ublas__expression.html">boost::numeric::ublas::ublas_expression&lt; vector&lt; T, A &gt; &gt;</a></td><td><code> [protected]</code></td></tr> <tr bgcolor="#f0f0f0"><td><b>value_type</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a477a17fb1a95d016e4465de7ae9f7bd0">vector</a>()</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#ae75b77993f678047c69b985f8450edc0">vector</a>(size_type size)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td><code> [explicit]</code></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#aa2cdc17765d1689ac52d261dcc123724">vector</a>(size_type size, const array_type &amp;data)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a2c095b29597c40a1695c26486f34edba">vector</a>(const array_type &amp;data)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a812bdffb89c10f69cc9af3963cfb02ea">vector</a>(size_type size, const value_type &amp;init)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a18dae81ff4bcd46986e99f58764e773b">vector</a>(const vector &amp;v)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html#a7b0b649369be331ad80513f220b086dc">vector</a>(const vector_expression&lt; AE &gt; &amp;ae)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>vector_temporary_type</b> typedef (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1vector.html">boost::numeric::ublas::vector&lt; T, A &gt;</a></td><td></td></tr> <tr bgcolor="#f0f0f0"><td><b>~ublas_expression</b>() (defined in <a class="el" href="classboost_1_1numeric_1_1ublas_1_1ublas__expression.html">boost::numeric::ublas::ublas_expression&lt; vector&lt; T, A &gt; &gt;</a>)</td><td><a class="el" href="classboost_1_1numeric_1_1ublas_1_1ublas__expression.html">boost::numeric::ublas::ublas_expression&lt; vector&lt; T, A &gt; &gt;</a></td><td><code> [protected]</code></td></tr> </table></div> <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Jul 4 20:31:07 2010 for ublas by&nbsp; <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>
cppisfun/GameEngine
foreign/boost/libs/numeric/ublas/doc/html/classboost_1_1numeric_1_1ublas_1_1vector-members.html
HTML
gpl-3.0
24,208
#ifndef _UI_UTILS_H #define _UI_UTILS_H namespace QSanUiUtils { // This is in no way a generic diation fuction. It is some dirty trick that // produces a shadow image for a pixmap whose foreground mask is binaryImage QImage produceShadow(const QImage &image, QColor shadowColor, int radius, double decade); void makeGray(QPixmap &pixmap); namespace QSanFreeTypeFont { int *loadFont(const QString &fontPath); QString resolveFont(const QString &fontName); // @param painter // Device to be painted on // @param font // Pointer returned by loadFont used to index a font // @param text // Text to be painted // @param fontSize [IN, OUT] // Suggested width and height of each character in pixels. If the // bounding box cannot contain the text using the suggested font // size, font size may be shrinked. The output value will be the // actual font size used. // @param boundingBox // Text will be painted in the center of the bounding box on the device // @param orient // Suggest whether the text is laid out horizontally or vertically. // @return True if succeed. bool paintQString(QPainter *painter, QString text, int *font, QColor color, QSize &fontSize, int spacing, int weight, QRect boundingBox, Qt::Orientation orient, Qt::Alignment align); // Currently, we online support horizotal layout for multiline text bool paintQStringMultiLine(QPainter *painter, QString text, int *font, QColor color, QSize &fontSize, int spacing, QRect boundingBox, Qt::Alignment align); } } #endif
Xusine1131/QSanguosha-DGAH
src/ui/ui-utils.h
C
gpl-3.0
1,812
# import re, os # from jandy.profiler import Profiler # # # class Base: # def __init__(self): # print('init call') # # def compile(self, str): # re.compile(str) # # # # p = Profiler("12K", "localhost:3000", 1) # try: # p.start() # b = Base() # b.compile("foo|bar") # print("Hello World!!\n") # finally: # p.done() # # # #try: # # b.print_usage() # #except e.MyException as e: # # raise ValueError('failed')
jcooky/jandy
jandy-python/tests/a.py
Python
gpl-3.0
457
# Copyright (C) 1998-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) # any later version. # # GNU Mailman is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # # You should have received a copy of the GNU General Public License along with # GNU Mailman. If not, see <http://www.gnu.org/licenses/>. import sys import time import optparse from email.Charset import Charset from mailman import MailList from mailman import Utils from mailman.app.requests import handle_request from mailman.configuration import config from mailman.core.i18n import _ from mailman.email.message import UserNotification from mailman.initialize import initialize from mailman.interfaces.requests import IListRequests, RequestType from mailman.version import MAILMAN_VERSION # Work around known problems with some RedHat cron daemons import signal signal.signal(signal.SIGCHLD, signal.SIG_DFL) NL = u'\n' now = time.time() def parseargs(): parser = optparse.OptionParser(version=MAILMAN_VERSION, usage=_("""\ %prog [options] Check for pending admin requests and mail the list owners if necessary.""")) parser.add_option('-C', '--config', help=_('Alternative configuration file to use')) opts, args = parser.parse_args() if args: parser.print_help() print(_('Unexpected arguments'), file=sys.stderr) sys.exit(1) return opts, args, parser def pending_requests(mlist): # Must return a byte string lcset = mlist.preferred_language.charset pending = [] first = True requestsdb = IListRequests(mlist) for request in requestsdb.of_type(RequestType.subscription): if first: pending.append(_('Pending subscriptions:')) first = False key, data = requestsdb.get_request(request.id) when = data['when'] addr = data['addr'] fullname = data['fullname'] passwd = data['passwd'] digest = data['digest'] lang = data['lang'] if fullname: if isinstance(fullname, unicode): fullname = fullname.encode(lcset, 'replace') fullname = ' (%s)' % fullname pending.append(' %s%s %s' % (addr, fullname, time.ctime(when))) first = True for request in requestsdb.of_type(RequestType.held_message): if first: pending.append(_('\nPending posts:')) first = False key, data = requestsdb.get_request(request.id) when = data['when'] sender = data['sender'] subject = data['subject'] reason = data['reason'] text = data['text'] msgdata = data['msgdata'] subject = Utils.oneline(subject, lcset) date = time.ctime(when) reason = _(reason) pending.append(_("""\ From: $sender on $date Subject: $subject Cause: $reason""")) pending.append('') # Coerce all items in pending to a Unicode so we can join them upending = [] charset = mlist.preferred_language.charset for s in pending: if isinstance(s, unicode): upending.append(s) else: upending.append(unicode(s, charset, 'replace')) # Make sure that the text we return from here can be encoded to a byte # string in the charset of the list's language. This could fail if for # example, the request was pended while the list's language was French, # but then it was changed to English before checkdbs ran. text = NL.join(upending) charset = Charset(mlist.preferred_language.charset) incodec = charset.input_codec or 'ascii' outcodec = charset.output_codec or 'ascii' if isinstance(text, unicode): return text.encode(outcodec, 'replace') # Be sure this is a byte string encodeable in the list's charset utext = unicode(text, incodec, 'replace') return utext.encode(outcodec, 'replace') def auto_discard(mlist): # Discard old held messages discard_count = 0 expire = config.days(mlist.max_days_to_hold) requestsdb = IListRequests(mlist) heldmsgs = list(requestsdb.of_type(RequestType.held_message)) if expire and heldmsgs: for request in heldmsgs: key, data = requestsdb.get_request(request.id) if now - data['date'] > expire: handle_request(mlist, request.id, config.DISCARD) discard_count += 1 mlist.Save() return discard_count # Figure out epoch seconds of midnight at the start of today (or the given # 3-tuple date of (year, month, day). def midnight(date=None): if date is None: date = time.localtime()[:3] # -1 for dst flag tells the library to figure it out return time.mktime(date + (0,)*5 + (-1,)) def main(): opts, args, parser = parseargs() initialize(opts.config) for name in config.list_manager.names: # The list must be locked in order to open the requests database mlist = MailList.MailList(name) try: count = IListRequests(mlist).count # While we're at it, let's evict yesterday's autoresponse data midnight_today = midnight() evictions = [] for sender in mlist.hold_and_cmd_autoresponses.keys(): date, respcount = mlist.hold_and_cmd_autoresponses[sender] if midnight(date) < midnight_today: evictions.append(sender) if evictions: for sender in evictions: del mlist.hold_and_cmd_autoresponses[sender] # This is the only place we've changed the list's database mlist.Save() if count: # Set the default language the the list's preferred language. _.default = mlist.preferred_language realname = mlist.real_name discarded = auto_discard(mlist) if discarded: count = count - discarded text = _('Notice: $discarded old request(s) ' 'automatically expired.\n\n') else: text = '' if count: text += Utils.maketext( 'checkdbs.txt', {'count' : count, 'mail_host': mlist.mail_host, 'adminDB' : mlist.GetScriptURL('admindb', absolute=1), 'real_name': realname, }, mlist=mlist) text += '\n' + pending_requests(mlist) subject = _('$count $realname moderator ' 'request(s) waiting') else: subject = _('$realname moderator request check result') msg = UserNotification(mlist.GetOwnerEmail(), mlist.GetBouncesEmail(), subject, text, mlist.preferred_language) msg.send(mlist, **{'tomoderators': True}) finally: mlist.Unlock() if __name__ == '__main__': main()
adam-iris/mailman
src/mailman/bin/checkdbs.py
Python
gpl-3.0
7,696
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'InstanceApplication.network' db.add_column('apply_instanceapplication', 'network', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ganeti.Network'], null=True, blank=True), keep_default=False) def backwards(self, orm): # Deleting field 'InstanceApplication.network' db.delete_column('apply_instanceapplication', 'network_id') models = { 'apply.instanceapplication': { 'Meta': {'object_name': 'InstanceApplication'}, 'admin_contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), 'admin_contact_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 'admin_contact_phone': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}), 'applicant': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), 'backend_message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Cluster']", 'null': 'True', 'blank': 'True'}), 'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'cookie': ('django.db.models.fields.CharField', [], {'default': "'AYkWSa4Fr2'", 'max_length': '255'}), 'disk_size': ('django.db.models.fields.IntegerField', [], {}), 'filed': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'hosts_mail_server': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'job_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'last_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'memory': ('django.db.models.fields.IntegerField', [], {}), 'network': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Network']", 'null': 'True', 'blank': 'True'}), 'operating_system': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'organization': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['apply.Organization']"}), 'status': ('django.db.models.fields.IntegerField', [], {}), 'vcpus': ('django.db.models.fields.IntegerField', [], {}) }, 'apply.organization': { 'Meta': {'object_name': 'Organization'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'phone': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), 'website': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) }, 'apply.sshpublickey': { 'Meta': {'object_name': 'SshPublicKey'}, 'comment': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 'fingerprint': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'key': ('django.db.models.fields.TextField', [], {}), 'key_type': ('django.db.models.fields.CharField', [], {'max_length': '12'}), 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) }, 'auth.group': { 'Meta': {'object_name': 'Group'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) }, 'auth.permission': { 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, 'auth.user': { 'Meta': {'object_name': 'User'}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, 'contenttypes.contenttype': { 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) }, 'ganeti.cluster': { 'Meta': {'object_name': 'Cluster'}, 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), 'fast_create': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '128'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}), 'port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '5080'}), 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}), 'username': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}) }, 'ganeti.network': { 'Meta': {'object_name': 'Network'}, 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Cluster']"}), 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'link': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'mode': ('django.db.models.fields.CharField', [], {'max_length': '64'}) } } complete_apps = ['apply']
sunweaver/ganetimgr
apply/migrations/0005_add_application_network_field.py
Python
gpl-3.0
8,911
#pragma once /* * Nanoflann helper classes * Copyright (C) 2019 Wayne Mogg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "nanoflann.h" #include "coord.h" #include "typeset.h" // // TypeSet to nanoflann kd-tree adaptor class // class CoordTypeSetAdaptor { public: CoordTypeSetAdaptor( const TypeSet<Coord>& obj ) : obj_(obj) {} inline size_t kdtree_get_point_count() const { return obj_.size(); } inline Pos::Ordinate_Type kdtree_get_pt(const size_t idx, const size_t dim) const { return dim==0 ? obj_[idx].x : obj_[idx].y; } template <class BBOX> bool kdtree_get_bbox(BBOX& ) const { return false; } const TypeSet<Coord>& obj_; }; typedef nanoflann::KDTreeSingleIndexAdaptor< nanoflann::L2_Simple_Adaptor<Pos::Ordinate_Type, CoordTypeSetAdaptor >, CoordTypeSetAdaptor, 2> CoordKDTree;
waynegm/OpendTect-Plugins
plugins/wm_include/nanoflann_extra.h
C
gpl-3.0
1,498
require 'uuid' class CompassAeInstance < ActiveRecord::Base attr_protected :created_at, :updated_at has_tracked_status has_many :parties, :through => :compass_ae_instance_party_roles has_many :compass_ae_instance_party_roles, :dependent => :destroy do def owners where('role_type_id = ?', RoleType.compass_ae_instance_owner.id) end end validates :guid, :uniqueness => true validates :internal_identifier, :presence => {:message => 'internal_identifier cannot be blank'}, :uniqueness => {:case_sensitive => false} def installed_engines Rails.application.config.erp_base_erp_svcs.compass_ae_engines.map do |compass_ae_engine| klass_name = compass_ae_engine.railtie_name.camelize {:name => klass_name, :version => ("#{klass_name}::VERSION::STRING".constantize rescue 'N/A')} end end #helpers for guid def set_guid(guid) self.guid = guid self.save end def get_guid self.guid end def setup_guid guid = Digest::SHA1.hexdigest(Time.now.to_s + rand(10000).to_s) set_guid(guid) guid end end
xuewenfei/compass_agile_enterprise
erp_base_erp_svcs/app/models/compass_ae_instance.rb
Ruby
gpl-3.0
1,077
<?php /** * LnmsCommand.php * * Convenience class for common command code * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * @package LibreNMS * @link http://librenms.org * @copyright 2019 Tony Murray * @author Tony Murray <murraytony@gmail.com> */ namespace App\Console; use Illuminate\Console\Command; use Illuminate\Validation\ValidationException; use Symfony\Component\Console\Exception\InvalidArgumentException; use Validator; abstract class LnmsCommand extends Command { protected $developer = false; /** * Create a new command instance. * * @return void */ public function __construct() { parent::__construct(); $this->setDescription(__('commands.' . $this->getName() . '.description')); } public function isHidden() { $env = $this->getLaravel() ? $this->getLaravel()->environment() : getenv('APP_ENV'); return $this->hidden || ($this->developer && $env !== 'production'); } /** * Adds an argument. If $description is null, translate commands.command-name.arguments.name * If you want the description to be empty, just set an empty string * * @param string $name The argument name * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL * @param string $description A description text * @param string|string[]|null $default The default value (for InputArgument::OPTIONAL mode only) * * @throws InvalidArgumentException When argument mode is not valid * * @return $this */ public function addArgument($name, $mode = null, $description = null, $default = null) { // use a generated translation location by default if (is_null($description)) { $description = __('commands.' . $this->getName() . '.arguments.' . $name); } parent::addArgument($name, $mode, $description, $default); return $this; } /** * Adds an option. If $description is null, translate commands.command-name.arguments.name * If you want the description to be empty, just set an empty string * * @param string $name The option name * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants * @param string $description A description text * @param string|string[]|int|bool|null $default The default value (must be null for InputOption::VALUE_NONE) * * @throws InvalidArgumentException If option mode is invalid or incompatible * * @return $this */ public function addOption($name, $shortcut = null, $mode = null, $description = null, $default = null) { // use a generated translation location by default if (is_null($description)) { $description = __('commands.' . $this->getName() . '.options.' . $name); } parent::addOption($name, $shortcut, $mode, $description, $default); return $this; } /** * Validate the input of this command. Uses Laravel input validation * merging the arguments and options together to check. * * @param array $rules * @param array $messages */ protected function validate($rules, $messages = []) { $validator = Validator::make($this->arguments() + $this->options(), $rules, $messages); try { $validator->validate(); } catch (ValidationException $e) { collect($validator->getMessageBag()->all())->each(function ($message) { $this->error($message); }); exit(1); } } }
justmedude/librenms
app/Console/LnmsCommand.php
PHP
gpl-3.0
4,534
package com.example.mathsolver; import android.annotation.TargetApi; import android.app.Fragment; import android.os.Build; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @TargetApi(Build.VERSION_CODES.HONEYCOMB) public class AreaFragmentRight extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // TODO Auto-generated method stub return inflater.inflate(R.layout.area_right, container, false); } }
RahulDadoriya/MathSolverApp
src/com/example/mathsolver/AreaFragmentRight.java
Java
gpl-3.0
580
# coding=utf-8 # This file is part of SickChill. # # URL: https://sickchill.github.io # Git: https://github.com/SickChill/SickChill.git # # SickChill is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # SickChill 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 SickChill. If not, see <http://www.gnu.org/licenses/>. """ Test shows """ # pylint: disable=line-too-long from __future__ import print_function, unicode_literals import os import sys import unittest sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../lib'))) sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..'))) import sickbeard import six from sickbeard.common import Quality from sickbeard.tv import TVShow from sickchill.helper.exceptions import MultipleShowObjectsException from sickchill.show.Show import Show class ShowTests(unittest.TestCase): """ Test shows """ def test_find(self): """ Test find tv shows by indexer_id """ sickbeard.QUALITY_DEFAULT = Quality.FULLHDTV sickbeard.showList = [] show123 = TestTVShow(0, 123) show456 = TestTVShow(0, 456) show789 = TestTVShow(0, 789) shows = [show123, show456, show789] shows_duplicate = shows + shows test_cases = { (False, None): None, (False, ''): None, (False, '123'): None, (False, 123): None, (False, 12.3): None, (True, None): None, (True, ''): None, (True, '123'): None, (True, 123): show123, (True, 12.3): None, (True, 456): show456, (True, 789): show789, } unicode_test_cases = { (False, ''): None, (False, '123'): None, (True, ''): None, (True, '123'): None, } for tests in test_cases, unicode_test_cases: for ((use_shows, indexer_id), result) in six.iteritems(tests): if use_shows: self.assertEqual(Show.find(shows, indexer_id), result) else: self.assertEqual(Show.find(None, indexer_id), result) with self.assertRaises(MultipleShowObjectsException): Show.find(shows_duplicate, 456) def test_validate_indexer_id(self): """ Tests if the indexer_id is valid and if so if it returns the right show """ sickbeard.QUALITY_DEFAULT = Quality.FULLHDTV sickbeard.showList = [] show123 = TestTVShow(0, 123) show456 = TestTVShow(0, 456) show789 = TestTVShow(0, 789) sickbeard.showList = [ show123, show456, show789, ] invalid_show_id = ('Invalid show ID', None) indexer_id_list = [ None, '', '', '123', '123', '456', '456', '789', '789', 123, 456, 789, ['123', '456'], ['123', '456'], [123, 456] ] results_list = [ invalid_show_id, invalid_show_id, invalid_show_id, (None, show123), (None, show123), (None, show456), (None, show456), (None, show789), (None, show789), (None, show123), (None, show456), (None, show789), invalid_show_id, invalid_show_id, invalid_show_id ] self.assertEqual( len(indexer_id_list), len(results_list), 'Number of parameters ({0:d}) and results ({1:d}) does not match'.format(len(indexer_id_list), len(results_list)) ) for (index, indexer_id) in enumerate(indexer_id_list): self.assertEqual(Show._validate_indexer_id(indexer_id), results_list[index]) # pylint: disable=protected-access class TestTVShow(TVShow): """ A test `TVShow` object that does not need DB access. """ def __init__(self, indexer, indexer_id): super(TestTVShow, self).__init__(indexer, indexer_id) def loadFromDB(self): """ Override TVShow.loadFromDB to avoid DB access during testing """ pass if __name__ == '__main__': print('=====> Testing {0}'.format(__file__)) SUITE = unittest.TestLoader().loadTestsFromTestCase(ShowTests) unittest.TextTestRunner(verbosity=2).run(SUITE)
dfalt974/SickRage
tests/sickchill_tests/show/show_tests.py
Python
gpl-3.0
4,719
<div class="modal-header"> <button type="button" class="close" ng-click="$dismiss()" aria-hidden="true">&times;</button> <h4 class="modal-title" id="new-file-label">New file...</h4> </div> <form name="newFileForm" novalidate ng-submit="newFile()"> <div class="modal-body" style="font-size: 16px; padding-bottom: 0"> <div ng-class="{'has-error': inputError}" class="form-group"> <div class="row"> <div class="col-xs-4 text-right" style="padding-right: 10px"> <select ng-model="new_file_folder" style="outline: none" class="form-control"> <option>common</option> <option>{{question}}</option> <option>tests</option> </select> </div> <div class="col-xs-8" style="padding-left: 0"> <input type="text" ng-model="new_file_name" name="new_file_name" class="form-control" placeholder="(file name)" focus-me="true" style="outline: none; width: 200px; padding-left: 5px"> <span class="help-block" ng-show="inputError">{{inputError}}</span> </div> </div> <div class="row" id="upload-file-row"> <div class="col-xs-8 col-xs-offset-4 form-group" style="padding-left: 0"> <label for="file-to-upload"> <span class="text-muted">or</span> upload files: </label> <input type="file" name="file-to-upload" multiple id="file-to-upload" class="form-control" filelist-bind="new_file_upload"> <label style="font-size:14px"> <input type="checkbox" name="normalize-newlines" ng-model="normalize" /> Normalize newlines on upload </label> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" ng-click="$dismiss()">Cancel</button> <input type="submit" class="btn btn-primary" value="OK"></input> </div> </form>
b2coutts/seashell
src/frontend/frontend/templates/new-file-template.html
HTML
gpl-3.0
1,968
/* * ============================================================================ * GNU General Public License * ============================================================================ * * Copyright (C) 2015 Infinite Automation Software. All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * When signing a commercial license with Infinite Automation Software, * the following extension to GPL is made. A special exception to the GPL is * included to allow you to distribute a combined work that includes BAcnet4J * without being obliged to provide the source code for any proprietary components. * * See www.infiniteautomation.com for commercial license options. * * @author Matthew Lohbihler */ package com.serotonin.bacnet4j.type.notificationParameters; import com.serotonin.bacnet4j.exception.BACnetException; import com.serotonin.bacnet4j.type.AmbiguousValue; import com.serotonin.bacnet4j.type.Encodable; import com.serotonin.bacnet4j.type.constructed.StatusFlags; import com.serotonin.bacnet4j.util.sero.ByteQueue; public class CommandFailure extends NotificationParameters { private static final long serialVersionUID = 5727410398456093753L; public static final byte TYPE_ID = 3; private final Encodable commandValue; private final StatusFlags statusFlags; private final Encodable feedbackValue; public CommandFailure(Encodable commandValue, StatusFlags statusFlags, Encodable feedbackValue) { this.commandValue = commandValue; this.statusFlags = statusFlags; this.feedbackValue = feedbackValue; } @Override protected void writeImpl(ByteQueue queue) { writeEncodable(queue, commandValue, 0); write(queue, statusFlags, 1); writeEncodable(queue, feedbackValue, 2); } public CommandFailure(ByteQueue queue) throws BACnetException { commandValue = new AmbiguousValue(queue, 0); statusFlags = read(queue, StatusFlags.class, 1); feedbackValue = new AmbiguousValue(queue, 2); } @Override protected int getTypeId() { return TYPE_ID; } public Encodable getCommandValue() { return commandValue; } public StatusFlags getStatusFlags() { return statusFlags; } public Encodable getFeedbackValue() { return feedbackValue; } @Override public int hashCode() { final int PRIME = 31; int result = 1; result = PRIME * result + ((commandValue == null) ? 0 : commandValue.hashCode()); result = PRIME * result + ((feedbackValue == null) ? 0 : feedbackValue.hashCode()); result = PRIME * result + ((statusFlags == null) ? 0 : statusFlags.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final CommandFailure other = (CommandFailure) obj; if (commandValue == null) { if (other.commandValue != null) return false; } else if (!commandValue.equals(other.commandValue)) return false; if (feedbackValue == null) { if (other.feedbackValue != null) return false; } else if (!feedbackValue.equals(other.feedbackValue)) return false; if (statusFlags == null) { if (other.statusFlags != null) return false; } else if (!statusFlags.equals(other.statusFlags)) return false; return true; } }
mlohbihler/BACnet4J
src/main/java/com/serotonin/bacnet4j/type/notificationParameters/CommandFailure.java
Java
gpl-3.0
4,277
/* event-config.h * * This file was generated by cmake when the makefiles were generated. * * DO NOT EDIT THIS FILE. * * Do not rely on macros in this file existing in later versions. */ #ifndef EVENT2_EVENT_CONFIG_H_INCLUDED_ #define EVENT2_EVENT_CONFIG_H_INCLUDED_ /* Numeric representation of the version */ #define EVENT__NUMERIC_VERSION @EVENT_NUMERIC_VERSION@ #define EVENT__PACKAGE_VERSION "@EVENT_PACKAGE_VERSION@" #define EVENT__VERSION_MAJOR @EVENT_VERSION_MAJOR@ #define EVENT__VERSION_MINOR @EVENT_VERSION_MINOR@ #define EVENT__VERSION_PATCH @EVENT_VERSION_PATCH@ /* Version number of package */ #define EVENT__VERSION "@EVENT_VERSION@" /* Name of package */ #define EVENT__PACKAGE "libevent" /* Define to the address where bug reports for this package should be sent. */ #define EVENT__PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define EVENT__PACKAGE_NAME "" /* Define to the full name and version of this package. */ #define EVENT__PACKAGE_STRING "" /* Define to the one symbol short name of this package. */ #define EVENT__PACKAGE_TARNAME "" /* Define if libevent should build without support for a debug mode */ #cmakedefine EVENT__DISABLE_DEBUG_MODE 1 /* Define if libevent should not allow replacing the mm functions */ #cmakedefine EVENT__DISABLE_MM_REPLACEMENT 1 /* Define if libevent should not be compiled with thread support */ #cmakedefine EVENT__DISABLE_THREAD_SUPPORT 1 /* Define to 1 if you have the `accept4' function. */ #cmakedefine EVENT__HAVE_ACCEPT4 1 /* Define to 1 if you have the `arc4random' function. */ #cmakedefine EVENT__HAVE_ARC4RANDOM 1 /* Define to 1 if you have the `arc4random_buf' function. */ #cmakedefine EVENT__HAVE_ARC4RANDOM_BUF 1 /* Define to 1 if you have the `arc4random_addrandom' function. */ #cmakedefine EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1 /* Define if clock_gettime is available in libc */ #cmakedefine EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1 /* Define is no secure id variant is available */ #cmakedefine EVENT__DNS_USE_GETTIMEOFDAY_FOR_ID 1 #cmakedefine EVENT__DNS_USE_FTIME_FOR_ID 1 /* Define to 1 if you have the <arpa/inet.h> header file. */ #cmakedefine EVENT__HAVE_ARPA_INET_H 1 /* Define to 1 if you have the `clock_gettime' function. */ #cmakedefine EVENT__HAVE_CLOCK_GETTIME 1 /* Define to 1 if you have the declaration of `CTL_KERN'. */ #define EVENT__HAVE_DECL_CTL_KERN @EVENT__HAVE_DECL_CTL_KERN@ /* Define to 1 if you have the declaration of `KERN_ARND'. */ #define EVENT__HAVE_DECL_KERN_ARND @EVENT__HAVE_DECL_KERN_ARND@ /* Define to 1 if you have the declaration of `KERN_RANDOM'. */ #define EVENT__HAVE_DECL_KERN_RANDOM @EVENT__HAVE_DECL_KERN_RANDOM@ /* Define to 1 if you have the declaration of `RANDOM_UUID'. */ #define EVENT__HAVE_DECL_RANDOM_UUID @EVENT__HAVE_DECL_RANDOM_UUID@ /* Define if /dev/poll is available */ #cmakedefine EVENT__HAVE_DEVPOLL 1 /* Define to 1 if you have the <netdb.h> header file. */ #cmakedefine EVENT__HAVE_NETDB_H 1 /* Define to 1 if fd_mask type is defined */ #cmakedefine EVENT__HAVE_FD_MASK 1 /* Define to 1 if the <sys/queue.h> header file defines TAILQ_FOREACH. */ #cmakedefine EVENT__HAVE_TAILQFOREACH 1 /* Define to 1 if you have the <dlfcn.h> header file. */ #cmakedefine EVENT__HAVE_DLFCN_H 1 /* Define if your system supports the epoll system calls */ #cmakedefine EVENT__HAVE_EPOLL 1 /* Define to 1 if you have the `epoll_create1' function. */ #cmakedefine EVENT__HAVE_EPOLL_CREATE1 1 /* Define to 1 if you have the `epoll_ctl' function. */ #cmakedefine EVENT__HAVE_EPOLL_CTL 1 /* Define to 1 if you have the `eventfd' function. */ #cmakedefine EVENT__HAVE_EVENTFD 1 /* Define if your system supports event ports */ #cmakedefine EVENT__HAVE_EVENT_PORTS 1 /* Define to 1 if you have the `fcntl' function. */ #cmakedefine EVENT__HAVE_FCNTL 1 /* Define to 1 if you have the <fcntl.h> header file. */ #cmakedefine EVENT__HAVE_FCNTL_H 1 /* Define to 1 if you have the `getaddrinfo' function. */ #cmakedefine EVENT__HAVE_GETADDRINFO 1 /* Define to 1 if you have the `getegid' function. */ #cmakedefine EVENT__HAVE_GETEGID 1 /* Define to 1 if you have the `geteuid' function. */ #cmakedefine EVENT__HAVE_GETEUID 1 /* TODO: Check for different gethostname argument counts. CheckPrototypeDefinition.cmake can be used. */ /* Define this if you have any gethostbyname_r() */ #cmakedefine EVENT__HAVE_GETHOSTBYNAME_R 1 /* Define this if gethostbyname_r takes 3 arguments */ #cmakedefine EVENT__HAVE_GETHOSTBYNAME_R_3_ARG 1 /* Define this if gethostbyname_r takes 5 arguments */ #cmakedefine EVENT__HAVE_GETHOSTBYNAME_R_5_ARG 1 /* Define this if gethostbyname_r takes 6 arguments */ #cmakedefine EVENT__HAVE_GETHOSTBYNAME_R_6_ARG 1 /* Define to 1 if you have the `getifaddrs' function. */ #cmakedefine EVENT__HAVE_GETIFADDRS 1 /* Define to 1 if you have the `getnameinfo' function. */ #cmakedefine EVENT__HAVE_GETNAMEINFO 1 /* Define to 1 if you have the `getprotobynumber' function. */ #cmakedefine EVENT__HAVE_GETPROTOBYNUMBER 1 /* Define to 1 if you have the `getservbyname' function. */ #cmakedefine EVENT__HAVE_GETSERVBYNAME 1 /* Define to 1 if you have the `gettimeofday' function. */ #cmakedefine EVENT__HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the <ifaddrs.h> header file. */ #cmakedefine EVENT__HAVE_IFADDRS_H 1 /* Define to 1 if you have the `inet_ntop' function. */ #cmakedefine EVENT__HAVE_INET_NTOP 1 /* Define to 1 if you have the `inet_pton' function. */ #cmakedefine EVENT__HAVE_INET_PTON 1 /* Define to 1 if you have the <inttypes.h> header file. */ #cmakedefine EVENT__HAVE_INTTYPES_H 1 /* Define to 1 if you have the `issetugid' function. */ #cmakedefine EVENT__HAVE_ISSETUGID 1 /* Define to 1 if you have the `kqueue' function. */ #cmakedefine EVENT__HAVE_KQUEUE 1 /* Define if the system has zlib */ #cmakedefine EVENT__HAVE_LIBZ 1 /* Define to 1 if you have the `mach_absolute_time' function. */ #cmakedefine EVENT__HAVE_MACH_ABSOLUTE_TIME 1 /* Define to 1 if you have the <mach/mach_time.h> header file. */ #cmakedefine EVENT__HAVE_MACH_MACH_TIME_H 1 /* Define to 1 if you have the <memory.h> header file. */ #cmakedefine EVENT__HAVE_MEMORY_H 1 /* Define to 1 if you have the `mmap' function. */ #cmakedefine EVENT__HAVE_MMAP 1 /* Define to 1 if you have the `nanosleep' function. */ #cmakedefine EVENT__HAVE_NANOSLEEP 1 /* Define to 1 if you have the `usleep' function. */ #cmakedefine EVENT__HAVE_USLEEP 1 /* Define to 1 if you have the <netinet/in6.h> header file. */ #cmakedefine EVENT__HAVE_NETINET_IN6_H 1 /* Define to 1 if you have the <netinet/in.h> header file. */ #cmakedefine EVENT__HAVE_NETINET_IN_H 1 /* Define to 1 if you have the <netinet/tcp.h> header file. */ #cmakedefine EVENT__HAVE_NETINET_TCP_H 1 /* Define if the system has openssl */ #cmakedefine EVENT__HAVE_OPENSSL 1 /* Define to 1 if you have the `pipe' function. */ #cmakedefine EVENT__HAVE_PIPE 1 /* Define to 1 if you have the `pipe2' function. */ #cmakedefine EVENT__HAVE_PIPE2 1 /* Define to 1 if you have the `poll' function. */ #cmakedefine EVENT__HAVE_POLL 1 /* Define to 1 if you have the <poll.h> header file. */ #cmakedefine EVENT__HAVE_POLL_H 1 /* Define to 1 if you have the `port_create' function. */ #cmakedefine EVENT__HAVE_PORT_CREATE 1 /* Define to 1 if you have the <port.h> header file. */ #cmakedefine EVENT__HAVE_PORT_H 1 /* Define if we have pthreads on this system */ #cmakedefine EVENT__HAVE_PTHREADS 1 /* Define to 1 if you have the `putenv' function. */ #cmakedefine EVENT__HAVE_PUTENV 1 /* Define to 1 if the system has the type `sa_family_t'. */ #cmakedefine EVENT__HAVE_SA_FAMILY_T 1 /* Define to 1 if you have the `select' function. */ #cmakedefine EVENT__HAVE_SELECT 1 /* Define to 1 if you have the `setenv' function. */ #cmakedefine EVENT__HAVE_SETENV 1 /* Define if F_SETFD is defined in <fcntl.h> */ #cmakedefine EVENT__HAVE_SETFD 1 /* Define to 1 if you have the `setrlimit' function. */ #cmakedefine EVENT__HAVE_SETRLIMIT 1 /* Define to 1 if you have the `sendfile' function. */ #cmakedefine EVENT__HAVE_SENDFILE 1 /* Define to 1 if you have the `sigaction' function. */ #cmakedefine EVENT__HAVE_SIGACTION 1 /* Define to 1 if you have the `signal' function. */ #cmakedefine EVENT__HAVE_SIGNAL 1 /* Define to 1 if you have the `splice' function. */ #cmakedefine EVENT__HAVE_SPLICE 1 /* Define to 1 if you have the <stdarg.h> header file. */ #cmakedefine EVENT__HAVE_STDARG_H 1 /* Define to 1 if you have the <stddef.h> header file. */ #cmakedefine EVENT__HAVE_STDDEF_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #cmakedefine EVENT__HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #cmakedefine EVENT__HAVE_STDLIB_H 1 /* Define to 1 if you have the <strings.h> header file. */ #cmakedefine EVENT__HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #cmakedefine EVENT__HAVE_STRING_H 1 /* Define to 1 if you have the `strlcpy' function. */ #cmakedefine EVENT__HAVE_STRLCPY 1 /* Define to 1 if you have the `strsep' function. */ #cmakedefine EVENT__HAVE_STRSEP 1 /* Define to 1 if you have the `strtok_r' function. */ #cmakedefine EVENT__HAVE_STRTOK_R 1 /* Define to 1 if you have the `strtoll' function. */ #cmakedefine EVENT__HAVE_STRTOLL 1 /* Define to 1 if the system has the type `struct addrinfo'. */ #cmakedefine EVENT__HAVE_STRUCT_ADDRINFO 1 /* Define to 1 if the system has the type `struct in6_addr'. */ #cmakedefine EVENT__HAVE_STRUCT_IN6_ADDR 1 /* Define to 1 if `s6_addr16' is member of `struct in6_addr'. */ #cmakedefine EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1 /* Define to 1 if `s6_addr32' is member of `struct in6_addr'. */ #cmakedefine EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1 /* Define to 1 if the system has the type `struct sockaddr_in6'. */ #cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_IN6 1 /* Define to 1 if `sin6_len' is member of `struct sockaddr_in6'. */ #cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1 /* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */ #cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1 /* Define to 1 if the system has the type `struct sockaddr_storage'. */ #cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1 /* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ #cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 /* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */ #cmakedefine EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1 /* Define to 1 if the system has the type `struct linger'. */ #cmakedefine EVENT__HAVE_STRUCT_LINGER 1 /* Define to 1 if you have the `sysctl' function. */ #cmakedefine EVENT__HAVE_SYSCTL 1 /* Define to 1 if you have the <sys/devpoll.h> header file. */ #cmakedefine EVENT__HAVE_SYS_DEVPOLL_H 1 /* Define to 1 if you have the <sys/epoll.h> header file. */ #cmakedefine EVENT__HAVE_SYS_EPOLL_H 1 /* Define to 1 if you have the <sys/eventfd.h> header file. */ #cmakedefine EVENT__HAVE_SYS_EVENTFD_H 1 /* Define to 1 if you have the <sys/event.h> header file. */ #cmakedefine EVENT__HAVE_SYS_EVENT_H 1 /* Define to 1 if you have the <sys/ioctl.h> header file. */ #cmakedefine EVENT__HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the <sys/mman.h> header file. */ #cmakedefine EVENT__HAVE_SYS_MMAN_H 1 /* Define to 1 if you have the <sys/param.h> header file. */ #cmakedefine EVENT__HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the <sys/queue.h> header file. */ #cmakedefine EVENT__HAVE_SYS_QUEUE_H 1 /* Define to 1 if you have the <sys/resource.h> header file. */ #cmakedefine EVENT__HAVE_SYS_RESOURCE_H 1 /* Define to 1 if you have the <sys/select.h> header file. */ #cmakedefine EVENT__HAVE_SYS_SELECT_H 1 /* Define to 1 if you have the <sys/sendfile.h> header file. */ #cmakedefine EVENT__HAVE_SYS_SENDFILE_H 1 /* Define to 1 if you have the <sys/socket.h> header file. */ #cmakedefine EVENT__HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #cmakedefine EVENT__HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/sysctl.h> header file. */ #cmakedefine EVENT__HAVE_SYS_SYSCTL_H 1 /* Define to 1 if you have the <sys/timerfd.h> header file. */ #cmakedefine EVENT__HAVE_SYS_TIMERFD_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ #cmakedefine EVENT__HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #cmakedefine EVENT__HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/uio.h> header file. */ #cmakedefine EVENT__HAVE_SYS_UIO_H 1 /* Define to 1 if you have the <sys/wait.h> header file. */ #cmakedefine EVENT__HAVE_SYS_WAIT_H 1 /* Define to 1 if you have the <errno.h> header file. */ #cmakedefine EVENT__HAVE_ERRNO_H 1 /* Define if TAILQ_FOREACH is defined in <sys/queue.h> */ #cmakedefine EVENT__HAVE_TAILQFOREACH 1 /* Define if timeradd is defined in <sys/time.h> */ #cmakedefine EVENT__HAVE_TIMERADD 1 /* Define if timerclear is defined in <sys/time.h> */ #cmakedefine EVENT__HAVE_TIMERCLEAR 1 /* Define if timercmp is defined in <sys/time.h> */ #cmakedefine EVENT__HAVE_TIMERCMP 1 /* Define to 1 if you have the `timerfd_create' function. */ #cmakedefine EVENT__HAVE_TIMERFD_CREATE 1 /* Define if timerisset is defined in <sys/time.h> */ #cmakedefine EVENT__HAVE_TIMERISSET 1 /* Define to 1 if the system has the type `uint8_t'. */ #cmakedefine EVENT__HAVE_UINT8_T 1 /* Define to 1 if the system has the type `uint16_t'. */ #cmakedefine EVENT__HAVE_UINT16_T 1 /* Define to 1 if the system has the type `uint32_t'. */ #cmakedefine EVENT__HAVE_UINT32_T 1 /* Define to 1 if the system has the type `uint64_t'. */ #cmakedefine EVENT__HAVE_UINT64_T 1 /* Define to 1 if the system has the type `uintptr_t'. */ #cmakedefine EVENT__HAVE_UINTPTR_T 1 /* Define to 1 if you have the `umask' function. */ #cmakedefine EVENT__HAVE_UMASK 1 /* Define to 1 if you have the <unistd.h> header file. */ #cmakedefine EVENT__HAVE_UNISTD_H 1 /* Define to 1 if you have the `unsetenv' function. */ #cmakedefine EVENT__HAVE_UNSETENV 1 /* Define to 1 if you have the `vasprintf' function. */ #cmakedefine EVENT__HAVE_VASPRINTF 1 /* Define if kqueue works correctly with pipes */ #cmakedefine EVENT__HAVE_WORKING_KQUEUE 1 #ifdef __USE_UNUSED_DEFINITIONS__ /* Define to necessary symbol if this constant uses a non-standard name on your system. */ /* XXX: Hello, this isn't even used, nor is it defined anywhere... - Ellzey */ #define EVENT__PTHREAD_CREATE_JOINABLE ${EVENT__PTHREAD_CREATE_JOINABLE} #endif /* The size of `pthread_t', as computed by sizeof. */ #define EVENT__SIZEOF_PTHREAD_T @EVENT__SIZEOF_PTHREAD_T@ /* The size of a `int', as computed by sizeof. */ #define EVENT__SIZEOF_INT @EVENT__SIZEOF_INT@ /* The size of a `long', as computed by sizeof. */ #define EVENT__SIZEOF_LONG @EVENT__SIZEOF_LONG@ /* The size of a `long long', as computed by sizeof. */ #define EVENT__SIZEOF_LONG_LONG @EVENT__SIZEOF_LONG_LONG@ /* The size of `off_t', as computed by sizeof. */ #define EVENT__SIZEOF_OFF_T @EVENT__SIZEOF_OFF_T@ #define EVENT__SIZEOF_SSIZE_T @EVENT__SIZEOF_SSIZE_T@ /* The size of a `short', as computed by sizeof. */ #define EVENT__SIZEOF_SHORT @EVENT__SIZEOF_SHORT@ /* The size of `size_t', as computed by sizeof. */ #define EVENT__SIZEOF_SIZE_T @EVENT__SIZEOF_SIZE_T@ /* Define to 1 if you have the ANSI C header files. */ #cmakedefine EVENT__STDC_HEADERS 1 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #cmakedefine EVENT__TIME_WITH_SYS_TIME 1 /* The size of `socklen_t', as computed by sizeof. */ #define EVENT__SIZEOF_SOCKLEN_T @EVENT__SIZEOF_SOCKLEN_T@ /* The size of 'void *', as computer by sizeof */ #define EVENT__SIZEOF_VOID_P @EVENT__SIZEOF_VOID_P@ /* set an alias for whatever __func__ __FUNCTION__ is, what sillyness */ #if defined (__func__) #define EVENT____func__ __func__ #elif defined(__FUNCTION__) #define EVENT____func__ __FUNCTION__ #else #define EVENT____func__ __FILE__ #endif /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* why not c++? * * and are we really expected to use EVENT__inline everywhere, * shouldn't we just do: * ifdef EVENT__inline * define inline EVENT__inline * * - Ellzey */ #define EVENT__inline @EVENT__inline@ #endif /* Define to `int' if <sys/tyes.h> does not define. */ #define EVENT__pid_t @EVENT__pid_t@ /* Define to `unsigned' if <sys/types.h> does not define. */ #define EVENT__size_t @EVENT__size_t@ /* Define to unsigned int if you dont have it */ #define EVENT__socklen_t @EVENT__socklen_t@ /* Define to `int' if <sys/types.h> does not define. */ #define EVENT__ssize_t @EVENT__ssize_t@ #endif /* \EVENT2_EVENT_CONFIG_H_INCLUDED_ */
sigecoin/sigecoin
libevent/event-config.h.cmake
CMake
gpl-3.0
16,785
<?php /** * Kodekit - http://timble.net/kodekit * * @copyright Copyright (C) 2007 - 2016 Johan Janssens and Timble CVBA. (http://www.timble.net) * @license MPL v2.0 <https://www.mozilla.org/en-US/MPL/2.0> * @link https://github.com/timble/kodekit for the canonical source repository */ namespace Kodekit\Library; /** * Controller Permission Interface * * @author Johan Janssens <https://github.com/johanjanssens> * @package Kodekit\Library\Controller\Permission */ interface ControllerPermissionInterface { /** * Permission handler for render actions * * @return boolean Return TRUE if action is permitted. FALSE otherwise. */ public function canRender(); /** * Permission handler for read actions * * Method should return FALSE if the controller does not implements the ControllerModellable interface. * * @return boolean Return TRUE if action is permitted. FALSE otherwise. */ public function canRead(); /** * Permission handler for browse actions * * Method should return FALSE if the controller does not implements the ControllerModellable interface. * * @return boolean Return TRUE if action is permitted. FALSE otherwise. */ public function canBrowse(); /** * Permission handler for add actions * * Method should return FALSE if the controller does not implements the ControllerModellable interface. * * @return boolean Return TRUE if action is permitted. FALSE otherwise. */ public function canAdd(); /** * Permission handler for edit actions * * Method should return FALSE if the controller does not implements the ControllerModellable interface. * * @return boolean Return TRUE if action is permitted. FALSE otherwise. */ public function canEdit(); /** * Permission handler for delete actions * * Method should return FALSE if the controller does not implements the ControllerModellable interface. * * @return boolean Returns TRUE if action is permitted. FALSE otherwise. */ public function canDelete(); }
nooku/nooku-framework
code/controller/permission/interface.php
PHP
gpl-3.0
2,175
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} module CO4.Example.Fib where import Language.Haskell.TH (runIO) import qualified Satchmo.Core.SAT.Minisat import qualified Satchmo.Core.Decode import CO4 import CO4.Prelude hiding (nat,uNat,Nat) $( [d| data Nat = Z | S Nat deriving Show constraint p n = eq p (fib n) fib x = case x of Z -> Z S x' -> case x' of Z -> S Z S x'' -> let f1 = fib x' f2 = fib x'' in add f1 f2 eq x y = case x of Z -> case y of Z -> True _ -> False S x' -> case y of Z -> False S y' -> eq x' y' add x y = case x of Z -> y S x' -> S (add x' y) |] >>= compile [ImportPrelude,Cache] ) uNat 0 = knownZ uNat i = union knownZ $ knownS $ uNat $ i - 1 allocator = uNat 4 nat 0 = Z nat i = S $ nat $ i - 1 result p = solveAndTestP (nat p) allocator encConstraint constraint
apunktbau/co4
test/CO4/Example/Fib.hs
Haskell
gpl-3.0
1,177
// Font.cpp: ActionScript Font handling, for Gnash. // // Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software // Foundation, Inc // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // Based on the public domain work of Thatcher Ulrich <tu@tulrich.com> 2003 #include "smart_ptr.h" // GNASH_USE_GC #include "Font.h" #include "log.h" #include "ShapeRecord.h" #include "DefineFontTag.h" #include "FreetypeGlyphsProvider.h" #include <utility> // for std::make_pair #include <memory> namespace gnash { namespace { /// Reverse lookup of Glyph in CodeTable. // /// Inefficient, which is probably why TextSnapshot was designed like it /// is. class CodeLookup { public: CodeLookup(const int glyph) : _glyph(glyph) {} bool operator()(const std::pair<const boost::uint16_t, int>& p) { return p.second == _glyph; } private: int _glyph; }; } Font::GlyphInfo::GlyphInfo() : advance(0) {} Font::GlyphInfo::GlyphInfo(std::auto_ptr<SWF::ShapeRecord> glyph, float advance) : glyph(glyph.release()), advance(advance) {} Font::GlyphInfo::GlyphInfo(const GlyphInfo& o) : glyph(o.glyph), advance(o.advance) {} Font::Font(std::auto_ptr<SWF::DefineFontTag> ft) : _fontTag(ft.release()), _name(_fontTag->name()), _unicodeChars(_fontTag->unicodeChars()), _shiftJISChars(_fontTag->shiftJISChars()), _ansiChars(_fontTag->ansiChars()), _italic(_fontTag->italic()), _bold(_fontTag->bold()) { if (_fontTag->hasCodeTable()) _embeddedCodeTable = _fontTag->getCodeTable(); } Font::Font(const std::string& name, bool bold, bool italic) : _fontTag(0), _name(name), _unicodeChars(false), _shiftJISChars(false), _ansiChars(true), _italic(italic), _bold(bold) { assert(!_name.empty()); } Font::~Font() { } SWF::ShapeRecord* Font::get_glyph(int index, bool embedded) const { // What to do if embedded is true and this is a // device-only font? const GlyphInfoRecords& lookup = (embedded && _fontTag) ? _fontTag->glyphTable() : _deviceGlyphTable; if (index >= 0 && (size_t)index < lookup.size()) { return lookup[index].glyph.get(); } // TODO: should we log an error here ? return 0; } void Font::addFontNameInfo(const FontNameInfo& fontName) { if (!_displayName.empty() || !_copyrightName.empty()) { IF_VERBOSE_MALFORMED_SWF( log_swferror(_("Attempt to set font display or copyright name " "again. This should mean there is more than one " "DefineFontName tag referring to the same Font. Don't " "know what to do in this case, so ignoring.")); ); return; } _displayName = fontName.displayName; _copyrightName = fontName.copyrightName; } Font::GlyphInfoRecords::size_type Font::glyphCount() const { assert(_fontTag); return _fontTag->glyphTable().size(); } void Font::setFlags(boost::uint8_t flags) { _shiftJISChars = flags & (1 << 6); _unicodeChars = flags & (1 << 5); _ansiChars = flags & (1 << 4); _italic = flags & (1 << 1); _bold = flags & (1 << 0); } void Font::setCodeTable(std::auto_ptr<CodeTable> table) { if (_embeddedCodeTable) { IF_VERBOSE_MALFORMED_SWF( log_swferror(_("Attempt to add an embedded glyph CodeTable to " "a font that already has one. This should mean there " "are several DefineFontInfo tags, or a DefineFontInfo " "tag refers to a font created by DefineFone2 or " "DefineFont3. Don't know what should happen in this " "case, so ignoring.")); ); return; } _embeddedCodeTable.reset(table.release()); } void Font::setName(const std::string& name) { _name = name; } boost::uint16_t Font::codeTableLookup(int glyph, bool embedded) const { const CodeTable& ctable = (embedded && _embeddedCodeTable) ? *_embeddedCodeTable : _deviceCodeTable; CodeTable::const_iterator it = std::find_if(ctable.begin(), ctable.end(), CodeLookup(glyph)); assert (it != ctable.end()); return it->first; } int Font::get_glyph_index(boost::uint16_t code, bool embedded) const { const CodeTable& ctable = (embedded && _embeddedCodeTable) ? *_embeddedCodeTable : _deviceCodeTable; int glyph_index = -1; CodeTable::const_iterator it = ctable.find(code); if (it != ctable.end()) { glyph_index = it->second; return glyph_index; } // Try adding an os font, if possible if (!embedded) { glyph_index = const_cast<Font*>(this)->add_os_glyph(code); } return glyph_index; } float Font::get_advance(int glyph_index, bool embedded) const { // What to do if embedded is true and this is a // device-only font? const GlyphInfoRecords& lookup = (embedded && _fontTag) ? _fontTag->glyphTable() : _deviceGlyphTable; if (glyph_index < 0) { // Default advance. return 512.0f; } assert(static_cast<size_t>(glyph_index) < lookup.size()); assert(glyph_index >= 0); return lookup[glyph_index].advance; } // Return the adjustment in advance between the given two // DisplayObjects. Normally this will be 0; i.e. the float Font::get_kerning_adjustment(int last_code, int code) const { kerning_pair k; k.m_char0 = last_code; k.m_char1 = code; kernings_table::const_iterator it = m_kerning_pairs.find(k); if (it != m_kerning_pairs.end()) { float adjustment = it->second; return adjustment; } return 0; } size_t Font::unitsPerEM(bool embed) const { // the EM square is 1024 x 1024 for DefineFont up to 2 // and 20 as much for DefineFont3 up if (embed) { if ( _fontTag && _fontTag->subpixelFont() ) return 1024 * 20.0; else return 1024; } FreetypeGlyphsProvider* ft = ftProvider(); if (!ft) { log_error("Device font provider was not initialized, " "can't get unitsPerEM"); return 0; } return ft->unitsPerEM(); } int Font::add_os_glyph(boost::uint16_t code) { FreetypeGlyphsProvider* ft = ftProvider(); if (!ft) return -1; assert(_deviceCodeTable.find(code) == _deviceCodeTable.end()); float advance; // Get the vectorial glyph std::auto_ptr<SWF::ShapeRecord> sh = ft->getGlyph(code, advance); if (!sh.get()) { log_error("Could not create shape " "glyph for DisplayObject code %u (%c) with " "device font %s (%p)", code, code, _name, ft); return -1; } // Find new glyph offset int newOffset = _deviceGlyphTable.size(); // Add the new glyph id _deviceCodeTable[code] = newOffset; _deviceGlyphTable.push_back(GlyphInfo(sh, advance)); return newOffset; } bool Font::matches(const std::string& name, bool bold, bool italic) const { return (_bold == bold && _italic == italic && name ==_name); } float Font::leading() const { return _fontTag ? _fontTag->leading() : 0.0f; } FreetypeGlyphsProvider* Font::ftProvider() const { if (_ftProvider.get()) return _ftProvider.get(); if (_name.empty()) { log_error("No name associated with this font, can't use device " "fonts (should I use a default one?)"); return 0; } _ftProvider = FreetypeGlyphsProvider::createFace(_name, _bold, _italic); if (!_ftProvider.get()) { log_error("Could not create a freetype face %s", _name); return 0; } return _ftProvider.get(); } float Font::ascent(bool embedded) const { if (embedded && _fontTag) return _fontTag->ascent(); FreetypeGlyphsProvider* ft = ftProvider(); if (ft) return ft->ascent(); return 0; } float Font::descent(bool embedded) const { if (embedded && _fontTag) return _fontTag->descent(); FreetypeGlyphsProvider* ft = ftProvider(); if (ft) return ft->descent(); return 0; } bool Font::is_subpixel_font() const { return _fontTag ? _fontTag->subpixelFont() : false; } } // namespace gnash // Local Variables: // mode: C++ // indent-tabs-mode: t // End:
atheerabed/gnash-fork
libcore/Font.cpp
C++
gpl-3.0
8,960
.container { margin:10px; }
OpenCaseWork/ui
src/app/areas/dashboard/home/home.component.css
CSS
gpl-3.0
29
<?php /* ########################################################################## # # # Version 4 / / / # # -----------__---/__---__------__----__---/---/- # # | /| / /___) / ) (_ ` / ) /___) / / # # _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___ # # Free Content / Management System # # / # # # # # # Copyright 2005-2015 by webspell.org # # # # visit webSPELL.org, webspell.info to get webSPELL for free # # - Script runs under the GNU GENERAL PUBLIC LICENSE # # - It's NOT allowed to remove this copyright-tag # # -- http://www.fsf.org/licensing/licenses/gpl.html # # # # Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at), # # Far Development by Development Team - webspell.org # # # # visit webspell.org # # # ########################################################################## */ $language_array = Array( /* do not edit above this line */ 'access_denied'=>'Приступ одбијен', 'activated'=>'активиран', 'additional_options'=>'Додатне опције', 'admin_email'=>'Администратор Е-маил', 'admin_name'=>'Админ име', 'allow_usergalleries'=>'дозволи кориснику галерије', 'archive'=>'Архива', 'articles'=>'Чланци', 'autoresize'=>'Функција за промену величине слике', 'autoresize_js'=>'на основу Јавасцрипт', 'autoresize_off'=>'деактивиран', 'autoresize_php'=>'по ПХП', 'awards'=>'Награде', 'captcha'=>'Цаптцха', 'captcha_autodetect'=>'Аутоматско', 'captcha_bgcol'=>'Боја позадине', 'captcha_both'=>'оба', 'captcha_fontcol'=>'Боја фонта', 'captcha_image'=>'слика', 'captcha_linenoise'=>'сметње на линији', 'captcha_noise'=>'бука', 'captcha_only_math'=>'само математика', 'captcha_only_text'=>'само текст', 'captcha_text'=>'текст', 'captcha_type'=>'Тип Цаптцха', 'captcha_style'=>'Цаптцха стил', 'clan_name'=>'Име клана', 'clan_tag'=>'Клан ознака', 'clanwars'=>'РатКланова', 'comments'=>'Коментари', 'content_size'=>'Величина садржаја', 'deactivated'=>'деактивиран', 'default_language'=>'подразумевани језик', 'demos'=>'Демои', 'demos_top'=>'Топ 5 Демоа', 'demos_latest'=>'Последњих 5 Демоа', 'detect_visitor_language'=>'Одредити језик посетиоца', 'forum'=>'Форум', 'forum_posts'=>'Форум постови', 'forum_topics'=>'Форум Теме', 'format_date'=>'Формат датума', 'format_time'=>'Формат времена', 'files'=>'Фајлови', 'files_top'=>'Топ 5 Преузимања', 'files_latest'=>'Последњих 5 Преузимања', 'gallery'=>'Галерија', 'guestbook'=>'Књига гостију', 'headlines'=>'Наслови', 'insert_links'=>'убаците линкове чланова', 'latest_articles'=>'Најновији чланци', 'latest_results'=>'Последњи резултати', 'latest_topics'=>'најновије теме', 'login_duration'=>'Трајање пријаве', 'max_length_headlines'=>'макс. дужина наслова', 'max_length_latest_articles'=>'Макс. дужина последњих чланака', 'max_length_latest_topics'=>'Макс. дужина најновије теме', 'max_length_topnews'=>'Макс. дужина topnews', 'max_wrong_pw'=>'Макс. погрешних лозинки', 'messenger'=>'Гласник', 'msg_on_gb_entry'=>'Msg на GB унос', 'news'=>'Новости', 'other'=>'Други', 'page_title'=>'Почетна страница име', 'page_url'=>'УРЛ почетне странице', 'pagelock'=>'Закључај страницу', 'pictures'=>'Слике', 'profile_last_posts'=>'Профил последње поруке', 'public_admin'=>'Админ јавне зоне', 'registered_users'=>'Регистровани корисници', 'search_min_length'=>'Претрага мин. дужина', 'settings'=>'Подешавања', 'shoutbox'=>'Shoutbox', 'shoutbox_all_messages'=>'Shoutbox све поруке', 'shoutbox_refresh'=>'Shoutbox освежи', 'space_user'=>'Простор по кориснику (МБајт)', 'spam_check'=>'Потврди постове?', 'spamapiblockerror'=>'Блокирај Поруке?', 'spamapihost'=>'АПИ УРЛ адреса', 'spamapikey'=>'АПИ кључ', 'spamfilter'=>'Спам филтер', 'spammaxposts'=>'макс. Порука', 'sc_modules'=>'СЦ Модули', 'thumb_width'=>'Ширина палца', 'tooltip_1'=>'Ово је УРЛ ваше странице ЕГ (иоурдомаин.цом/патх/вебспелл). <br> Без хттп: // на почетку и не завршава са косом цртом! <br> Требало би да буде као', 'tooltip_2'=>'Ово је наслов ваше странице, приказан као прозор наслов', 'tooltip_3'=>'Назив ваше организације', 'tooltip_4'=>'Скраћени назив / ознака ваше организације', 'tooltip_5'=>'Име вебмастера = Ваше име', 'tooltip_6'=>'Е-маил адреса вебмастера', 'tooltip_7'=>'Максималне вести које су у потпуности приказане', 'tooltip_8'=>'Форум тема по страници', 'tooltip_9'=>'Слике по страници', 'tooltip_10'=>'Наведене Вести у архиви за страницу', 'tooltip_11'=>'Форум порука по страници', 'tooltip_12'=>'Величина (ширина) за Галерију тхумбс', 'tooltip_13'=>'Наслови наведени у sc_headlines', 'tooltip_14'=>'Теме наведене у latesttopics', 'tooltip_15'=>'Веб-простор за корисничке галерије по кориснику у Мбите', 'tooltip_16'=>'Максимална дужина заглавља у sc_headlines', 'tooltip_17'=>'Минимална дужина термина за претрагу', 'tooltip_18'=>'Да ли желите да дозволите корисничке галерије за сваког корисника?', 'tooltip_19'=>'Да ли желите да управљате галеријом слика директно на Вашој страници? (Боље бити изабран)', 'tooltip_20'=>'Чланака по страници', 'tooltip_21'=>'Награда по страници', 'tooltip_22'=>'Чланци наведени од sc_articles', 'tooltip_23'=>'Демоа по страници', 'tooltip_24'=>'Максимална дужина наслова чланака у sc_articles', 'tooltip_25'=>'Уноси у књигу гостију по страници', 'tooltip_26'=>'Коментара по страници', 'tooltip_27'=>'Порука по страници', 'tooltip_28'=>'РатКланова по страници', 'tooltip_29'=>'Регистрованих корисника по страници', 'tooltip_30'=>'Резултати наведени у sc_results', 'tooltip_31'=>'Најновије поруке које су наведене у профилу', 'tooltip_32'=>'Уноси наведени у sc_upcoming', 'tooltip_33'=>'Трајање да остану пријављени [у сатима] (0 = 20 минута)', 'tooltip_34'=>'Максимална величина (ширина) садржаја (слике, текст ,итд.) (0 = искључи)', 'tooltip_35'=>'Максимална величина (висина) садржаја (слика) (0 = искључи)', 'tooltip_36'=>'Треба ли Админима повратних информација порука о новим уносима у књигу гостију?', 'tooltip_37'=>'Shoutbox коментари који су приказани у shoutbox', 'tooltip_38'=>'Максимално сачуваних коментара у shoutbox', 'tooltip_39'=>'Период (у секундама) за shoutbox освежење', 'tooltip_40'=>'Подразумевани језик за сајт', 'tooltip_41'=>'Убаците линкове ка профилу члана аутоматски?', 'tooltip_42'=>'Максимална дужина теме у latesttopics', 'tooltip_43'=>'Максималан број погрешних уноса лозинке пре ИП бан-а', 'tooltip_44'=>'Приказ типа captcha', 'tooltip_45'=>'Боја позадине од captcha', 'tooltip_46'=>'Боја фонта од captcha', 'tooltip_47'=>'Садржај тип / стил captcha', 'tooltip_48'=>'Број буке-пиксела', 'tooltip_49'=>'Број буке-линија', 'tooltip_50'=>'Избор аутоматске функције за промену величине слике', 'tooltip_51'=>'Максимална дужина topnews у sc_topnews', 'tooltip_52'=>'Одредити језик посетиоца аутоматски', 'tooltip_53'=>'Потврдите поруке са екстерном базом података', 'tooltip_54'=>'Унесите свој Spam API кључ овде ако је доступан', 'tooltip_55'=>'Унесите УРЛ у АПИ хост сервера. <br> Уобичајено: хттпс://апи.вебспелл.орг', 'tooltip_56'=>'Број порука од када више неће бити потврђени од спољашње базе података', 'tooltip_57'=>'Блокирај постове, када дође до грешке', 'tooltip_58'=>'Излазни Формат датума', 'tooltip_59'=>'Излазни Формат времена', 'tooltip_60'=>'Омогући корисника књиге гостију на сајту?', 'tooltip_61'=>'Шта би требало да СБ Демо модул показује?', 'tooltip_62'=>'Шта би требало да СБ датотеке модула показују?', 'transaction_invalid'=>'ИД трансакције неважећи', 'upcoming_actions'=>'предстојеће акције', 'update'=>'ажурирање', 'user_guestbook'=>'Корисник Књиге гостију' );
nerdiabet/webSPELL
languages/sr/admin/settings.php
PHP
gpl-3.0
11,568
using System.Linq; using kino.Core.Framework; using kino.Messaging; namespace kino.Cluster { public partial class ScaleOutListener { private void ReceivedFromOtherNode(Message message) { if ((message.TraceOptions & MessageTraceOptions.Routing) == MessageTraceOptions.Routing) { var hops = string.Join("|", message.GetMessageRouting() .Select(h => $"{nameof(h.Uri)}:{h.Uri}/{h.Identity.GetAnyString()}")); logger.Trace($"Message: {message} received from other node via hops {hops}"); } } } }
iiwaasnet/kino
src/kino.Cluster/ScaleOutListener.Tracing.cs
C#
gpl-3.0
684
Bitrix 17.0.9 Business Demo = f37a7cf627b2ec3aa4045ed4678789ad
gohdan/DFC
known_files/hashes/bitrix/modules/iblock/install/components/bitrix/iblock.vote/templates/stars/script.min.js
JavaScript
gpl-3.0
63
<?php /** * MyBB 1.8 Merge System * Copyright 2014 MyBB Group, All Rights Reserved * * Website: http://www.mybb.com * License: http://www.mybb.com/download/merge-system/license/ */ // Disallow direct access to this file for security reasons if(!defined("IN_MYBB")) { die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined."); } class PHPBB3_Converter_Module_Pollvotes extends Converter_Module_Pollvotes { var $settings = array( 'friendly_name' => 'poll votes', 'progress_column' => 'topic_id', 'default_per_screen' => 1000, ); var $cache_poll_details = array(); function import() { global $import_session; $query = $this->old_db->simple_select("poll_votes", "*", "", array('limit_start' => $this->trackers['start_pollvotes'], 'limit' => $import_session['pollvotes_per_screen'])); while($pollvote = $this->old_db->fetch_array($query)) { $this->insert($pollvote); } } function convert_data($data) { $insert_data = array(); // phpBB 3 values $poll = $this->get_poll_details($data['topic_id']); $insert_data['uid'] = $this->get_import->uid($data['vote_user_id']); $insert_data['dateline'] = $poll['dateline']; $insert_data['voteoption'] = $data['poll_option_id']; $insert_data['pid'] = $poll['poll']; return $insert_data; } function get_poll_details($tid) { global $db; if(array_key_exists($tid, $this->cache_poll_details)) { return $this->cache_poll_details[$tid]; } $query = $db->simple_select("threads", "dateline,poll", "tid = '".$this->get_import->tid($tid)."'"); $poll = $db->fetch_array($query); $db->free_result($query); $this->cache_poll_details[$tid] = $poll; return $poll; } function fetch_total() { global $import_session; // Get number of poll votes if(!isset($import_session['total_pollvotes'])) { $query = $this->old_db->simple_select("poll_votes", "COUNT(*) as count"); $import_session['total_pollvotes'] = $this->old_db->fetch_field($query, 'count'); $this->old_db->free_result($query); } return $import_session['total_pollvotes']; } }
PaulBender/merge-system
boards/phpbb3/pollvotes.php
PHP
gpl-3.0
2,116
#include <SDL_events.h> class Engine { public: static bool StaticInit(); virtual ~Engine(); static std::unique_ptr< Engine > sInstance; virtual int Run(); void SetShouldKeepRunning( bool inShouldKeepRunning ) { mShouldKeepRunning = inShouldKeepRunning; } virtual void HandleEvent( SDL_Event* inEvent ); protected: Engine(); virtual void DoFrame(); private: int DoRunLoop(); bool mShouldKeepRunning; };
nurbed/MasterVR2017
Networking/MultiplayerBook/Chapter 6/RoboCatRTS/RoboCatRTS/Inc/Engine.h
C
gpl-3.0
434
<?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\CatalogSearch\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; /** * @codeCoverageIgnore */ class InstallSchema implements InstallSchemaInterface { /** * {@inheritdoc} */ public function install(SchemaSetupInterface $setup, ModuleContextInterface $context) { $installer = $setup; $installer->startSetup(); $installer->getConnection()->addColumn( $installer->getTable('catalog_eav_attribute'), 'search_weight', [ 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_FLOAT, 'unsigned' => true, 'nullable' => false, 'default' => '1', 'comment' => 'Search Weight' ] ); $installer->endSetup(); } }
rajmahesh/magento2-master
vendor/magento/module-catalog-search/Setup/InstallSchema.php
PHP
gpl-3.0
1,022
/* * Copyright (C) 2012 Krawler Information Systems Pvt Ltd * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package com.krawler.portal.util; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.TreeSet; /** * <a href="ListUtil.java.html"><b><i>View Source</i></b></a> * * @author Brian Wing Shun Chan * */ public class ListUtil { public static List copy(List master) { if (master == null) { return null; } return new ArrayList(master); } public static void copy(List master, List copy) { if ((master == null) || (copy == null)) { return; } copy.clear(); Iterator itr = master.iterator(); while (itr.hasNext()) { Object obj = itr.next(); copy.add(obj); } } public static void distinct(List list) { distinct(list, null); } public static void distinct(List list, Comparator comparator) { if ((list == null) || (list.size() == 0)) { return; } Set<Object> set = null; if (comparator == null) { set = new TreeSet<Object>(); } else { set = new TreeSet<Object>(comparator); } Iterator<Object> itr = list.iterator(); while (itr.hasNext()) { Object obj = itr.next(); if (set.contains(obj)) { itr.remove(); } else { set.add(obj); } } } public static List fromArray(Object[] array) { if ((array == null) || (array.length == 0)) { return new ArrayList(); } List list = new ArrayList(array.length); for (int i = 0; i < array.length; i++) { list.add(array[i]); } return list; } public static List fromCollection(Collection c) { if ((c != null) && (c instanceof List)) { return (List)c; } if ((c == null) || (c.size() == 0)) { return new ArrayList(); } List list = new ArrayList(c.size()); Iterator itr = c.iterator(); while (itr.hasNext()) { list.add(itr.next()); } return list; } public static List fromEnumeration(Enumeration enu) { List list = new ArrayList(); while (enu.hasMoreElements()) { Object obj = enu.nextElement(); list.add(obj); } return list; } public static List fromFile(String fileName) throws IOException { return fromFile(new File(fileName)); } public static List fromFile(File file) throws IOException { List list = new ArrayList(); BufferedReader br = new BufferedReader(new FileReader(file)); String s = StringPool.BLANK; while ((s = br.readLine()) != null) { list.add(s); } br.close(); return list; } public static List fromString(String s) { return fromArray(StringUtil.split(s, StringPool.NEW_LINE)); } public static List sort(List list) { return sort(list, null); } public static List sort(List list, Comparator comparator) { // if (list instanceof UnmodifiableList) { // list = copy(list); // } // // Collections.sort(list, comparator); return list; } public static List subList(List list, int start, int end) { List newList = new ArrayList(); int normalizedSize = list.size() - 1; if ((start < 0) || (start > normalizedSize) || (end < 0) || (start > end)) { return newList; } for (int i = start; i < end && i <= normalizedSize; i++) { newList.add(list.get(i)); } return newList; } public static List<Boolean> toList(boolean[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Boolean> list = new ArrayList<Boolean>(array.length); for (boolean value : array) { list.add(value); } return list; } public static List<Double> toList(double[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Double> list = new ArrayList<Double>(array.length); for (double value : array) { list.add(value); } return list; } public static List<Float> toList(float[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Float> list = new ArrayList<Float>(array.length); for (float value : array) { list.add(value); } return list; } public static List<Integer> toList(int[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Integer> list = new ArrayList<Integer>(array.length); for (int value : array) { list.add(value); } return list; } public static List<Long> toList(long[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Long> list = new ArrayList<Long>(array.length); for (long value : array) { list.add(value); } return list; } public static List<Short> toList(short[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Short> list = new ArrayList<Short>(array.length); for (short value : array) { list.add(value); } return list; } public static List<Boolean> toList(Boolean[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Boolean> list = new ArrayList<Boolean>(array.length); for (Boolean value : array) { list.add(value); } return list; } public static List<Double> toList(Double[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Double> list = new ArrayList<Double>(array.length); for (Double value : array) { list.add(value); } return list; } public static List<Float> toList(Float[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Float> list = new ArrayList<Float>(array.length); for (Float value : array) { list.add(value); } return list; } public static List<Integer> toList(Integer[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Integer> list = new ArrayList<Integer>(array.length); for (Integer value : array) { list.add(value); } return list; } public static List<Long> toList(Long[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Long> list = new ArrayList<Long>(array.length); for (Long value : array) { list.add(value); } return list; } public static List<Short> toList(Short[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<Short> list = new ArrayList<Short>(array.length); for (Short value : array) { list.add(value); } return list; } public static List<String> toList(String[] array) { if ((array == null) || (array.length == 0)) { return Collections.EMPTY_LIST; } List<String> list = new ArrayList<String>(array.length); for (String value : array) { list.add(value); } return list; } public static String toString(List list, String param) { return toString(list, param, StringPool.COMMA); } public static String toString(List list, String param, String delimiter) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < list.size(); i++) { Object bean = list.get(i); // Object value = BeanPropertiesUtil.getObject(bean, param); // // if (value == null) { // value = StringPool.BLANK; // } // // sb.append(value.toString()); if ((i + 1) != list.size()) { sb.append(delimiter); } } return sb.toString(); } }
ufoe/Deskera-CRM
bpm-app/modulebuilder/src/main/java/com/krawler/portal/util/ListUtil.java
Java
gpl-3.0
8,286
/* File: Carbon.h Contains: Master include for all of Carbon Version: QuickTime 7.3 Copyright: (c) 2007 (c) 2000-2001 by Apple Computer, Inc., all rights reserved. Bugs?: For bug reports, consult the following page on the World Wide Web: http://developer.apple.com/bugreporter/ */ #ifndef __CARBON__ #define __CARBON__ #ifndef __CORESERVICES__ #include "CoreServices.h" #endif #ifndef __APPLICATIONSERVICES__ #include "ApplicationServices.h" #endif #ifndef __APPLICATIONSERVICES__ #include "ApplicationServices.h" #endif #ifndef __HIOBJECT__ #include "HIObject.h" #endif #ifndef __HITOOLBAR__ #include "HIToolbar.h" #endif #ifndef __HIVIEW__ #include "HIView.h" #endif #ifndef __HITEXTUTILS__ #include "HITextUtils.h" #endif #ifndef __HISHAPE__ #include "HIShape.h" #endif #ifndef __BALLOONS__ #include "Balloons.h" #endif #ifndef __EVENTS__ #include "Events.h" #endif #ifndef __NOTIFICATION__ #include "Notification.h" #endif #ifndef __DRAG__ #include "Drag.h" #endif #ifndef __CONTROLS__ #include "Controls.h" #endif #ifndef __APPEARANCE__ #include "Appearance.h" #endif #ifndef __MACWINDOWS__ #include "MacWindows.h" #endif #ifndef __TEXTEDIT__ #include "TextEdit.h" #endif #ifndef __MENUS__ #include "Menus.h" #endif #ifndef __DIALOGS__ #include "Dialogs.h" #endif #ifndef __LISTS__ #include "Lists.h" #endif #ifndef __CARBONEVENTSCORE__ #include "CarbonEventsCore.h" #endif #ifndef __CARBONEVENTS__ #include "CarbonEvents.h" #endif #ifndef __TEXTSERVICES__ #include "TextServices.h" #endif #ifndef __SCRAP__ #include "Scrap.h" #endif #ifndef __MACTEXTEDITOR__ #include "MacTextEditor.h" #endif #ifndef __MACHELP__ #include "MacHelp.h" #endif #ifndef __CONTROLDEFINITIONS__ #include "ControlDefinitions.h" #endif #ifndef __TSMTE__ #include "TSMTE.h" #endif #ifndef __TRANSLATIONEXTENSIONS__ #include "TranslationExtensions.h" #endif #ifndef __TRANSLATION__ #include "Translation.h" #endif #ifndef __AEINTERACTION__ #include "AEInteraction.h" #endif #ifndef __TYPESELECT__ #include "TypeSelect.h" #endif #ifndef __MACAPPLICATION__ #include "MacApplication.h" #endif #ifndef __KEYBOARDS__ #include "Keyboards.h" #endif #ifndef __IBCARBONRUNTIME__ #include "IBCarbonRuntime.h" #endif #ifndef __CORESERVICES__ #include "CoreServices.h" #endif #ifndef __SOUND__ #include "Sound.h" #endif #ifndef __CORESERVICES__ #include "CoreServices.h" #endif #ifndef __OSA__ #include "OSA.h" #endif #ifndef __OSACOMP__ #include "OSAComp.h" #endif #ifndef __OSAGENERIC__ #include "OSAGeneric.h" #endif #ifndef __APPLESCRIPT__ #include "AppleScript.h" #endif #ifndef __ASDEBUGGING__ #include "ASDebugging.h" #endif #ifndef __ASREGISTRY__ #include "ASRegistry.h" #endif #ifndef __FINDERREGISTRY__ #include "FinderRegistry.h" #endif #ifndef __DIGITALHUBREGISTRY__ #include "DigitalHubRegistry.h" #endif #ifndef __APPLICATIONSERVICES__ #include "ApplicationServices.h" #endif #ifndef __PMAPPLICATION__ #include "PMApplication.h" #endif #ifndef __NAVIGATION__ #include "Navigation.h" #endif #ifndef __APPLICATIONSERVICES__ #include "ApplicationServices.h" #endif #ifndef __COLORPICKER__ #include "ColorPicker.h" #endif #ifndef __CMCALIBRATOR__ #include "CMCalibrator.h" #endif #ifndef __NSL__ #include "NSL.h" #endif #ifndef __FONTPANEL__ #include "FontPanel.h" #endif #ifndef __HTMLRENDERING__ #include "HTMLRendering.h" #endif #ifndef __SPEECHRECOGNITION__ #include "SpeechRecognition.h" #endif #ifndef __CORESERVICES__ #include "CoreServices.h" #endif #ifndef __KEYCHAINHI__ #include "KeychainHI.h" #endif #ifndef __URLACCESS__ #include "URLAccess.h" #endif #ifndef __CORESERVICES__ #include "CoreServices.h" #endif #ifndef __APPLEHELP__ #include "AppleHelp.h" #endif #ifndef __CORESERVICES__ #include "CoreServices.h" #endif #ifndef __ICAAPPLICATION__ #include "ICAApplication.h" #endif #ifndef __ICADEVICE__ #include "ICADevice.h" #endif #ifndef __ICACAMERA__ #include "ICACamera.h" #endif #endif /* __CARBON__ */
xucp/mpc_hc
include/qt/Carbon.h
C
gpl-3.0
4,062
<?php /** * Created by PhpStorm. * User: mkt * Date: 2015-10-28 * Time: 14:49 */ namespace view; require_once("view/ListView.php"); /** * View that shows a list of unique sessions * for a specific ip-number */ class SessionListView extends ListView { private $logSessions = array(); private static $loggedDate = "loggedDate"; private static $pageTitle = "Ip-address: "; private static $sessionURL = "session"; //get list of unique session for that specific ip-number public function getSessionList($selectedIP) { $logItems = $this->getLogItemsList(); foreach ($logItems as $logItem) { $latest = $this->getLatestSession($logItem[$this->sessionId], $logItems); if ($logItem[$this->ip] === $selectedIP) { if($this->checkIfUnique($logItem[$this->sessionId], $this->sessionId, $this->logSessions)){ array_push($this->logSessions, [$this->sessionId => $logItem[$this->sessionId], Self::$loggedDate => $latest]); } } } $this->sortBy(Self::$loggedDate, $this->logSessions); $this->renderHTML(Self::$pageTitle . $selectedIP, $this->renderSessionList()); } /** * @param $sessionId * @param $logItems, array of ip-numbers, sessions, and dates * @return mixed * uses temporary array to sort session dates and get the latest logged */ private function getLatestSession($sessionId, $logItems) { $sessionDateArray = array(); foreach ($logItems as $logItem) { $dateTime = $this->convertMicroTime($logItem[$this->microTime]); if ($sessionId == $logItem[$this->sessionId]) { if (!in_array($dateTime, $sessionDateArray)) { array_push($sessionDateArray, $dateTime); } } } return end($sessionDateArray); } /** * @return bool * checks if user clicked sessionlink * to view specific logged items in that session */ public function sessionLinkIsClicked() { if (isset($_GET[self::$sessionURL]) ) { return true; } return false; } private function getSessionUrl($session) { return "?".self::$sessionURL."=$session"; } public function getSession() { assert($this->sessionLinkIsClicked()); return $_GET[self::$sessionURL]; } /** * @return string that represents HTML for that list of sessions */ private function renderSessionList() { $ret = "<ul>"; foreach ($this->logSessions as $sessions) { $sessionId = $sessions[$this->sessionId]; $lastLogged = $sessions[Self::$loggedDate]; $sessionUrl = $this->getSessionUrl($sessions[$this->sessionId]); $ret .= "<li>Session: <a href='$sessionUrl'>$sessionId</a></li>"; $ret .= "<li>Last logged: $lastLogged</li>"; $ret .= "<br>"; } $ret .= "</ul>"; return $ret; } }
js223kz/PHP_LOGGER
view/SessionListView.php
PHP
gpl-3.0
3,066
/** * Copyright (c) 2012, Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.mail.compose; import android.content.Context; import android.text.TextUtils; import android.util.AttributeSet; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.Spinner; import com.android.mail.providers.Account; import com.android.mail.providers.Message; import com.android.mail.providers.ReplyFromAccount; import com.android.mail.utils.AccountUtils; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.List; public class FromAddressSpinner extends Spinner implements OnItemSelectedListener { private List<Account> mAccounts; private ReplyFromAccount mAccount; private final List<ReplyFromAccount> mReplyFromAccounts = Lists.newArrayList(); private OnAccountChangedListener mAccountChangedListener; public FromAddressSpinner(Context context) { this(context, null); } public FromAddressSpinner(Context context, AttributeSet set) { super(context, set); } public void setCurrentAccount(ReplyFromAccount account) { mAccount = account; selectCurrentAccount(); } private void selectCurrentAccount() { if (mAccount == null) { return; } int currentIndex = 0; for (ReplyFromAccount acct : mReplyFromAccounts) { if (TextUtils.equals(mAccount.name, acct.name) && TextUtils.equals(mAccount.address, acct.address)) { setSelection(currentIndex, true); break; } currentIndex++; } } public ReplyFromAccount getMatchingReplyFromAccount(String accountString) { if (!TextUtils.isEmpty(accountString)) { for (ReplyFromAccount acct : mReplyFromAccounts) { if (accountString.equals(acct.address)) { return acct; } } } return null; } public ReplyFromAccount getCurrentAccount() { return mAccount; } /** * @param action Action being performed; if this is COMPOSE, show all * accounts. Otherwise, show just the account this was launched * with. * @param currentAccount Account used to launch activity. * @param syncingAccounts */ public void initialize(int action, Account currentAccount, Account[] syncingAccounts, Message refMessage) { final List<Account> accounts = AccountUtils.mergeAccountLists(mAccounts, syncingAccounts, true /* prioritizeAccountList */); if (action == ComposeActivity.COMPOSE) { mAccounts = accounts; } else { // First assume that we are going to use the current account as the reply account Account replyAccount = currentAccount; if (refMessage != null && refMessage.accountUri != null) { // This is a reply or forward of a message access through the "combined" account. // We want to make sure that the real account is in the spinner for (Account account : accounts) { if (account.uri.equals(refMessage.accountUri)) { replyAccount = account; break; } } } mAccounts = ImmutableList.of(replyAccount); } initFromSpinner(); } @VisibleForTesting protected void initFromSpinner() { // If there are not yet any accounts in the cached synced accounts // because this is the first time mail was opened, and it was opened // directly to the compose activity, don't bother populating the reply // from spinner yet. if (mAccounts == null || mAccounts.size() == 0) { return; } FromAddressSpinnerAdapter adapter = new FromAddressSpinnerAdapter(getContext()); mReplyFromAccounts.clear(); for (Account account : mAccounts) { mReplyFromAccounts.addAll(account.getReplyFroms()); } adapter.addAccounts(mReplyFromAccounts); setAdapter(adapter); selectCurrentAccount(); setOnItemSelectedListener(this); } public List<ReplyFromAccount> getReplyFromAccounts() { return mReplyFromAccounts; } public void setOnAccountChangedListener(OnAccountChangedListener listener) { mAccountChangedListener = listener; } @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { ReplyFromAccount selection = (ReplyFromAccount) getItemAtPosition(position); if (!selection.address.equals(mAccount.address)) { mAccount = selection; mAccountChangedListener.onAccountChanged(); } } @Override public void onNothingSelected(AdapterView<?> parent) { // Do nothing. } /** * Classes that want to know when a different account in the * FromAddressSpinner has been selected should implement this interface. * Note: if the user chooses the same account as the one that has already * been selected, this method will not be called. */ public static interface OnAccountChangedListener { public void onAccountChanged(); } }
s20121035/rk3288_android5.1_repo
packages/apps/UnifiedEmail/src/com/android/mail/compose/FromAddressSpinner.java
Java
gpl-3.0
6,076
-- 442 -- PKCColumnA -- ListElementAdder with ChainedSupplier with PrimaryKeyConstraintSupplier and PrimaryKeyColumnsWithAlternativesSupplier - Added HCPID CREATE TABLE "Users" ( "MID" INT PRIMARY KEY, "Password" VARCHAR(20), "Role" VARCHAR(20) NOT NULL, "sQuestion" VARCHAR(100), "sAnswer" VARCHAR(30), CHECK ("Role" IN ('patient', 'admin', 'hcp', 'uap', 'er', 'tester', 'pha', 'lt')) ) CREATE TABLE "Hospitals" ( "HospitalID" VARCHAR(10) PRIMARY KEY, "HospitalName" VARCHAR(30) NOT NULL ) CREATE TABLE "Personnel" ( "MID" INT PRIMARY KEY, "AMID" INT, "role" VARCHAR(20) NOT NULL, "enabled" INT NOT NULL, "lastName" VARCHAR(20) NOT NULL, "firstName" VARCHAR(20) NOT NULL, "address1" VARCHAR(20) NOT NULL, "address2" VARCHAR(20) NOT NULL, "city" VARCHAR(15) NOT NULL, "state" VARCHAR(2) NOT NULL, "zip" VARCHAR(10), "zip1" VARCHAR(5), "zip2" VARCHAR(4), "phone" VARCHAR(12), "phone1" VARCHAR(3), "phone2" VARCHAR(3), "phone3" VARCHAR(4), "specialty" VARCHAR(40), "email" VARCHAR(55), "MessageFilter" VARCHAR(60), CHECK ("role" IN ('admin', 'hcp', 'uap', 'er', 'tester', 'pha', 'lt')), CHECK ("state" IN ('', 'AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WI', 'WV', 'WY')) ) CREATE TABLE "Patients" ( "MID" INT PRIMARY KEY, "lastName" VARCHAR(20), "firstName" VARCHAR(20), "email" VARCHAR(55), "address1" VARCHAR(20), "address2" VARCHAR(20), "city" VARCHAR(15), "state" VARCHAR(2), "zip1" VARCHAR(5), "zip2" VARCHAR(4), "phone1" VARCHAR(3), "phone2" VARCHAR(3), "phone3" VARCHAR(4), "eName" VARCHAR(40), "ePhone1" VARCHAR(3), "ePhone2" VARCHAR(3), "ePhone3" VARCHAR(4), "iCName" VARCHAR(20), "iCAddress1" VARCHAR(20), "iCAddress2" VARCHAR(20), "iCCity" VARCHAR(15), "ICState" VARCHAR(2), "iCZip1" VARCHAR(5), "iCZip2" VARCHAR(4), "iCPhone1" VARCHAR(3), "iCPhone2" VARCHAR(3), "iCPhone3" VARCHAR(4), "iCID" VARCHAR(20), "DateOfBirth" DATE, "DateOfDeath" DATE, "CauseOfDeath" VARCHAR(10), "MotherMID" INT, "FatherMID" INT, "BloodType" VARCHAR(3), "Ethnicity" VARCHAR(20), "Gender" VARCHAR(13), "TopicalNotes" VARCHAR(200), "CreditCardType" VARCHAR(20), "CreditCardNumber" VARCHAR(19), "MessageFilter" VARCHAR(60), "DirectionsToHome" VARCHAR(512), "Religion" VARCHAR(64), "Language" VARCHAR(32), "SpiritualPractices" VARCHAR(100), "AlternateName" VARCHAR(32), CHECK ("state" IN ('AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WI', 'WV', 'WY')), CHECK ("ICState" IN ('AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WI', 'WV', 'WY')) ) CREATE TABLE "HistoryPatients" ( "ID" INT PRIMARY KEY, "changeDate" DATE NOT NULL, "changeMID" INT NOT NULL, "MID" INT NOT NULL, "lastName" VARCHAR(20), "firstName" VARCHAR(20), "email" VARCHAR(55), "address1" VARCHAR(20), "address2" VARCHAR(20), "city" VARCHAR(15), "state" CHAR(2), "zip1" VARCHAR(5), "zip2" VARCHAR(4), "phone1" VARCHAR(3), "phone2" VARCHAR(3), "phone3" VARCHAR(4), "eName" VARCHAR(40), "ePhone1" VARCHAR(3), "ePhone2" VARCHAR(3), "ePhone3" VARCHAR(4), "iCName" VARCHAR(20), "iCAddress1" VARCHAR(20), "iCAddress2" VARCHAR(20), "iCCity" VARCHAR(15), "ICState" VARCHAR(2), "iCZip1" VARCHAR(5), "iCZip2" VARCHAR(4), "iCPhone1" VARCHAR(3), "iCPhone2" VARCHAR(3), "iCPhone3" VARCHAR(4), "iCID" VARCHAR(20), "DateOfBirth" DATE, "DateOfDeath" DATE, "CauseOfDeath" VARCHAR(10), "MotherMID" INT, "FatherMID" INT, "BloodType" VARCHAR(3), "Ethnicity" VARCHAR(20), "Gender" VARCHAR(13), "TopicalNotes" VARCHAR(200), "CreditCardType" VARCHAR(20), "CreditCardNumber" VARCHAR(19), "MessageFilter" VARCHAR(60), "DirectionsToHome" VARCHAR(100), "Religion" VARCHAR(64), "Language" VARCHAR(32), "SpiritualPractices" VARCHAR(100), "AlternateName" VARCHAR(32), CHECK ("state" IN ('AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WI', 'WV', 'WY')), CHECK ("ICState" IN ('AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WI', 'WV', 'WY')) ) CREATE TABLE "LoginFailures" ( "ipaddress" VARCHAR(100) PRIMARY KEY NOT NULL, "failureCount" INT NOT NULL, "lastFailure" TIMESTAMP NOT NULL ) CREATE TABLE "ResetPasswordFailures" ( "ipaddress" VARCHAR(128) PRIMARY KEY NOT NULL, "failureCount" INT NOT NULL, "lastFailure" TIMESTAMP NOT NULL ) CREATE TABLE "icdcodes" ( "Code" NUMERIC(5, 2) PRIMARY KEY NOT NULL, "Description" VARCHAR(50) NOT NULL, "Chronic" VARCHAR(3) NOT NULL, CHECK ("Chronic" IN ('no', 'yes')) ) CREATE TABLE "CPTCodes" ( "Code" VARCHAR(5) PRIMARY KEY NOT NULL, "Description" VARCHAR(30) NOT NULL, "Attribute" VARCHAR(30) ) CREATE TABLE "DrugReactionOverrideCodes" ( "Code" VARCHAR(5) PRIMARY KEY NOT NULL, "Description" VARCHAR(80) NOT NULL ) CREATE TABLE "NDCodes" ( "Code" VARCHAR(10) PRIMARY KEY NOT NULL, "Description" VARCHAR(100) NOT NULL ) CREATE TABLE "DrugInteractions" ( "FirstDrug" VARCHAR(9) NOT NULL, "SecondDrug" VARCHAR(9) NOT NULL, "Description" VARCHAR(100) NOT NULL, PRIMARY KEY ("FirstDrug", "SecondDrug") ) CREATE TABLE "TransactionLog" ( "transactionID" INT PRIMARY KEY NOT NULL, "loggedInMID" INT NOT NULL, "secondaryMID" INT NOT NULL, "transactionCode" INT NOT NULL, "timeLogged" TIMESTAMP NOT NULL, "addedInfo" VARCHAR(255) ) CREATE TABLE "HCPRelations" ( "HCP" INT NOT NULL, "UAP" INT NOT NULL, PRIMARY KEY ("HCP", "UAP") ) CREATE TABLE "PersonalRelations" ( "PatientID" INT NOT NULL, "RelativeID" INT NOT NULL, "RelativeType" VARCHAR(35) NOT NULL ) CREATE TABLE "Representatives" ( "representerMID" INT, "representeeMID" INT, PRIMARY KEY ("representerMID", "representeeMID") ) CREATE TABLE "HCPAssignedHos" ( "hosID" VARCHAR(10) NOT NULL, "HCPID" INT NOT NULL, PRIMARY KEY ("hosID", "HCPID") ) CREATE TABLE "DeclaredHCP" ( "PatientID" INT NOT NULL, "HCPID" INT NOT NULL, PRIMARY KEY ("PatientID", "HCPID") ) CREATE TABLE "OfficeVisits" ( "ID" INT PRIMARY KEY, "visitDate" DATE, "HCPID" INT, "notes" VARCHAR(50), "PatientID" INT, "HospitalID" VARCHAR(10) ) CREATE TABLE "PersonalHealthInformation" ( "PatientID" INT NOT NULL, "Height" INT, "Weight" INT, "Smoker" INT NOT NULL, "SmokingStatus" INT NOT NULL, "BloodPressureN" INT, "BloodPressureD" INT, "CholesterolHDL" INT, "CholesterolLDL" INT, "CholesterolTri" INT, "HCPID" INT, "AsOfDate" TIMESTAMP NOT NULL ) CREATE TABLE "PersonalAllergies" ( "PatientID" INT NOT NULL, "Allergy" VARCHAR(50) NOT NULL ) CREATE TABLE "Allergies" ( "ID" INT PRIMARY KEY, "PatientID" INT NOT NULL, "Description" VARCHAR(50) NOT NULL, "FirstFound" TIMESTAMP NOT NULL ) CREATE TABLE "OVProcedure" ( "ID" INT, "VisitID" INT NOT NULL, "CPTCode" VARCHAR(5) NOT NULL, "HCPID" VARCHAR(10) NOT NULL, PRIMARY KEY ("ID", "HCPID") ) CREATE TABLE "OVMedication" ( "ID" INT PRIMARY KEY, "VisitID" INT NOT NULL, "NDCode" VARCHAR(9) NOT NULL, "StartDate" DATE, "EndDate" DATE, "Dosage" INT, "Instructions" VARCHAR(500) ) CREATE TABLE "OVReactionOverride" ( "ID" INT PRIMARY KEY, "OVMedicationID" INT REFERENCES "OVMedication" ("ID") NOT NULL, "OverrideCode" VARCHAR(5), "OverrideComment" VARCHAR(255) ) CREATE TABLE "OVDiagnosis" ( "ID" INT PRIMARY KEY, "VisitID" INT NOT NULL, "ICDCode" DECIMAL(5, 2) NOT NULL ) CREATE TABLE "GlobalVariables" ( "Name" VARCHAR(20) PRIMARY KEY, "Value" VARCHAR(20) ) CREATE TABLE "FakeEmail" ( "ID" INT PRIMARY KEY, "ToAddr" VARCHAR(100), "FromAddr" VARCHAR(100), "Subject" VARCHAR(500), "Body" VARCHAR(2000), "AddedDate" TIMESTAMP NOT NULL ) CREATE TABLE "ReportRequests" ( "ID" INT PRIMARY KEY, "RequesterMID" INT, "PatientMID" INT, "ApproverMID" INT, "RequestedDate" TIMESTAMP, "ApprovedDate" TIMESTAMP, "ViewedDate" TIMESTAMP, "Status" VARCHAR(30), "Comment" VARCHAR(50) ) CREATE TABLE "OVSurvey" ( "VisitID" INT PRIMARY KEY, "SurveyDate" TIMESTAMP NOT NULL, "WaitingRoomMinutes" INT, "ExamRoomMinutes" INT, "VisitSatisfaction" INT, "TreatmentSatisfaction" INT ) CREATE TABLE "LOINC" ( "LaboratoryProcedureCode" VARCHAR(7), "Component" VARCHAR(100), "KindOfProperty" VARCHAR(100), "TimeAspect" VARCHAR(100), "System" VARCHAR(100), "ScaleType" VARCHAR(100), "MethodType" VARCHAR(100) ) CREATE TABLE "LabProcedure" ( "LaboratoryProcedureID" INT PRIMARY KEY, "PatientMID" INT, "LaboratoryProcedureCode" VARCHAR(7), "Rights" VARCHAR(10), "Status" VARCHAR(20), "Commentary" VARCHAR(50), "Results" VARCHAR(50), "NumericalResults" VARCHAR(20), "NumericalResultsUnit" VARCHAR(20), "UpperBound" VARCHAR(20), "LowerBound" VARCHAR(20), "OfficeVisitID" INT, "LabTechID" INT, "PriorityCode" INT, "ViewedByPatient" BOOLEAN NOT NULL, "UpdatedDate" TIMESTAMP NOT NULL ) CREATE TABLE "message" ( "message_id" INT, "parent_msg_id" INT, "from_id" INT NOT NULL, "to_id" INT NOT NULL, "sent_date" TIMESTAMP NOT NULL, "message" VARCHAR(50), "subject" VARCHAR(50), "been_read" INT ) CREATE TABLE "Appointment" ( "appt_id" INT PRIMARY KEY, "doctor_id" INT NOT NULL, "patient_id" INT NOT NULL, "sched_date" TIMESTAMP NOT NULL, "appt_type" VARCHAR(30) NOT NULL, "comment" VARCHAR(50) ) CREATE TABLE "AppointmentType" ( "apptType_id" INT PRIMARY KEY, "appt_type" VARCHAR(30) NOT NULL, "duration" INT NOT NULL ) CREATE TABLE "referrals" ( "id" INT PRIMARY KEY, "PatientID" INT NOT NULL, "SenderID" INT NOT NULL, "ReceiverID" INT NOT NULL, "ReferralDetails" VARCHAR(50), "OVID" INT NOT NULL, "viewed_by_patient" BOOLEAN NOT NULL, "viewed_by_HCP" BOOLEAN NOT NULL, "TimeStamp" TIMESTAMP NOT NULL, "PriorityCode" INT ) CREATE TABLE "RemoteMonitoringData" ( "id" INT PRIMARY KEY, "PatientID" INT NOT NULL, "systolicBloodPressure" INT, "diastolicBloodPressure" INT, "glucoseLevel" INT, "height" INT, "weight" INT, "pedometerReading" INT, "timeLogged" TIMESTAMP NOT NULL, "ReporterRole" VARCHAR(50), "ReporterID" INT ) CREATE TABLE "RemoteMonitoringLists" ( "PatientMID" INT, "HCPMID" INT, "SystolicBloodPressure" BOOLEAN, "DiastolicBloodPressure" BOOLEAN, "GlucoseLevel" BOOLEAN, "Height" BOOLEAN, "Weight" BOOLEAN, "PedometerReading" BOOLEAN, PRIMARY KEY ("PatientMID", "HCPMID") ) CREATE TABLE "AdverseEvents" ( "id" INT PRIMARY KEY, "Status" VARCHAR(10), "PatientMID" INT, "PresImmu" VARCHAR(50), "Code" VARCHAR(20), "Comment" VARCHAR(2000), "Prescriber" INT, "TimeLogged" TIMESTAMP ) CREATE TABLE "ProfilePhotos" ( "MID" INT PRIMARY KEY, "Photo" VARCHAR(50), "UpdatedDate" TIMESTAMP NOT NULL ) CREATE TABLE "PatientSpecificInstructions" ( "id" INT PRIMARY KEY, "VisitID" INT, "Modified" TIMESTAMP NOT NULL, "Name" VARCHAR(100), "URL" VARCHAR(250), "Comment" VARCHAR(500) ) CREATE TABLE "ReferralMessage" ( "messageID" INT NOT NULL, "referralID" INT NOT NULL, PRIMARY KEY ("messageID", "referralID") )
schemaanalyst/schemaanalyst
src/paper/ineffectivemutants/manualevaluation/mutants/iTrust_HyperSQL/442.sql
SQL
gpl-3.0
11,863
/* Header File for abc controller for use in simulink */ #ifndef _ABC_CONTROLLER_ #define _ABC_CONTROLLER_ #include <stdio.h> #include <math.h> #define TRUE 1 #define FALSE 0 #include <limits.h> #include "abc_controller_type.h" extern void ABC_Controller(double input[16], double output[4], double bona_in[5], double save_data[12]); extern float Derivative(float Prev_value, float Current_value, float Delta_t); extern float lag_filter(float X, float tau, float Y_last); #endif /* _ABC_CONTROLLER_ */
pxkumar2/ardupilot_3.0_HIL
abc_controller.h
C
gpl-3.0
509
#!/bin/sh . ./include.sh ${examples_dir}precision > /dev/null
MengbinZhu/pfldp
ropp-7.0/grib_api-1.9.9/examples/F90/precision.sh
Shell
gpl-3.0
67
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN', '%Y-%m-%d': '%Y.%m.%d.', '%Y-%m-%d %H:%M:%S': '%Y.%m.%d. %H:%M:%S', '%s rows deleted': '%s sorok t\xc3\xb6rl\xc5\x91dtek', '%s rows updated': '%s sorok friss\xc3\xadt\xc5\x91dtek', 'Available databases and tables': 'El\xc3\xa9rhet\xc5\x91 adatb\xc3\xa1zisok \xc3\xa9s t\xc3\xa1bl\xc3\xa1k', 'Cannot be empty': 'Nem lehet \xc3\xbcres', 'Check to delete': 'T\xc3\xb6rl\xc3\xa9shez v\xc3\xa1laszd ki', 'Client IP': 'Client IP', 'Controller': 'Controller', 'Copyright': 'Copyright', 'Current request': 'Jelenlegi lek\xc3\xa9rdez\xc3\xa9s', 'Current response': 'Jelenlegi v\xc3\xa1lasz', 'Current session': 'Jelenlegi folyamat', 'DB Model': 'DB Model', 'Database': 'Adatb\xc3\xa1zis', 'Delete:': 'T\xc3\xb6r\xc3\xb6l:', 'Description': 'Description', 'E-mail': 'E-mail', 'Edit': 'Szerkeszt', 'Edit This App': 'Alkalmaz\xc3\xa1st szerkeszt', 'Edit current record': 'Aktu\xc3\xa1lis bejegyz\xc3\xa9s szerkeszt\xc3\xa9se', 'First name': 'First name', 'Group ID': 'Group ID', 'Hello World': 'Hello Vil\xc3\xa1g', 'Import/Export': 'Import/Export', 'Index': 'Index', 'Internal State': 'Internal State', 'Invalid Query': 'Hib\xc3\xa1s lek\xc3\xa9rdez\xc3\xa9s', 'Invalid email': 'Invalid email', 'Last name': 'Last name', 'Layout': 'Szerkezet', 'Main Menu': 'F\xc5\x91men\xc3\xbc', 'Menu Model': 'Men\xc3\xbc model', 'Name': 'Name', 'New Record': '\xc3\x9aj bejegyz\xc3\xa9s', 'No databases in this application': 'Nincs adatb\xc3\xa1zis ebben az alkalmaz\xc3\xa1sban', 'Origin': 'Origin', 'Password': 'Password', 'Powered by': 'Powered by', 'Query:': 'Lek\xc3\xa9rdez\xc3\xa9s:', 'Record ID': 'Record ID', 'Registration key': 'Registration key', 'Reset Password key': 'Reset Password key', 'Role': 'Role', 'Rows in table': 'Sorok a t\xc3\xa1bl\xc3\xa1ban', 'Rows selected': 'Kiv\xc3\xa1lasztott sorok', 'Stylesheet': 'Stylesheet', 'Sure you want to delete this object?': 'Biztos t\xc3\xb6rli ezt az objektumot?', 'Table name': 'Table name', 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.', 'Timestamp': 'Timestamp', 'Update:': 'Friss\xc3\xadt:', 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.', 'User ID': 'User ID', 'View': 'N\xc3\xa9zet', 'Welcome to web2py': 'Isten hozott a web2py-ban', 'appadmin is disabled because insecure channel': 'az appadmin a biztons\xc3\xa1gtalan csatorna miatt letiltva', 'cache': 'gyors\xc3\xadt\xc3\xb3t\xc3\xa1r', 'change password': 'jelsz\xc3\xb3 megv\xc3\xa1ltoztat\xc3\xa1sa', 'click here for online examples': 'online p\xc3\xa9ld\xc3\xa1k\xc3\xa9rt kattints ide', 'click here for the administrative interface': 'az adminisztr\xc3\xa1ci\xc3\xb3s fel\xc3\xbclet\xc3\xa9rt kattints ide', 'customize me!': 'v\xc3\xa1ltoztass meg!', 'data uploaded': 'adat felt\xc3\xb6ltve', 'database': 'adatb\xc3\xa1zis', 'database %s select': 'adatb\xc3\xa1zis %s kiv\xc3\xa1laszt\xc3\xa1s', 'db': 'db', 'design': 'design', 'done!': 'k\xc3\xa9sz!', 'edit profile': 'profil szerkeszt\xc3\xa9se', 'export as csv file': 'export\xc3\xa1l csv f\xc3\xa1jlba', 'insert new': '\xc3\xbaj beilleszt\xc3\xa9se', 'insert new %s': '\xc3\xbaj beilleszt\xc3\xa9se %s', 'invalid request': 'hib\xc3\xa1s k\xc3\xa9r\xc3\xa9s', 'login': 'bel\xc3\xa9p', 'logout': 'kil\xc3\xa9p', 'lost password': 'elveszett jelsz\xc3\xb3', 'new record inserted': '\xc3\xbaj bejegyz\xc3\xa9s felv\xc3\xa9ve', 'next 100 rows': 'k\xc3\xb6vetkez\xc5\x91 100 sor', 'or import from csv file': 'vagy bet\xc3\xb6lt\xc3\xa9s csv f\xc3\xa1jlb\xc3\xb3l', 'previous 100 rows': 'el\xc5\x91z\xc5\x91 100 sor', 'record': 'bejegyz\xc3\xa9s', 'record does not exist': 'bejegyz\xc3\xa9s nem l\xc3\xa9tezik', 'record id': 'bejegyz\xc3\xa9s id', 'register': 'regisztr\xc3\xa1ci\xc3\xb3', 'selected': 'kiv\xc3\xa1lasztott', 'state': '\xc3\xa1llapot', 'table': 't\xc3\xa1bla', 'unable to parse csv file': 'nem lehet a csv f\xc3\xa1jlt beolvasni', }
henkelis/sonospy
web2py/applications/sonospy/languages/hu.py
Python
gpl-3.0
4,428
/* * Copyright (C) 2009-2011 Andy Spencer <andy753421@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 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <math.h> #include <glib.h> #include <gdk/gdkgl.h> #include <gdk/gdkkeysyms.h> #include <objects/grits-volume.h> #include <objects/grits-callback.h> #include <objects/marching.h> #include <GL/gl.h> #include <rsl.h> #include <tester.h> /****************** * iso ball setup * ******************/ static double dist = 0.75; static gdouble distp(VolPoint *a, gdouble bx, gdouble by, gdouble bz) { return 1/((a->c.x-bx)*(a->c.x-bx) + (a->c.y-by)*(a->c.y-by) + (a->c.z-bz)*(a->c.z-bz)) * 0.10; //return 1-MIN(1,sqrt((a->c.x-bx)*(a->c.x-bx) + // (a->c.y-by)*(a->c.y-by) + // (a->c.z-bz)*(a->c.z-bz))); } static VolGrid *load_balls(float dist, int xs, int ys, int zs) { VolGrid *grid = vol_grid_new(xs, ys, zs); for (int x = 0; x < xs; x++) for (int y = 0; y < ys; y++) for (int z = 0; z < zs; z++) { VolPoint *point = vol_grid_get(grid, x, y, z); point->c.x = ((double)x/(xs-1)*2-1); point->c.y = ((double)y/(ys-1)*2-1); point->c.z = ((double)z/(zs-1)*2-1); point->value = distp(point, -dist, 0, 0) + distp(point, dist, 0, 0); point->value *= 100; } return grid; } /*************** * radar setup * ***************/ /* Load the radar into a Grits Volume */ static void _cart_to_sphere(VolCoord *out, VolCoord *in) { gdouble angle = in->x; gdouble dist = in->y; gdouble tilt = in->z; gdouble lx = sin(angle); gdouble ly = cos(angle); gdouble lz = sin(tilt); out->x = (ly*dist)/20000; out->y = (lz*dist)/10000-0.5; out->z = (lx*dist)/20000-1.5; } static VolGrid *load_radar(gchar *file, gchar *site) { /* Load radar file */ RSL_read_these_sweeps("all", NULL); Radar *rad = RSL_wsr88d_to_radar(file, site); Volume *vol = RSL_get_volume(rad, DZ_INDEX); RSL_sort_rays_in_volume(vol); /* Count dimensions */ Sweep *sweep = vol->sweep[0]; Ray *ray = sweep->ray[0]; gint nsweeps = vol->h.nsweeps; gint nrays = sweep->h.nrays/(1/sweep->h.beam_width)+1; gint nbins = ray->h.nbins /(1000/ray->h.gate_size); nbins = MIN(nbins, 100); /* Convert to VolGrid */ VolGrid *grid = vol_grid_new(nrays, nbins, nsweeps); gint rs, bs, val; gint si=0, ri=0, bi=0; for (si = 0; si < nsweeps; si++) { sweep = vol->sweep[si]; rs = 1.0/sweep->h.beam_width; for (ri = 0; ri < nrays; ri++) { /* TODO: missing rays, pick ri based on azimuth */ ray = sweep->ray[(ri*rs) % sweep->h.nrays]; bs = 1000/ray->h.gate_size; for (bi = 0; bi < nbins; bi++) { if (bi*bs >= ray->h.nbins) break; val = ray->h.f(ray->range[bi*bs]); if (val == BADVAL || val == RFVAL || val == APFLAG || val == NOECHO || val == NOTFOUND_H || val == NOTFOUND_V || val > 80) val = 0; VolPoint *point = vol_grid_get(grid, ri, bi, si); point->value = val; point->c.x = deg2rad(ray->h.azimuth); point->c.y = bi*bs*ray->h.gate_size + ray->h.range_bin1; point->c.z = deg2rad(ray->h.elev); } } } /* Convert to spherical coords */ for (si = 0; si < nsweeps; si++) for (ri = 0; ri < nrays; ri++) for (bi = 0; bi < nbins; bi++) { VolPoint *point = vol_grid_get(grid, ri, bi, si); if (point->c.y == 0) point->value = nan(""); else _cart_to_sphere(&point->c, &point->c); } return grid; } /********** * Common * **********/ static gboolean key_press(GritsTester *tester, GdkEventKey *event, GritsVolume *volume) { if (event->keyval == GDK_KEY_v) grits_volume_set_level(volume, volume->level-0.5); else if (event->keyval == GDK_KEY_V) grits_volume_set_level(volume, volume->level+0.5); else if (event->keyval == GDK_KEY_d) dist += 0.5; else if (event->keyval == GDK_KEY_D) dist -= 0.5; return FALSE; } /******** * Main * ********/ int main(int argc, char **argv) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); GritsTester *tester = grits_tester_new(); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(tester)); gtk_widget_show_all(window); /* Grits Volume */ VolGrid *balls_grid = load_balls(dist, 50, 50, 50); GritsVolume *balls = grits_volume_new(balls_grid); balls->proj = GRITS_VOLUME_CARTESIAN; balls->disp = GRITS_VOLUME_SURFACE; balls->color[0] = (0.8)*0xff; balls->color[1] = (0.6)*0xff; balls->color[2] = (0.2)*0xff; balls->color[3] = (1.0)*0xff; grits_volume_set_level(balls, 50); grits_tester_add(tester, GRITS_OBJECT(balls)); g_signal_connect(tester, "key-press-event", G_CALLBACK(key_press), balls); /* Grits Volume */ //char *file = "/home/andy/.cache/grits/nexrad/level2/KGWX/KGWX_20101130_0459.raw"; //char *file = "/home/andy/.cache/grits/nexrad/level2/KTLX/KTLX_19990503_2351.raw"; //VolGrid *radar_grid = load_radar(file, "KTLX"); //GritsVolume *radar = grits_volume_new(radar_grid); //radar->proj = GRITS_VOLUME_SPHERICAL; //radar->disp = GRITS_VOLUME_SURFACE; //radar->color[0] = (0.8)*0xff; //radar->color[1] = (0.6)*0xff; //radar->color[2] = (0.2)*0xff; //radar->color[3] = (1.0)*0xff; //grits_volume_set_level(radar, 50); //grits_tester_add(tester, GRITS_OBJECT(radar)); //g_signal_connect(tester, "key-press-event", G_CALLBACK(key_press), radar); /* Go */ gtk_main(); return 0; }
GNOME/grits
examples/volume/volume.c
C
gpl-3.0
5,906
#!/usr/bin/perl #--------------------------------- # Copyright 2011 ByWater Solutions # #--------------------------------- # # -D Ruth Bavousett # #--------------------------------- # # EXPECTS: # -nothing # # DOES: # -corrects borrower zipcodes that start with zero, if --update is given # # CREATES: # -nothing # # REPORTS: # -what would be changed, if --debug is given # -count of records examined # -count of record modified use autodie; use strict; use warnings; use Carp; use Data::Dumper; use English qw( -no_match_vars ); use Getopt::Long; use Readonly; use Text::CSV_XS; local $OUTPUT_AUTOFLUSH = 1; Readonly my $NULL_STRING => q{}; my $debug = 0; my $doo_eet = 0; my $i = 0; my $written = 0; my $modified = 0; my $problem = 0; my $input_filename = ""; GetOptions( 'debug' => \$debug, 'update' => \$doo_eet, ); #for my $var ($input_filename) { # croak ("You're missing something") if $var eq $NULL_STRING; #} use C4::Context; use C4::Members; my $dbh = C4::Context->dbh(); my $query = "SELECT borrowernumber,zipcode FROM borrowers where zipcode is not null and zipcode != ''"; my $find = $dbh->prepare($query); $find->execute(); LINE: while (my $line=$find->fetchrow_hashref()) { last LINE if ($debug && $doo_eet && $modified >0); $i++; print '.' unless ($i % 10); print "\r$i" unless ($i % 100); next LINE if ($line->{zipcode} !~ m/^\d+$/); next LINE if (length($line->{zipcode}) >= 5); my $newzip = sprintf "%05d",$line->{zipcode}; $debug and print "Borrower: $line->{borrowernumber} Changing $line->{zipcode} to $newzip.\n"; if ($doo_eet){ C4::Members::ModMember(borrowernumber => $line->{'borrowernumber'}, zipcode => $newzip, ); } $modified++; } print << "END_REPORT"; $i records found. $modified records updated. END_REPORT exit;
druthb/koha-migration-toolbox
koha_fixes/zip_code_leading_zero_fix.pl
Perl
gpl-3.0
1,912
using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Design; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace FEFTwiddler.GUI.UnitViewer { [Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))] public partial class DragonVein : UserControl { private Model.Unit _unit; public DragonVein() { InitializeComponent(); InitializeControls(); } public void LoadUnit(Model.Unit unit) { _unit = unit; PopulateControls(); } private void InitializeControls() { } private void PopulateControls() { var characterData = Data.Database.Characters.GetByID(_unit.CharacterID); if (characterData != null) { var isDefault = characterData.CanUseDragonVein; chkDragonVein.Checked = _unit.Trait_CanUseDragonVein || isDefault; chkDragonVein.Enabled = !isDefault; } else { chkDragonVein.Checked = _unit.Trait_CanUseDragonVein; } } private void chkDragonVein_CheckedChanged(object sender, EventArgs e) { var characterData = Data.Database.Characters.GetByID(_unit.CharacterID); // If a character can't use Dragon Vein by default if (chkDragonVein.Checked && characterData != null && !characterData.CanUseDragonVein) _unit.Trait_CanUseDragonVein = true; else _unit.Trait_CanUseDragonVein = false; } } }
Soaprman/FEFTwiddler
FEFTwiddler/GUI/UnitViewer/DragonVein.cs
C#
gpl-3.0
1,798
using UnityEngine; using System.Collections; using System; namespace Frontiers.World.WIScripts { public class Key : WIScript { public override void OnInitialized () { if (!worlditem.Is <QuestItem> ()) { worlditem.Props.Name.DisplayName = State.KeyName; } } public KeyState State = new KeyState (); } [Serializable] public class KeyState { public bool DisappearFromInventory = true; public string KeyType = "SimpleKey"; public string KeyTag = "Master"; public string KeyName = "Key"; } }
SignpostMarv/FRONTIERS
Assets/Scripts/GameWorld/WIScripts/Machines/Key.cs
C#
gpl-3.0
523
define( "dojo/cldr/nls/nb/gregorian", //begin v1.x content { "dateFormatItem-Ehm": "E h.mm a", "days-standAlone-short": [ "sø.", "ma.", "ti.", "on.", "to.", "fr.", "lø." ], "months-format-narrow": [ "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D" ], "field-second-relative+0": "nå", "quarters-standAlone-narrow": [ "1", "2", "3", "4" ], "field-weekday": "Ukedag", "dateFormatItem-yQQQ": "QQQ y", "dateFormatItem-yMEd": "E d.MM.y", "field-wed-relative+0": "onsdag denne uken", "dateFormatItem-GyMMMEd": "E d. MMM y G", "dateFormatItem-MMMEd": "E d. MMM", "field-wed-relative+1": "onsdag neste uke", "eraNarrow": [ "f.Kr.", "fvt.", "e.Kr.", "vt" ], "dateFormatItem-yMM": "MM.y", "field-tue-relative+-1": "tirsdag sist uke", "days-format-short": [ "sø.", "ma.", "ti.", "on.", "to.", "fr.", "lø." ], "dateFormat-long": "d. MMMM y", "field-fri-relative+-1": "fredag sist uke", "field-wed-relative+-1": "onsdag sist uke", "months-format-wide": [ "januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember" ], "dateTimeFormat-medium": "{1}, {0}", "dayPeriods-format-wide-pm": "p.m.", "dateFormat-full": "EEEE d. MMMM y", "field-thu-relative+-1": "torsdag sist uke", "dateFormatItem-Md": "d.M.", "dayPeriods-format-abbr-am": "a.m.", "dateFormatItem-yMd": "d.M.y", "dateFormatItem-yM": "M.y", "field-era": "Tidsalder", "months-standAlone-wide": [ "januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember" ], "timeFormat-short": "HH.mm", "quarters-format-wide": [ "1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal" ], "timeFormat-long": "HH.mm.ss z", "dateFormatItem-yMMM": "MMM y", "dateFormatItem-yQQQQ": "QQQQ y", "field-year": "År", "dateFormatItem-MMdd": "d.M.", "field-hour": "Time", "months-format-abbr": [ "jan.", "feb.", "mar.", "apr.", "mai", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "des." ], "field-sat-relative+0": "lørdag denne uken", "field-sat-relative+1": "lørdag neste uke", "timeFormat-full": "HH.mm.ss zzzz", "field-day-relative+0": "i dag", "field-day-relative+1": "i morgen", "field-thu-relative+0": "torsdag denne uken", "dateFormatItem-GyMMMd": "d. MMM y G", "field-day-relative+2": "i overmorgen", "field-thu-relative+1": "torsdag neste uke", "dateFormatItem-H": "HH", "months-standAlone-abbr": [ "jan", "feb", "mar", "apr", "mai", "jun", "jul", "aug", "sep", "okt", "nov", "des" ], "quarters-format-abbr": [ "K1", "K2", "K3", "K4" ], "quarters-standAlone-wide": [ "1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal" ], "dateFormatItem-Gy": "y G", "dateFormatItem-M": "L.", "days-standAlone-wide": [ "søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag" ], "timeFormat-medium": "HH.mm.ss", "field-sun-relative+0": "søndag denne uken", "dateFormatItem-Hm": "HH.mm", "quarters-standAlone-abbr": [ "K1", "K2", "K3", "K4" ], "field-sun-relative+1": "søndag neste uke", "eraAbbr": [ "f.Kr.", "e.Kr." ], "field-minute": "Minutt", "field-dayperiod": "AM/PM", "days-standAlone-abbr": [ "sø.", "ma.", "ti.", "on.", "to.", "fr.", "lø." ], "dateFormatItem-d": "d.", "dateFormatItem-ms": "mm.ss", "quarters-format-narrow": [ "1", "2", "3", "4" ], "field-day-relative+-1": "i går", "dateFormatItem-h": "h a", "dateTimeFormat-long": "{1} 'kl.' {0}", "dayPeriods-format-narrow-am": "a", "field-day-relative+-2": "i forgårs", "dateFormatItem-MMMd": "d. MMM", "dateFormatItem-MEd": "E d.M", "dateTimeFormat-full": "{1} {0}", "field-fri-relative+0": "fredag denne uken", "dateFormatItem-yMMMM": "MMMM y", "field-fri-relative+1": "fredag neste uke", "field-day": "Dag", "days-format-wide": [ "søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag" ], "field-zone": "Tidssone", "dateFormatItem-y": "y", "months-standAlone-narrow": [ "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D" ], "field-year-relative+-1": "i fjor", "field-month-relative+-1": "forrige måned", "dateFormatItem-hm": "h.mm a", "dayPeriods-format-abbr-pm": "p.m.", "days-format-abbr": [ "søn.", "man.", "tir.", "ons.", "tor.", "fre.", "lør." ], "eraNames": [ "f.Kr.", "e.Kr." ], "dateFormatItem-yMMMd": "d. MMM y", "days-format-narrow": [ "S", "M", "T", "O", "T", "F", "L" ], "days-standAlone-narrow": [ "S", "M", "T", "O", "T", "F", "L" ], "dateFormatItem-MMM": "LLL", "field-month": "Måned", "field-tue-relative+0": "tirsdag denne uken", "field-tue-relative+1": "tirsdag neste uke", "dayPeriods-format-wide-am": "a.m.", "dateFormatItem-EHm": "E HH.mm", "field-mon-relative+0": "mandag denne uken", "field-mon-relative+1": "mandag neste uke", "dateFormat-short": "dd.MM.y", "dateFormatItem-EHms": "E HH.mm.ss", "dateFormatItem-Ehms": "E h.mm.ss a", "field-second": "Sekund", "field-sat-relative+-1": "lørdag sist uke", "dateFormatItem-yMMMEd": "E d. MMM y", "field-sun-relative+-1": "søndag sist uke", "field-month-relative+0": "denne måneden", "field-month-relative+1": "neste måned", "dateFormatItem-Ed": "E d.", "dateTimeFormats-appendItem-Timezone": "{0} {1}", "field-week": "Uke", "dateFormat-medium": "d. MMM y", "field-year-relative+0": "i år", "field-week-relative+-1": "forrige uke", "field-year-relative+1": "neste år", "dayPeriods-format-narrow-pm": "p", "dateTimeFormat-short": "{1}, {0}", "dateFormatItem-Hms": "HH.mm.ss", "dateFormatItem-hms": "h.mm.ss a", "dateFormatItem-GyMMM": "MMM y G", "field-mon-relative+-1": "mandag sist uke", "field-week-relative+0": "denne uken", "field-week-relative+1": "neste uke" } //end v1.x content );
AnthonyARM/javascript
rowing/dojo-release-1.13.0/dojo/cldr/nls/nb/gregorian.js.uncompressed.js
JavaScript
gpl-3.0
5,993
import Ember from 'ember'; export default Ember.Component.extend({ classNames: ['button-content'], audio: Ember.inject.service(), soundName: null, rate: 1, preloadSounds: function() { this.get('audio'); }.on('init'), actions: { play() { this.get('audio').play(this.get('soundName'), this.get('rate')); } } });
hugoruscitti/huayra-procesing
app/components/p5-play-button.js
JavaScript
gpl-3.0
347
/* * CPAchecker is a tool for configurable software verification. * This file is part of CPAchecker. * * Copyright (C) 2007-2014 Dirk Beyer * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * CPAchecker web page: * http://cpachecker.sosy-lab.org */ package org.sosy_lab.cpachecker.cfa.model; import org.sosy_lab.cpachecker.cfa.ast.FileLocation; import org.sosy_lab.cpachecker.cfa.ast.ADeclaration; import com.google.common.base.Optional; public class ADeclarationEdge extends AbstractCFAEdge { protected final ADeclaration declaration; protected ADeclarationEdge(final String pRawSignature, final FileLocation pFileLocation, final CFANode pPredecessor, final CFANode pSuccessor, final ADeclaration pDeclaration) { super(pRawSignature, pFileLocation, pPredecessor, pSuccessor); declaration = pDeclaration; } @Override public CFAEdgeType getEdgeType() { return CFAEdgeType.DeclarationEdge; } public ADeclaration getDeclaration() { return declaration; } @Override public Optional<? extends ADeclaration> getRawAST() { return Optional.of(declaration); } @Override public String getCode() { return declaration.toASTString(); } }
nishanttotla/predator
cpachecker/src/org/sosy_lab/cpachecker/cfa/model/ADeclarationEdge.java
Java
gpl-3.0
1,757
<?php // Copyright (C) <2015> <it-novum GmbH> // // This file is dual licensed // // 1. // 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 3 of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // 2. // If you purchased an openITCOCKPIT Enterprise Edition you can use this file // under the terms of the openITCOCKPIT Enterprise Edition license agreement. // License agreement and license key will be shipped with the order // confirmation. ?> <div class="row"> <div class="col-xs-12 col-md-2 text-muted"> <center><span id="selectionCount"></span></center> </div> <div class="col-xs-12 col-md-2 "><span id="selectAllDowntimes" class="pointer"><i class="fa fa-lg fa-check-square-o"></i> <?php echo __('Select all'); ?></span></div> <div class="col-xs-12 col-md-2"><span id="untickAllDowntimes" class="pointer"><i class="fa fa-lg fa-square-o"></i> <?php echo __('Undo selection'); ?></span></div> <div class="col-xs-12 col-md-2"> <?php if ($this->Acl->hasPermission('delete', 'Services', '')): ?> <a href="javascript:void(0);" id="deleteAllServiceDowntimes" class="txt-color-red" style="text-decoration: none;"> <i class="fa fa-lg fa-trash-o"></i> <?php echo __('Delete'); ?></a> <?php endif; ?> </div> </div>
it-novum/openITCOCKPIT
src/Template/element/downtimes_mass_service_delete.php
PHP
gpl-3.0
1,842
<?php /* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.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 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ $languages = array( 'CHARSET' => 'UTF-8', 'Language_ar_AR' => 'Arabia', 'Language_ar_SA' => 'Arabic', 'Language_bg_BG' => 'Bulgarian', 'Language_ca_ES' => 'Katalaani', 'Language_da_DA' => 'Tanska', 'Language_da_DK' => 'Tanska', 'Language_de_DE' => 'Saksa', 'Language_de_AT' => 'Saksa (Itävalta)', 'Language_el_GR' => 'Kreikkalainen', 'Language_en_AU' => 'Englanti (Australia)', 'Language_en_GB' => 'Englanti (Yhdistynyt kuningaskunta)', 'Language_en_IN' => 'Englanti (Intia)', 'Language_en_NZ' => 'Englanti (Uusi-Seelanti)', 'Language_en_US' => 'Englanti (Yhdysvallat)', 'Language_es_ES' => 'Espanjalainen', 'Language_es_AR' => 'Espanja (Argentiina)', 'Language_es_HN' => 'Espanja (Honduras)', 'Language_es_MX' => 'Espanja (Meksiko)', 'Language_es_PR' => 'Espanja (Puerto Rico)', 'Language_et_EE' => 'Estonian', 'Language_fa_IR' => 'Persialainen', 'Language_fi_FI' => 'Fins', 'Language_fr_BE' => 'Ranska (Belgia)', 'Language_fr_CA' => 'Ranska (Kanada)', 'Language_fr_CH' => 'Ranska (Sveitsi)', 'Language_fr_FR' => 'Ranskalainen', 'Language_he_IL' => 'Hebrew', 'Language_hu_HU' => 'Unkari', 'Language_is_IS' => 'Islannin', 'Language_it_IT' => 'Italialainen', 'Language_ja_JP' => 'Japanin kieli', 'Language_nb_NO' => 'Norja (bokmål)', 'Language_nl_BE' => 'Hollanti (Belgia)', 'Language_nl_NL' => 'Hollanti (Alankomaat)', 'Language_pl_PL' => 'Puola', 'Language_pt_BR' => 'Portugali (Brasilia)', 'Language_pt_PT' => 'Portugali', 'Language_ro_RO' => 'Romanialainen', 'Language_ru_RU' => 'Venäläinen', 'Language_ru_UA' => 'Venäjä (Ukraina)', 'Language_tr_TR' => 'Turkki', 'Language_sl_SI' => 'Slovenian', 'Language_sv_SV' => 'Ruotsi', 'Language_sv_SE' => 'Ruotsi', 'Language_zh_CN' => 'Kiinalainen', 'Language_is_IS' => 'Islannin' ); ?>
woakes070048/crm-php
htdocs/langs/fi_FI/languages.lang.php
PHP
gpl-3.0
2,557
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="ExtentTest.cs" company="Allors bvba"> // Copyright 2002-2012 Allors bvba. // // Dual Licensed under // a) the Lesser General Public Licence v3 (LGPL) // b) the Allors License // // The LGPL License is included in the file lgpl.txt. // The Allors License is an addendum to your contract. // // Allors Platform 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. // // For more information visit http://www.allors.com/legal // </copyright> // -------------------------------------------------------------------------------------------------------------------- namespace Allors.Adapters.Object.SqlClient { using System.Linq; using Allors; using Allors.Domain; using Allors.Meta; using Xunit; public abstract class ExtentTest : Adapters.ExtentTest { [Fact] public override void SortOne() { foreach (var init in this.Inits) { foreach (var marker in this.Markers) { init(); this.Populate(); this.Session.Commit(); this.c1B.C1AllorsString = "3"; this.c1C.C1AllorsString = "1"; this.c1D.C1AllorsString = "2"; this.Session.Commit(); marker(); var extent = this.Session.Extent(MetaC1.Instance.ObjectType); extent.AddSort(MetaC1.Instance.C1AllorsString); var sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(4, sortedObjects.Length); Assert.Equal(this.c1A, sortedObjects[0]); Assert.Equal(this.c1C, sortedObjects[1]); Assert.Equal(this.c1D, sortedObjects[2]); Assert.Equal(this.c1B, sortedObjects[3]); marker(); extent = this.Session.Extent(MetaC1.Instance.ObjectType); extent.AddSort(MetaC1.Instance.C1AllorsString, SortDirection.Ascending); sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(4, sortedObjects.Length); Assert.Equal(this.c1A, sortedObjects[0]); Assert.Equal(this.c1C, sortedObjects[1]); Assert.Equal(this.c1D, sortedObjects[2]); Assert.Equal(this.c1B, sortedObjects[3]); marker(); extent = this.Session.Extent(MetaC1.Instance.ObjectType); extent.AddSort(MetaC1.Instance.C1AllorsString, SortDirection.Ascending); sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(4, sortedObjects.Length); Assert.Equal(this.c1A, sortedObjects[0]); Assert.Equal(this.c1C, sortedObjects[1]); Assert.Equal(this.c1D, sortedObjects[2]); Assert.Equal(this.c1B, sortedObjects[3]); marker(); extent = this.Session.Extent(MetaC1.Instance.ObjectType); extent.AddSort(MetaC1.Instance.C1AllorsString, SortDirection.Descending); sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(4, sortedObjects.Length); Assert.Equal(this.c1B, sortedObjects[0]); Assert.Equal(this.c1D, sortedObjects[1]); Assert.Equal(this.c1C, sortedObjects[2]); Assert.Equal(this.c1A, sortedObjects[3]); marker(); extent = this.Session.Extent(MetaC1.Instance.ObjectType); extent.AddSort(MetaC1.Instance.C1AllorsString, SortDirection.Descending); sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(4, sortedObjects.Length); Assert.Equal(this.c1B, sortedObjects[0]); Assert.Equal(this.c1D, sortedObjects[1]); Assert.Equal(this.c1C, sortedObjects[2]); Assert.Equal(this.c1A, sortedObjects[3]); foreach (var useOperator in this.UseOperator) { if (useOperator) { marker(); var firstExtent = this.Session.Extent(MetaC1.Instance.ObjectType); firstExtent.Filter.AddLike(MetaC1.Instance.C1AllorsString, "1"); var secondExtent = this.Session.Extent(MetaC1.Instance.ObjectType); extent = this.Session.Union(firstExtent, secondExtent); secondExtent.Filter.AddLike(MetaC1.Instance.C1AllorsString, "3"); extent.AddSort(MetaC1.Instance.C1AllorsString); sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(2, sortedObjects.Length); Assert.Equal(this.c1C, sortedObjects[0]); Assert.Equal(this.c1B, sortedObjects[1]); } } } } } [Fact] public override void SortTwo() { foreach (var init in this.Inits) { init(); this.Populate(); this.c1B.C1AllorsString = "a"; this.c1C.C1AllorsString = "b"; this.c1D.C1AllorsString = "a"; this.c1B.C1AllorsInteger = 2; this.c1C.C1AllorsInteger = 1; this.c1D.C1AllorsInteger = 0; this.Session.Commit(); var extent = this.Session.Extent(MetaC1.Instance.ObjectType); extent.AddSort(MetaC1.Instance.C1AllorsString); extent.AddSort(MetaC1.Instance.C1AllorsInteger); var sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(4, sortedObjects.Length); Assert.Equal(this.c1A, sortedObjects[0]); Assert.Equal(this.c1D, sortedObjects[1]); Assert.Equal(this.c1B, sortedObjects[2]); Assert.Equal(this.c1C, sortedObjects[3]); extent = this.Session.Extent(MetaC1.Instance.ObjectType); extent.AddSort(MetaC1.Instance.C1AllorsString); extent.AddSort(MetaC1.Instance.C1AllorsInteger, SortDirection.Ascending); sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(4, sortedObjects.Length); Assert.Equal(this.c1A, sortedObjects[0]); Assert.Equal(this.c1D, sortedObjects[1]); Assert.Equal(this.c1B, sortedObjects[2]); Assert.Equal(this.c1C, sortedObjects[3]); extent = this.Session.Extent(MetaC1.Instance.ObjectType); extent.AddSort(MetaC1.Instance.C1AllorsString); extent.AddSort(MetaC1.Instance.C1AllorsInteger, SortDirection.Descending); sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(4, sortedObjects.Length); Assert.Equal(this.c1A, sortedObjects[0]); Assert.Equal(this.c1B, sortedObjects[1]); Assert.Equal(this.c1D, sortedObjects[2]); Assert.Equal(this.c1C, sortedObjects[3]); extent = this.Session.Extent(MetaC1.Instance.ObjectType); extent.AddSort(MetaC1.Instance.C1AllorsString, SortDirection.Descending); extent.AddSort(MetaC1.Instance.C1AllorsInteger, SortDirection.Descending); sortedObjects = (C1[])extent.ToArray(typeof(C1)); Assert.Equal(4, sortedObjects.Length); Assert.Equal(this.c1C, sortedObjects[0]); Assert.Equal(this.c1B, sortedObjects[1]); Assert.Equal(this.c1D, sortedObjects[2]); Assert.Equal(this.c1A, sortedObjects[3]); } } [Fact] public override void SortDifferentSession() { foreach (var init in this.Inits) { init(); var c1A = C1.Create(this.Session); var c1B = C1.Create(this.Session); var c1C = C1.Create(this.Session); var c1D = C1.Create(this.Session); c1A.C1AllorsString = "2"; c1B.C1AllorsString = "1"; c1C.C1AllorsString = "3"; var extent = this.Session.Extent(M.C1.Class); extent.AddSort(M.C1.C1AllorsString, SortDirection.Ascending); var sortedObjects = (C1[])extent.ToArray(typeof(C1)); var names = sortedObjects.Select(v => v.C1AllorsString).ToArray(); Assert.Equal(4, sortedObjects.Length); Assert.Equal(c1D, sortedObjects[0]); Assert.Equal(c1B, sortedObjects[1]); Assert.Equal(c1A, sortedObjects[2]); Assert.Equal(c1C, sortedObjects[3]); var c1AId = c1A.Id; this.Session.Commit(); using (var session2 = this.CreateSession()) { c1A = (C1)session2.Instantiate(c1AId); extent = session2.Extent(M.C1.Class); extent.AddSort(M.C1.C1AllorsString, SortDirection.Ascending); sortedObjects = (C1[])extent.ToArray(typeof(C1)); names = sortedObjects.Select(v => v.C1AllorsString).ToArray(); Assert.Equal(4, sortedObjects.Length); Assert.Equal(c1D, sortedObjects[0]); Assert.Equal(c1B, sortedObjects[1]); Assert.Equal(c1A, sortedObjects[2]); Assert.Equal(c1C, sortedObjects[3]); } } } } }
Allors/allors
Platform/Database/Adapters/Tests.Static/Static/object/sqlclient/ExtentTest.cs
C#
gpl-3.0
10,380
<?php // This is a SPIP language file -- Ceci est un fichier langue de SPIP // extrait automatiquement de http://trad.spip.net/tradlang_module/forum?lang_cible=eo // ** ne pas modifier le fichier ** if (!defined('_ECRIRE_INC_VERSION')) { return; } $GLOBALS[$GLOBALS['idx_lang']] = array( // B 'bouton_radio_articles_futurs' => 'nur al estontaj artikoloj (neniu ago ĉe la datenbazo).', 'bouton_radio_articles_tous' => 'al ĉiuj artikoloj senescepte.', 'bouton_radio_articles_tous_sauf_forum_desactive' => 'al ĉiuj artikoloj, escepte tiuj, kies forumo estas fermita.', 'bouton_radio_enregistrement_obligatoire' => 'Deviga memregistriĝo (la uzantoj devas aboniĝi, entajpante sian retpoŝtadreson antaŭ ol sendi kontribuaĵojn).', 'bouton_radio_moderation_priori' => 'Apriora moderigado (kontribuaĵoj estas publikigataj nur post validigo far de mastrumantoj).', # MODIF 'bouton_radio_modere_abonnement' => 'per abono', 'bouton_radio_modere_posteriori' => 'aposteriore moderigata', # MODIF 'bouton_radio_modere_priori' => 'apriore moderigata', # MODIF 'bouton_radio_publication_immediate' => 'Tujpublikigo de mesaĝoj (la kontribuaĵoj afiŝiĝas tuj post ties sendo, la mastrumantoj povas forviŝi ilin poste).', // D 'documents_interdits_forum' => 'Dokumentoj malpermesitaj en la forumo', // F 'form_pet_message_commentaire' => 'Ĉu mesaĝon, ĉu komenton ?', 'forum' => 'Forumo', 'forum_acces_refuse' => 'Vi ne plu havas alir-rajton al tiuj ĉi forumoj.', 'forum_attention_dix_caracteres' => '<b>Atentu !</b> via mesaĝo devas enhavi almenaŭ dek signojn.', 'forum_attention_trois_caracteres' => '<b>Atentu !</b> via titolo devas enhavi almenaŭ tri signojn.', 'forum_attention_trop_caracteres' => '<b>Atentu !</b> via mesaĝo estas tro longa (@compte@ signoj) : por esti registrita, ĝi ne preteratingu @max@ signojn.', # MODIF 'forum_avez_selectionne' => 'Vi selektis :', 'forum_cliquer_retour' => 'Musklaku <a href=\'@retour_forum@\'>ĉi tie</a> por daŭrigi.', 'forum_forum' => 'forumo', 'forum_info_modere' => 'Tiu ĉi forumo estas apriore moderigata : via kontribuo aperos nur post validigo far de mastrumanto de la forumo.', # MODIF 'forum_lien_hyper' => '<b>Hiperligo</b> (nedeviga)', # MODIF 'forum_message_definitif' => 'Definitiva mesaĝo : sendu al la forumo', 'forum_message_trop_long' => 'Via mesaĝo estas tro longa. La maksimuma longeco estas 20.000 signojn.', # MODIF 'forum_ne_repondez_pas' => 'Ne respondu al tiu ĉi retletero, sed en la forumo ĉe la jena adreso :', # MODIF 'forum_page_url' => '(Se via mesaĝo rilatas al artikolo publikigita ĉe la reto, aŭ al paĝo donanta pli da informoj, bonvolu indiki ĉi-poste la titolon de la paĝo kaj ties ret-adreson.)', 'forum_poste_par' => 'Mesaĝo posté@parauteur@ reage al via artikolo « @titre@ ».', # MODIF 'forum_qui_etes_vous' => '<b>Kiu vi estas ?</b> (nedeviga)', # MODIF 'forum_texte' => 'Teksto de via mesaĝo :', # MODIF 'forum_titre' => 'Titolo :', # MODIF 'forum_url' => 'URL :', # MODIF 'forum_valider' => 'Validigi tiun elekton', 'forum_voir_avant' => 'Vidi tiun ĉi mesaĝon antaŭ ol sendi ĝin', # MODIF 'forum_votre_email' => 'Via retpoŝtadreso', 'forum_votre_nom' => 'Via nomo (aŭ salutnomo) :', # MODIF 'forum_vous_enregistrer' => 'Por partopreni en ; tiu ĉi forumo, vi devas antaŭe registriĝi. Bonvolu indiki ĉi-sube la personan ensalutilon kiu estis sendita al vi. Se vi ne estas registrita, vi devas', 'forum_vous_inscrire' => 'registriĝi.', // I 'icone_poster_message' => 'Sendi mesaĝon', 'icone_suivi_forum' => 'Superrigardo de la publika forumo : @nb_forums@ kontribuo(j)', 'icone_suivi_forums' => 'Superrigardi/mastrumi la forumojn', 'icone_supprimer_message' => 'Forigi tiun mesaĝon', 'icone_valider_message' => 'Validigi tiun mesaĝon', 'info_activer_forum_public' => '<i>Por aktivigi la publikajn forumojn, bonvolu elekti ilian defaŭltan moderig-reĝimon :</i>', # MODIF 'info_appliquer_choix_moderation' => 'Apliki tiun moderig-elekton :', 'info_config_forums_prive' => 'En la privata spaco de la retejo, vi povas aktivigi plurajn tipojn de forumoj :', # MODIF 'info_config_forums_prive_admin' => 'Forumo rezervita al retejaj mastrumantoj :', 'info_config_forums_prive_global' => 'Ĝenerala forumo, malfermita al ĉiuj redaktantoj :', 'info_config_forums_prive_objets' => 'Forumo sub ĉiu artikolo, fulminformo, referencigita retejo, ktp :', 'info_desactiver_forum_public' => 'Malaktivigi la uzon de la publikaj forumoj. La publikaj forumoj estos laŭkaze unu post la alia permesitaj laŭ la artikoloj ; ili estos malpermesataj koncerne rubrikojn, fulm-informojn, ktp.', 'info_envoi_forum' => 'Sendo de la forumoj al aŭtoroj de la artikoloj', 'info_fonctionnement_forum' => 'Funkciado de la forumo :', 'info_gauche_suivi_forum_2' => 'La paĝo pri <i>superkontrolo de la forumoj</i> estas mastrumilo por via retejo (kaj ne diskutejo aŭ redaktejo). Ĝi afiŝas ĉiujn kontribuaĵojn de la forumoj (de la publika spaco same kiel de la privata), kaj ebligas al vi mastrumi tiujn kontribuaĵojn.', # MODIF 'info_liens_syndiques_3' => 'forumoj', 'info_liens_syndiques_4' => 'estas', 'info_liens_syndiques_5' => 'forumo', 'info_liens_syndiques_6' => 'estas', 'info_liens_syndiques_7' => 'validigotaj', 'info_mode_fonctionnement_defaut_forum_public' => 'Defaŭlta funkcimodo de la publikaj forumoj', 'info_option_email' => 'Kiam vizitanto de la retejo sendas novan mesaĝon en la forumon ligitan kun artikolo, eblas retpoŝte sciigi pri tiu mesaĝo al la aŭtoroj de la artikolo. Indiku por ĉia forumo, ĉu tiun eblecon oni uzu.', 'info_pas_de_forum' => 'neniu forumo', 'info_question_visiteur_ajout_document_forum' => 'Ĉu vi permesas al vizitantoj kunsendi dokumentojn (bildojn, sonaĵojn...) al siaj forumaj mesaĝoj ?', # MODIF 'info_question_visiteur_ajout_document_forum_format' => 'Laŭkaze, bonvolu indiki ĉi-sube la liston de dosiernomaj sufiksoj permesitaj por la forumoj (ekz : gif, jpg, png, mp3).', # MODIF 'item_activer_forum_administrateur' => 'Aktivigi la forumon de la mastrumantoj', 'item_config_forums_prive_global' => 'Aktivigi la forumon de redaktantoj', 'item_config_forums_prive_objets' => 'Aktivigi tiujn ĉi forumojn', 'item_desactiver_forum_administrateur' => 'Malaktivigi la forumon de la mastrumantoj', 'item_non_config_forums_prive_global' => 'Malaktivigi la forumon de redaktantoj', 'item_non_config_forums_prive_objets' => 'Malaktivigi tiujn ĉi forumojn', // L 'lien_reponse_article' => 'Respondo al la artikolo', 'lien_reponse_breve_2' => 'Respondo al la fulm-informo', 'lien_reponse_rubrique' => 'Respondo al la rubriko', 'lien_reponse_site_reference' => 'Respondo al la referencigita retejo :', # MODIF // O 'onglet_messages_internes' => 'Internaj mesaĝoj', 'onglet_messages_publics' => 'Publikaj mesaĝoj', 'onglet_messages_vide' => 'Sentekstaj mesaĝoj', // R 'repondre_message' => 'Respondi al tiu mesaĝo', // S 'statut_original' => 'originala', // T 'titre_cadre_forum_administrateur' => 'Privata forumo de la mastrumantoj', 'titre_cadre_forum_interne' => 'Interna forumo', 'titre_config_forums_prive' => 'Forumoj de la privata spaco', 'titre_forum' => 'Forumo', 'titre_forum_suivi' => 'Superrigardo de la forumoj', 'titre_page_forum_suivi' => 'Superrigardo de la forumoj' ); ?>
ernestovi/ups
spip/plugins-dist/forum/lang/forum_eo.php
PHP
gpl-3.0
7,379
import { TestData } from '../../test-data'; import { ViewController } from 'ionic-angular'; import { NavParamsMock, BrandsActionsMock, CategoriesActionsMock, ModelsActionsMock, ItemsActionsMock, BrandsServiceMock, CategoriesServiceMock, ModelsServiceMock, ItemsServiceMock, } from '../../mocks'; import { InventoryFilterPage } from './inventory-filter'; let instance: InventoryFilterPage = null; describe('InventoryFilter Page', () => { beforeEach(() => { instance = new InventoryFilterPage( <any> new ViewController, <any> new NavParamsMock, <any> new BrandsServiceMock, <any> new BrandsActionsMock, <any> new ModelsServiceMock, <any> new ModelsActionsMock, <any> new CategoriesServiceMock, <any> new CategoriesActionsMock, <any> new ItemsServiceMock, <any> new ItemsActionsMock ); }); it('is created', () => { expect(instance).toBeTruthy(); }); it('gets ids from store', () => { instance.ngOnInit(); expect(instance.selectedBrandID).toEqual(TestData.itemFilters.brandID); expect(instance.selectedModelID).toEqual(TestData.itemFilters.modelID); expect(instance.selectedCategoryID).toEqual(TestData.itemFilters.categoryID); }); it('calls filterModels if selectedBrandID is not -1', () => { instance.navParams.param = TestData.apiItem.brandID; spyOn(instance, 'onFilterModels'); instance.ngOnInit(); expect(instance.onFilterModels).toHaveBeenCalled(); }); it('filters models on filterModels()', () => { spyOn(instance.modelsActions, 'filterModels'); instance.onFilterModels(); expect(instance.modelsActions.filterModels).toHaveBeenCalled(); }); it('resets filters on resetFilters()', () => { spyOn(instance, 'onApplyFilters'); instance.onResetFilters(); expect(instance.selectedBrandID).toEqual(-1); expect(instance.selectedModelID).toEqual(-1); expect(instance.selectedCategoryID).toEqual(-1); expect(instance.onApplyFilters).toHaveBeenCalled(); }); it('dismisses modal on dismiss', () => { spyOn(instance.viewCtrl, 'dismiss'); instance.onDismiss(); expect(instance.viewCtrl.dismiss).toHaveBeenCalled(); }); it('dismisses modal on applyFilters', () => { instance.selectedBrandID = TestData.itemFilters.brandID; instance.selectedModelID = TestData.itemFilters.modelID; instance.selectedCategoryID = TestData.itemFilters.categoryID; const ids = { brandID: TestData.itemFilters.brandID, modelID: TestData.itemFilters.modelID, categoryID: TestData.itemFilters.categoryID }; spyOn(instance.viewCtrl, 'dismiss'); spyOn(instance.itemsActions, 'updateFilters'); instance.onApplyFilters(); expect(instance.viewCtrl.dismiss).toHaveBeenCalled(); expect(instance.itemsActions.updateFilters).toHaveBeenCalledWith(ids); }); });
emmanuelroussel/stockpile-app
src/pages/inventory-filter/inventory-filter.spec.ts
TypeScript
gpl-3.0
2,887
<?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Framework\App\Test\Unit\View\Asset\MaterializationStrategy; use \Magento\Framework\App\View\Asset\MaterializationStrategy\Factory; use Magento\Framework\ObjectManagerInterface; class FactoryTest extends \PHPUnit_Framework_TestCase { /** * @var ObjectManagerInterface | \PHPUnit_Framework_MockObject_MockObject */ private $objectManager; protected function setUp() { $this->objectManager = $this->getMockBuilder('Magento\Framework\ObjectManagerInterface') ->setMethods([]) ->getMock(); } public function testCreateEmptyStrategies() { $asset = $this->getAsset(); $copyStrategy = $this->getMockBuilder('Magento\Framework\App\View\Asset\MaterializationStrategy\Copy') ->setMethods([]) ->getMock(); $copyStrategy->expects($this->once()) ->method('isSupported') ->with($asset) ->willReturn(true); $this->objectManager->expects($this->once()) ->method('get') ->with(Factory::DEFAULT_STRATEGY) ->willReturn($copyStrategy); $factory = new Factory($this->objectManager, []); $this->assertSame($copyStrategy, $factory->create($asset)); } public function testCreateSupported() { $asset = $this->getAsset(); $copyStrategy = $this->getMockBuilder('Magento\Framework\App\View\Asset\MaterializationStrategy\Copy') ->setMethods([]) ->getMock(); $copyStrategy->expects($this->once()) ->method('isSupported') ->with($asset) ->willReturn(false); $supportedStrategy = $this->getMockBuilder( 'Magento\Framework\App\View\Asset\MaterializationStrategy\StrategyInterface' ) ->setMethods([]) ->getMock(); $supportedStrategy->expects($this->once()) ->method('isSupported') ->with($asset) ->willReturn(true); $factory = new Factory($this->objectManager, [$copyStrategy, $supportedStrategy]); $this->assertSame($supportedStrategy, $factory->create($asset)); } public function testCreateException() { $asset = $this->getAsset(); $copyStrategy = $this->getMockBuilder('Magento\Framework\App\View\Asset\MaterializationStrategy\Copy') ->setMethods([]) ->getMock(); $copyStrategy->expects($this->once()) ->method('isSupported') ->with($asset) ->willReturn(false); $this->objectManager->expects($this->once()) ->method('get') ->with(Factory::DEFAULT_STRATEGY) ->willReturn($copyStrategy); $factory = new Factory($this->objectManager, []); $this->setExpectedException('LogicException', 'No materialization strategy is supported'); $factory->create($asset); } /** * @return \Magento\Framework\View\Asset\LocalInterface | \PHPUnit_Framework_MockObject_MockObject */ private function getAsset() { return $this->getMockBuilder('Magento\Framework\View\Asset\LocalInterface') ->setMethods([]) ->getMock(); } }
rajmahesh/magento2-master
vendor/magento/framework/App/Test/Unit/View/Asset/MaterializationStrategy/FactoryTest.php
PHP
gpl-3.0
3,355
#coding=gbk """Convert HTML page to Word 97 document This script is used during the build process of "Dive Into Python" (http://diveintopython.org/) to create the downloadable Word 97 version of the book (http://diveintopython.org/diveintopython.doc) Looks for 2 arguments on the command line. The first argument is the input (HTML) file; the second argument is the output (.doc) file. Only runs on Windows. Requires Microsoft Word 2000. Safe to run on the same file(s) more than once. The output file will be silently overwritten if it already exists. The script has been modified by xiaq (xiaqqaix@gmail.com) to fit Simplified Chinese version of Microsoft Word. """ __author__ = "Mark Pilgrim (mark@diveintopython.org)" __version__ = "$Revision: 1.2 $" __date__ = "$Date: 2004/05/05 21:57:19 $" __copyright__ = "Copyright (c) 2001 Mark Pilgrim" __license__ = "Python" import sys, os from win32com.client import gencache, constants def makeRealWordDoc(infile, outfile): word = gencache.EnsureDispatch("Word.Application") try: worddoc = word.Documents.Open(FileName=infile) try: worddoc.TablesOfContents.Add(Range=word.ActiveWindow.Selection.Range, \ RightAlignPageNumbers=1, \ UseHeadingStyles=1, \ UpperHeadingLevel=1, \ LowerHeadingLevel=2, \ IncludePageNumbers=1, \ AddedStyles='', \ UseHyperlinks=1, \ HidePageNumbersInWeb=1) worddoc.TablesOfContents(1).TabLeader = constants.wdTabLeaderDots worddoc.TablesOfContents.Format = constants.wdIndexIndent word.ActiveWindow.ActivePane.View.SeekView = constants.wdSeekCurrentPageHeader word.Selection.TypeText(Text="Dive Into Python\t\thttp://diveintopython.org/") word.ActiveWindow.ActivePane.View.SeekView = constants.wdSeekCurrentPageFooter word.NormalTemplate.AutoTextEntries("- Ò³Âë -").Insert(Where=word.ActiveWindow.Selection.Range) word.ActiveWindow.View.Type = constants.wdPrintView worddoc.TablesOfContents(1).Update() worddoc.SaveAs(FileName=outfile, \ FileFormat=constants.wdFormatDocument) finally: worddoc.Close(0) del worddoc finally: word.Quit() del word if __name__ == "__main__": infile = os.path.normpath(os.path.join(os.getcwd(), sys.argv[1])) outfile = os.path.normpath(os.path.join(os.getcwd(), sys.argv[2])) makeRealWordDoc(infile, outfile)
qilicun/python
python2/diveintopythonzh-cn-5.4b/zh_cn/makerealworddoc.py
Python
gpl-3.0
2,374
<?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Tax\Test\Unit\Model; class TaxRateManagementTest extends \PHPUnit_Framework_TestCase { /** * @var \Magento\Tax\Model\TaxRateManagement */ protected $model; /** * @var \PHPUnit_Framework_MockObject_MockObject */ protected $searchCriteriaBuilderMock; /** * @var \PHPUnit_Framework_MockObject_MockObject */ protected $filterBuilderMock; /** * @var \PHPUnit_Framework_MockObject_MockObject */ protected $taxRuleRepositoryMock; /** * @var \PHPUnit_Framework_MockObject_MockObject */ protected $taxRateRepositoryMock; protected function setUp() { $this->filterBuilderMock = $this->getMock('\Magento\Framework\Api\FilterBuilder', [], [], '', false); $this->taxRuleRepositoryMock = $this->getMock('\Magento\Tax\Api\TaxRuleRepositoryInterface', [], [], '', false); $this->taxRateRepositoryMock = $this->getMock('\Magento\Tax\Api\TaxRateRepositoryInterface', [], [], '', false); $this->searchCriteriaBuilderMock = $this->getMock( '\Magento\Framework\Api\SearchCriteriaBuilder', [], [], '', false ); $this->model = new \Magento\Tax\Model\TaxRateManagement( $this->taxRuleRepositoryMock, $this->taxRateRepositoryMock, $this->filterBuilderMock, $this->searchCriteriaBuilderMock ); } public function testGetRatesByCustomerAndProductTaxClassId() { $customerTaxClassId = 4; $productTaxClassId = 42; $rateIds = [10]; $productFilterMock = $this->getMock('\Magento\Framework\Api\Filter', [], [], '', false); $customerFilterMock = $this->getMock('\Magento\Framework\Api\Filter', [], [], '', false); $searchCriteriaMock = $this->getMock('\Magento\Framework\Api\SearchCriteria', [], [], '', false); $searchResultsMock = $this->getMock('\Magento\Tax\Api\Data\TaxRuleSearchResultsInterface', [], [], '', false); $taxRuleMock = $this->getMock('\Magento\Tax\Api\Data\TaxRuleInterface', [], [], '', false); $taxRateMock = $this->getMock('\Magento\Tax\Api\Data\TaxRateInterface', [], [], '', false); $this->filterBuilderMock->expects($this->exactly(2))->method('setField')->withConsecutive( ['customer_tax_class_ids'], ['product_tax_class_ids'] )->willReturnSelf(); $this->filterBuilderMock->expects($this->exactly(2))->method('setValue')->withConsecutive( [$this->equalTo([$customerTaxClassId])], [$this->equalTo([$productTaxClassId])] )->willReturnSelf(); $this->filterBuilderMock->expects($this->exactly(2))->method('create')->willReturnOnConsecutiveCalls( $customerFilterMock, $productFilterMock ); $this->searchCriteriaBuilderMock->expects($this->exactly(2))->method('addFilters')->withConsecutive( [[$customerFilterMock]], [[$productFilterMock]] ); $this->searchCriteriaBuilderMock->expects($this->once())->method('create')->willReturn($searchCriteriaMock); $this->taxRuleRepositoryMock->expects($this->once())->method('getList')->with($searchCriteriaMock) ->willReturn($searchResultsMock); $searchResultsMock->expects($this->once())->method('getItems')->willReturn([$taxRuleMock]); $taxRuleMock->expects($this->once())->method('getTaxRateIds')->willReturn($rateIds); $this->taxRateRepositoryMock->expects($this->once())->method('get')->with($rateIds[0]) ->willReturn($taxRateMock); $this->assertEquals( [$taxRateMock], $this->model->getRatesByCustomerAndProductTaxClassId($customerTaxClassId, $productTaxClassId) ); } }
rajmahesh/magento2-master
vendor/magento/module-tax/Test/Unit/Model/TaxRateManagementTest.php
PHP
gpl-3.0
3,944
----------------------------------- -- Area: LaLoff Amphitheater -- NPC: Ark Angel's Tiger ----------------------------------- require("scripts/zones/LaLoff_Amphitheater/TextIDs"); ----------------------------------- -- TODO: Implement shared spawning and victory system with Ark Angel's Mandragora. ----------------------------------- -- onMobSpawn Action ----------------------------------- function OnMobSpawn(mob) end; ----------------------------------- -- onMobEngaged ----------------------------------- function onMobEngaged(mob,target) local mobid = mob:getID() for member = mobid-2, mobid+5 do if (GetMobAction(member) == 16) then GetMobByID(member):updateEnmity(target); end end end; ----------------------------------- -- onMobFight Action ----------------------------------- function onMobFight(mob,target) local mobid = mob:getID() -- Party hate. Keep everybody in the fight. for member = mobid-2, mobid+5 do if (GetMobAction(member) == 16) then GetMobByID(member):updateEnmity(target); end end end; ----------------------------------- -- onMobDeath Action ----------------------------------- function onMobDeath(mob,killer) end;
will4wachter/Project1
scripts/zones/LaLoff_Amphitheater/mobs/Ark_Angel_s_Tiger.lua
Lua
gpl-3.0
1,276
<?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Config\Model\Config\Backend; class Serialized extends \Magento\Framework\App\Config\Value { /** * @return void */ protected function _afterLoad() { if (!is_array($this->getValue())) { $value = $this->getValue(); $this->setValue(empty($value) ? false : unserialize($value)); } } /** * @return $this */ public function beforeSave() { if (is_array($this->getValue())) { $this->setValue(serialize($this->getValue())); } return parent::beforeSave(); } }
rajmahesh/magento2-master
vendor/magento/module-config/Model/Config/Backend/Serialized.php
PHP
gpl-3.0
702
/* * log_ft_data.cpp * * Created on: Jul 9, 2010 * Author: dc */ #include <iostream> #include <cstdio> #include <cstdlib> #include <syslog.h> #include <signal.h> #include <unistd.h> #include <native/task.h> #include <native/timer.h> #include <boost/thread.hpp> #include <boost/ref.hpp> #include <boost/tuple/tuple.hpp> #include <barrett/detail/stacktrace.h> #include <barrett/detail/stl_utils.h> #include <barrett/units.h> #include <barrett/log.h> #include <barrett/products/product_manager.h> using namespace barrett; using detail::waitForEnter; BARRETT_UNITS_FIXED_SIZE_TYPEDEFS; typedef boost::tuple<double, cf_type, ct_type> tuple_type; bool g_Going = true; // Global void stopThreads(int sig) { g_Going = false; } void warnOnSwitchToSecondaryMode(int) { syslog(LOG_ERR, "WARNING: Switched out of RealTime. Stack-trace:"); detail::syslog_stacktrace(); std::cerr << "WARNING: Switched out of RealTime. Stack-trace in syslog.\n"; } void ftThreadEntryPoint(bool* going, double T_s, ForceTorqueSensor& fts, log::RealTimeWriter<tuple_type>* lw, int windowSize, int* numSamples, tuple_type* sum) { tuple_type t; rt_task_shadow(new RT_TASK, NULL, 10, 0); rt_task_set_mode(0, T_PRIMARY | T_WARNSW, NULL); rt_task_set_periodic(NULL, TM_NOW, T_s * 1e9); RTIME now = rt_timer_read(); RTIME lastUpdate = now; while (*going) { rt_task_wait_period(NULL); now = rt_timer_read(); fts.update(true); // Do a realtime update (no sleeping while waiting for messages) boost::get<0>(t) = ((double) now - lastUpdate) * 1e-9; boost::get<1>(t) = fts.getForce(); boost::get<2>(t) = fts.getTorque(); if (lw != NULL) { lw->putRecord(t); } else { if (*numSamples == 0) { boost::get<1>(*sum).setZero(); boost::get<2>(*sum).setZero(); } if (*numSamples < windowSize) { boost::get<1>(*sum) += boost::get<1>(t); boost::get<2>(*sum) += boost::get<2>(t); ++(*numSamples); } } lastUpdate = now; } rt_task_set_mode(T_WARNSW, 0, NULL); } void showUsageAndExit(const char* programName) { printf("Usage: %s {-f <fileName> | -a <windowSize>} [<samplePeriodInSeconds>]\n", programName); printf(" -f <fileName> Log data to a file\n"); printf(" -a <windowSize> Print statistics on segments of data\n"); exit(0); } int main(int argc, char** argv) { char* outFile = NULL; double T_s = 0.002; // Default: 500Hz bool fileMode = false; int windowSize = 0; if (argc == 4) { T_s = std::atof(argv[3]); } else if (argc != 3) { showUsageAndExit(argv[0]); } printf("Sample period: %fs\n", T_s); if (strcmp(argv[1], "-f") == 0) { fileMode = true; outFile = argv[2]; printf("Output file: %s\n", outFile); } else if (strcmp(argv[1], "-a") == 0) { fileMode = false; windowSize = atoi(argv[2]); printf("Window size: %d\n", windowSize); } else { showUsageAndExit(argv[0]); } printf("\n"); signal(SIGXCPU, &warnOnSwitchToSecondaryMode); char tmpFile[] = "/tmp/btXXXXXX"; log::RealTimeWriter<tuple_type>* lw = NULL; if (fileMode) { signal(SIGINT, &stopThreads); if (mkstemp(tmpFile) == -1) { printf("ERROR: Couldn't create temporary file!\n"); return 1; } lw = new barrett::log::RealTimeWriter<tuple_type>(tmpFile, T_s); } int numSamples = windowSize, numSets = 0; tuple_type sum; ProductManager pm; if ( !pm.foundForceTorqueSensor() ) { printf("ERROR: No Force-Torque Sensor found!\n"); return 1; } boost::thread ftThread(ftThreadEntryPoint, &g_Going, T_s, boost::ref(*pm.getForceTorqueSensor()), lw, windowSize, &numSamples, &sum); if (fileMode) { printf(">>> Logging data. Press [Ctrl-C] to exit.\n"); } else { printf(">>> Press [Enter] to start a new sample. Press [Ctrl-C] to exit.\n\n"); printf("ID,FX,FY,FZ,TX,TY,TZ"); while (g_Going) { waitForEnter(); numSamples = 0; while (numSamples != windowSize) { usleep(100000); } boost::get<1>(sum) /= windowSize; boost::get<2>(sum) /= windowSize; printf("%d,%f,%f,%f,%f,%f,%f", ++numSets, boost::get<1>(sum)[0], boost::get<1>(sum)[1], boost::get<1>(sum)[2], boost::get<2>(sum)[0], boost::get<2>(sum)[1], boost::get<2>(sum)[2]); } } ftThread.join(); printf("\n"); if (fileMode) { delete lw; log::Reader<tuple_type> lr(tmpFile); lr.exportCSV(outFile); printf("Output written to %s.\n", outFile); std::remove(tmpFile); } return 0; }
jhu-lcsr-forks/barrett
sandbox/log_ft_data.cpp
C++
gpl-3.0
4,369
/* Lehrstuhl fuer Energietransport und -speicherung UNIVERSITAET DUISBURG-ESSEN ef.Ruhr E-DeMa AP-2 Wissenschaftlicher Mitarbeiter: Dipl.-Ing. Holger Kellerbauer Das Linklayer-Paket "powerline" umfasst eine Sammlung von Modulen, die zur Simulation von Powerline- Uebertragungsstrecken in intelligenten Energieverteilsystemen programmiert worden sind. Dieser Quellcode wurde erstellt von Dipl.-Ing. Holger Kellerbauer - er basiert auf dem INET Framework-Modul "Linklayer/Ethernet" von Andras Varga (c) 2003. Er ist gesitiges Eigentum des Lehrstuhles fuer Energietransport und -speicherung der Universitaet Duisburg-Essen, und darf ohne Genehmigung weder weitergegeben, noch verwendet werden. */ #include <stdio.h> #include <string.h> #include <omnetpp.h> #include "Adapter_PLC_Base.h" #include "IPassiveQueue.h" #include "IInterfaceTable.h" #include "InterfaceTableAccess.h" //static const double SPEED_OF_LIGHT = 200000000.0; // TODO: Changed by Ramon; already defined in INETDefs.h Adapter_PLC_Base::Adapter_PLC_Base() { nb = NULL; queueModule = NULL; interfaceEntry = NULL; endTxMsg = endIFGMsg = endPauseMsg = NULL; } Adapter_PLC_Base::~Adapter_PLC_Base() { cancelAndDelete(endTxMsg); cancelAndDelete(endIFGMsg); cancelAndDelete(endPauseMsg); } void Adapter_PLC_Base::initialize() { physOutGate = gate("phys$o"); initializeFlags(); initializeTxrate(); WATCH(txrate); initializeMACAddress(); initializeQueueModule(); initializeNotificationBoard(); initializeStatistics(); /* The adapter has no higher layer! */ // registerInterface(txrate); // needs MAC address // initialize queue txQueue.setName("txQueue"); // initialize self messages endTxMsg = new cMessage("EndTransmission", ENDTRANSMISSION); endIFGMsg = new cMessage("EndIFG", ENDIFG); endPauseMsg = new cMessage("EndPause", ENDPAUSE); // initialize states transmitState = TX_IDLE_STATE; receiveState = RX_IDLE_STATE; WATCH(transmitState); WATCH(receiveState); // initalize pause pauseUnitsRequested = 0; WATCH(pauseUnitsRequested); // initialize queue limit txQueueLimit = par("txQueueLimit"); WATCH(txQueueLimit); } void Adapter_PLC_Base::initializeQueueModule() { if (par("queueModule").stringValue()[0]) { cModule *module = getParentModule()->getSubmodule(par("queueModule").stringValue()); queueModule = check_and_cast<IPassiveQueue *>(module); if (COMMENTS_ON) EV << "Requesting first frame from queue module\n"; queueModule->requestPacket(); } } void Adapter_PLC_Base::initializeMACAddress() { const char *addrstr = par("address"); if (!strcmp(addrstr,"auto")) { // assign automatic address address = MACAddress::generateAutoAddress(); // change module parameter from "auto" to concrete address par("address").setStringValue(address.str().c_str()); } else { address.setAddress(addrstr); } } void Adapter_PLC_Base::initializeNotificationBoard() { hasSubscribers = false; if (interfaceEntry) { nb = NotificationBoardAccess().getIfExists(); notifDetails.setInterfaceEntry(interfaceEntry); nb->subscribe(this, NF_SUBSCRIBERLIST_CHANGED); updateHasSubcribers(); } } void Adapter_PLC_Base::initializeFlags() { // initialize connected flag connected = physOutGate->getPathEndGate()->isConnected(); if (!connected) if (COMMENTS_ON) EV << "MAC not connected to a network.\n"; WATCH(connected); // TODO: this should be settable from the gui // initialize disabled flag // Note: it is currently not supported to enable a disabled MAC at runtime. // Difficulties: (1) autoconfig (2) how to pick up channel state (free, tx, collision etc) disabled = false; WATCH(disabled); // initialize promiscuous flag promiscuous = par("promiscuous"); WATCH(promiscuous); } void Adapter_PLC_Base::initializeStatistics() { framesSentInBurst = 0; bytesSentInBurst = 0; numFramesSent = numFramesReceivedOK = numBytesSent = numBytesReceivedOK = 0; numFramesPassedToHL = numDroppedBitError = numDroppedNotForUs = 0; numFramesFromHL = numDroppedIfaceDown = 0; numPauseFramesRcvd = numPauseFramesSent = 0; WATCH(framesSentInBurst); WATCH(bytesSentInBurst); WATCH(numFramesSent); WATCH(numFramesReceivedOK); WATCH(numBytesSent); WATCH(numBytesReceivedOK); WATCH(numFramesFromHL); WATCH(numDroppedIfaceDown); WATCH(numDroppedBitError); WATCH(numDroppedNotForUs); WATCH(numFramesPassedToHL); WATCH(numPauseFramesRcvd); WATCH(numPauseFramesSent); /* numFramesSentVector.setName("framesSent"); numFramesReceivedOKVector.setName("framesReceivedOK"); numBytesSentVector.setName("bytesSent"); numBytesReceivedOKVector.setName("bytesReceivedOK"); numDroppedIfaceDownVector.setName("framesDroppedIfaceDown"); numDroppedBitErrorVector.setName("framesDroppedBitError"); numDroppedNotForUsVector.setName("framesDroppedNotForUs"); numFramesPassedToHLVector.setName("framesPassedToHL"); numPauseFramesRcvdVector.setName("pauseFramesRcvd"); numPauseFramesSentVector.setName("pauseFramesSent"); */ } void Adapter_PLC_Base::registerInterface(double txrate) { IInterfaceTable *ift = InterfaceTableAccess().getIfExists(); if (!ift) return; // interfaceEntry = new InterfaceEntry(); interfaceEntry = new InterfaceEntry(NULL); // TODO: Changed by Ramon // interface name: our module name without special characters ([]) char *interfaceName = new char[strlen(getParentModule()->getFullName())+1]; char *d=interfaceName; for (const char *s=getParentModule()->getFullName(); *s; s++) if (isalnum(*s)) *d++ = *s; *d = '\0'; interfaceEntry->setName(interfaceName); delete [] interfaceName; // data rate interfaceEntry->setDatarate(txrate); // generate a link-layer address to be used as interface token for IPv6 interfaceEntry->setMACAddress(address); interfaceEntry->setInterfaceToken(address.formInterfaceIdentifier()); //InterfaceToken token(0, simulation.getUniqueNumber(), 64); //interfaceEntry->setInterfaceToken(token); // MTU: typical values are 576 (Internet de facto), 1500 (PLC-friendly), // 4000 (on some point-to-point links), 4470 (Cisco routers default, FDDI compatible) interfaceEntry->setMtu(par("mtu")); // capabilities interfaceEntry->setMulticast(true); interfaceEntry->setBroadcast(true); // add // ift->addInterface(interfaceEntry, this); ift->addInterface(interfaceEntry); // TODO: Changed by Ramon } bool Adapter_PLC_Base::checkDestinationAddress(PlcFrame *frame) { /* // If not set to promiscuous = on, then checks if received frame contains destination MAC address // matching port's MAC address, also checks if broadcast bit is set if (!promiscuous && !frame->getDest().isBroadcast() && !frame->getDest().equals(address)) { if (COMMENTS_ON) EV << "Frame `" << frame->getName() <<"' not destined to us, discarding\n"; numDroppedNotForUs++; numDroppedNotForUsVector.record(numDroppedNotForUs); delete frame; return false; } */ if (COMMENTS_ON) EV << "Since I'm an adapter, I will pass through every frame!" << endl; return true; } void Adapter_PLC_Base::calculateParameters() { if (disabled || !connected) { bitTime = slotTime = interFrameGap = jamDuration = shortestFrameDuration = 0; carrierExtension = frameBursting = false; return; } // CHANGE --------------------------------------------------------------------------------------- /* Diesen Abschnitt mus man ausblenden, da er die Uebertragungsraten auf wenige, zulaessige reduziert, was fuer Powerline absolut nicht zutreffend ist. if (txrate != PLC_TXRATE && txrate != FAST_PLC_TXRATE && txrate != GIGABIT_PLC_TXRATE && txrate != FAST_GIGABIT_PLC_TXRATE) { error("nonstandard transmission rate %g, must be %g, %g, %g or %g bit/sec", txrate, PLC_TXRATE, FAST_PLC_TXRATE, GIGABIT_PLC_TXRATE, FAST_GIGABIT_PLC_TXRATE); } */ double temp = ROBO_DATARATE * 1000000; if (txrate <= temp) { if (COMMENTS_ON) EV << "Measured datarate is estimated below ROBO datarate." << endl; if (COMMENTS_ON) EV << "ROBO datarate is the lowest datarate possible." << endl; if (COMMENTS_ON) EV << "TX rate will be set to ROBO datarate." << endl; txrate = ROBO_DATARATE * 1000000; } if (txrate <= ROBO_DATARATE || txrate >= 1000000000) txrate = ROBO_DATARATE; bitTime = 1/(double)txrate; if (COMMENTS_ON) EV << endl << "Bit time is calculated to " << bitTime << "s." << endl; /* Dieser Abschnitt muss ausgeblendet werden, da die Berechnung der Parameter fuer Powerline-Uebertragungen etwas anders von Statten gehen muss. // set slot time if (txrate==PLC_TXRATE || txrate==FAST_PLC_TXRATE) slotTime = SLOT_TIME; else slotTime = GIGABIT_SLOT_TIME; // only if Gigabit PLC frameBursting = (txrate==GIGABIT_PLC_TXRATE || txrate==FAST_GIGABIT_PLC_TXRATE); carrierExtension = (slotTime == GIGABIT_SLOT_TIME && !duplexMode); interFrameGap = INTERFRAME_GAP_BITS/(double)txrate; jamDuration = 8*JAM_SIGNAL_BYTES*bitTime; shortestFrameDuration = carrierExtension ? GIGABIT_MIN_FRAME_WITH_EXT : MIN_PLC_FRAME; */ // set slot time slotTime = 512/txrate; if (COMMENTS_ON) EV << "Slot time is set to " << slotTime << "s." << endl; // only if fast PLC // Ein Burst darf nicht laenger als 5000 usec sein. 4 x MaxFramedauer < 5000 usec => FrameBursting = true! simtime_t k = 0.005; /* s */ simtime_t x = (simtime_t)(bitTime * (MAX_PLC_FRAME * 8 /* bytes */) * 4); if (COMMENTS_ON) EV << "Calculation for frame bursting resulted in " << x << " sec." << endl; if (COMMENTS_ON) EV << "Threshold for frame bursting is " << k << " sec." << endl; if (x < k) { frameBursting = true; } else { frameBursting = false; } if (COMMENTS_ON) EV << "Frame bursting is at " << frameBursting << "." << endl; carrierExtension = false; // not available for PLC if (frameBursting) { interFrameGap = /* INTERFRAME_GAP_BITS/(double)txrate; */ CIFS / 1000000; } else { interFrameGap = /* INTERFRAME_GAP_BITS/(double)txrate; */ RIFS / 1000000; } if (COMMENTS_ON) EV << "Inter frame gap is at " << interFrameGap << "s." << endl; jamDuration = 8*JAM_SIGNAL_BYTES*bitTime; if (COMMENTS_ON) EV << "Jam duration is at " << jamDuration << "s." << endl; shortestFrameDuration = MIN_PLC_FRAME; // ---------------------------------------------------------------------------------------------- } void Adapter_PLC_Base::printParameters() { // Dump parameters if (COMMENTS_ON) EV << "MAC address: " << address << (promiscuous ? ", promiscuous mode" : "") << endl; if (COMMENTS_ON) EV << "txrate: " << txrate << ", " << (duplexMode ? "duplex" : "half-duplex") << endl; #if 0 EV << "bitTime: " << bitTime << endl; EV << "carrierExtension: " << carrierExtension << endl; EV << "frameBursting: " << frameBursting << endl; EV << "slotTime: " << slotTime << endl; EV << "interFrameGap: " << interFrameGap << endl; EV << endl; #endif } void Adapter_PLC_Base::processFrameFromUpperLayer(PlcFrame *frame) { if (COMMENTS_ON) EV << "Received frame from upper layer: " << frame << endl; if (frame->getDest().equals(address)) { error("logic error: frame %s from higher layer has local MAC address as dest (%s)", frame->getFullName(), frame->getDest().str().c_str()); } if (frame->getByteLength() > MAX_PLC_FRAME) error("packet from higher layer (%d bytes) exceeds maximum PLC frame size (%d)", frame->getByteLength(), MAX_PLC_FRAME); // must be PlcFrame (or PlcPauseFrame) from upper layer bool isPauseFrame = (dynamic_cast<PlcPauseFrame*>(frame)!=NULL); if (!isPauseFrame) { numFramesFromHL++; if (txQueueLimit && txQueue.length()>txQueueLimit) error("txQueue length exceeds %d -- this is probably due to " "a bogus app model generating excessive traffic " "(or if this is normal, increase txQueueLimit!)", txQueueLimit); // fill in src address if not set if (frame->getSrc().isUnspecified()) frame->setSrc(address); // store frame and possibly begin transmitting if (COMMENTS_ON) EV << "Packet " << frame << " arrived from higher layers, enqueueing\n"; txQueue.insert(frame); } else { if (COMMENTS_ON) EV << "PAUSE received from higher layer\n"; // PAUSE frames enjoy priority -- they're transmitted before all other frames queued up if (!txQueue.empty()) txQueue.insertBefore(txQueue.front(), frame); // front() frame is probably being transmitted else txQueue.insert(frame); } } void Adapter_PLC_Base::processMsgFromNetwork(cPacket *frame) { if (COMMENTS_ON) EV << "Received frame from network: " << frame << endl; // frame must be PlcFrame or PlcJam if (dynamic_cast<PlcFrame*>(frame)==NULL && dynamic_cast<PlcJam*>(frame)==NULL) error("message with unexpected message class '%s' arrived from network (name='%s')", frame->getClassName(), frame->getFullName()); // detect cable length violation in half-duplex mode if (!duplexMode && simTime()-frame->getSendingTime()>=shortestFrameDuration) error("very long frame propagation time detected, maybe cable exceeds maximum allowed length? " "(%lgs corresponds to an approx. %lgm cable)", SIMTIME_STR(simTime() - frame->getSendingTime()), SIMTIME_STR((simTime() - frame->getSendingTime())*SPEED_OF_LIGHT)); } void Adapter_PLC_Base::frameReceptionComplete(PlcFrame *frame) { int pauseUnits; PlcPauseFrame *pauseFrame; if ((pauseFrame=dynamic_cast<PlcPauseFrame*>(frame))!=NULL) { pauseUnits = pauseFrame->getPauseTime(); delete frame; numPauseFramesRcvd++; // numPauseFramesRcvdVector.record(numPauseFramesRcvd); processPauseCommand(pauseUnits); } else { processReceivedDataFrame((PlcFrame *)frame); } } void Adapter_PLC_Base::processReceivedDataFrame(PlcFrame *frame) { // bit errors if (frame->hasBitError()) { numDroppedBitError++; // numDroppedBitErrorVector.record(numDroppedBitError); delete frame; return; } // strip preamble and SFD frame->addByteLength(-PREAMBLE_BYTES-SFD_BYTES); // statistics numFramesReceivedOK++; numBytesReceivedOK += frame->getByteLength(); // numFramesReceivedOKVector.record(numFramesReceivedOK); // numBytesReceivedOKVector.record(numBytesReceivedOK); if (!checkDestinationAddress(frame)) return; numFramesPassedToHL++; // numFramesPassedToHLVector.record(numFramesPassedToHL); // pass up to upper layer send(frame, "upperLayerOut"); } void Adapter_PLC_Base::processPauseCommand(int pauseUnits) { if (transmitState==TX_IDLE_STATE) { if (COMMENTS_ON) EV << "PAUSE frame received, pausing for " << pauseUnitsRequested << " time units\n"; if (pauseUnits>0) scheduleEndPausePeriod(pauseUnits); } else if (transmitState==PAUSE_STATE) { if (COMMENTS_ON) EV << "PAUSE frame received, pausing for " << pauseUnitsRequested << " more time units from now\n"; cancelEvent(endPauseMsg); if (pauseUnits>0) scheduleEndPausePeriod(pauseUnits); } else { // transmitter busy -- wait until it finishes with current frame (endTx) // and then it'll go to PAUSE state if (COMMENTS_ON) EV << "PAUSE frame received, storing pause request\n"; pauseUnitsRequested = pauseUnits; } } void Adapter_PLC_Base::handleEndIFGPeriod() { if (transmitState!=WAIT_IFG_STATE) error("Not in WAIT_IFG_STATE at the end of IFG period"); if (txQueue.empty()) error("End of IFG and no frame to transmit"); // End of IFG period, okay to transmit, if Rx idle OR duplexMode cPacket *frame = (cPacket *)txQueue.front(); if (COMMENTS_ON) EV << "IFG elapsed, now begin transmission of frame " << frame << endl; // CHANGE ---------------------------------------------------------------------------- // We skip carrier extension, because there is no for plc communications /* // Perform carrier extension if in Gigabit PLC if (carrierExtension && frame->getByteLength() < GIGABIT_MIN_FRAME_WITH_EXT) { EV << "Performing carrier extension of small frame\n"; frame->setByteLength(GIGABIT_MIN_FRAME_WITH_EXT); } */ // ----------------------------------------------------------------------------------- // start frame burst, if enabled if (frameBursting) { if (COMMENTS_ON) EV << "Starting frame burst\n"; framesSentInBurst = 0; bytesSentInBurst = 0; } } void Adapter_PLC_Base::handleEndTxPeriod() { // we only get here if transmission has finished successfully, without collision if (transmitState!=TRANSMITTING_STATE || (!duplexMode && receiveState!=RX_IDLE_STATE)) error("End of transmission, and incorrect state detected"); if (txQueue.empty()) error("Frame under transmission cannot be found"); // get frame from buffer cPacket *frame = (cPacket *)txQueue.pop(); numFramesSent++; numBytesSent += frame->getByteLength(); // numFramesSentVector.record(numFramesSent); // numBytesSentVector.record(numBytesSent); if (dynamic_cast<PlcPauseFrame*>(frame)!=NULL) { numPauseFramesSent++; // numPauseFramesSentVector.record(numPauseFramesSent); } if (COMMENTS_ON) EV << "Transmission of " << frame << " successfully completed\n"; delete frame; } void Adapter_PLC_Base::handleEndPausePeriod() { if (transmitState != PAUSE_STATE) error("At end of PAUSE not in PAUSE_STATE!"); if (COMMENTS_ON) EV << "Pause finished, resuming transmissions\n"; beginSendFrames(); } void Adapter_PLC_Base::processMessageWhenNotConnected(cMessage *msg) { if (COMMENTS_ON) EV << "Interface is not connected -- dropping packet " << msg << endl; delete msg; numDroppedIfaceDown++; } void Adapter_PLC_Base::processMessageWhenDisabled(cMessage *msg) { if (COMMENTS_ON) EV << "MAC is disabled -- dropping message " << msg << endl; delete msg; } void Adapter_PLC_Base::scheduleEndIFGPeriod() { // CHANGE ------------------------------------------------------------------------------ /* Anders als bei CSMA/CD (Ethernet) wird bei PLC CSMA/CA angewendet. Hierzu wird zu der "normalen" Wartezeit nach der Feststellung, dass das Medium nicht belegt ist, eine zufaellige zusaetzliche Wartezeit addiert, die ein Vielfaches von 1.28 us ist (dieser Wert konnte beim Modemhersteller devolo erfragt werden). Hierdurch werden Kollisionen noch unwahrscheinlicher, da nach Freigabe nicht alle Modems mit Sendewunsch gleichzeitig versuchen, das Medium zu belegen. */ // For CSMA/CA, we have to add a random selected additional wait time int gap = CSMA_CA_MAX_ADDITIONAL_WAIT_TIME; int x = rand()%10; x = x * gap; simtime_t additional_wait_time = (simtime_t) x/1000; if (COMMENTS_ON) EV << "End of IFG period is scheduled at t=" << simTime()+interFrameGap +additional_wait_time << "." << endl; // ------------------------------------------------------------------------------------- scheduleAt(simTime()+interFrameGap +additional_wait_time, endIFGMsg); transmitState = WAIT_IFG_STATE; } // CHANGE ------------------------------------------------------------------------------ void Adapter_PLC_Base::scheduleEndIFGPeriod(int priority) /* Um trotz des durch CSMA/CA etwas zufaelligerem Mediumzugriff noch zu gewaehrleisten, das wichtige Informationen zur Aufrechterhaltung der Verbindungen gegenueber einfachem Datenverkehr bevorzugt werden, gibt es nach jeder Mediumsfreigabe die "Priority resolution period". In vier Stufen erhalten zunaechst die Modems mit wichtigen Frames den Vorzug. Die Periode wird dazu in 4 Teilabschnitte geteilt, und die durch CSMA/CA erweiterte Wartezeit wird innerhalb der Fenster aufgeloest. [----------------------------- Priority resolution period ------------------------------------] t-> [Window 1 - Priority 4] [Window 2 - Priority 3] [Window 3 - Priority 2] [Window 4 - Priority 1] */ { if (COMMENTS_ON) EV << "Scheduling end of IFG period ..." << endl; if (COMMENTS_ON) EV << "Priority based traffic detected. Priority is " << priority << "." << endl; // the higher the priority, the faster the channel access double whole_period = PRIORITY_RESOLUTION_PERIOD; if (COMMENTS_ON) EV << "Whole priority resolution period: " << whole_period << " micro sec" << endl; double quarter_period = whole_period/4; if (COMMENTS_ON) EV << "Quarter of the priority resolution period: " << quarter_period << " micro sec" << endl; double basic_priority_period = whole_period - (priority * quarter_period); if (COMMENTS_ON) EV << "Basic priority period for a priority of " << priority << " is: " << basic_priority_period << " micro sec" << endl; double fluctuation = quarter_period * 0.9; // 16,12 us if (COMMENTS_ON) EV << "The fluctuations are at maximum: " << fluctuation << " micro sec" << endl; // For CSMA/CA, we have to add a random selected additional wait time int gap = CSMA_CA_MAX_ADDITIONAL_WAIT_TIME; int int_k = rand()%11; // 0 us to 14,08 us if (COMMENTS_ON) EV << "Diceroll resulted in " << int_k << "." << endl; double m = fluctuation - (int_k * gap); double x = (m+basic_priority_period)/1000000; simtime_t priority_wait_time = (simtime_t) x; // us if (COMMENTS_ON) EV << "This time, the priority based additional wait time is calculated to: " << priority_wait_time * 1000000 << " micro sec" << endl; simtime_t complete_wait_time = interFrameGap+priority_wait_time; if (COMMENTS_ON) EV << "End of IFG period is scheduled at t=" << simTime()+complete_wait_time << " micro sec." << endl << endl; scheduleAt(simTime()+complete_wait_time, endIFGMsg); transmitState = WAIT_IFG_STATE; } // ------------------------------------------------------------------------------------- void Adapter_PLC_Base::scheduleEndTxPeriod(cPacket *frame) { scheduleAt(simTime()+frame->getBitLength()*bitTime, endTxMsg); transmitState = TRANSMITTING_STATE; } void Adapter_PLC_Base::scheduleEndPausePeriod(int pauseUnits) { // length is interpreted as 512-bit-time units simtime_t pausePeriod = pauseUnits*PAUSE_BITTIME*bitTime; scheduleAt(simTime()+pausePeriod, endPauseMsg); transmitState = PAUSE_STATE; } bool Adapter_PLC_Base::checkAndScheduleEndPausePeriod() { if (pauseUnitsRequested>0) { // if we received a PAUSE frame recently, go into PAUSE state if (COMMENTS_ON) EV << "Going to PAUSE mode for " << pauseUnitsRequested << " time units\n"; scheduleEndPausePeriod(pauseUnitsRequested); pauseUnitsRequested = 0; return true; } return false; } void Adapter_PLC_Base::beginSendFrames() { if (!txQueue.empty()) { // Other frames are queued, therefore wait IFG period and transmit next frame if (COMMENTS_ON) EV << "Transmit next frame in output queue, after IFG period\n"; scheduleEndIFGPeriod(); } else { transmitState = TX_IDLE_STATE; if (queueModule) { // tell queue module that we've become idle if (COMMENTS_ON) EV << "Requesting another frame from queue module\n"; queueModule->requestPacket(); } else { // No more frames set transmitter to idle if (COMMENTS_ON) EV << "No more frames to send, transmitter set to idle\n"; } } } void Adapter_PLC_Base::fireChangeNotification(int type, cPacket *msg) { if (nb) { notifDetails.setPacket(msg); nb->fireChangeNotification(type, &notifDetails); } } void Adapter_PLC_Base::finish() { /* if (!disabled) { simtime_t t = simTime(); recordScalar("simulated time", t); recordScalar("txrate (Mb)", txrate/1000000); recordScalar("full duplex", duplexMode); recordScalar("frames sent", numFramesSent); recordScalar("frames rcvd", numFramesReceivedOK); recordScalar("bytes sent", numBytesSent); recordScalar("bytes rcvd", numBytesReceivedOK); recordScalar("frames from higher layer", numFramesFromHL); recordScalar("frames from higher layer dropped (iface down)", numDroppedIfaceDown); recordScalar("frames dropped (bit error)", numDroppedBitError); recordScalar("frames dropped (not for us)", numDroppedNotForUs); recordScalar("frames passed up to HL", numFramesPassedToHL); recordScalar("PAUSE frames sent", numPauseFramesSent); recordScalar("PAUSE frames rcvd", numPauseFramesRcvd); if (t>0) { recordScalar("frames/sec sent", numFramesSent/t); recordScalar("frames/sec rcvd", numFramesReceivedOK/t); recordScalar("bits/sec sent", 8*numBytesSent/t); recordScalar("bits/sec rcvd", 8*numBytesReceivedOK/t); } } */ } void Adapter_PLC_Base::updateDisplayString() { // icon coloring const char *color; if (receiveState==RX_COLLISION_STATE) color = "red"; else if (transmitState==TRANSMITTING_STATE) color = "yellow"; else if (transmitState==JAMMING_STATE) color = "red"; else if (receiveState==RECEIVING_STATE) color = "#4040ff"; else if (transmitState==BACKOFF_STATE) color = "white"; else if (transmitState==PAUSE_STATE) color = "gray"; else color = ""; getDisplayString().setTagArg("i",1,color); if (!strcmp(getParentModule()->getClassName(),"PLCInterface")) getParentModule()->getDisplayString().setTagArg("i",1,color); // connection coloring updateConnectionColor(transmitState); #if 0 // this code works but didn't turn out to be very useful const char *txStateName; switch (transmitState) { case TX_IDLE_STATE: txStateName="IDLE"; break; case WAIT_IFG_STATE: txStateName="WAIT_IFG"; break; case TRANSMITTING_STATE: txStateName="TX"; break; case JAMMING_STATE: txStateName="JAM"; break; case BACKOFF_STATE: txStateName="BACKOFF"; break; case PAUSE_STATE: txStateName="PAUSE"; break; default: error("wrong tx state"); } const char *rxStateName; switch (receiveState) { case RX_IDLE_STATE: rxStateName="IDLE"; break; case RECEIVING_STATE: rxStateName="RX"; break; case RX_COLLISION_STATE: rxStateName="COLL"; break; default: error("wrong rx state"); } char buf[80]; sprintf(buf, "tx:%s rx: %s\n#boff:%d #cTx:%d", txStateName, rxStateName, backoffs, numConcurrentTransmissions); getDisplayString().setTagArg("t",0,buf); #endif } void Adapter_PLC_Base::updateConnectionColor(int txState) { const char *color; if (txState==TRANSMITTING_STATE) color = "yellow"; else if (txState==JAMMING_STATE || txState==BACKOFF_STATE) color = "red"; else color = ""; cGate *g = physOutGate; while (g && g->getType()==cGate::OUTPUT) { g->getDisplayString().setTagArg("o",0,color); g->getDisplayString().setTagArg("o",1, color[0] ? "3" : "1"); g = g->getNextGate(); } } void Adapter_PLC_Base::receiveChangeNotification(int category, const cPolymorphic *) { if (category==NF_SUBSCRIBERLIST_CHANGED) updateHasSubcribers(); }
hoferr/SG_OMNeTpp
plc/src/Adapter_PLC_Base.cc
C++
gpl-3.0
28,190
/* * Copyright (C) 2008-2009 Martin Willi * Hochschule fuer Technik Rapperswil * * 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. See <http://www.fsf.org/copyleft/gpl.txt>. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. */ #include "eap_aka_3gpp2_card.h" #include <daemon.h> typedef struct private_eap_aka_3gpp2_card_t private_eap_aka_3gpp2_card_t; /** * Private data of an eap_aka_3gpp2_card_t object. */ struct private_eap_aka_3gpp2_card_t { /** * Public eap_aka_3gpp2_card_t interface. */ eap_aka_3gpp2_card_t public; /** * AKA functions */ eap_aka_3gpp2_functions_t *f; /** * do sequence number checking? */ bool seq_check; /** * SQN stored in this pseudo-USIM */ char sqn[AKA_SQN_LEN]; }; /** * Functions from eap_aka_3gpp2_provider.c */ bool eap_aka_3gpp2_get_k(identification_t *id, char k[AKA_K_LEN]); void eap_aka_3gpp2_get_sqn(char sqn[AKA_SQN_LEN], int offset); METHOD(simaka_card_t, get_quintuplet, status_t, private_eap_aka_3gpp2_card_t *this, identification_t *id, char rand[AKA_RAND_LEN], char autn[AKA_AUTN_LEN], char ck[AKA_CK_LEN], char ik[AKA_IK_LEN], char res[AKA_RES_MAX], int *res_len) { char *amf, *mac; char k[AKA_K_LEN], ak[AKA_AK_LEN], sqn[AKA_SQN_LEN], xmac[AKA_MAC_LEN]; if (!eap_aka_3gpp2_get_k(id, k)) { DBG1(DBG_IKE, "no EAP key found for %Y to authenticate with AKA", id); return FAILED; } /* AUTN = SQN xor AK | AMF | MAC */ DBG3(DBG_IKE, "received autn %b", autn, AKA_AUTN_LEN); DBG3(DBG_IKE, "using K %b", k, AKA_K_LEN); DBG3(DBG_IKE, "using rand %b", rand, AKA_RAND_LEN); memcpy(sqn, autn, AKA_SQN_LEN); amf = autn + AKA_SQN_LEN; mac = autn + AKA_SQN_LEN + AKA_AMF_LEN; /* XOR anonymity key AK into SQN to decrypt it */ if (!this->f->f5(this->f, k, rand, ak)) { return FAILED; } DBG3(DBG_IKE, "using ak %b", ak, AKA_AK_LEN); memxor(sqn, ak, AKA_SQN_LEN); DBG3(DBG_IKE, "using sqn %b", sqn, AKA_SQN_LEN); /* calculate expected MAC and compare against received one */ if (!this->f->f1(this->f, k, rand, sqn, amf, xmac)) { return FAILED; } if (!memeq_const(mac, xmac, AKA_MAC_LEN)) { DBG1(DBG_IKE, "received MAC does not match XMAC"); DBG3(DBG_IKE, "MAC %b\nXMAC %b", mac, AKA_MAC_LEN, xmac, AKA_MAC_LEN); return FAILED; } if (this->seq_check && memcmp(this->sqn, sqn, AKA_SQN_LEN) >= 0) { DBG3(DBG_IKE, "received SQN %b\ncurrent SQN %b", sqn, AKA_SQN_LEN, this->sqn, AKA_SQN_LEN); return INVALID_STATE; } /* update stored SQN to the received one */ memcpy(this->sqn, sqn, AKA_SQN_LEN); /* CK/IK, calculate RES */ if (!this->f->f3(this->f, k, rand, ck) || !this->f->f4(this->f, k, rand, ik) || !this->f->f2(this->f, k, rand, res)) { return FAILED; } *res_len = AKA_RES_MAX; return SUCCESS; } METHOD(simaka_card_t, resync, bool, private_eap_aka_3gpp2_card_t *this, identification_t *id, char rand[AKA_RAND_LEN], char auts[AKA_AUTS_LEN]) { char amf[AKA_AMF_LEN], k[AKA_K_LEN], aks[AKA_AK_LEN], macs[AKA_MAC_LEN]; if (!eap_aka_3gpp2_get_k(id, k)) { DBG1(DBG_IKE, "no EAP key found for %Y to resync AKA", id); return FALSE; } /* AMF is set to zero in resync */ memset(amf, 0, AKA_AMF_LEN); if (!this->f->f5star(this->f, k, rand, aks) || !this->f->f1star(this->f, k, rand, this->sqn, amf, macs)) { return FALSE; } /* AUTS = SQN xor AKS | MACS */ memcpy(auts, this->sqn, AKA_SQN_LEN); memxor(auts, aks, AKA_AK_LEN); memcpy(auts + AKA_AK_LEN, macs, AKA_MAC_LEN); return TRUE; } METHOD(eap_aka_3gpp2_card_t, destroy, void, private_eap_aka_3gpp2_card_t *this) { free(this); } /** * See header */ eap_aka_3gpp2_card_t *eap_aka_3gpp2_card_create(eap_aka_3gpp2_functions_t *f) { private_eap_aka_3gpp2_card_t *this; INIT(this, .public = { .card = { .get_triplet = (void*)return_false, .get_quintuplet = _get_quintuplet, .resync = _resync, .get_pseudonym = (void*)return_null, .set_pseudonym = (void*)nop, .get_reauth = (void*)return_null, .set_reauth = (void*)nop, }, .destroy = _destroy, }, .f = f, .seq_check = lib->settings->get_bool(lib->settings, "%s.plugins.eap-aka-3gpp2.seq_check", #ifdef SEQ_CHECK /* handle legacy compile time configuration as default */ TRUE, #else /* !SEQ_CHECK */ FALSE, #endif /* SEQ_CHECK */ lib->ns), ); eap_aka_3gpp2_get_sqn(this->sqn, 0); return &this->public; }
ccwf2006/one-key-ikev2-vpn
strongswan-5.5.1/src/libcharon/plugins/eap_aka_3gpp2/eap_aka_3gpp2_card.c
C
gpl-3.0
4,765
<?php /* ########################################################################## # # # Version 4 / / / # # -----------__---/__---__------__----__---/---/- # # | /| / /___) / ) (_ ` / ) /___) / / # # _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___ # # Free Content / Management System # # / # # # # # # Copyright 2005-2015 by webspell.org # # # # visit webSPELL.org, webspell.info to get webSPELL for free # # - Script runs under the GNU GENERAL PUBLIC LICENSE # # - It's NOT allowed to remove this copyright-tag # # -- http://www.fsf.org/licensing/licenses/gpl.html # # # # Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at), # # Far Development by Development Team - webspell.org # # # # visit webspell.org # # # ########################################################################## */ $language_array = Array( /* do not edit above this line */ 'access_denied'=>'Hyrja e Ndaluar', 'add_rank'=>'shtoni Renditjen', 'actions'=>'Veprimet', 'delete'=>'fshij', 'edit_rank'=>'edito Renditjen', 'information_incomplete'=>'Disa të dhëna mungojnë.', 'max_posts'=>'max. Postimet', 'min_posts'=>'min. Postimet', 'new_rank'=>'Renditja e re', 'rank_icon'=>'Renditja Ikon-ave', 'rank_name'=>'Renditja Emri', 'really_delete'=>'Vërtet e fshini këtë Lidhje?', 'transaction_invalid'=>'ID e tranzaksionit e pavlefshme', 'update'=>'përditësim', 'user_ranks'=>'Renditja Përdoruesve' );
nerdiabet/webSPELL
languages/sq/admin/ranks.php
PHP
gpl-3.0
2,358
/** * Copyright (C) 2015 Envidatec GmbH <info@envidatec.com> * * This file is part of JECommons. * * JECommons 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 in version 3. * * JECommons 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 * JECommons. If not, see <http://www.gnu.org/licenses/>. * * JECommons is part of the OpenJEVis project, further project information are * published at <http://www.OpenJEVis.org/>. */ package org.jevis.commons.dataprocessing.v2; import java.util.List; /** * * @author Florian Simon */ public interface Task { void setDataProcessor(Function dp); Function getDataProcessor(); void setDependency(List<Task> dps); List<Task> getDependency(); Result getResult(); }
AIT-JEVis/JECommons
src/main/java/org/jevis/commons/dataprocessing/v2/Task.java
Java
gpl-3.0
1,111
import leon._ import lazyeval._ import lang._ import annotation._ import collection._ import instrumentation._ import math._ /** * A constant time deque based on Okasaki's implementation: Fig.8.4 Pg. 112. * Here, both front and rear streams are scheduled. * We require both the front and the rear streams to be of almost equal * size. If not, we lazily rotate the streams. * The invariants are a lot more complex than in `RealTimeQueue`. * The program also fixes a bug in Okasaki's implementatin: see function `rotateDrop` */ object RealTimeDeque { sealed abstract class Stream[T] { @inline def isEmpty: Boolean = { this match { case SNil() => true case _ => false } } @inline def isCons: Boolean = { this match { case SCons(_, _) => true case _ => false } } def size: BigInt = { this match { case SNil() => BigInt(0) case SCons(x, t) => 1 + (t*).size } } ensuring (_ >= 0) } case class SCons[T](x: T, tail: Lazy[Stream[T]]) extends Stream[T] case class SNil[T]() extends Stream[T] @inline def ssize[T](l: Lazy[Stream[T]]): BigInt = (l*).size def isConcrete[T](l: Lazy[Stream[T]]): Boolean = { l.isEvaluated && (l* match { case SCons(_, tail) => isConcrete(tail) case _ => true }) } @invstate def revAppend[T](l1: Lazy[Stream[T]], l2: Lazy[Stream[T]]): Lazy[Stream[T]] = { require(isConcrete(l1) && isConcrete(l2)) l1.value match { case SNil() => l2 case SCons(x, tail) => val nt: Lazy[Stream[T]] = SCons[T](x, l2) revAppend(tail, nt) } } ensuring(res => ssize(res) == ssize(l1) + ssize(l2) && isConcrete(res) && (ssize(l1) >= 1 ==> (res*).isCons) && time <= 20*ssize(l1) + 20) @invstate def drop[T](n: BigInt, l: Lazy[Stream[T]]): Lazy[Stream[T]] = { require(n >= 0 && isConcrete(l) && ssize(l) >= n) if (n == 0) { l } else { l.value match { case SNil() => l case SCons(x, tail) => drop(n - 1, tail) } } } ensuring(res => isConcrete(res) && ssize(res) == ssize(l) - n && time <= 20*n + 20) @invstate def take[T](n: BigInt, l: Lazy[Stream[T]]): Lazy[Stream[T]] = { require(n >= 0 && isConcrete(l) && ssize(l) >= n) val r: Lazy[Stream[T]] = if (n == 0) { SNil[T]() } else { l.value match { case SNil() => l case SCons(x, tail) => SCons[T](x, take(n - 1, tail)) } } r } ensuring(res => isConcrete(res) && ssize(res) == n && time <= 30*n + 30) @invstate def takeLazy[T](n: BigInt, l: Lazy[Stream[T]]): Stream[T] = { require(isConcrete(l) && n >= 1 && ssize(l) >= n) l.value match { case SCons(x, tail) => if (n == 1) SCons[T](x, SNil[T]()) else SCons[T](x, $(takeLazy(n - 1, tail))) } } ensuring(res => res.size == n && res.isCons && time <= 20) @invstate def rotateRev[T](r: Lazy[Stream[T]], f: Lazy[Stream[T]], a: Lazy[Stream[T]]): Stream[T] = { require(isConcrete(r) && isConcrete(f) && isConcrete(a) && { val lenf = ssize(f) val lenr = ssize(r) (lenf <= 2 * lenr + 3 && lenf >= 2 * lenr + 1) }) r.value match { case SNil() => revAppend(f, a).value // |f| <= 3 case SCons(x, rt) => SCons(x, $(rotateRev(rt, drop(2, f), revAppend(take(2, f), a)))) } // here, it doesn't matter whether 'f' has i elements or not, what we want is |drop(2,f)| + |take(2,f)| == |f| } ensuring (res => res.size == (r*).size + (f*).size + (a*).size && res.isCons && time <= 250) @invstate def rotateDrop[T](r: Lazy[Stream[T]], i: BigInt, f: Lazy[Stream[T]]): Stream[T] = { require(isConcrete(r) && isConcrete(f) && i >= 0 && { val lenf = ssize(f) val lenr = ssize(r) (lenf >= 2 * lenr + 2 && lenf <= 2 * lenr + 3) && // size invariant between 'f' and 'r' lenf > i }) val rval = r.value if(i < 2 || rval == SNil[T]()) { // A bug in Okasaki implementation: we must check for: 'rval = SNil()' val a: Lazy[Stream[T]] = SNil[T]() rotateRev(r, drop(i, f), a) } else { rval match { case SCons(x, rt) => SCons(x, $(rotateDrop(rt, i - 2, drop(2, f)))) } } } ensuring(res => res.size == (r*).size + (f*).size - i && res.isCons && time <= 300) def firstUneval[T](l: Lazy[Stream[T]]): Lazy[Stream[T]] = { if (l.isEvaluated) { l* match { case SCons(_, tail) => firstUneval(tail) case _ => l } } else l } ensuring (res => (!(res*).isEmpty || isConcrete(l)) && ((res*).isEmpty || !res.isEvaluated) && // if the return value is not a Nil closure then it would not have been evaluated (res.value match { case SCons(_, tail) => firstUneval(l) == firstUneval(tail) // after evaluating the firstUneval closure in 'l' we can access the next unevaluated closure case _ => true })) case class Queue[T](f: Lazy[Stream[T]], lenf: BigInt, sf: Lazy[Stream[T]], r: Lazy[Stream[T]], lenr: BigInt, sr: Lazy[Stream[T]]) { def isEmpty = lenf + lenr == 0 def valid = { (firstUneval(f) == firstUneval(sf)) && (firstUneval(r) == firstUneval(sr)) && (lenf == ssize(f) && lenr == ssize(r)) && (lenf <= 2*lenr + 1 && lenr <= 2*lenf + 1) && { val mind = min(2*lenr-lenf+2, 2*lenf-lenr+2) ssize(sf) <= mind && ssize(sr) <= mind } } } /** * A function that takes streams where the size of front and rear streams violate * the balance invariant, and restores the balance. */ def createQueue[T](f: Lazy[Stream[T]], lenf: BigInt, sf: Lazy[Stream[T]], r: Lazy[Stream[T]], lenr: BigInt, sr: Lazy[Stream[T]]): Queue[T] = { require(firstUneval(f) == firstUneval(sf) && firstUneval(r) == firstUneval(sr) && (lenf == ssize(f) && lenr == ssize(r)) && ((lenf - 1 <= 2*lenr + 1 && lenr <= 2*lenf + 1) || (lenf <= 2*lenr + 1 && lenr - 2 <= 2*lenf + 1)) && { val mind = max(min(2*lenr-lenf+2, 2*lenf-lenr+2), 0) ssize(sf) <= mind && ssize(sr) <= mind }) if(lenf > 2*lenr + 1) { val i = (lenf + lenr) / 2 val j = lenf + lenr - i val nr = rotateDrop(r, i, f) val nf = takeLazy(i, f) Queue(nf, i, nf, nr, j, nr) } else if(lenr > 2*lenf + 1) { val i = (lenf + lenr) / 2 val j = lenf + lenr - i val nf = rotateDrop(f, j, r) // here, both 'r' and 'f' are concretized val nr = takeLazy(j, r) Queue(nf, i, nf, nr, j, nr) } else Queue(f, lenf, sf, r, lenr, sr) } ensuring(res => res.valid && time <= 400) /** * Forces the schedules, and ensures that `firstUneval` equality is preserved */ def force[T](tar: Lazy[Stream[T]], htar: Lazy[Stream[T]], other: Lazy[Stream[T]], hother: Lazy[Stream[T]]): Lazy[Stream[T]] = { require(firstUneval(tar) == firstUneval(htar) && firstUneval(other) == firstUneval(hother)) tar.value match { case SCons(_, tail) => tail case _ => tar } } ensuring (res => { //lemma instantiations val in = inState[Stream[T]] val out = outState[Stream[T]] funeMonotone(tar, htar, in, out) && funeMonotone(other, hother, in, out) && { //properties val rsize = ssize(res) firstUneval(htar) == firstUneval(res) && // follows from post of fune firstUneval(other) == firstUneval(hother) && (rsize == 0 || rsize == ssize(tar) - 1) } && time <= 350 }) /** * Forces the schedules in the queue twice and ensures the `firstUneval` property. */ def forceTwice[T](q: Queue[T]): (Lazy[Stream[T]], Lazy[Stream[T]]) = { require(q.valid) val nsf = force(force(q.sf, q.f, q.r, q.sr), q.f, q.r, q.sr) // forces q.sf twice val nsr = force(force(q.sr, q.r, q.f, nsf), q.r, q.f, nsf) // forces q.sr twice (nsf, nsr) } // the following properties are ensured, but need not be stated /*ensuring (res => { val nsf = res._1 val nsr = res._2 firstUneval(q.f) == firstUneval(nsf) && firstUneval(q.r) == firstUneval(nsr) && (ssize(nsf) == 0 || ssize(nsf) == ssize(q.sf) - 2) && (ssize(nsr) == 0 || ssize(nsr) == ssize(q.sr) - 2) && time <= 1500 })*/ def empty[T] = { val nil: Lazy[Stream[T]] = SNil[T]() Queue(nil, 0, nil, nil, 0, nil) } /** * Adding an element to the front of the list */ def cons[T](x: T, q: Queue[T]): Queue[T] = { require(q.valid) val nf: Stream[T] = SCons[T](x, q.f) // force the front and rear scheds once val nsf = force(q.sf, q.f, q.r, q.sr) val nsr = force(q.sr, q.r, q.f, nsf) createQueue(nf, q.lenf + 1, nsf, q.r, q.lenr, nsr) } ensuring (res => res.valid && time <= 1200) /** * Removing the element at the front, and returning the tail */ def tail[T](q: Queue[T]): Queue[T] = { require(!q.isEmpty && q.valid) force(q.f, q.sf, q.r, q.sr) match { // force 'f' case _ => tailSub(q) } } ensuring(res => res.valid && time <= 3000) def tailSub[T](q: Queue[T]): Queue[T] = { require(!q.isEmpty && q.valid && q.f.isEvaluated) q.f.value match { case SCons(x, nf) => val (nsf, nsr) = forceTwice(q) // here, sf and sr got smaller by 2 holds, the schedule invariant still holds createQueue(nf, q.lenf - 1, nsf, q.r, q.lenr, nsr) case SNil() => // in this case 'r' will have only one element by invariant empty[T] } } ensuring(res => res.valid && time <= 2750) /** * Reversing a list. Takes constant time. * This implies that data structure is a `deque`. */ def reverse[T](q: Queue[T]): Queue[T] = { require(q.valid) Queue(q.r, q.lenr, q.sr, q.f, q.lenf, q.sf) } ensuring(q.valid && time <= 10) // Properties of `firstUneval`. We use `fune` as a shorthand for `firstUneval` /** * st1.subsetOf(st2) ==> fune(l, st2) == fune(fune(l, st1), st2) */ @traceInduct def funeCompose[T](l1: Lazy[Stream[T]], st1: Set[Lazy[Stream[T]]], st2: Set[Lazy[Stream[T]]]): Boolean = { require(st1.subsetOf(st2)) // property (firstUneval(l1) withState st2) == (firstUneval(firstUneval(l1) withState st1) withState st2) } holds /** * st1.subsetOf(st2) && fune(la,st1) == fune(lb,st1) ==> fune(la,st2) == fune(lb,st2) * The `fune` equality is preseved by evaluation of lazy closures. * This is a kind of frame axiom for `fune` but is slightly different in that * it doesn't require (st2 \ st1) to be disjoint from la and lb. */ def funeMonotone[T](l1: Lazy[Stream[T]], l2: Lazy[Stream[T]], st1: Set[Lazy[Stream[T]]], st2: Set[Lazy[Stream[T]]]): Boolean = { require((firstUneval(l1) withState st1) == (firstUneval(l2) withState st1) && st1.subsetOf(st2)) funeCompose(l1, st1, st2) && // lemma instantiations funeCompose(l2, st1, st2) && // induction scheme (if (l1.isEvaluated withState st1) { l1* match { case SCons(_, tail) => funeMonotone(tail, l2, st1, st2) case _ => true } } else true) && (firstUneval(l1) withState st2) == (firstUneval(l2) withState st2) // property } holds }
epfl-lara/leon
testcases/lazy-datastructures/withconst/Deque.scala
Scala
gpl-3.0
11,454
## roster_nb.py ## based on roster.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov <dkirov@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, 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. # $Id: roster.py,v 1.17 2005/05/02 08:38:49 snakeru Exp $ """ Simple roster implementation. Can be used though for different tasks like mass-renaming of contacts. """ from protocol import JID, Iq, Presence, Node, NodeProcessed, NS_MUC_USER, NS_ROSTER from plugin import PlugIn import logging log = logging.getLogger('nbxmpp.roster_nb') class NonBlockingRoster(PlugIn): """ Defines a plenty of methods that will allow you to manage roster. Also automatically track presences from remote JIDs taking into account that every JID can have multiple resources connected. Does not currently support 'error' presences. You can also use mapping interface for access to the internal representation of contacts in roster """ def __init__(self, version=None): """ Init internal variables """ PlugIn.__init__(self) self.version = version self._data = {} self._set=None self._exported_methods=[self.getRoster] self.received_from_server = False def Request(self, force=0): """ Request roster from server if it were not yet requested (or if the 'force' argument is set) """ if self._set is None: self._set = 0 elif not force: return iq = Iq('get', NS_ROSTER) if self.version is not None: iq.setTagAttr('query', 'ver', self.version) id_ = self._owner.getAnID() iq.setID(id_) self._owner.send(iq) log.info('Roster requested from server') return id_ def RosterIqHandler(self, dis, stanza): """ Subscription tracker. Used internally for setting items state in internal roster representation """ sender = stanza.getAttr('from') if not sender is None and not sender.bareMatch( self._owner.User + '@' + self._owner.Server): return query = stanza.getTag('query') if query: self.received_from_server = True self.version = stanza.getTagAttr('query', 'ver') if self.version is None: self.version = '' for item in query.getTags('item'): jid=item.getAttr('jid') if item.getAttr('subscription')=='remove': if self._data.has_key(jid): del self._data[jid] # Looks like we have a workaround # raise NodeProcessed # a MUST log.info('Setting roster item %s...' % jid) if not self._data.has_key(jid): self._data[jid]={} self._data[jid]['name']=item.getAttr('name') self._data[jid]['ask']=item.getAttr('ask') self._data[jid]['subscription']=item.getAttr('subscription') self._data[jid]['groups']=[] if not self._data[jid].has_key('resources'): self._data[jid]['resources']={} for group in item.getTags('group'): if group.getData() not in self._data[jid]['groups']: self._data[jid]['groups'].append(group.getData()) self._data[self._owner.User+'@'+self._owner.Server]={'resources': {}, 'name': None, 'ask': None, 'subscription': None, 'groups': None,} self._set=1 # Looks like we have a workaround # raise NodeProcessed # a MUST. Otherwise you'll get back an <iq type='error'/> def PresenceHandler(self, dis, pres): """ Presence tracker. Used internally for setting items' resources state in internal roster representation """ if pres.getTag('x', namespace=NS_MUC_USER): return jid=pres.getFrom() if not jid: # If no from attribue, it's from server jid=self._owner.Server jid=JID(jid) if not self._data.has_key(jid.getStripped()): self._data[jid.getStripped()]={'name':None,'ask':None,'subscription':'none','groups':['Not in roster'],'resources':{}} if type(self._data[jid.getStripped()]['resources'])!=type(dict()): self._data[jid.getStripped()]['resources']={} item=self._data[jid.getStripped()] typ=pres.getType() if not typ: log.info('Setting roster item %s for resource %s...'%(jid.getStripped(), jid.getResource())) item['resources'][jid.getResource()]=res={'show':None,'status':None,'priority':'0','timestamp':None} if pres.getTag('show'): res['show']=pres.getShow() if pres.getTag('status'): res['status']=pres.getStatus() if pres.getTag('priority'): res['priority']=pres.getPriority() if not pres.getTimestamp(): pres.setTimestamp() res['timestamp']=pres.getTimestamp() elif typ=='unavailable' and item['resources'].has_key(jid.getResource()): del item['resources'][jid.getResource()] # Need to handle type='error' also def _getItemData(self, jid, dataname): """ Return specific jid's representation in internal format. Used internally """ jid = jid[:(jid+'/').find('/')] return self._data[jid][dataname] def _getResourceData(self, jid, dataname): """ Return specific jid's resource representation in internal format. Used internally """ if jid.find('/') + 1: jid, resource = jid.split('/', 1) if self._data[jid]['resources'].has_key(resource): return self._data[jid]['resources'][resource][dataname] elif self._data[jid]['resources'].keys(): lastpri = -129 for r in self._data[jid]['resources'].keys(): if int(self._data[jid]['resources'][r]['priority']) > lastpri: resource, lastpri=r, int(self._data[jid]['resources'][r]['priority']) return self._data[jid]['resources'][resource][dataname] def delItem(self, jid): """ Delete contact 'jid' from roster """ self._owner.send(Iq('set', NS_ROSTER, payload=[Node('item', {'jid': jid, 'subscription': 'remove'})])) def getAsk(self, jid): """ Return 'ask' value of contact 'jid' """ return self._getItemData(jid, 'ask') def getGroups(self, jid): """ Return groups list that contact 'jid' belongs to """ return self._getItemData(jid, 'groups') def getName(self, jid): """ Return name of contact 'jid' """ return self._getItemData(jid, 'name') def getPriority(self, jid): """ Return priority of contact 'jid'. 'jid' should be a full (not bare) JID """ return self._getResourceData(jid, 'priority') def getRawRoster(self): """ Return roster representation in internal format """ return self._data def getRawItem(self, jid): """ Return roster item 'jid' representation in internal format """ return self._data[jid[:(jid+'/').find('/')]] def getShow(self, jid): """ Return 'show' value of contact 'jid'. 'jid' should be a full (not bare) JID """ return self._getResourceData(jid, 'show') def getStatus(self, jid): """ Return 'status' value of contact 'jid'. 'jid' should be a full (not bare) JID """ return self._getResourceData(jid, 'status') def getSubscription(self, jid): """ Return 'subscription' value of contact 'jid' """ return self._getItemData(jid, 'subscription') def getResources(self, jid): """ Return list of connected resources of contact 'jid' """ return self._data[jid[:(jid+'/').find('/')]]['resources'].keys() def setItem(self, jid, name=None, groups=[]): """ Rename contact 'jid' and sets the groups list that it now belongs to """ iq = Iq('set', NS_ROSTER) query = iq.getTag('query') attrs = {'jid': jid} if name: attrs['name'] = name item = query.setTag('item', attrs) for group in groups: item.addChild(node=Node('group', payload=[group])) self._owner.send(iq) def setItemMulti(self, items): """ Rename multiple contacts and sets their group lists """ iq = Iq('set', NS_ROSTER) query = iq.getTag('query') for i in items: attrs = {'jid': i['jid']} if i['name']: attrs['name'] = i['name'] item = query.setTag('item', attrs) for group in i['groups']: item.addChild(node=Node('group', payload=[group])) self._owner.send(iq) def getItems(self): """ Return list of all [bare] JIDs that the roster is currently tracks """ return self._data.keys() def keys(self): """ Same as getItems. Provided for the sake of dictionary interface """ return self._data.keys() def __getitem__(self, item): """ Get the contact in the internal format. Raises KeyError if JID 'item' is not in roster """ return self._data[item] def getItem(self, item): """ Get the contact in the internal format (or None if JID 'item' is not in roster) """ if self._data.has_key(item): return self._data[item] def Subscribe(self, jid): """ Send subscription request to JID 'jid' """ self._owner.send(Presence(jid, 'subscribe')) def Unsubscribe(self, jid): """ Ask for removing our subscription for JID 'jid' """ self._owner.send(Presence(jid, 'unsubscribe')) def Authorize(self, jid): """ Authorize JID 'jid'. Works only if these JID requested auth previously """ self._owner.send(Presence(jid, 'subscribed')) def Unauthorize(self, jid): """ Unauthorise JID 'jid'. Use for declining authorisation request or for removing existing authorization """ self._owner.send(Presence(jid, 'unsubscribed')) def getRaw(self): """ Return the internal data representation of the roster """ return self._data def setRaw(self, data): """ Return the internal data representation of the roster """ self._data = data self._data[self._owner.User + '@' + self._owner.Server] = { 'resources': {}, 'name': None, 'ask': None, 'subscription': None, 'groups': None } self._set = 1 def plugin(self, owner, request=1): """ Register presence and subscription trackers in the owner's dispatcher. Also request roster from server if the 'request' argument is set. Used internally """ self._owner.RegisterHandler('iq', self.RosterIqHandler, 'result', NS_ROSTER, makefirst = 1) self._owner.RegisterHandler('iq', self.RosterIqHandler, 'set', NS_ROSTER) self._owner.RegisterHandler('presence', self.PresenceHandler) if request: return self.Request() def _on_roster_set(self, data): if data: self._owner.Dispatcher.ProcessNonBlocking(data) if not self._set: return if not hasattr(self, '_owner') or not self._owner: # Connection has been closed by receiving a <stream:error> for ex, return self._owner.onreceive(None) if self.on_ready: self.on_ready(self) self.on_ready = None return True def getRoster(self, on_ready=None, force=False): """ Request roster from server if neccessary and returns self """ return_self = True if not self._set: self.on_ready = on_ready self._owner.onreceive(self._on_roster_set) return_self = False elif on_ready: on_ready(self) return_self = False if return_self or force: return self return None
9thSenseRobotics/bosh_server
nbxmpp-0.1/nbxmpp/roster_nb.py
Python
gpl-3.0
13,001
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("LightStone4net.WinUI")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyProduct("LightStone4net.WinUI")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("66735717-0731-4c11-900a-2277ca8f3ea7")]
James-Lockwood/lightstone4net
Code/LightStone4net.WinUI/Properties/AssemblyInfo.cs
C#
gpl-3.0
905
using System.IO; using System.Text; using Microsoft.WindowsAzure.Storage.Blob; namespace ScrewTurn.Wiki.Plugins.AzureStorage { /// <summary> /// /// </summary> public static class CloudBlobExtensions { /// <summary> /// Uploads a string of text to a block blob. /// </summary> /// <param name="blob"></param> /// <param name="content">The text to upload, encoded as a UTF-8 string.</param> public static void UploadText(this ICloudBlob blob, string content) { UploadText(blob, content, Encoding.UTF8, null); } /// <summary> /// Uploads a string of text to a block blob. /// </summary> /// <param name="blob"></param> /// <param name="content">The text to upload.</param> /// <param name="encoding">An object that indicates the text encoding to use.</param> /// <param name="options">An object that specifies any additional options for the request.</param> public static void UploadText(this ICloudBlob blob, string content, Encoding encoding, BlobRequestOptions options) { UploadByteArray(blob, encoding.GetBytes(content), options); } /// <summary> /// Uploads a file from the file system to a block blob. /// </summary> /// <param name="blob"></param> /// <param name="fileName">The path and file name of the file to upload.</param> public static void UploadFile(this ICloudBlob blob, string fileName) { UploadFile(blob, fileName, null); } /// <summary> /// Uploads a file from the file system to a block blob. /// </summary> /// <param name="blob"></param> /// <param name="fileName">The path and file name of the file to upload.</param> /// <param name="options">An object that specifies any additional options for the request.</param> public static void UploadFile(this ICloudBlob blob, string fileName, BlobRequestOptions options) { using (var data = File.OpenRead(fileName)) { blob.UploadFromStream(data, null, options); } } /// <summary> /// Uploads an array of bytes to a block blob. /// </summary> /// <param name="blob"></param> /// <param name="content">The array of bytes to upload.</param> public static void UploadByteArray(this ICloudBlob blob, byte[] content) { UploadByteArray(blob, content, null); } /// <summary> /// Uploads an array of bytes to a blob. /// </summary> /// <param name="blob"></param> /// <param name="content">The array of bytes to upload.</param> /// <param name="options">An object that specifies any additional options for the request.</param> public static void UploadByteArray(this ICloudBlob blob, byte[] content, BlobRequestOptions options) { using (var data = new MemoryStream(content)) { blob.UploadFromStream(data, null, options); } } /// <summary> /// Downloads the blob's contents. /// </summary> /// <returns>The contents of the blob, as a string.</returns> public static string DownloadText(this ICloudBlob blob) { return DownloadText(blob, null); } /// <summary> /// Downloads the blob's contents. /// </summary> /// <param name="blob"></param> /// <param name="options">An object that specifies any additional options for the request.</param> /// <returns>The contents of the blob, as a string.</returns> public static string DownloadText(this ICloudBlob blob, BlobRequestOptions options) { Encoding encoding = GetDefaultEncoding(); byte[] array = DownloadByteArray(blob, options); return encoding.GetString(array); } /// <summary> /// Downloads the blob's contents to a file. /// </summary> /// <param name="blob"></param> /// <param name="fileName">The path and file name of the target file.</param> public static void DownloadToFile(this ICloudBlob blob, string fileName) { DownloadToFile(blob, fileName, null); } /// <summary> /// Downloads the blob's contents to a file. /// </summary> /// <param name="blob"></param> /// <param name="fileName">The path and file name of the target file.</param> /// <param name="options">An object that specifies any additional options for the request.</param> public static void DownloadToFile(this ICloudBlob blob, string fileName, BlobRequestOptions options) { using (var fileStream = File.Create(fileName)) { blob.DownloadToStream(fileStream, null, options); } } /// <summary> /// Downloads the blob's contents as an array of bytes. /// </summary> /// <returns>The contents of the blob, as an array of bytes.</returns> public static byte[] DownloadByteArray(this ICloudBlob blob) { return DownloadByteArray(blob, null); } /// <summary> /// Downloads the blob's contents as an array of bytes. /// </summary> /// <param name="blob"></param> /// <param name="options">An object that specifies any additional options for the request.</param> /// <returns>The contents of the blob, as an array of bytes.</returns> public static byte[] DownloadByteArray(this ICloudBlob blob, BlobRequestOptions options) { using (var memoryStream = new MemoryStream()) { blob.DownloadToStream(memoryStream, null, options); return memoryStream.ToArray(); } } /// <summary> /// Gets the default encoding for the blob, which is UTF-8. /// </summary> /// <returns>The default <see cref="Encoding"/> object.</returns> private static Encoding GetDefaultEncoding() { Encoding encoding = Encoding.UTF8; return encoding; } } }
Askanio/STW6
ScrewTurnWiki.AzureStorageProviders/CloudBlobExtensions.cs
C#
gpl-3.0
6,370
<?php /** * The view model to store the state of an ajax request/response in JSON objects. * * @author Jeremie Litzler * @copyright Copyright (c) 2015 * @licence http://opensource.org/licenses/gpl-license.php GNU Public License * @link https://github.com/WebDevJL/EasyMvc * @since Version 1.0.0 * @package BaseJsonVm */ namespace Library\ViewModels; if (!FrameworkConstants_ExecutionAccessRestriction) { exit('No direct script access allowed'); } class BaseJsonVm extends BaseVm { /** * * @var mixed The response to use by the JavaScript Client */ protected $Response; /** * Getter for $Response member. * * @return mixed * @see $Response member */ public function Response() { return $this->Response; } }
WebDevJL/EasyMVC
Library/ViewModels/BaseJsonVm.php
PHP
gpl-3.0
766
/* This file is part of Darling. Copyright (C) 2017 Lubos Dolezel Darling is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Darling 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 Darling. If not, see <http://www.gnu.org/licenses/>. */ #include <Foundation/Foundation.h> @interface NSVBTestedFault : NSObject @end
darlinghq/darling
src/private-frameworks/ViewBridge/include/ViewBridge/NSVBTestedFault.h
C
gpl-3.0
761
using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Net; using System.Web; using System.Web.Mvc; using System.Web.Security; using ACE.Web.Models.Account; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using RestSharp; namespace ACE.Web.Controllers { public class AccountController : Controller { [HttpGet] public ActionResult Login() { return View(new LoginModel()); } [HttpPost] public ActionResult Login(LoginModel model) { if (!ModelState.IsValid) return View(model); RestClient authClient = new RestClient(ConfigurationManager.AppSettings["Ace.Api"]); var authRequest = new RestRequest("/Account/Authenticate", Method.POST); authRequest.AddJsonBody(new { model.Username, model.Password }); var authResponse = authClient.Execute(authRequest); if (authResponse.StatusCode == HttpStatusCode.Unauthorized) { model.ErrorMessage = "Incorrect Username or Password"; return View(model); } else if (authResponse.StatusCode != HttpStatusCode.OK) { model.ErrorMessage = "Error connecting to API"; return View(model); } // else we got an OK response JObject response = JObject.Parse(authResponse.Content); var authToken = (string)response.SelectToken("authToken"); if (!string.IsNullOrWhiteSpace(authToken)) { JwtCookieManager.SetCookie(authToken); return RedirectToAction("Index", "Home", null); } return View(model); } [HttpGet] public ActionResult LogOff() { JwtCookieManager.SignOut(); return RedirectToAction("Index", "Home", null); } [HttpGet] public ActionResult Register() { return View(new RegisterModel()); } [HttpPost] public ActionResult Register(RegisterModel model) { // create the user return View(); } } }
fantoms/ACE
Source/ACE.Web/Controllers/AccountController.cs
C#
gpl-3.0
2,291
<html> <head> <title>BOOST_PP_ARRAY_TO_SEQ</title> <link rel="stylesheet" type="text/css" href="../styles.css"> </head> <body> <div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_SEQ</b> macro converts an <i>array</i> to a <i>seq</i>. </div> <h4> Usage </h4> <div class="code"> <b>BOOST_PP_ARRAY_TO_SEQ</b>(<i>array</i>) </div> <h4> Arguments </h4> <dl><dt>array</dt> <dd> The <i>array</i> to be converted. </dd> </dl> <h4> Requirements </h4> <div> <b>Header:</b> &nbsp;<a href="../headers/array/to_seq.html">&lt;boost/preprocessor/array/to_seq.hpp&gt;</a> </div> <h4> Sample Code </h4> <div> <pre>#include &lt;<a href="../headers/array/to_seq.html">boost/preprocessor/array/to_seq.hpp</a>&gt;<br><br><a href="array_to_seq.html">BOOST_PP_ARRAY_TO_SEQ</a>((3, (a, b, c))) // expands to (a)(b)(c)<br></pre> </div> <hr size="1"> <div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011</i> </div> <div style="margin-left: 0px;"> <p><small>Distributed under the Boost Software License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> </div> </body> </html>
cppisfun/GameEngine
foreign/boost/libs/preprocessor/doc/ref/array_to_seq.html
HTML
gpl-3.0
1,262
# -*- coding: utf-8 -*- from django.contrib import admin from django.utils.translation import ugettext as _ from .models import AbuseReport, SearchTermRecord admin.site.register(AbuseReport) class SearchTermAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'ip_address', 'get_user_full_name', ) search_fields = ('term', ) def get_user_full_name(self, obj): if obj.user is None: return "(%s)" % _(u"None") return obj.user.get_full_name() get_user_full_name.short_description = "user" admin.site.register(SearchTermRecord, SearchTermAdmin)
piotrek-golda/CivilHubIndependantCopy
places_core/admin.py
Python
gpl-3.0
596
""" ================================================================================ Logscaled Histogram ================================================================================ | Calculates a logarithmically spaced histogram for a data map. | Written By: Matthew Stadelman | Date Written: 2016/03/07 | Last Modifed: 2016/10/20 """ import scipy as sp from .histogram import Histogram class HistogramLogscale(Histogram): r""" Performs a histogram where the bin limits are logarithmically spaced based on the supplied scale factor. If there are negative values then the first bin contains everything below 0, the next bin will contain everything between 0 and 1. kwargs include: scale_fact - numeric value to generate axis scale for bins. A scale fact of 10 creates bins: 0-1, 1-10, 10-100, etc. """ def __init__(self, field, **kwargs): super().__init__(field) self.args.update(kwargs) self.output_key = 'hist_logscale' self.action = 'histogram_logscale' @classmethod def _add_subparser(cls, subparsers, parent): r""" Adds a specific action based sub-parser to the supplied arg_parser instance. """ parser = subparsers.add_parser(cls.__name__, aliases=['histlog'], parents=[parent], help=cls.__doc__) # parser.add_argument('scale_fact', type=float, nargs='?', default=10.0, help='base to generate logscale from') parser.set_defaults(func=cls) def define_bins(self, **kwargs): r""" This defines the bins for a logscaled histogram """ self.data_vector.sort() sf = self.args['scale_fact'] num_bins = int(sp.logn(sf, self.data_vector[-1]) + 1) # # generating initial bins from 1 - sf**num_bins low = list(sp.logspace(0, num_bins, num_bins + 1, base=sf))[:-1] high = list(sp.logspace(0, num_bins, num_bins + 1, base=sf))[1:] # # Adding "catch all" bins for anything between 0 - 1 and less than 0 if self.data_vector[0] < 1.0: low.insert(0, 0.0) high.insert(0, 1.0) if self.data_vector[0] < 0.0: low.insert(0, self.data_vector[0]) high.insert(0, 0.0) # self.bins = [bin_ for bin_ in zip(low, high)]
stadelmanma/netl-ap-map-flow
apmapflow/data_processing/histogram_logscale.py
Python
gpl-3.0
2,486
#region License // Copyright (c) 2013, ClearCanvas Inc. // All rights reserved. // http://www.ClearCanvas.ca // // This file is part of the ClearCanvas RIS/PACS open source project. // // The ClearCanvas RIS/PACS open source project is free software: you can // redistribute it and/or modify it under the terms of the GNU General Public // License as published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // The ClearCanvas RIS/PACS open source project is distributed in the hope that it // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General // Public License for more details. // // You should have received a copy of the GNU General Public License along with // the ClearCanvas RIS/PACS open source project. If not, see // <http://www.gnu.org/licenses/>. #endregion namespace Macro.Desktop.View.WinForms { /// <summary> /// Enumeration for specifying the style of check boxes displayed on a <see cref="BindingTreeView"/> control. /// </summary> public enum CheckBoxStyle { /// <summary> /// Indicates that no check boxes should be displayed at all. /// </summary> None, /// <summary> /// Indicates that standard true/false check boxes should be displayed. /// </summary> Standard, /// <summary> /// Indicates that tri-state (true/false/unknown) check boxes should be displayed. /// </summary> TriState } }
mayioit/MacroMedicalSystem
Desktop/View/WinForms/CheckBoxStyle.cs
C#
gpl-3.0
1,515